4 Commits
Author SHA1 Message Date
bc0edb1827 feat(nodes)!: fold Knowledge Base Loader into the Configuration node (#149)
The Knowledge Base directory was entered in two places — the Configuration node's
knowledge_base path and the Knowledge Base Loader node's path — a duplication with
no benefit. Remove the Knowledge Base Loader node and have the Configuration node
load the Knowledge Base itself, emitting it on a new knowledge_base output wired
into the Resolver.

- New nodes/kb_loading.py holds the shared, process-wide load-once cache and
  package-relative path resolution (extracted from the deleted loader node).
- Configuration node: gains a knowledge_base_reload input and a KNOWLEDGE_BASE
  output; RETURN is now (config, knowledge_base, warnings, errors). A KB load
  failure surfaces on errors while the config is still emitted (the Analyzer and
  Validator do not need the KB).
- Remove SceneCompilerKnowledgeBaseLoader from the node registrations.
- Rebuild the example workflow to wire Configuration.knowledge_base -> Resolver.
- Docs (README, docs/nodes.md) updated; tests moved to test_kb_loading.py.

BREAKING CHANGE: the Knowledge Base Loader node is removed. Workflows that used it
must load the Knowledge Base via the Configuration node's knowledge_base output.

Co-authored-by: kunail0804 <kunail0804@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 17:05:53 +02:00
b863e53754 fix(examples): refresh workflow widget values (bugs 1 & 2) (#147)
* feat(nodes): centralize duplicated settings on Configuration + add tooltips

The Scene Analyzer built its own Config from local model_name/temperature/
timeout/system_prompt widgets and ignored the Configuration node entirely, so
the analyzer model was set in two disconnected places (bug report #4).

- Scene Analyzer: add an optional `config` (COMPILER_CONFIG) input and drop the
  duplicated model/temperature/timeout widgets. Settings now come from the
  Configuration node; without one, defaults apply with a 300 s cold-load-friendly
  timeout. A non-empty `system_prompt` widget still overrides the config.
- Knowledge Base Loader: accept an optional `config`; when wired, its KB path and
  version take precedence over the node's own widgets.
- Add tooltips to every input on all six nodes.

Docs (docs/nodes.md) updated for the Analyzer/KB Loader input changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* fix(examples): refresh workflow widget values; guard against widget drift

The shipped example workflow carried stale positional widget values from before
V2 removed prompt_builder.trim_empty_outputs from the Configuration node. ComfyUI
stores widgets positionally, so every later value shifted: debug_level received a
leftover boolean ("false") and, in older saved workflows, the prompt separator
received a boolean ("true") instead of ",".

- Rebuild the Configuration node's 21 widget values in the current order.
- Update the Analyzer node to the current shape (natural_language + system_prompt;
  config now arrives via a wired COMPILER_CONFIG input) and wire the Configuration
  node into it.
- Add the KB Loader's version widget value.
- New regression test: every example-workflow node's widgets_values length must
  match the node's current widget count, so this drift cannot recur silently.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: kunail0804 <kunail0804@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-16 16:29:58 +02:00
5e146d5a55 feat!: v1.1 — Resolver emits a flat prompt, drop categories (#85)
* feat!: collapse pipeline — Resolver emits a flat prompt, drop categories (v1.1)

BREAKING CHANGE: the Category Splitter and Prompt Builder stages and nodes are
removed. The Resolver is now the translator from Scene JSON to prompt: it resolves
concepts to Knowledge Base tags and joins them into one flat comma-separated
prompt string, in resolution order (which naturally leads with character concepts).

Resolver node outputs are now (prompt, warnings, errors, json) — the json being
the traceable resolved tags so a translation problem is inspectable. Node count
drops from 8 to 6. The CategoryMap/PromptOutput models and their schemas are
removed; the `category` field remains on entries and resolved tags for
traceability only. Debug Viewer simplified to scene/warnings/errors.

Goldens, example scenes/workflow, integration/performance/repo-layout/release
tests, benchmark script, and the docs (README + wiki) are updated to the flat
prompt. Version bumped to 1.1.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* build: drop removed splitter/builder packages from pyproject

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: kunail0804 <kunail0804@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 00:00:48 +02:00
02c3153359 docs(examples): add example workflow, scenes, and expected outputs (#30) (#74)
Ship ready-to-use examples (MASTER_SPEC §24, Phase 7).

- examples/workflows/scene_compiler_pipeline.json: a ComfyUI workflow wiring
  Configuration + Knowledge Base Loader + Analyzer -> Validator -> Resolver ->
  Category Splitter -> Prompt Builder.
- examples/scenes/*.scene.json: standalone example Scene JSON documents
  (single character; two characters with an interaction and an expansion).
- examples/scenes/*.prompts.json: the exact prompt outputs each scene compiles to
  with the shipped Knowledge Base and default config.
- examples/README.md: how to load the workflow and use the scene examples.

tests/test_examples.py asserts each example Scene JSON compiles to its documented
outputs, and that the workflow references only registered Scene Compiler nodes
and includes the full pipeline. The workflow JSON still wants a ComfyUI visual
check.

Co-authored-by: kunail0804 <kunail0804@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-09 13:54:08 +02:00