cclaw-cli 0.48.5 → 0.48.7
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/artifact-linter.js +32 -0
- package/dist/config.d.ts +1 -1
- package/dist/config.js +44 -5
- package/dist/content/hooks.d.ts +2 -2
- package/dist/content/hooks.js +293 -89
- package/dist/content/ideate-command.js +11 -0
- package/dist/content/iron-laws.d.ts +142 -0
- package/dist/content/iron-laws.js +191 -0
- package/dist/content/meta-skill.js +1 -0
- package/dist/content/next-command.js +12 -0
- package/dist/content/observe.js +555 -45
- package/dist/content/ops-command.js +11 -0
- package/dist/content/session-hooks.js +3 -1
- package/dist/content/stage-schema.d.ts +16 -0
- package/dist/content/stage-schema.js +82 -5
- package/dist/content/stages/review.js +4 -4
- package/dist/content/stages/tdd.js +7 -7
- package/dist/content/start-command.js +12 -0
- package/dist/content/subagents.js +26 -0
- package/dist/content/templates.js +8 -0
- package/dist/content/view-command.js +11 -0
- package/dist/doctor.js +6 -2
- package/dist/harness-adapters.js +3 -0
- package/dist/install.js +11 -1
- package/dist/internal/advance-stage.js +14 -2
- package/dist/internal/envelope-validate.d.ts +7 -0
- package/dist/internal/envelope-validate.js +66 -0
- package/dist/internal/knowledge-digest.d.ts +7 -0
- package/dist/internal/knowledge-digest.js +93 -0
- package/dist/internal/tdd-red-evidence.d.ts +7 -0
- package/dist/internal/tdd-red-evidence.js +130 -0
- package/dist/knowledge-store.d.ts +8 -0
- package/dist/knowledge-store.js +95 -0
- package/dist/tdd-cycle.d.ts +7 -0
- package/dist/tdd-cycle.js +29 -0
- package/dist/types.d.ts +6 -0
- package/package.json +1 -1
|
@@ -58,6 +58,17 @@ same session, or save/discard the backlog.
|
|
|
58
58
|
6. **Present the handoff prompt** with four concrete options — not A/B/C
|
|
59
59
|
letters. Default = "Start /cc on the top recommendation".
|
|
60
60
|
|
|
61
|
+
## Headless mode
|
|
62
|
+
|
|
63
|
+
For skill-to-skill invocation, emit exactly one JSON envelope:
|
|
64
|
+
|
|
65
|
+
\`\`\`json
|
|
66
|
+
{"version":"1","kind":"stage-output","stage":"brainstorm","payload":{"command":"/cc-ideate","artifact":".cclaw/artifacts/ideate-<date>-<slug>.md","recommendation":"I-1"},"emittedAt":"<ISO-8601>"}
|
|
67
|
+
\`\`\`
|
|
68
|
+
|
|
69
|
+
Validate envelopes with:
|
|
70
|
+
\`cclaw internal envelope-validate --stdin\`
|
|
71
|
+
|
|
61
72
|
## Primary skill
|
|
62
73
|
|
|
63
74
|
**${RUNTIME_ROOT}/skills/${IDEATE_SKILL_FOLDER}/SKILL.md**
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import type { FlowStage } from "../types.js";
|
|
2
|
+
export type IronLawEnforcementPoint = "PreToolUse" | "PostToolUse" | "SessionStart" | "Stop" | "advisory";
|
|
3
|
+
export type IronLawSeverity = "hard-gate" | "soft-gate";
|
|
4
|
+
export interface IronLawDefinition {
|
|
5
|
+
id: string;
|
|
6
|
+
title: string;
|
|
7
|
+
rule: string;
|
|
8
|
+
rationale: string;
|
|
9
|
+
enforcement: IronLawEnforcementPoint;
|
|
10
|
+
severity: IronLawSeverity;
|
|
11
|
+
appliesTo: "all" | FlowStage[];
|
|
12
|
+
hookMatcher?: {
|
|
13
|
+
toolPattern?: string;
|
|
14
|
+
payloadPattern?: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface IronLawRuntimeRecord {
|
|
18
|
+
id: string;
|
|
19
|
+
title: string;
|
|
20
|
+
rule: string;
|
|
21
|
+
enforcement: IronLawEnforcementPoint;
|
|
22
|
+
severity: IronLawSeverity;
|
|
23
|
+
appliesTo: "all" | FlowStage[];
|
|
24
|
+
strict: boolean;
|
|
25
|
+
hookMatcher?: {
|
|
26
|
+
toolPattern?: string;
|
|
27
|
+
payloadPattern?: string;
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
export interface IronLawRuntimeDocument {
|
|
31
|
+
version: 1;
|
|
32
|
+
generatedAt: string;
|
|
33
|
+
mode: "advisory" | "strict";
|
|
34
|
+
strictLaws: string[];
|
|
35
|
+
laws: IronLawRuntimeRecord[];
|
|
36
|
+
}
|
|
37
|
+
export declare const IRON_LAWS: readonly [{
|
|
38
|
+
readonly id: "tdd-red-before-write";
|
|
39
|
+
readonly title: "RED before production write";
|
|
40
|
+
readonly rule: "Do not edit production code in tdd stage before a failing RED test exists for the slice.";
|
|
41
|
+
readonly rationale: "Prevents implementation-first behavior and keeps RED as executable specification.";
|
|
42
|
+
readonly enforcement: "PreToolUse";
|
|
43
|
+
readonly severity: "hard-gate";
|
|
44
|
+
readonly appliesTo: ["tdd"];
|
|
45
|
+
readonly hookMatcher: {
|
|
46
|
+
readonly toolPattern: "write|edit|multiedit|applypatch|shell|bash";
|
|
47
|
+
readonly payloadPattern: "\\.(ts|tsx|js|jsx|py|go|java|rs|rb|php|c|cc|cpp|h|hpp)";
|
|
48
|
+
};
|
|
49
|
+
}, {
|
|
50
|
+
readonly id: "plan-requires-approval";
|
|
51
|
+
readonly title: "No implementation before plan approval";
|
|
52
|
+
readonly rule: "Do not perform write-like actions while plan stage is pending WAIT_FOR_CONFIRM approval.";
|
|
53
|
+
readonly rationale: "Locks intent before execution and reduces expensive rework from unapproved paths.";
|
|
54
|
+
readonly enforcement: "PreToolUse";
|
|
55
|
+
readonly severity: "hard-gate";
|
|
56
|
+
readonly appliesTo: ["plan"];
|
|
57
|
+
}, {
|
|
58
|
+
readonly id: "runtime-writes-managed-only";
|
|
59
|
+
readonly title: "Runtime writes are managed";
|
|
60
|
+
readonly rule: "Do not mutate .cclaw/state, .cclaw/hooks, or .cclaw/skills by ad-hoc edits unless using cclaw-managed commands.";
|
|
61
|
+
readonly rationale: "Protects generated runtime integrity and avoids drift that silently breaks hooks or skills.";
|
|
62
|
+
readonly enforcement: "PreToolUse";
|
|
63
|
+
readonly severity: "hard-gate";
|
|
64
|
+
readonly appliesTo: "all";
|
|
65
|
+
readonly hookMatcher: {
|
|
66
|
+
readonly toolPattern: "write|edit|multiedit|delete|applypatch|shell|bash";
|
|
67
|
+
readonly payloadPattern: "\\.cclaw/(state|hooks|skills)";
|
|
68
|
+
};
|
|
69
|
+
}, {
|
|
70
|
+
readonly id: "flow-state-read-fresh";
|
|
71
|
+
readonly title: "Fresh flow-state read required";
|
|
72
|
+
readonly rule: "Before mutating actions, a fresh read of .cclaw/state/flow-state.json must exist within guard freshness window.";
|
|
73
|
+
readonly rationale: "Prevents stale-stage mutations after context shifts or multi-agent divergence.";
|
|
74
|
+
readonly enforcement: "PreToolUse";
|
|
75
|
+
readonly severity: "hard-gate";
|
|
76
|
+
readonly appliesTo: "all";
|
|
77
|
+
}, {
|
|
78
|
+
readonly id: "review-layer-order";
|
|
79
|
+
readonly title: "Review layers are sequential";
|
|
80
|
+
readonly rule: "Review stage must complete Layer 1 spec compliance before Layer 2 quality/security passes.";
|
|
81
|
+
readonly rationale: "Stops premature quality discussion when acceptance criteria are not yet satisfied.";
|
|
82
|
+
readonly enforcement: "advisory";
|
|
83
|
+
readonly severity: "soft-gate";
|
|
84
|
+
readonly appliesTo: ["review"];
|
|
85
|
+
}, {
|
|
86
|
+
readonly id: "review-criticals-close-before-ship";
|
|
87
|
+
readonly title: "No ship with open criticals";
|
|
88
|
+
readonly rule: "Ship decisions are blocked when review-army contains open Critical findings or ship blockers.";
|
|
89
|
+
readonly rationale: "Enforces explicit risk closure before release finalization.";
|
|
90
|
+
readonly enforcement: "PreToolUse";
|
|
91
|
+
readonly severity: "hard-gate";
|
|
92
|
+
readonly appliesTo: ["ship"];
|
|
93
|
+
}, {
|
|
94
|
+
readonly id: "ship-preflight-required";
|
|
95
|
+
readonly title: "Preflight required before finalization";
|
|
96
|
+
readonly rule: "Do not execute release finalization actions until ship preflight gate is passed.";
|
|
97
|
+
readonly rationale: "Catches regressions before irreversible release steps.";
|
|
98
|
+
readonly enforcement: "PreToolUse";
|
|
99
|
+
readonly severity: "hard-gate";
|
|
100
|
+
readonly appliesTo: ["ship"];
|
|
101
|
+
}, {
|
|
102
|
+
readonly id: "review-coverage-complete-before-ship";
|
|
103
|
+
readonly title: "Review layer coverage before ship";
|
|
104
|
+
readonly rule: "Block ship finalization when review-army does not confirm full Layer 1/2 coverage map.";
|
|
105
|
+
readonly rationale: "Prevents finalization when multi-pass review evidence is incomplete or partially missing.";
|
|
106
|
+
readonly enforcement: "PreToolUse";
|
|
107
|
+
readonly severity: "hard-gate";
|
|
108
|
+
readonly appliesTo: ["ship"];
|
|
109
|
+
}, {
|
|
110
|
+
readonly id: "subagent-task-self-contained";
|
|
111
|
+
readonly title: "Subagent tasks are self-contained";
|
|
112
|
+
readonly rule: "Delegated tasks must include explicit objective, constraints, and expected output, not just references.";
|
|
113
|
+
readonly rationale: "Avoids context loss and low-quality delegation in isolated worker contexts.";
|
|
114
|
+
readonly enforcement: "advisory";
|
|
115
|
+
readonly severity: "soft-gate";
|
|
116
|
+
readonly appliesTo: "all";
|
|
117
|
+
}, {
|
|
118
|
+
readonly id: "no-secrets-in-artifacts";
|
|
119
|
+
readonly title: "Never log secrets in artifacts";
|
|
120
|
+
readonly rule: "Secrets/tokens/passwords must not be written to review, ship, or runtime state artifacts.";
|
|
121
|
+
readonly rationale: "Prevents accidental credential leakage through generated workflow artifacts.";
|
|
122
|
+
readonly enforcement: "PostToolUse";
|
|
123
|
+
readonly severity: "hard-gate";
|
|
124
|
+
readonly appliesTo: "all";
|
|
125
|
+
}, {
|
|
126
|
+
readonly id: "stop-clean-or-checkpointed";
|
|
127
|
+
readonly title: "Stop only from clean checkpoint";
|
|
128
|
+
readonly rule: "Do not end a session with dirty state unless checkpoint explicitly records unresolved work and blockers.";
|
|
129
|
+
readonly rationale: "Protects continuity and prevents silent half-finished sessions.";
|
|
130
|
+
readonly enforcement: "Stop";
|
|
131
|
+
readonly severity: "hard-gate";
|
|
132
|
+
readonly appliesTo: "all";
|
|
133
|
+
}];
|
|
134
|
+
export declare function isIronLawId(value: string): boolean;
|
|
135
|
+
export declare function normalizeStrictLawIds(ids: string[] | undefined): string[];
|
|
136
|
+
export declare function ironLawRuntimeDocument(options?: {
|
|
137
|
+
mode?: "advisory" | "strict";
|
|
138
|
+
strictLaws?: string[];
|
|
139
|
+
nowIso?: string;
|
|
140
|
+
}): IronLawRuntimeDocument;
|
|
141
|
+
export declare function ironLawsAgentsMdBlock(): string;
|
|
142
|
+
export declare function ironLawsSkillMarkdown(): string;
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { RUNTIME_ROOT } from "../constants.js";
|
|
2
|
+
export const IRON_LAWS = [
|
|
3
|
+
{
|
|
4
|
+
id: "tdd-red-before-write",
|
|
5
|
+
title: "RED before production write",
|
|
6
|
+
rule: "Do not edit production code in tdd stage before a failing RED test exists for the slice.",
|
|
7
|
+
rationale: "Prevents implementation-first behavior and keeps RED as executable specification.",
|
|
8
|
+
enforcement: "PreToolUse",
|
|
9
|
+
severity: "hard-gate",
|
|
10
|
+
appliesTo: ["tdd"],
|
|
11
|
+
hookMatcher: {
|
|
12
|
+
toolPattern: "write|edit|multiedit|applypatch|shell|bash",
|
|
13
|
+
payloadPattern: "\\.(ts|tsx|js|jsx|py|go|java|rs|rb|php|c|cc|cpp|h|hpp)"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
id: "plan-requires-approval",
|
|
18
|
+
title: "No implementation before plan approval",
|
|
19
|
+
rule: "Do not perform write-like actions while plan stage is pending WAIT_FOR_CONFIRM approval.",
|
|
20
|
+
rationale: "Locks intent before execution and reduces expensive rework from unapproved paths.",
|
|
21
|
+
enforcement: "PreToolUse",
|
|
22
|
+
severity: "hard-gate",
|
|
23
|
+
appliesTo: ["plan"]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: "runtime-writes-managed-only",
|
|
27
|
+
title: "Runtime writes are managed",
|
|
28
|
+
rule: `Do not mutate ${RUNTIME_ROOT}/state, ${RUNTIME_ROOT}/hooks, or ${RUNTIME_ROOT}/skills by ad-hoc edits unless using cclaw-managed commands.`,
|
|
29
|
+
rationale: "Protects generated runtime integrity and avoids drift that silently breaks hooks or skills.",
|
|
30
|
+
enforcement: "PreToolUse",
|
|
31
|
+
severity: "hard-gate",
|
|
32
|
+
appliesTo: "all",
|
|
33
|
+
hookMatcher: {
|
|
34
|
+
toolPattern: "write|edit|multiedit|delete|applypatch|shell|bash",
|
|
35
|
+
payloadPattern: "\\.cclaw/(state|hooks|skills)"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: "flow-state-read-fresh",
|
|
40
|
+
title: "Fresh flow-state read required",
|
|
41
|
+
rule: `Before mutating actions, a fresh read of ${RUNTIME_ROOT}/state/flow-state.json must exist within guard freshness window.`,
|
|
42
|
+
rationale: "Prevents stale-stage mutations after context shifts or multi-agent divergence.",
|
|
43
|
+
enforcement: "PreToolUse",
|
|
44
|
+
severity: "hard-gate",
|
|
45
|
+
appliesTo: "all"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "review-layer-order",
|
|
49
|
+
title: "Review layers are sequential",
|
|
50
|
+
rule: "Review stage must complete Layer 1 spec compliance before Layer 2 quality/security passes.",
|
|
51
|
+
rationale: "Stops premature quality discussion when acceptance criteria are not yet satisfied.",
|
|
52
|
+
enforcement: "advisory",
|
|
53
|
+
severity: "soft-gate",
|
|
54
|
+
appliesTo: ["review"]
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
id: "review-criticals-close-before-ship",
|
|
58
|
+
title: "No ship with open criticals",
|
|
59
|
+
rule: "Ship decisions are blocked when review-army contains open Critical findings or ship blockers.",
|
|
60
|
+
rationale: "Enforces explicit risk closure before release finalization.",
|
|
61
|
+
enforcement: "PreToolUse",
|
|
62
|
+
severity: "hard-gate",
|
|
63
|
+
appliesTo: ["ship"]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "ship-preflight-required",
|
|
67
|
+
title: "Preflight required before finalization",
|
|
68
|
+
rule: "Do not execute release finalization actions until ship preflight gate is passed.",
|
|
69
|
+
rationale: "Catches regressions before irreversible release steps.",
|
|
70
|
+
enforcement: "PreToolUse",
|
|
71
|
+
severity: "hard-gate",
|
|
72
|
+
appliesTo: ["ship"]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: "review-coverage-complete-before-ship",
|
|
76
|
+
title: "Review layer coverage before ship",
|
|
77
|
+
rule: "Block ship finalization when review-army does not confirm full Layer 1/2 coverage map.",
|
|
78
|
+
rationale: "Prevents finalization when multi-pass review evidence is incomplete or partially missing.",
|
|
79
|
+
enforcement: "PreToolUse",
|
|
80
|
+
severity: "hard-gate",
|
|
81
|
+
appliesTo: ["ship"]
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: "subagent-task-self-contained",
|
|
85
|
+
title: "Subagent tasks are self-contained",
|
|
86
|
+
rule: "Delegated tasks must include explicit objective, constraints, and expected output, not just references.",
|
|
87
|
+
rationale: "Avoids context loss and low-quality delegation in isolated worker contexts.",
|
|
88
|
+
enforcement: "advisory",
|
|
89
|
+
severity: "soft-gate",
|
|
90
|
+
appliesTo: "all"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
id: "no-secrets-in-artifacts",
|
|
94
|
+
title: "Never log secrets in artifacts",
|
|
95
|
+
rule: "Secrets/tokens/passwords must not be written to review, ship, or runtime state artifacts.",
|
|
96
|
+
rationale: "Prevents accidental credential leakage through generated workflow artifacts.",
|
|
97
|
+
enforcement: "PostToolUse",
|
|
98
|
+
severity: "hard-gate",
|
|
99
|
+
appliesTo: "all"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: "stop-clean-or-checkpointed",
|
|
103
|
+
title: "Stop only from clean checkpoint",
|
|
104
|
+
rule: "Do not end a session with dirty state unless checkpoint explicitly records unresolved work and blockers.",
|
|
105
|
+
rationale: "Protects continuity and prevents silent half-finished sessions.",
|
|
106
|
+
enforcement: "Stop",
|
|
107
|
+
severity: "hard-gate",
|
|
108
|
+
appliesTo: "all"
|
|
109
|
+
}
|
|
110
|
+
];
|
|
111
|
+
export function isIronLawId(value) {
|
|
112
|
+
return IRON_LAWS.some((law) => law.id === value);
|
|
113
|
+
}
|
|
114
|
+
export function normalizeStrictLawIds(ids) {
|
|
115
|
+
if (!Array.isArray(ids))
|
|
116
|
+
return [];
|
|
117
|
+
const unique = new Set();
|
|
118
|
+
for (const id of ids) {
|
|
119
|
+
if (typeof id !== "string")
|
|
120
|
+
continue;
|
|
121
|
+
const trimmed = id.trim();
|
|
122
|
+
if (!trimmed || !isIronLawId(trimmed))
|
|
123
|
+
continue;
|
|
124
|
+
unique.add(trimmed);
|
|
125
|
+
}
|
|
126
|
+
return [...unique];
|
|
127
|
+
}
|
|
128
|
+
export function ironLawRuntimeDocument(options = {}) {
|
|
129
|
+
const mode = options.mode === "strict" ? "strict" : "advisory";
|
|
130
|
+
const strictLawSet = new Set(normalizeStrictLawIds(options.strictLaws));
|
|
131
|
+
const laws = IRON_LAWS.map((law) => ({
|
|
132
|
+
id: law.id,
|
|
133
|
+
title: law.title,
|
|
134
|
+
rule: law.rule,
|
|
135
|
+
enforcement: law.enforcement,
|
|
136
|
+
severity: law.severity,
|
|
137
|
+
appliesTo: law.appliesTo === "all" ? "all" : [...law.appliesTo],
|
|
138
|
+
strict: mode === "strict" || strictLawSet.has(law.id),
|
|
139
|
+
hookMatcher: "hookMatcher" in law ? law.hookMatcher : undefined
|
|
140
|
+
}));
|
|
141
|
+
return {
|
|
142
|
+
version: 1,
|
|
143
|
+
generatedAt: options.nowIso ?? new Date().toISOString(),
|
|
144
|
+
mode,
|
|
145
|
+
strictLaws: [...strictLawSet],
|
|
146
|
+
laws
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
export function ironLawsAgentsMdBlock() {
|
|
150
|
+
const rows = IRON_LAWS.map((law) => {
|
|
151
|
+
return `| \`${law.id}\` | ${law.rule} | ${law.enforcement} | ${law.severity} |`;
|
|
152
|
+
}).join("\n");
|
|
153
|
+
return `### Iron Laws
|
|
154
|
+
|
|
155
|
+
These rules are always-on. Hook-enforced laws can block actions in strict mode.
|
|
156
|
+
|
|
157
|
+
| ID | Rule | Enforced by | Level |
|
|
158
|
+
|---|---|---|---|
|
|
159
|
+
${rows}
|
|
160
|
+
`;
|
|
161
|
+
}
|
|
162
|
+
export function ironLawsSkillMarkdown() {
|
|
163
|
+
const list = IRON_LAWS.map((law, index) => {
|
|
164
|
+
const applies = law.appliesTo === "all" ? "all stages" : law.appliesTo.join(", ");
|
|
165
|
+
return `### ${index + 1}. ${law.title}
|
|
166
|
+
|
|
167
|
+
- **ID:** \`${law.id}\`
|
|
168
|
+
- **Rule:** ${law.rule}
|
|
169
|
+
- **Why:** ${law.rationale}
|
|
170
|
+
- **Applies to:** ${applies}
|
|
171
|
+
- **Enforced by:** ${law.enforcement} (${law.severity})
|
|
172
|
+
`;
|
|
173
|
+
}).join("\n");
|
|
174
|
+
return `---
|
|
175
|
+
name: iron-laws
|
|
176
|
+
description: "Non-negotiable workflow constraints enforced by cclaw hooks and routing."
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
# Iron Laws
|
|
180
|
+
|
|
181
|
+
These are cclaw's non-negotiable constraints for harness sessions.
|
|
182
|
+
Use them as the final arbitration layer when local instructions conflict.
|
|
183
|
+
|
|
184
|
+
${list}
|
|
185
|
+
|
|
186
|
+
## Practical rule
|
|
187
|
+
|
|
188
|
+
If a law says stop, stop and surface the blocking reason with the smallest safe
|
|
189
|
+
next step.
|
|
190
|
+
`;
|
|
191
|
+
}
|
|
@@ -85,6 +85,7 @@ Load utility skills only when triggered by the current task:
|
|
|
85
85
|
- verification-before-completion before completion claims
|
|
86
86
|
- finishing-a-development-branch during ship/finalization
|
|
87
87
|
- document-review, receiving-code-review, and execution context skills
|
|
88
|
+
- iron-laws as policy arbitration when instructions conflict
|
|
88
89
|
- language rule packs from \`.cclaw/config.yaml\` when enabled
|
|
89
90
|
|
|
90
91
|
Custom project skills under \`.cclaw/custom-skills/\` are opt-in supplements,
|
|
@@ -102,6 +102,18 @@ This is the only progression command the user needs to drive the entire flow. St
|
|
|
102
102
|
regenerating the retro draft.
|
|
103
103
|
- No special resume command needed — \`/cc-next\` IS the resume command.
|
|
104
104
|
|
|
105
|
+
## Headless mode
|
|
106
|
+
|
|
107
|
+
When orchestrated by another skill/subagent, emit exactly one JSON envelope and
|
|
108
|
+
no narrative text:
|
|
109
|
+
|
|
110
|
+
\`\`\`json
|
|
111
|
+
{"version":"1","kind":"gate-result","stage":"review","payload":{"command":"/cc-next","decision":"resume_or_advance","nextStage":"ship"},"emittedAt":"<ISO-8601>"}
|
|
112
|
+
\`\`\`
|
|
113
|
+
|
|
114
|
+
Validate envelopes with:
|
|
115
|
+
\`cclaw internal envelope-validate --stdin\`
|
|
116
|
+
|
|
105
117
|
## Primary skill
|
|
106
118
|
|
|
107
119
|
**${skillRel}** — full protocol and stage table.
|