docs: architecture principles mapped to enforcing gates and open ledgers - #1428
Conversation
…s in CONTEXT.md Writes down the rule → gate → ledger mapping (dependency rule → layering R1-R3/spine + R6 ratchet; acyclicity → R4 + depgraph tolerated-cycle report; policy×detail → the two registries + leak guard + transport seam; information hiding → R7; boundaries-are-earned with the #1409/platform-descriptor evidence; component metrics as observatory data per #1423) so contributors and agents get the why behind the guards they hit, in one place.
Size Report
Startup median (7 runs, lower is better):
Top changed chunks: no changes in the largest emitted chunks. |
|
Reviewed exact head
Keep |
…s proposed P1: the section referenced scripts/depgraph/ as present and #1410 as kept — that PR is open and this tree has no depgraph directory. Both the acyclicity and component-metrics bullets now name it as proposed (#1410), not landed. P2: enforcement claims scoped to the concrete guards: publicPlatformString gates one serialized-output DTO class, runnerProvider is one adopted seam, R7 covers SessionState only, and boundaries-are-earned plus stable-interface testing are labeled norms (gated only at the test-only-DI-seam slice). The intro now says explicitly that bullets distinguish gate, ledger, and norm.
|
All three addressed at 802f9a1:
🤖 Addressed by Claude Code |
|
Re-reviewed exact head |
|
Summary
Adds a "Principles and their gates" subsection to CONTEXT.md's Architecture section: the Clean-Architecture-shaped rules this repo runs on, each mapped to its enforcing gate and, where the rule is still bent, its open ledger (rule → gate → ledger).
Covers: the Dependency Rule (layering R1–R3/spine, #1405 as executable DIP, R6
TYPE_INVERSION_BASELINEas the shrinking ledger), acyclicity (R4 + the depgraph report of deliberately tolerated cycles), policy×detail boundaries on demonstrated axes (two registries,publicPlatformStringleak guard,runnerProvidertransport seam), information hiding (R7 per-field SessionState ownership), the boundaries-are-earned norm with its local evidence (#1409 viewer rejected, platform-descriptor layer deleted), test/interface coupling, and the rule that component metrics (instability/abstractness per zone) land as observatory data in #1423, never as CI thresholds.Why
The guards exist and bite; the why behind them lived in ADRs, PR threads, and chat. One page in the domain-context file gives contributors and agents the argument to use when judging a design change and the gate to satisfy when landing it. Relates to #1412.
Validation
Docs-only;
pnpm formatapplied, no behavior change.Scope
1 file touched, docs-only (CONTEXT.md). No command-family scope expansion; no code, schema, or gate behavior changes.