@punks/cli 4.0.2 → 4.0.4

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 (164) hide show
  1. package/dist/BASELINE_CHANGELOG.md +29 -0
  2. package/dist/CHANGELOG.md +25 -0
  3. package/dist/baseline/scaffold-baseline/baseline.json +5 -5
  4. package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +10 -4
  5. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +0 -1
  6. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +0 -8
  7. package/dist/baseline/scaffold-baseline/data/hooks/format-edited-file.mjs +602 -101
  8. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.d.ts +11 -0
  9. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.mjs +103 -0
  10. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.test.ts +144 -0
  11. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.mjs +1 -0
  12. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.mjs +1 -0
  13. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.mjs +1 -0
  14. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.mjs +1 -0
  15. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.ts +24 -33
  16. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/core.mjs +4 -0
  17. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/core.test.ts +61 -0
  18. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/lint-feedback.test.ts +123 -0
  19. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/claude/actions.json +1 -0
  20. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/codex/actions.json +2 -1
  21. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/cursor/projection.json +1 -0
  22. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/opencode/projection.json +1 -0
  23. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents-validator.test.ts +59 -0
  24. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.d.mts +1 -0
  25. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.mjs +27 -14
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/docs-onboarding/SKILL.md +2 -2
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/SKILL.md +32 -32
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +7 -7
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/readiness.md +14 -13
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +26 -19
  31. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/SKILL.md +2 -2
  32. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/scripts/autoreview +3 -0
  33. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/brainstorm/SKILL.md +18 -0
  34. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +2 -1
  35. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +9 -9
  36. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +43 -55
  37. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +68 -63
  38. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +26 -29
  39. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +5 -5
  40. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +1 -1
  41. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +2 -2
  42. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +1 -1
  43. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +2 -2
  44. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/business-projection.md +19 -24
  45. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/delivery-status.md +17 -13
  46. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/fog-intake.md +45 -48
  47. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/functional-projection.md +16 -21
  48. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/normalization.md +14 -14
  49. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/project-context.md +32 -27
  50. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/github.md +105 -150
  51. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/linear.md +111 -181
  52. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/technical-projection.md +51 -47
  53. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +49 -35
  54. package/dist/baseline/scaffold-baseline/skills/agnostic/security/security-best-practices/references/javascript-typescript-vue-web-frontend-security.md +1 -1
  55. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/eas-update-insights/references/update-insights-schema.md +2 -6
  56. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/expo-skill-eval/SKILL.md +6 -7
  57. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-best-practices/SKILL.md +1 -3
  58. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-component/SKILL.md +2 -14
  59. package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/references/best-practices.md +7 -1
  60. package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/templates/devtools-setup.tsx +4 -0
  61. package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/references/best-practices.md +7 -1
  62. package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/templates/devtools-setup.tsx +4 -0
  63. package/dist/baseline/scaffold-baseline/skills/languages/typescript/quality-types/SKILL.md +1 -3
  64. package/dist/baseline/scaffold-baseline/skills/phases/business-finder/SKILL.md +29 -16
  65. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/SKILL.md +1 -1
  66. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +10 -8
  67. package/dist/baseline/scaffold-baseline/skills/phases/design-phase/phases/backlog.md +26 -17
  68. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
  69. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/SKILL.md +22 -25
  70. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
  71. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/grilling.md +40 -0
  72. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/handback.md +11 -18
  73. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/prototype.md +13 -21
  74. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/reconcile.md +21 -35
  75. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/research.md +13 -18
  76. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/return-target.md +14 -25
  77. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/router.md +22 -56
  78. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
  79. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/root-routing.md +12 -20
  80. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
  81. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/state-graph.md +27 -49
  82. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/scripts/finder-contract.mjs +40 -359
  83. package/dist/baseline/scaffold-baseline/skills/phases/functional-finder/SKILL.md +29 -62
  84. package/dist/baseline/scaffold-baseline/skills/phases/requirements-phase/SKILL.md +49 -13
  85. package/dist/baseline/scaffold-baseline.json +5 -5
  86. package/dist/baseline/scaffold-baseline.tgz +0 -0
  87. package/dist/data/hooks/format-edited-file.d.mts +21 -0
  88. package/dist/data/hooks/format-edited-file.mjs +588 -98
  89. package/dist/data/scripts/commit-gate-runner.mjs +103 -0
  90. package/dist/data/scripts/harness-projection/adapters/claude.mjs +1 -0
  91. package/dist/data/scripts/harness-projection/adapters/codex.mjs +1 -0
  92. package/dist/data/scripts/harness-projection/adapters/cursor.mjs +1 -0
  93. package/dist/data/scripts/harness-projection/adapters/opencode.mjs +1 -0
  94. package/dist/data/scripts/harness-projection/core.mjs +4 -0
  95. package/dist/data/scripts/harness-projection/test-fixtures/claude/actions.json +1 -0
  96. package/dist/data/scripts/harness-projection/test-fixtures/codex/actions.json +2 -1
  97. package/dist/data/scripts/harness-projection/test-fixtures/cursor/projection.json +1 -0
  98. package/dist/data/scripts/harness-projection/test-fixtures/opencode/projection.json +1 -0
  99. package/dist/data/scripts/sync-subagents.d.mts +1 -0
  100. package/dist/data/scripts/sync-subagents.mjs +30 -13
  101. package/dist/data/shared-agents.md +2 -60
  102. package/dist/index.js +73 -64
  103. package/dist/skills/agnostic/docs/docs-onboarding/SKILL.md +2 -2
  104. package/dist/skills/agnostic/planning/create-spec/SKILL.md +32 -32
  105. package/dist/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +7 -7
  106. package/dist/skills/agnostic/planning/create-spec/references/readiness.md +14 -13
  107. package/dist/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +26 -19
  108. package/dist/skills/agnostic/quality/autoreview/SKILL.md +2 -2
  109. package/dist/skills/agnostic/quality/autoreview/scripts/autoreview +3 -0
  110. package/dist/skills/agnostic/requirements/brainstorm/SKILL.md +18 -0
  111. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +2 -1
  112. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +9 -9
  113. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +43 -55
  114. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +68 -63
  115. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +26 -29
  116. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +5 -5
  117. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +1 -1
  118. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +2 -2
  119. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +1 -1
  120. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +2 -2
  121. package/dist/skills/agnostic/requirements/write-backlog/references/business-projection.md +19 -24
  122. package/dist/skills/agnostic/requirements/write-backlog/references/delivery-status.md +17 -13
  123. package/dist/skills/agnostic/requirements/write-backlog/references/fog-intake.md +45 -48
  124. package/dist/skills/agnostic/requirements/write-backlog/references/functional-projection.md +16 -21
  125. package/dist/skills/agnostic/requirements/write-backlog/references/normalization.md +14 -14
  126. package/dist/skills/agnostic/requirements/write-backlog/references/project-context.md +32 -27
  127. package/dist/skills/agnostic/requirements/write-backlog/references/providers/github.md +97 -142
  128. package/dist/skills/agnostic/requirements/write-backlog/references/providers/linear.md +106 -176
  129. package/dist/skills/agnostic/requirements/write-backlog/references/technical-projection.md +51 -47
  130. package/dist/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +55 -31
  131. package/dist/skills/phases/business-finder/SKILL.md +29 -16
  132. package/dist/skills/phases/delivery-phase/SKILL.md +1 -1
  133. package/dist/skills/phases/delivery-phase/phases/router.md +10 -8
  134. package/dist/skills/phases/design-phase/phases/backlog.md +26 -17
  135. package/dist/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
  136. package/dist/skills/phases/finder-phase/SKILL.md +22 -25
  137. package/dist/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
  138. package/dist/skills/phases/finder-phase/phases/grilling.md +40 -0
  139. package/dist/skills/phases/finder-phase/phases/handback.md +11 -18
  140. package/dist/skills/phases/finder-phase/phases/prototype.md +13 -21
  141. package/dist/skills/phases/finder-phase/phases/reconcile.md +21 -35
  142. package/dist/skills/phases/finder-phase/phases/research.md +13 -18
  143. package/dist/skills/phases/finder-phase/phases/return-target.md +14 -25
  144. package/dist/skills/phases/finder-phase/phases/router.md +22 -56
  145. package/dist/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
  146. package/dist/skills/phases/finder-phase/references/root-routing.md +12 -20
  147. package/dist/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
  148. package/dist/skills/phases/finder-phase/references/state-graph.md +27 -49
  149. package/dist/skills/phases/finder-phase/scripts/finder-contract.mjs +44 -357
  150. package/dist/skills/phases/functional-finder/SKILL.md +29 -62
  151. package/dist/skills/phases/requirements-phase/SKILL.md +49 -13
  152. package/package.json +7 -5
  153. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
  154. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/business-grilling.md +0 -68
  155. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
  156. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
  157. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/SKILL.md +0 -74
  158. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/agents/openai.yaml +0 -2
  159. package/dist/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
  160. package/dist/skills/phases/finder-phase/phases/business-grilling.md +0 -68
  161. package/dist/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
  162. package/dist/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
  163. package/dist/skills/phases/technical-finder/SKILL.md +0 -74
  164. package/dist/skills/phases/technical-finder/agents/openai.yaml +0 -2
@@ -0,0 +1,40 @@
1
+ # Generic Grilling Gate
2
+
3
+ ## Entry guard
4
+
5
+ One exact Fog and immutable intake lens exist, and the bounded intake result is
6
+ not ready.
7
+
8
+ ## Bounded action
9
+
10
+ 1. Read every direct generic `Kind/grilling` child and its support evidence.
11
+ 2. Reuse one obviously relevant child. Create another child only when current
12
+ evidence supports separate useful work. When relevance is genuinely
13
+ ambiguous, request human steering before any create intent.
14
+ 3. For a new child, allocate one durable wiki identity and ask `$write-backlog`
15
+ to ensure its generic shell and exact supported-by relations.
16
+ 4. Run one atomic `$grilling` conversation using the invoking wrapper's intake
17
+ and presentation profile, including its `$wait-what` and `$show-me`
18
+ behavior. Unknown values remain explicit.
19
+ 5. When a precise unknown needs readonly facts or a human-evaluated artifact,
20
+ record the named child and route to Research or Prototype.
21
+ 6. Retain accepted bounded evidence. If optional structure is useful, emit a
22
+ semantic intent within the wrapper's projection ceiling for reconciliation.
23
+
24
+ ## Completion evidence
25
+
26
+ Exact generic child identity, immutable retained evidence, any support request
27
+ and relation, bounded-result state, and optional ceiling-safe projection intent.
28
+
29
+ ## Declared exits
30
+
31
+ - `support_required` -> router re-entry.
32
+ - `projection_requested` -> reconciliation through router re-entry.
33
+ - `bounded_result_ready` -> bounded return through router re-entry.
34
+ - `human_steering_required` -> handback.
35
+ - `blocked` -> stop with missing evidence.
36
+
37
+ ## Durable handoff
38
+
39
+ Persist child identities, evidence pointers, reuse-or-create decision, support
40
+ relations, optional projection intent, bounded-result state, and exit.
@@ -2,28 +2,20 @@
2
2
 
3
3
  ## Entry guard
4
4
 
5
- Identity, evidence, target depth, authority, or accepted scope is ambiguous or
6
- conflicting and cannot be resolved from current authoritative evidence.
7
-
8
- ## Inputs
9
-
10
- Exact conflict, admissible evidence, zero-write proof, current runtime handoff,
11
- and the minimum human decision required.
5
+ Fog identity, immutable lens, child relevance, support relation, evidence,
6
+ scope, or projection ceiling is ambiguous or conflicting under current
7
+ authority.
12
8
 
13
9
  ## Bounded action
14
10
 
15
- Invoke `$handback` with the conflict and minimum decision. Persist its complete
16
- outcome as `human_steering_required` and stop.
17
-
18
- ## Invariants
19
-
20
- No semantic mutation intent is emitted while the conflict remains. The router
21
- keeps returning this terminal until the `$handback` authority guard passes.
11
+ Invoke `$handback` with the exact conflict and minimum human decision. Persist
12
+ its complete outcome as `human_steering_required`, prove that no mutation intent
13
+ was emitted after detecting the conflict, and stop.
22
14
 
23
15
  ## Completion evidence
24
16
 
25
- Durable `$handback` outcome, exact missing authority or decision, and proof that
26
- no mutation was requested after conflict detection.
17
+ Durable `$handback` outcome, exact missing authority or decision, and zero-write
18
+ proof.
27
19
 
28
20
  ## Declared exits
29
21
 
@@ -32,5 +24,6 @@ no mutation was requested after conflict detection.
32
24
 
33
25
  ## Durable handoff
34
26
 
35
- Persist the complete `$handback` outcome, conflict evidence, required decision,
36
- and terminal state.
27
+ Persist conflict evidence, minimum required decision, complete `$handback`
28
+ outcome, and terminal state. The router keeps returning this terminal while the
29
+ authority guard remains unsatisfied.
@@ -2,39 +2,31 @@
2
2
 
3
3
  ## Entry guard
4
4
 
5
- The active grilling child records one precise unknown requiring a human-evaluated
6
- artifact and no fresh verdict exists.
7
-
8
- ## Inputs
9
-
10
- Exact Fog, supported grilling child identity, precise question, prior Prototype
11
- children, and retained verdict evidence.
5
+ A named Grilling child records one precise unknown requiring a human-evaluated
6
+ artifact and no fresh retained verdict exists.
12
7
 
13
8
  ## Bounded action
14
9
 
15
- Reuse or semantically request one direct Fog Prototype child through
16
- `$write-backlog`, linked to the grilling child it supports. Run
17
- `$prototype-phase`. Accept only its human verdict plus immutable artifact and
18
- verdict pointers, then route to reconciliation.
19
-
20
- ## Invariants
10
+ Reuse an obviously relevant direct Fog Prototype child or create one when the
11
+ evidence supports separate useful work. Link it to the named Grilling child,
12
+ run `$prototype-phase`, and retain its human verdict and immutable artifact pointer.
13
+ Ambiguity requests human steering before creation.
21
14
 
22
- A Prototype verdict informs its named grilling child. It cannot independently
23
- authorize backlog projection.
15
+ Prototype returns evidence to its supported Grilling child. It cannot accept product direction or authorize backlog
16
+ projection independently.
24
17
 
25
18
  ## Completion evidence
26
19
 
27
- Stable Prototype child identity, supported-child relation, human verdict,
28
- immutable artifact/verdict pointers, and exact child/relation readback.
20
+ Exact Prototype child identity, supported-child relation, immutable artifact
21
+ and human-verdict pointers, and exact child/relation readback.
29
22
 
30
23
  ## Declared exits
31
24
 
32
- - `support_resolved` -> reconciliation then router re-entry.
33
- - `iterate` -> remain in this gate after durable handoff.
25
+ - `support_resolved` -> router re-entry.
34
26
  - `human_steering_required` -> handback.
35
27
  - `blocked` -> stop with missing retained evidence.
36
28
 
37
29
  ## Durable handoff
38
30
 
39
- Persist Prototype identity, supported child, verdict pointers, readback, and
40
- exit.
31
+ Persist Prototype identity, supported Grilling child, verdict pointers,
32
+ readback, and exit.
@@ -1,52 +1,38 @@
1
- # Reconcile Stage Gate
1
+ # Optional Projection Reconciliation Gate
2
2
 
3
3
  ## Entry guard
4
4
 
5
- Fresh accepted stage or support evidence exists without matching exact provider
6
- readback.
7
-
8
- ## Inputs
9
-
10
- Exact Fog snapshot, child identity, immutable evidence, semantic projection or
11
- support intent, prior provider identities, and current wiki/provider state.
5
+ Fresh bounded intake evidence contains an optional semantic structure intent
6
+ without a final exact readback.
12
7
 
13
8
  ## Bounded action
14
9
 
15
- 1. Verify the intent still matches current evidence and target depth.
16
- 2. Send the semantic intent to `$write-backlog`; that skill owns identity
17
- reconciliation, structural preview/approval, provider mutation, and readback.
18
- 3. Consume exact readback for every created or enriched object, relationship,
19
- source link, and stage field. Technical reconciliation also consumes the
20
- exact successful provider-neutral Task graph validator result from
21
- `$write-backlog`, covering the full reachable graph and resolved milestone
22
- order at the same provider snapshot.
23
- 4. Link the Fog and stage child to every enriched or produced object through the
24
- writer result. Preserve Fog as lateral provenance.
25
- 5. If accepted evidence conflicts or identity is ambiguous, emit no further
26
- mutation intent and route to handback.
27
-
28
- ## Invariants
29
-
30
- No provider mechanics live here. Title-only matching is inadmissible. A stage
31
- cannot become accepted runtime state until immutable evidence and exact readback
32
- agree.
10
+ No provider mechanics live here.
11
+
12
+ 1. Verify the intent still matches current evidence and the invoking wrapper's
13
+ projection ceiling.
14
+ 2. Send the semantic intent to `$write-backlog`, which owns identity
15
+ reconciliation, preview and approval, provider mutation, and exact readback.
16
+ 3. Consume exact identities, relationships, source links, and residual result.
17
+ 4. On an unavailable or declined optional projection, record it unresolved and
18
+ preserve the otherwise valid Fog result.
19
+ 5. Conflicting identity or above-ceiling intent emits no mutation request and
20
+ routes to human steering.
33
21
 
34
22
  ## Completion evidence
35
23
 
36
- Accepted child identity and resolution pointer, exact created-or-enriched
37
- identities and relations, source links, stage fields, and provider snapshot.
38
- Technical completion also retains the bound full-reachable Task graph validator
39
- result and proves that it covers every returned Task and outgoing edge.
24
+ The original semantic intent plus exact optional structure readback, an
25
+ unresolved projection result, or a zero-write conflict result.
40
26
 
41
27
  ## Declared exits
42
28
 
43
- - `stage_reconciled` -> router re-entry.
44
- - `support_reconciled` -> owning grilling gate through router re-entry.
29
+ - `projection_reconciled` -> router re-entry.
30
+ - `projection_unresolved` -> bounded return through router re-entry.
45
31
  - `approval_required` -> persist checkpoint and stop.
46
32
  - `human_steering_required` -> handback.
47
- - `blocked` -> stop with missing readback.
33
+ - `blocked` -> stop with missing required readback.
48
34
 
49
35
  ## Durable handoff
50
36
 
51
- Persist intent identity, all exact readback identities and relations, provider
52
- snapshot, checkpoint or blocker, and exit.
37
+ Persist intent identity, wrapper ceiling, exact readback or unresolved result,
38
+ provider snapshot, checkpoint or blocker, and exit.
@@ -2,37 +2,32 @@
2
2
 
3
3
  ## Entry guard
4
4
 
5
- The active grilling child records one precise unknown answerable by readonly
5
+ A named Grilling child records one precise unknown answerable by readonly
6
6
  investigation and no fresh retained answer exists.
7
7
 
8
- ## Inputs
9
-
10
- Exact Fog, supported grilling child identity, precise question, scope, and
11
- prior research children/evidence.
12
-
13
8
  ## Bounded action
14
9
 
15
- Reuse or semantically request one direct Fog Research child through
16
- `$write-backlog`, linked to the grilling child it supports. Run
17
- `$parallel-research` in durable-report mode. Require the retained report's
18
- immutable commit SHA and path, then route to reconciliation.
19
-
20
- ## Invariants
10
+ Reuse an obviously relevant direct Fog Research child or create one when the
11
+ evidence supports separate useful work. Link it to the named Grilling child,
12
+ run `$parallel-research` in durable-report mode, and retain the report by
13
+ immutable commit SHA and path. Ambiguity requests human steering before
14
+ creation.
21
15
 
22
- Research reports facts and cannot accept product direction or authorize backlog
23
- projection.
16
+ Research returns facts to its supported Grilling child. It cannot accept product direction or authorize backlog
17
+ projection independently.
24
18
 
25
19
  ## Completion evidence
26
20
 
27
- Stable Research child identity, supported-child relation, immutable report SHA
28
- and path, and exact child/relation readback.
21
+ Exact Research child identity, supported-child relation, report retained by
22
+ immutable commit SHA and path, and exact child/relation readback.
29
23
 
30
24
  ## Declared exits
31
25
 
32
- - `support_resolved` -> reconciliation then router re-entry.
26
+ - `support_resolved` -> router re-entry.
33
27
  - `human_steering_required` -> handback.
34
28
  - `blocked` -> stop with missing retained evidence.
35
29
 
36
30
  ## Durable handoff
37
31
 
38
- Persist Research identity, supported child, report pointer, readback, and exit.
32
+ Persist Research identity, supported Grilling child, report pointer, readback,
33
+ and exit.
@@ -1,42 +1,31 @@
1
- # Return Target Gate
1
+ # Bounded Return Gate
2
2
 
3
3
  ## Entry guard
4
4
 
5
- Every stage required by the chosen target depth has an exact child identity,
6
- immutable accepted resolution pointer, and matching exact provider readback.
7
-
8
- ## Inputs
9
-
10
- Target depth, exact Fog and child identities, immutable resolution pointers,
11
- provider readbacks, any required full-reachable Task graph validator result,
12
- and unresolved accepted resulting scope.
5
+ One exact Fog, immutable intake lens, retained bounded evidence, and every
6
+ requested support result exist. Optional projection is skipped, unresolved, or
7
+ read back within the wrapper's projection ceiling.
13
8
 
14
9
  ## Bounded action
15
10
 
16
- Assemble the direct-composition return shape. State the depth reached, accepted
17
- evidence, enriched or produced provider objects, and the next explicit human
18
- option. Preserve remaining scope and production-evidence obligations.
19
-
20
- ## Invariants
11
+ Assemble the direct-composition result: exact Fog identity, immutable lens,
12
+ generic Grilling and support identities, retained evidence, optional structure
13
+ readback, unresolved decisions, and next explicit human options.
21
14
 
22
- This gate never marks the Fog complete. Business returns exactly one Business
23
- child; Functional returns one or more Functional children selected for this
24
- invocation; Technical returns exactly one Technical child per selected Story.
25
- Every returned child includes its accepted projection readback.
15
+ Return control without asserting that the Fog is resolved or complete. Delivery
16
+ truth remains outside Finder.
26
17
 
27
18
  ## Completion evidence
28
19
 
29
- All required stage identities, immutable pointers, exact readbacks, required
30
- Task graph validator result bound to the current provider snapshot, and a
31
- runtime handoff whose outcome is `target_depth_reached` rather than Fog
32
- completion.
20
+ A durable result containing every identity and evidence pointer the gate claims,
21
+ plus outcome `bounded_result_returned` and no Fog-completion assertion.
33
22
 
34
23
  ## Declared exits
35
24
 
36
- - `target_depth_reached` -> return control to the invoking human wrapper.
25
+ - `bounded_result_returned` -> invoking human wrapper.
37
26
  - `blocked` -> router re-entry when required evidence is incomplete.
38
27
 
39
28
  ## Durable handoff
40
29
 
41
- Persist the returned identities, target depth, remaining accepted scope,
42
- production-evidence obligations, and exact return outcome.
30
+ Persist returned identities, immutable lens, optional projection status,
31
+ unresolved decisions, exact outcome, and remaining evidence obligations.
@@ -1,64 +1,30 @@
1
1
  # Finder Router
2
2
 
3
- Recompute one route on every entry. Runtime authority is the current provider
4
- Fog, direct children, relations, provider objects, wiki identity, and immutable
5
- evidence. Resolve conflicts in this order: current direct evidence, fresh
6
- workflow-native artifacts, committed handoff, suggested route.
3
+ Recompute exactly one route from current evidence on every entry and cold
4
+ resume. Read current direct evidence from provider and human decisions first, then fresh
5
+ workflow-native artifacts, then a consistent committed runtime handoff. A
6
+ suggested route is advisory only.
7
7
 
8
- ## Route Precedence
8
+ ## Route precedence
9
9
 
10
- 1. Durable `human_steering_required` while the `$handback` authority guard
11
- fails -> terminal `human_steering_required`.
12
- 2. Missing or invalid target depth -> [handback](handback.md).
13
- 3. Ambiguous or conflicting Fog, child, relation, or accepted-evidence identity;
14
- accepted Business evidence without exactly one exact child in the fresh
15
- complete collection; a Functional or Technical child missing its stable
16
- cardinality key; duplicate projected Story or Task identities; or incomplete
17
- Story/Task projection readback -> [handback](handback.md), with zero mutation
18
- intent.
19
- 4. No exact Fog readback -> [ensure-fog](ensure-fog.md).
20
- 5. Product Area or Initiative expansion lacks a split-or-proceed decision ->
21
- checkpoint `scope-expansion-checkpoint`; persist it and stop.
22
- 6. Current stage has selected unresolved Research support ->
23
- [research](research.md).
24
- 7. Current stage has selected unresolved Prototype support ->
25
- [prototype](prototype.md).
26
- 8. Functional or Technical depth starts from an exact accepted Product Area ->
27
- Initiative -> Epic path with an explicit `reuse-unchanged` decision but no
28
- Business child -> [adopt-business-path](adopt-business-path.md).
29
- 9. Business evidence is missing or invalid ->
30
- [business-grilling](business-grilling.md).
31
- 10. Accepted Business evidence lacks an exact child identity or immutable
32
- resolution pointer -> [handback](handback.md), with zero mutation intent.
33
- 11. Accepted Business evidence lacks exact projection readback ->
34
- [reconcile](reconcile.md).
35
- 12. Target depth is `Business` -> [return-target](return-target.md).
36
- 13. Accepted Functional evidence lacks an exact child identity or immutable
37
- resolution pointer -> [handback](handback.md), with zero mutation intent.
38
- 14. Accepted Functional evidence lacks one distinct stable projected Story
39
- identity and exact projection readback ->
40
- [reconcile](reconcile.md).
41
- 15. Required Functional evidence is missing or invalid ->
42
- [functional-grilling](functional-grilling.md).
43
- 16. Target depth is `Functional` -> [return-target](return-target.md).
44
- 17. A selected Technical Story is not the distinct projected Story of one
45
- selected accepted Functional child -> [handback](handback.md), with zero
46
- mutation intent.
47
- 18. Accepted Technical evidence lacks stable projected Task identities, exact
48
- parent and `V*` membership, or an exact `write-backlog` full-reachable Task
49
- graph validation bound to the current provider snapshot and milestone-order
50
- readback ->
51
- [reconcile](reconcile.md).
52
- 19. Any selected Story lacks valid Technical evidence ->
53
- [technical-grilling](technical-grilling.md).
54
- 20. Target depth is `Technical` -> [return-target](return-target.md).
55
- 21. Any other state -> [handback](handback.md).
10
+ 1. Unsupported intake lens, explicit steering state, ambiguous Fog identity,
11
+ conflicting immutable-lens evidence, duplicate child identity, ambiguous child choice,
12
+ unsupported support kind, or projection above the wrapper ceiling ->
13
+ [handback](handback.md).
14
+ 2. No exact Fog readback -> [ensure-fog](ensure-fog.md).
15
+ 3. One unresolved Research child -> [research](research.md).
16
+ 4. One unresolved Prototype child -> [prototype](prototype.md).
17
+ 5. Accepted optional projection intent lacks final readback ->
18
+ [reconcile](reconcile.md).
19
+ 6. The wrapper's bounded result is ready ->
20
+ [return-target](return-target.md).
21
+ 7. Otherwise -> [grilling](grilling.md).
56
22
 
57
- Exactly one route is legal. A suggested route never breaks precedence. No route
58
- marks the Fog complete.
23
+ Reuse and create decisions both enter the Grilling or support gate. The selected
24
+ gate reads the evidence-backed decision and performs only that action. Genuine
25
+ ambiguity reaches `human_steering_required` before any creation request.
59
26
 
60
27
  ## Output
61
28
 
62
- Persist the selected gate or exact checkpoint, blocked, or terminal outcome in
63
- the runtime handoff. A selected gate owns the next write; the router owns no
64
- provider mutation.
29
+ Persist the selected gate or terminal outcome in the runtime handoff. The
30
+ router performs no provider mutation and makes no Fog-completion claim.
@@ -2,37 +2,36 @@
2
2
 
3
3
  ## Inputs
4
4
 
5
- - target depth: exactly `Business`, `Functional`, or `Technical`
6
- - request and accepted audience-specific context
7
- - optional stable provider Fog identity or durable wiki Fog identity
8
- - wrapper presentation profile
5
+ - intake lens: exactly `Business` or `Functional`
6
+ - the invoking wrapper's audience and intake profile
7
+ - projection ceiling: `Initiative` for Business or `Epic` for Functional
8
+ - one product request
9
+ - optional exact provider or durable wiki Fog identity
9
10
  - optional durable runtime-handoff locator
10
11
 
11
- The invoking wrapper stays in control while loading this engine. It supplies no
12
- route, lifecycle state, or provider mutation instructions.
12
+ Invocation is explicit and human-selected. The wrapper stays in control while
13
+ loading the engine and supplies no lifecycle state or provider mechanics.
13
14
 
14
- ## Shared Invariants
15
+ ## Shared invariants
15
16
 
16
17
  - One invocation creates or resumes exactly one Fog.
17
- - Fog is lateral provenance, never a parent in the product hierarchy.
18
- - One Fog owns exactly one Business grilling child, one or more Functional
19
- children, and one Technical child per Story.
20
- - Research and Prototype are direct Fog children that support named grilling
21
- children. They cannot authorize backlog projection.
22
- - Current provider and immutable evidence defeat stale artifacts and route
23
- suggestions.
24
- - Functional or Technical depth may adopt an exact existing Product Area ->
25
- Initiative -> Epic path only after the human accepts `reuse-unchanged`; the
26
- engine still persists one exact Business child and immutable resolution.
27
- - Ambiguous identity or conflicting accepted evidence produces zero writes and
28
- routes to human steering.
29
- - Reaching target depth returns control without completing the Fog.
18
+ - A new Fog records its immutable original intake lens. Either wrapper may
19
+ later resume that Fog while preserving the recorded lens unchanged; the lens
20
+ is provenance, not maturity or a route gate.
21
+ - A Fog may own several generic `Kind/grilling` children plus direct Research
22
+ and Prototype children that support a named Grilling child.
23
+ - Current evidence decides whether an obviously relevant support child is
24
+ reused or separate useful work is created. Genuine ambiguity requests human
25
+ steering with zero duplicate creation.
26
+ - Research and Prototype return durable evidence or verdicts. They cannot
27
+ accept product direction or authorize provider projection independently.
28
+ - Optional structure stays within the invoking wrapper's projection ceiling.
29
+ - Historical staged records remain compatibility evidence, not a current gate.
30
+ - A bounded return gives control back without asserting that the Fog is
31
+ resolved or complete.
30
32
 
31
33
  ## Return
32
34
 
33
- Return the stable Fog identities, target depth reached, accepted stage child
34
- identities and immutable resolution pointers, created-or-enriched provider
35
- object identities from exact readback, unresolved support evidence, and the
36
- durable handoff locator. Business returns exactly one Business child;
37
- Functional returns one or more Functional children selected for this
38
- invocation; Technical returns exactly one Technical child per selected Story.
35
+ Return exact Fog identity, immutable intake lens, generic support-child
36
+ identities and retained evidence, optional structure readback within the
37
+ ceiling, unresolved decisions, and the durable handoff locator.
@@ -1,22 +1,14 @@
1
1
  # Root Routing Boundary
2
2
 
3
- Finder entry is human-only. Root guidance may explain the three choices and
4
- return an exact explicit invocation, then stops:
5
-
6
- - `$business-finder` for Business depth.
7
- - `$functional-finder` for cumulative Business and Functional depth.
8
- - `$technical-finder` for cumulative Business, Functional, and Technical depth.
9
-
10
- Root or model routing never starts a Finder wrapper or `finder-phase`.
11
- `finder-phase` is the wrappers' shared direct-composition engine and internal
12
- resume target.
13
-
14
- Unclear requirements inside accepted bounded scope remain requirements work.
15
- Accepted specs, issues, or plans remain delivery work. Runtime failures remain
16
- debugging work. Docs learning after proven changes remains docs-ingest work.
17
-
18
- Review requests persist the bounded target and accepted-bounds context, then
19
- point the operator to the exact explicit `$review-phase` invocation.
20
- `finder-phase`, root routing, and `delivery-phase` never invoke, delegate to, or
21
- model-select `review-phase`. They may only persist its input context, return the
22
- exact explicit `$review-phase` instruction, and stop.
3
+ Route into Finder only after a human explicitly invokes `business-finder` or
4
+ `functional-finder`. Neither model inference nor a historical Stage chooses a
5
+ wrapper. Both wrappers directly compose this engine.
6
+
7
+ Finder returns to its invoking wrapper at the bounded result. Requirements
8
+ Phase is independently invocable and owns any later requirements closure,
9
+ specification compilation, and delivery-depth backlog projection.
10
+
11
+ Review requests persist their target and return the exact explicit `$review-phase` invocation
12
+ to the human. Finder may preserve that context, but
13
+ it must never invoke, delegate to, or
14
+ model-select `review-phase`.
@@ -1,10 +1,8 @@
1
1
  # Runtime Handoff
2
2
 
3
3
  Store the current record at
4
- `.devpunks/finder-phase/handoffs/<durable-wiki-fog-id>.md`. Before provider
5
- creation, allocate that durable wiki identity once and use it for every retry.
6
- After exact provider readback, add the stable provider Fog identity without
7
- replacing the wiki identity.
4
+ `.devpunks/finder-phase/handoffs/<durable-wiki-fog-id>.md`. Allocate the durable
5
+ wiki identity once before provider creation and retain it across retries.
8
6
 
9
7
  ```text
10
8
  Phase:
@@ -17,46 +15,26 @@ UI Evidence:
17
15
  Next suggested route:
18
16
  Blockers:
19
17
  Resume identity:
20
-
21
- Finder target depth:
22
18
  Durable wiki Fog identity:
23
19
  Provider Fog identity:
24
20
  Provider snapshot identity:
21
+ Immutable original intake lens:
25
22
  Selected gate or outcome:
26
- Stage child identities:
27
- Immutable resolution pointers:
28
- Business path identities:
29
- Business path decision:
30
- Intended projection:
31
- Exact readback identities:
32
- Business hierarchy readback:
33
- Functional Story placement readback:
34
- Technical Task graph readback:
35
- Technical Task graph validator result:
36
- Support evidence:
37
- Checkpoint or blocker:
23
+ Generic Grilling child identities:
24
+ Support child identities and supported-child relations:
25
+ Immutable evidence or verdict pointers:
26
+ Projection ceiling:
27
+ Intended optional projection:
28
+ Exact optional projection readback:
29
+ Unresolved decisions:
38
30
  Last verified at:
39
31
  ```
40
32
 
41
- Discover by exact durable wiki or provider Fog identity. Conflicting valid
42
- records for one identity are `human_steering_required`. `Suggested route` is
43
- advisory; the router always recomputes from fresh evidence.
44
-
45
- `Finder state` is the workflow-specific domain-state field. `UI Evidence` is
46
- optional and records any retained `$show-me` artifact. `Next suggested route`
47
- is advisory.
48
-
49
- Each gate updates only fields it proves. Preserve prior exact identities and
50
- immutable pointers. Record checkpoint, blocked, skip, target-return, and
51
- `human_steering_required` outcomes before stopping.
33
+ Discover the handoff by exact durable wiki or provider Fog identity. Conflicting
34
+ valid records for one identity route to `human_steering_required`. Current
35
+ evidence may supersede `Next suggested route`.
52
36
 
53
- Business hierarchy readback names the exact Product Area, Initiative, and Epic
54
- identities plus exact parent membership. Functional Story placement readback
55
- names the Story, parent Epic, contextual `V*` milestone, exact milestone
56
- membership, and exact Fog and source links. Technical Task graph readback names
57
- each Task, its parent Story, the same `V*` milestone as that Story, and the exact
58
- provider snapshot. Technical Task graph validator result preserves the
59
- successful `write-backlog/validate-task-blocker-graph` result over every
60
- reachable Story and Task, the resolved milestone-order readback, and its bound
61
- provider snapshot identity. It covers every returned Task and outgoing edge;
62
- connected blockers may live under other Stories or Epics.
37
+ Each gate updates only the fields it proves. Preserve prior exact identities,
38
+ the immutable original intake lens, and retained evidence pointers. Record every
39
+ blocked, skipped, checkpoint, bounded-return, and human-steering outcome before
40
+ stopping.