@afokapu/atdd-bun 0.10.31 → 0.10.33

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +14 -120
  2. package/conventions/_profiles/architecture.yaml +190 -0
  3. package/conventions/_profiles/coder.yaml +804 -0
  4. package/conventions/_profiles/design.yaml +219 -0
  5. package/conventions/_profiles/docs.yaml +136 -0
  6. package/conventions/_profiles/htmx.yaml +436 -0
  7. package/conventions/_profiles/interlocking.yaml +248 -0
  8. package/conventions/_profiles/metrics.yaml +80 -0
  9. package/conventions/_profiles/planner.yaml +789 -0
  10. package/conventions/_profiles/runtime.yaml +62 -0
  11. package/conventions/_profiles/security.yaml +70 -0
  12. package/conventions/_profiles/telemetry.yaml +196 -0
  13. package/conventions/_profiles/tester.yaml +734 -0
  14. package/conventions/_profiles/topology.yaml +192 -0
  15. package/conventions/_profiles/traceability.yaml +94 -0
  16. package/conventions/atdd-bun.profiles/atdd-bun.profiles.presets.convention.yaml +21 -3
  17. package/conventions/planner.docs/planner.docs.area-index-required.convention.yaml +2 -2
  18. package/conventions/planner.docs/planner.docs.artifact-path-shape.convention.yaml +1 -1
  19. package/conventions/planner.docs/planner.docs.asciidoc-only.convention.yaml +0 -1
  20. package/conventions/planner.docs/planner.docs.identity-required.convention.yaml +1 -1
  21. package/conventions/planner.docs/planner.docs.undeclared-change.convention.yaml +1 -2
  22. package/detectors/bun_interlocking_coverage/checks/interlocking_train_sequence.mjs +7 -5
  23. package/detectors/planner_docs_capability/README.md +1 -1
  24. package/integrity.json +36 -50
  25. package/package.json +1 -1
  26. package/relationships.yaml +0 -151
  27. package/src/agent.ts +15 -31
  28. package/src/cli.ts +7 -8
  29. package/src/docs-capability.ts +6 -24
  30. package/src/enforce.ts +8 -9
  31. package/src/hooks.ts +4 -8
  32. package/src/index.ts +1 -2
  33. package/src/integrity.ts +3 -11
  34. package/src/profile-registry.ts +74 -0
  35. package/src/setup.ts +3 -5
  36. package/templates/agents/AGENTS.block.md +4 -8
  37. package/templates/github/atdd-bun.yml +0 -5
  38. package/conventions/delivery/delivery.approved-sha-resolves.convention.yaml +0 -33
  39. package/conventions/delivery/delivery.board.convention.yaml +0 -60
  40. package/conventions/delivery/delivery.config-schema.convention.yaml +0 -49
  41. package/conventions/delivery/delivery.evidence-schema.convention.yaml +0 -34
  42. package/conventions/delivery/delivery.findings-resolved.convention.yaml +0 -42
  43. package/conventions/delivery/delivery.merge-gate.convention.yaml +0 -46
  44. package/conventions/delivery/delivery.model-allowed.convention.yaml +0 -29
  45. package/conventions/delivery/delivery.operating-model.convention.yaml +0 -97
  46. package/conventions/delivery/delivery.review.convention.yaml +0 -42
  47. package/conventions/delivery/delivery.reviewer-independent.convention.yaml +0 -34
  48. package/conventions/delivery/delivery.stages-complete.convention.yaml +0 -33
  49. package/detectors/delivery_evidence/atdd.implementation.yaml +0 -33
  50. package/detectors/delivery_evidence/detect.mjs +0 -9
  51. package/detectors/delivery_evidence/fixtures/clean/atdd-bun.yaml +0 -8
  52. package/detectors/delivery_evidence/fixtures/clean/docs/delivery/tranches/api/evidence.yaml +0 -54
  53. package/detectors/delivery_evidence/fixtures/dirty/atdd-bun.yaml +0 -3
  54. package/detectors/delivery_evidence/fixtures/dirty/docs/delivery/tranches/api/evidence.yaml +0 -31
  55. package/detectors/delivery_evidence/fixtures/dirty/docs/delivery/tranches/data/evidence.yaml +0 -8
  56. package/detectors/delivery_evidence/fixtures/dirty/docs/delivery/tranches/orphan/README.md +0 -1
  57. package/detectors/delivery_evidence/fixtures/dirty/docs/delivery/tranches/ui/evidence.yaml +0 -5
  58. package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/delivery/release.adoc +0 -10
  59. package/detectors/planner_docs_capability/fixtures/dirty_missing_index/docs/purpose/index.adoc +0 -5
  60. package/planner-schemas/delivery-config.schema.json +0 -95
  61. package/planner-schemas/delivery-evidence.schema.json +0 -103
  62. package/src/board-ui.ts +0 -91
  63. package/src/board.ts +0 -222
  64. package/src/delivery.ts +0 -567
  65. package/templates/agents/atdd/SKILL.md +0 -20
  66. package/templates/agents/delivery/SKILL.md +0 -15
package/README.md CHANGED
@@ -19,8 +19,8 @@ bun run atdd-bun init
19
19
  ```
20
20
 
21
21
  `init` installs the Git hooks (`.githooks/`), the CI workflow (`.github/workflows/atdd-bun.yml`),
22
- the agent skill (`.agents/skills/atdd/`, `.claude/skills/atdd/`), a managed block in `AGENTS.md`
23
- and `CLAUDE.md`, and `atdd-bun.integrity.test.ts`. Commit all of them. Nothing is overwritten
22
+ a managed block in `AGENTS.md` and `CLAUDE.md`, and `atdd-bun.integrity.test.ts`. Commit all of
23
+ them. Nothing is overwritten
24
24
  without `--replace`, and adding the dependency changes nothing until you run `init`.
25
25
 
26
26
  Then require the workflow's job in the GitHub branch ruleset, so it gates merges.
@@ -33,7 +33,8 @@ Then require the workflow's job in the GitHub branch ruleset, so it gates merges
33
33
  | `atdd-bun init [--replace]` | Install hooks, CI, agent files and the integrity test |
34
34
  | `atdd-bun hooks <install\|uninstall\|status>` | Manage only the Git hooks |
35
35
  | `atdd-bun ci <init\|status>` | Manage only the CI workflow |
36
- | `atdd-bun agent <init\|status>` | Manage only the skills and the `AGENTS.md`/`CLAUDE.md` block |
36
+ | `atdd-bun agent <init\|status>` | Manage the `AGENTS.md`/`CLAUDE.md` instruction block |
37
+ | `atdd-bun profiles registry [--check]` | Generate (or verify) deterministic profile-scoped convention registries |
37
38
  | `atdd-bun integrity [init\|status]` | Check that the toolkit and its generated files are unmodified |
38
39
  | `atdd-bun docs journeys [--check]` | Generate (or verify) the journey, interlocking and train views |
39
40
  | `atdd-bun worktree <start\|finish\|status>` | Optional linked-worktree policy for agent work |
@@ -55,7 +56,6 @@ registerEnforcementTest({ root: import.meta.dir + "/..", profiles: ["traceabilit
55
56
  | `topology` | feature decomposition and the plan, source, test and E2E locations. Missing source, tests and E2E suites are reported only when a run also selects `coder` or `tester`, so a repository in the PLAN stage can enforce `planner` and `topology` before RED |
56
57
  | `planner` | schemas for every plan artifact, graph integrity, the scoped planner rules |
57
58
  | `telemetry` | the telemetry tracking plan: item shape, path-mirrored identity and versioning under `telemetry/`, wagon ownership of logical artifacts, the per-acceptance telemetry decision, metric label cardinality, source `Telemetry:` references, raw-string and forbidden-property emission, the vendor-SDK boundary around the TelemetryPort, and telemetry tests that bind the acceptance and item, assert the exact identity on a captured sink, cover every required item, and exercise declared timing semantics |
58
- | `delivery` | the review record of each tranche under `docs/delivery/tranches/`: allowed writer and reviewer models with recorded fallbacks, reviewer independence, every finding fixed, withdrawn after one dispute or ruled on by a human, every configured stage approved, and, at the gate, no change without a record and a merged head that contains exactly the approved commit. Inert until adopted |
59
59
  | `docs` | the documentation capability, including the generated journey view |
60
60
  | `coder`, `tester`, `security`, `architecture`, `metrics`, `runtime` | Bun source and test conventions |
61
61
  | `interlocking` | train/interlocking binding, infrastructure and route coverage |
@@ -85,7 +85,7 @@ the adoption that establishes the governed set, so a brownfield repository can d
85
85
  `profiles: [docs]` in an ordinary pull request. From then on, the integrity check reports, against
86
86
  the base branch, removing a profile from the list and removing the list itself. The second closes
87
87
  the two-step bypass `[docs, security]` → no list → `[docs]`. `init` writes a new `atdd-bun.yaml`
88
- with every profile listed except the opt-in `delivery`, so a greenfield repository is governed from its first commit; trim the
88
+ with every profile listed, so a greenfield repository is governed from its first commit; trim the
89
89
  list before that commit to adopt gradually.
90
90
 
91
91
  ## Configuration
@@ -105,117 +105,11 @@ frontend:
105
105
  breakpoints: [480, 768, 1024, 1280]
106
106
  registry_paths: ["plan/_*.yaml", "contracts/_*.yaml"] # exempt from micro-commit size caps only
107
107
  max_registry_removed_lines: 350 # larger removals need [mass-delete-approved]
108
- worktrees: { enabled: false }
108
+ worktrees: { enabled: false } # enabled defaults to ~/Github/worktrees/<repo>/...
109
109
  release: { enabled: false }
110
110
  ```
111
111
 
112
- ### Delivery
113
-
114
- For programs delivered as tranches by a coordinator and persistent drivers, with headless writers
115
- and independent reviewers. Adopt it by naming `delivery` in `profiles:` (or, with no list, by adding
116
- a `delivery:` block); `agent init` then installs the delivery skill. The adopting pull request is
117
- itself governed: the skill and workflow it brings are outside the delivery root, so it carries its
118
- own tranche record, reviewed and `ready` like any other. A later change to `atdd-bun.yaml` alone
119
- needs no record: the integrity check reports any loosening for a human to approve.
120
-
121
- The policy names, for each lifecycle stage (plan, red, green, refactor, final), who may write it and
122
- who reviews it; either may be absent. By default two stages are reviewed: the plan, and the whole
123
- change at its head (final). Red, green and refactor are written and held by their gates. How the
124
- coordinator and drivers carry this out is the `delivery.operating-model` convention; what a reviewer
125
- checks is `delivery.review`; how agents talk, through a local ntfy board with one topic per program,
126
- tranche and review conversation (`atdd-bun chat`), is `delivery.board`, used only when `delivery.board` is
127
- set. The skill only points to them.
128
-
129
- The records live with the program's reasoning, in the docs profile's `docs/delivery/` area:
130
-
131
- ```text
132
- docs/delivery/index.adoc the program: why, scope, how it was split (docs profile)
133
- docs/delivery/tranches/<tranche>/evidence.yaml one tranche's review record (delivery profile)
134
- docs/delivery/tranches/<tranche>/*.json the retained raw reviewer reports
135
- ```
136
-
137
- Where delivery is adopted, the docs profile leaves the records folder's records and data files to
138
- the delivery profile: they are not authored documentation, and changing them needs no docs
139
- declaration. AsciiDoc there stays documentation. Where the docs profile is active, the first tranche
140
- also brings `docs/index.adoc` and `docs/delivery/index.adoc`, each with `:doc-id:` and `:status:`,
141
- since every docs area needs an index.
142
-
143
- Upgrading from 0.8.0: records under `delivery/` are reported until `delivery.root: delivery` is set
144
- (a reported root change, approved once) or they are moved. A data file in an old tranche that no
145
- record there names is reported on local runs, not at the merge gate; removing it is a gate change a
146
- human approves, or a new tranche's record can name it.
147
-
148
- Upgrading from 0.9.0: an `atdd-bun.yaml` field with the wrong type (a quoted number, `yes`/`no`, a
149
- non-string list item, `.inf`) is now reported, and on the base branch it blocks every pull request,
150
- since the policy cannot be compared. Correct such fields on the base branch before upgrading.
151
-
152
- Upgrading to 0.10: the policy names writers and reviewers per stage. The 0.9 stage names
153
- (`plan_review`, `test_review`, `code_review`, `final_review` with `authors` and `reviewers`) are still
154
- read, as `plan`, `red`, `refactor` and `final`, and 0.9 records that name review authors still count as
155
- recorded work. Independence now defaults to `different-model`: a repository that relied on the old
156
- `fresh-process` default sets it explicitly. A repository with no `stages:` gets the new default
157
- operating model, without the integrity check reporting the change.
158
-
159
- From 0.10.2 the pre-commit hook no longer counts uncommitted work: it refused exactly the small
160
- commits that reduce it. `max_uncommitted_files` is no longer read; commit size stays limited by
161
- `max_staged_files` and `max_staged_changed_lines`.
162
-
163
- From 0.10.3 each ready record is judged by the delivery policy in `atdd-bun.yaml` at its `approved_sha`:
164
- a later policy change (dropping or reordering a model, removing a review) never makes a merged record
165
- fail. Records in progress are judged by the current policy.
166
-
167
- From 0.10.4 a stage with nothing written (a plan-only or no-op tranche) records no work; a review
168
- whose range recorded none answers for the latest recorded work before it.
169
-
170
- From 0.10.5 only coordinators and drivers use the board: a writer or reviewer takes its task from its
171
- launch prompt and returns its answer as output, which the driver posts. `atdd-bun chat wait` takes several
172
- topics and `--skip heartbeat`; reviewers answer in JSON.
173
-
174
- From 0.10.7 only a browser spec (a `*.e2e.*` file, or a Playwright file bound by `// Train:`/`// Journey:` or a
175
- `test:train:`/`test:journey:` URN) is a journey spec. A `bun:test` file may carry the `Acceptance:` line
176
- traceability needs, including a test proving `acc:train:…` and the journey test `atdd-bun.topology.e2e-location` requires.
177
-
178
- Every key is optional; these are the defaults:
179
-
180
- ```yaml
181
- delivery:
182
- root: docs/delivery/tranches # one <tranche>/evidence.yaml per tranche, reports beside it
183
- require_record: true # at the gate, a change outside the root (other than atdd-bun.yaml alone) needs a tranche record
184
- multiplexer: herdr # the terminal multiplexer humans watch agents in; any command name
185
- # board: { url: http://127.0.0.1:2586 } # opt-in: agents talk through a local board; absent, there is none
186
- independence: different-model # a reviewer's model wrote none of the work it reviews; or fresh-process
187
- stages: # models in preference order: the first, then recorded fallbacks
188
- plan: { writer: [codex, claude-opus, kimi], reviewer: [glm, claude-opus, codex, kimi] }
189
- red: { writer: [glm, claude-sonnet, deepseek-flash, claude-opus, codex, kimi] }
190
- green: { writer: [glm, claude-sonnet, deepseek-flash, claude-opus, codex, kimi] }
191
- refactor: { writer: [glm, claude-sonnet, deepseek-flash, claude-opus, codex, kimi] }
192
- final: { reviewer: [codex, glm, claude-opus, kimi] }
193
- fallback: { after_failures: 3, within_minutes: 10, when_exhausted: block } # or wait
194
- commands: {} # per model: { author: "...", review: "..." } overriding delivery.operating-model's defaults
195
- ```
196
-
197
- The profile checks the record, never the running agents. The generated CI sets
198
- `ATDD_DELIVERY_GATE`: `merge` on pull requests and the merge queue, where every record the branch
199
- changes must be `ready`, the branch may differ from its approved SHA only under the delivery root,
200
- and a change outside the root needs a record unless it touches only `atdd-bun.yaml` (`require_record`, default true); `post-merge` on a
201
- push to a protected branch (the generated workflow's push branches follow `protected_branches`), where the pushed commit must contain every approved SHA it brings in. Merge tranches with a
202
- merge commit: a squash or rebase merge writes a commit no reviewer saw, and the post-merge check
203
- fails on it. Moving the root, dropping a stage, relaxing a stage from `different-model` to
204
- `fresh-process`, no longer reviewing a stage, adding a writer or reviewer, moving a fallback model earlier in a list, turning off
205
- `require_record`, making fallback easier, or adding or changing a model's `commands` loosens the policy and is reported by the integrity check.
206
-
207
- The record's model and run identifiers are the driver's claims. The profile checks that they are
208
- consistent and that a `ready` record retains every review's raw report (a record in progress may lag
209
- behind); it does not verify them
210
- cryptographically.
211
-
212
- The hooks enforce protected-branch blocking, micro-commit limits, mass-delete approval and
213
- validation of the affected area. Git can bypass them, so CI is the authority. The changed-line
214
- limit counts a moved file by the edits it carries, so relocating a directory is not measured as
215
- rewriting it; mass-delete and registry-removal approval still count a move in full.
216
- The journey view `atdd-bun docs journeys` generates is exempt from the size caps, since its index
217
- alone can exceed them, and never from the `docs` profile, which refuses a copy that is not exactly
218
- what the plan generates.
112
+ When enabled without overrides, a primary checkout at `~/Github/<repo>` uses linked worktrees at `~/Github/worktrees/<repo>/<branch>`. The defaults use `primary_directory: .` (the current primary checkout) and `root: ../worktrees/{repo}`; `{repo}` expands to the primary checkout's directory name. Repositories that need another layout can set either field explicitly.
219
113
 
220
114
  ## Docs-site theme
221
115
 
@@ -234,17 +128,17 @@ To re-theme it, override its custom properties (`--paper`, `--ink`, `--accent`,
234
128
 
235
129
  ## Agents and integrity
236
130
 
237
- The skill gives every coding agent the lifecycle PLAN → RED → GREEN → SMOKE → REFACTOR → TRACE and
238
- the profile that gates each stage. The block in `AGENTS.md` and `CLAUDE.md` adds the rules: never
239
- modify the toolkit itself, only the configuration it offers; turn profiles on or off in
240
- `profiles:` only when the user asks; and, where `delivery` is active, deliver tranches through the
241
- delivery skill.
131
+ The managed block directs an agent to the profile-preset convention, then to the selected profile's
132
+ generated registry under `conventions/_profiles/`. Each registry is a deterministic projection of
133
+ the profile's detector manifests, convention paths, and direct relationship edges, so the agent
134
+ opens only the conventions relevant to its task. It also prevents the agent from modifying the
135
+ toolkit or changing profile activation without the user's choice.
242
136
 
243
137
  `atdd-bun integrity`, run by the generated test and first in CI on a clean install, fails when:
244
138
 
245
139
  - the installed package differs from its published hashes;
246
140
  - the dependency is not an npm registry version;
247
- - a generated file (workflow, skills, instruction block, integrity test) was edited;
141
+ - a generated file (workflow, instruction block, integrity test) was edited;
248
142
  - `atdd-bun.yaml` is looser than on the base branch (after the first explicit `profiles:` list,
249
143
  dropping a profile or the list counts).
250
144
 
@@ -254,7 +148,7 @@ Each finding names its restore command.
254
148
 
255
149
  Every merge to this package's `main` is published to npm with provenance as the next patch and
256
150
  tagged `vX.Y.Z`. Rules and hooks change as soon as a repository upgrades the dependency. To refresh
257
- the skills and instruction blocks on every install, add this to the repository's own
151
+ the managed instruction blocks on every install, add this to the repository's own
258
152
  `package.json`:
259
153
 
260
154
  ```json
@@ -0,0 +1,190 @@
1
+ schema_version: "1.0.0"
2
+ profile: "architecture"
3
+ implementations:
4
+ - "bun_clean_architecture_detector"
5
+ conventions:
6
+ - rule_id: "coder.bun.boundaries-http-client"
7
+ path: "conventions/coder.bun/coder.bun.boundaries-http-client.convention.yaml"
8
+ - rule_id: "coder.bun.commons-application-no-integration"
9
+ path: "conventions/coder.bun/coder.bun.commons-application-no-integration.convention.yaml"
10
+ - rule_id: "coder.bun.commons-cross-feature-imports-in"
11
+ path: "conventions/coder.bun/coder.bun.commons-cross-feature-imports-in.convention.yaml"
12
+ - rule_id: "coder.bun.commons-domain-no-framework-import"
13
+ path: "conventions/coder.bun/coder.bun.commons-domain-no-framework-import.convention.yaml"
14
+ - rule_id: "coder.bun.commons-domain-no-outbound"
15
+ path: "conventions/coder.bun/coder.bun.commons-domain-no-outbound.convention.yaml"
16
+ - rule_id: "coder.bun.composition-consumer"
17
+ path: "conventions/coder.bun/coder.bun.composition-consumer.convention.yaml"
18
+ - rule_id: "coder.bun.composition-root"
19
+ path: "conventions/coder.bun/coder.bun.composition-root.convention.yaml"
20
+ - rule_id: "coder.bun.design-hierarchy-import"
21
+ path: "conventions/coder.bun/coder.bun.design-hierarchy-import.convention.yaml"
22
+ - rule_id: "coder.bun.dto-mapper"
23
+ path: "conventions/coder.bun/coder.bun.dto-mapper.convention.yaml"
24
+ - rule_id: "coder.bun.dto-placement"
25
+ path: "conventions/coder.bun/coder.bun.dto-placement.convention.yaml"
26
+ - rule_id: "coder.bun.dto-purity"
27
+ path: "conventions/coder.bun/coder.bun.dto-purity.convention.yaml"
28
+ - rule_id: "coder.bun.layer-naming"
29
+ path: "conventions/coder.bun/coder.bun.layer-naming.convention.yaml"
30
+ relationships:
31
+ - confidence: 1
32
+ constraint: "discretionary"
33
+ control: "internal"
34
+ foundation: "start_to_start"
35
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
36
+ reason: "Confines outbound transport to integration, which is the hierarchy's own home for it."
37
+ source_ref: "coder.bun.boundaries-http-client"
38
+ strength: "minor"
39
+ target_ref: "coder.bun.design-hierarchy-import"
40
+ type: "runs_alongside"
41
+ - confidence: 1
42
+ constraint: "mandatory"
43
+ control: "internal"
44
+ foundation: "start_to_start"
45
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
46
+ reason: "A specialization: the general inward-only rule, narrowed to the commons application tree."
47
+ source_ref: "coder.bun.commons-application-no-integration"
48
+ strength: "important"
49
+ target_ref: "coder.bun.design-hierarchy-import"
50
+ type: "requires"
51
+ - confidence: 1
52
+ constraint: "mandatory"
53
+ control: "internal"
54
+ foundation: "start_to_start"
55
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
56
+ reason: "The hierarchy governs VERTICAL edges between layers; this governs HORIZONTAL ones between sibling features."
57
+ source_ref: "coder.bun.commons-cross-feature-imports-in"
58
+ strength: "important"
59
+ target_ref: "coder.bun.design-hierarchy-import"
60
+ type: "runs_alongside"
61
+ - confidence: 1
62
+ constraint: "mandatory"
63
+ control: "internal"
64
+ foundation: "finish_to_start"
65
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
66
+ reason: "Outbound bans project LAYERS; this additionally bans runtime machinery, so the domain runs with no server started."
67
+ source_ref: "coder.bun.commons-domain-no-framework-import"
68
+ strength: "important"
69
+ target_ref: "coder.bun.commons-domain-no-outbound"
70
+ type: "requires"
71
+ - confidence: 1
72
+ constraint: "mandatory"
73
+ control: "internal"
74
+ foundation: "start_to_start"
75
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
76
+ reason: "A specialization: the general inward-only rule, narrowed to the commons domain tree."
77
+ source_ref: "coder.bun.commons-domain-no-outbound"
78
+ strength: "important"
79
+ target_ref: "coder.bun.design-hierarchy-import"
80
+ type: "requires"
81
+ - confidence: 1
82
+ constraint: "mandatory"
83
+ control: "internal"
84
+ foundation: "start_to_start"
85
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
86
+ reason: "Two halves of one discipline: where wiring MAY happen, and that consumers must ACCEPT what they are given."
87
+ source_ref: "coder.bun.composition-consumer"
88
+ strength: "critical"
89
+ target_ref: "coder.bun.composition-root"
90
+ type: "runs_alongside"
91
+ - confidence: 1
92
+ constraint: "mandatory"
93
+ control: "internal"
94
+ foundation: "finish_to_start"
95
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
96
+ reason: "Reachability is measured FROM the structural roots that composition-root confines wiring to."
97
+ source_ref: "coder.bun.dead-code-reachability"
98
+ strength: "important"
99
+ target_ref: "coder.bun.composition-root"
100
+ type: "requires"
101
+ - confidence: 1
102
+ constraint: "mandatory"
103
+ control: "internal"
104
+ foundation: "start_to_start"
105
+ origin: "@afokapu/atdd-bun"
106
+ reason: "code layering and design-system layering: both require dependencies to point in one direction"
107
+ source_ref: "coder.bun.design-dependency-flow"
108
+ strength: "important"
109
+ target_ref: "coder.bun.design-hierarchy-import"
110
+ type: "runs_alongside"
111
+ - confidence: 1
112
+ constraint: "discretionary"
113
+ control: "internal"
114
+ foundation: "start_to_start"
115
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
116
+ reason: "The mapper translates the type whose home this rule fixes; both keep the boundary in one place."
117
+ source_ref: "coder.bun.dto-mapper"
118
+ strength: "minor"
119
+ target_ref: "coder.bun.dto-placement"
120
+ type: "runs_alongside"
121
+ - confidence: 1
122
+ constraint: "mandatory"
123
+ control: "internal"
124
+ foundation: "start_to_start"
125
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
126
+ reason: "Purity governs a DTO's shape, placement its home; a pure DTO in the wrong layer still couples the boundary."
127
+ source_ref: "coder.bun.dto-placement"
128
+ strength: "important"
129
+ target_ref: "coder.bun.dto-purity"
130
+ type: "runs_alongside"
131
+ - confidence: 1
132
+ constraint: "mandatory"
133
+ control: "internal"
134
+ foundation: "finish_to_start"
135
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
136
+ reason: "The layer segment this rule validates is what the layering rules read to judge an import."
137
+ source_ref: "coder.bun.green-urn-layer"
138
+ strength: "important"
139
+ target_ref: "coder.bun.design-hierarchy-import"
140
+ type: "enables"
141
+ - confidence: 1
142
+ constraint: "discretionary"
143
+ control: "internal"
144
+ foundation: "start_to_start"
145
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
146
+ reason: "Both govern server.ts as the composition root: one that collaborators are only instantiated there, the other that the JOURNEY_MAP it holds agrees with the declared route space."
147
+ source_ref: "coder.bun.interlocking-bilateral-binding"
148
+ strength: "minor"
149
+ target_ref: "coder.bun.composition-root"
150
+ type: "runs_alongside"
151
+ - confidence: 1
152
+ constraint: "mandatory"
153
+ control: "internal"
154
+ foundation: "finish_to_start"
155
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
156
+ reason: "The layering rules can only read a layer that the naming rule guarantees is declared."
157
+ source_ref: "coder.bun.layer-naming"
158
+ strength: "critical"
159
+ target_ref: "coder.bun.design-hierarchy-import"
160
+ type: "enables"
161
+ - confidence: 1
162
+ constraint: "discretionary"
163
+ control: "internal"
164
+ foundation: "start_to_start"
165
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
166
+ reason: "One governs the server you run, the other the client you call out with."
167
+ source_ref: "coder.bun.runtime-server-is-bun-serve"
168
+ strength: "minor"
169
+ target_ref: "coder.bun.boundaries-http-client"
170
+ type: "runs_alongside"
171
+ - confidence: 1
172
+ constraint: "mandatory"
173
+ control: "internal"
174
+ foundation: "finish_to_start"
175
+ origin: "atdd-extensions@3aa141e:official/atdd.extension.coder.bun/relationships.yaml"
176
+ reason: "server.ts is a composition root precisely BECAUSE Bun.serve is the assembly point of a full-stack Bun app."
177
+ source_ref: "coder.bun.runtime-server-is-bun-serve"
178
+ strength: "important"
179
+ target_ref: "coder.bun.composition-root"
180
+ type: "enables"
181
+ - confidence: 1
182
+ constraint: "mandatory"
183
+ control: "internal"
184
+ foundation: "start_to_start"
185
+ origin: "@afokapu/atdd-bun"
186
+ reason: "vendor SDKs stay in infrastructure adapters as framework imports stay out of domain"
187
+ source_ref: "coder.bun.telemetry-vendor-sdk"
188
+ strength: "important"
189
+ target_ref: "coder.bun.commons-domain-no-framework-import"
190
+ type: "runs_alongside"