@afokapu/atdd-bun 0.10.39 → 0.10.41

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 (52) hide show
  1. package/conventions/_profiles/coder.yaml +72 -0
  2. package/conventions/_profiles/metrics.yaml +70 -0
  3. package/conventions/coder.bun/coder.bun.boundaries-http-client.convention.yaml +17 -1
  4. package/conventions/coder.bun/coder.bun.commons-application-no-integration.convention.yaml +17 -1
  5. package/conventions/coder.bun/coder.bun.commons-cross-feature-imports-in.convention.yaml +16 -1
  6. package/conventions/coder.bun/coder.bun.commons-domain-no-framework-import.convention.yaml +17 -1
  7. package/conventions/coder.bun/coder.bun.commons-domain-no-outbound.convention.yaml +17 -1
  8. package/conventions/coder.bun/coder.bun.complexity-cyclomatic.convention.yaml +25 -4
  9. package/conventions/coder.bun/coder.bun.complexity-length.convention.yaml +26 -1
  10. package/conventions/coder.bun/coder.bun.complexity-nesting.convention.yaml +24 -4
  11. package/conventions/coder.bun/coder.bun.composition-consumer.convention.yaml +16 -1
  12. package/conventions/coder.bun/coder.bun.composition-root.convention.yaml +17 -1
  13. package/conventions/coder.bun/coder.bun.dead-code-reachability.convention.yaml +25 -1
  14. package/conventions/coder.bun/coder.bun.design-connected.convention.yaml +17 -1
  15. package/conventions/coder.bun/coder.bun.design-dependency-flow.convention.yaml +17 -2
  16. package/conventions/coder.bun/coder.bun.design-hierarchy-import.convention.yaml +17 -1
  17. package/conventions/coder.bun/coder.bun.design-orphan-export.convention.yaml +17 -2
  18. package/conventions/coder.bun/coder.bun.design-primitives.convention.yaml +17 -2
  19. package/conventions/coder.bun/coder.bun.design-token-color.convention.yaml +17 -1
  20. package/conventions/coder.bun/coder.bun.design-token-hardcoded.convention.yaml +17 -2
  21. package/conventions/coder.bun/coder.bun.design-tokens-pure.convention.yaml +18 -2
  22. package/conventions/coder.bun/coder.bun.design-wagons-import.convention.yaml +18 -2
  23. package/conventions/coder.bun/coder.bun.dto-mapper.convention.yaml +16 -1
  24. package/conventions/coder.bun/coder.bun.dto-placement.convention.yaml +16 -1
  25. package/conventions/coder.bun/coder.bun.dto-purity.convention.yaml +17 -1
  26. package/conventions/coder.bun/coder.bun.duplication-intra-layer.convention.yaml +25 -1
  27. package/conventions/coder.bun/coder.bun.green-header-order.convention.yaml +15 -7
  28. package/conventions/coder.bun/coder.bun.green-header-purpose.convention.yaml +16 -5
  29. package/conventions/coder.bun/coder.bun.green-header-runtime.convention.yaml +15 -6
  30. package/conventions/coder.bun/coder.bun.green-header-tested-by.convention.yaml +16 -11
  31. package/conventions/coder.bun/coder.bun.green-urn-layer.convention.yaml +16 -4
  32. package/conventions/coder.bun/coder.bun.green-urn-marker.convention.yaml +16 -9
  33. package/conventions/coder.bun/coder.bun.green-urn-name-matches.convention.yaml +16 -5
  34. package/conventions/coder.bun/coder.bun.green-urn-pattern.convention.yaml +16 -4
  35. package/conventions/coder.bun/coder.bun.green-urn-side.convention.yaml +15 -6
  36. package/conventions/coder.bun/coder.bun.green-urn-wagon-feature.convention.yaml +15 -6
  37. package/conventions/coder.bun/coder.bun.layer-naming.convention.yaml +16 -1
  38. package/conventions/coder.bun/coder.bun.phase-discipline.convention.yaml +111 -0
  39. package/conventions/coder.bun/coder.bun.quality-comments.convention.yaml +25 -1
  40. package/conventions/coder.bun/coder.bun.quality-mi.convention.yaml +25 -1
  41. package/conventions/coder.bun/coder.bun.responsive-breakpoints-declared.convention.yaml +17 -2
  42. package/conventions/coder.bun/coder.bun.responsive-no-fixed-width.convention.yaml +17 -1
  43. package/conventions/coder.bun/coder.bun.responsive-viewport-meta.convention.yaml +16 -1
  44. package/conventions/coder.bun/coder.bun.runtime-server-is-bun-serve.convention.yaml +16 -13
  45. package/conventions/coder.bun/coder.bun.runtime-single-lockfile.convention.yaml +16 -6
  46. package/conventions/coder.bun/coder.bun.runtime-typecheck-enforced.convention.yaml +16 -9
  47. package/integrity.json +51 -50
  48. package/package.json +1 -1
  49. package/relationships.yaml +71 -0
  50. package/src/enforce.ts +2 -2
  51. package/src/profile-registry.ts +4 -2
  52. package/templates/agents/AGENTS.block.md +2 -0
@@ -68,6 +68,7 @@ nodes:
68
68
  - coder.bun.layer-naming
69
69
  - coder.bun.logging-console
70
70
  - coder.bun.logging-structured
71
+ - coder.bun.phase-discipline
71
72
  - coder.bun.quality-comments
72
73
  - coder.bun.quality-mi
73
74
  - coder.bun.responsive-breakpoints-declared
@@ -5177,6 +5178,76 @@ edges:
5177
5178
  target_ref: tester.bun.telemetry-emit
5178
5179
  type: requires
5179
5180
  origin: "@afokapu/atdd-bun"
5181
+ - confidence: 1
5182
+ constraint: mandatory
5183
+ control: internal
5184
+ foundation: start_to_start
5185
+ reason: phase discipline directs the response to each refactor sensor without weakening its enforcement
5186
+ source_ref: coder.bun.phase-discipline
5187
+ strength: important
5188
+ target_ref: coder.bun.complexity-cyclomatic
5189
+ type: runs_alongside
5190
+ origin: "@afokapu/atdd-bun"
5191
+ - confidence: 1
5192
+ constraint: mandatory
5193
+ control: internal
5194
+ foundation: start_to_start
5195
+ reason: phase discipline directs the response to each refactor sensor without weakening its enforcement
5196
+ source_ref: coder.bun.phase-discipline
5197
+ strength: important
5198
+ target_ref: coder.bun.complexity-length
5199
+ type: runs_alongside
5200
+ origin: "@afokapu/atdd-bun"
5201
+ - confidence: 1
5202
+ constraint: mandatory
5203
+ control: internal
5204
+ foundation: start_to_start
5205
+ reason: phase discipline directs the response to each refactor sensor without weakening its enforcement
5206
+ source_ref: coder.bun.phase-discipline
5207
+ strength: important
5208
+ target_ref: coder.bun.complexity-nesting
5209
+ type: runs_alongside
5210
+ origin: "@afokapu/atdd-bun"
5211
+ - confidence: 1
5212
+ constraint: mandatory
5213
+ control: internal
5214
+ foundation: start_to_start
5215
+ reason: phase discipline directs the response to each refactor sensor without weakening its enforcement
5216
+ source_ref: coder.bun.phase-discipline
5217
+ strength: important
5218
+ target_ref: coder.bun.dead-code-reachability
5219
+ type: runs_alongside
5220
+ origin: "@afokapu/atdd-bun"
5221
+ - confidence: 1
5222
+ constraint: mandatory
5223
+ control: internal
5224
+ foundation: start_to_start
5225
+ reason: phase discipline directs the response to each refactor sensor without weakening its enforcement
5226
+ source_ref: coder.bun.phase-discipline
5227
+ strength: important
5228
+ target_ref: coder.bun.duplication-intra-layer
5229
+ type: runs_alongside
5230
+ origin: "@afokapu/atdd-bun"
5231
+ - confidence: 1
5232
+ constraint: mandatory
5233
+ control: internal
5234
+ foundation: start_to_start
5235
+ reason: phase discipline directs the response to each refactor sensor without weakening its enforcement
5236
+ source_ref: coder.bun.phase-discipline
5237
+ strength: important
5238
+ target_ref: coder.bun.quality-comments
5239
+ type: runs_alongside
5240
+ origin: "@afokapu/atdd-bun"
5241
+ - confidence: 1
5242
+ constraint: mandatory
5243
+ control: internal
5244
+ foundation: start_to_start
5245
+ reason: phase discipline directs the response to each refactor sensor without weakening its enforcement
5246
+ source_ref: coder.bun.phase-discipline
5247
+ strength: important
5248
+ target_ref: coder.bun.quality-mi
5249
+ type: runs_alongside
5250
+ origin: "@afokapu/atdd-bun"
5180
5251
  - confidence: 1
5181
5252
  constraint: mandatory
5182
5253
  control: internal
package/src/enforce.ts CHANGED
@@ -42,9 +42,9 @@ export const profileImplementations: Record<ConcreteProfile, string[]> = {
42
42
  workflow: [],
43
43
  };
44
44
 
45
- /** Conventions which an installed companion package contributes to an otherwise policy-only profile. */
45
+ /** Additional policy conventions a profile loads, whether local or contributed by an installed companion package. */
46
46
  export const profileConventions: Record<ConcreteProfile, Array<{ rule_id: string; path: string }>> = {
47
- traceability: [], topology: [], docs: [], planner: [], telemetry: [], coder: [], tester: [], security: [],
47
+ traceability: [], topology: [], docs: [], planner: [], telemetry: [], coder: [{ rule_id: ["coder.bun", "phase-discipline"].join("."), path: "conventions/coder.bun/coder.bun.phase-discipline.convention.yaml" }], tester: [], security: [],
48
48
  architecture: [], metrics: [], runtime: [], interlocking: [], htmx: [], design: [],
49
49
  workflow: [{ rule_id: "atdd-workflow.workflow.lifecycle", path: "../atdd-workflow/conventions/atdd-workflow.workflow/atdd-workflow.workflow.lifecycle.convention.yaml" }],
50
50
  };
@@ -54,9 +54,11 @@ export async function renderProfileRegistries(root = resolve(import.meta.dir, ".
54
54
  const missing = ruleIds.filter(id => !conventions.has(id));
55
55
  if (missing.length) throw new Error(`${profile} declares rule IDs without exactly one convention: ${missing.join(", ")}`);
56
56
  const supplementary = profileConventions[profile];
57
- const duplicate = supplementary.find(convention => conventions.has(convention.rule_id) || ruleIds.includes(convention.rule_id));
57
+ const duplicate = supplementary.find(convention => ruleIds.includes(convention.rule_id));
58
58
  if (duplicate) throw new Error(`${profile} duplicates convention ${duplicate.rule_id}`);
59
- const selectedConventions = [...ruleIds.map(id => conventions.get(id)!), ...supplementary];
59
+ const mismatchedLocal = supplementary.find(convention => conventions.has(convention.rule_id) && conventions.get(convention.rule_id)!.path !== convention.path);
60
+ if (mismatchedLocal) throw new Error(`${profile} declares local convention ${mismatchedLocal.rule_id} at ${mismatchedLocal.path}, but it lives at ${conventions.get(mismatchedLocal.rule_id)!.path}`);
61
+ const selectedConventions = sorted([...ruleIds.map(id => conventions.get(id)!), ...supplementary], (left, right) => left.rule_id.localeCompare(right.rule_id));
60
62
  const rules = new Set(selectedConventions.map(convention => convention.rule_id));
61
63
  const relationships = sorted(graph.edges.filter(edge => rules.has(edge.source_ref) || rules.has(edge.target_ref)), (left, right) => relationshipKey(left).localeCompare(relationshipKey(right)));
62
64
  rendered.set(`${PROFILE_REGISTRY_DIR}/${profile}.yaml`, render(profile, implementations, selectedConventions, relationships));
@@ -9,5 +9,7 @@ For governed work, first use ATDD Workflow to validate the available Desk and re
9
9
 
10
10
  The operator—or an assigned coordinator with delegated authority—selects and authorizes the applicable ATDD Bun profile. Until then, do not inspect, research, plan, or change the repository. Do not change profile configuration without that authorization.
11
11
 
12
+ When the authorized work includes the `coder` profile, read `node_modules/@afokapu/atdd-bun/conventions/coder.bun/coder.bun.phase-discipline.convention.yaml` before reacting to coder findings (`conventions/coder.bun/coder.bun.phase-discipline.convention.yaml` when developing this package itself). The policy separates behavioral GREEN from REFACTOR; it does not suppress strict findings or change profile activation.
13
+
12
14
  A governed agent needs an assigned seat and role unless the operator explicitly requests general discussion. A coordinator assigns, coordinates, reviews, and checkpoints; a driver performs only assigned ready work, proves it, and submits review. Do not mutate coordination or repository state outside explicitly authorized scope. Never modify either toolkit or generated files.
13
15
  <!-- atdd-bun:end -->