@punks/cli 4.0.2 → 4.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/dist/BASELINE_CHANGELOG.md +29 -0
  2. package/dist/CHANGELOG.md +25 -0
  3. package/dist/baseline/scaffold-baseline/baseline.json +5 -5
  4. package/dist/baseline/scaffold-baseline/data/catalog/lint-assets.json +10 -4
  5. package/dist/baseline/scaffold-baseline/data/catalog/packs.json +0 -1
  6. package/dist/baseline/scaffold-baseline/data/catalog/skills.json +0 -8
  7. package/dist/baseline/scaffold-baseline/data/hooks/format-edited-file.mjs +602 -101
  8. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.d.ts +11 -0
  9. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.mjs +103 -0
  10. package/dist/baseline/scaffold-baseline/data/scripts/commit-gate-runner.test.ts +144 -0
  11. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/claude.mjs +1 -0
  12. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/codex.mjs +1 -0
  13. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/cursor.mjs +1 -0
  14. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/adapters/opencode.mjs +1 -0
  15. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/contract.ts +24 -33
  16. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/core.mjs +4 -0
  17. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/core.test.ts +61 -0
  18. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/lint-feedback.test.ts +123 -0
  19. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/claude/actions.json +1 -0
  20. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/codex/actions.json +2 -1
  21. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/cursor/projection.json +1 -0
  22. package/dist/baseline/scaffold-baseline/data/scripts/harness-projection/test-fixtures/opencode/projection.json +1 -0
  23. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents-validator.test.ts +59 -0
  24. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.d.mts +1 -0
  25. package/dist/baseline/scaffold-baseline/data/scripts/sync-subagents.mjs +27 -14
  26. package/dist/baseline/scaffold-baseline/skills/agnostic/docs/docs-onboarding/SKILL.md +2 -2
  27. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/SKILL.md +32 -32
  28. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +7 -7
  29. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/readiness.md +14 -13
  30. package/dist/baseline/scaffold-baseline/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +26 -19
  31. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/SKILL.md +2 -2
  32. package/dist/baseline/scaffold-baseline/skills/agnostic/quality/autoreview/scripts/autoreview +3 -0
  33. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/brainstorm/SKILL.md +18 -0
  34. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/requirements-grill/SKILL.md +2 -1
  35. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/EXAMPLES.md +9 -9
  36. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/REFERENCE.md +43 -55
  37. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/SKILL.md +68 -63
  38. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +26 -29
  39. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +5 -5
  40. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +1 -1
  41. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +2 -2
  42. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +1 -1
  43. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +2 -2
  44. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/business-projection.md +19 -24
  45. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/delivery-status.md +17 -13
  46. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/fog-intake.md +45 -48
  47. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/functional-projection.md +16 -21
  48. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/normalization.md +14 -14
  49. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/project-context.md +32 -27
  50. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/github.md +105 -150
  51. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/providers/linear.md +111 -181
  52. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/references/technical-projection.md +51 -47
  53. package/dist/baseline/scaffold-baseline/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +49 -35
  54. package/dist/baseline/scaffold-baseline/skills/agnostic/security/security-best-practices/references/javascript-typescript-vue-web-frontend-security.md +1 -1
  55. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/eas-update-insights/references/update-insights-schema.md +2 -6
  56. package/dist/baseline/scaffold-baseline/skills/frameworks/expo/expo-skill-eval/SKILL.md +6 -7
  57. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-best-practices/SKILL.md +1 -3
  58. package/dist/baseline/scaffold-baseline/skills/frameworks/pulumi/pulumi-component/SKILL.md +2 -14
  59. package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/references/best-practices.md +7 -1
  60. package/dist/baseline/scaffold-baseline/skills/frameworks/tanstack-query/tanstack-query/templates/devtools-setup.tsx +4 -0
  61. package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/references/best-practices.md +7 -1
  62. package/dist/baseline/scaffold-baseline/skills/frameworks/trpc/tanstack-query/templates/devtools-setup.tsx +4 -0
  63. package/dist/baseline/scaffold-baseline/skills/languages/typescript/quality-types/SKILL.md +1 -3
  64. package/dist/baseline/scaffold-baseline/skills/phases/business-finder/SKILL.md +29 -16
  65. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/SKILL.md +1 -1
  66. package/dist/baseline/scaffold-baseline/skills/phases/delivery-phase/phases/router.md +10 -8
  67. package/dist/baseline/scaffold-baseline/skills/phases/design-phase/phases/backlog.md +26 -17
  68. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
  69. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/SKILL.md +22 -25
  70. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
  71. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/grilling.md +40 -0
  72. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/handback.md +11 -18
  73. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/prototype.md +13 -21
  74. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/reconcile.md +21 -35
  75. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/research.md +13 -18
  76. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/return-target.md +14 -25
  77. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/router.md +22 -56
  78. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
  79. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/root-routing.md +12 -20
  80. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
  81. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/references/state-graph.md +27 -49
  82. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/scripts/finder-contract.mjs +40 -359
  83. package/dist/baseline/scaffold-baseline/skills/phases/functional-finder/SKILL.md +29 -62
  84. package/dist/baseline/scaffold-baseline/skills/phases/requirements-phase/SKILL.md +49 -13
  85. package/dist/baseline/scaffold-baseline.json +5 -5
  86. package/dist/baseline/scaffold-baseline.tgz +0 -0
  87. package/dist/data/hooks/format-edited-file.d.mts +21 -0
  88. package/dist/data/hooks/format-edited-file.mjs +588 -98
  89. package/dist/data/scripts/commit-gate-runner.mjs +103 -0
  90. package/dist/data/scripts/harness-projection/adapters/claude.mjs +1 -0
  91. package/dist/data/scripts/harness-projection/adapters/codex.mjs +1 -0
  92. package/dist/data/scripts/harness-projection/adapters/cursor.mjs +1 -0
  93. package/dist/data/scripts/harness-projection/adapters/opencode.mjs +1 -0
  94. package/dist/data/scripts/harness-projection/core.mjs +4 -0
  95. package/dist/data/scripts/harness-projection/test-fixtures/claude/actions.json +1 -0
  96. package/dist/data/scripts/harness-projection/test-fixtures/codex/actions.json +2 -1
  97. package/dist/data/scripts/harness-projection/test-fixtures/cursor/projection.json +1 -0
  98. package/dist/data/scripts/harness-projection/test-fixtures/opencode/projection.json +1 -0
  99. package/dist/data/scripts/sync-subagents.d.mts +1 -0
  100. package/dist/data/scripts/sync-subagents.mjs +30 -13
  101. package/dist/data/shared-agents.md +2 -60
  102. package/dist/index.js +73 -64
  103. package/dist/skills/agnostic/docs/docs-onboarding/SKILL.md +2 -2
  104. package/dist/skills/agnostic/planning/create-spec/SKILL.md +32 -32
  105. package/dist/skills/agnostic/planning/create-spec/assets/SPEC-TEMPLATE.md +7 -7
  106. package/dist/skills/agnostic/planning/create-spec/references/readiness.md +14 -13
  107. package/dist/skills/agnostic/planning/create-spec/references/spec-quality-bar.md +26 -19
  108. package/dist/skills/agnostic/quality/autoreview/SKILL.md +2 -2
  109. package/dist/skills/agnostic/quality/autoreview/scripts/autoreview +3 -0
  110. package/dist/skills/agnostic/requirements/brainstorm/SKILL.md +18 -0
  111. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +2 -1
  112. package/dist/skills/agnostic/requirements/write-backlog/EXAMPLES.md +9 -9
  113. package/dist/skills/agnostic/requirements/write-backlog/REFERENCE.md +43 -55
  114. package/dist/skills/agnostic/requirements/write-backlog/SKILL.md +68 -63
  115. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/backlog-model.md +26 -29
  116. package/dist/skills/agnostic/requirements/write-backlog/assets/concepts/story-shape.md +5 -5
  117. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/azure-devops-create-payload.md +1 -1
  118. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/github-projects-create-payload.md +2 -2
  119. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/linear-create-payload.md +1 -1
  120. package/dist/skills/agnostic/requirements/write-backlog/assets/providers/monday-create-payload.md +2 -2
  121. package/dist/skills/agnostic/requirements/write-backlog/references/business-projection.md +19 -24
  122. package/dist/skills/agnostic/requirements/write-backlog/references/delivery-status.md +17 -13
  123. package/dist/skills/agnostic/requirements/write-backlog/references/fog-intake.md +45 -48
  124. package/dist/skills/agnostic/requirements/write-backlog/references/functional-projection.md +16 -21
  125. package/dist/skills/agnostic/requirements/write-backlog/references/normalization.md +14 -14
  126. package/dist/skills/agnostic/requirements/write-backlog/references/project-context.md +32 -27
  127. package/dist/skills/agnostic/requirements/write-backlog/references/providers/github.md +97 -142
  128. package/dist/skills/agnostic/requirements/write-backlog/references/providers/linear.md +106 -176
  129. package/dist/skills/agnostic/requirements/write-backlog/references/technical-projection.md +51 -47
  130. package/dist/skills/agnostic/requirements/write-backlog/scripts/validate-task-blocker-graph.mjs +55 -31
  131. package/dist/skills/phases/business-finder/SKILL.md +29 -16
  132. package/dist/skills/phases/delivery-phase/SKILL.md +1 -1
  133. package/dist/skills/phases/delivery-phase/phases/router.md +10 -8
  134. package/dist/skills/phases/design-phase/phases/backlog.md +26 -17
  135. package/dist/skills/phases/finder-phase/AUTHORING-HANDOFF.md +51 -261
  136. package/dist/skills/phases/finder-phase/SKILL.md +22 -25
  137. package/dist/skills/phases/finder-phase/phases/ensure-fog.md +13 -23
  138. package/dist/skills/phases/finder-phase/phases/grilling.md +40 -0
  139. package/dist/skills/phases/finder-phase/phases/handback.md +11 -18
  140. package/dist/skills/phases/finder-phase/phases/prototype.md +13 -21
  141. package/dist/skills/phases/finder-phase/phases/reconcile.md +21 -35
  142. package/dist/skills/phases/finder-phase/phases/research.md +13 -18
  143. package/dist/skills/phases/finder-phase/phases/return-target.md +14 -25
  144. package/dist/skills/phases/finder-phase/phases/router.md +22 -56
  145. package/dist/skills/phases/finder-phase/references/entrypoint-contract.md +25 -26
  146. package/dist/skills/phases/finder-phase/references/root-routing.md +12 -20
  147. package/dist/skills/phases/finder-phase/references/runtime-handoff.md +17 -39
  148. package/dist/skills/phases/finder-phase/references/state-graph.md +27 -49
  149. package/dist/skills/phases/finder-phase/scripts/finder-contract.mjs +44 -357
  150. package/dist/skills/phases/functional-finder/SKILL.md +29 -62
  151. package/dist/skills/phases/requirements-phase/SKILL.md +49 -13
  152. package/package.json +7 -5
  153. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
  154. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/business-grilling.md +0 -68
  155. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
  156. package/dist/baseline/scaffold-baseline/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
  157. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/SKILL.md +0 -74
  158. package/dist/baseline/scaffold-baseline/skills/phases/technical-finder/agents/openai.yaml +0 -2
  159. package/dist/skills/phases/finder-phase/phases/adopt-business-path.md +0 -52
  160. package/dist/skills/phases/finder-phase/phases/business-grilling.md +0 -68
  161. package/dist/skills/phases/finder-phase/phases/functional-grilling.md +0 -53
  162. package/dist/skills/phases/finder-phase/phases/technical-grilling.md +0 -67
  163. package/dist/skills/phases/technical-finder/SKILL.md +0 -74
  164. package/dist/skills/phases/technical-finder/agents/openai.yaml +0 -2
@@ -0,0 +1,59 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { validateCanonicalContextPlan } from "./sync-subagents.mjs";
3
+
4
+ interface CommitGateContribution {
5
+ compatibility: readonly unknown[];
6
+ contract: { formatCheck: string; lint: string };
7
+ identity: { id: string; version: string };
8
+ kind: "commit-gate";
9
+ order: number;
10
+ provenance: { revision: string; source: string };
11
+ references: readonly string[];
12
+ }
13
+
14
+ const contribution: CommitGateContribution = {
15
+ compatibility: [],
16
+ contract: { formatCheck: "bun run check:format", lint: "bun run lint" },
17
+ identity: { id: "verification", version: "1" },
18
+ kind: "commit-gate",
19
+ order: 0,
20
+ provenance: { revision: "1", source: "project" },
21
+ references: [],
22
+ };
23
+
24
+ const plan = (entry: object = contribution) => ({
25
+ scopes: [{ contributions: [entry], id: "root", packs: [] }],
26
+ version: "1",
27
+ });
28
+
29
+ type MutateContribution = (entry: CommitGateContribution) => Record<string, unknown>;
30
+
31
+ const invalidCases: readonly [string, MutateContribution][] = [
32
+ [
33
+ "missing contract",
34
+ (entry) => {
35
+ const { contract: _contract, ...invalid } = entry;
36
+ return invalid;
37
+ },
38
+ ],
39
+ ["empty lint", (entry) => ({ ...entry, contract: { ...entry.contract, lint: "" } })],
40
+ [
41
+ "empty formatCheck",
42
+ (entry) => ({ ...entry, contract: { ...entry.contract, formatCheck: "" } }),
43
+ ],
44
+ [
45
+ "extra contract field",
46
+ (entry) => ({ ...entry, contract: { ...entry.contract, extra: "unexpected" } }),
47
+ ],
48
+ ];
49
+
50
+ describe("sync-subagents context-plan validator", () => {
51
+ it("accepts commit-gate contracts with both command strings", () => {
52
+ expect(validateCanonicalContextPlan(plan())).toBeUndefined();
53
+ });
54
+
55
+ it.each(invalidCases)("rejects %s", (_label, mutate) => {
56
+ const invalid = mutate(contribution);
57
+ expect(validateCanonicalContextPlan(plan(invalid))).toMatch(/contract|fields/iu);
58
+ });
59
+ });
@@ -0,0 +1 @@
1
+ export declare const validateCanonicalContextPlan: (contextPlan: unknown) => string | undefined;
@@ -2878,6 +2878,7 @@ const contributionKinds = new Set([
2878
2878
  "lifecycle-hook",
2879
2879
  "tool-configuration",
2880
2880
  "subagent-template",
2881
+ "commit-gate",
2881
2882
  ]);
2882
2883
 
2883
2884
  const identityIssue = (identity) =>
@@ -2905,17 +2906,19 @@ const compatibilityIssue = (compatibility) =>
2905
2906
  ? undefined
2906
2907
  : "Context contribution compatibility is invalid";
2907
2908
 
2909
+ const commitGateContractIssue = (contract) =>
2910
+ exactKeys(contract, ["lint", "formatCheck"]) &&
2911
+ isNonEmptyString(contract.lint) &&
2912
+ isNonEmptyString(contract.formatCheck)
2913
+ ? undefined
2914
+ : "Commit-gate contract must contain non-empty lint and formatCheck strings";
2915
+
2908
2916
  const contributionIssue = (contribution) => {
2909
- if (
2910
- !exactKeys(contribution, [
2911
- "kind",
2912
- "identity",
2913
- "provenance",
2914
- "compatibility",
2915
- "references",
2916
- "order",
2917
- ])
2918
- ) {
2917
+ const expectedKeys =
2918
+ contribution?.kind === "commit-gate"
2919
+ ? ["kind", "identity", "provenance", "compatibility", "references", "order", "contract"]
2920
+ : ["kind", "identity", "provenance", "compatibility", "references", "order"];
2921
+ if (!exactKeys(contribution, expectedKeys)) {
2919
2922
  return "Context contribution fields are invalid";
2920
2923
  }
2921
2924
  return (
@@ -2925,6 +2928,9 @@ const contributionIssue = (contribution) => {
2925
2928
  identityIssue(contribution.identity) ??
2926
2929
  provenanceIssue(contribution.provenance) ??
2927
2930
  compatibilityIssue(contribution.compatibility) ??
2931
+ (contribution.kind === "commit-gate"
2932
+ ? commitGateContractIssue(contribution.contract)
2933
+ : undefined) ??
2928
2934
  (!Array.isArray(contribution.references) || !contribution.references.every(isNonEmptyString)
2929
2935
  ? "Context contribution references are invalid"
2930
2936
  : undefined) ??
@@ -3002,6 +3008,8 @@ function subagentManifestIssue(contextPlan) {
3002
3008
  const canonicalContextIssue = (contextPlan) =>
3003
3009
  contextPlanIssue(contextPlan) ?? subagentManifestIssue(contextPlan);
3004
3010
 
3011
+ export const validateCanonicalContextPlan = (contextPlan) => canonicalContextIssue(contextPlan);
3012
+
3005
3013
  const contextPlanVersion = (contextPlan) =>
3006
3014
  isObject(contextPlan) && typeof contextPlan.version === "string"
3007
3015
  ? contextPlan.version
@@ -3109,8 +3117,13 @@ async function main({ publicationLock } = {}) {
3109
3117
  }
3110
3118
  }
3111
3119
 
3112
- try {
3113
- await main();
3114
- } finally {
3115
- await closeMutationWorkers();
3120
+ const entrypointPath = process.argv[1] === undefined ? null : await realpath(process.argv[1]);
3121
+ const modulePath = await realpath(fileURLToPath(import.meta.url));
3122
+
3123
+ if (entrypointPath === modulePath) {
3124
+ try {
3125
+ await main();
3126
+ } finally {
3127
+ await closeMutationWorkers();
3128
+ }
3116
3129
  }
@@ -33,8 +33,8 @@ silently renaming them.
33
33
  the exact existing Epic/Story and accepted projection authority required by
34
34
  that branch. Otherwise record the missing authority and exact human Finder
35
35
  invocation; retain the compiled spec without provider mutation.
36
- 8. Leave new feature work to explicit human invocation of Business,
37
- Functional, or Technical Finder. Onboarding never invokes a Finder
36
+ 8. Leave new feature work to explicit human invocation of Business or
37
+ Functional Finder. Onboarding never invokes a Finder
38
38
  implicitly.
39
39
 
40
40
  For the required Project Map sections, onboarding artifacts, evidence labels, and spec reconstruction rules, read [references/artifact-contract.md](references/artifact-contract.md).
@@ -5,17 +5,17 @@ description: Compile confirmed product decisions into SPEC.md. Use when requirem
5
5
 
6
6
  # Create Spec
7
7
 
8
- `create-spec` is a no-interview compiler of confirmed decisions. Upstream
8
+ `create-spec` is the no-interview compiler of confirmed decisions. Upstream
9
9
  Wayfinder, research, prototyping, and grilling own uncertainty. This skill asks
10
10
  no questions, runs no local grill, and performs no backlog mutation.
11
11
 
12
12
  ## Inputs
13
13
 
14
- Accept confirmed user decisions and their evidence: grill status/logs, research
15
- reports, prototype verdicts, ADRs, glossary, axioms, constraints, system facts,
16
- accepted implementation or testing decisions, dependency evidence, and accepted
17
- parent/base constraints. A Technical Finder invocation also supplies the exact
18
- selected Story context required by the readiness contract.
14
+ Accept confirmed decision evidence: grill status and logs, research reports,
15
+ prototype verdicts, ADRs, glossary, axioms, constraints, system facts, accepted
16
+ implementation and testing decisions, dependency evidence, and accepted
17
+ parent/base constraints. Provider backlog items may be source evidence, but
18
+ they are not specification identities or readiness prerequisites.
19
19
 
20
20
  ## Steps
21
21
 
@@ -24,9 +24,10 @@ routed `requirements-grill` status artifact. Preserve its canonical terms;
24
24
  route proposed terminology changes through `requirements-grill` instead of
25
25
  silently renaming them.
26
26
 
27
- 1. Resolve the planning surface using [folder-naming.md](references/folder-naming.md).
28
- 2. Validate readiness using [readiness.md](references/readiness.md). If anything
29
- required is missing, return one atomic `spec-not-ready` result and write no
27
+ 1. Resolve the planning surface using
28
+ [folder-naming.md](references/folder-naming.md).
29
+ 2. Validate readiness using [readiness.md](references/readiness.md). If required
30
+ evidence is missing, return one atomic `spec-not-ready` result and write no
30
31
  partial `SPEC.md`.
31
32
  3. Compile [SPEC-TEMPLATE.md](assets/SPEC-TEMPLATE.md). Preserve only confirmed
32
33
  decisions; never invent closure. Serialize `Dependency Readiness` and
@@ -34,36 +35,35 @@ silently renaming them.
34
35
  4. Apply [spec-quality-bar.md](references/spec-quality-bar.md).
35
36
  5. Update existing planning-surface indexes through
36
37
  [wiki-bookkeeping.md](references/wiki-bookkeeping.md).
37
- 6. Persist the completed spec and its bookkeeping in a dedicated git commit.
38
- Never stage unrelated changes.
39
- 7. Push or explicitly retain the spec commit through a repository-approved
40
- remote mechanism, verify the retained ref contains the spec commit, then
41
- construct and verify a stable blob URL before `write-backlog` may consume it.
42
- A local commit SHA plus path is insufficient.
43
- 8. Invoke `$show-me` to present the completed spec (`SPEC.md`). Derive the presentation
44
- only from the compiled spec, identify it as a view of that authority, and
45
- continue without adding an approval gate or inferring new closure.
46
- 9. Return `spec-written` with `readiness: agent-ready` and the verified stable
47
- blob URL. If retention or URL verification fails, return one atomic
38
+ 6. Persist the completed spec and bookkeeping in a dedicated git commit. Never
39
+ stage unrelated changes.
40
+ 7. Push or explicitly retain the spec commit through the repository-approved remote
41
+ mechanism. Verify the retained ref contains the spec commit, then construct and
42
+ verify a stable blob URL before `write-backlog` may consume it. A local
43
+ commit SHA plus path is insufficient.
44
+ 8. Invoke `$show-me` to present the completed spec in `SPEC.md`. Derive the presentation
45
+ only from the compiled spec and continue without adding an approval gate or
46
+ inferring new closure.
47
+ 9. Return `spec-written`, `readiness: agent-ready`, and the verified stable blob
48
+ URL. If retention or URL verification fails, return one atomic
48
49
  `spec-not-ready` result and do not invoke backlog projection.
49
50
 
50
51
  ## Boundaries
51
52
 
52
- - `SPEC.md` is provider-neutral authority for resolved requirements. During a
53
- Technical Finder invocation, Business and Functional Finder establish the
54
- Area, Initiative, Epic, and exact Story before the Technical stage compiles
55
- the Story-scoped spec. Non-Finder compilation requires no provider Story.
56
- In that Finder path, stable retention lets `write-backlog`'s Technical
57
- projection enrich the exact Story and create its provider Task graph.
58
- `create-plan` preserves those Task identities and owns files, commands,
59
- workers, and validation detail.
60
- - A mutable path or local-only commit is not a backlog handoff. `write-backlog`
61
- receives only the verified stable blob URL.
53
+ - `SPEC.md` is the provider-neutral authority for resolved requirements. It
54
+ identifies requirements and outcomes as `OUT-###`; these identifiers imply
55
+ no provider Epic, Story, or Task identity or count.
56
+ - `write-backlog` receives only the verified stable blob URL, then derives or
57
+ reuses the provider Epic, Stories, Tasks, and blocker graph supported by the
58
+ compiled requirements and current provider evidence.
59
+ - A mutable path or local-only commit is not a backlog handoff.
62
60
  - Accepted technical and testing decisions belong in the spec. Detailed task
63
61
  choreography does not.
62
+ - `create-plan` preserves provider Task identities and owns files, commands,
63
+ workers, and validation detail.
64
64
  - `Dependency Readiness` and `Branch/Base Intent` preserve accepted dependency
65
65
  evidence and parent/base constraints for `create-plan`.
66
66
  - `readiness: agent-ready` is sufficient downstream. Do not add a review or
67
67
  approval stop; pause only for a user-requested HITL checkpoint.
68
- - Compiler state is `compiled`. Human approval, when explicitly requested, is a
69
- separate optional action and is never inferred or stamped by this compiler.
68
+ - Compiler state is `compiled`. Human approval, when explicitly requested, is
69
+ a separate optional action and is never inferred or stamped by the compiler.
@@ -15,25 +15,25 @@ updated: YYYY-MM-DD
15
15
 
16
16
  ## Non-Goals
17
17
 
18
- ## User Stories
18
+ ## Requirements and Outcomes
19
19
 
20
- ### US-001: [Observable user outcome]
20
+ ### OUT-001: [Observable outcome]
21
21
 
22
22
  ## Acceptance Criteria
23
23
 
24
24
  - AC-001: [Binary observable criterion]
25
- - Covers: US-001
25
+ - Covers: OUT-001
26
26
 
27
27
  ## Constraints
28
28
 
29
29
  ## Dependency Readiness
30
30
 
31
31
  _Write `No Stack Required` when no dependency exists. Otherwise write `Ready`
32
- and list each dependency with immutable landing or branch/base evidence._
32
+ and list each dependency's immutable landing or branch/base evidence._
33
33
 
34
34
  ## Branch/Base Intent
35
35
 
36
- _When accepted intent exists, record the intended parent and base, child branch
36
+ _When accepted intent exists, record the intended parent or base, child branch
37
37
  constraint, and supporting evidence. Otherwise write `Not applicable`._
38
38
 
39
39
  ## Accepted Technical Decisions
@@ -43,7 +43,7 @@ constraint, and supporting evidence. Otherwise write `Not applicable`._
43
43
  ## Verification Seams
44
44
 
45
45
  _Name the public interface, event, state transition, command, or observable
46
- boundary used to verify the behavior. If none applies, record the accepted
46
+ boundary used to verify behavior. If none applies, record the accepted
47
47
  not-applicable rationale._
48
48
 
49
49
  ## Prototype Verdicts
@@ -53,7 +53,7 @@ accepted implications. Remove this section when no prototype exists._
53
53
 
54
54
  ## Parked Decisions
55
55
 
56
- _Each item needs an owner and resume trigger. Remove when empty._
56
+ _Each item needs an owner and resume trigger. Remove this section when empty._
57
57
 
58
58
  ## Decision Log
59
59
 
@@ -1,7 +1,7 @@
1
1
  # Readiness
2
2
 
3
- Compile only when the decision frontier is closed or every remaining item is
4
- explicitly parked with owner and resume trigger.
3
+ Compile only when the decision frontier is closed and every remaining item is
4
+ explicitly parked with an owner and resume trigger.
5
5
 
6
6
  Required inputs:
7
7
 
@@ -9,21 +9,20 @@ Required inputs:
9
9
  - accepted functional behavior and observable success
10
10
  - accepted implementation and testing decisions, when any were made upstream
11
11
  - every applicable prototype verdict by immutable commit SHA and path
12
- - a verification-seam decision, or an explicit not-applicable rationale
13
- - dependency readiness for every declared dependency: proven landed, or an
12
+ - verification-seam decision, or an explicit not-applicable rationale
13
+ - dependency readiness for every declared dependency: proven landing, or an
14
14
  accepted branch/base intent with concrete evidence; blocked or unevidenced
15
15
  dependencies fail compilation
16
16
 
17
- Technical Finder adds one conditional input: the exact selected Story context
18
- established by its accepted Functional child. Non-Finder compilation has no
19
- provider Story precondition.
17
+ Provider backlog items may supply evidence. Compilation never requires a
18
+ preselected provider delivery item.
20
19
 
21
20
  ## Dependency output contract
22
21
 
23
22
  Serialize both sections in every compiled spec:
24
23
 
25
24
  - `Dependency Readiness`: write `No Stack Required` when no dependency exists.
26
- Otherwise write `Ready` and list every dependency with immutable landing or
25
+ Otherwise write `Ready` and list every dependency's immutable landing or
27
26
  branch/base evidence.
28
27
  - `Branch/Base Intent`: when accepted intent exists, record the intended parent
29
28
  or base, child branch constraint, and supporting evidence. Otherwise write
@@ -32,13 +31,15 @@ Serialize both sections in every compiled spec:
32
31
  Never emit `Blocked` with `readiness: agent-ready`; blocked or unevidenced
33
32
  dependencies produce `spec-not-ready` instead.
34
33
 
34
+ ## Outcome coverage contract
35
+
35
36
  Validate the compiled traceability graph before writing:
36
37
 
37
- - every `US-###` has at least one `AC-###` whose `Covers` list names it
38
- - every `Covers` reference resolves to an existing `US-###`; a reference to a
39
- nonexistent `US-###` fails compilation
40
- - identifiers are unique and coverage is one-way from acceptance criterion to
41
- user story
38
+ - every unique `OUT-###` has at least one `AC-###`
39
+ - every `Covers` reference resolves to an existing `OUT-###`
40
+ - all `OUT-###` and `AC-###` identifiers are unique
41
+ - coverage is one-way from each acceptance criterion to its covered outcome;
42
+ outcomes do not identify or prescribe provider delivery items
42
43
 
43
44
  On failure, return one `spec-not-ready` result listing every missing decision or
44
45
  evidence item and its upstream route: `finder-phase`, `parallel-research`,
@@ -4,14 +4,15 @@ Use this reference while filling the template and before saving.
4
4
 
5
5
  ## Core rule
6
6
 
7
- The spec lives in the problem space.
7
+ A spec lives in the problem space.
8
8
 
9
- - include what, who, why, user stories, acceptance criteria, non-goals,
10
- constraints, accepted technical/testing decisions, prototype verdicts, and
11
- verification seams, `Dependency Readiness`, and `Branch/Base Intent`
9
+ - include what, who, why, requirements and outcomes, acceptance criteria,
10
+ non-goals, constraints, accepted technical and testing decisions, prototype
11
+ verdicts, verification seams, `Dependency Readiness`, and `Branch/Base Intent`
12
12
  - exclude unaccepted solution design and plan-owned files, commands, workers,
13
13
  task graph, or execution order
14
- - when the epic has child stories, include the concrete requirements of each child story instead of summarizing only the parent issue
14
+ - incorporate confirmed source evidence into unified requirements rather than
15
+ treating provider backlog items as specification identities
15
16
 
16
17
  ## Acceptance-criteria bar
17
18
 
@@ -20,40 +21,46 @@ Every acceptance criterion should be:
20
21
  - binary
21
22
  - observable
22
23
  - testable
23
- - identified as `AC-###` with one or more one-way `Covers: US-###` links
24
+ - identified as `AC-###` with one or more one-way `OUT-###` coverage links
24
25
 
25
26
  Avoid:
26
27
 
27
- - vague outcomes like "works well" or "feels intuitive"
28
+ - vague outcomes such as "works well" or "feels intuitive"
28
29
  - hidden implementation requirements disguised as product behavior
29
30
  - mixed criteria that bundle several independent outcomes into one line
30
31
 
31
32
  ## Capability completeness bar
32
33
 
33
- When compiling confirmed capability and story decisions:
34
+ When compiling confirmed capability decisions:
34
35
 
35
- - the spec is the provider-neutral authority for the capability boundary
36
- - each child story must contribute concrete requirements, constraints, or acceptance criteria
37
- - cross-story interactions must be resolved in the spec rather than left implicit in backlog items
36
+ - keep the spec as provider-neutral authority for the capability boundary
37
+ - retain concrete requirements, constraints, and acceptance criteria from all
38
+ accepted source evidence
39
+ - resolve cross-outcome interactions in the spec rather than leaving them
40
+ implicit in backlog items
41
+ - keep specification outcomes independent from provider Epic, Story, and Task
42
+ identities and cardinality
38
43
 
39
44
  Avoid:
40
45
 
41
- - a spec that omits confirmed requirements from one or more user stories
42
- - a spec that treats child stories as links only, without incorporating their product details
43
- - a spec that copies child stories separately without unifying overlaps and shared constraints
46
+ - omitting confirmed requirements from an outcome
47
+ - retaining source backlog items as links without incorporating their product
48
+ details
49
+ - copying overlapping source items separately instead of unifying them
44
50
 
45
51
  ## Self-review before saving
46
52
 
47
- - ensure frontmatter has a non-empty string `title`, especially for specs saved directly in routed Fumadocs trees
53
+ - ensure frontmatter has a non-empty string `title`, especially for specs saved
54
+ directly in routed Fumadocs trees
48
55
  - ensure frontmatter contains `readiness: agent-ready`
49
56
  - ensure `Dependency Readiness` records `No Stack Required` or `Ready` with
50
57
  evidence
51
58
  - ensure `Branch/Base Intent` records accepted parent/base constraints or
52
59
  `Not applicable`
53
- - remove all template scaffolding
54
- - remove empty or irrelevant sections
55
- - ensure the document reads cleanly with no ghost instructions
56
- - check that terminology matches the repo domain language
60
+ - ensure every outcome passes the one-way coverage contract
61
+ - remove all template scaffolding and empty irrelevant sections
62
+ - ensure the document reads cleanly without ghost instructions
63
+ - check that terminology matches repository domain language
57
64
 
58
65
  ## Field naming rule
59
66
 
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: autoreview
3
- description: "Auto Review closeout. Codex review is the default when no engine is set and is the recommended reviewer."
3
+ description: "Auto Review closeout. Codex review defaults to gpt-5.6-terra with high reasoning when no reviewer settings are set."
4
4
  ---
5
5
 
6
6
  # Auto Review
7
7
 
8
8
  Run the bundled structured review helper as a closeout check. This is code review, not Guardian `auto_review` approval routing.
9
9
 
10
- Codex review is the default when no engine is set. It usually delivers the best review results and should remain the normal final closeout engine.
10
+ Codex review is the default when no engine is set, using gpt-5.6-terra with high reasoning unless explicitly overridden. It usually delivers the best review results and should remain the normal final closeout engine.
11
11
 
12
12
  Use when:
13
13
 
@@ -1007,6 +1007,9 @@ def reviewer_args(args: argparse.Namespace) -> list[argparse.Namespace]:
1007
1007
  seen.add(engine)
1008
1008
  model = inline_model or model_by_engine.get(engine) or global_model
1009
1009
  thinking = inline_thinking or thinking_by_engine.get(engine) or global_thinking
1010
+ if engine == "codex":
1011
+ model = model or "gpt-5.6-terra"
1012
+ thinking = thinking or "high"
1010
1013
  if thinking and thinking not in THINKING_LEVELS_BY_ENGINE[engine]:
1011
1014
  valid = ", ".join(sorted(THINKING_LEVELS_BY_ENGINE[engine])) or "none"
1012
1015
  raise SystemExit(f"invalid thinking level for {engine}: {thinking} (valid: {valid})")
@@ -0,0 +1,18 @@
1
+ ---
2
+ name: brainstorm
3
+ description: Brainstorm a bounded system from the operating agent’s perspective. Use when asked to brainstorm a system or another skill invokes `$brainstorm`.
4
+ ---
5
+
6
+ # Brainstorm
7
+
8
+ 1. Bound the system, its operator, accepted constraints, and available
9
+ evidence. Mark every unsupported premise as unknown.
10
+ 2. Operate the system from the agent's seat. Trace intake, state, control,
11
+ feedback, recovery, and handoff. Account for each applicable surface or
12
+ record why it does not apply.
13
+ 3. Derive the smallest changes that make the system agent-intuitive,
14
+ agent-ergonomic, and agent-accretive. For each candidate, state its evidence,
15
+ consequence, and unresolved tradeoff.
16
+ 4. Return the evidence-grounded observations and unresolved decisions. Completion
17
+ requires every observation to trace to evidence or an explicit unknown. They
18
+ remain candidates until the caller accepts them.
@@ -7,7 +7,7 @@ description: Requirements grilling with durable branch artifacts, glossary/axiom
7
7
 
8
8
  Use this skill to turn uncertain product, architecture, or implementation ideas into pinned requirements, canonical glossary, and domain axioms that `create-spec` can compile after closure.
9
9
 
10
- This skill composes `$domain-modeling` and `$grilling` with durable artifacts. Invoke `$domain-modeling` before the first question, then use `$grilling` for live interview behavior. Use `requirements-grill` when the result must survive as routed grill log/status/wiki knowledge.
10
+ This skill composes `$domain-modeling`, `$brainstorm`, and `$grilling` with durable artifacts. Use `requirements-grill` when the result must survive as routed grill log/status/wiki knowledge.
11
11
 
12
12
  This skill has three scoped references:
13
13
 
@@ -35,6 +35,7 @@ Both workflows can happen in one long session, but keep the responsibilities dis
35
35
  - Give `$domain-modeling` the active status glossary before the first question. Invoke it whenever a round changes terminology, relationships, or domain decisions, and persist its accepted results through `artifact-output` before continuing.
36
36
  - Inspect relevant routed learning artifacts before grilling requirements that depend on known behavior, prior bugs, project conventions, or domain facts.
37
37
  - Before `$grilling` constructs the first frontier, identify every active code- or architecture-bearing branch and complete the technical grounding in `grilling-flow`. Ground each branch in current code evidence, then ask code-grounded questions about its applicable topology, dependency direction and injection, seams, boundaries, persistence, and module shape. Each technical question states the observed constraint and the code consequence of the decision. Persist accepted design in the grill artifacts; keep `GLOSSARY.md` glossary-only.
38
+ - After technical grounding, complete `$brainstorm` before the first frontier. Add its unresolved decisions to the design tree; treat all output as candidate material until accepted. Rerun only when accepted decisions change the active system boundary.
38
39
  - Prefer conservative defaults once enough context exists.
39
40
  - If the user authorizes auto-pinning defaults, record obvious remaining defaults without needless extra questions.
40
41
  - Treat parked branches as preserved knowledge, not deleted scope.
@@ -17,15 +17,15 @@ Current Delivery views.
17
17
  One Fog records a product owner's request.
18
18
 
19
19
  1. **Business**: accepted Business grilling reuses Product Area `Knowledge` and
20
- Initiative `Reliable answers`, then enriches Epic `Source quality`. The Fog
21
- links to all three; no duplicate structure is created.
22
- 2. **Functional**: one accepted Functional child creates Story `Reader sees why
23
- an answer is trustworthy` in `V4.0`. Its body preserves the product outcome,
24
- `US-001`, `AC-001`, demonstration, evidence, and Fog provenance.
25
- 3. **Technical**: an authoritative agent-ready `SPEC.md` at a stable blob URL
26
- enriches the existing Epic and Story with immutable spec authority, then
27
- creates required Task `Expose source confidence` and Task `Render confidence
28
- explanation`. Both inherit `V4.0`; the second is blocked by the first.
20
+ Initiative `Reliable answers`. The Fog links to both; no duplicate structure
21
+ is created and the Business ceiling is not exceeded.
22
+ 2. **Functional**: accepted Functional grilling reuses that Business structure
23
+ and creates Epic `Source quality`. It never creates a Story or Task.
24
+ 3. **Requirements delivery projection**: an authoritative agent-ready `SPEC.md`
25
+ at a stable blob URL derives Story `Reader sees why an answer is trustworthy`
26
+ and the required Tasks `Expose source confidence` and `Render confidence
27
+ explanation`. The Story retains `OUT-001` and `AC-001` traceability. All
28
+ delivery items inherit `V4.0`; the second Task is blocked by the first.
29
29
 
30
30
  The Task graph has stable provider identities, no missing target, no
31
31
  future-iteration dependency, no self-edge, and no cycle. Exact readback proves