@punks/cli 4.0.1 → 4.0.3

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 (172) hide show
  1. package/dist/BASELINE_CHANGELOG.md +34 -0
  2. package/dist/CHANGELOG.md +24 -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 +2 -3
  6. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +8 -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/skills/agnostic/docs/docs-onboarding/SKILL.md +2 -2
  24. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/SKILL.md +32 -32
  25. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +7 -7
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/readiness.md +14 -13
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +26 -19
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/SKILL.md +2 -2
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/scripts/autoreview +3 -0
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/brainstorm/SKILL.md +12 -0
  31. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +2 -1
  32. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +9 -9
  33. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +43 -55
  34. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +68 -63
  35. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +26 -29
  36. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +5 -5
  37. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +1 -1
  38. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +2 -2
  39. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +1 -1
  40. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +2 -2
  41. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/business-projection.md +19 -24
  42. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/delivery-status.md +17 -13
  43. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/fog-intake.md +45 -48
  44. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/functional-projection.md +16 -21
  45. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/normalization.md +14 -14
  46. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/project-context.md +32 -27
  47. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/github.md +105 -150
  48. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/linear.md +111 -181
  49. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/technical-projection.md +51 -47
  50. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +49 -35
  51. package/dist/baseline/scaffold-baseline/skills/agnostic/research/parallel-research/DURABLE-REPORT.md +5 -12
  52. package/dist/baseline/scaffold-baseline/skills/agnostic/research/parallel-research/SKILL.md +7 -8
  53. package/dist/baseline/scaffold-baseline/skills/agnostic/security/architect-pipeline/SKILL.md +97 -0
  54. package/dist/baseline/scaffold-baseline/skills/agnostic/security/architect-pipeline/agents/openai.yaml +4 -0
  55. package/dist/baseline/scaffold-baseline/skills/agnostic/security/architect-pipeline/references/infrastructure-deployment.md +29 -0
  56. package/dist/baseline/scaffold-baseline/skills/agnostic/security/architect-pipeline/references/security-by-design.md +22 -0
  57. package/dist/baseline/scaffold-baseline/skills/agnostic/security/security-best-practices/references/javascript-typescript-vue-web-frontend-security.md +1 -1
  58. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/eas-update-insights/references/update-insights-schema.md +2 -6
  59. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/expo-skill-eval/SKILL.md +6 -7
  60. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/provider-upgrade/SKILL.md +10 -7
  61. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-best-practices/SKILL.md +19 -53
  62. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-component/SKILL.md +36 -88
  63. package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/references/best-practices.md +7 -1
  64. package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/templates/devtools-setup.tsx +4 -0
  65. package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/references/best-practices.md +7 -1
  66. package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/templates/devtools-setup.tsx +4 -0
  67. package/dist/baseline/scaffold-baseline/skills/languages/typescript/quality-types/SKILL.md +1 -3
  68. package/dist/baseline/scaffold-baseline/skills/phases/business-finder/SKILL.md +29 -16
  69. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +10 -8
  70. package/dist/baseline/scaffold-baseline/skills/phases/design-phase/phases/backlog.md +26 -17
  71. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
  72. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/SKILL.md +22 -25
  73. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
  74. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/grilling.md +40 -0
  75. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/handback.md +11 -18
  76. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/prototype.md +13 -21
  77. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/reconcile.md +21 -35
  78. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/research.md +13 -18
  79. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/return-target.md +14 -25
  80. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/router.md +22 -56
  81. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
  82. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/root-routing.md +12 -20
  83. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
  84. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/state-graph.md +27 -49
  85. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/scripts/finder-contract.mjs +40 -359
  86. package/dist/baseline/scaffold-baseline/skills/phases/functional-finder/SKILL.md +29 -62
  87. package/dist/baseline/scaffold-baseline/skills/phases/requirements-phase/SKILL.md +49 -13
  88. package/dist/baseline/scaffold-baseline.json +5 -5
  89. package/dist/baseline/scaffold-baseline.tgz +0 -0
  90. package/dist/data/hooks/format-edited-file.d.mts +21 -0
  91. package/dist/data/hooks/format-edited-file.mjs +588 -98
  92. package/dist/data/scripts/commit-gate-runner.mjs +103 -0
  93. package/dist/data/scripts/harness-projection/adapters/claude.mjs +1 -0
  94. package/dist/data/scripts/harness-projection/adapters/codex.mjs +1 -0
  95. package/dist/data/scripts/harness-projection/adapters/cursor.mjs +1 -0
  96. package/dist/data/scripts/harness-projection/adapters/opencode.mjs +1 -0
  97. package/dist/data/scripts/harness-projection/core.mjs +4 -0
  98. package/dist/data/scripts/harness-projection/test-fixtures/claude/actions.json +1 -0
  99. package/dist/data/scripts/harness-projection/test-fixtures/codex/actions.json +2 -1
  100. package/dist/data/scripts/harness-projection/test-fixtures/cursor/projection.json +1 -0
  101. package/dist/data/scripts/harness-projection/test-fixtures/opencode/projection.json +1 -0
  102. package/dist/index.js +73 -58
  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 +12 -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/agnostic/research/parallel-research/DURABLE-REPORT.md +5 -12
  132. package/dist/skills/agnostic/research/parallel-research/SKILL.md +7 -8
  133. package/dist/skills/agnostic/security/architect-pipeline/SKILL.md +97 -0
  134. package/dist/skills/agnostic/security/architect-pipeline/agents/openai.yaml +4 -0
  135. package/dist/skills/agnostic/security/architect-pipeline/references/infrastructure-deployment.md +29 -0
  136. package/dist/skills/agnostic/security/architect-pipeline/references/security-by-design.md +22 -0
  137. package/dist/skills/frameworks/pulumi/provider-upgrade/SKILL.md +10 -7
  138. package/dist/skills/frameworks/pulumi/pulumi-best-practices/SKILL.md +10 -42
  139. package/dist/skills/frameworks/pulumi/pulumi-component/SKILL.md +18 -58
  140. package/dist/skills/phases/business-finder/SKILL.md +29 -16
  141. package/dist/skills/phases/delivery-phase/phases/router.md +10 -8
  142. package/dist/skills/phases/design-phase/phases/backlog.md +26 -17
  143. package/dist/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
  144. package/dist/skills/phases/finder-phase/SKILL.md +22 -25
  145. package/dist/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
  146. package/dist/skills/phases/finder-phase/phases/grilling.md +40 -0
  147. package/dist/skills/phases/finder-phase/phases/handback.md +11 -18
  148. package/dist/skills/phases/finder-phase/phases/prototype.md +13 -21
  149. package/dist/skills/phases/finder-phase/phases/reconcile.md +21 -35
  150. package/dist/skills/phases/finder-phase/phases/research.md +13 -18
  151. package/dist/skills/phases/finder-phase/phases/return-target.md +14 -25
  152. package/dist/skills/phases/finder-phase/phases/router.md +22 -56
  153. package/dist/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
  154. package/dist/skills/phases/finder-phase/references/root-routing.md +12 -20
  155. package/dist/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
  156. package/dist/skills/phases/finder-phase/references/state-graph.md +27 -49
  157. package/dist/skills/phases/finder-phase/scripts/finder-contract.mjs +44 -357
  158. package/dist/skills/phases/functional-finder/SKILL.md +29 -62
  159. package/dist/skills/phases/requirements-phase/SKILL.md +49 -13
  160. package/package.json +7 -5
  161. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
  162. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/business-grilling.md +0 -68
  163. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
  164. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
  165. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/SKILL.md +0 -74
  166. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/agents/openai.yaml +0 -2
  167. package/dist/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
  168. package/dist/skills/phases/finder-phase/phases/business-grilling.md +0 -68
  169. package/dist/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
  170. package/dist/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
  171. package/dist/skills/phases/technical-finder/SKILL.md +0 -74
  172. package/dist/skills/phases/technical-finder/agents/openai.yaml +0 -2
@@ -1,276 +1,66 @@
1
1
  # Finder Graph Authoring Handoff
2
2
 
3
- Mode: Convert the former chart/work lifecycle into the accepted Fog-child graph.
4
-
5
- ## Obligation Map
6
-
7
- | Obligation | Mandatory | Survives interruption | Evidence artifact | Owner | Audit criterion |
8
- | -------------------------- | --------- | --------------------- | ----------------------------------------------- | ------------------ | ------------------------------------------------------- |
9
- | Explicit human invocation | yes | yes | both `SKILL.md` files and OpenAI metadata | engine and wrapper | invocation flags agree |
10
- | One exact Fog | yes | yes | durable wiki identity, provider readback | ensure gate | create/resume cardinality is one |
11
- | One Business child | yes | yes | child identity and Stage readback | Business gate | ambiguity produces zero writes |
12
- | Deterministic resume | yes | yes | router, runtime handoff, provider snapshot | router | one route from current evidence |
13
- | Business decision depth | yes | yes | immutable resolution pointer | Business gate | atomic grill settles placement without technical policy |
14
- | Support cycles | yes | yes | Research/Prototype child and immutable evidence | support gates | support returns to its named grilling child |
15
- | Provider mutation boundary | yes | yes | semantic intent plus exact readback | reconciliation | all physical writes route through `write-backlog` |
16
- | Exact target return | yes | yes | `target_depth_reached` handoff | return gate | chosen depth returns without Fog completion |
17
-
18
- Survivor artifacts: stable wiki/provider Fog identities, exact child identities,
19
- immutable resolution pointers, provider snapshots/readbacks, support evidence,
20
- checkpoints, blockers, target depth, and terminal state.
21
-
22
- ## Phase: qualify
23
-
24
- Status: complete
25
-
26
- Scope: Finder engine and Business wrapper conversion.
27
-
28
- Artifacts: obligation map and survivor list above.
29
-
30
- Validation: The engine is multi-step, resumable, cyclic, and repairable, so the
31
- graph is mandatory. Only the three audience wrappers qualify for direct
32
- composition because each supplies one target/profile call into the graph and
33
- owns no resumable action.
34
-
35
- Domain state: All T2 obligations have an owner, evidence artifact, and audit
36
- criterion.
37
-
38
- Next suggested route: `model-state.md`
39
-
40
- Blockers: none
41
-
42
- Resume identity: canonical source tree at current working revision
43
-
44
- ## State Model
45
-
46
- | State | Scope | Entry guard | Exit guard | Next |
47
- | ----------------- | -------------------- | ---------------------------------- | ---------------------------- | ---------------------------------------- |
48
- | Fog absent | invocation | no exact readback | one exact Fog read back | Business or handback |
49
- | Business active | one Fog | Business evidence missing/invalid | accepted pointer plus intent | support, reconcile, checkpoint, handback |
50
- | Support active | named grilling child | precise support unknown | immutable report or verdict | reconcile or handback |
51
- | Stage accepted | one stage | immutable evidence exists | exact projection readback | target return or next depth |
52
- | Functional active | one Story intent | target includes Functional | accepted pointer plus intent | support, reconcile, handback |
53
- | Technical active | one Story | target is Technical | accepted pointer plus intent | support, reconcile, handback |
54
- | Target reached | invocation | all target evidence/readback fresh | durable return written | terminal return |
55
- | Human steering | conflict | admissible evidence cannot resolve | `$handback` guard passes | terminal or router re-entry |
56
-
57
- Graph forms: baseline depth path, target-depth branches, Research/Prototype
58
- cycles, accepted-stage reuse skips, structural approval checkpoint, blocked
59
- readback exit, and terminal handback are represented. Current evidence carries
60
- freshness, scope, identity, and validity guards.
61
-
62
- ## Phase: model-state
63
-
64
- Status: complete
65
-
66
- Scope: Runtime evidence states and topology.
67
-
68
- Artifacts: `references/state-graph.md`, router precedence, state table above.
69
-
70
- Validation: Every obligation reaches an evidence-backed state; every gate can
71
- reach `human_steering_required`; target return remains distinct from Fog
72
- completion.
73
-
74
- Domain state: No conversational-progress state is authoritative.
75
-
76
- Next suggested route: `define-authority.md`
77
-
78
- Blockers: none
79
-
80
- Resume identity: exact Fog wiki/provider identity when available
81
-
82
- ## Phase: define-authority
83
-
84
- Status: complete
85
-
86
- Scope: Evidence admissibility and route tie-breaks.
87
-
88
- Artifacts: `references/state-graph.md#evidence-authority` and
89
- `phases/router.md#route-precedence`.
90
-
91
- Validation: Current direct evidence outranks fresh workflow-native artifacts,
92
- which outrank the committed runtime handoff and suggested route. Human steering,
93
- identity conflict, Fog ensure, scope checkpoint, support, stage work,
94
- reconciliation, and target return have one declared precedence order. Stale,
95
- invalid, ambiguous, or out-of-scope evidence satisfies no positive gate.
96
-
97
- Domain state: All known overlaps resolve to one route; conflicting accepted
98
- identity routes to zero-write handback.
99
-
100
- Next suggested route: `write-router.md`
101
-
102
- Blockers: none
103
-
104
- Resume identity: current provider snapshot plus runtime handoff
105
-
106
- ## Phase: write-router
107
-
108
- Status: complete
109
-
110
- Scope: Finder bootstrap and runtime route selection.
111
-
112
- Artifacts: `SKILL.md`, `phases/router.md`, and
113
- `scripts/finder-contract.mjs`.
114
-
115
- Validation: Root contains bootstrap/pointers only. Router recomputes on cold
116
- resume, returns one gate/checkpoint/blocked/terminal outcome, names only flat
117
- phase files, and preserves the handback terminal. Human-only metadata remains
118
- unchanged.
119
-
120
- Domain state: Eleven required route classes plus identity-conflict variants are
121
- covered by the route fixture.
122
-
123
- Next suggested route: `write-phases.md`
124
-
125
- Blockers: none
126
-
127
- Resume identity: current target depth and Fog snapshot
128
-
129
- ## Phase: write-phases
130
-
131
- Status: complete
132
-
133
- Scope: Ten flat executable Finder gates.
134
-
135
- Artifacts: `phases/ensure-fog.md`, `adopt-business-path.md`, `business-grilling.md`,
136
- `functional-grilling.md`, `technical-grilling.md`, `research.md`,
137
- `prototype.md`, `reconcile.md`, `return-target.md`, and `handback.md`.
138
-
139
- Validation: Every gate declares entry guard, inputs, bounded action, invariants,
140
- completion evidence, exits, and durable handoff. Narrow executors return to the
141
- owning gate for reconciliation. Handback invokes `$handback` and persists only
142
- its declared terminal or guard-passed re-entry.
143
-
144
- Domain state: No executable gate body remains in root or references.
145
-
146
- Next suggested route: `define-handoffs.md`
147
-
148
- Blockers: none
149
-
150
- Resume identity: gate outcome plus exact evidence identities
151
-
152
- ## Phase: define-handoffs
153
-
154
- Status: complete
155
-
156
- Scope: Runtime persistence and discovery.
157
-
158
- Artifacts: `references/runtime-handoff.md` plus every gate's durable-handoff
159
- section.
160
-
161
- Validation: The schema preserves phase, status, scope, artifacts, validation,
162
- Finder state, optional UI evidence, suggestion, blockers, and resume identity.
163
- The durable wiki Fog identity discovers the record before provider creation;
164
- stable provider identity joins it after readback. Every declared exit writes a
165
- checkpoint, blocker, skip, target return, or human-steering outcome.
166
-
167
- Domain state: Suggestions remain advisory and current evidence can supersede
168
- them. The handoff retains only exact identities/pointers and irreducible route
169
- state.
170
-
171
- Next suggested route: `verify-disclosure.md`
172
-
173
- Blockers: none
174
-
175
- Resume identity: durable wiki Fog identity
176
-
177
- ## Phase: verify-disclosure
178
-
179
- Status: complete
180
-
181
- Scope: Bootstrap-to-gate context trace.
182
-
183
- Artifacts: Root pointers, router links, flat phase files, and three shared
184
- runtime references.
185
-
186
- Validation: Business trace loads `business-finder/SKILL.md` -> Finder bootstrap
187
- -> entrypoint contract and router -> exactly `business-grilling.md`; sibling
188
- gates remain unloaded. Every root/router pointer resolves. References contain
189
- state, handoff, and entry contracts only. No old chart/work pointer remains.
190
-
191
- Domain state: Branch-specific execution stays behind the selected gate pointer.
192
-
193
- Next suggested route: `test-routes.md`
194
-
195
- Blockers: none
196
-
197
- Resume identity: current target artifact set
198
-
199
- ## Phase: router (2026-08-27 repair)
200
-
201
- Status: complete
202
-
203
- Scope: Technical Task graph completion evidence.
204
-
205
- Artifacts: Current Finder router, contract, runtime handoff, writer validator,
206
- and fresh PR review evidence.
207
-
208
- Validation: Direct-child Task collection rejected valid cross-Epic blockers and
209
- could not prove future-milestone rejection. Current artifacts therefore made
210
- `test-routes` stale while prior authority, gates, and disclosure remained
211
- consistent.
212
-
213
- Domain state: Selected `test-routes.md`; no provider mutation or wider topology
214
- change was authorized.
215
-
216
- Next suggested route: `test-routes.md`
217
-
218
- Blockers: none
219
-
220
- Resume identity: exact upstream source revision and current PR review threads
221
-
222
- ## Phase: test-routes
223
-
224
- Status: complete
225
-
226
- Scope: Runtime route matrix.
227
-
228
- Artifacts: `tests/fixtures/finder-phase-routes.json`,
229
- `scripts/finder-contract.mjs`, and `tests/finder-phase-graph.contract.test.mjs`.
230
-
231
- Validation: Predictions and derivations match for baseline Fog ensure, Business
232
- branch, Research executor cycle, reconciliation repair, structural checkpoint,
233
- handback terminal, cold resume, stale/invalid/out-of-scope evidence,
234
- contradictory suggestion, and premature completion rejection. The planned
235
- checkpoint remains distinct from human steering. The out-of-scope case first
236
- failed as target return, then was repaired to reject inadmissible evidence. The
237
- 2026-08-27 repair adds RED/GREEN cases proving the exact `write-backlog`
238
- full-reachable validator result rejects a future-iteration edge and accepts a
239
- same-or-earlier-milestone blocker whose target belongs to another Epic.
240
-
241
- Domain state: Route fixture contains expected route before the executable
242
- contract derives it. Technical target return now requires the successful writer
243
- validator result, its complete Task/edge coverage, exact milestone-order
244
- readback, and matching provider snapshot.
245
-
246
- Next suggested route: `audit.md`
247
-
248
- Blockers: none
249
-
250
- Resume identity: route fixture and current script revision
3
+ ## Obligation map
4
+
5
+ | Obligation | Mandatory | Survives interruption | Evidence artifact | Owner | Audit criterion |
6
+ | --- | --- | --- | --- | --- | --- |
7
+ | Two explicit-only wrappers | yes | yes | wrapper skills and metadata | wrappers | only Business and Functional compose engine |
8
+ | One immutable-lens Fog | yes | yes | runtime handoff and provider readback | ensure gate | exact identity and original lens agree |
9
+ | Generic support graph | yes | yes | child identities, relations, evidence | engine gates | generic Grilling, Research, and Prototype have no stage cardinality |
10
+ | Evidence-based selection | yes | yes | decision plus current child reads | grilling/support gates | reuse, create, or zero-write ambiguity is explicit |
11
+ | Deterministic resume | yes | yes | router, fixture, executable contract | router | current evidence selects exactly one route |
12
+ | Bounded non-completing return | yes | yes | durable return result | return gate | outcome contains no Fog-completion claim |
13
+
14
+ ## State and topology
15
+
16
+ | State | Entry guard | Exit guard | Next states |
17
+ | --- | --- | --- | --- |
18
+ | Fog absent | supported wrapper lens, no exact Fog | exact Fog and immutable lens | grilling, handback |
19
+ | Grilling active | exact Fog, bounded result missing | retained evidence or support request | research, prototype, reconcile, return, handback |
20
+ | Support active | named child and precise unknown | immutable evidence or verdict | grilling, handback |
21
+ | Projection pending | ceiling-safe optional intent | exact or unresolved result | return, handback |
22
+ | Bounded result | required retained evidence exists | durable return written | terminal return |
23
+ | Human steering | current authority cannot resolve conflict | `$handback` guard passes | terminal or router re-entry |
24
+
25
+ Graph forms cover the baseline path, lens branch, support cycles, optional
26
+ projection skip, blocked/checkpoint outcomes, cold resume, and terminal human
27
+ steering. Current direct evidence outranks workflow-native artifacts, which
28
+ outrank a committed handoff and its advisory suggested route.
29
+
30
+ ## Route matrix
31
+
32
+ | Scenario | Predicted route | Derived route | Match | Repair if mismatch |
33
+ | --- | --- | --- | --- | --- |
34
+ | Baseline path | ensure-fog | ensure-fog | yes | — |
35
+ | Branch path | grilling | grilling | yes | — |
36
+ | Repair cycle | reconcile | reconcile | yes | — |
37
+ | Human checkpoint | reconcile | reconcile | yes | — |
38
+ | Failure handback terminal | human-steering | human-steering | yes | — |
39
+ | Cold resume | return-target | return-target | yes | — |
40
+ | Stale or invalid artifact | human-steering | human-steering | yes | — |
41
+ | Contradictory suggestion loses | grilling | grilling | yes | — |
42
+ | Nested executor substitution | research | research | yes | — |
43
+ | Premature completion rejected | grilling | grilling | yes | — |
251
44
 
252
45
  ## Phase: audit
253
46
 
254
47
  Status: complete
255
48
 
256
- Scope: Terminal graph-authoring audit.
49
+ Scope: Repaired Finder runtime graph for the accepted two-wrapper intake model.
257
50
 
258
- Artifacts: Finder engine, Business wrapper, runtime references, route contract,
259
- fixtures, and focused contract tests.
51
+ Artifacts: Wrapper skills, Finder bootstrap, seven flat gates, runtime
52
+ references, executable route contract, route fixture, and focused contracts.
260
53
 
261
- Validation: All mandatory obligations, route precedence, cold resume, pointers,
262
- gate exits, handoffs, target-depth return, and human-steering authority guard
263
- pass. The 2026-08-27 repair passes `node --test tests/*.test.mjs` at 212/212 and
264
- `git diff --check`. No separate skill validator exists in this canonical
265
- repository.
54
+ Validation: Two explicit-only wrappers compose one engine. The engine owns one
55
+ Fog with immutable lens, generic Grilling, Research, and Prototype routing,
56
+ evidence-based reuse/create/ambiguity, optional ceiling-safe projection, cold
57
+ resume, durable handoff, bounded return, and `human_steering_required`.
266
58
 
267
- Domain state: Audit complete. The no-op pass removed the old chart/work map,
268
- Fog-graduation rules, placement classification, and duplicate convergence
269
- reference. Remaining instructions change cardinality, evidence, routing,
270
- presentation, mutation-boundary, or terminal behavior.
59
+ Domain state: Technical and staged routes are removed. Historical staged state
60
+ is compatibility evidence only. No temporary seam remains.
271
61
 
272
62
  Next suggested route: audit-complete terminal
273
63
 
274
64
  Blockers: none
275
65
 
276
- Resume identity: current canonical source working revision
66
+ Resume identity: current canonical source revision and route fixture
@@ -1,47 +1,44 @@
1
1
  ---
2
2
  name: finder-phase
3
- description: Run the shared human-driven Finder engine at an explicit target depth.
3
+ description: Run the shared human-driven Finder engine for one explicit Business or Functional intake.
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
7
7
  # Finder Engine
8
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.
9
+ One durable graph creates or resumes one Fog for an explicit Business Finder or
10
+ Functional Finder invocation. Wrappers own their audience language and
11
+ projection ceiling. This engine alone owns lifecycle, generic support work,
12
+ resume routing, and bounded return.
12
13
 
13
14
  ## Bootstrap
14
15
 
15
16
  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.
17
+ 2. Read [the state graph](references/state-graph.md) and
18
+ [runtime handoff](references/runtime-handoff.md).
19
+ 3. Reconstruct current state from fresh Fog, child, relation, immutable-evidence,
20
+ provider-readback, and handoff evidence. Treat a suggested route as advisory.
21
+ 4. Read [the router](phases/router.md) on every entry and cold resume.
22
+ 5. Load exactly one selected gate, or return the router's one blocked,
23
+ checkpoint, or terminal outcome.
24
+ 6. After the selected gate writes its durable handoff, stop or re-enter this
25
+ bootstrap.
26
+
27
+ The router owns transitions. Each gate owns only its bounded action.
28
+ `$write-backlog` remains the sole physical provider mutation authority.
29
29
 
30
30
  ## Gates
31
31
 
32
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)
33
+ - [Generic Grilling](phases/grilling.md)
37
34
  - [Research support](phases/research.md)
38
35
  - [Prototype support](phases/prototype.md)
39
- - [Reconcile stage](phases/reconcile.md)
40
- - [Return target depth](phases/return-target.md)
36
+ - [Optional projection reconciliation](phases/reconcile.md)
37
+ - [Bounded return](phases/return-target.md)
41
38
  - [Human steering](phases/handback.md)
42
39
 
43
- ## Runtime References
40
+ ## Runtime references
44
41
 
45
- - [State and route model](references/state-graph.md)
42
+ - [State graph](references/state-graph.md)
46
43
  - [Runtime handoff](references/runtime-handoff.md)
47
44
  - [Root routing boundary](references/root-routing.md)
@@ -2,42 +2,32 @@
2
2
 
3
3
  ## Entry guard
4
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.
5
+ The wrapper lens is valid and no exact Fog readback exists.
11
6
 
12
7
  ## Bounded action
13
8
 
14
- 1. If an identity was supplied, read that exact Fog, direct children,
15
- relations, resolution pointers, and provider objects.
9
+ 1. If the caller supplied an identity, read the exact Fog, immutable intake
10
+ lens, direct children, relations, and retained evidence.
16
11
  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.
12
+ by that identity before proposing creation.
13
+ 3. On zero exact matches, send one semantic Fog upsert intent with the wrapper's
14
+ original intake lens to `$write-backlog`; require exact readback.
15
+ 4. Resume one exact match. Route ambiguity or a conflicting lens to human
16
+ steering with zero mutation intent.
27
17
 
28
18
  ## Completion evidence
29
19
 
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.
20
+ One durable wiki Fog identity, optional exact provider Fog identity, exact
21
+ readback, provider snapshot, and immutable original Business or Functional
22
+ intake lens.
33
23
 
34
24
  ## Declared exits
35
25
 
36
26
  - `fog_ready` -> router re-entry.
37
27
  - `human_steering_required` -> handback.
38
- - `blocked` -> stop with missing provider/wiki evidence.
28
+ - `blocked` -> stop with missing evidence.
39
29
 
40
30
  ## Durable handoff
41
31
 
42
- Persist both Fog identities, readback identity, snapshot, exit, and evidence
32
+ Persist both Fog identities, immutable lens, readback, snapshot, exit, and
43
33
  freshness under the durable wiki Fog identity.
@@ -0,0 +1,40 @@
1
+ # Generic Grilling Gate
2
+
3
+ ## Entry guard
4
+
5
+ One exact Fog and immutable intake lens exist, and the bounded intake result is
6
+ not ready.
7
+
8
+ ## Bounded action
9
+
10
+ 1. Read every direct generic `Kind/grilling` child and its support evidence.
11
+ 2. Reuse one obviously relevant child. Create another child only when current
12
+ evidence supports separate useful work. When relevance is genuinely
13
+ ambiguous, request human steering before any create intent.
14
+ 3. For a new child, allocate one durable wiki identity and ask `$write-backlog`
15
+ to ensure its generic shell and exact supported-by relations.
16
+ 4. Run one atomic `$grilling` conversation using the invoking wrapper's intake
17
+ and presentation profile, including its `$wait-what` and `$show-me`
18
+ behavior. Unknown values remain explicit.
19
+ 5. When a precise unknown needs readonly facts or a human-evaluated artifact,
20
+ record the named child and route to Research or Prototype.
21
+ 6. Retain accepted bounded evidence. If optional structure is useful, emit a
22
+ semantic intent within the wrapper's projection ceiling for reconciliation.
23
+
24
+ ## Completion evidence
25
+
26
+ Exact generic child identity, immutable retained evidence, any support request
27
+ and relation, bounded-result state, and optional ceiling-safe projection intent.
28
+
29
+ ## Declared exits
30
+
31
+ - `support_required` -> router re-entry.
32
+ - `projection_requested` -> reconciliation through router re-entry.
33
+ - `bounded_result_ready` -> bounded return through router re-entry.
34
+ - `human_steering_required` -> handback.
35
+ - `blocked` -> stop with missing evidence.
36
+
37
+ ## Durable handoff
38
+
39
+ Persist child identities, evidence pointers, reuse-or-create decision, support
40
+ relations, optional projection intent, bounded-result state, and exit.
@@ -2,28 +2,20 @@
2
2
 
3
3
  ## Entry guard
4
4
 
5
- Identity, evidence, target depth, authority, or accepted scope is ambiguous or
6
- conflicting and cannot be resolved from current authoritative evidence.
7
-
8
- ## Inputs
9
-
10
- Exact conflict, admissible evidence, zero-write proof, current runtime handoff,
11
- and the minimum human decision required.
5
+ Fog identity, immutable lens, child relevance, support relation, evidence,
6
+ scope, or projection ceiling is ambiguous or conflicting under current
7
+ authority.
12
8
 
13
9
  ## Bounded action
14
10
 
15
- Invoke `$handback` with the conflict and minimum decision. Persist its complete
16
- outcome as `human_steering_required` and stop.
17
-
18
- ## Invariants
19
-
20
- No semantic mutation intent is emitted while the conflict remains. The router
21
- keeps returning this terminal until the `$handback` authority guard passes.
11
+ Invoke `$handback` with the exact conflict and minimum human decision. Persist
12
+ its complete outcome as `human_steering_required`, prove that no mutation intent
13
+ was emitted after detecting the conflict, and stop.
22
14
 
23
15
  ## Completion evidence
24
16
 
25
- Durable `$handback` outcome, exact missing authority or decision, and proof that
26
- no mutation was requested after conflict detection.
17
+ Durable `$handback` outcome, exact missing authority or decision, and zero-write
18
+ proof.
27
19
 
28
20
  ## Declared exits
29
21
 
@@ -32,5 +24,6 @@ no mutation was requested after conflict detection.
32
24
 
33
25
  ## Durable handoff
34
26
 
35
- Persist the complete `$handback` outcome, conflict evidence, required decision,
36
- and terminal state.
27
+ Persist conflict evidence, minimum required decision, complete `$handback`
28
+ outcome, and terminal state. The router keeps returning this terminal while the
29
+ authority guard remains unsatisfied.
@@ -2,39 +2,31 @@
2
2
 
3
3
  ## Entry guard
4
4
 
5
- The active grilling child records one precise unknown requiring a human-evaluated
6
- artifact and no fresh verdict exists.
7
-
8
- ## Inputs
9
-
10
- Exact Fog, supported grilling child identity, precise question, prior Prototype
11
- children, and retained verdict evidence.
5
+ A named Grilling child records one precise unknown requiring a human-evaluated
6
+ artifact and no fresh retained verdict exists.
12
7
 
13
8
  ## Bounded action
14
9
 
15
- Reuse or semantically request one direct Fog Prototype child through
16
- `$write-backlog`, linked to the grilling child it supports. Run
17
- `$prototype-phase`. Accept only its human verdict plus immutable artifact and
18
- verdict pointers, then route to reconciliation.
19
-
20
- ## Invariants
10
+ Reuse an obviously relevant direct Fog Prototype child or create one when the
11
+ evidence supports separate useful work. Link it to the named Grilling child,
12
+ run `$prototype-phase`, and retain its human verdict and immutable artifact pointer.
13
+ Ambiguity requests human steering before creation.
21
14
 
22
- A Prototype verdict informs its named grilling child. It cannot independently
23
- authorize backlog projection.
15
+ Prototype returns evidence to its supported Grilling child. It cannot accept product direction or authorize backlog
16
+ projection independently.
24
17
 
25
18
  ## Completion evidence
26
19
 
27
- Stable Prototype child identity, supported-child relation, human verdict,
28
- immutable artifact/verdict pointers, and exact child/relation readback.
20
+ Exact Prototype child identity, supported-child relation, immutable artifact
21
+ and human-verdict pointers, and exact child/relation readback.
29
22
 
30
23
  ## Declared exits
31
24
 
32
- - `support_resolved` -> reconciliation then router re-entry.
33
- - `iterate` -> remain in this gate after durable handoff.
25
+ - `support_resolved` -> router re-entry.
34
26
  - `human_steering_required` -> handback.
35
27
  - `blocked` -> stop with missing retained evidence.
36
28
 
37
29
  ## Durable handoff
38
30
 
39
- Persist Prototype identity, supported child, verdict pointers, readback, and
40
- exit.
31
+ Persist Prototype identity, supported Grilling child, verdict pointers,
32
+ readback, and exit.