@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
@@ -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.
@@ -1,60 +1,38 @@
1
1
  # Finder State Graph
2
2
 
3
- ## Evidence Authority
3
+ ## Evidence authority
4
4
 
5
- 1. Current direct provider, repository, and wiki evidence.
6
- 2. Fresh workflow-native artifacts and immutable resolution pointers.
7
- 3. Valid committed runtime handoff.
8
- 4. Suggested route.
5
+ 1. Current direct evidence: exact provider objects, relations, immutable
6
+ evidence, and the human's current decision.
7
+ 2. Fresh workflow-native artifacts within the current Fog scope.
8
+ 3. A committed runtime handoff consistent with current evidence.
9
+ 4. A suggested route, which is advisory only.
9
10
 
10
- The first admissible signal wins. Stale, invalid, ambiguous, or out-of-scope
11
- evidence cannot satisfy a gate.
11
+ Stale, out-of-scope, ambiguous, or conflicting evidence satisfies no positive
12
+ guard. Recompute from this order on every entry and cold resume.
12
13
 
13
14
  ## Topology
14
15
 
15
16
  ```text
16
17
  ensure-fog
17
- -> (business-grilling <-> research | prototype) | adopt-business-path
18
- -> reconcile
19
- -> return-target [Business]
20
- -> functional-grilling <-> research | prototype
21
- -> reconcile
22
- -> return-target [Functional]
23
- -> technical-grilling per Story <-> research | prototype
24
- -> reconcile
25
- -> return-target [Technical]
26
-
27
- any identity or authority conflict -> handback -> human_steering_required
28
- scope boundary expansion -> scope-expansion-checkpoint -> router re-entry
18
+ -> grilling <-> research | prototype
19
+ -> optional reconcile
20
+ -> bounded return
21
+
22
+ identity, lens, selection, or ceiling conflict
23
+ -> handback -> human_steering_required
29
24
  ```
30
25
 
31
- `adopt-business-path` is available only for Functional or Technical depth when
32
- the human supplies exact provider readback for one Product Area -> Initiative
33
- -> Epic path and accepts `reuse-unchanged`. It creates the required Business
34
- child and immutable resolution without a Business grill, then rejoins normal
35
- reconciliation.
36
-
37
- `return-target` is successful return from this invocation, not Fog completion.
38
- The Fog remains open until separate production evidence covers all accepted
39
- resulting Stories and Tasks.
40
-
41
- ## State Evidence
42
-
43
- For each stage, record `missing`, `active`, `accepted`, or `invalid`; its exact
44
- child identity; immutable resolution pointer; supported-by relations; intended
45
- semantic projection; and exact provider readback. Accepted state without an
46
- exact child identity or immutable pointer is an authority conflict. Business
47
- completion requires exactly one valid Business child from the fresh complete
48
- direct-child collection and exact Product Area -> Initiative -> Epic identity
49
- and hierarchy readback. Functional completion requires each Story's exact
50
- parent Epic, contextual `V*` milestone membership, and Fog/source links. Every
51
- selected Technical Story must equal the distinct projected Story of one
52
- selected accepted Functional child. Technical completion also requires every
53
- Task to retain its Story milestone and the exact successful result of
54
- `write-backlog`'s provider-neutral validator over the full reachable Task
55
- graph, resolved milestone order, and current provider snapshot. The result must
56
- cover every projected Task and outgoing edge. It rejects future-iteration,
57
- self, missing-target, duplicate, and cyclic edges while preserving valid
58
- same-or-earlier-milestone blockers across Stories and Epics. Invalid stage
59
- evidence routes to that stage again. Accepted evidence without readback routes
60
- to reconciliation.
26
+ One Fog retains its immutable original Business or Functional intake lens.
27
+ Generic Grilling children have no fixed count and no staged ordering. Research
28
+ and Prototype are direct Fog children linked to the Grilling child they support.
29
+
30
+ The wrapper decides whether optional structure is useful and supplies the
31
+ ceiling. Business permits Product Area and Initiative. Functional permits that
32
+ Business structure plus Epic. Missing or unresolved optional projection never
33
+ invalidates an otherwise valid Fog return.
34
+
35
+ Historical Business, Functional, or Technical Stage fields remain read-only
36
+ compatibility evidence and are not a current gate, prerequisite, or migration
37
+ trigger. On bounded return the Fog remains open; delivery evidence owns later
38
+ completion truth.