cclaw-cli 0.46.8 → 0.46.10

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.
@@ -1 +1,2 @@
1
1
  export declare function harnessIntegrationDocMarkdown(): string;
2
+ export declare function harnessDocsOverviewMarkdown(): string;
@@ -1,6 +1,7 @@
1
1
  import { HARNESS_ADAPTERS, harnessTier } from "../harness-adapters.js";
2
2
  import { HOOK_EVENTS_BY_HARNESS, HOOK_SEMANTIC_EVENTS } from "./hook-events.js";
3
3
  import { HARNESS_PLAYBOOKS_DIR, harnessPlaybookFileName } from "./harness-playbooks.js";
4
+ import { HARNESS_TOOL_REFS_DIR } from "./harness-tool-refs.js";
4
5
  function harnessTitle(harness) {
5
6
  switch (harness) {
6
7
  case "claude":
@@ -123,3 +124,37 @@ Harness-specific additions:
123
124
  - \`cclaw doctor\` validates shim, hook, and lifecycle surfaces against this capability model.
124
125
  `;
125
126
  }
127
+ export function harnessDocsOverviewMarkdown() {
128
+ const harnesses = Object.keys(HARNESS_ADAPTERS);
129
+ const rows = harnesses
130
+ .map((harness) => {
131
+ const tier = harnessTier(harness);
132
+ const toolMap = `\`.cclaw/${HARNESS_TOOL_REFS_DIR}/${harness}.md\``;
133
+ const playbook = `\`.cclaw/${HARNESS_PLAYBOOKS_DIR}/${harnessPlaybookFileName(harness)}\``;
134
+ return `| ${harnessTitle(harness)} | \`${harness}\` | \`${tier}\` | ${toolMap} | ${playbook} |`;
135
+ })
136
+ .join("\n");
137
+ return `# Harness Docs Overview
138
+
139
+ Single entrypoint for harness-specific references generated by cclaw sync.
140
+
141
+ ## Core references
142
+
143
+ - Integration matrix: \`.cclaw/references/harnesses.md\`
144
+ - Tool-map index: \`.cclaw/references/${HARNESS_TOOL_REFS_DIR}/README.md\`
145
+ - Playbook index: \`.cclaw/references/${HARNESS_PLAYBOOKS_DIR}/README.md\`
146
+
147
+ ## Per-harness quick links
148
+
149
+ | Harness | ID | Tier | Tool map | Playbook |
150
+ |---|---|---|---|---|
151
+ ${rows}
152
+
153
+ ## How to use this pack
154
+
155
+ 1. Start with \`harnesses.md\` to understand capability/tier differences.
156
+ 2. Open the harness-specific tool map before writing stage logic that depends on tool names.
157
+ 3. Open the harness-specific playbook before asserting delegation parity behavior.
158
+ 4. If docs disagree, treat \`harnesses.md\` + harness adapter capabilities as source of truth and regenerate.
159
+ `;
160
+ }
@@ -84,7 +84,7 @@ Load utility skills only when triggered by the current task:
84
84
  - security, performance, debugging, docs, ci-cd
85
85
  - verification-before-completion before completion claims
86
86
  - finishing-a-development-branch during ship/finalization
87
- - document-review and execution context skills
87
+ - document-review, receiving-code-review, and execution context skills
88
88
  - language rule packs from \`.cclaw/config.yaml\` when enabled
89
89
 
90
90
  Custom project skills under \`.cclaw/custom-skills/\` are opt-in supplements,
@@ -200,6 +200,14 @@ const STAGE_AUTO_SUBAGENT_DISPATCH = {
200
200
  purpose: "Adversarial second-opinion review on large or trust-sensitive diffs. The second reviewer treats the implementation as hostile and tries to break it (hostile-user, future-maintainer, competitor lenses) instead of sympathetically explaining it.",
201
201
  requiresUserGate: false,
202
202
  skill: "adversarial-review"
203
+ },
204
+ {
205
+ agent: "reviewer",
206
+ mode: "proactive",
207
+ when: "When external reviewer comments, bot findings, or CI annotations are present after the initial review pass.",
208
+ purpose: "Run the receiving-code-review workflow so every incoming feedback item gets an explicit disposition with evidence, and the queue is mirrored into review artifacts.",
209
+ requiresUserGate: false,
210
+ skill: "receiving-code-review"
203
211
  }
204
212
  ],
205
213
  ship: [
@@ -30,6 +30,7 @@ export const REVIEW = {
30
30
  "Layer 2c: Performance — N+1 queries, memory leaks, missing caching, hot paths.",
31
31
  "Layer 2d: Architecture Fit — does the implementation match the locked design? Coupling, cohesion, interface contracts.",
32
32
  "Layer 2e: External Safety — SQL safety, concurrency, secrets in logs, enum completeness (grep outside diff), LLM trust boundaries.",
33
+ "Incoming Feedback Intake — when human reviewer comments, bot findings, or CI annotations exist, run `.cclaw/skills/receiving-code-review/SKILL.md`, keep a per-comment disposition queue, and mirror outcomes into `07-review.md` + `07-review-army.json` before final verdict.",
33
34
  "Review Army reconciliation — normalize findings into structured records, dedup by fingerprint, and mark multi-specialist confirmations.",
34
35
  "Meta-Review — Were tests actually run? Do test names match what they test? Are there real assertions?",
35
36
  "Classify findings — Critical (blocks ship), Important (should fix), Suggestion (optional improvement).",
@@ -203,6 +204,7 @@ export const REVIEW = {
203
204
  { section: "Review Army Contract", required: true, validationRule: "Structured findings include id/severity/confidence/fingerprint/reportedBy/status with dedup reconciliation summary." },
204
205
  { section: "Review Readiness Dashboard", required: false, validationRule: "Includes a per-pass table (Layer 1 / Layer 2 / Adversarial / Schema) with a 'Completed at' column, a Delegation log snapshot block (path .cclaw/state/delegation-log.json with required/completed/waived/pending), a Staleness signal block (commit at last review pass and current commit), and a Headline with open critical blockers + ship recommendation. At minimum, the section text must contain the substrings 'Completed at', 'delegation-log.json', 'commit at last review pass', and 'Ship recommendation'." },
205
206
  { section: "Completeness Score", required: false, validationRule: "Records AC coverage, task coverage, test-slice coverage, and adversarial-review pass status as numeric or boolean values. At minimum, a line like 'AC coverage: N/M' or 'AC coverage: 100%'." },
207
+ { section: "Incoming Feedback Queue", required: false, validationRule: "When external review feedback exists, include a queue summary with per-item disposition (resolved / accepted-risk / rejected-with-evidence) and evidence refs." },
206
208
  { section: "Severity Summary", required: true, validationRule: "Per-severity count lines for critical, important, and suggestion buckets." },
207
209
  { section: "Final Verdict", required: true, validationRule: "Exactly one of: APPROVED, APPROVED_WITH_CONCERNS, BLOCKED." }
208
210
  ]
@@ -474,6 +474,11 @@ inputs_hash: sha256:pending
474
474
  |---|---|---|---|---|
475
475
  | R-1 | Critical/Important/Suggestion | correctness/security/performance/architecture | | open/resolved |
476
476
 
477
+ ## Incoming Feedback Queue
478
+ | ID | Source | Severity | File:line | Request | Status | Evidence |
479
+ |---|---|---|---|---|---|---|
480
+ | CR-1 | reviewer / bot / ci | Critical/Important/Suggestion | path:line or n/a | | open/in-progress/resolved/accepted-risk/rejected-with-evidence | |
481
+
477
482
  ## Review Army Contract
478
483
  - See \`07-review-army.json\`
479
484
  - Reconciliation summary:
@@ -19,6 +19,7 @@ export declare function knowledgeCurationSkill(): string;
19
19
  export declare function securityAuditSkill(): string;
20
20
  export declare function adversarialReviewSkill(): string;
21
21
  export declare function documentReviewSkill(): string;
22
+ export declare function receivingCodeReviewSkill(): string;
22
23
  export declare function retrospectiveSkill(): string;
23
24
  export declare function languageTypescriptSkill(): string;
24
25
  export declare function languagePythonSkill(): string;
@@ -46,5 +47,5 @@ export declare const LANGUAGE_RULE_PACK_GENERATORS: Record<string, () => string>
46
47
  * clean them up after the move to `.cclaw/rules/lang/`.
47
48
  */
48
49
  export declare const LEGACY_LANGUAGE_RULE_PACK_FOLDERS: readonly ["language-typescript", "language-python", "language-go"];
49
- 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"];
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"];
50
51
  export declare const UTILITY_SKILL_MAP: Record<string, () => string>;
@@ -1292,6 +1292,116 @@ If fixes were blocked (e.g. upstream artifact drift), do NOT claim
1292
1292
  always contains at least one vague phrase worth tightening).
1293
1293
  `;
1294
1294
  }
1295
+ export function receivingCodeReviewSkill() {
1296
+ return `---
1297
+ name: receiving-code-review
1298
+ description: "Incoming review-feedback workflow. Use when a human reviewer, PR bot, CI annotation, or security scan provides comments that must be triaged and resolved without losing traceability."
1299
+ ---
1300
+
1301
+ # Receiving Code Review
1302
+
1303
+ ## Quick Start
1304
+
1305
+ > 1. Collect every incoming review note into one queue before fixing anything.
1306
+ > 2. Normalize each note into a structured record (id/source/severity/file:line/request/status).
1307
+ > 3. Resolve one record at a time and attach evidence for the chosen disposition.
1308
+
1309
+ ## HARD-GATE
1310
+
1311
+ Do not claim "all comments addressed" until every incoming review record has:
1312
+
1313
+ - a final disposition (\`resolved\`, \`accepted-risk\`, or \`rejected-with-evidence\`),
1314
+ - linked evidence (commit, test output, spec reference, or rationale),
1315
+ - and an updated status in the review queue.
1316
+
1317
+ Silent drops are forbidden.
1318
+
1319
+ ## When to Use
1320
+
1321
+ - After a PR receives reviewer comments.
1322
+ - After CI/static-analysis/security tooling posts annotations.
1323
+ - During review/ship when new blocking feedback appears.
1324
+ - When multiple feedback channels disagree and need reconciliation.
1325
+
1326
+ ## Intake Sources
1327
+
1328
+ Treat all of these as first-class review input:
1329
+
1330
+ - Human reviewer comments (PR/UI/chat copy-paste)
1331
+ - Bot comments (lint, security, code quality, policy)
1332
+ - CI log findings linked to changed files
1333
+ - Post-review user concerns ("this still feels risky")
1334
+
1335
+ ## Workflow
1336
+
1337
+ ### 1) Build an intake queue
1338
+
1339
+ Create/update a queue table with one row per unique finding:
1340
+
1341
+ | ID | Source | Severity | File:line | Request | Status | Evidence |
1342
+ |---|---|---|---|---|---|---|
1343
+ | CR-1 | reviewer | Critical/Important/Suggestion | path:line or n/a | concise ask | open/in-progress/resolved/accepted-risk/rejected-with-evidence | link or note |
1344
+
1345
+ Rules:
1346
+ - IDs stay stable across reruns.
1347
+ - Deduplicate near-identical comments by fingerprint (\`file + concern + requested change\`).
1348
+ - If comments conflict, keep both rows and mark them \`conflict\`.
1349
+
1350
+ ### 2) Triage by ship impact
1351
+
1352
+ - **Critical:** blocks merge/ship until resolved or explicitly accepted by user.
1353
+ - **Important:** should be fixed in this iteration unless explicitly deferred.
1354
+ - **Suggestion:** optional, but must still get a disposition.
1355
+
1356
+ ### 3) Resolve one record at a time
1357
+
1358
+ For each row:
1359
+ 1. restate the comment in your own words,
1360
+ 2. choose disposition:
1361
+ - \`resolved\` (code/docs/tests changed),
1362
+ - \`accepted-risk\` (intentional, user-approved),
1363
+ - \`rejected-with-evidence\` (comment is incorrect or out of scope),
1364
+ 3. attach concrete evidence (commit hash, diff path, test command output, or spec/plan citation),
1365
+ 4. update row status.
1366
+
1367
+ ### 4) Reconcile with review artifacts
1368
+
1369
+ When in review stage, mirror outcomes into:
1370
+ - \`.cclaw/artifacts/07-review.md\` (Layer 2 findings + readiness dashboard)
1371
+ - \`.cclaw/artifacts/07-review-army.json\` (status + shipBlockers alignment)
1372
+
1373
+ If any open Critical remains, final verdict cannot be \`APPROVED\`.
1374
+
1375
+ ### 5) Verify
1376
+
1377
+ Run the smallest relevant verification first, then full regression:
1378
+ - targeted tests for changed paths,
1379
+ - full suite/build for merge readiness.
1380
+
1381
+ ### 6) Publish response bundle
1382
+
1383
+ Produce a concise resolution report:
1384
+ - fixed items,
1385
+ - deferred/accepted-risk items (with owner/date),
1386
+ - rejected items (with evidence),
1387
+ - remaining blockers (if any).
1388
+
1389
+ ## Anti-Patterns
1390
+
1391
+ - "Addressed all comments" without a queue table.
1392
+ - Collapsing multiple comments into one vague status line.
1393
+ - Marking a comment resolved without evidence.
1394
+ - Rewriting reviewer intent to make it easier to dismiss.
1395
+ - Ignoring bot/CI findings because they are "automated."
1396
+
1397
+ ## Red Flags
1398
+
1399
+ - IDs change between passes (traceability lost).
1400
+ - Critical comment has no explicit disposition.
1401
+ - Queue says resolved, but review-army still lists open blocker.
1402
+ - Response bundle omits rejected comments entirely.
1403
+ `;
1404
+ }
1295
1405
  export function retrospectiveSkill() {
1296
1406
  return `---
1297
1407
  name: retrospective
@@ -1620,7 +1730,8 @@ export const UTILITY_SKILL_FOLDERS = [
1620
1730
  "security-audit",
1621
1731
  "knowledge-curation",
1622
1732
  "retrospective",
1623
- "document-review"
1733
+ "document-review",
1734
+ "receiving-code-review"
1624
1735
  ];
1625
1736
  export const UTILITY_SKILL_MAP = {
1626
1737
  security: securityReviewSkill,
@@ -1639,5 +1750,6 @@ export const UTILITY_SKILL_MAP = {
1639
1750
  "security-audit": securityAuditSkill,
1640
1751
  "knowledge-curation": knowledgeCurationSkill,
1641
1752
  retrospective: retrospectiveSkill,
1642
- "document-review": documentReviewSkill
1753
+ "document-review": documentReviewSkill,
1754
+ "receiving-code-review": receivingCodeReviewSkill
1643
1755
  };
package/dist/install.js CHANGED
@@ -36,7 +36,7 @@ import { LANGUAGE_RULE_PACK_DIR, LANGUAGE_RULE_PACK_FILES, LANGUAGE_RULE_PACK_GE
36
36
  import { RESEARCH_PLAYBOOKS } from "./content/research-playbooks.js";
37
37
  import { HARNESS_TOOL_REFS_DIR, HARNESS_TOOL_REFS_INDEX_MD, harnessToolRefMarkdown } from "./content/harness-tool-refs.js";
38
38
  import { DOCTOR_REFERENCE_MARKDOWN } from "./content/doctor-references.js";
39
- import { harnessIntegrationDocMarkdown } from "./content/harnesses-doc.js";
39
+ import { harnessDocsOverviewMarkdown, harnessIntegrationDocMarkdown } from "./content/harnesses-doc.js";
40
40
  import { HARNESS_PLAYBOOKS_DIR, harnessPlaybookFileName, harnessPlaybookMarkdown, harnessPlaybooksIndexMarkdown } from "./content/harness-playbooks.js";
41
41
  import { HOOK_EVENTS_BY_HARNESS, HOOK_SEMANTIC_EVENTS } from "./content/hook-events.js";
42
42
  import { createInitialFlowState } from "./flow-state.js";
@@ -294,6 +294,7 @@ async function writeSkills(projectRoot, config) {
294
294
  await writeFileSafe(runtimePath(projectRoot, ...doctorRefsDir, fileName), markdown);
295
295
  }
296
296
  await writeFileSafe(runtimePath(projectRoot, "references", "harnesses.md"), harnessIntegrationDocMarkdown());
297
+ await writeFileSafe(runtimePath(projectRoot, "references", "harnesses-overview.md"), harnessDocsOverviewMarkdown());
297
298
  // Per-harness parity playbooks. Generated for every supported harness
298
299
  // regardless of which harnesses the project installed — the index always
299
300
  // resolves, and doctor only asserts presence of the installed harnesses'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cclaw-cli",
3
- "version": "0.46.8",
3
+ "version": "0.46.10",
4
4
  "description": "Installer-first flow toolkit for coding agents",
5
5
  "type": "module",
6
6
  "bin": {