v0.8.2 — tree-aware consumers + plan validator
Closes the foundation work started in v0.8.1: every Act 1 script now reads the same directory-tree source of truth, and a mechanical validator enforces the reference doc's refusal rules before Act 3 can execute.
What changed
Tree integration in remaining consumers
duplication-report.mjs— cross-kind block (a path-sourced atom and a path-sourced organism are not duplicates regardless of name/prop overlap); ladder-aware so atoms and molecules can still cluster legitimately; per-clusterkinds,kindCoherent,folders,sameFolderflags; newcrossKindBlockedsummary countercomposition-patterns.mjs,app-anatomy.mjs,screen-choreography.mjs— each accepts--tree=path.jsonand preferstree.roots.screensover the hardcoded screens-dir fallback. Unusual layouts (src/app/, monorepopackages/) are now reachable.design-system-scan.mjsthreads--treeto all four screen-walking scripts
New validate-plan.mjs
Mechanical guard on design-system-plan.json. Hard refusal rules from the reference doc:
- Missing
lifeblock on any organism → error (the five-question gate) - Fewer than 3 states → error
- Missing neighbors AND no
solitudeNote→ error - Missing evidence → error
- Missing or non-verb-led job → error
- Missing or invalid disposition (CONFIRM | REVISE | ADD | RETIRE) → error
- Cleanup approvals missing or invalid → error
- Merges without
winnerormemberJobs→ error - Generic vibe traits ("modern", "clean") → warning
- States missing
whenclauses → warning
Exit code 1 on any error so Act 3 can gate on it. Surfaces pendingApprovals count so the agent knows when cleanup is ready to execute.
The reference doc now requires running the validator between "present the plan" and Act 3.
Why this matters
Before v0.8.2:
duplication-reportcould cluster an atom and an organism if their names looked similarcomposition-patternswalked hardcoded screens-dir defaults — unusual layouts dropped silently- The reference doc's refusal rules were aspirational — agent could author non-compliant plans and nothing caught it
After v0.8.2:
- Tree is the single source of truth across every Act 1 script
- The contract between reference doc and runtime is mechanical, not honor-system
- Ready for real-app testing — every documented guarantee is enforced
84/84 tests pass.
🤖 Generated with Claude Code