Files
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

71 lines
1.7 KiB
Python

"""Verify the repository layout matches MASTER_SPEC §24.
This guards the acceptance criterion "Directory layout matches section 24 exactly"
and doubles as the smoke test proving pytest collects and runs successfully.
"""
from __future__ import annotations
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parent.parent
# Directories required by MASTER_SPEC §24 (Repository Structure).
REQUIRED_DIRS = [
"nodes",
"compiler",
"compiler/analyzer",
"compiler/validator",
"compiler/resolver",
"compiler/common",
"knowledge_base",
"schemas",
"prompts",
"config",
"tests",
"tests/analyzer",
"tests/resolver",
"tests/validator",
"tests/integration",
"tests/regression",
"examples",
"scripts",
"docs",
]
# Files required at the repository root by §24.
REQUIRED_ROOT_FILES = [
"__init__.py",
"LICENSE",
"README.md",
"pyproject.toml",
]
# Python packages that must be importable (root loaded by ComfyUI by path, not here).
CODE_PACKAGES = [
"compiler",
"compiler.analyzer",
"compiler.validator",
"compiler.resolver",
"compiler.common",
"nodes",
"schemas",
]
def test_required_directories_exist() -> None:
missing = [d for d in REQUIRED_DIRS if not (REPO_ROOT / d).is_dir()]
assert not missing, f"Missing directories from MASTER_SPEC §24: {missing}"
def test_required_root_files_exist() -> None:
missing = [f for f in REQUIRED_ROOT_FILES if not (REPO_ROOT / f).is_file()]
assert not missing, f"Missing required root files: {missing}"
def test_code_packages_are_importable() -> None:
import importlib
for package in CODE_PACKAGES:
importlib.import_module(package)