claude-code-pilot 3.1.1 → 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 +19 -1
  3. package/manifest.json +5 -1
  4. package/package.json +2 -2
  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,72 @@
1
+ ---
2
+ paths:
3
+ - "**/*.html"
4
+ - "**/*.css"
5
+ - "**/*.js"
6
+ - "**/*.jsx"
7
+ - "**/*.ts"
8
+ - "**/*.tsx"
9
+ ---
10
+ > This file extends [common/patterns.md](../common/patterns.md) with web-specific design-quality guidance.
11
+
12
+ # Web Design Quality Standards
13
+
14
+ ## Anti-Template Policy
15
+
16
+ Do not ship generic template-looking UI. Frontend output should look intentional, opinionated, and specific to the product.
17
+
18
+ ### Banned Patterns
19
+
20
+ - Default card grids with uniform spacing and no hierarchy
21
+ - Stock hero section with centered headline, gradient blob, and generic CTA
22
+ - Unmodified library defaults passed off as finished design
23
+ - Flat layouts with no layering, depth, or motion
24
+ - Uniform radius, spacing, and shadows across every component
25
+ - Safe gray-on-white styling with one decorative accent color
26
+ - Dashboard-by-numbers layouts with sidebar + cards + charts and no point of view
27
+ - Default font stacks used without a deliberate reason
28
+
29
+ ### Required Qualities
30
+
31
+ Every meaningful frontend surface should demonstrate at least four of these:
32
+
33
+ 1. Clear hierarchy through scale contrast
34
+ 2. Intentional rhythm in spacing, not uniform padding everywhere
35
+ 3. Depth or layering through overlap, shadows, surfaces, or motion
36
+ 4. Typography with character and a real pairing strategy
37
+ 5. Color used semantically, not just decoratively
38
+ 6. Hover, focus, and active states that feel designed
39
+ 7. Grid-breaking editorial or bento composition where appropriate
40
+ 8. Texture, grain, or atmosphere when it fits the visual direction
41
+ 9. Motion that clarifies flow instead of distracting from it
42
+ 10. Data visualization treated as part of the design system, not an afterthought
43
+
44
+ ## Before Writing Frontend Code
45
+
46
+ 1. Pick a specific style direction. Avoid vague defaults like "clean minimal".
47
+ 2. Define a palette intentionally.
48
+ 3. Choose typography deliberately.
49
+ 4. Gather at least a small set of real references.
50
+ 5. Use ECC design/frontend skills where relevant.
51
+
52
+ ## Worthwhile Style Directions
53
+
54
+ - Editorial / magazine
55
+ - Neo-brutalism
56
+ - Glassmorphism with real depth
57
+ - Dark luxury or light luxury with disciplined contrast
58
+ - Bento layouts
59
+ - Scrollytelling
60
+ - 3D integration
61
+ - Swiss / International
62
+ - Retro-futurism
63
+
64
+ Do not default to dark mode automatically. Choose the visual direction the product actually wants.
65
+
66
+ ## Component Checklist
67
+
68
+ - [ ] Does it avoid looking like a default Tailwind or shadcn template?
69
+ - [ ] Does it have intentional hover/focus/active states?
70
+ - [ ] Does it use hierarchy rather than uniform emphasis?
71
+ - [ ] Would this look believable in a real product screenshot?
72
+ - [ ] If it supports both themes, do both light and dark feel intentional?
@@ -0,0 +1,129 @@
1
+ ---
2
+ paths:
3
+ - "**/*.html"
4
+ - "**/*.css"
5
+ - "**/*.js"
6
+ - "**/*.jsx"
7
+ - "**/*.ts"
8
+ - "**/*.tsx"
9
+ ---
10
+ > This file extends [common/hooks.md](../common/hooks.md) with web-specific hook recommendations.
11
+
12
+ # Web Hooks
13
+
14
+ ## Recommended PostToolUse Hooks
15
+
16
+ Prefer project-local tooling. Do not wire hooks to remote one-off package execution.
17
+
18
+ ### Format on Save
19
+
20
+ Use the project's existing formatter entrypoint after edits:
21
+
22
+ ```json
23
+ {
24
+ "hooks": {
25
+ "PostToolUse": [
26
+ {
27
+ "matcher": "Write|Edit",
28
+ "command": "pnpm prettier --write \"$FILE_PATH\"",
29
+ "description": "Format edited frontend files"
30
+ }
31
+ ]
32
+ }
33
+ }
34
+ ```
35
+
36
+ Equivalent local commands via `yarn prettier` or `npm exec prettier --` are fine when they use repo-owned dependencies.
37
+
38
+ ### Lint Check
39
+
40
+ ```json
41
+ {
42
+ "hooks": {
43
+ "PostToolUse": [
44
+ {
45
+ "matcher": "Write|Edit",
46
+ "command": "pnpm eslint --fix \"$FILE_PATH\"",
47
+ "description": "Run ESLint on edited frontend files"
48
+ }
49
+ ]
50
+ }
51
+ }
52
+ ```
53
+
54
+ ### Type Check
55
+
56
+ ```json
57
+ {
58
+ "hooks": {
59
+ "PostToolUse": [
60
+ {
61
+ "matcher": "Write|Edit",
62
+ "command": "pnpm tsc --noEmit --pretty false",
63
+ "description": "Type-check after frontend edits"
64
+ }
65
+ ]
66
+ }
67
+ }
68
+ ```
69
+
70
+ ### CSS Lint
71
+
72
+ ```json
73
+ {
74
+ "hooks": {
75
+ "PostToolUse": [
76
+ {
77
+ "matcher": "Write|Edit",
78
+ "command": "pnpm stylelint --fix \"$FILE_PATH\"",
79
+ "description": "Lint edited stylesheets"
80
+ }
81
+ ]
82
+ }
83
+ }
84
+ ```
85
+
86
+ ## PreToolUse Hooks
87
+
88
+ ### Guard File Size
89
+
90
+ Block oversized writes from tool input content, not from a file that may not exist yet:
91
+
92
+ ```json
93
+ {
94
+ "hooks": {
95
+ "PreToolUse": [
96
+ {
97
+ "matcher": "Write",
98
+ "command": "node -e \"let d='';process.stdin.on('data',c=>d+=c);process.stdin.on('end',()=>{const i=JSON.parse(d);const c=i.tool_input?.content||'';const lines=c.split('\n').length;if(lines>800){console.error('[Hook] BLOCKED: File exceeds 800 lines ('+lines+' lines)');console.error('[Hook] Split into smaller modules');process.exit(2)}console.log(d)})\"",
99
+ "description": "Block writes that exceed 800 lines"
100
+ }
101
+ ]
102
+ }
103
+ }
104
+ ```
105
+
106
+ ## Stop Hooks
107
+
108
+ ### Final Build Verification
109
+
110
+ ```json
111
+ {
112
+ "hooks": {
113
+ "Stop": [
114
+ {
115
+ "command": "pnpm build",
116
+ "description": "Verify the production build at session end"
117
+ }
118
+ ]
119
+ }
120
+ }
121
+ ```
122
+
123
+ ## Ordering
124
+
125
+ Recommended order:
126
+ 1. format
127
+ 2. lint
128
+ 3. type check
129
+ 4. build verification
@@ -0,0 +1,88 @@
1
+ ---
2
+ paths:
3
+ - "**/*.html"
4
+ - "**/*.css"
5
+ - "**/*.js"
6
+ - "**/*.jsx"
7
+ - "**/*.ts"
8
+ - "**/*.tsx"
9
+ ---
10
+ > This file extends [common/patterns.md](../common/patterns.md) with web-specific patterns.
11
+
12
+ # Web Patterns
13
+
14
+ ## Component Composition
15
+
16
+ ### Compound Components
17
+
18
+ Use compound components when related UI shares state and interaction semantics:
19
+
20
+ ```tsx
21
+ <Tabs defaultValue="overview">
22
+ <Tabs.List>
23
+ <Tabs.Trigger value="overview">Overview</Tabs.Trigger>
24
+ <Tabs.Trigger value="settings">Settings</Tabs.Trigger>
25
+ </Tabs.List>
26
+ <Tabs.Content value="overview">...</Tabs.Content>
27
+ <Tabs.Content value="settings">...</Tabs.Content>
28
+ </Tabs>
29
+ ```
30
+
31
+ - Parent owns state
32
+ - Children consume via context
33
+ - Prefer this over prop drilling for complex widgets
34
+
35
+ ### Render Props / Slots
36
+
37
+ - Use render props or slot patterns when behavior is shared but markup must vary
38
+ - Keep keyboard handling, ARIA, and focus logic in the headless layer
39
+
40
+ ### Container / Presentational Split
41
+
42
+ - Container components own data loading and side effects
43
+ - Presentational components receive props and render UI
44
+ - Presentational components should stay pure
45
+
46
+ ## State Management
47
+
48
+ Treat these separately:
49
+
50
+ | Concern | Tooling |
51
+ |---------|---------|
52
+ | Server state | TanStack Query, SWR, tRPC |
53
+ | Client state | Zustand, Jotai, signals |
54
+ | URL state | search params, route segments |
55
+ | Form state | React Hook Form or equivalent |
56
+
57
+ - Do not duplicate server state into client stores
58
+ - Derive values instead of storing redundant computed state
59
+
60
+ ## URL As State
61
+
62
+ Persist shareable state in the URL:
63
+ - filters
64
+ - sort order
65
+ - pagination
66
+ - active tab
67
+ - search query
68
+
69
+ ## Data Fetching
70
+
71
+ ### Stale-While-Revalidate
72
+
73
+ - Return cached data immediately
74
+ - Revalidate in the background
75
+ - Prefer existing libraries instead of rolling this by hand
76
+
77
+ ### Optimistic Updates
78
+
79
+ - Snapshot current state
80
+ - Apply optimistic update
81
+ - Roll back on failure
82
+ - Emit visible error feedback when rolling back
83
+
84
+ ### Parallel Loading
85
+
86
+ - Fetch independent data in parallel
87
+ - Avoid parent-child request waterfalls
88
+ - Prefetch likely next routes or states when justified
@@ -0,0 +1,73 @@
1
+ ---
2
+ paths:
3
+ - "**/*.html"
4
+ - "**/*.css"
5
+ - "**/*.js"
6
+ - "**/*.jsx"
7
+ - "**/*.ts"
8
+ - "**/*.tsx"
9
+ ---
10
+ > This file extends [common/performance.md](../common/performance.md) with web-specific performance content.
11
+
12
+ # Web Performance Rules
13
+
14
+ ## Core Web Vitals Targets
15
+
16
+ | Metric | Target |
17
+ |--------|--------|
18
+ | LCP | < 2.5s |
19
+ | INP | < 200ms |
20
+ | CLS | < 0.1 |
21
+ | FCP | < 1.5s |
22
+ | TBT | < 200ms |
23
+
24
+ ## Bundle Budget
25
+
26
+ | Page Type | JS Budget (gzipped) | CSS Budget |
27
+ |-----------|---------------------|------------|
28
+ | Landing page | < 150kb | < 30kb |
29
+ | App page | < 300kb | < 50kb |
30
+ | Microsite | < 80kb | < 15kb |
31
+
32
+ ## Loading Strategy
33
+
34
+ 1. Inline critical above-the-fold CSS where justified
35
+ 2. Preload the hero image and primary font only
36
+ 3. Defer non-critical CSS or JS
37
+ 4. Dynamically import heavy libraries
38
+
39
+ ```js
40
+ const gsapModule = await import('gsap');
41
+ const { ScrollTrigger } = await import('gsap/ScrollTrigger');
42
+ ```
43
+
44
+ ## Image Optimization
45
+
46
+ - Explicit `width` and `height`
47
+ - `loading="eager"` plus `fetchpriority="high"` for hero media only
48
+ - `loading="lazy"` for below-the-fold assets
49
+ - Prefer AVIF or WebP with fallbacks
50
+ - Never ship source images far beyond rendered size
51
+
52
+ ## Font Loading
53
+
54
+ - Max two font families unless there is a clear exception
55
+ - `font-display: swap`
56
+ - Subset where possible
57
+ - Preload only the truly critical weight/style
58
+
59
+ ## Animation Performance
60
+
61
+ - Animate compositor-friendly properties only
62
+ - Use `will-change` narrowly and remove it when done
63
+ - Prefer CSS for simple transitions
64
+ - Use `requestAnimationFrame` or established animation libraries for JS motion
65
+ - Avoid scroll handler churn; use IntersectionObserver or well-behaved libraries
66
+
67
+ ## Performance Checklist
68
+
69
+ - [ ] All images have explicit dimensions
70
+ - [ ] No accidental render-blocking resources
71
+ - [ ] No layout shifts from dynamic content
72
+ - [ ] Motion stays on compositor-friendly properties
73
+ - [ ] Third-party scripts load async/defer and only when needed
@@ -0,0 +1,66 @@
1
+ ---
2
+ paths:
3
+ - "**/*.html"
4
+ - "**/*.css"
5
+ - "**/*.js"
6
+ - "**/*.jsx"
7
+ - "**/*.ts"
8
+ - "**/*.tsx"
9
+ ---
10
+ > This file extends [common/security.md](../common/security.md) with web-specific security content.
11
+
12
+ # Web Security Rules
13
+
14
+ ## Content Security Policy
15
+
16
+ Always configure a production CSP.
17
+
18
+ ### Nonce-Based CSP
19
+
20
+ Use a per-request nonce for scripts instead of `'unsafe-inline'`.
21
+
22
+ ```text
23
+ Content-Security-Policy:
24
+ default-src 'self';
25
+ script-src 'self' 'nonce-{RANDOM}' https://cdn.jsdelivr.net;
26
+ style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;
27
+ img-src 'self' data: https:;
28
+ font-src 'self' https://fonts.gstatic.com;
29
+ connect-src 'self' https://*.example.com;
30
+ frame-src 'none';
31
+ object-src 'none';
32
+ base-uri 'self';
33
+ ```
34
+
35
+ Adjust origins to the project. Do not cargo-cult this block unchanged.
36
+
37
+ ## XSS Prevention
38
+
39
+ - Never inject unsanitized HTML
40
+ - Avoid `innerHTML` / `dangerouslySetInnerHTML` unless sanitized first
41
+ - Escape dynamic template values
42
+ - Sanitize user HTML with a vetted local sanitizer when absolutely necessary
43
+
44
+ ## Third-Party Scripts
45
+
46
+ - Load asynchronously
47
+ - Use SRI when serving from a CDN
48
+ - Audit quarterly
49
+ - Prefer self-hosting for critical dependencies when practical
50
+
51
+ ## HTTPS and Headers
52
+
53
+ ```text
54
+ Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
55
+ X-Content-Type-Options: nosniff
56
+ X-Frame-Options: DENY
57
+ Referrer-Policy: strict-origin-when-cross-origin
58
+ Permissions-Policy: camera=(), microphone=(), geolocation=()
59
+ ```
60
+
61
+ ## Forms
62
+
63
+ - CSRF protection on state-changing forms
64
+ - Rate limiting on submission endpoints
65
+ - Validate client and server side
66
+ - Prefer honeypots or light anti-abuse controls over heavy-handed CAPTCHA defaults
@@ -0,0 +1,64 @@
1
+ ---
2
+ paths:
3
+ - "**/*.html"
4
+ - "**/*.css"
5
+ - "**/*.js"
6
+ - "**/*.jsx"
7
+ - "**/*.ts"
8
+ - "**/*.tsx"
9
+ ---
10
+ > This file extends [common/testing.md](../common/testing.md) with web-specific testing content.
11
+
12
+ # Web Testing Rules
13
+
14
+ ## Priority Order
15
+
16
+ ### 1. Visual Regression
17
+
18
+ - Screenshot key breakpoints: 320, 768, 1024, 1440
19
+ - Test hero sections, scrollytelling sections, and meaningful states
20
+ - Use Playwright screenshots for visual-heavy work
21
+ - If both themes exist, test both
22
+
23
+ ### 2. Accessibility
24
+
25
+ - Run automated accessibility checks
26
+ - Test keyboard navigation
27
+ - Verify reduced-motion behavior
28
+ - Verify color contrast
29
+
30
+ ### 3. Performance
31
+
32
+ - Run Lighthouse or equivalent against meaningful pages
33
+ - Keep CWV targets from [performance.md](performance.md)
34
+
35
+ ### 4. Cross-Browser
36
+
37
+ - Minimum: Chrome, Firefox, Safari
38
+ - Test scrolling, motion, and fallback behavior
39
+
40
+ ### 5. Responsive
41
+
42
+ - Test 320, 375, 768, 1024, 1440, 1920
43
+ - Verify no overflow
44
+ - Verify touch interactions
45
+
46
+ ## E2E Shape
47
+
48
+ ```ts
49
+ import { test, expect } from '@playwright/test';
50
+
51
+ test('landing hero loads', async ({ page }) => {
52
+ await page.goto('/');
53
+ await expect(page.locator('h1')).toBeVisible();
54
+ });
55
+ ```
56
+
57
+ - Avoid flaky timeout-based assertions
58
+ - Prefer deterministic waits
59
+
60
+ ## Unit Tests
61
+
62
+ - Test utilities, data transforms, and custom hooks
63
+ - For highly visual components, visual regression often carries more signal than brittle markup assertions
64
+ - Visual regression supplements coverage targets; it does not replace them
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: ccp:ai-integration-phase
3
+ description: Generate AI design contract (AI-SPEC.md) for phases that involve building AI systems — framework selection, implementation guidance from official docs, and evaluation strategy
4
+ argument-hint: "[phase number]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Task
12
+ - WebFetch
13
+ - WebSearch
14
+ - AskUserQuestion
15
+ - mcp__context7__*
16
+ ---
17
+ <objective>
18
+ Create an AI design contract (AI-SPEC.md) for a phase involving AI system development.
19
+ Orchestrates gsd-framework-selector → gsd-ai-researcher → gsd-domain-researcher → gsd-eval-planner.
20
+ Flow: Select Framework → Research Docs → Research Domain → Design Eval Strategy → Done
21
+ </objective>
22
+
23
+ <execution_context>
24
+ @~/.claude/pilot/workflows/ai-integration-phase.md
25
+ @~/.claude/pilot/references/ai-frameworks.md
26
+ @~/.claude/pilot/references/ai-evals.md
27
+ </execution_context>
28
+
29
+ <context>
30
+ Phase number: $ARGUMENTS — optional, auto-detects next unplanned phase if omitted.
31
+ </context>
32
+
33
+ <process>
34
+ Execute @~/.claude/pilot/workflows/ai-integration-phase.md end-to-end.
35
+ Preserve all workflow gates.
36
+ </process>
@@ -0,0 +1,33 @@
1
+ ---
2
+ type: prompt
3
+ name: ccp:audit-fix
4
+ description: Autonomous audit-to-fix pipeline — find issues, classify, fix, test, commit
5
+ argument-hint: "--source <audit-uat> [--severity <medium|high|all>] [--max N] [--dry-run]"
6
+ allowed-tools:
7
+ - Read
8
+ - Write
9
+ - Edit
10
+ - Bash
11
+ - Grep
12
+ - Glob
13
+ - Agent
14
+ - AskUserQuestion
15
+ ---
16
+ <objective>
17
+ Run an audit, classify findings as auto-fixable vs manual-only, then autonomously fix
18
+ auto-fixable issues with test verification and atomic commits.
19
+
20
+ Flags:
21
+ - `--max N` — maximum findings to fix (default: 5)
22
+ - `--severity high|medium|all` — minimum severity to process (default: medium)
23
+ - `--dry-run` — classify findings without fixing (shows classification table)
24
+ - `--source <audit>` — which audit to run (default: audit-uat)
25
+ </objective>
26
+
27
+ <execution_context>
28
+ @~/.claude/pilot/workflows/audit-fix.md
29
+ </execution_context>
30
+
31
+ <process>
32
+ Execute the audit-fix workflow from @~/.claude/pilot/workflows/audit-fix.md end-to-end.
33
+ </process>
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: ccp:code-review-fix
3
+ description: Auto-fix issues found by code review in REVIEW.md. Spawns fixer agent, commits each fix atomically, produces REVIEW-FIX.md summary.
4
+ argument-hint: "<phase-number> [--all] [--auto]"
5
+ allowed-tools:
6
+ - Read
7
+ - Bash
8
+ - Glob
9
+ - Grep
10
+ - Write
11
+ - Edit
12
+ - Task
13
+ ---
14
+ <objective>
15
+ Auto-fix issues found by code review. Reads REVIEW.md from the specified phase, spawns gsd-code-fixer agent to apply fixes, and produces REVIEW-FIX.md summary.
16
+
17
+ Arguments:
18
+ - Phase number (required) — which phase's REVIEW.md to fix (e.g., "2" or "02")
19
+ - `--all` (optional) — include Info findings in fix scope (default: Critical + Warning only)
20
+ - `--auto` (optional) — enable fix + re-review iteration loop, capped at 3 iterations
21
+
22
+ Output: {padded_phase}-REVIEW-FIX.md in phase directory + inline summary of fixes applied
23
+ </objective>
24
+
25
+ <execution_context>
26
+ @~/.claude/pilot/workflows/code-review-fix.md
27
+ </execution_context>
28
+
29
+ <context>
30
+ Phase: $ARGUMENTS (first positional argument is phase number)
31
+
32
+ Optional flags parsed from $ARGUMENTS:
33
+ - `--all` — Include Info findings in fix scope. Default behavior fixes Critical + Warning only.
34
+ - `--auto` — Enable fix + re-review iteration loop. After applying fixes, re-run code-review at same depth. If new issues found, iterate. Cap at 3 iterations total. Without this flag, single fix pass only.
35
+
36
+ Context files (CLAUDE.md, REVIEW.md, phase state) are resolved inside the workflow via `gsd-sdk query init.phase-op` and delegated to agent via config blocks.
37
+ </context>
38
+
39
+ <process>
40
+ This command is a thin dispatch layer. It parses arguments and delegates to the workflow.
41
+
42
+ Execute the code-review-fix workflow from @~/.claude/pilot/workflows/code-review-fix.md end-to-end.
43
+
44
+ The workflow (not this command) enforces these gates:
45
+ - Phase validation (before config gate)
46
+ - Config gate check (workflow.code_review)
47
+ - REVIEW.md existence check (error if missing)
48
+ - REVIEW.md status check (skip if clean/skipped)
49
+ - Agent spawning (gsd-code-fixer)
50
+ - Iteration loop (if --auto, capped at 3 iterations)
51
+ - Result presentation (inline summary + next steps)
52
+ </process>
@@ -0,0 +1,32 @@
1
+ ---
2
+ name: ccp:eval-review
3
+ description: Retroactively audit an executed AI phase's evaluation coverage — scores each eval dimension as COVERED/PARTIAL/MISSING and produces an actionable EVAL-REVIEW.md with remediation plan
4
+ argument-hint: "[phase number]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Task
12
+ - AskUserQuestion
13
+ ---
14
+ <objective>
15
+ Conduct a retroactive evaluation coverage audit of a completed AI phase.
16
+ Checks whether the evaluation strategy from AI-SPEC.md was implemented.
17
+ Produces EVAL-REVIEW.md with score, verdict, gaps, and remediation plan.
18
+ </objective>
19
+
20
+ <execution_context>
21
+ @~/.claude/pilot/workflows/eval-review.md
22
+ @~/.claude/pilot/references/ai-evals.md
23
+ </execution_context>
24
+
25
+ <context>
26
+ Phase: $ARGUMENTS — optional, defaults to last completed phase.
27
+ </context>
28
+
29
+ <process>
30
+ Execute @~/.claude/pilot/workflows/eval-review.md end-to-end.
31
+ Preserve all workflow gates.
32
+ </process>
@@ -0,0 +1,22 @@
1
+ ---
2
+ name: ccp:extract-learnings
3
+ description: Extract decisions, lessons, patterns, and surprises from completed phase artifacts
4
+ argument-hint: <phase-number>
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Grep
10
+ - Glob
11
+ - Agent
12
+ type: prompt
13
+ ---
14
+ <objective>
15
+ Extract structured learnings from completed phase artifacts (PLAN.md, SUMMARY.md, VERIFICATION.md, UAT.md, STATE.md) into a LEARNINGS.md file that captures decisions, lessons learned, patterns discovered, and surprises encountered.
16
+ </objective>
17
+
18
+ <execution_context>
19
+ @~/.claude/pilot/workflows/extract_learnings.md
20
+ </execution_context>
21
+
22
+ Execute the extract-learnings workflow from @~/.claude/pilot/workflows/extract_learnings.md end-to-end.