ccsetup 1.1.1 → 1.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 (88) hide show
  1. package/README.md +96 -363
  2. package/bin/create-project.js +1616 -60
  3. package/bin/lib/claudeInterface.js +209 -0
  4. package/bin/lib/contextGenerator.js +287 -0
  5. package/bin/lib/scanner/index.js +28 -0
  6. package/bin/scan.js +367 -0
  7. package/lib/aiAgentSelector.js +155 -0
  8. package/lib/aiMergeHelper.js +112 -0
  9. package/lib/contextGenerator.js +574 -0
  10. package/lib/contextMerger.js +812 -0
  11. package/lib/progressReporter.js +88 -0
  12. package/lib/scanConfig.js +200 -0
  13. package/lib/scanner/fileAnalyzer.js +605 -0
  14. package/lib/scanner/index.js +164 -0
  15. package/lib/scanner/patterns.js +277 -0
  16. package/lib/scanner/projectDetector.js +147 -0
  17. package/lib/templates/README.md +176 -0
  18. package/lib/templates/catalog.js +230 -0
  19. package/lib/templates/filter.js +257 -0
  20. package/lib/templates/index.js +45 -0
  21. package/lib/templates/metadata/agents.json +413 -0
  22. package/lib/templates/metadata-extractor.js +329 -0
  23. package/lib/templates/search.js +356 -0
  24. package/package.json +11 -4
  25. package/template/{agents → .claude/agents}/checker.md +29 -0
  26. package/template/.claude/settings.json +15 -0
  27. package/template/.claude/skills/prd/SKILL.md +343 -0
  28. package/template/.claude/skills/ralph/SKILL.md +339 -0
  29. package/template/CLAUDE.md +39 -21
  30. package/template/CONTRIBUTING.md +37 -0
  31. package/template/agents/README.md +15 -171
  32. package/template/docs/ROADMAP.md +0 -36
  33. package/template/docs/agent-orchestration.md +24 -141
  34. package/template/hooks/workflow-selector/index.js +398 -0
  35. package/template/scripts/ralph/CLAUDE.md +174 -0
  36. package/template/scripts/ralph/ralph.sh +127 -0
  37. package/template/tickets/ticket-list.md +17 -68
  38. package/template/agents/ai-engineer.md +0 -31
  39. package/template/agents/api-documenter.md +0 -31
  40. package/template/agents/architect-review.md +0 -42
  41. package/template/agents/backend-architect.md +0 -29
  42. package/template/agents/business-analyst.md +0 -34
  43. package/template/agents/c-pro.md +0 -34
  44. package/template/agents/cloud-architect.md +0 -31
  45. package/template/agents/code-reviewer.md +0 -28
  46. package/template/agents/content-marketer.md +0 -34
  47. package/template/agents/context-manager.md +0 -63
  48. package/template/agents/cpp-pro.md +0 -37
  49. package/template/agents/customer-support.md +0 -34
  50. package/template/agents/data-engineer.md +0 -31
  51. package/template/agents/data-scientist.md +0 -28
  52. package/template/agents/database-admin.md +0 -31
  53. package/template/agents/database-optimizer.md +0 -31
  54. package/template/agents/debugger.md +0 -29
  55. package/template/agents/deployment-engineer.md +0 -31
  56. package/template/agents/devops-troubleshooter.md +0 -31
  57. package/template/agents/dx-optimizer.md +0 -62
  58. package/template/agents/error-detective.md +0 -31
  59. package/template/agents/frontend-developer.md +0 -30
  60. package/template/agents/golang-pro.md +0 -31
  61. package/template/agents/graphql-architect.md +0 -31
  62. package/template/agents/incident-responder.md +0 -73
  63. package/template/agents/javascript-pro.md +0 -34
  64. package/template/agents/legacy-modernizer.md +0 -31
  65. package/template/agents/ml-engineer.md +0 -31
  66. package/template/agents/mlops-engineer.md +0 -56
  67. package/template/agents/mobile-developer.md +0 -31
  68. package/template/agents/network-engineer.md +0 -31
  69. package/template/agents/payment-integration.md +0 -31
  70. package/template/agents/performance-engineer.md +0 -31
  71. package/template/agents/prompt-engineer.md +0 -58
  72. package/template/agents/python-pro.md +0 -31
  73. package/template/agents/quant-analyst.md +0 -31
  74. package/template/agents/risk-manager.md +0 -40
  75. package/template/agents/rust-pro.md +0 -34
  76. package/template/agents/sales-automator.md +0 -34
  77. package/template/agents/search-specialist.md +0 -58
  78. package/template/agents/security-auditor.md +0 -31
  79. package/template/agents/sql-pro.md +0 -34
  80. package/template/agents/terraform-specialist.md +0 -34
  81. package/template/agents/test-automator.md +0 -31
  82. /package/template/{agents → .claude/agents}/backend.md +0 -0
  83. /package/template/{agents → .claude/agents}/blockchain.md +0 -0
  84. /package/template/{agents → .claude/agents}/coder.md +0 -0
  85. /package/template/{agents → .claude/agents}/frontend.md +0 -0
  86. /package/template/{agents → .claude/agents}/planner.md +0 -0
  87. /package/template/{agents → .claude/agents}/researcher.md +0 -0
  88. /package/template/{agents → .claude/agents}/shadcn.md +0 -0
@@ -0,0 +1,339 @@
1
+ ---
2
+ name: ralph
3
+ description: "Convert PRDs to prd.json format for the Ralph autonomous agent system. Use when you have an existing PRD and need to convert it to Ralph's JSON format. Triggers on: convert this prd, turn this into ralph format, create prd.json from this, ralph json."
4
+ ---
5
+
6
+ # Ralph PRD Converter
7
+
8
+ Converts existing PRDs to the prd.json format that Ralph uses for autonomous execution. Scans the codebase to populate quality checks, file hints, and story notes automatically.
9
+
10
+ ---
11
+
12
+ ## The Job
13
+
14
+ 1. **Scan the codebase** to detect quality commands and relevant file paths
15
+ 2. Read the PRD (markdown file or text) — check for a Tech Context section first
16
+ 3. Convert to `scripts/ralph/prd.json` with codebase-informed stories
17
+ 4. Initialize `scripts/ralph/progress.txt` if it doesn't exist
18
+
19
+ **Important:** Do NOT start implementing. Just create the prd.json.
20
+
21
+ ---
22
+
23
+ ## Step 1: Codebase Reconnaissance
24
+
25
+ Before converting, silently scan the project using Claude Code tools.
26
+
27
+ ### If PRD has a Tech Context section
28
+ The improved `/prd` skill generates a Tech Context section with stack, quality gates, and relevant file paths. If present, use it directly — no need to re-scan.
29
+
30
+ ### If PRD has no Tech Context section
31
+ Scan manually:
32
+
33
+ **Detect quality commands** — Read `package.json` scripts, config files, Makefiles:
34
+ - Look for: `typecheck`, `tsc`, `check-types` → record the exact script (e.g., `npm run typecheck`)
35
+ - Look for: `lint`, `eslint`, `biome check` → record exact script (e.g., `npm run lint`)
36
+ - Look for: `test`, `vitest`, `jest`, `pytest` → record exact script (e.g., `npm test`)
37
+ - Look for: `build` → record exact script (e.g., `npm run build`)
38
+
39
+ **Scan relevant files** — Use Glob to find files related to each user story:
40
+ - Database: `**/schema.prisma`, `**/models/**`, `**/migrations/**`
41
+ - API: `**/api/**`, `**/routes/**`, `**/app/**/route.*`
42
+ - Components: `**/components/**`
43
+ - Utilities: `**/hooks/**`, `**/utils/**`, `**/lib/**`
44
+
45
+ These become `notes` on each story — giving Ralph file-level hints for where to work.
46
+
47
+ ---
48
+
49
+ ## Step 2: Output Format
50
+
51
+ ```json
52
+ {
53
+ "project": "[Project Name]",
54
+ "branchName": "ralph/[feature-name-kebab-case]",
55
+ "description": "[Feature description from PRD title/intro]",
56
+ "qualityChecks": {
57
+ "typecheck": "npm run typecheck",
58
+ "lint": "npm run lint",
59
+ "test": "npm test",
60
+ "build": "npm run build"
61
+ },
62
+ "userStories": [
63
+ {
64
+ "id": "US-001",
65
+ "title": "[Story title]",
66
+ "description": "As a [user], I want [feature] so that [benefit]",
67
+ "acceptanceCriteria": [
68
+ "Criterion 1",
69
+ "Criterion 2",
70
+ "Typecheck passes",
71
+ "Lint passes"
72
+ ],
73
+ "priority": 1,
74
+ "passes": false,
75
+ "notes": "Relevant files: prisma/schema.prisma, src/app/api/tasks/route.ts"
76
+ }
77
+ ]
78
+ }
79
+ ```
80
+
81
+ ### The `qualityChecks` field
82
+
83
+ This is **new and critical**. It tells Ralph the exact commands to run, so each iteration doesn't have to guess. Only include checks that actually exist in the project:
84
+
85
+ ```json
86
+ "qualityChecks": {
87
+ "typecheck": "npm run typecheck",
88
+ "lint": "npm run lint"
89
+ }
90
+ ```
91
+
92
+ If a project has no typecheck, don't include it. If it uses `make check`, use that. Be exact.
93
+
94
+ ### The `notes` field
95
+
96
+ Pre-populate with **file hints** from your codebase scan — relevant files the story will likely touch or extend:
97
+
98
+ ```
99
+ "notes": "Relevant files: prisma/schema.prisma (Task model), src/components/TaskCard.tsx (extend with badge)"
100
+ ```
101
+
102
+ This gives each Ralph iteration a head start instead of scanning the codebase from scratch.
103
+
104
+ ---
105
+
106
+ ## Story Size: The Number One Rule
107
+
108
+ **Each story must be completable in ONE Ralph iteration (one context window).**
109
+
110
+ Ralph spawns a fresh instance per iteration with no memory of previous work. If a story is too big, the LLM runs out of context before finishing and produces broken code.
111
+
112
+ ### Right-sized stories:
113
+ - Add a database column and migration
114
+ - Add a UI component to an existing page
115
+ - Update a server action with new logic
116
+ - Add a filter dropdown to a list
117
+
118
+ ### Too big (split these):
119
+ - "Build the entire dashboard" — Split into: schema, queries, UI components, filters
120
+ - "Add authentication" — Split into: schema, middleware, login UI, session handling
121
+ - "Refactor the API" — Split into one story per endpoint or pattern
122
+
123
+ **Rule of thumb:** If you cannot describe the change in 2-3 sentences, it is too big.
124
+
125
+ ---
126
+
127
+ ## Story Ordering: Dependencies First
128
+
129
+ Stories execute in priority order. Earlier stories must not depend on later ones.
130
+
131
+ **Correct order:**
132
+ 1. Schema/database changes (migrations)
133
+ 2. Server actions / backend logic
134
+ 3. UI components that use the backend
135
+ 4. Dashboard/summary views that aggregate data
136
+
137
+ **Wrong order:**
138
+ 1. UI component (depends on schema that does not exist yet)
139
+ 2. Schema change
140
+
141
+ ---
142
+
143
+ ## Acceptance Criteria: Must Be Verifiable
144
+
145
+ Each criterion must be something Ralph can CHECK, not something vague.
146
+
147
+ ### Good criteria (verifiable):
148
+ - "Add `status` column to tasks table with default 'pending'"
149
+ - "Filter dropdown has options: All, Active, Completed"
150
+ - "Clicking delete shows confirmation dialog"
151
+
152
+ ### Bad criteria (vague):
153
+ - "Works correctly"
154
+ - "User can do X easily"
155
+ - "Good UX"
156
+ - "Handles edge cases"
157
+
158
+ ### Quality criteria — use what the project actually has
159
+
160
+ Append the quality checks detected in Step 1. Examples:
161
+
162
+ - Project has typecheck + lint → append `"Typecheck passes"`, `"Lint passes"`
163
+ - Project has only tests → append `"Tests pass"`
164
+ - Project has a build step → append `"Build passes"`
165
+
166
+ Do **not** hardcode "Typecheck passes" if the project has no typecheck.
167
+
168
+ ### For stories that change UI, also include:
169
+ ```
170
+ "Verify in browser using dev-browser skill"
171
+ ```
172
+
173
+ ---
174
+
175
+ ## Conversion Rules
176
+
177
+ 1. **Each user story becomes one JSON entry**
178
+ 2. **IDs**: Sequential (US-001, US-002, etc.)
179
+ 3. **Priority**: Based on dependency order, then document order
180
+ 4. **All stories**: `passes: false`
181
+ 5. **notes**: Pre-populate with relevant file paths from codebase scan
182
+ 6. **branchName**: Derive from feature name, kebab-case, prefixed with `ralph/`
183
+ 7. **qualityChecks**: Populated from detected project commands (Step 1)
184
+ 8. **Quality criteria on stories**: Match what `qualityChecks` contains
185
+
186
+ ---
187
+
188
+ ## Splitting Large PRDs
189
+
190
+ If a PRD has big features, split them:
191
+
192
+ **Original:**
193
+ > "Add user notification system"
194
+
195
+ **Split into:**
196
+ 1. US-001: Add notifications table to database
197
+ 2. US-002: Create notification service for sending notifications
198
+ 3. US-003: Add notification bell icon to header
199
+ 4. US-004: Create notification dropdown panel
200
+ 5. US-005: Add mark-as-read functionality
201
+ 6. US-006: Add notification preferences page
202
+
203
+ Each is one focused change that can be completed and verified independently.
204
+
205
+ ---
206
+
207
+ ## Example
208
+
209
+ **Input PRD with Tech Context:**
210
+ ```markdown
211
+ # PRD: Task Status Feature
212
+
213
+ ## Tech Context
214
+ - **Stack:** Next.js 14 (App Router) + TypeScript + Tailwind CSS
215
+ - **DB:** Prisma with PostgreSQL (`prisma/schema.prisma`)
216
+ - **UI:** shadcn/ui in `src/components/ui/`
217
+ - **Quality gates:** Typecheck (`tsc --noEmit`), Lint (`eslint`), Tests (`vitest`)
218
+ - **Relevant code:**
219
+ - Task model: `prisma/schema.prisma`
220
+ - Task list: `src/components/TaskList.tsx`
221
+ - Task card: `src/components/TaskCard.tsx`
222
+ - Badge: `src/components/ui/Badge.tsx`
223
+ - API: `src/app/api/tasks/`
224
+
225
+ ## User Stories
226
+ ### US-001: Add status field to database ...
227
+ ### US-002: Display status badge on task cards ...
228
+ ### US-003: Add status toggle ...
229
+ ### US-004: Filter tasks by status ...
230
+ ```
231
+
232
+ **Output prd.json:**
233
+ ```json
234
+ {
235
+ "project": "TaskApp",
236
+ "branchName": "ralph/task-status",
237
+ "description": "Task Status Feature - Track task progress with status indicators",
238
+ "qualityChecks": {
239
+ "typecheck": "npx tsc --noEmit",
240
+ "lint": "npm run lint",
241
+ "test": "npx vitest run"
242
+ },
243
+ "userStories": [
244
+ {
245
+ "id": "US-001",
246
+ "title": "Add status field to tasks table",
247
+ "description": "As a developer, I need to store task status in the database.",
248
+ "acceptanceCriteria": [
249
+ "Add status column: 'pending' | 'in_progress' | 'done' (default 'pending')",
250
+ "Generate and run migration successfully",
251
+ "Typecheck passes",
252
+ "Lint passes"
253
+ ],
254
+ "priority": 1,
255
+ "passes": false,
256
+ "notes": "Relevant files: prisma/schema.prisma (Task model)"
257
+ },
258
+ {
259
+ "id": "US-002",
260
+ "title": "Display status badge on task cards",
261
+ "description": "As a user, I want to see task status at a glance.",
262
+ "acceptanceCriteria": [
263
+ "Each task card shows colored status badge",
264
+ "Badge colors: gray=pending, blue=in_progress, green=done",
265
+ "Typecheck passes",
266
+ "Lint passes",
267
+ "Verify in browser using dev-browser skill"
268
+ ],
269
+ "priority": 2,
270
+ "passes": false,
271
+ "notes": "Relevant files: src/components/TaskCard.tsx (extend), src/components/ui/Badge.tsx (reuse with color variants)"
272
+ },
273
+ {
274
+ "id": "US-003",
275
+ "title": "Add status toggle to task list rows",
276
+ "description": "As a user, I want to change task status directly from the list.",
277
+ "acceptanceCriteria": [
278
+ "Each row has status dropdown or toggle",
279
+ "Changing status saves immediately via PATCH /api/tasks/[id]",
280
+ "UI updates without page refresh",
281
+ "Typecheck passes",
282
+ "Lint passes",
283
+ "Verify in browser using dev-browser skill"
284
+ ],
285
+ "priority": 3,
286
+ "passes": false,
287
+ "notes": "Relevant files: src/components/TaskList.tsx, src/app/api/tasks/[id]/route.ts"
288
+ },
289
+ {
290
+ "id": "US-004",
291
+ "title": "Filter tasks by status",
292
+ "description": "As a user, I want to filter the list to see only certain statuses.",
293
+ "acceptanceCriteria": [
294
+ "Filter dropdown: All | Pending | In Progress | Done",
295
+ "Filter persists in URL params",
296
+ "Typecheck passes",
297
+ "Lint passes",
298
+ "Tests pass",
299
+ "Verify in browser using dev-browser skill"
300
+ ],
301
+ "priority": 4,
302
+ "passes": false,
303
+ "notes": "Relevant files: src/components/TaskList.tsx (add filter dropdown)"
304
+ }
305
+ ]
306
+ }
307
+ ```
308
+
309
+ ---
310
+
311
+ ## Archiving Previous Runs
312
+
313
+ **Before writing a new prd.json, check if there is an existing one from a different feature:**
314
+
315
+ 1. Read the current `prd.json` if it exists
316
+ 2. Check if `branchName` differs from the new feature's branch name
317
+ 3. If different AND `progress.txt` has content beyond the header:
318
+ - Create archive folder: `archive/YYYY-MM-DD-feature-name/`
319
+ - Copy current `prd.json` and `progress.txt` to archive
320
+ - Reset `progress.txt` with fresh header
321
+
322
+ **The ralph.sh script handles this automatically** when you run it, but if you are manually updating prd.json between runs, archive first.
323
+
324
+ ---
325
+
326
+ ## Checklist Before Saving
327
+
328
+ Before writing prd.json, verify:
329
+
330
+ - [ ] Ran codebase reconnaissance or read PRD's Tech Context (Step 1)
331
+ - [ ] `qualityChecks` populated with exact commands from the project
332
+ - [ ] **Previous run archived** (if prd.json exists with different branchName, archive it first)
333
+ - [ ] Each story is completable in one iteration (small enough)
334
+ - [ ] Stories are ordered by dependency (schema → backend → UI)
335
+ - [ ] Story quality criteria match what `qualityChecks` contains (not hardcoded)
336
+ - [ ] UI stories have "Verify in browser using dev-browser skill" as criterion
337
+ - [ ] Acceptance criteria are verifiable (not vague)
338
+ - [ ] Story `notes` pre-populated with relevant file paths
339
+ - [ ] No story depends on a later story
@@ -15,9 +15,12 @@
15
15
  ```
16
16
  .
17
17
  ├── CLAUDE.md # This file - project instructions for Claude
18
- ├── .claude/ # Claude Code configuration (auto-generated)
19
- └── agents/ # Project-specific agent overrides
20
- ├── agents/ # Custom agents for specialized tasks
18
+ ├── .claude/
19
+ ├── agents/ # 8 core agents (backend, blockchain, checker, coder, frontend, planner, researcher, shadcn)
20
+ │ └── skills/ # /prd and /ralph slash commands
21
+ ├── agents/ # Documentation only — see .claude/agents/ for active agents
22
+ ├── scripts/
23
+ │ └── ralph/ # Autonomous agent loop (ralph.sh + agent instructions)
21
24
  ├── docs/ # Project documentation
22
25
  ├── plans/ # Project plans and architectural documents
23
26
  └── tickets/ # Task tickets and issues
@@ -58,24 +61,44 @@
58
61
 
59
62
  ## Agents
60
63
 
61
- See @agents/README.md for available agents and their purposes
64
+ 8 core agents are pre-installed in `.claude/agents/`. See @agents/README.md for the full list and instructions for adding custom agents.
65
+
66
+ ## Skills (Slash Commands)
67
+
68
+ - **/prd** — Scans the codebase, then generates a structured PRD with real file paths and auto-detected quality criteria. Saves to `tasks/prd-[feature-name].md`.
69
+ - **/ralph** — Converts a PRD into `scripts/ralph/prd.json` for autonomous execution with quality checks and file hints per story.
70
+
71
+ ## Ralph — Autonomous Agent Loop
72
+
73
+ Ralph implements user stories from a PRD one at a time in a loop, with subagent verification after each story.
74
+
75
+ ```bash
76
+ ./scripts/ralph/ralph.sh # Default: 10 iterations with amp
77
+ ./scripts/ralph/ralph.sh --tool claude # Use Claude Code
78
+ ./scripts/ralph/ralph.sh --tool claude --model opus 20 # Specify model + iterations
79
+ ```
80
+
81
+ Typical workflow: `/prd` → `/ralph` → `./scripts/ralph/ralph.sh`
62
82
 
63
83
  ## Agent Orchestration
64
84
 
65
- After adding the agents you want to in `./claude/agents` folder, setup the workflow for Claude code to follow
85
+ See @docs/agent-orchestration.md for detailed workflow patterns on how to chain agents effectively.
86
+
87
+ ## Workflow Selector Hook (Optional)
88
+
89
+ An optional hook that suggests agent workflows based on your prompt. Claude will ask before applying.
90
+
91
+ To activate after installation:
92
+ ```bash
93
+ export CCSETUP_WORKFLOW=1
94
+ ```
95
+
96
+ When unset, the hook is inactive and Claude uses its default behavior. Install the hook with `npx ccsetup --install-hooks`.
66
97
 
67
98
  ## Tickets
68
99
 
69
100
  See @tickets/README.md for ticket format and management approach
70
101
 
71
- ### Ticket Management
72
- - **Ticket List**: Maintain @tickets/ticket-list.md as a centralized index of all tickets
73
- - **Update ticket-list.md** whenever you:
74
- - Create a new ticket (add to appropriate priority section)
75
- - Change ticket status (update emoji and move if completed)
76
- - Complete a ticket (move to completed section with date)
77
- - **Status Emojis**: 🔴 Todo | 🟡 In Progress | 🟢 Done | 🔵 Blocked | ⚫ Cancelled
78
-
79
102
  ## Plans
80
103
 
81
104
  See @plans/README.md for planning documents and architectural decisions
@@ -88,14 +111,9 @@ See @plans/README.md for planning documents and architectural decisions
88
111
 
89
112
  ## Important Instructions
90
113
 
91
- Before starting any task:
92
-
93
- 1. **Confirm understanding**: Always confirm you understand the request and outline your plan before proceeding
94
- 2. **Ask clarifying questions**: Never make assumptions - ask questions when requirements are unclear
95
- 3. **Create planning documents**: Before implementing any code or features, create a markdown file documenting the approach
96
- 4. **Use plans directory**: When discussing ideas or next steps, create timestamped files in the plans directory (e.g., `plans/next-steps-YYYY-MM-DD-HH-MM-SS.md`) to maintain a record of decisions
97
- 5. **No code comments**: Never add comments to any code you write - code should be self-documenting
98
- 6. **Maintain ticket list**: Always update @tickets/ticket-list.md when creating, updating, or completing tickets to maintain a clear project overview
114
+ - Ask clarifying questions when requirements are unclear
115
+ - Self-documenting code — no code comments
116
+ - For complex features, consider creating a plan document in `/plans` before implementing
99
117
 
100
118
  ## Additional Notes
101
119
 
@@ -0,0 +1,37 @@
1
+ # Contributing
2
+
3
+ ## Development Workflow
4
+
5
+ 1. **Task Planning**
6
+ - Study the existing codebase and understand the current state
7
+ - Use the **planner** agent to break down complex problems and create implementation roadmaps
8
+ - Create a plan document in the `/plans` directory for complex features
9
+ - Update `ROADMAP.md` to include the new task under Development
10
+ - Priority tasks should be inserted after the last completed task
11
+
12
+ 2. **Ticket Creation**
13
+ - Study the existing codebase and understand the current state
14
+ - Create a new ticket file in the `/tickets` directory
15
+ - Name format: `TICKET-XXX-description.md` (e.g., `TICKET-001-user-auth.md`)
16
+ - Include high-level specifications, relevant files, acceptance criteria, and implementation steps
17
+ - Refer to last completed ticket in the `/tickets` directory for examples
18
+ - Note that completed tickets show checked boxes and summary of changes
19
+ - For new tickets, use empty checkboxes and no summary section
20
+
21
+ 3. **Task Implementation**
22
+ - Use the **coder** agent for implementing features, fixing bugs, and optimizing code
23
+ - Follow the specifications in the ticket file
24
+ - Implement features and functionality following project conventions
25
+ - Update step progress within the ticket file after each step
26
+ - Stop after completing each step and wait for further instructions
27
+
28
+ 4. **Quality Assurance**
29
+ - Use the **checker** agent for testing, security analysis, and code review
30
+ - Verify all acceptance criteria are met
31
+ - Run tests and ensure code quality standards
32
+ - Document any issues found and their resolutions
33
+
34
+ 5. **Roadmap Updates**
35
+ - Mark completed tasks with ✅ in the roadmap
36
+ - Add reference to the ticket file (e.g., `See: /tickets/TICKET-001-user-auth.md`)
37
+ - Update related plan documents if applicable
@@ -1,189 +1,33 @@
1
1
  # Agents Directory
2
2
 
3
- This directory contains specialized AI agents for Claude Code, designed to enhance development workflows with domain-specific expertise.
3
+ This directory is for documentation only. All active agents live in `.claude/agents/`.
4
4
 
5
- ## Credits
5
+ ## Available Core Agents
6
6
 
7
- This collection includes:
8
- - **8 original agents** created for ccsetup
9
- - **44 specialized agents** from [wshobson/agents](https://github.com/wshobson/agents) - an amazing collection of Claude Code subagents
7
+ These 8 agents are pre-installed in `.claude/agents/`:
10
8
 
11
- ## Available Agents (52 total)
9
+ - **backend** - Backend development specialist for API design, database architecture, and server-side optimization
10
+ - **blockchain** - Blockchain and Web3 expert for smart contracts, DeFi protocols, and blockchain architecture
11
+ - **checker** - Quality assurance and code review specialist for testing, security analysis, and validation
12
+ - **coder** - Expert software developer for implementing features, fixing bugs, and optimizing code
13
+ - **frontend** - Frontend development specialist for UI/UX, responsive design, and modern web frameworks
14
+ - **planner** - Strategic planning specialist for breaking down complex problems and creating implementation roadmaps
15
+ - **researcher** - Research specialist for both online sources and local codebases, gathering comprehensive information
16
+ - **shadcn** - shadcn/ui component library expert for building beautiful, accessible React interfaces
12
17
 
13
- ### Original ccsetup Agents
14
- These 8 agents were created specifically for the ccsetup boilerplate:
18
+ ## Adding Custom Agents
15
19
 
16
- - **[backend](backend.md)** - Backend development specialist for API design, database architecture, and server-side optimization
17
- - **[blockchain](blockchain.md)** - Blockchain and Web3 expert for smart contracts, DeFi protocols, and blockchain architecture
18
- - **[checker](checker.md)** - Quality assurance and code review specialist for testing, security analysis, and validation
19
- - **[coder](coder.md)** - Expert software developer for implementing features, fixing bugs, and optimizing code
20
- - **[frontend](frontend.md)** - Frontend development specialist for UI/UX, responsive design, and modern web frameworks
21
- - **[planner](planner.md)** - Strategic planning specialist for breaking down complex problems and creating implementation roadmaps
22
- - **[researcher](researcher.md)** - Research specialist for both online sources and local codebases, gathering comprehensive information
23
- - **[shadcn](shadcn.md)** - shadcn/ui component library expert for building beautiful, accessible React interfaces
20
+ To add a custom agent, create a `.md` file in `.claude/agents/` with this structure:
24
21
 
25
- ### wshobson/agents Collection (44 agents)
26
-
27
- The following 44 specialized agents are from the excellent [wshobson/agents](https://github.com/wshobson/agents) repository:
28
-
29
- #### Development & Architecture
30
- - **[backend-architect](backend-architect.md)** - Design RESTful APIs, microservice boundaries, and database schemas
31
- - **[frontend-developer](frontend-developer.md)** - Build React components, implement responsive layouts, and handle client-side state management
32
- - **[mobile-developer](mobile-developer.md)** - Develop React Native or Flutter apps with native integrations
33
- - **[graphql-architect](graphql-architect.md)** - Design GraphQL schemas, resolvers, and federation
34
- - **[architect-review](architect-review.md)** - Reviews code changes for architectural consistency and patterns
35
-
36
- #### Language Specialists
37
- - **[python-pro](python-pro.md)** - Write idiomatic Python code with advanced features and optimizations
38
- - **[golang-pro](golang-pro.md)** - Write idiomatic Go code with goroutines, channels, and interfaces
39
- - **[rust-pro](rust-pro.md)** - Write idiomatic Rust with ownership patterns, lifetimes, and trait implementations
40
- - **[c-pro](c-pro.md)** - Write efficient C code with proper memory management and system calls
41
- - **[cpp-pro](cpp-pro.md)** - Write idiomatic C++ code with modern features, RAII, smart pointers, and STL algorithms
42
- - **[javascript-pro](javascript-pro.md)** - Master modern JavaScript with ES6+, async patterns, and Node.js APIs
43
- - **[sql-pro](sql-pro.md)** - Write complex SQL queries, optimize execution plans, and design normalized schemas
44
-
45
- #### Infrastructure & Operations
46
- - **[devops-troubleshooter](devops-troubleshooter.md)** - Debug production issues, analyze logs, and fix deployment failures
47
- - **[deployment-engineer](deployment-engineer.md)** - Configure CI/CD pipelines, Docker containers, and cloud deployments
48
- - **[cloud-architect](cloud-architect.md)** - Design AWS/Azure/GCP infrastructure and optimize cloud costs
49
- - **[database-optimizer](database-optimizer.md)** - Optimize SQL queries, design efficient indexes, and handle database migrations
50
- - **[database-admin](database-admin.md)** - Manage database operations, backups, replication, and monitoring
51
- - **[terraform-specialist](terraform-specialist.md)** - Write advanced Terraform modules, manage state files, and implement IaC best practices
52
- - **[incident-responder](incident-responder.md)** - Handles production incidents with urgency and precision
53
- - **[network-engineer](network-engineer.md)** - Debug network connectivity, configure load balancers, and analyze traffic patterns
54
- - **[dx-optimizer](dx-optimizer.md)** - Developer Experience specialist that improves tooling, setup, and workflows
55
-
56
- #### Quality & Security
57
- - **[code-reviewer](code-reviewer.md)** - Expert code review for quality, security, and maintainability
58
- - **[security-auditor](security-auditor.md)** - Review code for vulnerabilities and ensure OWASP compliance
59
- - **[test-automator](test-automator.md)** - Create comprehensive test suites with unit, integration, and e2e tests
60
- - **[performance-engineer](performance-engineer.md)** - Profile applications, optimize bottlenecks, and implement caching strategies
61
- - **[debugger](debugger.md)** - Debugging specialist for errors, test failures, and unexpected behavior
62
- - **[error-detective](error-detective.md)** - Search logs and codebases for error patterns, stack traces, and anomalies
63
- - **[search-specialist](search-specialist.md)** - Expert web researcher using advanced search techniques and synthesis
64
-
65
- #### Data & AI
66
- - **[data-scientist](data-scientist.md)** - Data analysis expert for SQL queries, BigQuery operations, and data insights
67
- - **[data-engineer](data-engineer.md)** - Build ETL pipelines, data warehouses, and streaming architectures
68
- - **[ai-engineer](ai-engineer.md)** - Build LLM applications, RAG systems, and prompt pipelines
69
- - **[ml-engineer](ml-engineer.md)** - Implement ML pipelines, model serving, and feature engineering
70
- - **[mlops-engineer](mlops-engineer.md)** - Build ML pipelines, experiment tracking, and model registries
71
- - **[prompt-engineer](prompt-engineer.md)** - Optimizes prompts for LLMs and AI systems
72
-
73
- #### Specialized Domains
74
- - **[api-documenter](api-documenter.md)** - Create OpenAPI/Swagger specs and write developer documentation
75
- - **[payment-integration](payment-integration.md)** - Integrate Stripe, PayPal, and payment processors
76
- - **[quant-analyst](quant-analyst.md)** - Build financial models, backtest trading strategies, and analyze market data
77
- - **[risk-manager](risk-manager.md)** - Monitor portfolio risk, R-multiples, and position limits
78
- - **[legacy-modernizer](legacy-modernizer.md)** - Refactor legacy codebases and implement gradual modernization
79
- - **[context-manager](context-manager.md)** - Manages context across multiple agents and long-running tasks
80
-
81
- #### Business & Marketing
82
- - **[business-analyst](business-analyst.md)** - Analyze metrics, create reports, and track KPIs
83
- - **[content-marketer](content-marketer.md)** - Write blog posts, social media content, and email newsletters
84
- - **[sales-automator](sales-automator.md)** - Draft cold emails, follow-ups, and proposal templates
85
- - **[customer-support](customer-support.md)** - Handle support tickets, FAQ responses, and customer emails
86
-
87
- ## Usage
88
-
89
- ### Installation
90
-
91
- When using ccsetup, agents can be:
92
- 1. **Selected interactively** during setup (curated list of 8 agents)
93
- 2. **Copied in browse mode** (all 52 agents copied to /agents folder)
94
- 3. **Included automatically** with --all-agents flag
95
-
96
- To activate agents, copy them to `~/.claude/agents/`:
97
- ```bash
98
- # Example: Activate the code-reviewer agent
99
- cp agents/code-reviewer.md ~/.claude/agents/
100
-
101
- # Activate multiple agents
102
- cp agents/{python-pro,test-automator,security-auditor}.md ~/.claude/agents/
103
- ```
104
-
105
- ### Invoking Agents
106
-
107
- #### Automatic Invocation
108
- Claude Code will automatically delegate to the appropriate agent based on the task context.
109
-
110
- #### Explicit Invocation
111
- Mention the agent by name in your request:
112
- ```
113
- "Use the code-reviewer to check my recent changes"
114
- "Have the security-auditor scan for vulnerabilities"
115
- "Get the performance-engineer to optimize this bottleneck"
116
- ```
117
-
118
- ## Agent Format
119
-
120
- Each agent follows this structure:
121
22
  ```markdown
122
23
  ---
123
24
  name: agent-name
124
25
  description: When this agent should be invoked
125
- tools: tool1, tool2 # Optional - defaults to all tools
126
26
  ---
127
27
 
128
28
  System prompt defining the agent's role and capabilities
129
29
  ```
130
30
 
131
- ## Common Agent Workflows
132
-
133
- ### Feature Development
134
- ```
135
- planner → coder → checker
136
- ```
137
-
138
- ### API Development
139
- ```
140
- backend-architect → backend → api-documenter → checker
141
- ```
142
-
143
- ### Frontend Development
144
- ```
145
- frontend → shadcn → checker
146
- ```
147
-
148
- ### Full Stack Development
149
- ```
150
- planner → backend-architect → backend → frontend → checker
151
- ```
152
-
153
- ### Bug Fixing
154
- ```
155
- researcher → debugger → coder → checker
156
- ```
157
-
158
- ### Performance Optimization
159
- ```
160
- performance-engineer → database-optimizer → coder → checker
161
- ```
162
-
163
- ### Security Review
164
- ```
165
- security-auditor → code-reviewer → coder (for fixes) → checker
166
- ```
167
-
168
- ## Tips for Using Agents
169
-
170
- 1. **Let Claude Code choose** - Often Claude will automatically select the right agent
171
- 2. **Be specific** - The more specific your request, the better the agent selection
172
- 3. **Combine agents** - Many tasks benefit from multiple agents working together
173
- 4. **Review agent output** - Agents provide specialized expertise but should be reviewed
174
- 5. **Iterate** - Use agent feedback to refine your approach
175
-
176
- ## Contributing
177
-
178
- To add a new agent:
179
- 1. Create a new `.md` file in this directory
180
- 2. Follow the agent format (frontmatter + system prompt)
181
- 3. Use lowercase, hyphen-separated names
182
- 4. Write clear descriptions for when the agent should be used
183
-
184
- ## Learn More
31
+ ## Agent Workflows
185
32
 
186
- - [ccsetup Documentation](https://github.com/MrMarciaOng/ccsetup)
187
- - [wshobson/agents Repository](https://github.com/wshobson/agents)
188
- - [Claude Code Documentation](https://docs.anthropic.com/en/docs/claude-code)
189
- - [Subagents Documentation](https://docs.anthropic.com/en/docs/claude-code/sub-agents)
33
+ See `docs/agent-orchestration.md` for recommended multi-agent workflows.