3 Commits
Author SHA1 Message Date
0d46f7b524 feat(kb-editor): web KB editor with live validation & atomic saves (#33) (#141)
* feat(kb-editor): web KB editor with live validation & atomic saves (#33)

Closes #123, #124, #125, #126.

- Backend API + transport-independent handlers under /scene-compiler/kb,
  registered from the package init and guarded so it no-ops without ComfyUI.
- Static self-contained web page (list/search/filter/create/edit/delete) with
  live validation and save blocking on errors.
- Validation reuses kb_validation (new validate_entry / validate_cross_entry) as
  the single source of truth, against the candidate and the whole-KB state.
- Atomic (temp+fsync+rename), format-safe saves: only the edited entry changes,
  key order and trailing newline preserved, curated-vs-generated split respected.

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

* fix(kb-editor): associate form labels with inputs; await load (SonarCloud a11y)

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

* fix(kb-editor): label sidebar controls; async IIFE for init (SonarCloud)

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-13 18:39:48 +02:00
0de9b43d7a feat(nodes): add the Scene Analyzer ComfyUI node (#19) (#63)
Expose the Scene Analyzer as a ComfyUI node (MASTER_SPEC §20) plus the node
registration plumbing and a shared output adapter.

- nodes/scene_analyzer_node.py: SceneAnalyzerNode, a thin adapter. Inputs are
  Natural Language, Model Name, Temperature, Timeout, and an optional System
  Prompt override; it builds a Config, constructs OllamaBackend.from_config, and
  delegates to analyze(). Outputs (scene, warnings, errors): the SCENE model and
  the warnings/errors formatted for display. No compiler logic in the node.
- nodes/adapters.py: format_messages() renders diagnostics as CODE: description
  lines.
- Registration: nodes/__init__.py aggregates NODE_CLASS_MAPPINGS /
  NODE_DISPLAY_NAME_MAPPINGS; the root __init__.py re-exports them.

ComfyUI compatibility: the node package uses relative imports internally so our
`nodes` package is never resolved as ComfyUI's own top-level `nodes` module, and
the entry point puts the repo root on sys.path so `compiler`/`schemas` resolve
when ComfyUI loads the package by file path.

Tests (no live Ollama): INPUT_TYPES/RETURN metadata, delegation to analyze
(monkeypatched) with warnings/errors surfaced, empty-message strings, system
prompt override passthrough, and ComfyUI registration.

Co-authored-by: kunail0804 <kunail0804@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-08 14:08:03 +02:00
72a60aa28b chore: initialize repository structure and tooling (#1) (#45)
Scaffold the Phase 0 foundation per MASTER_SPEC §24:

- Directory layout: nodes/, compiler/{analyzer,validator,resolver,splitter,
  builder,common}/, knowledge_base/, schemas/, prompts/, config/,
  tests/{analyzer,resolver,validator,integration,regression}/, examples/,
  scripts/, docs/.
- pyproject.toml targeting Python 3.11+, jsonschema as the single runtime dep,
  ruff + pytest as dev deps, explicit package list, and ruff/pytest config.
- ruff for linting and formatting; pytest with repo root on pythonpath.
- GitHub Actions CI running install, ruff lint, ruff format check, and pytest
  on Python 3.11 and 3.12 for pushes and pull requests.
- docs/ skeleton and CONTRIBUTING.md referencing the wiki.
- Layout test asserting the §24 structure and package importability.

Co-authored-by: kunail0804 <kunail0804@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-07 16:59:32 +02:00