cclaw-cli 0.55.2 → 2.0.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 (92) hide show
  1. package/README.md +3 -3
  2. package/dist/artifact-linter/brainstorm.js +59 -1
  3. package/dist/artifact-linter/design.js +46 -1
  4. package/dist/artifact-linter/plan.js +22 -1
  5. package/dist/artifact-linter/review.js +35 -1
  6. package/dist/artifact-linter/scope.js +33 -9
  7. package/dist/artifact-linter/shared.d.ts +12 -10
  8. package/dist/artifact-linter/shared.js +102 -41
  9. package/dist/artifact-linter/ship.js +36 -0
  10. package/dist/artifact-linter/spec.js +23 -1
  11. package/dist/artifact-linter/tdd.js +74 -0
  12. package/dist/artifact-linter.d.ts +1 -1
  13. package/dist/artifact-linter.js +11 -1
  14. package/dist/constants.d.ts +1 -1
  15. package/dist/constants.js +1 -0
  16. package/dist/content/closeout-guidance.d.ts +1 -1
  17. package/dist/content/closeout-guidance.js +10 -11
  18. package/dist/content/core-agents.d.ts +35 -36
  19. package/dist/content/core-agents.js +189 -99
  20. package/dist/content/diff-command.js +1 -1
  21. package/dist/content/examples.d.ts +0 -3
  22. package/dist/content/examples.js +197 -752
  23. package/dist/content/hook-events.js +1 -2
  24. package/dist/content/hook-manifest.d.ts +3 -4
  25. package/dist/content/hook-manifest.js +22 -25
  26. package/dist/content/hooks.js +54 -14
  27. package/dist/content/idea.d.ts +60 -0
  28. package/dist/content/idea.js +404 -0
  29. package/dist/content/learnings.d.ts +2 -4
  30. package/dist/content/learnings.js +10 -26
  31. package/dist/content/meta-skill.js +4 -3
  32. package/dist/content/node-hooks.js +368 -164
  33. package/dist/content/observe.js +3 -3
  34. package/dist/content/opencode-plugin.js +12 -32
  35. package/dist/content/reference-patterns.js +2 -2
  36. package/dist/content/runtime-shared-snippets.d.ts +8 -0
  37. package/dist/content/runtime-shared-snippets.js +80 -0
  38. package/dist/content/session-hooks.js +1 -1
  39. package/dist/content/skills-elicitation.d.ts +1 -0
  40. package/dist/content/skills-elicitation.js +123 -0
  41. package/dist/content/skills.d.ts +1 -0
  42. package/dist/content/skills.js +54 -2
  43. package/dist/content/stage-schema.js +107 -63
  44. package/dist/content/stages/brainstorm.js +7 -3
  45. package/dist/content/stages/design.js +4 -0
  46. package/dist/content/stages/review.js +8 -8
  47. package/dist/content/stages/schema-types.d.ts +2 -2
  48. package/dist/content/stages/scope.js +7 -3
  49. package/dist/content/stages/ship.js +1 -1
  50. package/dist/content/start-command.js +4 -4
  51. package/dist/content/status-command.js +3 -3
  52. package/dist/content/subagent-context-skills.js +156 -1
  53. package/dist/content/subagents.d.ts +0 -5
  54. package/dist/content/subagents.js +12 -82
  55. package/dist/content/templates.js +108 -6
  56. package/dist/content/utility-skills.js +26 -97
  57. package/dist/flow-state.d.ts +12 -6
  58. package/dist/flow-state.js +5 -6
  59. package/dist/gate-evidence.d.ts +0 -31
  60. package/dist/gate-evidence.js +3 -181
  61. package/dist/harness-adapters.js +1 -1
  62. package/dist/hook-schemas/claude-hooks.v1.json +2 -3
  63. package/dist/hook-schemas/codex-hooks.v1.json +1 -1
  64. package/dist/hook-schemas/cursor-hooks.v1.json +1 -1
  65. package/dist/install.js +50 -7
  66. package/dist/internal/advance-stage/advance.js +22 -2
  67. package/dist/internal/advance-stage/parsers.d.ts +1 -0
  68. package/dist/internal/advance-stage/parsers.js +6 -0
  69. package/dist/internal/advance-stage/review-loop.js +1 -10
  70. package/dist/knowledge-store.d.ts +2 -20
  71. package/dist/knowledge-store.js +43 -57
  72. package/dist/policy.js +3 -3
  73. package/dist/retro-gate.js +8 -90
  74. package/dist/run-archive.js +1 -4
  75. package/dist/run-persistence.d.ts +1 -1
  76. package/dist/run-persistence.js +43 -111
  77. package/dist/runtime/run-hook.entry.d.ts +3 -0
  78. package/dist/runtime/run-hook.entry.js +5 -0
  79. package/dist/runtime/run-hook.mjs +9647 -0
  80. package/dist/track-heuristics.d.ts +7 -1
  81. package/dist/track-heuristics.js +12 -0
  82. package/package.json +4 -2
  83. package/dist/content/hook-inline-snippets.d.ts +0 -96
  84. package/dist/content/hook-inline-snippets.js +0 -515
  85. package/dist/content/idea-command.d.ts +0 -8
  86. package/dist/content/idea-command.js +0 -322
  87. package/dist/content/idea-frames.d.ts +0 -31
  88. package/dist/content/idea-frames.js +0 -140
  89. package/dist/content/idea-ranking.d.ts +0 -25
  90. package/dist/content/idea-ranking.js +0 -65
  91. package/dist/trace-matrix.d.ts +0 -27
  92. package/dist/trace-matrix.js +0 -226
@@ -1,3 +1,6 @@
1
+ import fs from "node:fs/promises";
2
+ import path from "node:path";
3
+ import { readDelegationLedger } from "../delegation.js";
1
4
  import { sectionBodyByName } from "./shared.js";
2
5
  export async function lintTddStage(ctx) {
3
6
  const { projectRoot, track, raw, absFile, sections, findings, parsedFrontmatter, brainstormShortCircuitBody, brainstormShortCircuitActivated, staleDiagramAuditEnabled, isTrivialOverride } = ctx;
@@ -121,4 +124,75 @@ export async function lintTddStage(ctx) {
121
124
  : "Mocks/spies detected without boundary justification; add explicit trust-boundary rationale or replace with real/fake/stub coverage."
122
125
  });
123
126
  }
127
+ const delegationLedger = await readDelegationLedger(projectRoot);
128
+ const activeRunEntries = delegationLedger.entries.filter((entry) => entry.stage === "tdd" && entry.runId === delegationLedger.runId);
129
+ const completedSliceImplementers = activeRunEntries.filter((entry) => entry.agent === "slice-implementer" && entry.status === "completed");
130
+ const fanOutDetected = completedSliceImplementers.length > 1;
131
+ if (fanOutDetected) {
132
+ const artifactsDir = path.dirname(absFile);
133
+ const cohesionContractMarkdownPath = path.join(artifactsDir, "cohesion-contract.md");
134
+ const cohesionContractJsonPath = path.join(artifactsDir, "cohesion-contract.json");
135
+ let cohesionContractFound = true;
136
+ const cohesionErrors = [];
137
+ try {
138
+ const markdown = await fs.readFile(cohesionContractMarkdownPath, "utf8");
139
+ if (!/#\s*Cohesion Contract\b/u.test(markdown)) {
140
+ cohesionContractFound = false;
141
+ cohesionErrors.push("cohesion-contract.md exists but missing `# Cohesion Contract` heading.");
142
+ }
143
+ }
144
+ catch {
145
+ cohesionContractFound = false;
146
+ cohesionErrors.push("cohesion-contract.md is missing.");
147
+ }
148
+ try {
149
+ const jsonRaw = await fs.readFile(cohesionContractJsonPath, "utf8");
150
+ const parsed = JSON.parse(jsonRaw);
151
+ const objectLike = parsed !== null && typeof parsed === "object" && !Array.isArray(parsed);
152
+ const parsedRecord = objectLike ? parsed : null;
153
+ const hasRequiredShape = parsedRecord !== null &&
154
+ Array.isArray(parsedRecord.sharedTypes) &&
155
+ Array.isArray(parsedRecord.touchpoints) &&
156
+ Array.isArray(parsedRecord.slices) &&
157
+ parsedRecord.status !== undefined &&
158
+ typeof parsedRecord.status === "object" &&
159
+ parsedRecord.status !== null;
160
+ if (!hasRequiredShape) {
161
+ cohesionContractFound = false;
162
+ cohesionErrors.push("cohesion-contract.json must parse and include `sharedTypes[]`, `touchpoints[]`, `slices[]`, and `status`.");
163
+ }
164
+ }
165
+ catch {
166
+ cohesionContractFound = false;
167
+ cohesionErrors.push("cohesion-contract.json is missing or invalid JSON.");
168
+ }
169
+ findings.push({
170
+ section: "tdd.cohesion_contract_missing",
171
+ required: true,
172
+ rule: "When delegation ledger has >1 completed slice-implementer rows for active TDD run, require `.cclaw/artifacts/cohesion-contract.md` and parseable `.cclaw/artifacts/cohesion-contract.json` sidecar.",
173
+ found: cohesionContractFound,
174
+ details: cohesionContractFound
175
+ ? `Fan-out detected (${completedSliceImplementers.length} completed slice-implementer rows); cohesion contract markdown+JSON sidecar are present and parseable.`
176
+ : cohesionErrors.join(" ")
177
+ });
178
+ const completedOverseerRows = activeRunEntries.filter((entry) => entry.agent === "integration-overseer" && entry.status === "completed");
179
+ const overseerStatusInEvidence = completedOverseerRows.some((entry) => {
180
+ const refs = Array.isArray(entry.evidenceRefs) ? entry.evidenceRefs.join(" ") : "";
181
+ return /\b(?:PASS_WITH_GAPS|PASS)\b/u.test(refs);
182
+ });
183
+ const overseerStatusInArtifact = /\bintegration-overseer\b[\s\S]{0,200}\b(?:PASS_WITH_GAPS|PASS)\b/iu.test(raw);
184
+ const integrationOverseerFound = completedOverseerRows.length > 0 &&
185
+ (overseerStatusInEvidence || overseerStatusInArtifact);
186
+ findings.push({
187
+ section: "tdd.integration_overseer_missing",
188
+ required: true,
189
+ rule: "When fan-out is detected, require completed `integration-overseer` evidence with PASS or PASS_WITH_GAPS.",
190
+ found: integrationOverseerFound,
191
+ details: integrationOverseerFound
192
+ ? "integration-overseer completion recorded with PASS/PASS_WITH_GAPS evidence."
193
+ : completedOverseerRows.length === 0
194
+ ? "Fan-out detected but no completed integration-overseer delegation row exists for active run."
195
+ : "integration-overseer completion exists, but PASS/PASS_WITH_GAPS evidence is missing in delegation evidenceRefs and artifact text."
196
+ });
197
+ }
124
198
  }
@@ -1,5 +1,5 @@
1
1
  import type { FlowStage, FlowTrack } from "./types.js";
2
2
  import { type LintResult } from "./artifact-linter/shared.js";
3
3
  export { validateReviewArmy, checkReviewVerdictConsistency, checkReviewSecurityNoChangeAttestation, type ReviewVerdictConsistencyResult, type ReviewSecurityNoChangeAttestationResult } from "./artifact-linter/review-army.js";
4
- export { type LintFinding, type LintResult, type LearningEntryType, type LearningConfidence, type LearningSeverity, type LearningUniversality, type LearningMaturity, type LearningSource, type LearningSeedEntry, type LearningsParseResult, extractMarkdownSectionBody, parseLearningsSection } from "./artifact-linter/shared.js";
4
+ export { type LintFinding, type LintResult, type LearningEntryType, type LearningConfidence, type LearningSeverity, type LearningSource, type LearningSeedEntry, type LearningsParseResult, extractMarkdownSectionBody, parseLearningsSection } from "./artifact-linter/shared.js";
5
5
  export declare function lintArtifact(projectRoot: string, stage: FlowStage, track?: FlowTrack): Promise<LintResult>;
@@ -3,7 +3,7 @@ import { resolveArtifactPath as resolveStageArtifactPath } from "./artifact-path
3
3
  import { readConfig } from "./config.js";
4
4
  import { exists } from "./fs-utils.js";
5
5
  import { stageSchema } from "./content/stage-schema.js";
6
- import { extractH2Sections, extractLockedDecisionAnchors, extractRequirementIdsFromMarkdown, isShortCircuitActivated, normalizeHeadingTitle, parseFrontmatter, parseLearningsSection, sectionBodyByAnyName, sectionBodyByHeadingPrefix, sectionBodyByName, validateSectionBody } from "./artifact-linter/shared.js";
6
+ import { duplicateH2Headings, extractH2Sections, extractLockedDecisionAnchors, extractRequirementIdsFromMarkdown, isShortCircuitActivated, normalizeHeadingTitle, parseFrontmatter, parseLearningsSection, sectionBodyByAnyName, sectionBodyByHeadingPrefix, sectionBodyByName, validateSectionBody } from "./artifact-linter/shared.js";
7
7
  import { lintBrainstormStage } from "./artifact-linter/brainstorm.js";
8
8
  import { lintDesignStage } from "./artifact-linter/design.js";
9
9
  import { lintPlanStage } from "./artifact-linter/plan.js";
@@ -48,6 +48,16 @@ export async function lintArtifact(projectRoot, stage, track = "standard") {
48
48
  }
49
49
  const raw = await fs.readFile(absFile, "utf8");
50
50
  const sections = extractH2Sections(raw);
51
+ const duplicateHeadings = duplicateH2Headings(raw);
52
+ if (duplicateHeadings.length > 0) {
53
+ findings.push({
54
+ section: "duplicate_h2_heading",
55
+ required: false,
56
+ rule: "[P3] keep each `##` heading unique within an artifact; append updates to the existing section instead of cloning headings.",
57
+ found: false,
58
+ details: `Duplicate H2 heading(s): ${duplicateHeadings.join(", ")}. Merge edits into the existing heading to avoid split contracts.`
59
+ });
60
+ }
51
61
  const projectConfig = await readConfig(projectRoot);
52
62
  const parsedFrontmatter = parseFrontmatter(raw);
53
63
  const frontmatterMissingKeys = FRONTMATTER_REQUIRED_KEYS.filter((key) => {
@@ -10,7 +10,7 @@ export declare const FLOW_VERSION = "1.0.0";
10
10
  export declare const SHIP_FINALIZATION_MODES: readonly ["FINALIZE_MERGE_LOCAL", "FINALIZE_OPEN_PR", "FINALIZE_KEEP_BRANCH", "FINALIZE_DISCARD_BRANCH", "FINALIZE_NO_VCS"];
11
11
  export type ShipFinalizationMode = (typeof SHIP_FINALIZATION_MODES)[number];
12
12
  export declare const DEFAULT_HARNESSES: HarnessId[];
13
- export declare const REQUIRED_DIRS: readonly [".cclaw", ".cclaw/commands", ".cclaw/skills", ".cclaw/templates", ".cclaw/templates/state-contracts", ".cclaw/artifacts", ".cclaw/archive", ".cclaw/state", ".cclaw/rules", ".cclaw/agents", ".cclaw/hooks", ".cclaw/skills/review-prompts"];
13
+ export declare const REQUIRED_DIRS: readonly [".cclaw", ".cclaw/commands", ".cclaw/skills", ".cclaw/templates", ".cclaw/templates/state-contracts", ".cclaw/artifacts", ".cclaw/wave-plans", ".cclaw/archive", ".cclaw/state", ".cclaw/rules", ".cclaw/agents", ".cclaw/hooks", ".cclaw/skills/review-prompts"];
14
14
  export declare const REQUIRED_GITIGNORE_PATTERNS: readonly ["# cclaw generated artifacts", ".cclaw/", ".claude/commands/cc-*.md", ".claude/commands/cc.md", ".cursor/commands/cc-*.md", ".cursor/commands/cc.md", ".opencode/commands/cc-*.md", ".opencode/commands/cc.md", ".agents/skills/cc/SKILL.md", ".agents/skills/cc-*/SKILL.md", ".claude/hooks/hooks.json", ".cursor/hooks.json", ".codex/hooks.json", ".opencode/plugins/cclaw-plugin.mjs", ".cursor/rules/cclaw-workflow.mdc"];
15
15
  /**
16
16
  * Canonical stage -> skill folder mapping.
package/dist/constants.js CHANGED
@@ -59,6 +59,7 @@ export const REQUIRED_DIRS = [
59
59
  `${RUNTIME_ROOT}/templates`,
60
60
  `${RUNTIME_ROOT}/templates/state-contracts`,
61
61
  `${RUNTIME_ROOT}/artifacts`,
62
+ `${RUNTIME_ROOT}/wave-plans`,
62
63
  `${RUNTIME_ROOT}/archive`,
63
64
  `${RUNTIME_ROOT}/state`,
64
65
  `${RUNTIME_ROOT}/rules`,
@@ -4,7 +4,7 @@
4
4
  * Keep closeout chain and ship substate language in one place across command
5
5
  * contracts, skills, and stage/docs surfaces.
6
6
  */
7
- export declare const CLOSEOUT_CHAIN = "retro -> compound -> archive";
7
+ export declare const CLOSEOUT_CHAIN = "post_ship_review -> archive";
8
8
  export declare const CLOSEOUT_SUBSTATE_KEY = "closeout.shipSubstate";
9
9
  export declare function closeoutChainInline(): string;
10
10
  export declare function closeoutSubstateInline(): string;
@@ -4,7 +4,7 @@
4
4
  * Keep closeout chain and ship substate language in one place across command
5
5
  * contracts, skills, and stage/docs surfaces.
6
6
  */
7
- export const CLOSEOUT_CHAIN = "retro -> compound -> archive";
7
+ export const CLOSEOUT_CHAIN = "post_ship_review -> archive";
8
8
  export const CLOSEOUT_SUBSTATE_KEY = "closeout.shipSubstate";
9
9
  export function closeoutChainInline() {
10
10
  return `\`${CLOSEOUT_CHAIN}\``;
@@ -18,18 +18,17 @@ export function closeoutNextCommandGuidance() {
18
18
  export function closeoutSubstateProtocolBullets() {
19
19
  return `When \`currentStage === "ship"\`, route by **${closeoutSubstateInline()}**:
20
20
  - \`"idle"\` or missing -> outcome: initialize closeout by setting
21
- ${closeoutSubstateInline()} = \`"retro_review"\`, then continue \`/cc\`
21
+ ${closeoutSubstateInline()} = \`"post_ship_review"\`, then continue \`/cc\`
22
22
  into the in-stage retro protocol (draft + one structured accept/edit/skip ask).
23
- - \`"retro_review"\` -> outcome: finish retro acceptance/edit/skip and advance
24
- closeout; the draft already exists, so continue it and do not regenerate it.
25
- - \`"compound_review"\` -> outcome: execute the in-stage compound closeout scan
26
- (not \`ce:compound\`) and advance toward archive readiness:
23
+ - \`"post_ship_review"\` -> outcome: execute the unified post-ship closeout leg
24
+ (retro acceptance/edit/skip + in-stage compound scan, not \`ce:compound\`)
25
+ and advance toward archive readiness:
27
26
  read \`.cclaw/state/compound-readiness.json\` plus the relevant tail of
28
27
  \`.cclaw/knowledge.jsonl\`, assess overlap before adding duplicate knowledge,
29
28
  separate bug-track learnings (turn into rules/tests/remediation) from
30
- knowledge-track learnings (durable project/process guidance), and use
31
- lightweight \`supersedes\` / \`superseded_by\` fields when refreshing stale or
32
- partially replaced entries. Optionally ask whether to scan Cursor/Claude/Codex
29
+ knowledge-track learnings (durable project/process guidance), and refresh stale
30
+ guidance in place instead of introducing extra lineage metadata. Optionally ask
31
+ whether to scan Cursor/Claude/Codex
33
32
  session transcripts for matching historical learnings; only do it after opt-in.
34
33
  Ask **one** structured question (apply / skip) per candidate cluster or a
35
34
  single accept-all / skip choice, then advance substate.
@@ -38,8 +37,8 @@ export function closeoutSubstateProtocolBullets() {
38
37
  - \`"archived"\` (transient) -> outcome: report "run archived" and stop (flow complete).`;
39
38
  }
40
39
  export function closeoutFlowMapSentence() {
41
- 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\`.`;
40
+ return `The first stage names are the critical path. \`post_ship_review\` 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\`.`;
42
41
  }
43
42
  export function closeoutProtocolBehaviorSentence() {
44
- 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.`;
43
+ 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. Inside \`post_ship_review\`, assess overlap before appending knowledge: refresh recurring bug-track learnings as actionable rules/tests and keep knowledge-track learnings as durable process/project guidance without extra lineage metadata.`;
45
44
  }
@@ -15,6 +15,8 @@ export interface AgentReturnSchema {
15
15
  requiredFields: string[];
16
16
  /** Fields that must cite artifact anchors, commands, or code locations when applicable. */
17
17
  evidenceFields: string[];
18
+ /** Additional optional fields allowed for specific agent contracts. */
19
+ optionalFields?: string[];
18
20
  }
19
21
  export interface AgentDefinition {
20
22
  /** Kebab-case identifier, e.g. `"reviewer"`. */
@@ -62,21 +64,21 @@ export declare const CCLAW_AGENTS: readonly [{
62
64
  readonly returnSchema: AgentReturnSchema;
63
65
  readonly body: string;
64
66
  }, {
65
- readonly name: "product-manager";
66
- readonly description: "PROACTIVE during brainstorm/scope when product value, persona/JTBD, success metric, or why-now framing is unclear. Use for product discovery, not implementation.";
67
+ readonly name: "product-discovery";
68
+ readonly description: "MANDATORY during brainstorm and PROACTIVE during scope when value framing or expansion strategy needs product-level discovery pressure.";
67
69
  readonly tools: ["Read", "Grep", "Glob", "WebSearch"];
68
- readonly model: "balanced";
69
- readonly activation: "proactive";
70
+ readonly model: "deep";
71
+ readonly activation: "mandatory";
70
72
  readonly relatedStages: ["brainstorm", "scope"];
71
73
  readonly returnSchema: AgentReturnSchema;
72
74
  readonly body: string;
73
75
  }, {
74
- readonly name: "product-strategist";
75
- readonly description: "PROACTIVE during scope. MUST BE USED when selected scope mode is SCOPE EXPANSION or SELECTIVE EXPANSION to pressure-test 10x vision, strategic upside, and long-term trajectory before lock.";
76
+ readonly name: "divergent-thinker";
77
+ readonly description: "PROACTIVE before planner/critic convergence when brainstorm or scope needs option-space expansion and alternative framings.";
76
78
  readonly tools: ["Read", "Grep", "Glob", "WebSearch"];
77
- readonly model: "deep";
79
+ readonly model: "balanced";
78
80
  readonly activation: "proactive";
79
- readonly relatedStages: ["scope"];
81
+ readonly relatedStages: ["brainstorm", "scope"];
80
82
  readonly returnSchema: AgentReturnSchema;
81
83
  readonly body: string;
82
84
  }, {
@@ -90,11 +92,11 @@ export declare const CCLAW_AGENTS: readonly [{
90
92
  readonly body: string;
91
93
  }, {
92
94
  readonly name: "architect";
93
- readonly description: "MANDATORY during design. MUST BE USED to validate architecture boundaries, alternatives, failure modes, rollout, and spec handoff before implementation.";
95
+ readonly description: "MANDATORY during design and final ship verification. MUST BE USED to validate architecture boundaries, alternatives, failure modes, rollout, and cross-stage cohesion before release.";
94
96
  readonly tools: ["Read", "Grep", "Glob", "WebSearch"];
95
97
  readonly model: "deep";
96
98
  readonly activation: "mandatory";
97
- readonly relatedStages: ["design"];
99
+ readonly relatedStages: ["design", "ship"];
98
100
  readonly returnSchema: AgentReturnSchema;
99
101
  readonly body: string;
100
102
  }, {
@@ -116,39 +118,39 @@ export declare const CCLAW_AGENTS: readonly [{
116
118
  readonly returnSchema: AgentReturnSchema;
117
119
  readonly body: string;
118
120
  }, {
119
- readonly name: "reviewer";
120
- readonly description: "MANDATORY during review. MUST BE USED to run a two-pass audit: spec compliance first, then correctness/maintainability/performance/architecture.";
121
+ readonly name: "coherence-reviewer";
122
+ readonly description: "PROACTIVE during spec/plan/design when internal consistency must be validated across sections, terminology, references, and dependency narratives.";
121
123
  readonly tools: ["Read", "Grep", "Glob"];
122
124
  readonly model: "balanced";
123
- readonly activation: "mandatory";
124
- readonly relatedStages: ["spec", "review", "ship"];
125
+ readonly activation: "proactive";
126
+ readonly relatedStages: ["spec", "plan", "design"];
125
127
  readonly returnSchema: AgentReturnSchema;
126
128
  readonly body: string;
127
129
  }, {
128
- readonly name: "performance-reviewer";
129
- readonly description: "PROACTIVE during review for hot paths, IO, data volume, caching, rendering, or algorithmic cost changes. Produces no-impact rationale when clean.";
130
+ readonly name: "scope-guardian-reviewer";
131
+ readonly description: "PROACTIVE during scope/plan/design when complexity growth, scope drift, or unnecessary abstraction risk needs a dedicated challenge pass.";
130
132
  readonly tools: ["Read", "Grep", "Glob"];
131
133
  readonly model: "balanced";
132
134
  readonly activation: "proactive";
133
- readonly relatedStages: ["review"];
135
+ readonly relatedStages: ["scope", "plan", "design"];
134
136
  readonly returnSchema: AgentReturnSchema;
135
137
  readonly body: string;
136
138
  }, {
137
- readonly name: "compatibility-reviewer";
138
- readonly description: "PROACTIVE during design/review when public APIs, config, persisted data, CLI behavior, generated clients, or dependency versions may change.";
139
+ readonly name: "feasibility-reviewer";
140
+ readonly description: "PROACTIVE during plan/design when resource, runtime, environment, dependency, or rollout assumptions can make the solution non-viable.";
139
141
  readonly tools: ["Read", "Grep", "Glob"];
140
142
  readonly model: "balanced";
141
143
  readonly activation: "proactive";
142
- readonly relatedStages: ["design", "review"];
144
+ readonly relatedStages: ["plan", "design"];
143
145
  readonly returnSchema: AgentReturnSchema;
144
146
  readonly body: string;
145
147
  }, {
146
- readonly name: "observability-reviewer";
147
- readonly description: "PROACTIVE during design/review when diagnosis, telemetry, rollout visibility, or supportability could affect safe operation.";
148
+ readonly name: "reviewer";
149
+ readonly description: "MANDATORY during review. MUST BE USED to run a two-pass audit with explicit inline lens coverage for performance, compatibility, and observability.";
148
150
  readonly tools: ["Read", "Grep", "Glob"];
149
151
  readonly model: "balanced";
150
- readonly activation: "proactive";
151
- readonly relatedStages: ["design", "review"];
152
+ readonly activation: "mandatory";
153
+ readonly relatedStages: ["spec", "review", "ship"];
152
154
  readonly returnSchema: AgentReturnSchema;
153
155
  readonly body: string;
154
156
  }, {
@@ -160,6 +162,15 @@ export declare const CCLAW_AGENTS: readonly [{
160
162
  readonly relatedStages: ["design", "review", "ship"];
161
163
  readonly returnSchema: AgentReturnSchema;
162
164
  readonly body: string;
165
+ }, {
166
+ readonly name: "integration-overseer";
167
+ readonly description: "ON-DEMAND after TDD fan-out to verify cross-slice cohesion contract integrity, integration surfaces, and shared invariants before review handoff.";
168
+ readonly tools: ["Read", "Grep", "Glob"];
169
+ readonly model: "balanced";
170
+ readonly activation: "on-demand";
171
+ readonly relatedStages: ["tdd", "review"];
172
+ readonly returnSchema: AgentReturnSchema;
173
+ readonly body: string;
163
174
  }, {
164
175
  readonly name: "test-author";
165
176
  readonly description: "MANDATORY in TDD stage. MUST BE USED for RED -> GREEN -> REFACTOR with evidence-first discipline.";
@@ -196,15 +207,6 @@ export declare const CCLAW_AGENTS: readonly [{
196
207
  readonly relatedStages: ["tdd"];
197
208
  readonly returnSchema: AgentReturnSchema;
198
209
  readonly body: string;
199
- }, {
200
- readonly name: "implementer";
201
- readonly description: "ON-DEMAND worker for one scoped implementation slice. Use only with self-contained task text, explicit file boundaries, and verification expectations.";
202
- readonly tools: ["Read", "Write", "Edit", "Grep", "Glob", "Bash"];
203
- readonly model: "balanced";
204
- readonly activation: "on-demand";
205
- readonly relatedStages: ["tdd"];
206
- readonly returnSchema: AgentReturnSchema;
207
- readonly body: string;
208
210
  }, {
209
211
  readonly name: "fixer";
210
212
  readonly description: "ON-DEMAND fresh worker after review FAIL/PARTIAL evidence. Must fix only the cited criterion within explicit allowed files.";
@@ -221,9 +223,6 @@ export declare const CCLAW_AGENTS: readonly [{
221
223
  * and typos instead of letting them slip into generated artifacts.
222
224
  */
223
225
  export type AgentName = (typeof CCLAW_AGENTS)[number]["name"];
224
- /**
225
- * Render a complete cclaw agent markdown file (YAML frontmatter + body).
226
- */
227
226
  export declare function agentMarkdown(agent: AgentDefinition): string;
228
227
  /**
229
228
  * Markdown table mapping cclaw stage entry points to specialist agents.