@punks/cli 3.3.6 → 4.0.1

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 (142) hide show
  1. package/AGENTS.md +1 -1
  2. package/dist/BASELINE_CHANGELOG.md +11 -2
  3. package/dist/CHANGELOG.md +20 -0
  4. package/dist/baseline/scaffold-baseline/baseline.json +5 -5
  5. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +9 -3
  6. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +32 -0
  7. package/dist/baseline/scaffold-baseline/data/subagents/manifest.mjs +1 -0
  8. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/docs-onboarding/SKILL.md +20 -4
  9. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +14 -9
  10. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/backlog-sync.md +61 -29
  11. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/plan-schema.md +25 -6
  12. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/SKILL.md +10 -4
  13. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/readiness.md +4 -0
  14. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/SKILL.md +20 -1
  15. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/lifecycle.md +20 -3
  16. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/wayfinder/SKILL.md +13 -36
  17. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/make-tsuite/SKILL.md +57 -0
  18. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/make-tsuite/agents/openai.yaml +4 -0
  19. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/make-tsuite/references/audit-portfolio.md +47 -0
  20. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/make-tsuite/references/implement-suite.md +40 -0
  21. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/make-tsuite/references/route-api-design.md +21 -0
  22. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/make-tsuite/references/user-journey-design.md +21 -0
  23. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +42 -26
  24. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +80 -97
  25. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +93 -96
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +43 -52
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +70 -136
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/backlog-initialization.md +88 -0
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/business-projection.md +31 -0
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/delivery-status.md +66 -0
  31. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/fog-intake.md +72 -0
  32. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/functional-projection.md +27 -0
  33. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/issue-reconciliation.md +76 -0
  34. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/normalization.md +105 -0
  35. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/project-context.md +43 -0
  36. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/github.md +168 -0
  37. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/linear.md +190 -0
  38. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/technical-projection.md +65 -0
  39. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +137 -0
  40. package/dist/baseline/scaffold-baseline/skills/phases/business-finder/SKILL.md +30 -0
  41. package/dist/baseline/scaffold-baseline/skills/phases/business-finder/agents/openai.yaml +2 -0
  42. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/backlog.md +10 -3
  43. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/closeout.md +12 -0
  44. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/implement.md +21 -0
  45. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +8 -0
  46. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/artifact-state.md +18 -3
  47. package/dist/baseline/scaffold-baseline/skills/phases/design-phase/phases/backlog.md +9 -1
  48. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/AUTHORING-HANDOFF.md +276 -0
  49. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/SKILL.md +43 -51
  50. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/agents/openai.yaml +1 -1
  51. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/adopt-business-path.md +52 -0
  52. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/business-grilling.md +68 -0
  53. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/ensure-fog.md +43 -0
  54. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/functional-grilling.md +53 -0
  55. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/handback.md +36 -0
  56. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/prototype.md +40 -0
  57. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/reconcile.md +52 -0
  58. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/research.md +38 -0
  59. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/return-target.md +42 -0
  60. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/router.md +64 -0
  61. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/technical-grilling.md +67 -0
  62. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/entrypoint-contract.md +38 -0
  63. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/root-routing.md +14 -27
  64. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/runtime-handoff.md +62 -0
  65. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/state-graph.md +60 -0
  66. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/scripts/finder-contract.mjs +383 -0
  67. package/dist/baseline/scaffold-baseline/skills/phases/functional-finder/SKILL.md +78 -0
  68. package/dist/baseline/scaffold-baseline/skills/phases/functional-finder/agents/openai.yaml +2 -0
  69. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/SKILL.md +74 -0
  70. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/agents/openai.yaml +2 -0
  71. package/dist/baseline/scaffold-baseline.json +5 -5
  72. package/dist/baseline/scaffold-baseline.tgz +0 -0
  73. package/dist/data/subagents/manifest.mjs +1 -0
  74. package/dist/index.js +6 -6
  75. package/dist/skills/agnostic/docs/docs-onboarding/SKILL.md +20 -4
  76. package/dist/skills/agnostic/planning/create-plan/SKILL.md +14 -9
  77. package/dist/skills/agnostic/planning/create-plan/references/backlog-sync.md +61 -29
  78. package/dist/skills/agnostic/planning/create-plan/references/plan-schema.md +25 -6
  79. package/dist/skills/agnostic/planning/create-spec/SKILL.md +10 -4
  80. package/dist/skills/agnostic/planning/create-spec/references/readiness.md +4 -0
  81. package/dist/skills/agnostic/planning/implement-spec/SKILL.md +20 -1
  82. package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +20 -3
  83. package/dist/skills/agnostic/planning/wayfinder/SKILL.md +13 -36
  84. package/dist/skills/agnostic/quality/make-tsuite/SKILL.md +57 -0
  85. package/dist/skills/agnostic/quality/make-tsuite/agents/openai.yaml +4 -0
  86. package/dist/skills/agnostic/quality/make-tsuite/references/audit-portfolio.md +47 -0
  87. package/dist/skills/agnostic/quality/make-tsuite/references/implement-suite.md +40 -0
  88. package/dist/skills/agnostic/quality/make-tsuite/references/route-api-design.md +21 -0
  89. package/dist/skills/agnostic/quality/make-tsuite/references/user-journey-design.md +21 -0
  90. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +42 -26
  91. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +80 -97
  92. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +93 -96
  93. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +43 -52
  94. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +70 -136
  95. package/dist/skills/agnostic/requirements/write-backlog/references/backlog-initialization.md +88 -0
  96. package/dist/skills/agnostic/requirements/write-backlog/references/business-projection.md +31 -0
  97. package/dist/skills/agnostic/requirements/write-backlog/references/delivery-status.md +66 -0
  98. package/dist/skills/agnostic/requirements/write-backlog/references/fog-intake.md +72 -0
  99. package/dist/skills/agnostic/requirements/write-backlog/references/functional-projection.md +27 -0
  100. package/dist/skills/agnostic/requirements/write-backlog/references/issue-reconciliation.md +76 -0
  101. package/dist/skills/agnostic/requirements/write-backlog/references/normalization.md +105 -0
  102. package/dist/skills/agnostic/requirements/write-backlog/references/project-context.md +43 -0
  103. package/dist/skills/agnostic/requirements/write-backlog/references/providers/github.md +168 -0
  104. package/dist/skills/agnostic/requirements/write-backlog/references/providers/linear.md +190 -0
  105. package/dist/skills/agnostic/requirements/write-backlog/references/technical-projection.md +65 -0
  106. package/dist/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +135 -0
  107. package/dist/skills/phases/business-finder/SKILL.md +30 -0
  108. package/dist/skills/phases/business-finder/agents/openai.yaml +2 -0
  109. package/dist/skills/phases/delivery-phase/phases/backlog.md +10 -3
  110. package/dist/skills/phases/delivery-phase/phases/closeout.md +12 -0
  111. package/dist/skills/phases/delivery-phase/phases/implement.md +21 -0
  112. package/dist/skills/phases/delivery-phase/phases/router.md +8 -0
  113. package/dist/skills/phases/delivery-phase/references/artifact-state.md +18 -3
  114. package/dist/skills/phases/design-phase/phases/backlog.md +9 -1
  115. package/dist/skills/phases/finder-phase/AUTHORING-HANDOFF.md +276 -0
  116. package/dist/skills/phases/finder-phase/SKILL.md +43 -51
  117. package/dist/skills/phases/finder-phase/agents/openai.yaml +1 -1
  118. package/dist/skills/phases/finder-phase/phases/adopt-business-path.md +52 -0
  119. package/dist/skills/phases/finder-phase/phases/business-grilling.md +68 -0
  120. package/dist/skills/phases/finder-phase/phases/ensure-fog.md +43 -0
  121. package/dist/skills/phases/finder-phase/phases/functional-grilling.md +53 -0
  122. package/dist/skills/phases/finder-phase/phases/handback.md +36 -0
  123. package/dist/skills/phases/finder-phase/phases/prototype.md +40 -0
  124. package/dist/skills/phases/finder-phase/phases/reconcile.md +52 -0
  125. package/dist/skills/phases/finder-phase/phases/research.md +38 -0
  126. package/dist/skills/phases/finder-phase/phases/return-target.md +42 -0
  127. package/dist/skills/phases/finder-phase/phases/router.md +64 -0
  128. package/dist/skills/phases/finder-phase/phases/technical-grilling.md +67 -0
  129. package/dist/skills/phases/finder-phase/references/entrypoint-contract.md +38 -0
  130. package/dist/skills/phases/finder-phase/references/root-routing.md +14 -27
  131. package/dist/skills/phases/finder-phase/references/runtime-handoff.md +62 -0
  132. package/dist/skills/phases/finder-phase/references/state-graph.md +60 -0
  133. package/dist/skills/phases/finder-phase/scripts/finder-contract.mjs +383 -0
  134. package/dist/skills/phases/functional-finder/SKILL.md +78 -0
  135. package/dist/skills/phases/functional-finder/agents/openai.yaml +2 -0
  136. package/dist/skills/phases/technical-finder/SKILL.md +74 -0
  137. package/dist/skills/phases/technical-finder/agents/openai.yaml +2 -0
  138. package/package.json +4 -2
  139. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/convergence.md +0 -39
  140. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/frontier-lifecycle.md +0 -76
  141. package/dist/skills/phases/finder-phase/references/convergence.md +0 -39
  142. package/dist/skills/phases/finder-phase/references/frontier-lifecycle.md +0 -76
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: make-tsuite
3
+ description: Audit an automated software test portfolio for signal, overlap, ownership, and placement, or implement test-only suite cleanup and coverage. Use for suite evaluation, redundant-test removal, test reorganization, or adding automated tests without changing production behavior; use tdd for production behavior changes.
4
+ ---
5
+
6
+ # Make TSuite
7
+
8
+ Build a risk-driven automated software test portfolio. `TSuite` means test suite, not TypeScript; apply this skill across languages, frameworks, toolchains, and repository layouts.
9
+
10
+ ## Boundary
11
+
12
+ Production-reachable content is immutable. Writable scope is limited to automated tests and test-scoped fixtures, harnesses, seeds, artifacts, configuration, and dependencies. Inline tests or shared manifests are writable only where changed regions are mechanically isolated to test compilation or execution. Ambiguous isolation is a blocker requiring handback.
13
+
14
+ Before editing, classify every allowed path or hunk as test-scoped. After editing, inspect the complete source-control diff; completion requires every changed region and dependency to remain unreachable from production behavior, artifacts, and deployable wiring.
15
+
16
+ Keep a product defect visible as a failing test with observed failure evidence, then hand back a separate production requirement. A test-only task reaches GREEN only through test-scoped changes.
17
+
18
+ ## Modes
19
+
20
+ - **Audit:** inspect and report; make no changes. Match the output to the request: a cleanup audit returns removable groups, while a portfolio evaluation includes all dispositions.
21
+ - **Implement:** create, strengthen, move, merge, or remove tests only when the user authorized changes.
22
+
23
+ Mode selection is complete when one mode is named and writable scope is explicit.
24
+
25
+ ## Establish authority
26
+
27
+ Read repository and scoped instructions, then inspect relevant tests, fixtures, owned public seams, and their execution mechanism. Where present, inspect discovery or selection configuration and required delivery gates. Consult history or design records only when current files do not explain an important convention.
28
+
29
+ Authority discovery is complete when every test package in scope has an identified behavior owner, public or owned seam, execution and selection path, applicable repository rule, and required delivery gate when one exists.
30
+
31
+ ## Semantic lock
32
+
33
+ Before changing an existing test, record its semantic fingerprint:
34
+
35
+ - capability and current behavior;
36
+ - public or owned seam;
37
+ - actor, authority, and isolation boundary;
38
+ - material setup, input, and fixture state;
39
+ - observable result or typed failure;
40
+ - side effect, absence of side effect, or recovery invariant.
41
+
42
+ A test transformation is equivalent only when the same behavior still passes and the same regression still fails. A changed actor, authority, input class, seam, outcome, or side effect is a new test decision.
43
+
44
+ Semantic lock is complete when every changed case maps its before-and-after fingerprint with no unexplained material difference.
45
+
46
+ ## Route by work
47
+
48
+ - For inventory, signal classification, overlap, or removal, read [audit-portfolio.md](references/audit-portfolio.md).
49
+ - For authorized test changes, read [implement-suite.md](references/implement-suite.md).
50
+ - For routes, APIs, messages, commands, or protocol scenarios, also read [route-api-design.md](references/route-api-design.md).
51
+ - For browser, mobile, desktop, or other user journeys, also read [user-journey-design.md](references/user-journey-design.md).
52
+
53
+ ## Report
54
+
55
+ Separate observed facts from recommendations. Report execution failures as blockers, never passes.
56
+
57
+ An audit report is complete when each requested finding names the cohesive test group, disposition, protected or absent invariant, and evidence. An implementation report is complete when it includes changed and retained proof, semantic-lock results, execution invocation when available and observed results, unresolved product defects, and production-immutability proof for every changed region.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Make TSuite"
3
+ short_description: "Audit or improve test portfolios"
4
+ default_prompt: "Use $make-tsuite to audit this test portfolio or implement authorized test-only suite changes while preserving behavior semantics."
@@ -0,0 +1,47 @@
1
+ # Audit the portfolio
2
+
3
+ ## Inventory test packages
4
+
5
+ A **test package** is the smallest cohesive cluster of cases that provides one body of evidence for a protected capability or invariant. It may be one case, one file, or several files. Group by cohesive evidence rather than directory names; record its seam, fixtures, selection path, and delivery gate where each exists.
6
+
7
+ For every package in scope, map:
8
+
9
+ - member cases and claimed behavior or invariant;
10
+ - public or owned seam;
11
+ - execution tier and boundary crossed;
12
+ - purpose or technique where material, such as example-based, property/fuzz, performance, security, resilience, visual, mutation, or hardware-in-loop;
13
+ - behavior owner and current location;
14
+ - execution mechanism, discovery or selection path, focused invocation when available, and required delivery gate when present;
15
+ - overlapping proof at the same or stricter tier;
16
+ - runtime cost, nondeterministic dependencies, and fixture ownership.
17
+
18
+ Read assertions and fixtures. Use listing or discovery output when static inspection cannot establish selection. Skipped cases, setup success, and importability are not executable product proof.
19
+
20
+ Inventory is complete when every package names its members and at least one claimed invariant, and every material invariant in scope has its strongest existing proof path identified.
21
+
22
+ ## Judge signal
23
+
24
+ Give each package one disposition: `retain`, `strengthen`, `move`, `merge`, or `remove`.
25
+
26
+ Judge:
27
+
28
+ 1. **Sensitivity:** a plausible regression fails for the intended reason.
29
+ 2. **Observability:** assertions reach a durable result, failure, authority boundary, side effect, or compatibility contract.
30
+ 3. **Uniqueness:** the required gate lacks cheaper equivalent proof.
31
+ 4. **Fidelity:** owned behavior remains real across the seam under test.
32
+ 5. **Durability:** implementation details can change without invalidating the protected behavior.
33
+ 6. **Cost:** runtime and maintenance are proportionate to unique risk covered.
34
+
35
+ Static or indirect tests remain useful when they own an architecture boundary, source parity rule, migration invariant, or public compatibility contract. Name that ownership directly.
36
+
37
+ Classification is complete when every package has one disposition supported by observed evidence across all six criteria.
38
+
39
+ Valid sensitivity evidence leaves production unchanged: an observed historical or pre-fix failure; a mutation in a disposable copy; or a controlled perturbation of external input, fixture, or test double that preserves owned behavior as real. Label static sensitivity reasoning `unverified`.
40
+
41
+ ## Removal proof
42
+
43
+ Choose `remove` only when the package has no observable invariant, or retained proof covers every material element in its semantic fingerprint. A failing test that exposes a product regression is repair or production-fix evidence.
44
+
45
+ For an authorized deletion, map each removed fingerprint element to retained proof selected by the same or stricter required gate when gates exist. A higher tier replaces lower-tier proof only when actor, authority, capability, outcome, side effect, and isolation remain covered.
46
+
47
+ Removal proof is complete when every deleted invariant maps to retained proof, or is explicitly classified `no observable invariant`, and the relevant execution mechanism selects the retained proof.
@@ -0,0 +1,40 @@
1
+ # Implement the suite
2
+
3
+ Read [the TDD skill](../../tdd/SKILL.md) and its high-signal test guidance before changing tests. Apply its public-seam, vertical-slice, and honest-evidence rules. This skill's immutable-production boundary replaces TDD's production GREEN step.
4
+
5
+ ## Place proof
6
+
7
+ Choose the lowest execution tier that observes the invariant without simulating its boundary:
8
+
9
+ - **Unit:** deterministic behavior owned by one module or component.
10
+ - **Integration:** collaboration across real adapters, persistence, filesystem, transport, configuration, or lifecycle seams.
11
+ - **Static/contract:** compatibility at an exported, generated, schema, or compile boundary; label whether proof is runtime or static.
12
+ - **Support:** test infrastructure behavior whose owner is the harness or fixture system.
13
+ - **System end-to-end:** distinct public intent crossing real applications, processes, devices, command interfaces, or network boundaries.
14
+
15
+ Purpose and technique are separate from tier. Apply property/fuzz, performance, security, resilience, visual, mutation, or hardware-in-loop testing at the honest tier when the protected risk requires it. Use repository-owned placement and naming conventions. Fixture setup may establish prerequisites; it must preserve the behavior under test as real.
16
+
17
+ Placement is complete when every changed test names its owner, invariant, tier, and why a lower tier cannot observe the boundary honestly.
18
+
19
+ ## Execute one vertical slice
20
+
21
+ For each accepted invariant:
22
+
23
+ 1. Confirm the target is selected by the intended execution mechanism and required delivery gate when one exists.
24
+ 2. Capture the semantic fingerprint of every existing case affected.
25
+ 3. Add or transform one slice through the owned public seam.
26
+ 4. Choose the honest evidence state:
27
+ - already-correct behavior: capture a passing characterization and demonstrate sensitivity through an observed historical or pre-fix failure, a mutation in a disposable copy, or controlled perturbation of external input, fixture, or test double that keeps owned behavior real; label static reasoning `unverified`;
28
+ - established regression: capture genuine RED for the expected product reason and hand back production work;
29
+ - broken test infrastructure: reach GREEN using only test-scoped changes.
30
+ 5. Run the focused test through its execution mechanism when available, then broader owning gates proportional to the boundary changed.
31
+
32
+ A product RED preserves an existing failure. A newly captured RED selected by a required delivery gate remains blocked and cannot be landed as completed work. Landing it requires explicit authorization plus an established non-required quarantine or disabled-test convention; otherwise hand back the production requirement.
33
+
34
+ A slice is complete when selection, observed result, sensitivity evidence, semantic equivalence, product-RED disposition, and production-boundary status are recorded before the next slice begins.
35
+
36
+ ## Finish
37
+
38
+ Inspect the complete diff. Validate that every changed region and dependency is mechanically isolated to test compilation or execution and every changed case preserves or explicitly replaces its fingerprint. Record the execution invocation or mechanism, exact command when available, and observed result; distinguish absent gates, unrun gates, and environmental blockers.
39
+
40
+ Implementation is complete when all authorized dispositions are applied, affected required gates have observed outcomes when present, every changed case passes semantic lock, product RED has a valid disposition, and the diff contains no production-reachable changes.
@@ -0,0 +1,21 @@
1
+ # Route and API test design
2
+
3
+ Use this reference only when the suite exercises routes, APIs, messages, commands, protocols, or comparable public transport boundaries.
4
+
5
+ ## Discover the seam
6
+
7
+ Inspect the public entrypoint, routing or dispatch composition, authentication and authorization, input/output contracts, owned services, persistence, execution configuration, fixtures, and existing harness.
8
+
9
+ Discovery is complete when every distinct response, authority branch, and durable side effect in scope has an owner and an executable public seam.
10
+
11
+ ## Select scenarios
12
+
13
+ Select behavior by distinct risk: success, ownership or isolation, invalid input, missing resource, conflict, external-boundary failure, partial failure, and recovery. Include only branches that carry different public meaning. Use representative actors and minimal fixtures that prove both inclusion and exclusion.
14
+
15
+ Scenario selection is complete when each selected case names a unique public outcome, authority boundary, or side-effect invariant; equivalent permutations are mapped to one representative case.
16
+
17
+ ## Assert meaning
18
+
19
+ Exercise the established transport harness and real owned behavior. Replace only external systems outside the product boundary. Assert the protocol result plus its strongest stable meaning: returned value, typed failure, durable effect, no-op on failure, isolation, or absence of sensitive data.
20
+
21
+ Validation is complete when each changed scenario records the public operation, setup actor, expected protocol result, meaningful outcome or side effect, semantic-lock result, execution invocation or mechanism, and observed result.
@@ -0,0 +1,21 @@
1
+ # User journey test design
2
+
3
+ Use this reference only when the suite drives a real browser, mobile app, desktop client, terminal, or other interactive production entrypoint.
4
+
5
+ ## Define the journey
6
+
7
+ Describe one plausible intent with its actor, systems crossed, visible result, persisted effect, and isolation rule. Prioritize authentication lifecycle, authority-specific states, meaningful domain transitions, persistence across reload or session changes, representative recovery, and exclusion of inaccessible data.
8
+
9
+ Journey selection is complete when each journey protects a distinct user intent or security boundary; every extra permutation has a separately named invariant.
10
+
11
+ ## Preserve the real system
12
+
13
+ Reuse the repository's executable harness. Test-scoped orchestration may build artifacts, start isolated dependencies, wait for readiness, seed deterministic prerequisites through supported external seams, capture diagnostics, and clean up. Keep business rules and deployable wiring inside the real system.
14
+
15
+ Harness preparation is complete when startup, readiness, data setup, identities, diagnostic capture, and cleanup are deterministic and remain test-scoped.
16
+
17
+ ## Drive public interaction
18
+
19
+ Use stable user-visible or accessibility-facing controls and states. Synchronize on specific visible state or public responses. Assert visible outcomes, authority controls, forbidden navigation, persistence, cross-session effects, and absence of inaccessible data as the protected invariant requires.
20
+
21
+ Validation is complete when each journey records actor, visible workflow, invariant, real runtime boundary, execution invocation or mechanism, observed result, artifacts, cleanup result, semantic-lock result, and production-immutability proof for every changed region.
@@ -1,41 +1,57 @@
1
1
  # Write Backlog Examples
2
2
 
3
- ## Agent-ready spec projection
3
+ ## Reconstruct An Existing Product
4
4
 
5
- Input:
5
+ The wiki identifies the product goal, owner, repository, two Product Areas, and
6
+ three Initiatives. Fresh provider reads find the same Product/Backlog Root and
7
+ one current and one future `V*` milestone under stable identities.
6
8
 
7
- ```yaml
8
- readiness: agent-ready
9
- ```
9
+ Existing structure is reused. The proposal enriches missing root metadata,
10
+ links the wiki and repository, and adds the missing Fogs view. `$show-me`
11
+ presents that structural delta. After explicit approval, exact readback proves
12
+ the metadata, links, milestone context, and Product Map, Roadmap, Fogs, and
13
+ Current Delivery views.
10
14
 
11
- - immutable spec link: `<repository-url>/blob/<commit>/SPEC.md`
12
- - `US-001`: Team lead restores ownership of an unassigned submission.
13
- - `AC-001` — `Covers: US-001`: Reassignment preserves notes and evidence.
14
- - `AC-002` — `Covers: US-001`: The new owner sees the submission in their queue.
15
+ ## Cumulative Finder Projection
15
16
 
16
- Output:
17
+ One Fog records a product owner's request.
17
18
 
18
- - capability module: `Intake and review`
19
- - epic: `Submission lifecycle management`, linked to the immutable spec
20
- - story: `Lead restores ownership of an unassigned submission`
21
- - source: `US-001`
22
- - covers: `AC-001`, `AC-002`
23
- - demonstration: reassign one unassigned submission and observe preserved evidence plus the new owner's queue
19
+ 1. **Business**: accepted Business grilling reuses Product Area `Knowledge` and
20
+ Initiative `Reliable answers`, then enriches Epic `Source quality`. The Fog
21
+ links to all three; no duplicate structure is created.
22
+ 2. **Functional**: one accepted Functional child creates Story `Reader sees why
23
+ an answer is trustworthy` in `V4.0`. Its body preserves the product outcome,
24
+ `US-001`, `AC-001`, demonstration, evidence, and Fog provenance.
25
+ 3. **Technical**: an authoritative agent-ready `SPEC.md` at a stable blob URL
26
+ enriches the existing Epic and Story with immutable spec authority, then
27
+ creates required Task `Expose source confidence` and Task `Render confidence
28
+ explanation`. Both inherit `V4.0`; the second is blocked by the first.
24
29
 
25
- This is a vertical tracer bullet: one agent can deliver and demonstrate the product outcome without splitting database, API, UI, and tests into separate backlog stories.
30
+ The Task graph has stable provider identities, no missing target, no
31
+ future-iteration dependency, no self-edge, and no cycle. Exact readback proves
32
+ the Story parent and milestone, both Task parents and milestones, the native
33
+ blocker, source links, and Fog relations.
26
34
 
27
- ## Blocker graph
35
+ ## Existing Milestone Wins
28
36
 
29
- - `US-002 / Lead manages the unassigned queue` is blocked by `US-001 / Lead restores ownership`.
30
- - Both targets exist and the graph is acyclic.
31
- - Both stories share their containing epic's milestone when the provider supports membership; the native blocker relation carries their ordering.
37
+ The accepted Functional resolution targets the current product increment. A
38
+ fresh provider read finds a fitting `V4.0` milestone with the same goal and
39
+ outcomes. Reuse it. Do not propose another milestone because its display title
40
+ differs from the draft wording.
32
41
 
33
- If a blocker target is missing or the graph cycles, write nothing.
42
+ If milestone metadata is supported, preserve Version name, One-sentence product
43
+ goal, and Included product outcomes or capability changes. Otherwise preserve
44
+ the version name alone.
34
45
 
35
- ## Pre-spec intake resolution
46
+ ## Ambiguous Identity
36
47
 
37
- An earlier `prototype` item established the review-screen direction. Resolve that intake item with its verdict plus the immutable spec link. Create a separate epic projection. Do not relabel or silently promote the prototype item into the epic.
48
+ Two Epics share a similar title, and neither carries the Fog's durable wiki
49
+ identity. Show both candidates and return the identity gap with zero writes.
50
+ Title similarity cannot select an upsert target.
38
51
 
39
- ## Invalid input
52
+ ## Partial Provider Failure
40
53
 
41
- If readiness is absent, `AC-001` lacks `Covers: US-###`, a story is not demonstrable, or provider hierarchy cannot represent the required projection, return every gap before any mutation.
54
+ The Story write succeeds and the second Task relation fails. Stop, read back the
55
+ Story, Tasks, milestone memberships, and blockers, then return observed IDs plus
56
+ the missing relation. A retry reconciles fresh state and writes only that
57
+ validated relation.
@@ -1,107 +1,90 @@
1
- # Write Backlog Reference
1
+ # Write Backlog Mutation Envelope
2
2
 
3
- ## Purpose
3
+ ## Public Seam
4
4
 
5
- `write-backlog` is the provider-mutation adapter for three bounded branches: pre-spec decision intake, update-existing claim/release/resolution, and post-spec delivery projection. It does not compile specifications or create concrete implementation plans. Updating requires a provider id or URL, reads current state first, rejects conflicting claims, and writes the immutable resolution pointer supplied by Finder.
5
+ `write-backlog` accepts one semantic operation and returns its exact provider
6
+ result. Callers do not select provider primitives or perform writes.
6
7
 
7
- The direct backlog concepts are:
8
+ Required input:
8
9
 
9
- - `fog`
10
- - `grilling`
11
- - `research`
12
- - `prototype`
13
- - `epic`
14
- - `story`
10
+ - operation: initialize/reconstruct, Fog or pre-resolution grilling-child
11
+ ensure, Research/Prototype support-child ensure, Business projection,
12
+ Functional projection, Technical projection, Normalization, delivery status,
13
+ or issue reconciliation
14
+ - durable wiki identity for every intended object and stable provider identity
15
+ for every known object
16
+ - immutable accepted evidence that authorizes a projection, Normalization, or
17
+ delivery-status operation; Fog, grilling-shell, and support-child intake use
18
+ exact parent identity, kind, durable wiki identity, and cardinality instead
19
+ - proposed semantic delta, source wording, source links, and expected current
20
+ provider state
21
+ - exact `V*` milestone for each Story and any explicit Fog target iteration
22
+ - structural approval record when the delta crosses an approval boundary
15
23
 
16
- No shared cross-provider classification field is required. Every adapter must still make the direct concept visible and searchable through configured native representation or its documented nearest-native fallback. If neither preserves the concept, fail before mutation. Provider vocabulary does not become canonical domain vocabulary.
24
+ Missing operation-specific authority or conflicting authority returns every gap
25
+ with zero provider mutations. Intake requires no accepted evidence: it creates
26
+ or resumes the unresolved shell that will later carry that evidence.
17
27
 
18
- ## Pre-spec intake contract
19
-
20
- Finder may request one `fog`, `grilling`, `research`, or `prototype` item before
21
- a spec exists. A `fog` item requires a frontier or uncertainty description; it
22
- does not require a precise question. A `grilling`, `research`, or `prototype`
23
- item requires the precise question derived when fog graduates. Every intake
24
- also requires its selected classification, map link, dependencies, and claim
25
- state. Validate the complete intake dependency graph for missing targets,
26
- self-edges, and cycles before mutation. Materialize exactly that intake item;
27
- do not infer or create delivery epics/stories.
28
-
29
- ## Delivery input contract
30
-
31
- Before inspecting or mutating provider state for an `epic` or `story` delivery projection, require:
32
-
33
- - a verified stable blob URL to an authoritative `SPEC.md`; local SHA plus path is insufficient
34
- - frontmatter `readiness: agent-ready`
35
- - stable `US-###` user stories
36
- - stable `AC-###` acceptance criteria
37
- - every criterion carrying `Covers: US-###`
38
- - no uncovered story and no criterion pointing to a missing story
39
- - accepted technical/testing decisions and verification seams
40
- - prototype verdict links when prototypes informed the decisions
41
-
42
- If any requirement is missing, return a readiness failure naming every gap. Write nothing to the provider.
43
-
44
- ## Projection contract
45
-
46
- Create one capability-boundary epic for the spec. Derive the fewest product-facing stories that preserve all `US-###` outcomes and `AC-###` evidence. Every story must:
47
-
48
- - name its source `US-###` records
49
- - name its covered `AC-###` records
50
- - be agent-sized
51
- - be a vertical tracer bullet with one demonstrable user, operator, or system outcome
52
- - remain understandable without the implementation plan
53
-
54
- Split only across distinct product outcomes, acceptance signals, provider boundaries, or true dependencies. Technical layers are not stories.
55
-
56
- ## Readiness before mutation
57
-
58
- Build and validate the complete intended projection in memory before the first provider write:
59
-
60
- 1. Resolve the target from `.devpunks/settings.json`.
61
- 2. Validate the spec and traceability.
62
- 3. Validate every story as an agent-sized tracer bullet.
63
- 4. Resolve every blocker to a projected story.
64
- 5. Reject self-blockers, missing targets, and cycles.
65
- 6. Assign milestones across the overview-level taxonomy from `fog` through `epic` (`fog`, `grilling`, `research`, `prototype`, `epic`) for project-level chronological precedence. When supported, assign each child story the same containing overview milestone; never derive distinct story milestones. Native blockers explain story relations.
66
- 7. Validate provider representation and required native primitives.
67
- 8. Only after every check passes, write immediately without a separate approval stop.
68
-
69
- A validation failure produces zero mutations. If a provider fails during the write sequence, stop, report created identifiers, and do not claim atomicity or readiness.
70
-
71
- ## Intake resolution
72
-
73
- When the work began as a pre-spec `fog`, `grilling`, `research`, or `prototype` item:
74
-
75
- - keep that intake item as historical decision evidence
76
- - resolve it with the immutable spec link and the accepted outcome
77
- - create a separate delivery epic projection
78
- - never silently promote or relabel the intake item as the delivery epic
79
-
80
- ## Provider model
28
+ ## Topology
81
29
 
82
30
  ```text
83
- Backlog root
84
- fog
85
- capability module
86
- grilling
87
- research
88
- prototype
89
- epic
90
- story
91
-
92
- Project overview execution milestones
93
- M1 -> M2 -> M3 ...
94
- (assigned only to overview-level items from fog through epic)
31
+ Product/Backlog Root
32
+ └── Product Area
33
+ └── Initiative
34
+ └── Epic
35
+ └── Story [exactly one contextual V*]
36
+ └── Task 1..n [same V* + blocker relations]
37
+
38
+ Fog ──lateral provenance/enrichment──> Product Area | Initiative | Epic | Story | Task
95
39
  ```
96
40
 
97
- Capability grouping is independent from chronology. Native blockers are authoritative for story relations. Milestones are a project-overview signal: assign them to overview-level `fog`, `grilling`, `research`, `prototype`, and `epic` items when chronological precedence is useful, and let their containing stories share that milestone when the provider supports membership. Never use milestone values to order stories.
98
-
99
- Provider representation is defined in [assets/providers/](assets/providers/). Use actual metadata and native hierarchy/dependency primitives. Do not invent fields, flatten child stories, or replace representable blockers with prose.
100
-
101
- ## Body ownership
102
-
103
- Epic bodies contain outcome, scope, cross-story constraints, the immutable spec link, and child story links.
104
-
105
- Story bodies contain product outcome, `US-###` sources, `AC-###` coverage, demonstration signal, non-goals, dependencies, and durable accepted-artifact links.
106
-
107
- Keep `PLAN.md` task ids, file paths, validation commands, worker assignments, and code structure out of backlog bodies. Concrete planning remains downstream in `delivery-phase` / `create-plan`.
41
+ Product Areas are durable product responsibilities. Initiatives are business
42
+ goals. Epics are long-lived business slices and may span iterations. Stories
43
+ are shippable product outcomes. Tasks are required atomic, independently
44
+ ownable delivery units.
45
+
46
+ Business projection creates or enriches Product Area, Initiative, and Epic.
47
+ Functional projection creates Stories. Technical projection creates mandatory
48
+ Tasks only after one authoritative agent-ready `SPEC.md` exists for the Story.
49
+ Fog remains lateral provenance throughout all three stages.
50
+
51
+ Every Story belongs to exactly one contextual `V*` milestone iteration, and
52
+ every Task belongs to the same iteration as its Story. A Fog may target one
53
+ fitting iteration. Product Areas, Initiatives, and Epics span iterations.
54
+
55
+ ## Validation Envelope
56
+
57
+ Before the first provider write:
58
+
59
+ 1. Resolve destination, Product/Backlog Root, repository, wiki, and provider
60
+ workspace identity.
61
+ 2. Read every target and relation from the provider.
62
+ 3. Apply the exact create/enrich/stop decision table from
63
+ [issue reconciliation](references/issue-reconciliation.md). A title is
64
+ discovery evidence only.
65
+ 4. Reuse the exact existing structure and fitting `V*` milestone. Propose a new
66
+ structure only when no exact or fitting one exists.
67
+ 5. Validate hierarchy, metadata representation, provider membership, source
68
+ links, accepted evidence, and approval state.
69
+ 6. For Technical projection, validate every parent Story and the complete
70
+ reachable Task graph. Reject a missing parent Story, Task/Story milestone
71
+ mismatch, missing blocker target, self-edge, future-iteration dependency, or
72
+ cycle. Real blockers may cross Stories and Epics.
73
+ 7. Preview material topology changes with `$show-me`; wait for explicit approval
74
+ where required.
75
+
76
+ ## Result Envelope
77
+
78
+ Return:
79
+
80
+ - provider and Product/Backlog Root identities
81
+ - operation and immutable evidence identity
82
+ - each durable wiki identity and stable provider ID/URL
83
+ - created, enriched, repaired, or unchanged classification
84
+ - exact parents, relations, `V*` membership, fields, views, source links, and
85
+ statuses read back from the provider
86
+ - applied approval record and unresolved delta
87
+ - partial writes and recovery point when a provider request fails
88
+
89
+ Only exact readback proves success. A successful request without matching
90
+ readback is an unresolved reconciliation, not completion.