Skip to content

docs: architecture principles mapped to enforcing gates and open ledgers - #1428

Merged
thymikee merged 2 commits into
mainfrom
docs/architecture-principles
Jul 27, 2026
Merged

docs: architecture principles mapped to enforcing gates and open ledgers#1428
thymikee merged 2 commits into
mainfrom
docs/architecture-principles

Conversation

@thymikee

@thymikee thymikee commented Jul 27, 2026

Copy link
Copy Markdown
Member

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_BASELINE as the shrinking ledger), acyclicity (R4 + the depgraph report of deliberately tolerated cycles), policy×detail boundaries on demonstrated axes (two registries, publicPlatformString leak guard, runnerProvider transport 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 format applied, no behavior change.

Scope

1 file touched, docs-only (CONTEXT.md). No command-family scope expansion; no code, schema, or gate behavior changes.

…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.
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
JS raw 1.85 MB 1.85 MB 0 B
JS gzip 592.7 kB 592.7 kB 0 B
npm tarball 706.9 kB 706.9 kB 0 B
npm unpacked 2.47 MB 2.47 MB 0 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.0 ms 27.6 ms +0.6 ms
CLI --help 56.8 ms 56.8 ms +0.0 ms

Top changed chunks: no changes in the largest emitted chunks.

@thymikee

Copy link
Copy Markdown
Member Author

Reviewed exact head 41dd255f. The layering R1–R7 descriptions are mostly accurate, but the architecture page is not ready:

Keep ready-for-human withheld.

…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.
@thymikee

Copy link
Copy Markdown
Member Author

All three addressed at 802f9a1:

🤖 Addressed by Claude Code

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Jul 27, 2026
@thymikee

Copy link
Copy Markdown
Member Author

Re-reviewed exact head 802f9a142. Clean: CONTEXT.md now accurately distinguishes enforced rules, ratcheted ledgers, local norms, and proposed analysis; R1–R7 and the narrow serialized-output/DI-seam claims match their actual guards, while #1410 and #1423 are correctly described as proposals. All completed checks are green; pending iOS smoke is not a code-review blocker. Minor non-blocking editorial follow-up: the PR body still says every principle maps to a gate/ledger even though the corrected document also includes norms.

@thymikee
thymikee merged commit 7b1fc3b into main Jul 27, 2026
24 checks passed
@thymikee
thymikee deleted the docs/architecture-principles branch July 27, 2026 12:29
@github-actions

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-07-27 12:29 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant