Skip to content

Commit a58fb5a

Browse files
docs: show full rank groups in layering spine diagrams; clarify back-edge order vs literal imports (#1222)
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
1 parent 99d0568 commit a58fb5a

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎CONTEXT.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,11 @@ The perfect-shape refactor is complete and merged. Its end-state:
9696
- Folder DAG + layering lint. `scripts/layering/check.ts` enforces two different scopes in CI.
9797
GLOBALLY, across every production source file, it enforces the R1-R3 move rules
9898
(kernel-sink, commands-floor, platforms-seam) and rejects all production static value-import
99-
cycles. Separately, it ranks an explicit target spine —
100-
`kernel ◄ platforms ◄ core ◄ commands ◄ { client, daemon-server } ◄ daemon-client ◄ cli` — and
101-
rejects every back-edge within it. Root entrypoints and peripheral zones (`mcp`, `compat`,
99+
cycles. Separately, it ranks an explicit target spine — as rank groups, lowest (kernel sink) to
100+
highest, where `A ◄ B` means B may not be outranked by A (the back-edge order the gate rejects), NOT
101+
that every displayed import exists:
102+
`kernel ◄ { contracts, request, selectors, platforms } ◄ core ◄ { commands, cli-schema } ◄ { client, daemon-server } ◄ daemon-client ◄ cli` —
103+
and rejects every back-edge within it. Root entrypoints and peripheral zones (`mcp`, `compat`,
102104
`remote`, `metro`, `replay`, `recording`, `snapshot`, `screenshot-diff`, `cloud-webdriver`,
103105
`sdk`, `utils`) are deliberately unranked (`UNRANKED_ZONES` in `scripts/layering/model.ts`):
104106
they still obey R1-R4, but the gate asserts no total back-edge order over them. It is not a

‎scripts/layering/check.ts‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
// Import-direction lint — enforces the folder DAG established by the Phase-5
22
// folder moves (see CONTEXT.md, "Architecture: folder DAG + layering lint").
33
//
4-
// Ranked target spine (imports point DOWN, toward the kernel sink; `A ◄ B` = B imports A):
5-
// kernel ◄ platforms ◄ core ◄ commands ◄ { client, daemon-server } ◄ daemon-client ◄ cli
4+
// Ranked target spine, as rank groups lowest (kernel sink) to highest. `A ◄ B` means B may not
5+
// be outranked by A (the back-edge order the gate rejects), NOT that every displayed import exists:
6+
// kernel ◄ { contracts, request, selectors, platforms } ◄ core ◄ { commands, cli-schema }
7+
// ◄ { client, daemon-server } ◄ daemon-client ◄ cli
8+
// (authoritative ranks: `TARGET_DAG_RANK` in model.ts)
69
//
710
// This gate enforces three things, with two different scopes:
811
// - GLOBALLY, across every production source file: the R1-R3 move rules and

0 commit comments

Comments
 (0)