@slowcook-ai/cli 0.19.5 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/README.md +192 -28
  2. package/dist/cli.js +65 -73
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/brew/fidelity-loop.d.ts +71 -0
  5. package/dist/commands/brew/fidelity-loop.d.ts.map +1 -0
  6. package/dist/commands/brew/fidelity-loop.js +108 -0
  7. package/dist/commands/brew/fidelity-loop.js.map +1 -0
  8. package/dist/commands/brew/fidelity-phase.d.ts +49 -0
  9. package/dist/commands/brew/fidelity-phase.d.ts.map +1 -0
  10. package/dist/commands/brew/fidelity-phase.js +75 -0
  11. package/dist/commands/brew/fidelity-phase.js.map +1 -0
  12. package/dist/commands/eye/index.d.ts +2 -0
  13. package/dist/commands/eye/index.d.ts.map +1 -0
  14. package/dist/commands/eye/index.js +64 -0
  15. package/dist/commands/eye/index.js.map +1 -0
  16. package/dist/commands/eye/plan.d.ts +61 -0
  17. package/dist/commands/eye/plan.d.ts.map +1 -0
  18. package/dist/commands/eye/plan.js +81 -0
  19. package/dist/commands/eye/plan.js.map +1 -0
  20. package/dist/commands/eye/run.d.ts +19 -0
  21. package/dist/commands/eye/run.d.ts.map +1 -0
  22. package/dist/commands/eye/run.js +47 -0
  23. package/dist/commands/eye/run.js.map +1 -0
  24. package/dist/commands/eye/spec-modes.d.ts +5 -0
  25. package/dist/commands/eye/spec-modes.d.ts.map +1 -0
  26. package/dist/commands/eye/spec-modes.js +36 -0
  27. package/dist/commands/eye/spec-modes.js.map +1 -0
  28. package/dist/commands/gate/github.d.ts +27 -0
  29. package/dist/commands/gate/github.d.ts.map +1 -0
  30. package/dist/commands/gate/github.js +46 -0
  31. package/dist/commands/gate/github.js.map +1 -0
  32. package/dist/commands/gate/index.d.ts +2 -0
  33. package/dist/commands/gate/index.d.ts.map +1 -0
  34. package/dist/commands/gate/index.js +68 -0
  35. package/dist/commands/gate/index.js.map +1 -0
  36. package/dist/commands/gate/model.d.ts +55 -0
  37. package/dist/commands/gate/model.d.ts.map +1 -0
  38. package/dist/commands/gate/model.js +64 -0
  39. package/dist/commands/gate/model.js.map +1 -0
  40. package/dist/commands/gate/reviewers.d.ts +24 -0
  41. package/dist/commands/gate/reviewers.d.ts.map +1 -0
  42. package/dist/commands/gate/reviewers.js +69 -0
  43. package/dist/commands/gate/reviewers.js.map +1 -0
  44. package/dist/commands/recon/shape-preserve.d.ts +38 -0
  45. package/dist/commands/recon/shape-preserve.d.ts.map +1 -1
  46. package/dist/commands/recon/shape-preserve.js +112 -1
  47. package/dist/commands/recon/shape-preserve.js.map +1 -1
  48. package/dist/commands/refine/spec-yaml.d.ts +3 -0
  49. package/dist/commands/refine/spec-yaml.d.ts.map +1 -1
  50. package/dist/commands/refine/spec-yaml.js +4 -0
  51. package/dist/commands/refine/spec-yaml.js.map +1 -1
  52. package/dist/commands/serve/config.d.ts +159 -0
  53. package/dist/commands/serve/config.d.ts.map +1 -0
  54. package/dist/commands/serve/config.js +216 -0
  55. package/dist/commands/serve/config.js.map +1 -0
  56. package/dist/commands/serve/detect.d.ts +31 -0
  57. package/dist/commands/serve/detect.d.ts.map +1 -0
  58. package/dist/commands/serve/detect.js +56 -0
  59. package/dist/commands/serve/detect.js.map +1 -0
  60. package/dist/commands/serve/dev.d.ts +46 -0
  61. package/dist/commands/serve/dev.d.ts.map +1 -0
  62. package/dist/commands/serve/dev.js +122 -0
  63. package/dist/commands/serve/dev.js.map +1 -0
  64. package/dist/commands/serve/index.d.ts +28 -0
  65. package/dist/commands/serve/index.d.ts.map +1 -0
  66. package/dist/commands/serve/index.js +224 -0
  67. package/dist/commands/serve/index.js.map +1 -0
  68. package/dist/commands/serve/mock.d.ts +24 -0
  69. package/dist/commands/serve/mock.d.ts.map +1 -0
  70. package/dist/commands/serve/mock.js +111 -0
  71. package/dist/commands/serve/mock.js.map +1 -0
  72. package/dist/commands/serve/runner.d.ts +52 -0
  73. package/dist/commands/serve/runner.d.ts.map +1 -0
  74. package/dist/commands/serve/runner.js +53 -0
  75. package/dist/commands/serve/runner.js.map +1 -0
  76. package/dist/commands/serve/staging.d.ts +28 -0
  77. package/dist/commands/serve/staging.d.ts.map +1 -0
  78. package/dist/commands/serve/staging.js +152 -0
  79. package/dist/commands/serve/staging.js.map +1 -0
  80. package/dist/commands/stories/index.d.ts +15 -0
  81. package/dist/commands/stories/index.d.ts.map +1 -0
  82. package/dist/commands/stories/index.js +280 -0
  83. package/dist/commands/stories/index.js.map +1 -0
  84. package/dist/commands/stories/status.d.ts +74 -0
  85. package/dist/commands/stories/status.d.ts.map +1 -0
  86. package/dist/commands/stories/status.js +176 -0
  87. package/dist/commands/stories/status.js.map +1 -0
  88. package/dist/commands/upsert-agent-docs.d.ts.map +1 -1
  89. package/dist/commands/upsert-agent-docs.js +12 -0
  90. package/dist/commands/upsert-agent-docs.js.map +1 -1
  91. package/dist/commands.manifest.d.ts +37 -0
  92. package/dist/commands.manifest.d.ts.map +1 -0
  93. package/dist/commands.manifest.js +301 -0
  94. package/dist/commands.manifest.js.map +1 -0
  95. package/dist/help.d.ts +43 -0
  96. package/dist/help.d.ts.map +1 -0
  97. package/dist/help.js +131 -0
  98. package/dist/help.js.map +1 -0
  99. package/package.json +8 -6
@@ -0,0 +1,176 @@
1
+ /**
2
+ * `slowcook stories status` pure helper — 0.19.5-α (sc#146 #6).
3
+ *
4
+ * Cross-references the consumer's `specs/_index.yaml` against PR/label
5
+ * facts to produce a per-story stage table. Pure function — no fs, no
6
+ * network. The CLI wrapper (`./index.ts`) gathers the inputs.
7
+ *
8
+ * Stage mapping (per slowcook conventions):
9
+ *
10
+ * | Stage | Slowcook label evidence |
11
+ * |---------|-------------------------------|
12
+ * | refine | a `slowcook-spec` PR exists |
13
+ * | testgen | a `slowcook-tests` PR exists |
14
+ * | vibe | a `slowcook-mockup` PR exists |
15
+ * | brew | a `slowcook-brew` PR exists |
16
+ * | chef | a `slowcook-chef` PR exists |
17
+ *
18
+ * Per-stage cell semantics:
19
+ *
20
+ * - `✓` — a PR with the matching label exists AND is merged
21
+ * - `→` — a PR with the matching label exists AND is open
22
+ * - `✗` — a PR was opened but closed unmerged
23
+ * - `—` — no PR found for this stage
24
+ *
25
+ * For consumers running the local-pipeline pattern (see
26
+ * `docs/local-pipeline-role.md`), the slowcook labels may not be
27
+ * applied to human-driven PRs. In that case the helper falls back
28
+ * to matching by PR-branch-name (`slowcook/<kind>/story-N` →
29
+ * stage=<kind>).
30
+ *
31
+ * Gantt-style stage-by-stage output is parked for a follow-up
32
+ * (sc#146 #6 acceptance: "Defer the Gantt-style output to a follow-up.
33
+ * Just ship the underlying table first.").
34
+ */
35
+ const STAGE_LABEL_MAP = {
36
+ refine: "slowcook-spec",
37
+ testgen: "slowcook-tests",
38
+ vibe: "slowcook-mockup",
39
+ brew: "slowcook-brew",
40
+ chef: "slowcook-chef",
41
+ };
42
+ /**
43
+ * Branch-name → stage map, used when labels are absent (the
44
+ * local-pipeline pattern doesn't always apply labels to human PRs).
45
+ *
46
+ * `slowcook/<kind>/story-N` → kind.
47
+ */
48
+ const BRANCH_KIND_TO_STAGE = {
49
+ spec: "refine",
50
+ tests: "testgen",
51
+ mockup: "vibe",
52
+ brew: "brew",
53
+ chef: "chef",
54
+ };
55
+ /**
56
+ * Build the status table for every story in the index.
57
+ *
58
+ * @param specIndex - the parsed `specs/_index.yaml` content
59
+ * @param pullRequests - all PRs in the repo (merged + open + closed-unmerged).
60
+ * The CLI wrapper passes the union of label-matched
61
+ * results; pass an empty array if GH access is
62
+ * unavailable + the row will report all stages as
63
+ * absent (still useful for spec-only summary).
64
+ */
65
+ export function buildStoriesStatus(specIndex, pullRequests) {
66
+ const rows = [];
67
+ const stories = specIndex.stories ?? {};
68
+ for (const [storyId, entry] of Object.entries(stories)) {
69
+ rows.push({
70
+ storyId,
71
+ title: entry.title,
72
+ status: entry.status,
73
+ sourceIssue: entry.source_issue,
74
+ stages: {
75
+ refine: stageStateForStory(storyId, "refine", pullRequests),
76
+ testgen: stageStateForStory(storyId, "testgen", pullRequests),
77
+ vibe: stageStateForStory(storyId, "vibe", pullRequests),
78
+ brew: stageStateForStory(storyId, "brew", pullRequests),
79
+ chef: stageStateForStory(storyId, "chef", pullRequests),
80
+ },
81
+ });
82
+ }
83
+ // Sort by story id ascending (lexicographic — works because ids are
84
+ // zero-padded strings in the convention).
85
+ rows.sort((a, b) => a.storyId.localeCompare(b.storyId));
86
+ return rows;
87
+ }
88
+ function stageStateForStory(storyId, stage, prs) {
89
+ const label = STAGE_LABEL_MAP[stage];
90
+ // Story id appears in PR title (slowcook bot convention) OR in branch
91
+ // name (slowcook/<kind>/story-N pattern).
92
+ const storyTitleRe = new RegExp(`\\bstory-${escapeRegex(storyId)}\\b`);
93
+ const storyBranchRe = new RegExp(`/story-${escapeRegex(storyId)}(?:-|$|/)`);
94
+ const matches = prs.filter((pr) => {
95
+ const titleMatches = storyTitleRe.test(pr.title);
96
+ const branchMatches = storyBranchRe.test(pr.headBranch);
97
+ if (!titleMatches && !branchMatches)
98
+ return false;
99
+ // Stage match: label OR branch-kind fallback.
100
+ if (pr.labels.includes(label))
101
+ return true;
102
+ // Fallback: branch shaped slowcook/<kind>/story-N — derive stage.
103
+ const branchKind = pr.headBranch.match(/^slowcook\/([a-z]+)\//)?.[1];
104
+ if (branchKind && BRANCH_KIND_TO_STAGE[branchKind] === stage)
105
+ return true;
106
+ return false;
107
+ });
108
+ if (matches.length === 0)
109
+ return "absent";
110
+ if (matches.some((m) => m.merged))
111
+ return "merged";
112
+ if (matches.some((m) => m.state === "open"))
113
+ return "open";
114
+ return "closed_unmerged";
115
+ }
116
+ function escapeRegex(s) {
117
+ return s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
118
+ }
119
+ /**
120
+ * Render a status row set as an ASCII-art table. Used by the CLI
121
+ * wrapper's stdout. Pure function — no colour codes, no terminal
122
+ * width detection.
123
+ */
124
+ export function renderStoriesStatusTable(rows) {
125
+ if (rows.length === 0)
126
+ return "(no stories in specs/_index.yaml)\n";
127
+ const cellGlyph = {
128
+ merged: "✓",
129
+ open: "→",
130
+ closed_unmerged: "✗",
131
+ absent: "—",
132
+ };
133
+ // Column widths (story id, title — truncate title at 50 chars).
134
+ const storyW = Math.max(5, ...rows.map((r) => r.storyId.length));
135
+ const titleW = Math.min(50, Math.max(5, ...rows.map((r) => Math.min(50, r.title.length))));
136
+ const stageW = 8; // "testgen" is widest header (7 chars) — add 1 for spacing
137
+ const sep = (w) => "─".repeat(w);
138
+ const header = pad("Story", storyW) +
139
+ " " +
140
+ pad("Title", titleW) +
141
+ " " +
142
+ "refine".padEnd(stageW) +
143
+ "testgen".padEnd(stageW) +
144
+ "vibe".padEnd(stageW) +
145
+ "brew".padEnd(stageW) +
146
+ "chef".padEnd(stageW);
147
+ const divider = sep(storyW) +
148
+ " " +
149
+ sep(titleW) +
150
+ " " +
151
+ sep(stageW - 1) + " " +
152
+ sep(stageW - 1) + " " +
153
+ sep(stageW - 1) + " " +
154
+ sep(stageW - 1) + " " +
155
+ sep(stageW - 1);
156
+ const lines = [header, divider];
157
+ for (const row of rows) {
158
+ const truncatedTitle = row.title.length > titleW ? row.title.slice(0, titleW - 1) + "…" : row.title;
159
+ lines.push(pad(row.storyId, storyW) +
160
+ " " +
161
+ pad(truncatedTitle, titleW) +
162
+ " " +
163
+ cellGlyph[row.stages.refine].padEnd(stageW) +
164
+ cellGlyph[row.stages.testgen].padEnd(stageW) +
165
+ cellGlyph[row.stages.vibe].padEnd(stageW) +
166
+ cellGlyph[row.stages.brew].padEnd(stageW) +
167
+ cellGlyph[row.stages.chef].padEnd(stageW));
168
+ }
169
+ lines.push("");
170
+ lines.push("Legend: ✓ merged · → open · ✗ closed-unmerged · — absent");
171
+ return lines.join("\n") + "\n";
172
+ }
173
+ function pad(s, w) {
174
+ return s.length >= w ? s : s + " ".repeat(w - s.length);
175
+ }
176
+ //# sourceMappingURL=status.js.map
@@ -0,0 +1 @@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,GAAG,iBAAiB,GAAG,WAAW,CAAC;IAClD,SAAS,EAAE,OAAO,GAAG,iBAAiB,GAAG,cAAc,CAAC;CACzD;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,qBAAqB,CAsB5G;AAID,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAUnE"}
1
+ {"version":3,"file":"upsert-agent-docs.d.ts","sourceRoot":"","sources":["../../src/commands/upsert-agent-docs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAmBH,wBAAgB,iBAAiB,IAAI,MAAM,CA0K1C;AAmGD,MAAM,WAAW,qBAAqB;IACpC,aAAa,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,WAAW,CAAA;KAAE,CAAC,CAAC;IACtF,MAAM,EAAE,OAAO,GAAG,iBAAiB,GAAG,WAAW,CAAC;IAClD,SAAS,EAAE,OAAO,GAAG,iBAAiB,GAAG,cAAc,CAAC;CACzD;AAED,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,GAAE;IAAE,MAAM,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,qBAAqB,CAsB5G;AAID,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAUnE"}
@@ -137,6 +137,18 @@ Full doc: [\`docs/local-pipeline-role.md\`](https://github.com/aminazar/slowcook
137
137
 
138
138
  Recorded sc#145 finding 6 — pattern emerged from the delgoosh dogfood (2026-05) and shipped 5 batches of slowcook feedback as a side effect.
139
139
 
140
+ ### HITL review gates — you cannot self-advance past one (design #9)
141
+
142
+ Some stage transitions are gated on a HUMAN review by a named role (PM / designer / QA), configured in \`.brewing/reviewers.yaml\`. Default gates: refine spec → PM; vibe/plate mock → designer; brew output → QA + designer.
143
+
144
+ This is a HARD halt, and the integrity of it depends on you NOT bypassing it:
145
+ - **Do not advance a story past a gated stage until \`slowcook gate check --stage <stage> --pr <n>\` exits 0.** Run it; don't assume.
146
+ - **Your own approval does NOT count, and you must not manufacture one.** A valid approval is a GitHub PR review (state \`APPROVED\`) from a *human* handle listed for the required role. Reviews from \`slowcook-*[bot]\`, \`github-actions\`, or the agent identity are classified as bot and never satisfy a gate — do not try to approve your own PR, ask a teammate to "rubber-stamp", or label your way around the gate.
147
+ - **A \`CHANGES_REQUESTED\` from a required-role human is a hard stop.** Address it and re-request review; loop back to the gate's \`on_reject_target\` stage (designer reject of a mock → back to plate, not forward to brew).
148
+ - **If a gate blocks you, surface it to the PM** ("blocked-on-\<role\>: needs designer approval on PR #N") rather than working around it. The gate exists because the human's eyes are the contract at that point.
149
+
150
+ The bot pipeline enforces the same gate via \`.github/workflows/slowcook-gate.yml\`; the local pipeline enforces it by your honouring this section.
151
+
140
152
  ### Working alongside other agents (multi-agent choreography)
141
153
 
142
154
  When your work depends on another agent's still-open PR — common when one agent owns the app shell + another owns a feature inside it — follow this:
@@ -1 +1 @@
1
- {"version":3,"file":"upsert-agent-docs.js","sourceRoot":"","sources":["../../src/commands/upsert-agent-docs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AAEH,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAe,aAAa,EAAE,MAAM,SAAS,CAAC;AAC1F,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,YAAY,GAAG,8EAA8E,CAAC;AACpG,MAAM,UAAU,GAAG,qDAAqD,CAAC;AAEzE;uEACuE;AACvE,MAAM,mBAAmB,GAAG;IAC1B,WAAW;IACX,WAAW;IACX,cAAc;IACd,gBAAgB;IAChB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AAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACrC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,MAAM,IAAI,GAAG,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACzB,IAAI,CAAC,KAAK,OAAO,IAAI,IAAI,EAAE,CAAC;YAAC,QAAQ,GAAG,IAAI,CAAC;YAAC,CAAC,EAAE,CAAC;QAAC,CAAC;aAC/C,IAAI,CAAC,KAAK,WAAW,EAAE,CAAC;YAAC,MAAM,GAAG,IAAI,CAAC;QAAC,CAAC;aACzC,IAAI,CAAC,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI,EAAE,CAAC;YAAC,IAAI,GAAG,IAAI,CAAC;QAAC,CAAC;IACzD,CAAC;IACD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AACpC,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,CAAC,GAAG,CAAC;;;;;;;;;;;;;;CAcb,CAAC,CAAC;AACH,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * `packages/cli/src/commands.manifest.ts`
3
+ *
4
+ * Single source of truth for slowcook's user-facing command surface.
5
+ * Drives BOTH `slowcook help` output AND the auto-generated command
6
+ * catalog in `packages/cli/README.md`.
7
+ *
8
+ * Adding a command: append an entry below. Update both `slowcook help`
9
+ * AND README sync at the same time via the CI gate in
10
+ * `.github/workflows/readme-help-sync.yml`.
11
+ *
12
+ * Removing a command: don't. Mark `status: "deprecated"` + keep the
13
+ * entry for one release with a deprecation warning, then remove.
14
+ * Backward compat is a public commitment.
15
+ */
16
+ export type CommandStatus = "stable" | "alpha" | "experimental" | "deprecated";
17
+ export type CommandGroup = "pipeline" | "plumbing" | "checks" | "knowledge" | "ops" | "experimental";
18
+ export interface CommandEntry {
19
+ /** Top-level subcommand name (e.g. "refine", "brew", "stories"). */
20
+ name: string;
21
+ /** One-line usage signature shown in `slowcook help`. */
22
+ usage: string;
23
+ /** One-sentence description. Avoid version stamps + sc# refs (those rot). */
24
+ description: string;
25
+ /** Grouping for README catalog rendering. */
26
+ group: CommandGroup;
27
+ /** Stability marker. Defaults to "stable" if omitted. */
28
+ status?: CommandStatus;
29
+ /** Aliases honored by the cli's switch (e.g. "testgen" → "recipe"). */
30
+ aliases?: string[];
31
+ /** Hide from `slowcook help` + README (still callable). Used for `version`, `help`. */
32
+ hidden?: boolean;
33
+ }
34
+ export declare const COMMANDS: ReadonlyArray<CommandEntry>;
35
+ export declare function findCommand(nameOrAlias: string): CommandEntry | undefined;
36
+ export declare function visibleCommands(): CommandEntry[];
37
+ //# sourceMappingURL=commands.manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.manifest.d.ts","sourceRoot":"","sources":["../src/commands.manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,OAAO,GAAG,cAAc,GAAG,YAAY,CAAC;AAE/E,MAAM,MAAM,YAAY,GACpB,UAAU,GACV,UAAU,GACV,QAAQ,GACR,WAAW,GACX,KAAK,GACL,cAAc,CAAC;AAEnB,MAAM,WAAW,YAAY;IAC3B,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC;IACd,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,KAAK,EAAE,YAAY,CAAC;IACpB,yDAAyD;IACzD,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,uEAAuE;IACvE,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,uFAAuF;IACvF,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,QAAQ,EAAE,aAAa,CAAC,YAAY,CAoRhD,CAAC;AAWF,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAEzE;AAED,wBAAgB,eAAe,IAAI,YAAY,EAAE,CAEhD"}
@@ -0,0 +1,301 @@
1
+ /**
2
+ * `packages/cli/src/commands.manifest.ts`
3
+ *
4
+ * Single source of truth for slowcook's user-facing command surface.
5
+ * Drives BOTH `slowcook help` output AND the auto-generated command
6
+ * catalog in `packages/cli/README.md`.
7
+ *
8
+ * Adding a command: append an entry below. Update both `slowcook help`
9
+ * AND README sync at the same time via the CI gate in
10
+ * `.github/workflows/readme-help-sync.yml`.
11
+ *
12
+ * Removing a command: don't. Mark `status: "deprecated"` + keep the
13
+ * entry for one release with a deprecation warning, then remove.
14
+ * Backward compat is a public commitment.
15
+ */
16
+ export const COMMANDS = [
17
+ // --- Pipeline ---
18
+ {
19
+ name: "refine",
20
+ usage: "slowcook refine --issue <number> [--cwd <path>] [--owner <login>] [--repo <name>]",
21
+ description: "Drive a GitHub issue through a clarifying-question loop until a frozen spec PR is emitted.",
22
+ group: "pipeline",
23
+ },
24
+ {
25
+ name: "recipe",
26
+ usage: "slowcook recipe [--spec <id>] [--all] [--cwd <path>]",
27
+ description: "Generate Vitest tests from merged specs — the test contract brew follows.",
28
+ group: "pipeline",
29
+ aliases: ["testgen"],
30
+ },
31
+ {
32
+ name: "vibe",
33
+ usage: "slowcook vibe --spec <id> [--cwd <path>] [--owner <login>] [--repo <name>] [--dry-run]",
34
+ description: "Design-first mockup generator. Emits a runnable React mockup PR from spec + brownfield context.",
35
+ group: "pipeline",
36
+ },
37
+ {
38
+ name: "plate",
39
+ usage: "slowcook plate --pr <number> [--cwd <path>] [--owner <login>] [--repo <name>] [--review-comment-id <id>]",
40
+ description: "Mockup amendment agent. Triggered by /plate PR comments on slowcook-mockup PRs; force-pushes amendments.",
41
+ group: "pipeline",
42
+ },
43
+ {
44
+ name: "brew",
45
+ usage: "slowcook brew --story <id> [--budget-usd <n>] [--max-iterations <n>] [--model <id>]",
46
+ description: "Ratcheted implementation loop: iterate src/ until all of one story's tests are green.",
47
+ group: "pipeline",
48
+ },
49
+ {
50
+ name: "chef",
51
+ usage: "slowcook chef --pr <number> [--cwd <path>]",
52
+ description: "PR-CI failure classifier — dispatches retry / escalate based on check status.",
53
+ group: "pipeline",
54
+ },
55
+ {
56
+ name: "chef-drift",
57
+ usage: "slowcook chef-drift [--pr <number>] [--story <id>] [--cwd <path>]",
58
+ description: "Surgical drift-fixer. Triggered by mock-isolation / recon / brew / navigator halts.",
59
+ group: "pipeline",
60
+ },
61
+ {
62
+ name: "chef-orchestrate",
63
+ usage: "slowcook chef-orchestrate --pr <number> --story <id> [--cwd <path>]",
64
+ description: "Pipeline orchestrator. Decides redispatch_brew / rebase / escalate / close on a halted PR.",
65
+ group: "pipeline",
66
+ },
67
+ // --- Plumbing ---
68
+ {
69
+ name: "init",
70
+ usage: "slowcook init [--owner <handle>] [--force] [--dry-run] [--cwd <path>]",
71
+ description: "Scaffold .brewing/, .github/workflows/slowcook-*, and CODEOWNERS in a consumer project.",
72
+ group: "plumbing",
73
+ },
74
+ {
75
+ name: "refresh-knowledge",
76
+ usage: "slowcook refresh-knowledge [--cwd <path>] [--auto-only] [--curated-only]",
77
+ description: "Rebuild .brewing/repo-knowledge/{auto,curated}/ — code-shape digests + git-history mining.",
78
+ group: "plumbing",
79
+ },
80
+ {
81
+ name: "upsert-agent-docs",
82
+ usage: "slowcook upsert-agent-docs [--cwd <path>] [--dry-run]",
83
+ description: "Write the managed slowcook block in the consumer's AGENTS.md (or create one).",
84
+ group: "plumbing",
85
+ },
86
+ {
87
+ name: "knowledge",
88
+ usage: "slowcook knowledge add <topic> \"<entry>\" [--evidence-pr <n>] [--evidence-file <path>]",
89
+ description: "Add a curated entry to .brewing/repo-knowledge/curated/.",
90
+ group: "knowledge",
91
+ },
92
+ {
93
+ name: "cost",
94
+ usage: "slowcook cost log --story <id> --usd <n> --agent <name> [--apply-to-spec]",
95
+ description: "Stamp a cost marker on a story for non-Actions agents (Claude Code, Cursor, manual runs).",
96
+ group: "knowledge",
97
+ },
98
+ {
99
+ name: "stories",
100
+ usage: "slowcook stories status [--cwd <path>] [--owner <login>] [--repo <name>] [--json]",
101
+ description: "Per-story pipeline-stage table (refine / testgen / vibe / brew / chef) from specs/_index.yaml + GitHub state.",
102
+ group: "knowledge",
103
+ status: "alpha",
104
+ },
105
+ // --- Checks ---
106
+ {
107
+ name: "guard",
108
+ usage: "slowcook guard --base <ref> --head <ref> [--override] [--config <path>]",
109
+ description: "Check for frozen-path violations between two git refs. CI step.",
110
+ group: "checks",
111
+ },
112
+ {
113
+ name: "manifest",
114
+ usage: "slowcook manifest (record|verify) [--stack-config <path>] [--manifest <path>] [--story <id>]",
115
+ description: "Record or verify the set of discoverable tests so agents can't silently exclude them.",
116
+ group: "checks",
117
+ },
118
+ {
119
+ name: "check",
120
+ usage: "slowcook check (mock-isolation|spec) [file...] [--cwd <path>]",
121
+ description: "Static structural checks. `check spec` re-runs spec validators on PR amendments; `check mock-isolation` enforces the mock-vs-prod boundary.",
122
+ group: "checks",
123
+ },
124
+ {
125
+ name: "recon",
126
+ usage: "slowcook recon [--story <id>] [--cwd <path>] [--reuse-scan] [--stub-scan] [--exclude <glob>]",
127
+ description: "Pre-brew structural divergence check. Surfaces missing components / testid gaps / brownfield rename hazards.",
128
+ group: "checks",
129
+ },
130
+ {
131
+ name: "eye",
132
+ usage: "slowcook eye --reference <url> --candidate <url> [--out <dir>] [--viewport <m>] [--scheme <s>] [--max-violations <n>] [--fail-on <axes>]",
133
+ description: "Fidelity eye (design #8). Renders mock + brewed URLs across the viewport×scheme matrix, grades visual drift, screenshots, exits 1 on drift.",
134
+ group: "checks",
135
+ },
136
+ {
137
+ name: "gate",
138
+ usage: "slowcook gate check --stage <refine|plate|brew> --pr <n> [--repo <owner/name>]",
139
+ description: "HITL review halt (design #9). Refuses to advance a stage until a human in the required role has approved on the PR; bot/agent reviews never satisfy it.",
140
+ group: "checks",
141
+ },
142
+ {
143
+ name: "map",
144
+ usage: "slowcook map (generate|check) [--cwd <path>] [--out <path>] [--md <path>]",
145
+ description: "Generate / check the repo-wide code map (APIs, pages, components, helpers, types).",
146
+ group: "checks",
147
+ },
148
+ // --- Ops ---
149
+ {
150
+ name: "serve",
151
+ usage: "slowcook serve <profile> (up|sync|down|logs|reset) [--branch <name>] [--scenario <name>] [--service <name>] [--follow] [--prune]",
152
+ description: "Multi-mode dev / mock / staging on a shared box. `dev` bind-mounts source; `mock` runs vite-dev (auto-skip if no scripts.dev); `staging` is built-image with named-scenario seed reset.",
153
+ group: "ops",
154
+ status: "alpha",
155
+ },
156
+ {
157
+ name: "dev-env",
158
+ usage: "slowcook dev-env (push|switch|up|sync|reset) [--story <id>] [--branch <name>]",
159
+ description: "Legacy alias for `slowcook serve dev`. Bind-mount source push + per-story preview switch. Kept for backward compat.",
160
+ group: "ops",
161
+ status: "deprecated",
162
+ },
163
+ {
164
+ name: "preview",
165
+ usage: "slowcook preview (deploy|teardown) --pr <number> [--ssh-key <path>] [--cwd <path>]",
166
+ description: "SSH preview deploy. `deploy --pr N`: build + run the mock app on the consumer's box; post URL to PR.",
167
+ group: "ops",
168
+ },
169
+ {
170
+ name: "run-mock",
171
+ usage: "slowcook run-mock <story-id> [--no-poll] [--poll-seconds <n>] [--branch <ref>]",
172
+ description: "One-command mock launch + auto-pull. Polls origin + git pull --ff-only on plate amendments.",
173
+ group: "ops",
174
+ },
175
+ {
176
+ name: "dispatch",
177
+ usage: "slowcook dispatch <step> [inputs...]",
178
+ description: "Trigger a slowcook GitHub Actions workflow remotely (brew / testgen / refine).",
179
+ group: "ops",
180
+ },
181
+ {
182
+ name: "port",
183
+ usage: "slowcook port --story <id> [--cwd <path>] [--dry-run] [--force]",
184
+ description: "Deterministic mock/ → src/ copy. Pre-brew CI step; applies the useScenarioFixture → useDataDomain rewrite.",
185
+ group: "ops",
186
+ },
187
+ // --- Lifecycle hooks (workflow-driven, not usually invoked by humans) ---
188
+ {
189
+ name: "on-spec-merged",
190
+ usage: "slowcook on-spec-merged --pr <number> [--cwd <path>]",
191
+ description: "Transition source-issue labels + post audit-trail comment after a spec PR merges.",
192
+ group: "plumbing",
193
+ },
194
+ {
195
+ name: "on-tests-merged",
196
+ usage: "slowcook on-tests-merged --pr <number> [--cwd <path>]",
197
+ description: "Post audit-trail comment after a tests PR merges.",
198
+ group: "plumbing",
199
+ },
200
+ {
201
+ name: "on-brew-merged",
202
+ usage: "slowcook on-brew-merged --pr <number> [--cwd <path>]",
203
+ description: "Post final \"shipped\" audit-trail comment after a brew PR merges. Warns when merge target isn't main.",
204
+ group: "plumbing",
205
+ },
206
+ {
207
+ name: "on-mockup-approved",
208
+ usage: "slowcook on-mockup-approved --pr <number> [--cwd <path>]",
209
+ description: "Hook fired when a mockup PR gets the slowcook-mockup-approved label.",
210
+ group: "plumbing",
211
+ },
212
+ // --- Bug flow ---
213
+ {
214
+ name: "investigate",
215
+ usage: "slowcook investigate --issue <number> [--cwd <path>]",
216
+ description: "Diagnose a bug from a GitHub issue and emit a bug-profile.",
217
+ group: "experimental",
218
+ status: "alpha",
219
+ },
220
+ {
221
+ name: "sift",
222
+ usage: "slowcook sift --bug-profile <path> [--cwd <path>]",
223
+ description: "Narrow red→green ratchet for a bug fix; bounded by bug-profile fix_scope.",
224
+ group: "experimental",
225
+ status: "alpha",
226
+ },
227
+ // --- Misc + experimental ---
228
+ {
229
+ name: "extract",
230
+ usage: "slowcook extract [--schema] [--tokens] [--cwd <path>]",
231
+ description: "Brownfield extracts (schema.mmd, tokens.md) for refine/investigate context. Fast, no node_modules.",
232
+ group: "knowledge",
233
+ },
234
+ {
235
+ name: "catchup",
236
+ usage: "slowcook catchup [--dry-run] [--cwd <path>]",
237
+ description: "Detect + run pipeline steps that should have triggered but didn't.",
238
+ group: "plumbing",
239
+ },
240
+ {
241
+ name: "refactor",
242
+ usage: "slowcook refactor [--scope <name>] [--cwd <path>]",
243
+ description: "Rank refactor proposals from .brewing/refactor/proposals.json by benefit/cost.",
244
+ group: "experimental",
245
+ },
246
+ {
247
+ name: "garnish",
248
+ usage: "slowcook garnish [--cwd <path>]",
249
+ description: "Local commit-gate for human tweaks on agent work. Runs tests, commits with learning-signal trailers.",
250
+ group: "experimental",
251
+ },
252
+ {
253
+ name: "budget",
254
+ usage: "slowcook budget [show|set|rm] [--monthly <usd>] [--start-day <1-31>] [--story <usd>] [--cwd <path>]",
255
+ description: "Manage the project monthly budget for the fuel gauge.",
256
+ group: "plumbing",
257
+ },
258
+ {
259
+ name: "brand",
260
+ usage: "slowcook brand [--brief <prose>] [--refresh] [--dry-run] [--model <id>] [--cwd <path>]",
261
+ description: "Design-system foundation agent. Emits mock/src/design-system/{tokens.ts, css.ts} from a brand brief.",
262
+ group: "pipeline",
263
+ },
264
+ {
265
+ name: "fixtures",
266
+ usage: "slowcook fixtures check [--max-age-days <n>] [--story <id>]",
267
+ description: "Sanity-check the test-fixture set against the spec.",
268
+ group: "checks",
269
+ },
270
+ {
271
+ name: "eval",
272
+ usage: "slowcook eval (--all | --fixture <id> | --list) [--fixtures-dir <path>]",
273
+ description: "Run the agent eval suite against committed fixtures.",
274
+ group: "checks",
275
+ },
276
+ {
277
+ name: "docs",
278
+ usage: "slowcook docs [--cwd <path>]",
279
+ description: "Docs generation helper.",
280
+ group: "plumbing",
281
+ },
282
+ // --- Hidden built-ins ---
283
+ { name: "version", usage: "slowcook version", description: "Print the CLI version.", group: "plumbing", hidden: true },
284
+ { name: "help", usage: "slowcook help [<command>]", description: "Show this help (or per-command usage).", group: "plumbing", hidden: true },
285
+ ];
286
+ const NAME_OR_ALIAS_INDEX = (() => {
287
+ const m = new Map();
288
+ for (const cmd of COMMANDS) {
289
+ m.set(cmd.name, cmd);
290
+ for (const alias of cmd.aliases ?? [])
291
+ m.set(alias, cmd);
292
+ }
293
+ return m;
294
+ })();
295
+ export function findCommand(nameOrAlias) {
296
+ return NAME_OR_ALIAS_INDEX.get(nameOrAlias);
297
+ }
298
+ export function visibleCommands() {
299
+ return COMMANDS.filter((c) => !c.hidden);
300
+ }
301
+ //# sourceMappingURL=commands.manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commands.manifest.js","sourceRoot":"","sources":["../src/commands.manifest.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA6BH,MAAM,CAAC,MAAM,QAAQ,GAAgC;IACnD,mBAAmB;IACnB;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,mFAAmF;QAC1F,WAAW,EAAE,4FAA4F;QACzG,KAAK,EAAE,UAAU;KAClB;IACD;QACE,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,sDAAsD;QAC7D,WAAW,EAAE,2EAA2E;QACxF,KAAK,EAAE,UAAU;QACjB,OAAO,EAAE,CAAC,SAAS,CAAC;KACrB;IACD;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,wFAAwF;QAC/F,WAAW,EAAE,iGAAiG;QAC9G,KAAK,EAAE,UAAU;KAClB;IACD;QACE,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,0GAA0G;QACjH,WAAW,EAAE,0GAA0G;QACvH,KAAK,EAAE,UAAU;KAClB;IACD;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,qFAAqF;QAC5F,WAAW,EAAE,uFAAuF;QACpG,KAAK,EAAE,UAAU;KAClB;IACD;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,4CAA4C;QACnD,WAAW,EAAE,+EAA+E;QAC5F,KAAK,EAAE,UAAU;KAClB;IACD;QACE,IAAI,EAAE,YAAY;QAClB,KAAK,EAAE,mEAAmE;QAC1E,WAAW,EAAE,qFAAqF;QAClG,KAAK,EAAE,UAAU;KAClB;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,qEAAqE;QAC5E,WAAW,EAAE,4FAA4F;QACzG,KAAK,EAAE,UAAU;KAClB;IAED,mBAAmB;IACnB;QACE,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,uEAAuE;QAC9E,WAAW,EAAE,yFAAyF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li/src/help.ts` — render the command manifest into the
3
+ * two surfaces consumers see:
4
+ *
5
+ * 1. `slowcook help` — plain-text terminal output (what `cli.ts` emits)
6
+ * 2. README catalog block — markdown spliced into packages/cli/README.md
7
+ *
8
+ * Both come from `COMMANDS` in `./commands.manifest.ts`. Adding a
9
+ * command in one place updates both surfaces.
10
+ */
11
+ /**
12
+ * Plain-text help block for `slowcook help`.
13
+ *
14
+ * Format (preserves the existing 0.19 shape — backward compat with any
15
+ * tool that greps `slowcook help` output):
16
+ *
17
+ * slowcook — TDD-first agentic development harness
18
+ *
19
+ * Usage:
20
+ * <usage lines>
21
+ *
22
+ * Commands available in <version>:
23
+ * <name> <description>
24
+ *
25
+ * Docs: https://github.com/aminazar/slowcook
26
+ */
27
+ export declare function renderHelp(version: string): string;
28
+ /**
29
+ * Per-command help (shown by `slowcook help <cmd>` or future
30
+ * standardized `slowcook <cmd> --help` shims). Returns `undefined`
31
+ * if the name is unknown so the caller can decide on the fallback.
32
+ */
33
+ export declare function renderCommandHelp(nameOrAlias: string): string | undefined;
34
+ /**
35
+ * Markdown catalog block spliced into packages/cli/README.md between
36
+ * `<!-- COMMANDS BLOCK BEGIN -->` and `<!-- COMMANDS BLOCK END -->` by
37
+ * `scripts/sync-readme-help.sh`.
38
+ *
39
+ * Grouped by `CommandGroup`; one bullet per command with name + usage
40
+ * + description. Hidden commands (version, help) excluded.
41
+ */
42
+ export declare function renderReadmeBlock(): string;
43
+ //# sourceMappingURL=help.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AA0CH;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAuBlD;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAczE;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,IAAI,MAAM,CAgB1C"}