@punks/cli 3.3.6 → 4.0.0

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 (127) hide show
  1. package/dist/BASELINE_CHANGELOG.md +10 -2
  2. package/dist/CHANGELOG.md +14 -0
  3. package/dist/baseline/scaffold-baseline/baseline.json +5 -5
  4. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +3 -0
  5. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +24 -0
  6. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/docs-onboarding/SKILL.md +20 -4
  7. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/SKILL.md +14 -9
  8. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/backlog-sync.md +61 -29
  9. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-plan/references/plan-schema.md +25 -6
  10. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/SKILL.md +10 -4
  11. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/readiness.md +4 -0
  12. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/SKILL.md +20 -1
  13. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/implement-spec/references/lifecycle.md +20 -3
  14. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/wayfinder/SKILL.md +13 -36
  15. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +42 -26
  16. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +80 -97
  17. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +93 -96
  18. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +43 -52
  19. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +70 -136
  20. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/backlog-initialization.md +88 -0
  21. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/business-projection.md +31 -0
  22. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/delivery-status.md +66 -0
  23. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/fog-intake.md +72 -0
  24. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/functional-projection.md +27 -0
  25. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/issue-reconciliation.md +76 -0
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/normalization.md +105 -0
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/project-context.md +43 -0
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/github.md +168 -0
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/linear.md +190 -0
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/technical-projection.md +65 -0
  31. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +137 -0
  32. package/dist/baseline/scaffold-baseline/skills/phases/business-finder/SKILL.md +30 -0
  33. package/dist/baseline/scaffold-baseline/skills/phases/business-finder/agents/openai.yaml +2 -0
  34. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/backlog.md +10 -3
  35. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/closeout.md +12 -0
  36. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/implement.md +21 -0
  37. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +8 -0
  38. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/references/artifact-state.md +18 -3
  39. package/dist/baseline/scaffold-baseline/skills/phases/design-phase/phases/backlog.md +9 -1
  40. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/AUTHORING-HANDOFF.md +276 -0
  41. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/SKILL.md +43 -51
  42. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/agents/openai.yaml +1 -1
  43. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/adopt-business-path.md +52 -0
  44. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/business-grilling.md +68 -0
  45. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/ensure-fog.md +43 -0
  46. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/functional-grilling.md +53 -0
  47. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/handback.md +36 -0
  48. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/prototype.md +40 -0
  49. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/reconcile.md +52 -0
  50. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/research.md +38 -0
  51. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/return-target.md +42 -0
  52. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/router.md +64 -0
  53. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/technical-grilling.md +67 -0
  54. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/entrypoint-contract.md +38 -0
  55. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/root-routing.md +14 -27
  56. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/runtime-handoff.md +62 -0
  57. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/state-graph.md +60 -0
  58. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/scripts/finder-contract.mjs +383 -0
  59. package/dist/baseline/scaffold-baseline/skills/phases/functional-finder/SKILL.md +78 -0
  60. package/dist/baseline/scaffold-baseline/skills/phases/functional-finder/agents/openai.yaml +2 -0
  61. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/SKILL.md +74 -0
  62. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/agents/openai.yaml +2 -0
  63. package/dist/baseline/scaffold-baseline.json +5 -5
  64. package/dist/baseline/scaffold-baseline.tgz +0 -0
  65. package/dist/index.js +6 -6
  66. package/dist/skills/agnostic/docs/docs-onboarding/SKILL.md +20 -4
  67. package/dist/skills/agnostic/planning/create-plan/SKILL.md +14 -9
  68. package/dist/skills/agnostic/planning/create-plan/references/backlog-sync.md +61 -29
  69. package/dist/skills/agnostic/planning/create-plan/references/plan-schema.md +25 -6
  70. package/dist/skills/agnostic/planning/create-spec/SKILL.md +10 -4
  71. package/dist/skills/agnostic/planning/create-spec/references/readiness.md +4 -0
  72. package/dist/skills/agnostic/planning/implement-spec/SKILL.md +20 -1
  73. package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +20 -3
  74. package/dist/skills/agnostic/planning/wayfinder/SKILL.md +13 -36
  75. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +42 -26
  76. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +80 -97
  77. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +93 -96
  78. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +43 -52
  79. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +70 -136
  80. package/dist/skills/agnostic/requirements/write-backlog/references/backlog-initialization.md +88 -0
  81. package/dist/skills/agnostic/requirements/write-backlog/references/business-projection.md +31 -0
  82. package/dist/skills/agnostic/requirements/write-backlog/references/delivery-status.md +66 -0
  83. package/dist/skills/agnostic/requirements/write-backlog/references/fog-intake.md +72 -0
  84. package/dist/skills/agnostic/requirements/write-backlog/references/functional-projection.md +27 -0
  85. package/dist/skills/agnostic/requirements/write-backlog/references/issue-reconciliation.md +76 -0
  86. package/dist/skills/agnostic/requirements/write-backlog/references/normalization.md +105 -0
  87. package/dist/skills/agnostic/requirements/write-backlog/references/project-context.md +43 -0
  88. package/dist/skills/agnostic/requirements/write-backlog/references/providers/github.md +168 -0
  89. package/dist/skills/agnostic/requirements/write-backlog/references/providers/linear.md +190 -0
  90. package/dist/skills/agnostic/requirements/write-backlog/references/technical-projection.md +65 -0
  91. package/dist/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +135 -0
  92. package/dist/skills/phases/business-finder/SKILL.md +30 -0
  93. package/dist/skills/phases/business-finder/agents/openai.yaml +2 -0
  94. package/dist/skills/phases/delivery-phase/phases/backlog.md +10 -3
  95. package/dist/skills/phases/delivery-phase/phases/closeout.md +12 -0
  96. package/dist/skills/phases/delivery-phase/phases/implement.md +21 -0
  97. package/dist/skills/phases/delivery-phase/phases/router.md +8 -0
  98. package/dist/skills/phases/delivery-phase/references/artifact-state.md +18 -3
  99. package/dist/skills/phases/design-phase/phases/backlog.md +9 -1
  100. package/dist/skills/phases/finder-phase/AUTHORING-HANDOFF.md +276 -0
  101. package/dist/skills/phases/finder-phase/SKILL.md +43 -51
  102. package/dist/skills/phases/finder-phase/agents/openai.yaml +1 -1
  103. package/dist/skills/phases/finder-phase/phases/adopt-business-path.md +52 -0
  104. package/dist/skills/phases/finder-phase/phases/business-grilling.md +68 -0
  105. package/dist/skills/phases/finder-phase/phases/ensure-fog.md +43 -0
  106. package/dist/skills/phases/finder-phase/phases/functional-grilling.md +53 -0
  107. package/dist/skills/phases/finder-phase/phases/handback.md +36 -0
  108. package/dist/skills/phases/finder-phase/phases/prototype.md +40 -0
  109. package/dist/skills/phases/finder-phase/phases/reconcile.md +52 -0
  110. package/dist/skills/phases/finder-phase/phases/research.md +38 -0
  111. package/dist/skills/phases/finder-phase/phases/return-target.md +42 -0
  112. package/dist/skills/phases/finder-phase/phases/router.md +64 -0
  113. package/dist/skills/phases/finder-phase/phases/technical-grilling.md +67 -0
  114. package/dist/skills/phases/finder-phase/references/entrypoint-contract.md +38 -0
  115. package/dist/skills/phases/finder-phase/references/root-routing.md +14 -27
  116. package/dist/skills/phases/finder-phase/references/runtime-handoff.md +62 -0
  117. package/dist/skills/phases/finder-phase/references/state-graph.md +60 -0
  118. package/dist/skills/phases/finder-phase/scripts/finder-contract.mjs +383 -0
  119. package/dist/skills/phases/functional-finder/SKILL.md +78 -0
  120. package/dist/skills/phases/functional-finder/agents/openai.yaml +2 -0
  121. package/dist/skills/phases/technical-finder/SKILL.md +74 -0
  122. package/dist/skills/phases/technical-finder/agents/openai.yaml +2 -0
  123. package/package.json +4 -2
  124. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/convergence.md +0 -39
  125. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/frontier-lifecycle.md +0 -76
  126. package/dist/skills/phases/finder-phase/references/convergence.md +0 -39
  127. package/dist/skills/phases/finder-phase/references/frontier-lifecycle.md +0 -76
@@ -1,55 +1,47 @@
1
1
  ---
2
2
  name: finder-phase
3
- description: Route loose oversized foggy work before requirements or delivery. Use when an idea is too large for one agent session, wrapped in fog, or needs backlog-native frontier shaping before requirements-phase.
3
+ description: Run the shared human-driven Finder engine at an explicit target depth.
4
+ disable-model-invocation: true
4
5
  ---
5
6
 
6
- # Finder Phase
7
-
8
- Harness phase wrapper for backlog-native frontier routing.
9
-
10
- Use this before `requirements-phase` when the work is too big or foggy to grill
11
- directly. Compose the lean `wayfinder` primitive and preserve a resumable map.
12
-
13
- ## Core Loop
14
-
15
- 1. Choose a destination and mode. In **chart mode**, repair the map and sharpen
16
- fog. In **work mode**, claim and execute exactly one frontier ticket.
17
- 2. Read the backlog root plus any resumable ticket and immutable evidence links.
18
- If provider state is unavailable, use docs as temporary evidence and say so.
19
- 3. Use `wayfinder` to compute the frontier and select one route.
20
- 4. In chart mode, use `write-backlog` only when provider mutation is in scope.
21
- In work mode, produce a claim and use `write-backlog` for its physical
22
- provider mutation before dispatching one bounded child flow.
23
- 5. Reconcile the child result semantically, repair invalidated scope, recompute
24
- the frontier, and use `$show-me` to present that frontier before returning
25
- the next route or completion state. The visual explains the living map; the
26
- backlog root remains authoritative.
27
-
28
- ## Always-Needed Rules
29
-
30
- - The backlog root is the living map; do not create a separate map issue.
31
- - `fog` is not delivery-eligible and is not a `SPEC.md` anchor.
32
- - A `fog` item records a frontier or uncertainty description. Once Finder can
33
- derive a precise question, graduate it into `grilling`, `research`, or
34
- `prototype`; the question belongs to that concrete item, not the fog intake.
35
- - Frontier tickets are open, unblocked, and unclaimed. Dependencies and claims
36
- use provider-native relations and assignment/state.
37
- - Child flows return immutable resolution pointers. Finder produces semantic
38
- claim/resolution outputs; `write-backlog` owns their provider writes. The phase does not infer a
39
- product decision from research or impersonate the human in grilling or
40
- prototyping.
41
- - `finder-phase` owns frontier lifecycle and root routing; `write-backlog` owns provider materialization.
42
-
43
- ## References
44
-
45
- - Frontier lifecycle: [references/frontier-lifecycle.md](references/frontier-lifecycle.md)
46
- - Convergence and resumption: [references/convergence.md](references/convergence.md)
47
- - Root routing: [references/root-routing.md](references/root-routing.md)
48
- - Backlog taxonomy and provider materialization: use the `write-backlog` skill.
49
-
50
- ## Completion Criteria
51
-
52
- - The frontier is represented as backlog-root state or as a temporary evidence-backed handoff when provider state is unavailable.
53
- - The destination, current mode, frontier, claims, and next route are explicit.
54
- - Any backlog writes were delegated to `write-backlog`.
55
- - The final handoff names the next skill or phase and any unresolved blocker.
7
+ # Finder Engine
8
+
9
+ One durable graph creates or resumes one Fog and advances it to the human's
10
+ chosen decision depth. The three Finder wrappers compose this engine directly;
11
+ they do not own lifecycle state.
12
+
13
+ ## Bootstrap
14
+
15
+ 1. Read [the direct-composition contract](references/entrypoint-contract.md).
16
+ 2. Read [the state and route model](references/state-graph.md) before deriving
17
+ any state.
18
+ 3. Read [the runtime handoff schema](references/runtime-handoff.md) before
19
+ discovering or updating a Finder handoff.
20
+ 4. Reconstruct current state from fresh Fog, child, relation, provider-object,
21
+ immutable-evidence, and runtime-handoff reads.
22
+ 5. Read [the Finder router](phases/router.md) on every entry and cold resume.
23
+ 6. Load exactly one gate selected by the router, or return its one checkpoint,
24
+ blocked, or terminal outcome.
25
+ 7. After the gate writes its durable handoff, stop or re-enter this bootstrap.
26
+
27
+ The router is the sole route authority. Gate files own executable work.
28
+ `write-backlog` is the sole provider mutation authority.
29
+
30
+ ## Gates
31
+
32
+ - [Ensure Fog](phases/ensure-fog.md)
33
+ - [Adopt exact Business path](phases/adopt-business-path.md)
34
+ - [Business grilling](phases/business-grilling.md)
35
+ - [Functional grilling](phases/functional-grilling.md)
36
+ - [Technical grilling](phases/technical-grilling.md)
37
+ - [Research support](phases/research.md)
38
+ - [Prototype support](phases/prototype.md)
39
+ - [Reconcile stage](phases/reconcile.md)
40
+ - [Return target depth](phases/return-target.md)
41
+ - [Human steering](phases/handback.md)
42
+
43
+ ## Runtime References
44
+
45
+ - [State and route model](references/state-graph.md)
46
+ - [Runtime handoff](references/runtime-handoff.md)
47
+ - [Root routing boundary](references/root-routing.md)
@@ -1,2 +1,2 @@
1
1
  policy:
2
- allow_implicit_invocation: true
2
+ allow_implicit_invocation: false
@@ -0,0 +1,52 @@
1
+ # Adopt Business Path Gate
2
+
3
+ ## Entry guard
4
+
5
+ Functional or Technical depth starts with no accepted Business child, exact
6
+ provider readback for one Product Area -> Initiative -> Epic path, and the
7
+ human's explicit `reuse-unchanged` decision.
8
+
9
+ ## Inputs
10
+
11
+ Exact Fog identity, exact hierarchy identities and readback, accepted
12
+ no-scope-change decision, current direct Business children, and wrapper
13
+ presentation profile.
14
+
15
+ ## Bounded action
16
+
17
+ 1. Read every direct Business child. Reuse one exact child or, when none
18
+ exists, allocate one durable Business child wiki identity and send its shell
19
+ ensure intent to `$write-backlog`. Require exact readback before adoption.
20
+ 2. Use `$show-me` to confirm the exact existing hierarchy and unchanged
21
+ business scope recorded by the human.
22
+ 3. Persist an immutable accepted Business resolution that names the exact path
23
+ identities and the `reuse-unchanged` decision. This gate runs no Business
24
+ grill.
25
+ 4. Emit the semantic Business projection intent for exact readback. The intent
26
+ binds the Fog and Business child to the existing path; it creates no new
27
+ Product Area, Initiative, or Epic.
28
+
29
+ ## Invariants
30
+
31
+ The exact path is evidence, not an implicit decision. This gate runs only after
32
+ the human accepts unchanged scope. Ambiguous or duplicate Business children,
33
+ hierarchy identities, or provider readbacks produce zero writes and route to
34
+ human steering. The immutable resolution and projection readback remain
35
+ mandatory before Functional progression.
36
+
37
+ ## Completion evidence
38
+
39
+ Exact Business child identity, immutable accepted resolution pointer, exact
40
+ Product Area -> Initiative -> Epic identities, explicit `reuse-unchanged`
41
+ decision, and semantic projection intent.
42
+
43
+ ## Declared exits
44
+
45
+ - `business_accepted` -> reconciliation.
46
+ - `human_steering_required` -> handback.
47
+ - `blocked` -> stop with missing evidence.
48
+
49
+ ## Durable handoff
50
+
51
+ Persist the Business child identity, immutable resolution pointer, exact path
52
+ readback, unchanged-scope decision, projection intent, and exit.
@@ -0,0 +1,68 @@
1
+ # Business Grilling Gate
2
+
3
+ ## Entry guard
4
+
5
+ One exact Fog exists and its Business grilling evidence is missing or invalid.
6
+
7
+ ## Inputs
8
+
9
+ Fog snapshot; project wiki; existing Product Areas, Initiatives, Epics, and
10
+ milestones; accepted project language; wrapper presentation profile.
11
+
12
+ ## Bounded action
13
+
14
+ 1. Read all direct Business-stage children before ensuring one. Resume reuses
15
+ the exact child and its durable wiki/provider identities.
16
+ 2. When none exists, allocate and persist one durable Business grilling-child
17
+ wiki identity. Authorize its child shell by the exact Fog identity, Stage
18
+ `Business`, and singleton cardinality key. Send that child-shell ensure
19
+ intent to `$write-backlog` and require exact readback before grilling. This
20
+ ensure does not require accepted grilling evidence. Ambiguity or duplicate
21
+ child identity produces zero writes and routes to human steering.
22
+ 3. Read the relevant existing Product Areas, Initiatives, Epics, milestones,
23
+ and their stable identities before proposing structure.
24
+ 4. Use `$show-me` to visualize all relevant existing Product Areas, Initiatives,
25
+ Epics, and milestones together with the proposed impact. If the request
26
+ crosses a Product Area or Initiative boundary, show the split and stop at
27
+ `scope-expansion-checkpoint` for an explicit split-or-proceed choice.
28
+ 5. Activate atomic `$grilling` on the ensured Business child. Use `$wait-what`
29
+ language whenever the request, project term, outcome, boundary, or proposed
30
+ placement does not land: pause, repitch plainly in project language, and ask
31
+ again.
32
+ 6. Settle why the request matters, target user or stakeholder, intended product
33
+ outcome, boundaries/non-goals, durable constraints, and the exact existing
34
+ or proposed Product Area -> Initiative -> Epic path.
35
+ 7. Prefer stable-identity reuse and enrichment. A new Product Area, Initiative,
36
+ or Epic is a scope-expansion proposal, never a title-only default. Existing
37
+ Product Areas and Initiatives may be changed after the required structural
38
+ preview and approval. Never duplicate an Initiative.
39
+ 8. Persist the immutable accepted resolution for that child. Only then emit one
40
+ semantic Business projection intent for reconciliation.
41
+
42
+ ## Invariants
43
+
44
+ This gate uses `$grilling`, not `$requirements-grill`. It asks no implementation
45
+ architecture questions. Fog stays lateral and records every object enriched or
46
+ proposed. Creating the child shell does not require accepted grilling evidence.
47
+ Resume reuses the exact child; ambiguity or duplicate identity produces zero
48
+ writes and routes to human steering.
49
+
50
+ ## Completion evidence
51
+
52
+ Exactly one Business child, accepted immutable resolution pointer, stable
53
+ resolved hierarchy identities or approved proposals, and one semantic
54
+ projection intent.
55
+
56
+ ## Declared exits
57
+
58
+ - `business_accepted` -> reconciliation.
59
+ - `support_required` -> Research or Prototype through router re-entry.
60
+ - `scope-expansion-checkpoint` -> persist the exact decision and stop.
61
+ - `human_steering_required` -> handback.
62
+ - `blocked` -> stop with missing evidence.
63
+
64
+ ## Durable handoff
65
+
66
+ Persist durable child wiki/provider identities before the grill, then its
67
+ accepted evidence pointer, support relations, hierarchy identities, decision
68
+ checkpoints, projection intent, and exit.
@@ -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.