cclaw-cli 0.10.1 → 0.12.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 (55) hide show
  1. package/README.md +4 -3
  2. package/dist/cli.d.ts +6 -0
  3. package/dist/cli.js +297 -9
  4. package/dist/config.js +83 -3
  5. package/dist/content/core-agents.d.ts +44 -0
  6. package/dist/content/core-agents.js +225 -0
  7. package/dist/content/doctor-references.d.ts +2 -0
  8. package/dist/content/doctor-references.js +144 -0
  9. package/dist/content/examples.js +1 -1
  10. package/dist/content/harnesses-doc.d.ts +1 -0
  11. package/dist/content/harnesses-doc.js +95 -0
  12. package/dist/content/hook-events.d.ts +4 -0
  13. package/dist/content/hook-events.js +42 -0
  14. package/dist/content/hooks.js +81 -11
  15. package/dist/content/meta-skill.d.ts +0 -8
  16. package/dist/content/meta-skill.js +51 -341
  17. package/dist/content/next-command.js +2 -1
  18. package/dist/content/protocols.d.ts +7 -0
  19. package/dist/content/protocols.js +123 -0
  20. package/dist/content/research-playbooks.d.ts +8 -0
  21. package/dist/content/research-playbooks.js +135 -0
  22. package/dist/content/skills.js +202 -312
  23. package/dist/content/stage-common-guidance.d.ts +2 -0
  24. package/dist/content/stage-common-guidance.js +71 -0
  25. package/dist/content/stage-schema.d.ts +11 -1
  26. package/dist/content/stage-schema.js +155 -52
  27. package/dist/content/start-command.js +19 -13
  28. package/dist/content/subagents.d.ts +1 -1
  29. package/dist/content/subagents.js +23 -38
  30. package/dist/content/templates.d.ts +1 -1
  31. package/dist/content/templates.js +49 -11
  32. package/dist/delegation.d.ts +1 -0
  33. package/dist/delegation.js +27 -1
  34. package/dist/doctor-registry.d.ts +8 -0
  35. package/dist/doctor-registry.js +127 -0
  36. package/dist/doctor.d.ts +5 -0
  37. package/dist/doctor.js +133 -27
  38. package/dist/flow-state.d.ts +4 -0
  39. package/dist/flow-state.js +4 -1
  40. package/dist/gate-evidence.d.ts +9 -1
  41. package/dist/gate-evidence.js +121 -17
  42. package/dist/harness-adapters.d.ts +7 -0
  43. package/dist/harness-adapters.js +53 -9
  44. package/dist/init-detect.d.ts +2 -0
  45. package/dist/init-detect.js +45 -0
  46. package/dist/install.js +73 -1
  47. package/dist/policy.js +21 -13
  48. package/dist/runs.js +21 -4
  49. package/dist/track-heuristics.d.ts +12 -0
  50. package/dist/track-heuristics.js +144 -0
  51. package/dist/types.d.ts +26 -3
  52. package/dist/types.js +6 -3
  53. package/package.json +2 -1
  54. package/dist/content/agents.d.ts +0 -48
  55. package/dist/content/agents.js +0 -411
@@ -0,0 +1,135 @@
1
+ /**
2
+ * In-thread research playbooks.
3
+ *
4
+ * These files intentionally have no YAML frontmatter and are not standalone
5
+ * delegated personas. The primary agent loads and executes them directly.
6
+ */
7
+ export const RESEARCH_PLAYBOOKS = {
8
+ "repo-scan.md": `# Repo Scan Playbook
9
+
10
+ ## Purpose
11
+
12
+ Build a grounded map of existing modules and reuse candidates before design lock.
13
+
14
+ ## Steps
15
+
16
+ 1. Identify 3-8 task keywords (feature nouns + action verbs).
17
+ 2. Search for likely modules with \`rg\` and \`Glob\` patterns.
18
+ 3. List existing implementations or close analogs with file citations.
19
+ 4. Flag duplication risk and obvious extension points.
20
+
21
+ ## Output Contract
22
+
23
+ - Relevant modules: \`path - purpose\`
24
+ - Reuse candidates: \`file:line - why reusable\`
25
+ - Gaps: capabilities not currently present
26
+
27
+ ## Guardrails
28
+
29
+ - Read-only procedure.
30
+ - Never invent paths or ownership.
31
+ - If scope is too broad, return bounded partial coverage explicitly.
32
+ `,
33
+ "learnings-lookup.md": `# Learnings Lookup Playbook
34
+
35
+ ## Purpose
36
+
37
+ Reuse prior project knowledge before choosing a direction.
38
+
39
+ ## Steps
40
+
41
+ 1. Read \`.cclaw/knowledge.jsonl\`.
42
+ 2. Match by stage/domain keywords from the current task.
43
+ 3. Rank matches by confidence and recency.
44
+ 4. Return the top entries verbatim.
45
+
46
+ ## Output Contract
47
+
48
+ - Matched rules
49
+ - Matched patterns
50
+ - Matched lessons
51
+ - Matched compounds
52
+ - Explicit no-match note when empty
53
+
54
+ ## Guardrails
55
+
56
+ - Append-only store: do not rewrite history entries.
57
+ - Prefer exact quote over paraphrase.
58
+ `,
59
+ "framework-docs-lookup.md": `# Framework Docs Lookup Playbook
60
+
61
+ ## Purpose
62
+
63
+ Anchor design decisions to version-accurate framework/library docs.
64
+
65
+ ## Steps
66
+
67
+ 1. Resolve the actual dependency version from lockfiles/manifests.
68
+ 2. Fetch official docs for that version (context7 when available).
69
+ 3. Extract APIs used by the task and any migration or deprecation notes.
70
+
71
+ ## Output Contract
72
+
73
+ - Library + version
74
+ - APIs/signatures touched
75
+ - Relevant breaking changes or gotchas
76
+ - Source links/references
77
+
78
+ ## Guardrails
79
+
80
+ - No speculative APIs.
81
+ - If docs conflict or are unclear, mark UNKNOWN and escalate.
82
+ `,
83
+ "best-practices-lookup.md": `# Best Practices Lookup Playbook
84
+
85
+ ## Purpose
86
+
87
+ Summarize citable domain practices for a narrow design decision.
88
+
89
+ ## Steps
90
+
91
+ 1. Narrow the domain to one concrete sub-problem.
92
+ 2. Gather 3-5 authoritative sources.
93
+ 3. Produce short practice and anti-pattern lists tied to sources.
94
+
95
+ ## Output Contract
96
+
97
+ - Recommended practices (\`practice - rationale - source\`)
98
+ - Common traps (\`trap - why it fails - source\`)
99
+ - Decision hooks (1-3 questions to resolve before proceeding)
100
+
101
+ ## Guardrails
102
+
103
+ - Cite authoritative sources (official docs/standards).
104
+ - State uncertainty explicitly when consensus is weak.
105
+ `,
106
+ "git-history.md": `# Git History Playbook
107
+
108
+ ## Purpose
109
+
110
+ Detect churn, regressions, and ownership signals before locking scope/design.
111
+
112
+ ## Steps
113
+
114
+ 1. For impacted paths, inspect recent history and themes:
115
+ - \`git log --follow -n 20 -- <path>\`
116
+ 2. Check ownership hotspots:
117
+ - \`git blame <path>\`
118
+ - \`git log --since="<window>" --format="%an" -- <path>\`
119
+ 3. Search for regression signals:
120
+ - \`git log --since="<window>" --grep="revert|regression" -- <path>\`
121
+
122
+ ## Output Contract
123
+
124
+ - Recent themes
125
+ - Revert/regression signals (with SHAs)
126
+ - Ownership hints
127
+ - Collision risks with ongoing refactors
128
+
129
+ ## Guardrails
130
+
131
+ - Read-only git usage.
132
+ - If there is no history, say so explicitly.
133
+ `
134
+ };
135
+ export const RESEARCH_PLAYBOOK_FILES = Object.keys(RESEARCH_PLAYBOOKS).sort();