@punks/cli 4.0.2 → 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 (156) hide show
  1. package/dist/BASELINE_CHANGELOG.md +24 -0
  2. package/dist/CHANGELOG.md +17 -0
  3. package/dist/baseline/scaffold-baseline/baseline.json +5 -5
  4. package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +10 -4
  5. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +0 -1
  6. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +0 -8
  7. package/dist/baseline/scaffold-baseline/data/hooks/format-edited-file.mjs +602 -101
  8. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.d.ts +11 -0
  9. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.mjs +103 -0
  10. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.test.ts +144 -0
  11. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.mjs +1 -0
  12. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.mjs +1 -0
  13. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.mjs +1 -0
  14. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.mjs +1 -0
  15. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.ts +24 -33
  16. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/core.mjs +4 -0
  17. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/core.test.ts +61 -0
  18. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/lint-feedback.test.ts +123 -0
  19. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/claude/actions.json +1 -0
  20. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/codex/actions.json +2 -1
  21. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/cursor/projection.json +1 -0
  22. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/opencode/projection.json +1 -0
  23. package/dist/baseline/scaffold-baseline/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/security/security-best-practices/references/javascript-typescript-vue-web-frontend-security.md +1 -1
  52. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/eas-update-insights/references/update-insights-schema.md +2 -6
  53. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/expo-skill-eval/SKILL.md +6 -7
  54. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-best-practices/SKILL.md +1 -3
  55. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-component/SKILL.md +2 -14
  56. package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/references/best-practices.md +7 -1
  57. package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/templates/devtools-setup.tsx +4 -0
  58. package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/references/best-practices.md +7 -1
  59. package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/templates/devtools-setup.tsx +4 -0
  60. package/dist/baseline/scaffold-baseline/skills/languages/typescript/quality-types/SKILL.md +1 -3
  61. package/dist/baseline/scaffold-baseline/skills/phases/business-finder/SKILL.md +29 -16
  62. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +10 -8
  63. package/dist/baseline/scaffold-baseline/skills/phases/design-phase/phases/backlog.md +26 -17
  64. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
  65. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/SKILL.md +22 -25
  66. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
  67. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/grilling.md +40 -0
  68. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/handback.md +11 -18
  69. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/prototype.md +13 -21
  70. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/reconcile.md +21 -35
  71. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/research.md +13 -18
  72. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/return-target.md +14 -25
  73. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/router.md +22 -56
  74. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
  75. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/root-routing.md +12 -20
  76. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
  77. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/state-graph.md +27 -49
  78. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/scripts/finder-contract.mjs +40 -359
  79. package/dist/baseline/scaffold-baseline/skills/phases/functional-finder/SKILL.md +29 -62
  80. package/dist/baseline/scaffold-baseline/skills/phases/requirements-phase/SKILL.md +49 -13
  81. package/dist/baseline/scaffold-baseline.json +5 -5
  82. package/dist/baseline/scaffold-baseline.tgz +0 -0
  83. package/dist/data/hooks/format-edited-file.d.mts +21 -0
  84. package/dist/data/hooks/format-edited-file.mjs +588 -98
  85. package/dist/data/scripts/commit-gate-runner.mjs +103 -0
  86. package/dist/data/scripts/harness-projection/adapters/claude.mjs +1 -0
  87. package/dist/data/scripts/harness-projection/adapters/codex.mjs +1 -0
  88. package/dist/data/scripts/harness-projection/adapters/cursor.mjs +1 -0
  89. package/dist/data/scripts/harness-projection/adapters/opencode.mjs +1 -0
  90. package/dist/data/scripts/harness-projection/core.mjs +4 -0
  91. package/dist/data/scripts/harness-projection/test-fixtures/claude/actions.json +1 -0
  92. package/dist/data/scripts/harness-projection/test-fixtures/codex/actions.json +2 -1
  93. package/dist/data/scripts/harness-projection/test-fixtures/cursor/projection.json +1 -0
  94. package/dist/data/scripts/harness-projection/test-fixtures/opencode/projection.json +1 -0
  95. package/dist/index.js +73 -58
  96. package/dist/skills/agnostic/docs/docs-onboarding/SKILL.md +2 -2
  97. package/dist/skills/agnostic/planning/create-spec/SKILL.md +32 -32
  98. package/dist/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +7 -7
  99. package/dist/skills/agnostic/planning/create-spec/references/readiness.md +14 -13
  100. package/dist/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +26 -19
  101. package/dist/skills/agnostic/quality/autoreview/SKILL.md +2 -2
  102. package/dist/skills/agnostic/quality/autoreview/scripts/autoreview +3 -0
  103. package/dist/skills/agnostic/requirements/brainstorm/SKILL.md +12 -0
  104. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +2 -1
  105. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +9 -9
  106. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +43 -55
  107. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +68 -63
  108. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +26 -29
  109. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +5 -5
  110. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +1 -1
  111. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +2 -2
  112. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +1 -1
  113. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +2 -2
  114. package/dist/skills/agnostic/requirements/write-backlog/references/business-projection.md +19 -24
  115. package/dist/skills/agnostic/requirements/write-backlog/references/delivery-status.md +17 -13
  116. package/dist/skills/agnostic/requirements/write-backlog/references/fog-intake.md +45 -48
  117. package/dist/skills/agnostic/requirements/write-backlog/references/functional-projection.md +16 -21
  118. package/dist/skills/agnostic/requirements/write-backlog/references/normalization.md +14 -14
  119. package/dist/skills/agnostic/requirements/write-backlog/references/project-context.md +32 -27
  120. package/dist/skills/agnostic/requirements/write-backlog/references/providers/github.md +97 -142
  121. package/dist/skills/agnostic/requirements/write-backlog/references/providers/linear.md +106 -176
  122. package/dist/skills/agnostic/requirements/write-backlog/references/technical-projection.md +51 -47
  123. package/dist/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +55 -31
  124. package/dist/skills/phases/business-finder/SKILL.md +29 -16
  125. package/dist/skills/phases/delivery-phase/phases/router.md +10 -8
  126. package/dist/skills/phases/design-phase/phases/backlog.md +26 -17
  127. package/dist/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
  128. package/dist/skills/phases/finder-phase/SKILL.md +22 -25
  129. package/dist/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
  130. package/dist/skills/phases/finder-phase/phases/grilling.md +40 -0
  131. package/dist/skills/phases/finder-phase/phases/handback.md +11 -18
  132. package/dist/skills/phases/finder-phase/phases/prototype.md +13 -21
  133. package/dist/skills/phases/finder-phase/phases/reconcile.md +21 -35
  134. package/dist/skills/phases/finder-phase/phases/research.md +13 -18
  135. package/dist/skills/phases/finder-phase/phases/return-target.md +14 -25
  136. package/dist/skills/phases/finder-phase/phases/router.md +22 -56
  137. package/dist/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
  138. package/dist/skills/phases/finder-phase/references/root-routing.md +12 -20
  139. package/dist/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
  140. package/dist/skills/phases/finder-phase/references/state-graph.md +27 -49
  141. package/dist/skills/phases/finder-phase/scripts/finder-contract.mjs +44 -357
  142. package/dist/skills/phases/functional-finder/SKILL.md +29 -62
  143. package/dist/skills/phases/requirements-phase/SKILL.md +49 -13
  144. package/package.json +7 -5
  145. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
  146. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/business-grilling.md +0 -68
  147. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
  148. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
  149. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/SKILL.md +0 -74
  150. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/agents/openai.yaml +0 -2
  151. package/dist/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
  152. package/dist/skills/phases/finder-phase/phases/business-grilling.md +0 -68
  153. package/dist/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
  154. package/dist/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
  155. package/dist/skills/phases/technical-finder/SKILL.md +0 -74
  156. package/dist/skills/phases/technical-finder/agents/openai.yaml +0 -2
@@ -1,30 +1,43 @@
1
1
  ---
2
2
  name: business-finder
3
- description: Structure one product request through Business grilling and stop at its business backlog depth.
3
+ description: Capture uncertain product intent in business language and optionally project structure through Initiative.
4
4
  disable-model-invocation: true
5
5
  ---
6
6
 
7
7
  # Business Finder
8
8
 
9
- Human entrypoint for a nontechnical product owner. Use plain business language
10
- and the project's accepted terms. Preserve the user's words when they already
11
- land; explain unfamiliar backlog terms before using them.
9
+ Explicit human entrypoint for a colleague without technical capability. Use
10
+ familiar business language and explain backlog terms before using them.
11
+ Unknown values remain explicit.
12
12
 
13
- ## Inputs
13
+ ## Intake profile
14
14
 
15
- - one product request
16
- - optional stable provider or durable wiki Fog identity
17
- - product context the human supplied
15
+ Capture the actor or affected party, problem or opportunity, desired outcome
16
+ and value, evidence, constraints, non-goals, urgency, and open questions.
17
+ Preserve the human's wording when it already lands. This profile asks no
18
+ implementation or architecture questions.
19
+
20
+ Use `$wait-what` when a request or project term does not land: pause, repitch it
21
+ in familiar language, and ask again. Use `$show-me` before each structure
22
+ decision to present all relevant existing Product Areas and Initiatives with
23
+ the proposed impact. Presentation informs the human and grants no mutation
24
+ authority.
18
25
 
19
26
  ## Composition
20
27
 
21
- Directly compose [the Finder engine](../finder-phase/SKILL.md) with target
22
- depth: `Business`. Its [Business grilling gate](../finder-phase/phases/business-grilling.md)
23
- owns the atomic grill, visual decisions, support cycles, and accepted evidence.
24
- This adapter supplies only the audience presentation profile.
28
+ Compose [the shared Finder engine](../finder-phase/SKILL.md) with immutable
29
+ intake lens `Business`, this presentation profile, and projection ceiling
30
+ `Initiative`. The engine alone owns the Fog lifecycle, generic support work,
31
+ resume routing, and durable handoff.
32
+
33
+ Optional structure may reuse, enrich, or create Product Areas and Initiatives
34
+ through `$write-backlog`. The ceiling is Initiative: Business Finder never
35
+ projects an Epic, Story, or Task. Skipping projection, or returning an
36
+ unresolved projection, never blocks a valid Fog result.
25
37
 
26
- ## Return
38
+ ## Bounded return
27
39
 
28
- Return the exact Fog identity, accepted Business resolution, resolved Product
29
- Area -> Initiative -> Epic path, exact created-or-enriched readback identities,
30
- and unresolved decisions. Stop at the engine's `target_depth_reached` outcome.
40
+ Return the exact Fog identity, immutable Business intake lens, generic support
41
+ work and evidence, optional exact Product Area and Initiative readback,
42
+ unresolved decisions, and durable Finder handoff. Return control without
43
+ asserting that the Fog is resolved or complete.
@@ -46,11 +46,13 @@ state take precedence over inferred artifact order.
46
46
  otherwise [closeout.md](closeout.md).
47
47
  12. For durable `docs_ingest`, load [docs-ingest.md](docs-ingest.md).
48
48
  13. For durable `closeout`, load [closeout.md](closeout.md).
49
- 14. If no matching agent-ready `SPEC.md` exists, it is stale, contradictory, or
50
- incomplete, or its remote retention or stable blob URL is missing or
51
- unverified, load [spec.md](spec.md).
52
- 15. If the verified post-spec backlog projection is missing or stale, load
53
- [backlog.md](backlog.md).
49
+ 14. If no matching agent-ready `SPEC.md` exists for bounded requirements, or the
50
+ specification is stale, contradictory, incomplete, or lacks verified remote
51
+ retention, route them to Requirements Phase. Requirements Phase owns the
52
+ Requirements Grill, Create Spec, and Write Backlog sequence.
53
+ 15. If a verified specification lacks its current Write Backlog result, route
54
+ the retained specification authority to Requirements Phase for
55
+ delivery-depth projection and exact readback.
54
56
  16. If no execution-ready matching plan exists, or it lacks dependencies, owned
55
57
  paths, validation gates, or wave boundaries, load [plan.md](plan.md).
56
58
  17. If accepted plan work is incomplete, load [implement.md](implement.md).
@@ -63,9 +65,9 @@ state take precedence over inferred artifact order.
63
65
  19. Route remaining docs-affecting work to [docs-ingest.md](docs-ingest.md),
64
66
  otherwise [closeout.md](closeout.md).
65
67
 
66
- When staged Finder authority is missing, report the exact Business, Functional,
67
- or Technical Finder invocation the human must make. Every Finder surface is
68
- human-only; this router never invokes one implicitly.
68
+ Finder context is optional. Route direct bounded input to Requirements Phase
69
+ without creating a Finder artifact. When the caller supplies Finder context,
70
+ pass only its exact handle for Requirements Phase to resolve.
69
71
 
70
72
  When a linked provider Task has a newly observed work start, blocker, pull
71
73
  request, merge, staging deployment, or production deployment without exact
@@ -1,6 +1,6 @@
1
1
  # Backlog Phase
2
2
 
3
- Convert approved design artifacts into backlog work.
3
+ Route approved design evidence into the accepted delivery scope.
4
4
 
5
5
  Before naming or rewriting domain concepts, read the canonical glossary in the
6
6
  routed `requirements-grill` status artifact. Preserve its canonical terms;
@@ -9,28 +9,37 @@ silently renaming them.
9
9
 
10
10
  ## Prerequisite
11
11
 
12
- An authoritative agent-ready `SPEC.md` at a verified stable blob URL that includes or links at least one fresh approved artifact set with its artifact contract.
12
+ An authoritative agent-ready `SPEC.md` with a verified stable blob URL links at
13
+ least one fresh approved artifact set and its artifact contract.
13
14
 
14
15
  ## Steps
15
16
 
16
- 1. Verify the spec is authoritative and agent-ready, then verify approved artifact links, durable asset links, scope, constraints, and acceptance checks.
17
- 2. Use `repo-asset-management` for backlog attachments first and repo-provider fallback when backlog attachments are unavailable or unsuitable.
18
- 3. Require the exact existing Story and accepted Technical resolution. Activate
19
- only `write-backlog`'s technical-projection branch to enrich that Story and
20
- project its provider Tasks. Missing staged Finder authority returns the
21
- explicit human Finder invocation needed; this phase never starts Finder.
22
- 4. Include only accepted product and design constraints, acceptance context, and artifact links in backlog bodies.
23
- 5. Record created or updated backlog ids and preserve the `spec -> backlog -> delivery` handoff.
17
+ 1. Verify the specification authority, approved artifact links, durable asset
18
+ links, accepted scope, constraints, and acceptance checks.
19
+ 2. Decide whether the approved evidence fits the retained specification and
20
+ its already accepted delivery items.
21
+ 3. When the evidence requires new Stories or Tasks, retain the accepted design
22
+ evidence and return it to Requirements Phase. Requirements Phase closes the
23
+ changed scope and alone authorizes a new delivery-depth projection.
24
+ 4. When the evidence fits the accepted scope, use `repo-asset-management` for
25
+ backlog attachments, with its repo-provider fallback when direct
26
+ attachments are unavailable or unsuitable. Preserve the existing backlog
27
+ identities.
28
+ 5. Record the linked backlog identities and preserve the
29
+ `spec -> backlog -> delivery` handoff.
24
30
 
25
31
  ## Rules
26
32
 
27
- - Do not copy provider upload commands here; `repo-asset-management` owns them.
28
- - Do not drop visual evidence when attachments fail. Record the fallback path or blocker.
29
- - Backlog conversion is blocked for unapproved scope units.
33
+ - `repo-asset-management` owns provider upload commands and attachment
34
+ fallbacks.
35
+ - Record a durable fallback path or blocker when visual evidence cannot be
36
+ attached.
37
+ - Unapproved scope returns to Requirements Phase before backlog mutation.
30
38
 
31
39
  ## Output
32
40
 
33
- - Backlog ids and URLs.
34
- - Approved artifact links attached or linked.
35
- - Attachment fallback or blockers.
36
- - Phase handoff with next route: delivery-handoff.
41
+ - Retained design evidence and approved artifact links.
42
+ - Existing backlog identities and URLs when scope is unchanged.
43
+ - Requirements Phase return when scope needs new Stories or Tasks.
44
+ - Attachment fallback blockers.
45
+ - Phase handoff next route: delivery-handoff.
@@ -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.