Skip to content

v0.8.2 — tree-aware consumers + plan validator

Choose a tag to compare

@marianif marianif released this 24 May 19:05
· 2 commits to main since this release

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-cluster kinds, kindCoherent, folders, sameFolder flags; new crossKindBlocked summary counter
  • composition-patterns.mjs, app-anatomy.mjs, screen-choreography.mjs — each accepts --tree=path.json and prefers tree.roots.screens over the hardcoded screens-dir fallback. Unusual layouts (src/app/, monorepo packages/) are now reachable.
  • design-system-scan.mjs threads --tree to all four screen-walking scripts

New validate-plan.mjs

Mechanical guard on design-system-plan.json. Hard refusal rules from the reference doc:

  • Missing life block 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 winner or memberJobs → error
  • Generic vibe traits ("modern", "clean") → warning
  • States missing when clauses → 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-report could cluster an atom and an organism if their names looked similar
  • composition-patterns walked 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