@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,43 @@
1
+ # Ensure Fog Gate
2
+
3
+ ## Entry guard
4
+
5
+ Target depth is valid and no exact Fog readback exists.
6
+
7
+ ## Inputs
8
+
9
+ Request, repository/wiki identity, optional stable Fog identity, fresh provider
10
+ search, and current runtime handoff.
11
+
12
+ ## Bounded action
13
+
14
+ 1. If an identity was supplied, read that exact Fog, direct children,
15
+ relations, resolution pointers, and provider objects.
16
+ 2. Otherwise allocate one durable wiki Fog identity, persist it once, and search
17
+ by that identity before proposing a create.
18
+ 3. On zero exact matches, send one semantic Fog upsert intent with the durable
19
+ wiki identity to `$write-backlog`; consume its exact readback.
20
+ 4. On one exact match, resume it. On ambiguity or conflicting identity, emit no
21
+ mutation intent and route to human steering.
22
+
23
+ ## Invariants
24
+
25
+ Exactly one Fog is in scope. The Fog remains lateral provenance. This gate
26
+ contains no provider mechanics and never creates a grilling child.
27
+
28
+ ## Completion evidence
29
+
30
+ One durable wiki identity, zero or one stable provider identity before the
31
+ write, exactly one provider Fog read back afterward, plus its current child and
32
+ relation snapshot.
33
+
34
+ ## Declared exits
35
+
36
+ - `fog_ready` -> router re-entry.
37
+ - `human_steering_required` -> handback.
38
+ - `blocked` -> stop with missing provider/wiki evidence.
39
+
40
+ ## Durable handoff
41
+
42
+ Persist both Fog identities, readback identity, snapshot, exit, and evidence
43
+ freshness under the durable wiki Fog identity.
@@ -0,0 +1,53 @@
1
+ # Functional Grilling Gate
2
+
3
+ ## Entry guard
4
+
5
+ Target depth includes Functional and accepted Business projection readback
6
+ exists, while one required Functional child is missing or invalid.
7
+
8
+ ## Inputs
9
+
10
+ Exact Fog and Business evidence, resolved hierarchy identities, selected Story
11
+ intent, current Functional children, and wrapper presentation profile.
12
+
13
+ ## Bounded action
14
+
15
+ 1. Read every Functional-stage child matching the selected Story intent. Resume
16
+ reuses the exact child and its durable wiki/provider identities.
17
+ 2. When none exists, allocate and persist one durable Functional grilling-child
18
+ wiki identity. Authorize its child shell by the exact Fog identity, Stage
19
+ `Functional`, and stable Story-intent key. Send that child-shell ensure intent
20
+ to `$write-backlog` and require exact readback before grilling. This ensure
21
+ does not require accepted grilling evidence. Ambiguity or duplicate child
22
+ identity for that Story intent produces zero writes and routes to human
23
+ steering.
24
+ 3. Activate atomic `$grilling` on the ensured Functional child using the
25
+ wrapper's presentation profile.
26
+ 4. Persist the immutable accepted resolution for that child. Only then emit one
27
+ semantic Story projection intent for reconciliation.
28
+
29
+ ## Invariants
30
+
31
+ One Functional child maps to one Story intent. Accepted Business scope is
32
+ reused. This gate neither requires implementation architecture nor writes a
33
+ provider. Creating the child shell does not require accepted grilling evidence.
34
+ Resume reuses the exact child; ambiguity or duplicate identity produces zero
35
+ writes and routes to human steering.
36
+
37
+ ## Completion evidence
38
+
39
+ Stable Functional child identity, immutable accepted resolution pointer, and
40
+ semantic Story projection intent.
41
+
42
+ ## Declared exits
43
+
44
+ - `functional_accepted` -> reconciliation.
45
+ - `support_required` -> Research or Prototype through router re-entry.
46
+ - `human_steering_required` -> handback.
47
+ - `blocked` -> stop with missing evidence.
48
+
49
+ ## Durable handoff
50
+
51
+ Persist the stable Story-intent key and durable child wiki/provider identities
52
+ before the grill, then the resolution pointer, support relations, projection
53
+ intent, and exit.
@@ -0,0 +1,36 @@
1
+ # Human Steering Gate
2
+
3
+ ## Entry guard
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.
12
+
13
+ ## Bounded action
14
+
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.
22
+
23
+ ## Completion evidence
24
+
25
+ Durable `$handback` outcome, exact missing authority or decision, and proof that
26
+ no mutation was requested after conflict detection.
27
+
28
+ ## Declared exits
29
+
30
+ - `human_steering_required` -> terminal non-success state.
31
+ - `authority_guard_passed` -> router re-entry with the new human decision.
32
+
33
+ ## Durable handoff
34
+
35
+ Persist the complete `$handback` outcome, conflict evidence, required decision,
36
+ and terminal state.
@@ -0,0 +1,40 @@
1
+ # Prototype Support Gate
2
+
3
+ ## Entry guard
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.
12
+
13
+ ## Bounded action
14
+
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
21
+
22
+ A Prototype verdict informs its named grilling child. It cannot independently
23
+ authorize backlog projection.
24
+
25
+ ## Completion evidence
26
+
27
+ Stable Prototype child identity, supported-child relation, human verdict,
28
+ immutable artifact/verdict pointers, and exact child/relation readback.
29
+
30
+ ## Declared exits
31
+
32
+ - `support_resolved` -> reconciliation then router re-entry.
33
+ - `iterate` -> remain in this gate after durable handoff.
34
+ - `human_steering_required` -> handback.
35
+ - `blocked` -> stop with missing retained evidence.
36
+
37
+ ## Durable handoff
38
+
39
+ Persist Prototype identity, supported child, verdict pointers, readback, and
40
+ exit.
@@ -0,0 +1,52 @@
1
+ # Reconcile Stage Gate
2
+
3
+ ## Entry guard
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.
12
+
13
+ ## Bounded action
14
+
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.
33
+
34
+ ## Completion evidence
35
+
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.
40
+
41
+ ## Declared exits
42
+
43
+ - `stage_reconciled` -> router re-entry.
44
+ - `support_reconciled` -> owning grilling gate through router re-entry.
45
+ - `approval_required` -> persist checkpoint and stop.
46
+ - `human_steering_required` -> handback.
47
+ - `blocked` -> stop with missing readback.
48
+
49
+ ## Durable handoff
50
+
51
+ Persist intent identity, all exact readback identities and relations, provider
52
+ snapshot, checkpoint or blocker, and exit.
@@ -0,0 +1,38 @@
1
+ # Research Support Gate
2
+
3
+ ## Entry guard
4
+
5
+ The active grilling child records one precise unknown answerable by readonly
6
+ investigation and no fresh retained answer exists.
7
+
8
+ ## Inputs
9
+
10
+ Exact Fog, supported grilling child identity, precise question, scope, and
11
+ prior research children/evidence.
12
+
13
+ ## Bounded action
14
+
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
21
+
22
+ Research reports facts and cannot accept product direction or authorize backlog
23
+ projection.
24
+
25
+ ## Completion evidence
26
+
27
+ Stable Research child identity, supported-child relation, immutable report SHA
28
+ and path, and exact child/relation readback.
29
+
30
+ ## Declared exits
31
+
32
+ - `support_resolved` -> reconciliation then router re-entry.
33
+ - `human_steering_required` -> handback.
34
+ - `blocked` -> stop with missing retained evidence.
35
+
36
+ ## Durable handoff
37
+
38
+ Persist Research identity, supported child, report pointer, readback, and exit.
@@ -0,0 +1,42 @@
1
+ # Return Target Gate
2
+
3
+ ## Entry guard
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.
13
+
14
+ ## Bounded action
15
+
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
21
+
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.
26
+
27
+ ## Completion evidence
28
+
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.
33
+
34
+ ## Declared exits
35
+
36
+ - `target_depth_reached` -> return control to the invoking human wrapper.
37
+ - `blocked` -> router re-entry when required evidence is incomplete.
38
+
39
+ ## Durable handoff
40
+
41
+ Persist the returned identities, target depth, remaining accepted scope,
42
+ production-evidence obligations, and exact return outcome.
@@ -0,0 +1,64 @@
1
+ # Finder Router
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.
7
+
8
+ ## Route Precedence
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).
56
+
57
+ Exactly one route is legal. A suggested route never breaks precedence. No route
58
+ marks the Fog complete.
59
+
60
+ ## Output
61
+
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.
@@ -0,0 +1,67 @@
1
+ # Technical Grilling Gate
2
+
3
+ ## Entry guard
4
+
5
+ Target depth is Technical, Functional projection readback exists, and the
6
+ selected Story lacks valid Technical evidence.
7
+
8
+ ## Inputs
9
+
10
+ Exact Fog, accepted Business and Functional evidence, one stable Story identity,
11
+ current Technical children, and wrapper presentation profile.
12
+
13
+ ## Bounded action
14
+
15
+ 1. Read every Technical-stage child for the selected Story. Resume reuses the
16
+ exact child and its durable wiki/provider identities.
17
+ 2. When none exists, allocate and persist one durable Technical grilling-child
18
+ wiki identity. Authorize its child shell by the exact Fog identity, Stage
19
+ `Technical`, and stable Story identity. Send that child-shell ensure intent
20
+ to `$write-backlog` and require exact readback before technical grilling.
21
+ This ensure does not require accepted grilling evidence. Ambiguity or
22
+ duplicate child identity for the Story produces zero writes and routes to
23
+ human steering.
24
+ 3. Activate one full `$requirements-grill` on the ensured Technical child for
25
+ this Story. The requirements authority owns technical decision closure.
26
+ 4. Persist the immutable accepted resolution for that Technical child.
27
+ 5. Invoke `$create-spec` with the Story identity and accepted Business,
28
+ Functional, and Technical evidence.
29
+ 6. Require a returned SPEC with `readiness: agent-ready` and a verified stable
30
+ blob URL before continuing.
31
+ 7. Derive a nonempty Task intent containing at least one atomic Task and its
32
+ blocker relationships from that authoritative SPEC.
33
+ 8. Only then emit one semantic technical projection intent to `$write-backlog`
34
+ for exact Task and relation readback. Require its successful
35
+ `validate-task-blocker-graph` result over the full reachable graph, resolved
36
+ milestone order, and resulting provider snapshot.
37
+
38
+ ## Invariants
39
+
40
+ This gate owns stage identity, ordering, and resume. The requirements authority
41
+ owns technical decisions, `$create-spec` owns compilation, and `$write-backlog`
42
+ owns provider mutation. `spec-not-ready` or missing verified stable blob returns
43
+ zero projection and zero target-depth return, then routes to human steering.
44
+ Empty Task intent does the same. Resume reuses the exact child; ambiguity or
45
+ duplicate identity produces zero writes and routes to human steering.
46
+
47
+ ## Completion evidence
48
+
49
+ One exact Technical child for the Story, immutable accepted resolution pointer,
50
+ agent-ready SPEC, verified stable blob URL, nonempty Task intent, semantic
51
+ projection intent, exact Task/relation readback, and the successful
52
+ full-reachable Task graph validator result bound to that provider snapshot.
53
+
54
+ ## Declared exits
55
+
56
+ - `technical_accepted` -> reconciliation.
57
+ - `support_required` -> Research or Prototype through router re-entry.
58
+ - `spec-not-ready` -> handback with zero projection.
59
+ - `task_intent_empty` -> handback with zero projection.
60
+ - `human_steering_required` -> handback.
61
+ - `blocked` -> stop with missing evidence.
62
+
63
+ ## Durable handoff
64
+
65
+ Persist Story and durable Technical child wiki/provider identities before the
66
+ grill, then the immutable resolution pointer, SPEC stable blob URL, readiness,
67
+ Task intent, support relations, projection/readback state, and exit.
@@ -0,0 +1,38 @@
1
+ # Direct-Composition Contract
2
+
3
+ ## Inputs
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
9
+ - optional durable runtime-handoff locator
10
+
11
+ The invoking wrapper stays in control while loading this engine. It supplies no
12
+ route, lifecycle state, or provider mutation instructions.
13
+
14
+ ## Shared Invariants
15
+
16
+ - 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.
30
+
31
+ ## Return
32
+
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.
@@ -1,35 +1,22 @@
1
- # Root Routing
1
+ # Root Routing Boundary
2
2
 
3
- ## Trigger
3
+ Finder entry is human-only. Root guidance may explain the three choices and
4
+ return an exact explicit invocation, then stops:
4
5
 
5
- Route to `finder-phase` before `requirements-phase` when a loose idea is too large for one agent session and still wrapped in fog.
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.
6
9
 
7
- Use this route when the first question is not "which requirement is unclear?"
8
- but "which concept and child flow can close this frontier?"
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.
9
13
 
10
- ## Placement In Root Guidance
11
-
12
- Keep root prompt guidance short:
13
-
14
- - Foggy oversized work routes to `finder-phase` first.
15
- - Unclear requirements inside a bounded topic route to `requirements-phase`.
16
- - Accepted specs, issues, or plans route to `delivery-phase`.
17
- - Runtime failures route to `debugging-phase`.
18
- - Review requests persist the bounded target and accepted-bounds context, then
19
- point the operator to the exact explicit `$review-phase` invocation.
20
- - Docs learning after proven changes routes to `docs-ingest-phase`.
21
-
22
- ## Boundary
23
-
24
- `finder-phase` should not replace:
25
-
26
- - `requirements-phase` for human decision closure inside a known topic.
27
- - `parallel-research` for split-friendly readonly investigation.
28
- - `prototype-phase` for human-evaluated artifact-driven learning.
29
- - `create-spec`, `create-plan`, or `delivery-phase` after implementation scope is accepted.
30
-
31
- It chooses the route and updates the frontier handoff.
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.
32
17
 
18
+ Review requests persist the bounded target and accepted-bounds context, then
19
+ point the operator to the exact explicit `$review-phase` invocation.
33
20
  `finder-phase`, root routing, and `delivery-phase` never invoke, delegate to, or
34
21
  model-select `review-phase`. They may only persist its input context, return the
35
22
  exact explicit `$review-phase` instruction, and stop.
@@ -0,0 +1,62 @@
1
+ # Runtime Handoff
2
+
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.
8
+
9
+ ```text
10
+ Phase:
11
+ Status: complete | blocked | skipped | checkpoint | human_steering_required
12
+ Scope:
13
+ Artifacts:
14
+ Validation:
15
+ Finder state:
16
+ UI Evidence:
17
+ Next suggested route:
18
+ Blockers:
19
+ Resume identity:
20
+
21
+ Finder target depth:
22
+ Durable wiki Fog identity:
23
+ Provider Fog identity:
24
+ Provider snapshot identity:
25
+ 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:
38
+ Last verified at:
39
+ ```
40
+
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.
52
+
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.
@@ -0,0 +1,60 @@
1
+ # Finder State Graph
2
+
3
+ ## Evidence Authority
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.
9
+
10
+ The first admissible signal wins. Stale, invalid, ambiguous, or out-of-scope
11
+ evidence cannot satisfy a gate.
12
+
13
+ ## Topology
14
+
15
+ ```text
16
+ 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
29
+ ```
30
+
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.