claude-code-pilot 3.1.0 → 3.2.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 (110) hide show
  1. package/README.md +11 -11
  2. package/bin/install.js +20 -2
  3. package/manifest.json +5 -1
  4. package/package.json +18 -6
  5. package/src/agents/a11y-architect.md +141 -0
  6. package/src/agents/code-architect.md +71 -0
  7. package/src/agents/code-explorer.md +69 -0
  8. package/src/agents/code-simplifier.md +47 -0
  9. package/src/agents/comment-analyzer.md +45 -0
  10. package/src/agents/csharp-reviewer.md +101 -0
  11. package/src/agents/dart-build-resolver.md +201 -0
  12. package/src/agents/pr-test-analyzer.md +45 -0
  13. package/src/agents/silent-failure-hunter.md +50 -0
  14. package/src/agents/type-design-analyzer.md +41 -0
  15. package/src/available-rules/README.md +3 -1
  16. package/src/available-rules/dart/coding-style.md +159 -0
  17. package/src/available-rules/dart/hooks.md +66 -0
  18. package/src/available-rules/dart/patterns.md +261 -0
  19. package/src/available-rules/dart/security.md +135 -0
  20. package/src/available-rules/dart/testing.md +215 -0
  21. package/src/available-rules/web/coding-style.md +105 -0
  22. package/src/available-rules/web/design-quality.md +72 -0
  23. package/src/available-rules/web/hooks.md +129 -0
  24. package/src/available-rules/web/patterns.md +88 -0
  25. package/src/available-rules/web/performance.md +73 -0
  26. package/src/available-rules/web/security.md +66 -0
  27. package/src/available-rules/web/testing.md +64 -0
  28. package/src/commands/ccp/ai-integration-phase.md +36 -0
  29. package/src/commands/ccp/audit-fix.md +33 -0
  30. package/src/commands/ccp/code-review-fix.md +52 -0
  31. package/src/commands/ccp/eval-review.md +32 -0
  32. package/src/commands/ccp/extract_learnings.md +22 -0
  33. package/src/commands/ccp/import.md +37 -0
  34. package/src/commands/ccp/ingest-docs.md +42 -0
  35. package/src/commands/ccp/intel.md +179 -0
  36. package/src/commands/ccp/plan-review-convergence.md +58 -0
  37. package/src/commands/ccp/scan.md +26 -0
  38. package/src/commands/ccp/sketch-wrap-up.md +31 -0
  39. package/src/commands/ccp/sketch.md +54 -0
  40. package/src/commands/ccp/spec-phase.md +62 -0
  41. package/src/commands/ccp/spike-wrap-up.md +31 -0
  42. package/src/commands/ccp/spike.md +51 -0
  43. package/src/commands/ccp/ultraplan-phase.md +33 -0
  44. package/src/hooks/ccp-read-injection-scanner.js +152 -0
  45. package/src/hooks/kit-check-update.js +59 -7
  46. package/src/hooks/run-with-flags-shell.sh +1 -0
  47. package/src/hooks/run-with-flags.js +48 -1
  48. package/src/hooks/session-end.js +88 -1
  49. package/src/lib/hook-flags.js +14 -0
  50. package/src/pilot/references/agent-contracts.md +79 -0
  51. package/src/pilot/references/ai-evals.md +156 -0
  52. package/src/pilot/references/ai-frameworks.md +186 -0
  53. package/src/pilot/references/doc-conflict-engine.md +91 -0
  54. package/src/pilot/references/gate-prompts.md +100 -0
  55. package/src/pilot/references/gates.md +70 -0
  56. package/src/pilot/references/mandatory-initial-read.md +2 -0
  57. package/src/pilot/references/project-skills-discovery.md +19 -0
  58. package/src/pilot/references/revision-loop.md +97 -0
  59. package/src/pilot/references/sketch-interactivity.md +41 -0
  60. package/src/pilot/references/sketch-theme-system.md +94 -0
  61. package/src/pilot/references/sketch-tooling.md +45 -0
  62. package/src/pilot/references/sketch-variant-patterns.md +81 -0
  63. package/src/pilot/references/thinking-models-debug.md +44 -0
  64. package/src/pilot/references/thinking-models-execution.md +50 -0
  65. package/src/pilot/references/thinking-models-planning.md +62 -0
  66. package/src/pilot/references/thinking-models-research.md +50 -0
  67. package/src/pilot/references/thinking-models-verification.md +55 -0
  68. package/src/pilot/templates/AI-SPEC.md +246 -0
  69. package/src/pilot/templates/spec.md +307 -0
  70. package/src/pilot/workflows/ai-integration-phase.md +284 -0
  71. package/src/pilot/workflows/audit-fix.md +175 -0
  72. package/src/pilot/workflows/code-review-fix.md +497 -0
  73. package/src/pilot/workflows/eval-review.md +155 -0
  74. package/src/pilot/workflows/extract_learnings.md +242 -0
  75. package/src/pilot/workflows/import.md +246 -0
  76. package/src/pilot/workflows/ingest-docs.md +328 -0
  77. package/src/pilot/workflows/plan-review-convergence.md +329 -0
  78. package/src/pilot/workflows/scan.md +102 -0
  79. package/src/pilot/workflows/sketch-wrap-up.md +285 -0
  80. package/src/pilot/workflows/sketch.md +360 -0
  81. package/src/pilot/workflows/spec-phase.md +262 -0
  82. package/src/pilot/workflows/spike-wrap-up.md +306 -0
  83. package/src/pilot/workflows/spike.md +452 -0
  84. package/src/pilot/workflows/ultraplan-phase.md +189 -0
  85. package/src/skills/accessibility/SKILL.md +146 -0
  86. package/src/skills/agent-eval/SKILL.md +145 -0
  87. package/src/skills/agent-introspection-debugging/SKILL.md +153 -0
  88. package/src/skills/android-clean-architecture/SKILL.md +339 -0
  89. package/src/skills/api-connector-builder/SKILL.md +120 -0
  90. package/src/skills/code-tour/SKILL.md +236 -0
  91. package/src/skills/compose-multiplatform-patterns/SKILL.md +299 -0
  92. package/src/skills/csharp-testing/SKILL.md +321 -0
  93. package/src/skills/dart-flutter-patterns/SKILL.md +563 -0
  94. package/src/skills/dashboard-builder/SKILL.md +108 -0
  95. package/src/skills/dotnet-patterns/SKILL.md +321 -0
  96. package/src/skills/frontend-design/SKILL.md +145 -0
  97. package/src/skills/frontend-slides/SKILL.md +184 -0
  98. package/src/skills/frontend-slides/STYLE_PRESETS.md +330 -0
  99. package/src/skills/gateguard/SKILL.md +121 -0
  100. package/src/skills/github-ops/SKILL.md +144 -0
  101. package/src/skills/hookify-rules/SKILL.md +128 -0
  102. package/src/skills/knowledge-ops/SKILL.md +154 -0
  103. package/src/skills/liquid-glass-design/SKILL.md +279 -0
  104. package/src/skills/nestjs-patterns/SKILL.md +230 -0
  105. package/src/skills/security-bounty-hunter/SKILL.md +99 -0
  106. package/src/skills/swift-actor-persistence/SKILL.md +143 -0
  107. package/src/skills/swift-protocol-di-testing/SKILL.md +190 -0
  108. package/src/skills/swiftui-patterns/SKILL.md +259 -0
  109. package/src/skills/terminal-ops/SKILL.md +109 -0
  110. package/src/skills/ui-demo/SKILL.md +465 -0
@@ -0,0 +1,102 @@
1
+ <purpose>
2
+ Lightweight codebase assessment. Spawns a single gsd-codebase-mapper agent for one focus area,
3
+ producing targeted documents in `.planning/codebase/`.
4
+ </purpose>
5
+
6
+ <required_reading>
7
+ Read all files referenced by the invoking prompt's execution_context before starting.
8
+ </required_reading>
9
+
10
+ <available_agent_types>
11
+ Valid GSD subagent types (use exact names — do not fall back to 'general-purpose'):
12
+ - gsd-codebase-mapper — Maps project structure and dependencies
13
+ </available_agent_types>
14
+
15
+ <process>
16
+
17
+ ## Focus-to-Document Mapping
18
+
19
+ | Focus | Documents Produced |
20
+ |-------|-------------------|
21
+ | `tech` | STACK.md, INTEGRATIONS.md |
22
+ | `arch` | ARCHITECTURE.md, STRUCTURE.md |
23
+ | `quality` | CONVENTIONS.md, TESTING.md |
24
+ | `concerns` | CONCERNS.md |
25
+ | `tech+arch` | STACK.md, INTEGRATIONS.md, ARCHITECTURE.md, STRUCTURE.md |
26
+
27
+ ## Step 1: Parse arguments and resolve focus
28
+
29
+ Parse the user's input for `--focus <area>`. Default to `tech+arch` if not specified.
30
+
31
+ Validate that the focus is one of: `tech`, `arch`, `quality`, `concerns`, `tech+arch`.
32
+
33
+ If invalid:
34
+ ```
35
+ Unknown focus area: "{input}". Valid options: tech, arch, quality, concerns, tech+arch
36
+ ```
37
+ Exit.
38
+
39
+ ## Step 2: Check for existing documents
40
+
41
+ ```bash
42
+ INIT=$(gsd-sdk query init.map-codebase 2>/dev/null || echo "{}")
43
+ if [[ "$INIT" == @file:* ]]; then INIT=$(cat "${INIT#@file:}"); fi
44
+ ```
45
+
46
+ Look up which documents would be produced for the selected focus (from the mapping table above).
47
+
48
+ For each target document, check if it already exists in `.planning/codebase/`:
49
+ ```bash
50
+ ls -la .planning/codebase/{DOCUMENT}.md 2>/dev/null
51
+ ```
52
+
53
+ If any exist, show their modification dates and ask:
54
+ ```
55
+ Existing documents found:
56
+ - STACK.md (modified 2026-04-03)
57
+ - INTEGRATIONS.md (modified 2026-04-01)
58
+
59
+ Overwrite with fresh scan? [y/N]
60
+ ```
61
+
62
+ If user says no, exit.
63
+
64
+ ## Step 3: Create output directory
65
+
66
+ ```bash
67
+ mkdir -p .planning/codebase
68
+ ```
69
+
70
+ ## Step 4: Spawn mapper agent
71
+
72
+ Spawn a single `gsd-codebase-mapper` agent with the selected focus area:
73
+
74
+ ```
75
+ Task(
76
+ prompt="Scan this codebase with focus: {focus}. Write results to .planning/codebase/. Produce only: {document_list}",
77
+ subagent_type="gsd-codebase-mapper",
78
+ model="{resolved_model}"
79
+ )
80
+ ```
81
+
82
+ ## Step 5: Report
83
+
84
+ ```
85
+ ## Scan Complete
86
+
87
+ **Focus:** {focus}
88
+ **Documents produced:**
89
+ {list of documents written with line counts}
90
+
91
+ Use `/ccp:map-codebase` for a comprehensive 4-area parallel scan.
92
+ ```
93
+
94
+ </process>
95
+
96
+ <success_criteria>
97
+ - [ ] Focus area correctly parsed (default: tech+arch)
98
+ - [ ] Existing documents detected with modification dates shown
99
+ - [ ] User prompted before overwriting
100
+ - [ ] Single mapper agent spawned with correct focus
101
+ - [ ] Output documents written to .planning/codebase/
102
+ </success_criteria>
@@ -0,0 +1,285 @@
1
+ <purpose>
2
+ Curate sketch design findings and package them into a persistent project skill for future
3
+ UI implementation. Reads from `.planning/sketches/`, writes skill to `./.claude/skills/sketch-findings-[project]/`
4
+ (project-local) and summary to `.planning/sketches/WRAP-UP-SUMMARY.md`.
5
+ Companion to `/ccp:sketch`.
6
+ </purpose>
7
+
8
+ <required_reading>
9
+ Read all files referenced by the invoking prompt's execution_context before starting.
10
+ </required_reading>
11
+
12
+ <process>
13
+
14
+ <step name="banner">
15
+ ```
16
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
17
+ GSD ► SKETCH WRAP-UP
18
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
19
+ ```
20
+ </step>
21
+
22
+ <step name="gather">
23
+ ## Gather Sketch Inventory
24
+
25
+ 1. Read `.planning/sketches/MANIFEST.md` for the design direction and reference points
26
+ 2. Glob `.planning/sketches/*/README.md` and parse YAML frontmatter from each
27
+ 3. Check if `./.claude/skills/sketch-findings-*/SKILL.md` exists for this project
28
+ - If yes: read its `processed_sketches` list and filter those out
29
+ - If no: all sketches are candidates
30
+
31
+ If no unprocessed sketches exist:
32
+ ```
33
+ No unprocessed sketches found in `.planning/sketches/`.
34
+ Run `/ccp:sketch` first to create design explorations.
35
+ ```
36
+ Exit.
37
+
38
+ Check `commit_docs` config:
39
+ ```bash
40
+ COMMIT_DOCS=$(gsd-sdk query config-get commit_docs 2>/dev/null || echo "true")
41
+ ```
42
+ </step>
43
+
44
+ <step name="curate">
45
+ ## Curate Sketches One-at-a-Time
46
+
47
+ Present each unprocessed sketch in ascending order. For each sketch, show:
48
+
49
+ - **Sketch number and name**
50
+ - **Design question:** from frontmatter
51
+ - **Winner:** which variant was selected (if any)
52
+ - **Tags:** from frontmatter
53
+ - **Key decisions:** summarize what was decided visually
54
+
55
+ Then ask the user:
56
+
57
+ ╔══════════════════════════════════════════════════════════════╗
58
+ ║ CHECKPOINT: Decision Required ║
59
+ ╚══════════════════════════════════════════════════════════════╝
60
+
61
+ Sketch {NNN}: {name} — Winner: Variant {X}
62
+
63
+ {key design decisions summary}
64
+
65
+ ──────────────────────────────────────────────────────────────
66
+ → Include / Exclude / Partial / Let me look at it
67
+ ──────────────────────────────────────────────────────────────
68
+
69
+ **If "Let me look at it":**
70
+ 1. Provide: `open .planning/sketches/NNN-name/index.html`
71
+ 2. Remind them which variant won and what to look for
72
+ 3. After they've looked, return to the include/exclude/partial decision
73
+
74
+ **If "Partial":**
75
+ Ask what specifically to include or exclude from this sketch's decisions.
76
+ </step>
77
+
78
+ <step name="group">
79
+ ## Auto-Group by Design Area
80
+
81
+ After all sketches are curated:
82
+
83
+ 1. Read all included sketches' tags, names, and content
84
+ 2. Propose design-area groupings, e.g.:
85
+ - "**Layout & Navigation** — sketches 001, 004"
86
+ - "**Form Controls** — sketches 002, 005"
87
+ - "**Color & Typography** — sketches 003"
88
+ 3. Present the grouping for approval — user may merge, split, rename, or rearrange
89
+
90
+ Each group becomes one reference file in the generated skill.
91
+ </step>
92
+
93
+ <step name="skill_name">
94
+ ## Determine Output Skill Name
95
+
96
+ Derive from the project directory name: `./.claude/skills/sketch-findings-[project-dir-name]/`
97
+
98
+ If a skill already exists at that path (append mode), update in place.
99
+ </step>
100
+
101
+ <step name="copy_sources">
102
+ ## Copy Source Files
103
+
104
+ For each included sketch:
105
+
106
+ 1. Copy the winning variant's HTML file (or the full index.html with all variants) into `sources/NNN-sketch-name/`
107
+ 2. Copy the winning theme.css into `sources/themes/`
108
+ 3. Exclude node_modules, build artifacts, .DS_Store
109
+ </step>
110
+
111
+ <step name="synthesize">
112
+ ## Synthesize Reference Files
113
+
114
+ For each design-area group, write a reference file at `references/[design-area-name].md`:
115
+
116
+ ```markdown
117
+ # [Design Area Name]
118
+
119
+ ## Design Decisions
120
+ [For each validated decision: what was chosen, why it won over alternatives, the key visual properties (colors, spacing, border radius, typography)]
121
+
122
+ ## CSS Patterns
123
+ [Key CSS snippets from winning variants — layout structures, component patterns, animation patterns. Extracted and cleaned up for reference.]
124
+
125
+ ## HTML Structures
126
+ [Key HTML patterns from winning variants — page layout, component markup, navigation structures.]
127
+
128
+ ## What to Avoid
129
+ [Design directions that were tried and rejected. Why they didn't work.]
130
+
131
+ ## Origin
132
+ Synthesized from sketches: NNN, NNN
133
+ Source files available in: sources/NNN-sketch-name/
134
+ ```
135
+ </step>
136
+
137
+ <step name="write_skill">
138
+ ## Write SKILL.md
139
+
140
+ Create (or update) the generated skill's SKILL.md:
141
+
142
+ ```markdown
143
+ ---
144
+ name: sketch-findings-[project-dir-name]
145
+ description: Validated design decisions, CSS patterns, and visual direction from sketch experiments. Auto-loaded during UI implementation on [project-dir-name].
146
+ ---
147
+
148
+ <context>
149
+ ## Project: [project-dir-name]
150
+
151
+ [Design direction paragraph from MANIFEST.md]
152
+ [Reference points mentioned during intake]
153
+
154
+ Sketch sessions wrapped: [date(s)]
155
+ </context>
156
+
157
+ <design_direction>
158
+ ## Overall Direction
159
+
160
+ [Summary of the validated visual direction: palette, typography, spacing system, layout approach, interaction patterns]
161
+ </design_direction>
162
+
163
+ <findings_index>
164
+ ## Design Areas
165
+
166
+ | Area | Reference | Key Decision |
167
+ |------|-----------|--------------|
168
+ | [Name] | references/[name].md | [One-line summary] |
169
+
170
+ ## Theme
171
+
172
+ The winning theme file is at `sources/themes/default.css`.
173
+
174
+ ## Source Files
175
+
176
+ Original sketch HTML files are preserved in `sources/` for complete reference.
177
+ </findings_index>
178
+
179
+ <metadata>
180
+ ## Processed Sketches
181
+
182
+ [List of sketch numbers wrapped up]
183
+
184
+ - 001-sketch-name
185
+ - 002-sketch-name
186
+ </metadata>
187
+ ```
188
+ </step>
189
+
190
+ <step name="write_summary">
191
+ ## Write Planning Summary
192
+
193
+ Write `.planning/sketches/WRAP-UP-SUMMARY.md` for project history:
194
+
195
+ ```markdown
196
+ # Sketch Wrap-Up Summary
197
+
198
+ **Date:** [date]
199
+ **Sketches processed:** [count]
200
+ **Design areas:** [list]
201
+ **Skill output:** `./.claude/skills/sketch-findings-[project]/`
202
+
203
+ ## Included Sketches
204
+ | # | Name | Winner | Design Area |
205
+ |---|------|--------|-------------|
206
+
207
+ ## Excluded Sketches
208
+ | # | Name | Reason |
209
+ |---|------|--------|
210
+
211
+ ## Design Direction
212
+ [consolidated design direction summary]
213
+
214
+ ## Key Decisions
215
+ [layout, palette, typography, spacing, interaction patterns]
216
+ ```
217
+ </step>
218
+
219
+ <step name="update_claude_md">
220
+ ## Update Project CLAUDE.md
221
+
222
+ Add an auto-load routing line:
223
+
224
+ ```
225
+ - **Sketch findings for [project]** (design decisions, CSS patterns, visual direction) → `Skill("sketch-findings-[project-dir-name]")`
226
+ ```
227
+
228
+ If this routing line already exists (append mode), leave it as-is.
229
+ </step>
230
+
231
+ <step name="commit">
232
+ Commit all artifacts (if `COMMIT_DOCS` is true):
233
+
234
+ ```bash
235
+ gsd-sdk query commit "docs(sketch-wrap-up): package [N] sketch findings into project skill" .planning/sketches/WRAP-UP-SUMMARY.md
236
+ ```
237
+ </step>
238
+
239
+ <step name="report">
240
+ ```
241
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
242
+ GSD ► SKETCH WRAP-UP COMPLETE ✓
243
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
244
+
245
+ **Curated:** {N} sketches ({included} included, {excluded} excluded)
246
+ **Design areas:** {list}
247
+ **Skill:** `./.claude/skills/sketch-findings-[project]/`
248
+ **Summary:** `.planning/sketches/WRAP-UP-SUMMARY.md`
249
+ **CLAUDE.md:** routing line added
250
+
251
+ The sketch-findings skill will auto-load when building the UI.
252
+ ```
253
+
254
+ ───────────────────────────────────────────────────────────────
255
+
256
+ ## ▶ Next Up
257
+
258
+ **Explore frontier sketches** — see what else is worth sketching based on what we've explored
259
+
260
+ `/ccp:sketch` (run with no argument — its frontier mode analyzes the sketch landscape and proposes consistency and frontier sketches)
261
+
262
+ ───────────────────────────────────────────────────────────────
263
+
264
+ **Also available:**
265
+ - `/ccp:plan-phase` — start building the real UI
266
+ - `/ccp:ui-phase` — generate a UI design contract for a frontend phase
267
+ - `/ccp:sketch [idea]` — sketch a specific new design area
268
+ - `/ccp:explore` — continue exploring
269
+
270
+ ───────────────────────────────────────────────────────────────
271
+ </step>
272
+
273
+ </process>
274
+
275
+ <success_criteria>
276
+ - [ ] Every unprocessed sketch presented for individual curation
277
+ - [ ] Design-area grouping proposed and approved
278
+ - [ ] Sketch-findings skill exists at `./.claude/skills/` with SKILL.md, references/, sources/
279
+ - [ ] Winning theme.css copied into skill sources
280
+ - [ ] Reference files contain design decisions, CSS patterns, HTML structures, anti-patterns
281
+ - [ ] `.planning/sketches/WRAP-UP-SUMMARY.md` written for project history
282
+ - [ ] Project CLAUDE.md has auto-load routing line
283
+ - [ ] Summary presented
284
+ - [ ] Next-step options presented (including frontier sketch exploration via `/ccp:sketch`)
285
+ </success_criteria>