Reference implementation for the Phoenix Architecture. Work in progress. aicoding.leaflet.pub
phoenix docs DOMAIN-DRIVEN-REDESIGN.md
3.7 kB · 59 lines
Markdown
at main

Domain-Driven Redesign — decouple Phoenix from document structure #

Premise (from aicoding.leaflet.pub + the n=1 / Regenerative-Grain / Compile-to- Architecture essays): intent is the asset; document layout is an authoring accident — the "framework" of the input. The pipeline must derive a semantic domain graph from unstructured text (could be raw meeting notes) and let IUs emerge from domain cohesion, never from markdown headings. Structure survives only as a provenance anchor (a back-pointer for "why"), at most a weak prior — never an organizing principle or a hard boundary.

The three phases #

Phase 1 — Ingestion signal-classifier (this turn) #

Treat input as a flat stream of statements; classify each as signal (requirement / constraint / invariant / definition / decision) vs noise (chatter, greetings, process talk, questions, examples, meta). Noise is dropped from canonicalization (kept conservatively when unsure — the D-rate/eval trust loop catches the rest). This is "smart about what to ignore."

Phase 2 — section_path → provenance-only anchor (this turn: semantics; identity next) #

Phase 3 — Semantic IU clustering, mass-bounded (this turn) #

Replaced planIUs' (doc, section) buckets with domain clustering (src/iu-clusterer.ts):

Notes #

  • The "fold refinement sections" heuristic (regex on heading names) is now deleted — domain clustering folds rules into their entity by meaning, not by heading.
  • Risk: clustering is fuzzier than buckets → pushes correctness onto evals + the D-rate trust loop, which is exactly where the architecture says value lives, but raises the bar on canonicalization confidence and cold-start.

Status: Phase 1 ✓, Phase 2 semantics ✓, Phase 3 (LLM + rule clustering) ✓. #

Remaining: clause-identity de-structuring (drop section_path from clause_id) and #

incremental re-clustering. #