cclaw-cli 0.51.18 → 0.51.19

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.
@@ -0,0 +1,4 @@
1
+ import type { StageAutoSubagentDispatch } from "./stages/schema-types.js";
2
+ type SubagentContextSkillId = NonNullable<StageAutoSubagentDispatch["skill"]>;
3
+ export declare const SUBAGENT_CONTEXT_SKILLS: Record<SubagentContextSkillId, string>;
4
+ export {};
@@ -0,0 +1,122 @@
1
+ function skillFrontmatter(name, description) {
2
+ return [
3
+ "---",
4
+ `name: ${name}`,
5
+ `description: ${JSON.stringify(description)}`,
6
+ "---",
7
+ ""
8
+ ].join("\n");
9
+ }
10
+ function tddCycleEvidenceSkill() {
11
+ return `${skillFrontmatter("tdd-cycle-evidence", "Evidence contract for the mandatory test-author delegation during RED/GREEN/REFACTOR.")}# TDD Cycle Evidence
12
+
13
+ Use with the \`test-author\` delegation in the \`tdd\` stage.
14
+
15
+ ## Required Output
16
+
17
+ - RED evidence: failing test command, failing assertion/error, and why it fails for the intended reason.
18
+ - GREEN evidence: implementation summary plus relevant passing command.
19
+ - REFACTOR evidence: changed/unchanged behavior statement plus full-suite or highest available verification command.
20
+ - Trace refs: plan task ID, acceptance criterion ID, and touched test files.
21
+
22
+ ## Guardrails
23
+
24
+ - No production code before RED evidence exists.
25
+ - If a RED test cannot be expressed, stop and route back to design/spec with the blocker.
26
+ - Record command output summaries, not just "tests passed".
27
+ `;
28
+ }
29
+ function reviewSpecPassSkill() {
30
+ return `${skillFrontmatter("review-spec-pass", "Spec compliance pass for the mandatory reviewer delegation during review.")}# Review Spec Pass
31
+
32
+ Use with the \`reviewer\` delegation in the \`review\` stage before broader code-quality findings.
33
+
34
+ ## Required Output
35
+
36
+ - For each acceptance criterion: PASS / PARTIAL / FAIL.
37
+ - Evidence refs grounded in files, tests, artifacts, or command output.
38
+ - Any mismatch between scope/design/spec/plan and implementation.
39
+ - Explicit list of Critical/Important blockers before ship.
40
+
41
+ ## Guardrails
42
+
43
+ - Do not trust implementer summaries; verify by reading artifacts/code.
44
+ - Keep spec compliance separate from style suggestions.
45
+ `;
46
+ }
47
+ function securityAuditSkill() {
48
+ return `${skillFrontmatter("security-audit", "Mandatory security sweep contract for the security-reviewer delegation.")}# Security Audit
49
+
50
+ Use with the \`security-reviewer\` delegation in the \`review\` stage.
51
+
52
+ ## Required Output
53
+
54
+ - Trust-boundary map: auth/authz, input validation, secrets, filesystem/network/process access, third-party calls.
55
+ - Findings with severity, exploitability, affected file/path, and concrete mitigation.
56
+ - NO_CHANGE_ATTESTATION when no security-relevant surface moved, with evidence for why.
57
+
58
+ ## Guardrails
59
+
60
+ - Pattern-scan the diff and touched modules before attesting no change.
61
+ - Security is mandatory in review even for small diffs.
62
+ `;
63
+ }
64
+ function adversarialReviewSkill() {
65
+ return `${skillFrontmatter("adversarial-review", "Second-opinion reviewer lens for high-risk review scenarios.")}# Adversarial Review
66
+
67
+ Use only when the review dispatch trigger says risk justifies a second opinion.
68
+
69
+ ## Required Output
70
+
71
+ - Attack the implementation assumptions, not the author.
72
+ - Look for hidden coupling, rollback gaps, data loss, race conditions, and untested edge cases.
73
+ - Mark each finding as confirmed, disproven, or needs-human-decision.
74
+
75
+ ## Guardrails
76
+
77
+ - Do not duplicate the mandatory reviewer pass.
78
+ - If no additional risk is found, say so explicitly and cite what was checked.
79
+ `;
80
+ }
81
+ function receivingCodeReviewSkill() {
82
+ return `${skillFrontmatter("receiving-code-review", "Workflow for triaging external reviewer, bot, or CI feedback during review.")}# Receiving Code Review
83
+
84
+ Use when external comments, bot findings, or CI annotations appear after the initial review pass.
85
+
86
+ ## Required Output
87
+
88
+ - Queue every feedback item with source, severity, requested change, and evidence.
89
+ - Disposition: accepted, rejected-with-evidence, accepted-risk, duplicate, or needs-user-decision.
90
+ - Mirror the queue into the review artifact so unresolved feedback cannot disappear.
91
+
92
+ ## Guardrails
93
+
94
+ - Do not silently dismiss bot/CI feedback.
95
+ - Re-run relevant checks after accepted fixes.
96
+ `;
97
+ }
98
+ function stackAwareReviewSkill() {
99
+ return `${skillFrontmatter("stack-aware-review", "Language/runtime-specific review lens selected from detected repo signals.")}# Stack-Aware Review
100
+
101
+ Use after the default reviewer/security-reviewer passes when repo signals identify a relevant stack.
102
+
103
+ ## Required Output
104
+
105
+ - Detected stack signal and why this lens applies.
106
+ - Stack-specific risks checked: package/build/test config, type/runtime boundaries, framework conventions, and deployment assumptions.
107
+ - Findings with evidence and whether they affect ship readiness.
108
+
109
+ ## Guardrails
110
+
111
+ - Do not run every stack lens unconditionally.
112
+ - Keep the default general reviewer pass intact; this is additive context, not a replacement.
113
+ `;
114
+ }
115
+ export const SUBAGENT_CONTEXT_SKILLS = {
116
+ "tdd-cycle-evidence": tddCycleEvidenceSkill(),
117
+ "review-spec-pass": reviewSpecPassSkill(),
118
+ "security-audit": securityAuditSkill(),
119
+ "adversarial-review": adversarialReviewSkill(),
120
+ "receiving-code-review": receivingCodeReviewSkill(),
121
+ "stack-aware-review": stackAwareReviewSkill()
122
+ };
package/dist/install.js CHANGED
@@ -21,6 +21,7 @@ import { REVIEW_PROMPTS } from "./content/review-prompts.js";
21
21
  import { stageSkillFolder, stageSkillMarkdown } from "./content/skills.js";
22
22
  import { LANGUAGE_RULE_PACK_DIR, LANGUAGE_RULE_PACK_FILES, LANGUAGE_RULE_PACK_GENERATORS, LEGACY_LANGUAGE_RULE_PACK_FOLDERS } from "./content/utility-skills.js";
23
23
  import { RESEARCH_PLAYBOOKS } from "./content/research-playbooks.js";
24
+ import { SUBAGENT_CONTEXT_SKILLS } from "./content/subagent-context-skills.js";
24
25
  import { createInitialFlowState } from "./flow-state.js";
25
26
  import { ensureDir, exists, writeFileSafe } from "./fs-utils.js";
26
27
  import { ensureGitignore, removeGitignorePatterns } from "./gitignore.js";
@@ -70,12 +71,9 @@ const DEPRECATED_UTILITY_SKILL_FOLDERS = [
70
71
  "source-driven-development",
71
72
  "frontend-accessibility",
72
73
  "landscape-check",
73
- "adversarial-review",
74
- "security-audit",
75
74
  "knowledge-curation",
76
75
  "retrospective",
77
76
  "document-review",
78
- "receiving-code-review",
79
77
  "flow-status",
80
78
  "flow-tree",
81
79
  "flow-diff"
@@ -387,6 +385,9 @@ async function writeSkills(projectRoot, config) {
387
385
  for (const [fileName, markdown] of Object.entries(REVIEW_PROMPTS)) {
388
386
  await writeFileSafe(runtimePath(projectRoot, "skills", "review-prompts", fileName), markdown);
389
387
  }
388
+ for (const [folderName, markdown] of Object.entries(SUBAGENT_CONTEXT_SKILLS)) {
389
+ await writeFileSafe(runtimePath(projectRoot, "skills", folderName, "SKILL.md"), markdown);
390
+ }
390
391
  // Language rule packs live under .cclaw/rules/lang/<pack>.md. They are opt-in:
391
392
  // only the packs listed in config.languageRulePacks are materialised. Any
392
393
  // legacy per-language skill folders from v0.7.0 (.cclaw/skills/language-*)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cclaw-cli",
3
- "version": "0.51.18",
3
+ "version": "0.51.19",
4
4
  "description": "Installer-first flow toolkit for coding agents",
5
5
  "type": "module",
6
6
  "bin": {