cclaw-cli 0.14.0 → 0.15.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.
@@ -58,7 +58,7 @@ const RULES = [
58
58
  }
59
59
  },
60
60
  {
61
- test: /^(hook:|lifecycle:|git_hooks:)/,
61
+ test: /^(hook:|hooks:|lifecycle:|git_hooks:)/,
62
62
  metadata: {
63
63
  severity: "error",
64
64
  summary: "Hook wiring and lifecycle integration check.",
@@ -67,7 +67,7 @@ const RULES = [
67
67
  }
68
68
  },
69
69
  {
70
- test: /^(shim:|agents:cclaw_block|rules:cursor:workflow)/,
70
+ test: /^(shim:|agents:cclaw_block|rules:cursor:)/,
71
71
  metadata: {
72
72
  severity: "error",
73
73
  summary: "Harness shim and routing file consistency check.",
@@ -84,6 +84,24 @@ const RULES = [
84
84
  docRef: ref("state-and-gates.md")
85
85
  }
86
86
  },
87
+ {
88
+ test: /^(knowledge:|artifacts:|runs:)/,
89
+ metadata: {
90
+ severity: "error",
91
+ summary: "Knowledge and artifact runtime integrity check.",
92
+ fix: "Restore missing runtime files under `.cclaw/` or re-run `cclaw sync`.",
93
+ docRef: ref("runtime-layout.md")
94
+ }
95
+ },
96
+ {
97
+ test: /^(meta_skill:|protocol:|stage_skill:|context_mode:)/,
98
+ metadata: {
99
+ severity: "error",
100
+ summary: "Routing skill and protocol integrity check.",
101
+ fix: "Regenerate runtime references and skills via `cclaw sync`, then re-run doctor.",
102
+ docRef: ref("harness-and-routing.md")
103
+ }
104
+ },
87
105
  {
88
106
  test: /^delegation:/,
89
107
  metadata: {
@@ -119,9 +137,9 @@ export function doctorCheckMetadata(checkName) {
119
137
  }
120
138
  }
121
139
  return {
122
- severity: "warning",
140
+ severity: "error",
123
141
  summary: "Unclassified doctor check.",
124
- fix: "Review the check details and add a matching rule in doctor-registry when this check should be severity-scoped.",
142
+ fix: "Report this check name to cclaw maintainers so doctor-registry can classify it explicitly.",
125
143
  docRef: ref("README.md")
126
144
  };
127
145
  }
package/dist/doctor.js CHANGED
@@ -8,7 +8,7 @@ import { CCLAW_AGENTS } from "./content/core-agents.js";
8
8
  import { readConfig } from "./config.js";
9
9
  import { exists } from "./fs-utils.js";
10
10
  import { gitignoreHasRequiredPatterns } from "./gitignore.js";
11
- import { HARNESS_ADAPTERS, CCLAW_MARKER_START, CCLAW_MARKER_END } from "./harness-adapters.js";
11
+ import { HARNESS_ADAPTERS, CCLAW_MARKER_START, CCLAW_MARKER_END, harnessShimFileNames } from "./harness-adapters.js";
12
12
  import { policyChecks } from "./policy.js";
13
13
  import { readFlowState } from "./runs.js";
14
14
  import { skippedStagesForTrack } from "./flow-state.js";
@@ -447,19 +447,7 @@ export async function doctorChecks(projectRoot, options = {}) {
447
447
  });
448
448
  continue;
449
449
  }
450
- for (const shim of [
451
- "cc.md",
452
- "cc-next.md",
453
- "cc-learn.md",
454
- "cc-status.md",
455
- "cc-tree.md",
456
- "cc-diff.md",
457
- "cc-feature.md",
458
- "cc-tdd-log.md",
459
- "cc-retro.md",
460
- "cc-rewind.md",
461
- "cc-rewind-ack.md"
462
- ]) {
450
+ for (const shim of harnessShimFileNames()) {
463
451
  const shimPath = path.join(projectRoot, adapter.commandDir, shim);
464
452
  checks.push({
465
453
  name: `shim:${harness}:${shim.replace(".md", "")}`,
@@ -476,14 +464,8 @@ export async function doctorChecks(projectRoot, options = {}) {
476
464
  const hasCcCommand = content.includes("/cc");
477
465
  const hasCcNext = content.includes("/cc-next");
478
466
  const hasCcLearn = content.includes("/cc-learn");
479
- const hasCcStatus = content.includes("/cc-status");
480
- const hasCcTree = content.includes("/cc-tree");
481
- const hasCcDiff = content.includes("/cc-diff");
482
- const hasCcFeature = content.includes("/cc-feature");
483
- const hasCcTddLog = content.includes("/cc-tdd-log");
484
- const hasCcRetro = content.includes("/cc-retro");
485
- const hasCcRewind = content.includes("/cc-rewind");
486
- const hasCcRewindAck = content.includes("/cc-rewind-ack");
467
+ const hasCcView = content.includes("/cc-view");
468
+ const hasCcOps = content.includes("/cc-ops");
487
469
  const hasVerification = content.includes("Verification Discipline");
488
470
  const hasMinimalMarker = content.includes("intentionally minimal for cross-project use");
489
471
  const hasMetaSkillPointer = content.includes(".cclaw/skills/using-cclaw/SKILL.md");
@@ -491,14 +473,8 @@ export async function doctorChecks(projectRoot, options = {}) {
491
473
  && hasCcCommand
492
474
  && hasCcNext
493
475
  && hasCcLearn
494
- && hasCcStatus
495
- && hasCcTree
496
- && hasCcDiff
497
- && hasCcFeature
498
- && hasCcTddLog
499
- && hasCcRetro
500
- && hasCcRewind
501
- && hasCcRewindAck
476
+ && hasCcView
477
+ && hasCcOps
502
478
  && hasVerification
503
479
  && hasMinimalMarker
504
480
  && hasMetaSkillPointer;
@@ -1067,7 +1043,7 @@ export async function doctorChecks(projectRoot, options = {}) {
1067
1043
  ok: staleStages.length === 0,
1068
1044
  details: staleStages.length === 0
1069
1045
  ? "no stale stages pending acknowledgement"
1070
- : `stale stages must be acknowledged via /cc-rewind-ack: ${staleStages.join(", ")}`
1046
+ : `stale stages must be acknowledged via /cc-ops rewind-ack: ${staleStages.join(", ")}`
1071
1047
  });
1072
1048
  const retroRequired = flowState.completedStages.includes("ship");
1073
1049
  const retroComplete = !retroRequired ||
@@ -1079,7 +1055,7 @@ export async function doctorChecks(projectRoot, options = {}) {
1079
1055
  ? retroRequired
1080
1056
  ? `retro gate complete (${flowState.retro.compoundEntries} compound entries)`
1081
1057
  : "retro gate not required yet (ship not completed)"
1082
- : "retro gate incomplete: run /cc-retro and record at least one compound knowledge entry"
1058
+ : "retro gate incomplete: run /cc-ops retro and record at least one compound knowledge entry"
1083
1059
  });
1084
1060
  const flowSnapshotPath = path.join(projectRoot, RUNTIME_ROOT, "state", "flow-state.snapshot.json");
1085
1061
  const flowSnapshotExists = await exists(flowSnapshotPath);
@@ -10,6 +10,7 @@ export interface HarnessAdapter {
10
10
  structuredAsk: "AskUserQuestion" | "AskQuestion" | "plain-text";
11
11
  };
12
12
  }
13
+ export declare function harnessShimFileNames(): string[];
13
14
  export declare const HARNESS_ADAPTERS: Record<HarnessId, HarnessAdapter>;
14
15
  export type HarnessTier = "tier1" | "tier2" | "tier3";
15
16
  export declare function harnessTier(harnessId: HarnessId): HarnessTier;
@@ -30,67 +30,16 @@ const UTILITY_SHIMS = [
30
30
  skillFolder: "learnings",
31
31
  commandFile: "learn.md"
32
32
  },
33
- {
34
- fileName: "cc-status.md",
35
- command: "status",
36
- skillFolder: "flow-status",
37
- commandFile: "status.md"
38
- },
39
- {
40
- fileName: "cc-tree.md",
41
- command: "tree",
42
- skillFolder: "flow-tree",
43
- commandFile: "tree.md"
44
- },
45
- {
46
- fileName: "cc-diff.md",
47
- command: "diff",
48
- skillFolder: "flow-diff",
49
- commandFile: "diff.md"
50
- },
51
33
  {
52
34
  fileName: "cc-ops.md",
53
35
  command: "ops",
54
36
  skillFolder: "flow-ops",
55
37
  commandFile: "ops.md"
56
- },
57
- {
58
- fileName: "cc-feature.md",
59
- command: "feature",
60
- skillFolder: "feature-workspaces",
61
- commandFile: "feature.md"
62
- },
63
- {
64
- fileName: "cc-tdd-log.md",
65
- command: "tdd-log",
66
- skillFolder: "tdd-cycle-log",
67
- commandFile: "tdd-log.md"
68
- },
69
- {
70
- fileName: "cc-retro.md",
71
- command: "retro",
72
- skillFolder: "flow-retro",
73
- commandFile: "retro.md"
74
- },
75
- {
76
- fileName: "cc-archive.md",
77
- command: "archive",
78
- skillFolder: "flow-archive",
79
- commandFile: "archive.md"
80
- },
81
- {
82
- fileName: "cc-rewind.md",
83
- command: "rewind",
84
- skillFolder: "flow-rewind",
85
- commandFile: "rewind.md"
86
- },
87
- {
88
- fileName: "cc-rewind-ack.md",
89
- command: "rewind-ack",
90
- skillFolder: "flow-rewind",
91
- commandFile: "rewind-ack.md"
92
38
  }
93
39
  ];
40
+ export function harnessShimFileNames() {
41
+ return ["cc.md", ...UTILITY_SHIMS.map((shim) => shim.fileName)];
42
+ }
94
43
  export const HARNESS_ADAPTERS = {
95
44
  claude: {
96
45
  id: "claude",
@@ -186,16 +135,7 @@ When in doubt, prefer **non-trivial** — the quick track is opt-in and only saf
186
135
  | \`/cc-next\` | **Progression.** Advances to the next stage when current is complete. |
187
136
  | \`/cc-view\` | **Read-only router.** Unified entry for status/tree/diff views. |
188
137
  | \`/cc-learn\` | **Cross-cutting.** Capture or review project knowledge (append-only JSONL). |
189
- | \`/cc-status\` | **Read-only.** Visual snapshot with progress bar, gate delta, and delegations. |
190
- | \`/cc-tree\` | **Read-only.** Deep flow tree for stages, artifacts, and stale markers. |
191
- | \`/cc-diff\` | **Delta map.** Compare current flow-state with saved baseline snapshot. |
192
138
  | \`/cc-ops\` | **Operations router.** Unified entry for feature/tdd-log/retro/archive/rewind actions. |
193
- | \`/cc-feature\` | **Workspace.** Manage active feature snapshots for parallel tracks. |
194
- | \`/cc-tdd-log\` | **Evidence.** Record RED/GREEN/REFACTOR cycle events for enforcement. |
195
- | \`/cc-retro\` | **Learning gate.** Mandatory retrospective before archive after ship. |
196
- | \`/cc-archive\` | **Run finalization.** Archive active flow into \`.cclaw/runs/\` and reset runtime. |
197
- | \`/cc-rewind\` | **Recovery.** Rewind flow to an earlier stage and invalidate downstream work. |
198
- | \`/cc-rewind-ack\` | **Recovery.** Clear stale-stage markers after redo. |
199
139
 
200
140
  **Stage order:** brainstorm > scope > design > spec > plan > tdd > review > ship.
201
141
  \`/cc-next\` loads the right stage skill automatically. Gates must pass before handoff.
package/dist/install.js CHANGED
@@ -2,7 +2,7 @@ import { execFile } from "node:child_process";
2
2
  import fs from "node:fs/promises";
3
3
  import path from "node:path";
4
4
  import { promisify } from "node:util";
5
- import { COMMAND_FILE_ORDER, REQUIRED_DIRS, RUNTIME_ROOT, UTILITY_COMMANDS } from "./constants.js";
5
+ import { COMMAND_FILE_ORDER, REQUIRED_DIRS, RUNTIME_ROOT } from "./constants.js";
6
6
  import { writeConfig, createDefaultConfig, createProfileConfig, readConfig, configPath } from "./config.js";
7
7
  import { commandContract } from "./content/contracts.js";
8
8
  import { contextModeFiles, createInitialContextModeState } from "./content/contexts.js";
@@ -38,7 +38,7 @@ import { HOOK_EVENTS_BY_HARNESS, HOOK_SEMANTIC_EVENTS } from "./content/hook-eve
38
38
  import { createInitialFlowState } from "./flow-state.js";
39
39
  import { ensureDir, exists, writeFileSafe } from "./fs-utils.js";
40
40
  import { ensureGitignore, removeGitignorePatterns } from "./gitignore.js";
41
- import { HARNESS_ADAPTERS, harnessTier, syncHarnessShims, removeCclawFromAgentsMd } from "./harness-adapters.js";
41
+ import { HARNESS_ADAPTERS, harnessShimFileNames, harnessTier, syncHarnessShims, removeCclawFromAgentsMd } from "./harness-adapters.js";
42
42
  import { validateHookDocument } from "./hook-schema.js";
43
43
  import { ensureRunSystem, readFlowState } from "./runs.js";
44
44
  const OPENCODE_PLUGIN_REL_PATH = ".opencode/plugins/cclaw-plugin.mjs";
@@ -704,7 +704,7 @@ version: 0.1.0 # semver; bump when hardGate or algorithm
704
704
 
705
705
  | Field | Type | Required | Meaning |
706
706
  |---|---|---|---|
707
- | \`name\` | string (kebab-case) | yes | Unique id used by the router and by \`/cc-status\` diagnostics. |
707
+ | \`name\` | string (kebab-case) | yes | Unique id used by the router and by \`/cc-view status\` diagnostics. |
708
708
  | \`description\` | string ≤180 chars (single line OR YAML \`>\` folded) | yes | Drives semantic routing. Include trigger + action. |
709
709
  | \`stages\` | array of flow stages | no | When present, the meta-skill only surfaces this skill during those stages. Omit for "any stage". |
710
710
  | \`triggers\` | array of strings | no | Extra literal substrings that route to this skill when found in the user prompt or the active artifact. |
@@ -1009,13 +1009,7 @@ async function cleanLegacyArtifacts(projectRoot) {
1009
1009
  }
1010
1010
  }
1011
1011
  async function cleanStaleFiles(projectRoot) {
1012
- const expectedShimFiles = new Set([
1013
- ...COMMAND_FILE_ORDER.map((stage) => `viby-${stage}.md`),
1014
- ...UTILITY_COMMANDS.map((cmd) => `viby-${cmd}.md`),
1015
- ...COMMAND_FILE_ORDER.map((stage) => `cc-${stage}.md`),
1016
- ...UTILITY_COMMANDS.map((cmd) => `cc-${cmd}.md`),
1017
- "cc.md"
1018
- ]);
1012
+ const expectedShimFiles = new Set(harnessShimFileNames());
1019
1013
  for (const adapter of Object.values(HARNESS_ADAPTERS)) {
1020
1014
  const commandDir = path.join(projectRoot, adapter.commandDir);
1021
1015
  if (!(await exists(commandDir)))
package/dist/policy.js CHANGED
@@ -91,7 +91,7 @@ export async function policyChecks(projectRoot, options = {}) {
91
91
  { file: runtimeFile("skills/learnings/SKILL.md"), needle: "## HARD-GATE", name: "utility_skill:learnings:hard_gate" },
92
92
  { file: runtimeFile("commands/learn.md"), needle: "## Subcommands", name: "utility_command:learn:subcommands" },
93
93
  { file: runtimeFile("commands/status.md"), needle: "bar:", name: "utility_command:status:visual_bar" },
94
- { file: runtimeFile("commands/status.md"), needle: "/cc-tree · /cc-diff", name: "utility_command:status:tree_diff_link" },
94
+ { file: runtimeFile("commands/status.md"), needle: "/cc-view tree · /cc-view diff", name: "utility_command:status:tree_diff_link" },
95
95
  { file: runtimeFile("commands/tree.md"), needle: "## Algorithm", name: "utility_command:tree:algorithm" },
96
96
  { file: runtimeFile("skills/flow-tree/SKILL.md"), needle: "## Protocol", name: "utility_skill:tree:protocol" },
97
97
  { file: runtimeFile("skills/flow-tree/SKILL.md"), needle: "## HARD-GATE", name: "utility_skill:tree:hard_gate" },
package/dist/runs.js CHANGED
@@ -564,7 +564,7 @@ export async function archiveRun(projectRoot, featureName, options = {}) {
564
564
  }
565
565
  if (retroGate.required && !retroGate.completed && !skipRetro) {
566
566
  throw new Error("Archive blocked: retro gate is required after ship completion. " +
567
- "Run /cc-retro and append at least one compound knowledge entry, or re-run archive with --skip-retro and --retro-reason.");
567
+ "Run /cc-ops retro and append at least one compound knowledge entry, or re-run /cc-ops archive with --skip-retro and --retro-reason.");
568
568
  }
569
569
  if (retroGate.completed) {
570
570
  const completedAt = sourceState.retro.completedAt ?? new Date().toISOString();
package/dist/types.d.ts CHANGED
@@ -61,7 +61,7 @@ export interface VibyConfig {
61
61
  promptGuardMode?: "advisory" | "strict";
62
62
  /** TDD red->green->refactor enforcement mode used by workflow guard hooks. */
63
63
  tddEnforcement?: "advisory" | "strict";
64
- /** Optional test file globs used by guard guidance and /cc-tdd-log docs. */
64
+ /** Optional test file globs used by guard guidance and /cc-ops tdd-log docs. */
65
65
  tddTestGlobs?: string[];
66
66
  /** When true, cclaw installs managed git pre-commit/pre-push wrappers. */
67
67
  gitHookGuards?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cclaw-cli",
3
- "version": "0.14.0",
3
+ "version": "0.15.0",
4
4
  "description": "Installer-first flow toolkit for coding agents",
5
5
  "type": "module",
6
6
  "bin": {