cclaw-cli 0.48.35 → 0.51.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 (181) hide show
  1. package/README.md +54 -82
  2. package/dist/artifact-linter.d.ts +4 -0
  3. package/dist/artifact-linter.js +24 -3
  4. package/dist/cli.d.ts +1 -19
  5. package/dist/cli.js +49 -495
  6. package/dist/constants.d.ts +2 -13
  7. package/dist/constants.js +1 -46
  8. package/dist/content/closeout-guidance.d.ts +14 -0
  9. package/dist/content/closeout-guidance.js +42 -0
  10. package/dist/content/core-agents.js +51 -9
  11. package/dist/content/decision-protocol.d.ts +12 -0
  12. package/dist/content/decision-protocol.js +20 -0
  13. package/dist/content/diff-command.d.ts +1 -2
  14. package/dist/content/diff-command.js +8 -94
  15. package/dist/content/examples.d.ts +4 -10
  16. package/dist/content/examples.js +10 -20
  17. package/dist/content/hook-events.js +2 -2
  18. package/dist/content/hook-inline-snippets.d.ts +5 -2
  19. package/dist/content/hook-inline-snippets.js +33 -1
  20. package/dist/content/hook-manifest.d.ts +3 -4
  21. package/dist/content/hook-manifest.js +11 -12
  22. package/dist/content/hooks.js +2 -0
  23. package/dist/content/ideate-command.d.ts +2 -0
  24. package/dist/content/ideate-command.js +31 -25
  25. package/dist/content/iron-laws.d.ts +5 -5
  26. package/dist/content/iron-laws.js +5 -5
  27. package/dist/content/learnings.d.ts +3 -4
  28. package/dist/content/learnings.js +24 -50
  29. package/dist/content/meta-skill.js +31 -24
  30. package/dist/content/next-command.js +38 -38
  31. package/dist/content/node-hooks.js +17 -343
  32. package/dist/content/opencode-plugin.js +2 -100
  33. package/dist/content/research-playbooks.js +14 -14
  34. package/dist/content/review-loop.d.ts +2 -0
  35. package/dist/content/review-loop.js +8 -0
  36. package/dist/content/session-hooks.js +14 -46
  37. package/dist/content/skills.d.ts +0 -5
  38. package/dist/content/skills.js +53 -128
  39. package/dist/content/stage-common-guidance.d.ts +0 -1
  40. package/dist/content/stage-common-guidance.js +15 -14
  41. package/dist/content/stage-schema.d.ts +26 -1
  42. package/dist/content/stage-schema.js +121 -40
  43. package/dist/content/stages/_lint-metadata/index.js +9 -15
  44. package/dist/content/stages/brainstorm.js +22 -43
  45. package/dist/content/stages/design.js +37 -57
  46. package/dist/content/stages/plan.js +22 -13
  47. package/dist/content/stages/review.js +24 -27
  48. package/dist/content/stages/scope.js +34 -46
  49. package/dist/content/stages/ship.js +7 -4
  50. package/dist/content/stages/spec.js +20 -9
  51. package/dist/content/stages/tdd.js +64 -44
  52. package/dist/content/start-command.js +10 -12
  53. package/dist/content/status-command.d.ts +2 -7
  54. package/dist/content/status-command.js +19 -146
  55. package/dist/content/subagents.d.ts +0 -5
  56. package/dist/content/subagents.js +47 -28
  57. package/dist/content/templates.d.ts +1 -1
  58. package/dist/content/templates.js +126 -135
  59. package/dist/content/track-render-context.d.ts +17 -0
  60. package/dist/content/track-render-context.js +44 -0
  61. package/dist/content/tree-command.d.ts +1 -2
  62. package/dist/content/tree-command.js +4 -87
  63. package/dist/content/utility-skills.d.ts +2 -29
  64. package/dist/content/utility-skills.js +2 -1533
  65. package/dist/content/view-command.js +29 -11
  66. package/dist/delegation.d.ts +1 -1
  67. package/dist/delegation.js +5 -15
  68. package/dist/doctor-registry.js +20 -21
  69. package/dist/doctor.js +88 -408
  70. package/dist/flow-state.d.ts +3 -0
  71. package/dist/flow-state.js +2 -0
  72. package/dist/harness-adapters.d.ts +1 -1
  73. package/dist/harness-adapters.js +48 -57
  74. package/dist/install.js +128 -520
  75. package/dist/internal/advance-stage.js +3 -9
  76. package/dist/internal/compound-readiness.d.ts +1 -1
  77. package/dist/internal/compound-readiness.js +1 -1
  78. package/dist/internal/tdd-loop-status.d.ts +1 -1
  79. package/dist/internal/tdd-loop-status.js +1 -1
  80. package/dist/knowledge-store.d.ts +16 -10
  81. package/dist/knowledge-store.js +51 -15
  82. package/dist/policy.js +16 -109
  83. package/dist/run-archive.d.ts +4 -6
  84. package/dist/run-archive.js +15 -20
  85. package/dist/run-persistence.d.ts +2 -2
  86. package/dist/run-persistence.js +3 -9
  87. package/package.json +1 -2
  88. package/dist/content/archive-command.d.ts +0 -2
  89. package/dist/content/archive-command.js +0 -124
  90. package/dist/content/compound-command.d.ts +0 -5
  91. package/dist/content/compound-command.js +0 -193
  92. package/dist/content/contexts.d.ts +0 -9
  93. package/dist/content/contexts.js +0 -65
  94. package/dist/content/contracts.d.ts +0 -2
  95. package/dist/content/contracts.js +0 -51
  96. package/dist/content/doctor-references.d.ts +0 -2
  97. package/dist/content/doctor-references.js +0 -150
  98. package/dist/content/eval-scaffold.d.ts +0 -15
  99. package/dist/content/eval-scaffold.js +0 -370
  100. package/dist/content/feature-command.d.ts +0 -2
  101. package/dist/content/feature-command.js +0 -123
  102. package/dist/content/flow-map.d.ts +0 -23
  103. package/dist/content/flow-map.js +0 -134
  104. package/dist/content/harness-doc.d.ts +0 -2
  105. package/dist/content/harness-doc.js +0 -202
  106. package/dist/content/harness-playbooks.d.ts +0 -24
  107. package/dist/content/harness-playbooks.js +0 -393
  108. package/dist/content/harness-tool-refs.d.ts +0 -20
  109. package/dist/content/harness-tool-refs.js +0 -268
  110. package/dist/content/ops-command.d.ts +0 -2
  111. package/dist/content/ops-command.js +0 -71
  112. package/dist/content/protocols.d.ts +0 -7
  113. package/dist/content/protocols.js +0 -215
  114. package/dist/content/retro-command.d.ts +0 -2
  115. package/dist/content/retro-command.js +0 -165
  116. package/dist/content/rewind-command.d.ts +0 -2
  117. package/dist/content/rewind-command.js +0 -106
  118. package/dist/content/tdd-log-command.d.ts +0 -2
  119. package/dist/content/tdd-log-command.js +0 -85
  120. package/dist/eval/agents/single-shot.d.ts +0 -27
  121. package/dist/eval/agents/single-shot.js +0 -79
  122. package/dist/eval/agents/with-tools.d.ts +0 -44
  123. package/dist/eval/agents/with-tools.js +0 -261
  124. package/dist/eval/agents/workflow.d.ts +0 -31
  125. package/dist/eval/agents/workflow.js +0 -155
  126. package/dist/eval/baseline.d.ts +0 -38
  127. package/dist/eval/baseline.js +0 -282
  128. package/dist/eval/config-loader.d.ts +0 -14
  129. package/dist/eval/config-loader.js +0 -395
  130. package/dist/eval/corpus.d.ts +0 -30
  131. package/dist/eval/corpus.js +0 -330
  132. package/dist/eval/cost-guard.d.ts +0 -102
  133. package/dist/eval/cost-guard.js +0 -190
  134. package/dist/eval/diff.d.ts +0 -64
  135. package/dist/eval/diff.js +0 -323
  136. package/dist/eval/llm-client.d.ts +0 -176
  137. package/dist/eval/llm-client.js +0 -267
  138. package/dist/eval/mode.d.ts +0 -28
  139. package/dist/eval/mode.js +0 -61
  140. package/dist/eval/progress.d.ts +0 -83
  141. package/dist/eval/progress.js +0 -59
  142. package/dist/eval/report.d.ts +0 -11
  143. package/dist/eval/report.js +0 -181
  144. package/dist/eval/rubric-loader.d.ts +0 -20
  145. package/dist/eval/rubric-loader.js +0 -143
  146. package/dist/eval/runner.d.ts +0 -81
  147. package/dist/eval/runner.js +0 -746
  148. package/dist/eval/runs.d.ts +0 -41
  149. package/dist/eval/runs.js +0 -114
  150. package/dist/eval/sandbox.d.ts +0 -38
  151. package/dist/eval/sandbox.js +0 -137
  152. package/dist/eval/tools/glob.d.ts +0 -2
  153. package/dist/eval/tools/glob.js +0 -163
  154. package/dist/eval/tools/grep.d.ts +0 -2
  155. package/dist/eval/tools/grep.js +0 -152
  156. package/dist/eval/tools/index.d.ts +0 -7
  157. package/dist/eval/tools/index.js +0 -35
  158. package/dist/eval/tools/read.d.ts +0 -2
  159. package/dist/eval/tools/read.js +0 -122
  160. package/dist/eval/tools/types.d.ts +0 -49
  161. package/dist/eval/tools/types.js +0 -41
  162. package/dist/eval/tools/write.d.ts +0 -2
  163. package/dist/eval/tools/write.js +0 -92
  164. package/dist/eval/types.d.ts +0 -561
  165. package/dist/eval/types.js +0 -47
  166. package/dist/eval/verifiers/judge.d.ts +0 -40
  167. package/dist/eval/verifiers/judge.js +0 -256
  168. package/dist/eval/verifiers/rules.d.ts +0 -24
  169. package/dist/eval/verifiers/rules.js +0 -218
  170. package/dist/eval/verifiers/structural.d.ts +0 -14
  171. package/dist/eval/verifiers/structural.js +0 -171
  172. package/dist/eval/verifiers/traceability.d.ts +0 -23
  173. package/dist/eval/verifiers/traceability.js +0 -84
  174. package/dist/eval/verifiers/workflow-consistency.d.ts +0 -21
  175. package/dist/eval/verifiers/workflow-consistency.js +0 -225
  176. package/dist/eval/workflow-corpus.d.ts +0 -7
  177. package/dist/eval/workflow-corpus.js +0 -207
  178. package/dist/feature-system.d.ts +0 -42
  179. package/dist/feature-system.js +0 -432
  180. package/dist/internal/knowledge-digest.d.ts +0 -7
  181. package/dist/internal/knowledge-digest.js +0 -93
@@ -1,2 +1 @@
1
- export declare function treeCommandContract(): string;
2
- export declare function treeCommandSkillMarkdown(): string;
1
+ export declare function treeSubcommandMarkdown(): string;
@@ -1,6 +1,4 @@
1
1
  import { RUNTIME_ROOT } from "../constants.js";
2
- const TREE_SKILL_FOLDER = "flow-tree";
3
- const TREE_SKILL_NAME = "flow-tree";
4
2
  function flowStatePath() {
5
3
  return `${RUNTIME_ROOT}/state/flow-state.json`;
6
4
  }
@@ -13,90 +11,9 @@ function artifactsPath() {
13
11
  function rewindLogPath() {
14
12
  return `${RUNTIME_ROOT}/state/rewind-log.jsonl`;
15
13
  }
16
- function harnessPlaybooksDir() {
17
- return `${RUNTIME_ROOT}/references/harnesses`;
18
- }
19
- export function treeCommandContract() {
14
+ export function treeSubcommandMarkdown() {
20
15
  return `# /cc-view tree
21
16
 
22
- ## Purpose
23
-
24
- Render a visual flow tree for quick orientation across stages, gates, delegations
25
- (with fulfillmentMode), ship closeout substate, stale markers, artifact presence,
26
- and per-harness playbook availability.
27
-
28
- ## HARD-GATE
29
-
30
- - \`/cc-view tree\` is read-only. Do not mutate flow-state or artifacts.
31
- - Use values from \`${flowStatePath()}\` and \`${delegationLogPath()}\`; never infer missing evidence.
32
-
33
- ## Algorithm
34
-
35
- 1. Read \`${flowStatePath()}\`.
36
- 2. Read \`${delegationLogPath()}\` (if missing, treat current-stage delegations as pending).
37
- 3. Detect artifact files in \`${artifactsPath()}\` (\`01-brainstorm.md\` …
38
- \`08-ship.md\` plus \`09-retro.md\`).
39
- 4. Read rewind records from \`${rewindLogPath()}\` when present for stale-stage context.
40
- 5. Inspect \`${harnessPlaybooksDir()}\` to confirm per-harness playbooks exist
41
- for the installed harness set.
42
- 6. Render the tree using stage order from active track:
43
- - stage node marker: passed/current/pending/skipped/stale
44
- - gate summary: \`passed/required\`
45
- - delegation summary for current stage (each agent carries its
46
- \`fulfillmentMode\` label)
47
- - artifact marker per stage (exists / stale copy / missing)
48
- 7. When \`currentStage === "ship"\` or \`closeout.shipSubstate !== "idle"\`,
49
- append a closeout sub-tree under ship with substate and retro/compound flags.
50
- 8. Append a final \`harnesses\` branch summarising tier + fallback +
51
- playbook-present for each installed harness.
52
-
53
- ## Tree Format
54
-
55
- \`\`\`
56
- cclaw flow tree (track=<track>, run=<runId>)
57
- ├─ [✓] brainstorm gates 6/6 artifact 01-brainstorm.md
58
- ├─ [✓] scope gates 5/5 artifact 02-scope.md
59
- ├─ [▶] design gates 2/7 artifact 03-design.md
60
- │ ├─ delegations:
61
- │ │ ├─ planner ✓ completed mode=isolated
62
- │ │ └─ reviewer ○ pending
63
- │ └─ stale: none
64
- ├─ [○] spec gates - artifact missing
65
- └─ [○] plan gates - artifact missing
66
-
67
- closeout (shipSubstate=retro_review):
68
- ├─ retro: drafted 09-retro.md · awaiting accept/edit/skip
69
- ├─ compound: —
70
- └─ archive: pending
71
-
72
- harnesses:
73
- ├─ claude tier=tier1 fallback=native playbook ✓
74
- ├─ cursor tier=tier2 fallback=generic-dispatch playbook ✓
75
- ├─ opencode tier=tier2 fallback=role-switch playbook ✓
76
- └─ codex tier=tier2 fallback=role-switch playbook ✓
77
- \`\`\`
78
-
79
- - Closeout sub-tree is **omitted** when \`currentStage !== "ship"\` and
80
- \`shipSubstate === "idle"\`.
81
- - Delegations sub-branch is omitted when the stage has no mandatory agents.
82
- - Playbook marker is \`✗ missing\` when the file under
83
- \`${harnessPlaybooksDir()}/<harness>-playbook.md\` is absent.
84
-
85
- Use UTF markers by default, ASCII fallback when terminal cannot render UTF.
86
-
87
- ## Primary skill
88
-
89
- **${RUNTIME_ROOT}/skills/${TREE_SKILL_FOLDER}/SKILL.md**
90
- `;
91
- }
92
- export function treeCommandSkillMarkdown() {
93
- return `---
94
- name: ${TREE_SKILL_NAME}
95
- description: "Render a visual flow tree for stages, gates, delegations (fulfillmentMode), ship closeout substate, artifacts, and per-harness playbooks."
96
- ---
97
-
98
- # /cc-view tree
99
-
100
17
  ## HARD-GATE
101
18
 
102
19
  Do not modify state in this command. It is a pure read/render operation.
@@ -108,7 +25,7 @@ Do not modify state in this command. It is a pure read/render operation.
108
25
  \`fulfillmentMode\` / \`evidenceRefs\`.
109
26
  3. Inspect \`${artifactsPath()}\` for per-stage artifact presence and stale copies,
110
27
  and for the retro artifact \`09-retro.md\`.
111
- 4. Inspect \`${harnessPlaybooksDir()}\` for \`<harness>-playbook.md\` files.
28
+ 4. Use \`cclaw doctor --explain\` for harness capability status when needed.
112
29
  5. Render one compact tree:
113
30
  - stage marker: passed/current/pending/skipped/stale,
114
31
  - gates summary,
@@ -124,8 +41,8 @@ Do not modify state in this command. It is a pure read/render operation.
124
41
  then \`next\`; the transient \`archived\` substate surfaces only if the
125
42
  archive step failed mid-run.
126
43
  7. Append a \`harnesses:\` branch. For each installed harness derive the tier
127
- from the harness-gaps report and mark \`playbook ✓/✗ missing\` based on
128
- \`${harnessPlaybooksDir()}/<harness>-playbook.md\` existence.
44
+ and fallback from cclaw capability metadata; use \`cclaw doctor --explain\`
45
+ for remediation details when needed.
129
46
  8. If rewind records exist in \`${rewindLogPath()}\`, include latest rewind note in footer.
130
47
 
131
48
  ## Validation
@@ -1,26 +1,7 @@
1
1
  /**
2
- * Utility skills that complement the 8 flow stages.
3
- * These are contextual lenses, not flow stages.
4
- * Each skill: ~120-180 lines, under the 500-line progressive disclosure guideline.
2
+ * Opt-in language rule packs for stage hooks and the meta-skill router.
3
+ * These are generated under `.cclaw/rules/lang`, not as default skills.
5
4
  */
6
- export declare function securityReviewSkill(): string;
7
- export declare function debuggingSkill(): string;
8
- export declare function performanceSkill(): string;
9
- export declare function ciCdSkill(): string;
10
- export declare function docsSkill(): string;
11
- export declare function executingPlansSkill(): string;
12
- export declare function contextEngineeringSkill(): string;
13
- export declare function verificationBeforeCompletionSkill(): string;
14
- export declare function finishingDevelopmentBranchSkill(): string;
15
- export declare function sourceDrivenDevelopmentSkill(): string;
16
- export declare function frontendAccessibilitySkill(): string;
17
- export declare function landscapeCheckSkill(): string;
18
- export declare function knowledgeCurationSkill(): string;
19
- export declare function securityAuditSkill(): string;
20
- export declare function adversarialReviewSkill(): string;
21
- export declare function documentReviewSkill(): string;
22
- export declare function receivingCodeReviewSkill(): string;
23
- export declare function retrospectiveSkill(): string;
24
5
  export declare function languageTypescriptSkill(): string;
25
6
  export declare function languagePythonSkill(): string;
26
7
  export declare function languageGoSkill(): string;
@@ -47,11 +28,3 @@ export declare const LANGUAGE_RULE_PACK_GENERATORS: Record<string, () => string>
47
28
  * clean them up after the move to `.cclaw/rules/lang/`.
48
29
  */
49
30
  export declare const LEGACY_LANGUAGE_RULE_PACK_FOLDERS: readonly ["language-typescript", "language-python", "language-go"];
50
- export declare const UTILITY_SKILL_FOLDERS: readonly ["security", "debugging", "performance", "ci-cd", "docs", "executing-plans", "verification-before-completion", "finishing-a-development-branch", "context-engineering", "source-driven-development", "frontend-accessibility", "landscape-check", "adversarial-review", "security-audit", "knowledge-curation", "retrospective", "document-review", "receiving-code-review"];
51
- export type UtilitySkillFolder = (typeof UTILITY_SKILL_FOLDERS)[number];
52
- /**
53
- * One entry per `UTILITY_SKILL_FOLDERS` slot. Typed via the tuple so that
54
- * adding a folder without a generator (or vice versa) is a TypeScript
55
- * error — keeps the two sources of truth in lockstep at compile time.
56
- */
57
- export declare const UTILITY_SKILL_MAP: Record<UtilitySkillFolder, () => string>;