cclaw-cli 0.51.29 → 0.51.30

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.
package/dist/cli.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import type { FlowTrack, HarnessId } from "./types.js";
3
3
  import type { ArchiveDisposition } from "./runs.js";
4
+ export { parseHarnessSelectionAnswer } from "./harness-selection.js";
4
5
  type CommandName = "init" | "sync" | "doctor" | "upgrade" | "uninstall" | "archive" | "internal";
5
6
  interface ParsedArgs {
6
7
  command?: CommandName;
@@ -27,17 +28,5 @@ export declare function usage(): string;
27
28
  declare function parseHarnesses(raw: string): HarnessId[];
28
29
  declare function parseTrack(raw: string): FlowTrack;
29
30
  declare function parseArchiveDisposition(raw: string): ArchiveDisposition;
30
- export type HarnessSelectionAnswer = {
31
- kind: "accept";
32
- } | {
33
- kind: "all";
34
- } | {
35
- kind: "toggle";
36
- indexes: number[];
37
- } | {
38
- kind: "invalid";
39
- message: string;
40
- };
41
- export declare function parseHarnessSelectionAnswer(raw: string): HarnessSelectionAnswer;
42
31
  declare function parseArgs(argv: string[]): ParsedArgs;
43
32
  export { parseArgs, parseArchiveDisposition, parseHarnesses, parseTrack };
package/dist/cli.js CHANGED
@@ -13,6 +13,8 @@ import { CCLAW_VERSION, RUNTIME_ROOT } from "./constants.js";
13
13
  import { createDefaultConfig, readConfig } from "./config.js";
14
14
  import { detectHarnesses } from "./init-detect.js";
15
15
  import { HARNESS_ADAPTERS } from "./harness-adapters.js";
16
+ import { promptHarnessSelectionChecklist } from "./harness-selection.js";
17
+ export { parseHarnessSelectionAnswer } from "./harness-selection.js";
16
18
  import { classifyCodexHooksFlag, codexConfigPath, patchCodexHooksFlag, readCodexConfig, writeCodexConfig } from "./codex-feature-flag.js";
17
19
  import { runInternalCommand } from "./internal/advance-stage.js";
18
20
  const INSTALLER_COMMANDS = [
@@ -67,8 +69,8 @@ Examples:
67
69
  npx cclaw-cli archive --disposition=cancelled --reason="deprioritized"
68
70
  npx cclaw-cli upgrade
69
71
 
70
- Happy-path work happens inside your harness via /cc, /cc-next,
71
- /cc-ideate, /cc-view, /cc-finish, and /cc-cancel. Doctor is an operator/support surface:
72
+ Happy-path work happens inside your harness via /cc, /cc-ideate,
73
+ and /cc-cancel. Doctor is an operator/support surface:
72
74
  it verifies install/runtime wiring, but a real harness smoke test is
73
75
  still needed to prove provider auth and model execution.
74
76
 
@@ -171,93 +173,8 @@ function buildInitSurfacePreview(harnesses) {
171
173
  }
172
174
  return lines;
173
175
  }
174
- function harnessLabel(harness) {
175
- const adapter = HARNESS_ADAPTERS[harness];
176
- const tier = adapter ? `${adapter.reality.declaredSupport}, ${adapter.capabilities.hookSurface} hooks` : "supported";
177
- return `${harness} (${tier})`;
178
- }
179
- function selectedHarnessPreview(harnesses) {
180
- return harnesses.length > 0 ? harnesses.join(", ") : "none";
181
- }
182
- export function parseHarnessSelectionAnswer(raw) {
183
- const answer = raw.trim().toLowerCase();
184
- if (answer.length === 0)
185
- return { kind: "accept" };
186
- if (answer === "all")
187
- return { kind: "all" };
188
- if (answer === "none") {
189
- return { kind: "invalid", message: "Zero harnesses is not supported. Select at least one harness." };
190
- }
191
- const parts = answer.split(",").map((part) => part.trim()).filter(Boolean);
192
- const indexes = parts.map((part) => Number.parseInt(part, 10));
193
- if (indexes.some((value) => !Number.isInteger(value) || value < 1 || value > HARNESS_IDS.length)) {
194
- return { kind: "invalid", message: `Invalid selection. Use numbers 1-${HARNESS_IDS.length}, comma-separated.` };
195
- }
196
- return { kind: "toggle", indexes };
197
- }
198
- async function promptHarnessSelection(defaults, ctx, label = "Harness selection") {
199
- const rl = createInterface({
200
- input: process.stdin,
201
- output: ctx.stdout
202
- });
203
- const defaultSet = new Set(defaults.harnesses);
204
- const selected = new Set(defaults.harnesses.length > 0 ? defaults.harnesses : HARNESS_IDS);
205
- const detected = new Set(defaults.detectedHarnesses ?? []);
206
- const current = new Set(defaults.currentHarnesses ?? []);
207
- const printMenu = () => {
208
- ctx.stdout.write(`\n${label}\n`);
209
- ctx.stdout.write(`Detected: ${selectedHarnessPreview(defaults.detectedHarnesses ?? [])}\n`);
210
- ctx.stdout.write(`Current: ${selectedHarnessPreview(defaults.currentHarnesses ?? [])}\n`);
211
- ctx.stdout.write(`Supported harnesses and target paths:\n`);
212
- HARNESS_IDS.forEach((harness, index) => {
213
- const adapter = HARNESS_ADAPTERS[harness];
214
- const markers = [
215
- detected.has(harness) ? "detected" : "",
216
- current.has(harness) ? "current" : "",
217
- defaultSet.has(harness) ? "default" : ""
218
- ].filter(Boolean).join(", ");
219
- const checked = selected.has(harness) ? "x" : " ";
220
- ctx.stdout.write(` ${index + 1}. [${checked}] ${harnessLabel(harness)} -> ${adapter.commandDir}${markers ? ` (${markers})` : ""}\n`);
221
- });
222
- ctx.stdout.write("Enter numbers to toggle (for example 1,3), 'all', or press Enter to accept.\n");
223
- };
224
- try {
225
- while (true) {
226
- printMenu();
227
- const answer = await rl.question(`Selected [${[...selected].join(",") || "select at least one"}]: `);
228
- const parsedAnswer = parseHarnessSelectionAnswer(answer);
229
- if (parsedAnswer.kind === "accept") {
230
- if (selected.size === 0) {
231
- ctx.stdout.write("Select at least one harness.\n");
232
- continue;
233
- }
234
- return HARNESS_IDS.filter((harness) => selected.has(harness));
235
- }
236
- if (parsedAnswer.kind === "all") {
237
- HARNESS_IDS.forEach((harness) => selected.add(harness));
238
- continue;
239
- }
240
- if (parsedAnswer.kind === "invalid") {
241
- ctx.stdout.write(`${parsedAnswer.message}\n`);
242
- continue;
243
- }
244
- for (const index of parsedAnswer.indexes) {
245
- const harness = HARNESS_IDS[index - 1];
246
- if (!harness)
247
- continue;
248
- if (selected.has(harness))
249
- selected.delete(harness);
250
- else
251
- selected.add(harness);
252
- }
253
- }
254
- }
255
- finally {
256
- rl.close();
257
- }
258
- }
259
176
  async function promptInitConfig(defaults, ctx) {
260
- const harnesses = await promptHarnessSelection(defaults, ctx, "Initial cclaw harnesses");
177
+ const harnesses = await promptHarnessSelectionChecklist(defaults, ctx, "Initial cclaw harnesses");
261
178
  return { harnesses };
262
179
  }
263
180
  /**
@@ -392,7 +309,7 @@ async function resolveSyncInputs(parsed, ctx) {
392
309
  const detectedHarnesses = await detectHarnesses(ctx.cwd);
393
310
  const defaults = detectedHarnesses.length > 0 ? detectedHarnesses : currentHarnesses.length > 0 ? currentHarnesses : HARNESS_IDS.slice();
394
311
  return {
395
- harnesses: await promptHarnessSelection({
312
+ harnesses: await promptHarnessSelectionChecklist({
396
313
  harnesses: defaults,
397
314
  detectedHarnesses,
398
315
  currentHarnesses
@@ -13,7 +13,7 @@ export function closeoutSubstateInline() {
13
13
  return `\`${CLOSEOUT_SUBSTATE_KEY}\``;
14
14
  }
15
15
  export function closeoutNextCommandGuidance() {
16
- return `After ship completes, the closeout chain ${closeoutChainInline()} runs automatically, driven by ${closeoutSubstateInline()}. Continue through \`/cc-next\`; do not branch into \`ce:compound\`, a separate operations router, or a one-off closeout command. Ralph Loop may be mentioned only as tdd carry-forward context when it explains the next \`/cc-next\` move; it is not part of compound/archive routing.`;
16
+ return `After ship completes, the closeout chain ${closeoutChainInline()} runs automatically, driven by ${closeoutSubstateInline()}. Continue through \`/cc\`; do not branch into \`ce:compound\`, a separate operations router, or a one-off closeout command. Ralph Loop may be mentioned only as tdd carry-forward context when it explains the next \`/cc\` move; it is not part of compound/archive routing.`;
17
17
  }
18
18
  export function closeoutSubstateProtocolBullets() {
19
19
  return `When \`currentStage === "ship"\`, route by **${closeoutSubstateInline()}**:
@@ -35,8 +35,8 @@ export function closeoutSubstateProtocolBullets() {
35
35
  - \`"archived"\` (transient) -> report "run archived" and stop.`;
36
36
  }
37
37
  export function closeoutFlowMapSentence() {
38
- return `The first stage names are the critical path. \`retro\`, \`compound\`, and \`archive\` are post-ship closeout substates under ${closeoutSubstateInline()}, not separate stage schemas or commands. Continue them with \`/cc-next\`; do not route compound closeout through \`ce:compound\`.`;
38
+ return `The first stage names are the critical path. \`retro\`, \`compound\`, and \`archive\` are post-ship closeout substates under ${closeoutSubstateInline()}, not separate stage schemas or commands. Continue them with \`/cc\`; do not route compound closeout through \`ce:compound\`.`;
39
39
  }
40
40
  export function closeoutProtocolBehaviorSentence() {
41
- return `Keep decision, completion, and preamble discipline inline: ask only decision-changing questions, verify gates before advancing, and keep context compact. After \`ship\`, keep using \`/cc-next\` through ${closeoutChainInline()}; do not route normal closeout through \`ce:compound\` or a separate operations command. In compound closeout, assess overlap before appending knowledge: refresh recurring bug-track learnings as actionable rules/tests, keep knowledge-track learnings as durable process/project guidance, and mark outdated entries with lightweight \`supersedes\` / \`superseded_by\` fields instead of building a new doc system.`;
41
+ return `Keep decision, completion, and preamble discipline inline: ask only decision-changing questions, verify gates before advancing, and keep context compact. After \`ship\`, keep using \`/cc\` through ${closeoutChainInline()}; do not route normal closeout through \`ce:compound\` or a separate operations command. In compound closeout, assess overlap before appending knowledge: refresh recurring bug-track learnings as actionable rules/tests, keep knowledge-track learnings as durable process/project guidance, and mark outdated entries with lightweight \`supersedes\` / \`superseded_by\` fields instead of building a new doc system.`;
42
42
  }
@@ -498,11 +498,11 @@ export function agentRoutingTable() {
498
498
  return `| Stage Entry | Primary Agent(s) | Supporting guidance |
499
499
  |---|---|---|
500
500
  | Brainstorm (start with \`/cc <idea>\`) | ${brainstormPrimary} | Run in-thread research playbooks: \`research/repo-scan.md\`, \`research/learnings-lookup.md\` |
501
- | Scope / Design / Plan (via \`/cc-next\`) | ${scopeDesignPlanPrimary} | Use \`research/git-history.md\` (scope) and \`research/framework-docs-lookup.md\` + \`research/best-practices-lookup.md\` (design) as needed |
502
- | Spec (via \`/cc-next\`) | ${specPrimary} | planner (if ambiguity or conflicts remain) |
503
- | TDD (via \`/cc-next\`) | ${tddPrimary} | doc-updater on public behavior/config changes |
504
- | Review (via \`/cc-next\`) | ${reviewPrimary} | conditional second reviewer for high blast-radius diffs |
505
- | Ship (via \`/cc-next\`) | ${shipPrimary} | security-reviewer when release risk is elevated |
501
+ | Scope / Design / Plan (via \`/cc\`) | ${scopeDesignPlanPrimary} | Use \`research/git-history.md\` (scope) and \`research/framework-docs-lookup.md\` + \`research/best-practices-lookup.md\` (design) as needed |
502
+ | Spec (via \`/cc\`) | ${specPrimary} | planner (if ambiguity or conflicts remain) |
503
+ | TDD (via \`/cc\`) | ${tddPrimary} | doc-updater on public behavior/config changes |
504
+ | Review (via \`/cc\`) | ${reviewPrimary} | conditional second reviewer for high blast-radius diffs |
505
+ | Ship (via \`/cc\`) | ${shipPrimary} | security-reviewer when release risk is elevated |
506
506
  `;
507
507
  }
508
508
  /**
@@ -13,7 +13,7 @@ function generatedHelperSkillList() {
13
13
  export function usingCclawSkillMarkdown() {
14
14
  return `---
15
15
  name: using-cclaw
16
- description: "Routing brain for cclaw. Decide whether to start/resume a stage, answer directly, or use visible commands like /cc, /cc-next, /cc-ideate, and /cc-view."
16
+ description: "Routing brain for cclaw. Decide whether to start/resume a stage, answer directly, or use visible commands like /cc, /cc-ideate, and /cc-cancel."
17
17
  ---
18
18
 
19
19
  # Using Cclaw
@@ -65,11 +65,10 @@ Task arrives
65
65
  ├─ Pure question / non-software ask? -> answer directly (no stage)
66
66
  ├─ New software work? -> /cc <idea>
67
67
  ├─ Repo-improvement discovery? -> /cc-ideate
68
- ├─ Resume existing flow? -> /cc or /cc-next
68
+ ├─ Resume existing flow? -> /cc
69
69
  ├─ Knowledge operation? -> load the learnings skill
70
- ├─ Read-only workspace view? -> /cc-view [status|tree|diff]
71
- ├─ Normal post-ship closeout? -> /cc-next drives ${closeoutChainInline()}
72
- └─ Explicit early archival/reset? -> npx cclaw-cli archive [--name=<slug>]
70
+ ├─ Normal post-ship closeout? -> /cc drives ${closeoutChainInline()}
71
+ └─ Explicit early cancellation/abandonment? -> /cc-cancel
73
72
  \`\`\`
74
73
 
75
74
  ## Task classification
@@ -87,7 +86,7 @@ Task arrives
87
86
  Before stage work:
88
87
 
89
88
  1. Read \`.cclaw/state/flow-state.json\`.
90
- 2. If active stage exists, continue with \`/cc\` or \`/cc-next\`.
89
+ 2. If active stage exists, continue with \`/cc\`.
91
90
  3. Do not jump directly to stage-specific commands.
92
91
 
93
92
  ## Platform reliability notes
@@ -98,13 +97,12 @@ Before stage work:
98
97
 
99
98
  ## Stage quick map
100
99
 
101
- Use \`/cc <idea>\` for new work, \`/cc-next\` for progression and closeout, \`/cc-view\` for read-only state, and \`/cc-ideate\` for backlog discovery.
100
+ Use \`/cc <idea>\` for new work, \`/cc\` for progression and closeout, \`/cc-ideate\` for backlog discovery, and \`/cc-cancel\` for cancellation/abandonment.
102
101
 
103
102
  ## Main vs Operator Surfaces
104
103
 
105
- - **Main workflow:** \`/cc\`, \`/cc-next\`, \`/cc-ideate\`, \`/cc-view status\`, and \`node .cclaw/hooks/stage-complete.mjs <stage>\` inside the installed harness runtime.
104
+ - **Main workflow:** \`/cc\`, \`/cc-ideate\`, and \`/cc-cancel\` inside the installed harness runtime.
106
105
  - **Installer/support surface:** \`npx cclaw-cli init\`, \`npx cclaw-cli sync\`, \`npx cclaw-cli upgrade\`, \`npx cclaw-cli doctor\`, and explicit support/archive actions. Do not ask users to install or run a \`cclaw\` binary during normal stage flow.
107
- - **Read-only support:** \`/cc-view tree\` and \`/cc-view diff\`.
108
106
  - Use operator/support surfaces only for install/runtime diagnosis, explicit archival, or deeper inspection. Do not make them part of the happy path.
109
107
 
110
108
  ## Whole flow map
@@ -10,8 +10,8 @@
10
10
  export declare const RALPH_LOOP_CONTRACT_MARKER = "ralph-loop-contract:v1";
11
11
  export declare function ralphLoopContractSnippet(): string;
12
12
  /**
13
- * Command contract for /cc-next — the primary progression command.
14
- * Reads flow-state, starts the current stage if unfinished, or advances if all gates pass.
13
+ * Internal compatibility contract for /cc-next.
14
+ * /cc is the promoted public progression command; this remains as an internal/legacy alias.
15
15
  */
16
16
  export declare function nextCommandContract(): string;
17
17
  /**
@@ -44,8 +44,8 @@ Ralph Loop fields never gate-check on their own.
44
44
  <!-- ${RALPH_LOOP_CONTRACT_MARKER} -->`;
45
45
  }
46
46
  /**
47
- * Command contract for /cc-next — the primary progression command.
48
- * Reads flow-state, starts the current stage if unfinished, or advances if all gates pass.
47
+ * Internal compatibility contract for /cc-next.
48
+ * /cc is the promoted public progression command; this remains as an internal/legacy alias.
49
49
  */
50
50
  export function nextCommandContract() {
51
51
  const flowPath = flowStatePath();
@@ -56,14 +56,14 @@ export function nextCommandContract() {
56
56
 
57
57
  ## Purpose
58
58
 
59
- **The primary progression command.** Read flow state, determine what to do:
59
+ **Internal compatibility progression command.** \`/cc\` is the promoted public start/resume/continue command. This contract remains for legacy shims and internal references; read flow state, determine what to do:
60
60
 
61
61
  - **Current stage not started / in progress** → load its skill and execute it.
62
62
  - **Current stage complete (all gates passed)** → advance \`currentStage\` and load the next skill.
63
- - **Ship complete** → continue the resumable ${closeoutChainInline()} closeout via \`/cc-next\`.
63
+ - **Ship complete** → continue the resumable ${closeoutChainInline()} closeout. Public habit: use \`/cc\`.
64
64
  - **Flow complete** → report done after closeout has archived the run.
65
65
 
66
- This is the only progression command the user needs to drive the entire flow. Stage command contracts are internal implementation details loaded by \`/cc-next\`.
66
+ The public habit is \`/cc\`; this command is a compatibility/internal route for the same progression behavior. Stage command contracts are internal implementation details.
67
67
 
68
68
  ## HARD-GATE
69
69
 
@@ -116,13 +116,13 @@ ${ralphLoopContractSnippet()}
116
116
 
117
117
  ## Resume Semantics
118
118
 
119
- \`/cc-next\` in a **new session** = resume from where you left off:
119
+ \`/cc\` in a **new session** resumes from where you left off; \`/cc-next\` is a compatibility alias:
120
120
  - Flow-state records \`currentStage\` and which gates have passed.
121
121
  - The stage skill reads upstream artifacts and picks up context.
122
122
  - ${closeoutSubstateInline()} carries the post-ship substate, so a crashed
123
123
  session during retro/compound/archive resumes at the exact step without
124
124
  regenerating the retro draft.
125
- - No special resume command needed — \`/cc-next\` IS the resume command.
125
+ - No special resume command needed — \`/cc\` is the public resume/progression command.
126
126
 
127
127
  ## Headless mode
128
128
 
@@ -171,14 +171,14 @@ export function nextCommandSkillMarkdown() {
171
171
  .join("\n");
172
172
  return `---
173
173
  name: ${NEXT_SKILL_NAME}
174
- description: "The primary progression command. Reads flow state, starts/resumes the current stage or advances to the next one."
174
+ description: "Internal compatibility progression command. Prefer /cc for start, resume, continue, and closeout."
175
175
  ---
176
176
 
177
- # /cc-next — Flow Progression
177
+ # /cc-next — Flow Progression Compatibility
178
178
 
179
179
  ## Overview
180
180
 
181
- \`/cc-next\` is **the only command you need** to drive the entire cclaw flow.
181
+ \`/cc\` is the public command to drive the cclaw flow. \`/cc-next\` remains as an internal/compatibility alias for progression.
182
182
 
183
183
  ## Operator Output Contract
184
184
 
@@ -192,7 +192,7 @@ Gates: <passed>/<required> passed, <blocked> blocked
192
192
  Delegations: <done>/<mandatory> done
193
193
  Blocked by: <none | gate/delegation/reconciliation/stale/TDD/review/closeout ids>
194
194
  Blocker category: <sync-recovery | user-decision | stage-work | delegation-proof | review-rework | closeout>
195
- Next: <exact next action, usually /cc-next or one named remediation>
195
+ Next: <exact next action, usually /cc or one named remediation>
196
196
  Evidence needed: <artifact/test/review/delegation evidence required to unblock>
197
197
  \`\`\`
198
198
 
@@ -207,7 +207,7 @@ would unblock it. Do not dump full artifacts in progression output.
207
207
  3. If **not** → loads the stage skill and starts/resumes execution
208
208
  4. If **yes** → advances to the next stage and loads its skill
209
209
 
210
- **Resume:** \`/cc-next\` in a new session picks up from where \`flow-state.json\` says you are.
210
+ **Resume:** \`/cc\` in a new session picks up from where \`flow-state.json\` says you are.
211
211
 
212
212
  ## HARD-GATE
213
213
 
@@ -267,7 +267,7 @@ by inspecting ${closeoutSubstateInline()}:
267
267
  | \`ready_to_archive\` | Run \`npx cclaw-cli archive\`; reset flow-state on success |
268
268
  | \`archived\` | Report "run archived"; stop |
269
269
 
270
- Each step owns its own state transition. \`/cc-next\` keeps retro and compound
270
+ Each step owns its own state transition. \`/cc\` keeps retro and compound
271
271
  in-session, then uses the archive runtime only at \`ready_to_archive\`.
272
272
 
273
273
  Otherwise report **"Flow complete. All stages finished."** and stop.
@@ -276,7 +276,7 @@ Otherwise (non-terminal \`next\`): load the next stage skill and begin execution
276
276
 
277
277
  ## Stage order
278
278
 
279
- This table is the track-aware critical path. It must match \`flow-state.json.track\`; do not follow the natural schema edge when the active track skips a stage. Quick skips ceremony, not safety: spec approval, RED/GREEN/REFACTOR evidence, review, and ship gates still apply. After \`ship\`, \`/cc-next\` continues closeout via ${closeoutSubstateInline()}: ${closeoutChainInline()}.
279
+ This table is the track-aware critical path. It must match \`flow-state.json.track\`; do not follow the natural schema edge when the active track skips a stage. Quick skips ceremony, not safety: spec approval, RED/GREEN/REFACTOR evidence, review, and ship gates still apply. After \`ship\`, \`/cc\` continues closeout via ${closeoutSubstateInline()}: ${closeoutChainInline()}.
280
280
 
281
281
  | Stage | Standard next | Medium next | Quick next | Skill path |
282
282
  |---|---|---|---|---|
@@ -293,6 +293,6 @@ ${naturalStageRows}
293
293
  - Advancing when \`blocked\` is non-empty for the current stage.
294
294
  - Treating \`passed\` as trusted when artifact evidence contradicts it.
295
295
  - Skipping **review** or **ship** because "the code looks fine".
296
- - Loading a stage skill directly instead of using \`/cc-next\` for progression.
296
+ - Loading a stage skill directly instead of using \`/cc\` for progression.
297
297
  `;
298
298
  }
@@ -938,7 +938,7 @@ async function handleSessionStart(runtime) {
938
938
  );
939
939
  const knowledge = await buildKnowledgeDigest(runtime.root, state.currentStage, knowledgeRaw);
940
940
 
941
- // Refresh Ralph Loop status each session-start so /cc-next and the model
941
+ // Refresh Ralph Loop status each session-start so /cc and the model
942
942
  // both read a consistent "iter=N, acClosed=[...]" snapshot. Runs only when
943
943
  // we are in tdd — other stages skip the write to keep the file stable.
944
944
  let ralphLoopLine = "";
@@ -1137,7 +1137,7 @@ async function handleStopHandoff(runtime) {
1137
1137
  const shipSubstate = typeof closeoutObj.shipSubstate === "string" ? closeoutObj.shipSubstate : "idle";
1138
1138
  const closeoutContext =
1139
1139
  state.currentStage === "ship" || shipSubstate !== "idle"
1140
- ? " closeout.shipSubstate=" + shipSubstate + "; closeout chain=retro -> compound -> archive; continue closeout with /cc-next."
1140
+ ? " closeout.shipSubstate=" + shipSubstate + "; closeout chain=retro -> compound -> archive; continue closeout with /cc."
1141
1141
  : "";
1142
1142
 
1143
1143
  const message =
@@ -36,7 +36,7 @@ When a new session begins in any harness:
36
36
  \`\`\`
37
37
  Cclaw flow state: [current stage] ([N] of 8 stages completed)
38
38
  Knowledge highlights: [rule/pattern 1], [rule/pattern 2], [rule/pattern 3]
39
- Next action: /cc-next to continue, /cc to start new work, or describe what you'd like to do.
39
+ Next action: /cc to continue or start work, /cc-cancel to cancel, or describe what you'd like to do.
40
40
  \`\`\`
41
41
 
42
42
  ## Session Stop Protocol
@@ -10,7 +10,7 @@ Load and follow the authoritative stage skill:
10
10
 
11
11
  - \`${skillPath}\`
12
12
 
13
- Normal stage resume and advancement uses \`/cc-next\`. Use \`/cc-next\` to read
13
+ Normal stage resume and advancement uses \`/cc\`. Use \`/cc\` to read
14
14
  \`.cclaw/state/flow-state.json\`, select the active stage, and advance only after
15
15
  that stage's gates pass. Do not duplicate the stage protocol here.
16
16
  `;
@@ -11,7 +11,7 @@ ${conversationLanguagePolicyMarkdown()}
11
11
  - Stage-specific skills expose **Completion Parameters** plus the gates that
12
12
  matter for that stage.
13
13
  - Generic execution stays inline: verify required gates, update the artifact,
14
- harvest learnings, then use \`/cc-next\` for progression.
14
+ harvest learnings, then use \`/cc\` for progression.
15
15
  - Do not create separate protocol files.
16
16
 
17
17
  ## Context readiness
@@ -30,11 +30,11 @@ ${conversationLanguagePolicyMarkdown()}
30
30
 
31
31
  Use this same closeout menu for every stage:
32
32
 
33
- - **A) Advance** — run \`/cc-next\` and continue the critical path; after \`ship\`, the same command drives \`retro -> compound -> archive\`.
33
+ - **A) Advance** — run \`/cc\` and continue the critical path; after \`ship\`, the same command drives \`retro -> compound -> archive\`.
34
34
  - **B) Revise this stage** — stay on current stage and apply feedback.
35
- - **C) Pause / park** — run \`/cc-view status\`, then stop and resume later.
35
+ - **C) Pause / park** — stop after summarizing current stage, blockers, and next \`/cc\` action.
36
36
  - **D) Rewind** — run \`npx cclaw-cli internal rewind <target-stage> "<reason>"\` as the managed support/runtime repair action; after redoing the target stage, run \`npx cclaw-cli internal rewind --ack <target-stage>\` to clear the stale marker.
37
- - **E) Abandon** — only when the user explicitly wants to end a non-ship active run early, archive with \`npx cclaw-cli archive --skip-retro --retro-reason="<reason>"\`. Once in post-ship closeout, continue \`/cc-next\` through retro/compound/archive instead.
37
+ - **E) Abandon** — only when the user explicitly wants to end a non-ship active run early, archive with \`npx cclaw-cli archive --skip-retro --retro-reason="<reason>"\`. Once in post-ship closeout, continue \`/cc\` through retro/compound/archive instead.
38
38
 
39
39
  Recommendation defaults:
40
40
 
@@ -50,7 +50,7 @@ export const PLAN = {
50
50
  "Run anti-placeholder + anti-scope-reduction scans — block `TODO/TBD/...` and phrasing like `v1`, `for now`, `later` for locked boundaries.",
51
51
  "Define validation points — mark where progress must be checked before continuing, with concrete command and expected evidence.",
52
52
  "Define execution posture — record whether execution should be sequential, dependency-batched, parallel-safe, or blocked; include risk triggers and RED/GREEN/REFACTOR checkpoint/commit expectations when the repo workflow supports them. This fulfills the `plan_execution_posture_recorded` gate.",
53
- "WAIT_FOR_CONFIRM — write plan artifact and explicitly pause. **STOP.** Do NOT proceed until user confirms. Then close the stage with `node .cclaw/hooks/stage-complete.mjs plan` and tell user to run `/cc-next`."
53
+ "WAIT_FOR_CONFIRM — write plan artifact and explicitly pause. **STOP.** Do NOT proceed until user confirms. Then close the stage with `node .cclaw/hooks/stage-complete.mjs plan` and tell user to run `/cc`."
54
54
  ],
55
55
  interactionProtocol: [
56
56
  "Plan in read-only mode relative to implementation.",
@@ -61,7 +61,7 @@ export const PLAN = {
61
61
  "Preserve locked scope boundaries: no silent scope reduction language in task rows.",
62
62
  "Enforce WAIT_FOR_CONFIRM: present the plan summary with options (A) Approve / (B) Revise / (C) Reject.",
63
63
  "**STOP.** Do NOT proceed until user explicitly approves.",
64
- "**STOP BEFORE ADVANCE.** Mandatory delegation `planner` must be marked completed or explicitly waived in `.cclaw/state/delegation-log.json`. Then close the stage via `node .cclaw/hooks/stage-complete.mjs plan` and tell the user to run `/cc-next`."
64
+ "**STOP BEFORE ADVANCE.** Mandatory delegation `planner` must be marked completed or explicitly waived in `.cclaw/state/delegation-log.json`. Then close the stage via `node .cclaw/hooks/stage-complete.mjs plan` and tell the user to run `/cc`."
65
65
  ],
66
66
  process: [
67
67
  "Build dependency graph and ordered slices.",
@@ -47,7 +47,7 @@ export const REVIEW = {
47
47
  "Classify findings — Critical (blocks ship), Important (should fix), Suggestion (optional improvement).",
48
48
  "Victory Detector — before verdict, confirm Layer 1, Layer 2, security sweep, structured findings, trace evidence, and unresolved-critical status are complete; otherwise iterate findings or route back to TDD.",
49
49
  "Produce verdict — APPROVED, APPROVED_WITH_CONCERNS, or BLOCKED.",
50
- "If verdict is BLOCKED, emit remediation route token `ROUTE_BACK_TO_TDD`, include the managed command `cclaw internal rewind tdd \"review_blocked_by_critical <finding-ids>\"`, list the critical finding IDs and required TDD evidence to repair, and satisfy the special transition guard `review_verdict_blocked` instead of `review_criticals_resolved`. After TDD rework, clear the stale marker with `cclaw internal rewind --ack tdd` before `/cc-next`."
50
+ "If verdict is BLOCKED, emit remediation route token `ROUTE_BACK_TO_TDD`, include the managed command `cclaw internal rewind tdd \"review_blocked_by_critical <finding-ids>\"`, list the critical finding IDs and required TDD evidence to repair, and satisfy the special transition guard `review_verdict_blocked` instead of `review_criticals_resolved`. After TDD rework, clear the stale marker with `cclaw internal rewind --ack tdd` before `/cc`."
51
51
  ],
52
52
  interactionProtocol: [
53
53
  "Run Layer 1 (spec compliance) completely before starting Layer 2.",
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Command contract for /cc — the unified entry point.
3
- * No args → reads existing flow state and behaves like /cc-next only when a
4
- * tracked flow already exists; missing state/fresh placeholder state blocks with
3
+ * No args → reads existing flow state and progresses it when a tracked flow
4
+ * already exists; missing state/fresh placeholder state blocks with
5
5
  * init/start guidance. With prompt → classifies the idea, selects a track, and
6
6
  * starts the first stage of that track (brainstorm for medium/standard, spec for quick).
7
7
  */
@@ -7,8 +7,8 @@ function flowStatePath() {
7
7
  }
8
8
  /**
9
9
  * Command contract for /cc — the unified entry point.
10
- * No args → reads existing flow state and behaves like /cc-next only when a
11
- * tracked flow already exists; missing state/fresh placeholder state blocks with
10
+ * No args → reads existing flow state and progresses it when a tracked flow
11
+ * already exists; missing state/fresh placeholder state blocks with
12
12
  * init/start guidance. With prompt → classifies the idea, selects a track, and
13
13
  * starts the first stage of that track (brainstorm for medium/standard, spec for quick).
14
14
  */
@@ -20,10 +20,10 @@ export function startCommandContract() {
20
20
 
21
21
  **The unified entry point for the cclaw flow.**
22
22
 
23
- - \`/cc\` (no arguments) → reads existing flow state and resumes/progresses it through \`/cc-next\`. If flow state is missing or still a fresh init placeholder, stop and guide the user to run \`/cc <prompt>\` or \`cclaw init\`; do not silently create a brainstorm run.
23
+ - \`/cc\` (no arguments) → reads existing flow state and resumes/progresses the active flow. If flow state is missing or still a fresh init placeholder, stop and guide the user to run \`/cc <prompt>\` or \`cclaw init\`; do not silently create a brainstorm run.
24
24
  - \`/cc <prompt>\` (with an idea/description) → saves the prompt as idea context and starts the first stage of the resolved track.
25
25
 
26
- This is the **recommended way to start** working with cclaw. Use \`/cc-next\` for subsequent stage progression.
26
+ This is the **recommended way to start, resume, and continue** working with cclaw.
27
27
 
28
28
  ## HARD-GATE
29
29
 
@@ -81,7 +81,7 @@ ${conversationLanguagePolicyMarkdown()}
81
81
  - **standard** (full 8 stages — default fallback) — anything that introduces a new capability with architecture uncertainty, touches many modules, or has unclear scope.
82
82
  Triggers: \`new feature\`, \`refactor\`, \`migration\`, \`platform\`, \`architecture\`, \`schema\`, \`integrate\`, \`workflow\`, \`onboarding\`, or any prompt that does not match quick/medium confidently.
83
83
  - When triggers conflict, prefer **standard** over **medium**, and **medium** over **quick**.
84
- - Report **track selection confidence** as high/medium/low with the matched trigger or fallback reason, plus one sentence explaining what the selected track skips and what safety gates remain. Be explicit that this recommendation is advisory until the user accepts and the managed helper writes state; after that, \`/cc-next\` follows the configured track.
84
+ - Report **track selection confidence** as high/medium/low with the matched trigger or fallback reason, plus one sentence explaining what the selected track skips and what safety gates remain. Be explicit that this recommendation is advisory until the user accepts and the managed helper writes state; after that, \`/cc\` follows the configured track.
85
85
  8. Present one compact **Start framing** summary: class, recommended track, track selection confidence, stack, origin docs, seed recalls, and the recommended next action. Ask a single confirmation question only when there is a destructive reset, a real contradiction, or ambiguous software/non-software classification.
86
86
  9. Present the recommendation as a single decision with explicit options:
87
87
  > \`Recommended track: <quick|medium|standard>\` because \`<one-line reason citing matched triggers>\`.
@@ -112,7 +112,7 @@ If during any stage the agent discovers evidence that contradicts the initial Ph
112
112
  1. Read \`${flowPath}\`.
113
113
  2. If flow state is missing → guide the user to run \`cclaw init\` and stop.
114
114
  3. If flow state is only a fresh init placeholder (\`completedStages: []\`, all \`passed\` arrays empty, and no \`00-idea.md\`) → stop and ask for \`/cc <prompt>\` to start a tracked run. Do not create a brainstorm state implicitly.
115
- 4. Otherwise behave exactly like \`/cc-next\`: check current stage gates, resume if incomplete, advance if complete.
115
+ 4. Otherwise check current stage gates, resume if incomplete, and advance if complete.
116
116
 
117
117
  ## Headless mode
118
118
 
@@ -151,7 +151,7 @@ description: "Unified entry point for the cclaw flow. No args = resume/next. Wit
151
151
 
152
152
  \`/cc\` is the **starting command** for cclaw. It intelligently routes:
153
153
 
154
- - **No arguments** → acts as \`/cc-next\` only for an existing tracked flow; missing/fresh placeholder state blocks with start guidance
154
+ - **No arguments** → resumes or progresses an existing tracked flow; missing/fresh placeholder state blocks with start guidance
155
155
  - **With a prompt** → classifies the task, picks a track (quick/medium/standard), and starts the **first stage of that track** (not always brainstorm — e.g. the \`quick\` track starts at \`spec\`)
156
156
 
157
157
  ## HARD-GATE
@@ -185,7 +185,7 @@ ${conversationLanguagePolicyMarkdown()}
185
185
  | \`standard\` | \`new feature\`, \`refactor\`, \`migration\`, \`platform\`, \`architecture\`, \`schema\`, \`integrate\`, \`workflow\`, \`onboarding\` (or no confident quick/medium match) | New or uncertain multi-module work |
186
186
 
187
187
  - On conflict, prefer \`standard\` over \`medium\`, and \`medium\` over \`quick\`.
188
- - Always state the recommendation as a one-line reason citing matched triggers and a high/medium/low track selection confidence. Clarify that the heuristic is advisory until the managed helper writes state; after that, \`/cc-next\` follows the selected track. Include override guidance: switch to standard when architecture, schema, migration, security, or unclear scope appears; switch to medium when product framing is needed but architecture is known.
188
+ - Always state the recommendation as a one-line reason citing matched triggers and a high/medium/low track selection confidence. Clarify that the heuristic is advisory until the managed helper writes state; after that, \`/cc\` follows the selected track. Include override guidance: switch to standard when architecture, schema, migration, security, or unclear scope appears; switch to medium when product framing is needed but architecture is known.
189
189
  8. Run the managed start helper: \`node .cclaw/hooks/start-flow.mjs --track=<quick|medium|standard> --class=<class> --prompt=<prompt> --stack=<stack> --reason=<matched heuristic>\`. The helper writes \`${flowPath}\`, computes \`skippedStages\`, resets the gate catalog, and writes \`${RUNTIME_ROOT}/artifacts/00-idea.md\`. If it fails, STOP and report the exact command/output; do not manually edit flow state.
190
190
  9. Load and execute the **first stage skill of the chosen track** (\`brainstorming\` for medium/standard, \`specification-authoring\` for quick) plus its matching command file.
191
191
 
@@ -195,7 +195,7 @@ If mid-stage evidence contradicts the initial Class/Track decision (the "trivial
195
195
 
196
196
  ### Path B: \`/cc\` (no arguments)
197
197
 
198
- Delegate to \`/cc-next\` behavior only when a tracked flow exists:
198
+ Progress the tracked flow only when one exists:
199
199
 
200
200
  1. Read \`${flowPath}\`.
201
201
  2. If missing, guide the user to run \`cclaw init\` and stop.
@@ -205,15 +205,17 @@ Delegate to \`/cc-next\` behavior only when a tracked flow exists:
205
205
  6. If complete → advance to next stage and execute.
206
206
  7. If flow is done → report completion.
207
207
 
208
- ## When to use \`/cc\` vs \`/cc-next\`
208
+ ## Public flow habit
209
+
210
+ Use \`/cc\` for the happy path:
209
211
 
210
212
  | Scenario | Command |
211
213
  |---|---|
212
214
  | Starting work for the first time | \`/cc\` or \`/cc <idea>\` |
213
215
  | Resuming in a new session | \`/cc\` |
214
- | Progressing after completing a stage | \`/cc-next\` |
216
+ | Progressing after completing a stage | \`/cc\` |
215
217
  | Starting with a specific idea | \`/cc <idea>\` |
216
218
 
217
- Both commands read the same \`flow-state.json\`. The difference is that \`/cc <prompt>\` resolves class + track and starts that track's first stage, while \`/cc\` and \`/cc-next\` follow the current state.
219
+ \`/cc <prompt>\` resolves class + track and starts that track's first stage; \`/cc\` without a prompt follows the current \`flow-state.json\`.
218
220
  `;
219
221
  }
@@ -78,17 +78,17 @@ a read-only command.
78
78
  - harness row
79
79
  - stale stage row
80
80
  11. Suggest the next action:
81
- - If current stage has unmet gates -> \`/cc-next\` to resume.
81
+ - If current stage has unmet gates -> \`/cc\` to resume.
82
82
  - If a mandatory delegation is missing evidence -> dispatch the worker/reviewer or waive with rationale; do not advance silently.
83
83
  - If a TDD blocker taxonomy code is present (\`NO_SOURCE_CONTEXT\`, \`NO_TEST_SURFACE\`, \`NO_IMPLEMENTABLE_SLICE\`, \`RED_NOT_EXPRESSIBLE\`, \`NO_VCS_MODE\`) -> name the blocker and the rewind/config route.
84
84
  - If review is blocked by critical findings -> show \`cclaw internal rewind tdd "review_blocked_by_critical <finding-ids>"\` plus the later \`cclaw internal rewind --ack tdd\`.
85
- - If closeout substate is non-idle -> \`/cc-next\` to continue the chain.
86
- - If current stage is complete -> \`/cc-next\` to advance (or report "Flow complete" if terminal).
85
+ - If closeout substate is non-idle -> \`/cc\` to continue the chain.
86
+ - If current stage is complete -> \`/cc\` to advance (or report "Flow complete" if terminal).
87
87
 
88
88
  ## Output Guidelines
89
89
 
90
90
  - Keep output compact (≤ 40 lines) — status, not narrative.
91
- - Start with the same operator rows as \`/cc-next\` when possible:
91
+ - Start with the same operator rows as \`/cc\` when possible:
92
92
  \`Current\`, \`Stage\`, \`Progress\`, \`Gates\`, \`Delegations\`, \`Risks\`, \`Blocked by\`, \`Next\`, \`Evidence needed\`. Use labels like \`gate: tdd_green_full_suite\`, \`delegation proof: reviewer evidenceRefs\`, and \`closeout: compound_review\` instead of raw JSON tone.
93
93
  - When blocked, include a plain-English action block:
94
94
  \`Current: <stage or closeout substate>\`; \`Blocked by: <gate/delegation/blocker code>\`; \`Next: <exact command or managed remediation>\`; \`Evidence needed: <artifact/test/review/delegation evidence>\`.
@@ -103,7 +103,7 @@ a read-only command.
103
103
  - Collapsing \`◎ missing-evidence\` into \`✓ completed\` — role-switch gaps must stay
104
104
  visible so the stage cannot advance silently.
105
105
  - Omitting the closeout row when \`shipSubstate !== "idle"\`; it is the only signal
106
- that tells the user why \`/cc-next\` is about to run retro/compound/archive.
106
+ that tells the user why \`/cc\` is about to run retro/compound/archive.
107
107
  - Mutating state to "clean up" during a status check.
108
108
  `;
109
109
  }
@@ -445,7 +445,7 @@ Implementation that touches shared source trees must remain **sequential** unles
445
445
  - **3–4:** appendix / “worth tracking” section (not merge-blocking alone)
446
446
  - **1–2:** suppress from primary narrative unless paired with stronger evidence
447
447
 
448
- ### Review Army Artifact Contract (required in review stage via /cc-next)
448
+ ### Review Army Artifact Contract (required in review stage via /cc)
449
449
 
450
450
  Write a structured reconciliation artifact at \`.cclaw/artifacts/07-review-army.json\` using this schema:
451
451
 
@@ -1,4 +1,4 @@
1
1
  export declare const ARTIFACT_TEMPLATES: Record<string, string>;
2
2
  export declare const RULEBOOK_MARKDOWN = "# Cclaw Rulebook\n\n## MUST_ALWAYS\n- Follow flow order: brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship\n- Require explicit user confirmation after plan before TDD\n- Keep evidence artifacts in `.cclaw/artifacts/`\n- Enforce RED before GREEN in TDD\n- Run two-layer review (spec_compliance and code_quality) before ship\n- Validate all inputs before processing \u2014 never trust external data without sanitization\n- Prefer immutable data patterns and pure functions where the language supports them\n- Follow existing repo conventions, patterns, and directory structure \u2014 match the codebase\n- Verify claims with fresh evidence: \"tests pass\" requires running tests in this message\n- Use conventional commits: `type(scope): description` (feat, fix, refactor, test, docs, chore)\n\n## MUST_NEVER\n- Skip RED phase and jump directly to GREEN in TDD\n- Ship with critical review findings\n- Start implementation during /brainstorm\n- Modify generated cclaw files manually when CLI can regenerate them\n- Commit `.cclaw/` or generated shim files\n- Expose secrets, tokens, API keys, or absolute system paths in agent output\n- Duplicate existing functionality without explicit justification \u2014 search before building\n- Bypass security checks, linting hooks, or type checking to \"move faster\"\n- Claim success (\"Done,\" \"All good,\" \"Tests pass\") without running verification in this message\n- Make changes outside the blast radius of the current task without user consent\n\n## DELEGATION\nWhen a task requires specialist knowledge (security audit, performance profiling, database review),\ndelegate to a specialized agent or skill if the harness supports it. The primary agent should:\n1. Identify the specialist domain\n2. Provide focused context (relevant files, the specific concern)\n3. Evaluate the specialist output before acting on it \u2014 do not blindly apply recommendations\n";
3
- export declare const CURSOR_WORKFLOW_RULE_MDC = "---\ndescription: cclaw workflow guardrails for Cursor agent sessions\nglobs:\n - \"**/*\"\nalwaysApply: true\n---\n\n<!-- cclaw-managed-cursor-workflow-rule -->\n\n# Cclaw Workflow Guardrails\n\n## Activation Rule\n\nBefore responding to coding work:\n1. Read `.cclaw/state/flow-state.json`.\n2. Start with `/cc` or continue with `/cc-next`.\n3. If no software-stage flow applies, respond normally.\n\n## Stage Order\n\n`brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship`\n\nTrack-specific skips are allowed only when `flow-state.track` + `skippedStages` explicitly say so.\n\n## Task Classification\n\n| Class | Route |\n|---|---|\n| non-trivial software work | `/cc <idea>` |\n| trivial software fix | `/cc <idea>` (quick track) |\n| bugfix with repro | `/cc <idea>` and enforce RED-first in tdd |\n| pure question / non-software | direct answer (no stage flow) |\n\n## Command Surface\n\n- `/cc` = entry and resume.\n- `/cc-next` = only progression path.\n- Knowledge capture and recall use the `learnings` skill when requested.\n\n## Verification Discipline\n\n- No completion claim without fresh command evidence in this turn.\n- Do not mark gates passed from memory.\n- Keep evidence in `.cclaw/artifacts/`; archive via `npx cclaw-cli archive`.\n\n## Delegation And Approvals\n\n- Machine-only checks in design/plan/tdd/review/ship should auto-dispatch when tooling supports it.\n- Ask for user input only at explicit approval gates (scope mode, plan approval, challenge resolution, ship finalization).\n- If harness capabilities are partial, record waiver reasons in delegation logs.\n\n## Routing Source Of Truth\n\n- Primary router: `.cclaw/skills/using-cclaw/SKILL.md`.\n- Stage behavior: current stage skill plus `.cclaw/state/flow-state.json`.\n- Preamble budget: keep role/status announcements brief and avoid repeating\n them unless the stage or role changes.\n";
3
+ export declare const CURSOR_WORKFLOW_RULE_MDC = "---\ndescription: cclaw workflow guardrails for Cursor agent sessions\nglobs:\n - \"**/*\"\nalwaysApply: true\n---\n\n<!-- cclaw-managed-cursor-workflow-rule -->\n\n# Cclaw Workflow Guardrails\n\n## Activation Rule\n\nBefore responding to coding work:\n1. Read `.cclaw/state/flow-state.json`.\n2. Start with `/cc` or continue with `/cc`.\n3. If no software-stage flow applies, respond normally.\n\n## Stage Order\n\n`brainstorm -> scope -> design -> spec -> plan -> tdd -> review -> ship`\n\nTrack-specific skips are allowed only when `flow-state.track` + `skippedStages` explicitly say so.\n\n## Task Classification\n\n| Class | Route |\n|---|---|\n| non-trivial software work | `/cc <idea>` |\n| trivial software fix | `/cc <idea>` (quick track) |\n| bugfix with repro | `/cc <idea>` and enforce RED-first in tdd |\n| pure question / non-software | direct answer (no stage flow) |\n\n## Command Surface\n\n- `/cc` = entry and resume.\n- `/cc` = only progression path.\n- Knowledge capture and recall use the `learnings` skill when requested.\n\n## Verification Discipline\n\n- No completion claim without fresh command evidence in this turn.\n- Do not mark gates passed from memory.\n- Keep evidence in `.cclaw/artifacts/`; archive via `npx cclaw-cli archive`.\n\n## Delegation And Approvals\n\n- Machine-only checks in design/plan/tdd/review/ship should auto-dispatch when tooling supports it.\n- Ask for user input only at explicit approval gates (scope mode, plan approval, challenge resolution, ship finalization).\n- If harness capabilities are partial, record waiver reasons in delegation logs.\n\n## Routing Source Of Truth\n\n- Primary router: `.cclaw/skills/using-cclaw/SKILL.md`.\n- Stage behavior: current stage skill plus `.cclaw/state/flow-state.json`.\n- Preamble budget: keep role/status announcements brief and avoid repeating\n them unless the stage or role changes.\n";
4
4
  export declare function buildRulesJson(): Record<string, unknown>;