@afokapu/atdd-bun 0.10.32 → 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.
- package/README.md +14 -10
- package/conventions/_profiles/architecture.yaml +190 -0
- package/conventions/_profiles/coder.yaml +804 -0
- package/conventions/_profiles/design.yaml +219 -0
- package/conventions/_profiles/docs.yaml +136 -0
- package/conventions/_profiles/htmx.yaml +436 -0
- package/conventions/_profiles/interlocking.yaml +248 -0
- package/conventions/_profiles/metrics.yaml +80 -0
- package/conventions/_profiles/planner.yaml +789 -0
- package/conventions/_profiles/runtime.yaml +62 -0
- package/conventions/_profiles/security.yaml +70 -0
- package/conventions/_profiles/telemetry.yaml +196 -0
- package/conventions/_profiles/tester.yaml +734 -0
- package/conventions/_profiles/topology.yaml +192 -0
- package/conventions/_profiles/traceability.yaml +94 -0
- package/conventions/atdd-bun.profiles/atdd-bun.profiles.presets.convention.yaml +19 -0
- package/integrity.json +26 -12
- package/package.json +1 -1
- package/src/agent.ts +15 -15
- package/src/cli.ts +7 -0
- package/src/enforce.ts +7 -7
- package/src/hooks.ts +3 -3
- package/src/index.ts +1 -0
- package/src/integrity.ts +0 -2
- package/src/profile-registry.ts +74 -0
- package/src/setup.ts +2 -2
- package/templates/agents/AGENTS.block.md +4 -6
- package/templates/agents/atdd/SKILL.md +0 -20
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
|
-
|
|
23
|
-
|
|
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
|
|
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 |
|
|
@@ -104,10 +105,12 @@ frontend:
|
|
|
104
105
|
breakpoints: [480, 768, 1024, 1280]
|
|
105
106
|
registry_paths: ["plan/_*.yaml", "contracts/_*.yaml"] # exempt from micro-commit size caps only
|
|
106
107
|
max_registry_removed_lines: 350 # larger removals need [mass-delete-approved]
|
|
107
|
-
worktrees: { enabled: false }
|
|
108
|
+
worktrees: { enabled: false } # enabled defaults to ~/Github/worktrees/<repo>/...
|
|
108
109
|
release: { enabled: false }
|
|
109
110
|
```
|
|
110
111
|
|
|
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.
|
|
113
|
+
|
|
111
114
|
## Docs-site theme
|
|
112
115
|
|
|
113
116
|
A repository that publishes its AsciiDoc docs as a site does not need its own theme.
|
|
@@ -125,16 +128,17 @@ To re-theme it, override its custom properties (`--paper`, `--ink`, `--accent`,
|
|
|
125
128
|
|
|
126
129
|
## Agents and integrity
|
|
127
130
|
|
|
128
|
-
The
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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.
|
|
132
136
|
|
|
133
137
|
`atdd-bun integrity`, run by the generated test and first in CI on a clean install, fails when:
|
|
134
138
|
|
|
135
139
|
- the installed package differs from its published hashes;
|
|
136
140
|
- the dependency is not an npm registry version;
|
|
137
|
-
- a generated file (workflow,
|
|
141
|
+
- a generated file (workflow, instruction block, integrity test) was edited;
|
|
138
142
|
- `atdd-bun.yaml` is looser than on the base branch (after the first explicit `profiles:` list,
|
|
139
143
|
dropping a profile or the list counts).
|
|
140
144
|
|
|
@@ -144,7 +148,7 @@ Each finding names its restore command.
|
|
|
144
148
|
|
|
145
149
|
Every merge to this package's `main` is published to npm with provenance as the next patch and
|
|
146
150
|
tagged `vX.Y.Z`. Rules and hooks change as soon as a repository upgrades the dependency. To refresh
|
|
147
|
-
the
|
|
151
|
+
the managed instruction blocks on every install, add this to the repository's own
|
|
148
152
|
`package.json`:
|
|
149
153
|
|
|
150
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"
|