ccsetup 1.1.1 → 1.2.1

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 (86) hide show
  1. package/README.md +144 -342
  2. package/bin/create-project.js +1246 -90
  3. package/bin/lib/claudeInterface.js +209 -0
  4. package/lib/aiAgentSelector.js +155 -0
  5. package/lib/templates/README.md +176 -0
  6. package/lib/templates/catalog.js +230 -0
  7. package/lib/templates/filter.js +257 -0
  8. package/lib/templates/index.js +45 -0
  9. package/lib/templates/metadata/agents.json +413 -0
  10. package/lib/templates/metadata-extractor.js +329 -0
  11. package/lib/templates/search.js +356 -0
  12. package/package.json +13 -5
  13. package/template/{agents → .claude/agents}/checker.md +29 -0
  14. package/template/.claude/settings.json +32 -0
  15. package/template/.claude/skills/codex-review/SKILL.md +139 -0
  16. package/template/.claude/skills/prd/SKILL.md +343 -0
  17. package/template/.claude/skills/ralph/SKILL.md +339 -0
  18. package/template/.claude/skills/secops/SKILL.md +259 -0
  19. package/template/.codex/skills/codex-review/SKILL.md +139 -0
  20. package/template/.codex/skills/prd/SKILL.md +343 -0
  21. package/template/.codex/skills/ralph/SKILL.md +339 -0
  22. package/template/AGENTS.md +43 -0
  23. package/template/CLAUDE.md +141 -21
  24. package/template/CONTRIBUTING.md +37 -0
  25. package/template/agents/README.md +15 -171
  26. package/template/docs/ROADMAP.md +0 -36
  27. package/template/docs/agent-orchestration.md +24 -141
  28. package/template/docs/codex-setup.md +32 -0
  29. package/template/hooks/codex-review/index.js +105 -0
  30. package/template/hooks/workflow-selector/index.js +398 -0
  31. package/template/scripts/codex-review/codex-review.sh +266 -0
  32. package/template/scripts/ralph/CLAUDE.md +174 -0
  33. package/template/scripts/ralph/CODEX.md +76 -0
  34. package/template/scripts/ralph/ralph.sh +150 -0
  35. package/template/tickets/ticket-list.md +17 -68
  36. package/template/agents/ai-engineer.md +0 -31
  37. package/template/agents/api-documenter.md +0 -31
  38. package/template/agents/architect-review.md +0 -42
  39. package/template/agents/backend-architect.md +0 -29
  40. package/template/agents/business-analyst.md +0 -34
  41. package/template/agents/c-pro.md +0 -34
  42. package/template/agents/cloud-architect.md +0 -31
  43. package/template/agents/code-reviewer.md +0 -28
  44. package/template/agents/content-marketer.md +0 -34
  45. package/template/agents/context-manager.md +0 -63
  46. package/template/agents/cpp-pro.md +0 -37
  47. package/template/agents/customer-support.md +0 -34
  48. package/template/agents/data-engineer.md +0 -31
  49. package/template/agents/data-scientist.md +0 -28
  50. package/template/agents/database-admin.md +0 -31
  51. package/template/agents/database-optimizer.md +0 -31
  52. package/template/agents/debugger.md +0 -29
  53. package/template/agents/deployment-engineer.md +0 -31
  54. package/template/agents/devops-troubleshooter.md +0 -31
  55. package/template/agents/dx-optimizer.md +0 -62
  56. package/template/agents/error-detective.md +0 -31
  57. package/template/agents/frontend-developer.md +0 -30
  58. package/template/agents/golang-pro.md +0 -31
  59. package/template/agents/graphql-architect.md +0 -31
  60. package/template/agents/incident-responder.md +0 -73
  61. package/template/agents/javascript-pro.md +0 -34
  62. package/template/agents/legacy-modernizer.md +0 -31
  63. package/template/agents/ml-engineer.md +0 -31
  64. package/template/agents/mlops-engineer.md +0 -56
  65. package/template/agents/mobile-developer.md +0 -31
  66. package/template/agents/network-engineer.md +0 -31
  67. package/template/agents/payment-integration.md +0 -31
  68. package/template/agents/performance-engineer.md +0 -31
  69. package/template/agents/prompt-engineer.md +0 -58
  70. package/template/agents/python-pro.md +0 -31
  71. package/template/agents/quant-analyst.md +0 -31
  72. package/template/agents/risk-manager.md +0 -40
  73. package/template/agents/rust-pro.md +0 -34
  74. package/template/agents/sales-automator.md +0 -34
  75. package/template/agents/search-specialist.md +0 -58
  76. package/template/agents/security-auditor.md +0 -31
  77. package/template/agents/sql-pro.md +0 -34
  78. package/template/agents/terraform-specialist.md +0 -34
  79. package/template/agents/test-automator.md +0 -31
  80. /package/template/{agents → .claude/agents}/backend.md +0 -0
  81. /package/template/{agents → .claude/agents}/blockchain.md +0 -0
  82. /package/template/{agents → .claude/agents}/coder.md +0 -0
  83. /package/template/{agents → .claude/agents}/frontend.md +0 -0
  84. /package/template/{agents → .claude/agents}/planner.md +0 -0
  85. /package/template/{agents → .claude/agents}/researcher.md +0 -0
  86. /package/template/{agents → .claude/agents}/shadcn.md +0 -0
package/README.md CHANGED
@@ -1,434 +1,236 @@
1
1
  # ccsetup
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/ccsetup.svg)](https://www.npmjs.com/package/ccsetup)
4
- [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/marcia-ong/ccsetup/pulls)
5
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
- [![npm downloads](https://img.shields.io/npm/dm/ccsetup.svg)](https://www.npmjs.com/package/ccsetup)
7
5
 
8
- Quick setup for Claude Code projects with built-in 50+ agents, ticket system, planning tools and agent orchestration workflow.
6
+ One-command setup for Claude Code and Codex projects. Creates a ready-to-use project structure with planning tools, review workflows, and optional AI-specific project setup.
9
7
 
10
- ## Installation
8
+ ## Quick Start
11
9
 
12
10
  ```bash
13
- # Create a new project
11
+ # Interactive mode
12
+ npx ccsetup
13
+
14
+ # Create new project
14
15
  npx ccsetup my-project
15
16
 
16
17
  # Setup in current directory
17
18
  npx ccsetup .
18
-
19
- # Install globally (optional)
20
- npm install -g ccsetup
21
- ccsetup my-project
22
19
  ```
23
20
 
24
- ## Command Line Options
21
+ ## What You Get
25
22
 
26
- ```bash
27
- ccsetup [project-name] [options]
28
-
29
- Options:
30
- --force, -f Skip all prompts and overwrite existing files
31
- --dry-run, -d Show what would be done without making changes
32
- --agents Interactive agent selection mode
33
- --all-agents Include all agents without prompting
34
- --no-agents Skip agent selection entirely
35
- --browse-agents Copy all agents to /agents folder for browsing
36
- --help, -h Show help message
37
-
38
- Examples:
39
- ccsetup # Create in current directory
40
- ccsetup my-project # Create in new directory
41
- ccsetup . --force # Overwrite files in current directory
42
- ccsetup my-app --dry-run # Preview changes without creating files
43
- ccsetup --agents # Interactive agent selection only
44
- ccsetup my-app --all-agents # Include all agents automatically
45
- ccsetup --browse-agents # Copy all agents for manual selection
23
+ ```
24
+ my-project/
25
+ ├── CLAUDE.md # Project instructions for Claude (Claude/Both)
26
+ ├── AGENTS.md # Project instructions for Codex (Codex/Both)
27
+ ├── CONTRIBUTING.md # Contribution guidelines
28
+ ├── GEMINI.md # Gemini setup (optional)
29
+ ├── .claude/
30
+ │ ├── agents/ # 8 core agents
31
+ │ ├── skills/ # /prd, /ralph, /codex-review, and /secops skills
32
+ │ └── settings.json # Claude permissions and optional hook wiring
33
+ ├── .codex/
34
+ │ └── skills/ # Project-local Codex skills: prd, ralph, codex-review
35
+ ├── agents/
36
+ │ └── README.md # Agent documentation
37
+ ├── scripts/
38
+ │ ├── ralph/ # Autonomous agent loop for Claude Code or Codex
39
+ │ └── codex-review/ # Codex CLI review script
40
+ ├── docs/
41
+ │ ├── ROADMAP.md # Development roadmap
42
+ │ └── agent-orchestration.md
43
+ ├── tickets/ # Task tracking
44
+ └── plans/ # Planning documents
46
45
  ```
47
46
 
48
- ## What's Included
49
-
50
- The boilerplate template creates:
51
-
52
- - **CLAUDE.md** - Project instructions for Claude
53
- - **GEMINI.md** - (Optional) Waterfall Architect prompt for comprehensive task planning - optimized for Gemini's larger context window
54
- - **agents/** - Specialized AI agents (planner, coder, checker, etc.)
55
- - **tickets/** - Task tracking system
56
- - **plans/** - Project planning documents
57
- - **docs/** - Documentation with ROADMAP.md and agent-orchestration.md
58
- - **.claude/** - Claude Code specific directory structure (created automatically)
59
-
60
- ## Key Features
61
-
62
- - 🎯 **Interactive Agent Selection** - Choose which agents to include during setup
63
- - 📚 **Browse Mode** - Copy all 50+ agents to explore and manually select later
64
- - 🔄 **Agent Orchestration Workflows** - Pre-defined workflows that automatically coordinate multiple agents for complex tasks
65
- - 🔒 **Smart Conflict Resolution** - Handle existing files with skip/rename/overwrite options
66
- - 📁 **.claude Directory Support** - Automatic creation of Claude Code directory structure
67
- - 🏃 **Dry Run Mode** - Preview changes before applying them
68
- - ⚡ **Force Mode** - Skip all prompts for automated workflows
69
- - 🎨 **Standalone Agent Preview** - Explore available agents without setup
70
- - 🎭 **Systematic Task Execution** - Agents work in sequence, building on each other's outputs
71
-
72
- ## Project Structure
73
-
74
- - **templates/** - The boilerplate templates that will be copied to user's project
75
- - **bin/** - CLI executable for ccsetup
76
- - **agents/**, **docs/**, **plans/**, **tickets/** - Working files for ccsetup development (not part of the template)
77
-
78
- ## Usage
79
-
80
- 1. Create a new project:
81
-
82
- ```bash
83
- npx ccsetup my-awesome-project
84
- cd my-awesome-project
85
- ```
86
-
87
- 2. Edit `CLAUDE.md` with your project-specific instructions
88
-
89
- 3. Update `docs/ROADMAP.md` with your project goals
90
-
91
- 4. Start creating tickets in `tickets/` directory
92
-
93
- ## Claude Code Integration
94
-
95
- ccsetup seamlessly integrates with Claude Code:
96
-
97
- - **Automatic Detection** - Checks if Claude Code is initialized in your project
98
- - **.claude Directory** - Creates Claude Code directory structure automatically
99
- - **Agent Installation** - Copies agents to `.claude/agents/` for native Claude Code support
100
- - **Smart Initialization** - Offers to create `.claude` directory if Claude Code isn't detected
101
-
102
- When running in the current directory (`npx ccsetup .`), it will check for Claude Code and provide instructions if not found. For new projects, ccsetup will remind you to initialize Claude Code after setup.
103
-
104
- ## Using Agents
105
-
106
- The boilerplate includes 50+ specialized agents covering all aspects of development:
107
-
108
- ### Core Development Agents
109
-
110
- - **planner.md** - Strategic planning and task breakdown
111
- - **coder.md** - Implementation and development
112
- - **checker.md** - Testing and quality assurance
113
- - **researcher.md** - Research and information gathering
114
-
115
- ### Language Specialists
116
-
117
- - **python-pro.md**, **golang-pro.md**, **rust-pro.md**, **javascript-pro.md**, **c-pro.md**, **cpp-pro.md**, **sql-pro.md**
118
-
119
- ### Infrastructure & Operations
120
-
121
- - **devops-troubleshooter.md**, **cloud-architect.md**, **terraform-specialist.md**, **database-admin.md**, **network-engineer.md**
122
-
123
- ### Quality & Security
124
-
125
- - **code-reviewer.md**, **security-auditor.md**, **test-automator.md**, **performance-engineer.md**
126
-
127
- ### And Many More!
47
+ ### Core Agents
128
48
 
129
- Over 50 specialized agents for frontend, backend, blockchain, ML/AI, business analysis, and more!
49
+ backend, blockchain, checker, coder, frontend, planner, researcher, shadcn
130
50
 
131
- 📖 **[View all agents with detailed descriptions →](https://github.com/MrMarciaOng/ccsetup/blob/main/template/agents/README.md)**
51
+ ### Skills (Slash Commands)
132
52
 
133
- ### Interactive Agent Selection
53
+ - **/prd** Scans your codebase (tech stack, quality gates, architecture), then generates a structured PRD with real file paths and auto-detected quality criteria
54
+ - **/ralph** — Converts a PRD into `prd.json` format for autonomous execution, with exact quality check commands and file hints per story
55
+ - **/codex-review** — Reviews plans, validates implementations against plans, or reviews code changes via Codex CLI. Auto-detects mode from context, up to 3 iterative rounds
56
+ - **/secops** — Claude-only security skill that blocks dependency installs until `osv-scanner` checks the package or lockfile for known vulnerabilities
134
57
 
135
- During setup, ccsetup will prompt you to either:
58
+ Claude projects also ship with `osv-scanner` Bash permissions preconfigured in `.claude/settings.json` so the `/secops` workflow can run without extra permission prompts.
136
59
 
137
- 1. **Browse Mode** - Get all 50+ agents to explore later
138
- 2. **Select Specific Agents** - Choose from curated list
60
+ ## Key Options
139
61
 
140
62
  ```bash
141
- 🤖 How would you like to set up agents for your Claude Code project?
142
-
143
- Use arrow keys to navigate, Enter to select
144
-
145
- > Browse Mode - Copy all 50+ agents to /agents folder (explore later)
146
- Select Agents - Choose specific agents to include now
147
- Skip - Don't include any agents
148
-
149
- # If you choose "Select Agents":
150
- 🤖 Select agents to include in your Claude Code project
151
-
152
- Use arrow keys to navigate, space to select/deselect, 'a' to toggle all
153
-
154
- Choose your agents:
155
- ◯ backend - Backend development specialist for API design and server optimization
156
- ◯ blockchain - Web3 and smart contract development expert
157
- ◯ checker - Quality assurance and code review specialist
158
- ◯ coder - Expert software developer for implementation
159
- ◯ frontend - Frontend development specialist for UI/UX
160
- ◯ planner - Strategic planning specialist for complex problems
161
- ◯ researcher - Research specialist for documentation and code analysis
162
- ◯ shadcn - shadcn/ui component library expert
63
+ npx ccsetup my-project --agents # Interactive agent selection
64
+ npx ccsetup my-project --all-agents # Include all agents
65
+ npx ccsetup my-project --no-agents # Skip agent selection entirely
66
+ npx ccsetup my-project --dry-run # Preview without creating files
67
+ npx ccsetup my-project --force # Skip prompts, overwrite existing
68
+ npx ccsetup my-project --browse # Enhanced template browsing UI
69
+ npx ccsetup --install-hooks # Install workflow selection hooks (advanced)
163
70
  ```
164
71
 
165
- You can also use flags to control agent selection:
72
+ During setup, `ccsetup` asks whether to generate a `Claude`, `Codex`, or `Both` project environment.
166
73
 
167
- - `--all-agents` - Include all available agents
168
- - `--no-agents` - Skip agent selection entirely
169
- - `--agents` - Preview available agents without creating a project
74
+ ## Agent Workflows
170
75
 
171
- Example:
76
+ Pre-configured multi-agent workflows:
172
77
 
173
- ```bash
174
- # Include all agents without prompting
175
- npx ccsetup my-project --all-agents
78
+ - **Feature Development**: Researcher → Planner → Coder → Checker
79
+ - **Bug Fix**: Researcher Coder → Checker
80
+ - **API Development**: Planner → Backend → Frontend → Checker
81
+ - **UI Components**: Frontend → Shadcn → Checker
176
82
 
177
- # Create project without any agents
178
- npx ccsetup my-project --no-agents
83
+ See [docs/agent-orchestration.md](docs/agent-orchestration.md) for details.
179
84
 
180
- # Preview available agents only
181
- npx ccsetup --agents
182
- ```
85
+ ### Workflow Selector Hook (Optional)
183
86
 
184
- ### Browse Mode - New Feature! 📚
87
+ An optional hook that analyzes your prompts and suggests the best agent workflow for the task. Claude will ask before applying the suggestion.
185
88
 
186
- With 50+ specialized agents available, browse mode lets you explore all agents at your leisure:
89
+ **During setup**, you'll be asked if you want to install it. You can also install it later:
187
90
 
188
91
  ```bash
189
- # Copy all agents to /agents folder for browsing
190
- npx ccsetup my-project --browse-agents
92
+ npx ccsetup --install-hooks
191
93
  ```
192
94
 
193
- In browse mode:
194
-
195
- - All 50+ agents are copied to your project's `/agents` folder
196
- - You can read through each agent to understand their capabilities
197
- - Manually copy the ones you want to `~/.claude/agents` when ready
198
- - No overwhelming selection process during setup!
199
-
200
- Example workflow:
95
+ **To activate**, set the environment variable:
201
96
 
202
97
  ```bash
203
- # 1. Create project with browse mode
204
- npx ccsetup my-project --browse-agents
205
-
206
- # 2. Explore agents
207
- cd my-project/agents
208
- ls # See all available agents
209
-
210
- # 3. Read agent descriptions
211
- cat code-reviewer.md
212
-
213
- # 4. Copy desired agents to activate them
214
- cp code-reviewer.md ~/.claude/agents/
215
- cp python-pro.md ~/.claude/agents/
98
+ export CCSETUP_WORKFLOW=1
216
99
  ```
217
100
 
218
- This approach is perfect when you:
219
-
220
- - Want to explore all available agents
221
- - Prefer to choose agents based on your project needs as they arise
222
- - Don't want to be overwhelmed with 50+ choices during setup
223
-
224
- ### Conflict Resolution
101
+ When active, the hook suggests workflows like "Feature Development: Researcher → Planner → Coder → Checker" and asks if you'd like to follow it. When the env var is unset, the hook exits silently and Claude uses its default behavior.
225
102
 
226
- When existing files are detected, ccsetup offers smart conflict resolution:
103
+ ## Codex Review Plan, Implementation, and Code Review
227
104
 
228
- ```bash
229
- ⚠️ File conflicts detected. You will be asked how to handle each category.
105
+ Get a second opinion from OpenAI's Codex CLI. The script auto-detects what to review:
230
106
 
231
- 📄 CLAUDE.md conflicts:
232
- - CLAUDE.md
107
+ | Context | Review Mode |
108
+ |---------|-------------|
109
+ | Plan file, no code changes | **Plan review** — architectural soundness |
110
+ | Plan file + git changes | **Implementation review** — validates code against the plan |
111
+ | No plan file, git changes | **Code review** — bugs, security, quality |
233
112
 
234
- Conflict resolution options:
235
- 1) skip (s) - Keep your existing files
236
- 2) rename (r) - Save template files with -ccsetup suffix
237
- 3) overwrite (o) - Replace with template versions
113
+ ### Usage
238
114
 
239
- Your choice for CLAUDE.md [s/r/o]:
240
115
  ```
241
-
242
- Categories are handled separately:
243
-
244
- - **CLAUDE.md** - Project instructions (warns before overwriting)
245
- - **Agents** - AI agent files
246
- - **Documentation** - docs/ folder files
247
- - **Plans** - plans/ folder files
248
- - **Tickets** - tickets/ folder files
249
-
250
- ## Agent Orchestration Showcase
251
-
252
- The template includes powerful agent orchestration workflows that guide Claude through complex tasks systematically. Here are real-world examples:
253
-
254
- ### 🚀 Feature Development Example
255
-
256
- **Scenario**: Building a user authentication system
257
-
258
- ```bash
259
- # In Claude Code, you would say:
260
- "I need to add user authentication to my app. Use the feature development workflow to guide me through this."
261
-
262
- # Claude will automatically orchestrate:
263
- 1. Researcher Agent → Analyzes existing codebase, identifies auth patterns
264
- 2. Planner Agent → Creates detailed implementation plan with JWT, sessions, etc.
265
- 3. Coder Agent → Implements auth endpoints, middleware, and UI components
266
- 4. Checker Agent → Tests security, validates implementation, checks edge cases
116
+ /codex-review # Auto-detect from context
117
+ /codex-review plans/my-feature-plan.md # Review a specific plan
267
118
  ```
268
119
 
269
- ### 🐛 Bug Fix Example
120
+ ### What happens
270
121
 
271
- **Scenario**: Users report login failures after 5 minutes
122
+ 1. Detects available context (plan file and/or git changes)
123
+ 2. Sends to Codex CLI with a mode-appropriate review prompt
124
+ 3. Presents structured feedback (architecture, compliance, risks, suggestions)
125
+ 4. Asks if you want to apply fixes and re-review
126
+ 5. Repeats for up to 3 iterations
127
+
128
+ ### Direct script usage
272
129
 
273
130
  ```bash
274
- # You tell Claude:
275
- "Users are getting logged out after 5 minutes. Use the bug fix workflow to investigate and fix this."
131
+ # Plan review (no git changes)
132
+ ./scripts/codex-review/codex-review.sh plans/my-plan.md
276
133
 
277
- # Claude orchestrates:
278
- 1. Researcher Agent → Investigates session handling, token expiry, logs
279
- 2. Coder Agent → Fixes token refresh logic, updates session timeout
280
- 3. Checker Agent → Verifies fix, tests edge cases, ensures no regressions
281
- ```
134
+ # Implementation review (plan + git changes auto-detected)
135
+ ./scripts/codex-review/codex-review.sh plans/my-plan.md
282
136
 
283
- ### 🏗️ API Development Example
137
+ # Code review (no plan, just git changes)
138
+ ./scripts/codex-review/codex-review.sh
284
139
 
285
- **Scenario**: Building a REST API for a blog platform
140
+ # Override the model
141
+ ./scripts/codex-review/codex-review.sh plans/my-plan.md --model o3-mini
286
142
 
287
- ```bash
288
- # You request:
289
- "Help me build a complete REST API for blog posts with CRUD operations. Follow the API development workflow."
290
-
291
- # Claude coordinates:
292
- 1. Planner Agent → Designs RESTful endpoints, database schema, auth strategy
293
- 2. Backend Agent → Implements controllers, models, middleware, validation
294
- 3. Frontend Agent → Creates API client, integration examples (if needed)
295
- 4. Checker Agent → Tests all endpoints, validates OpenAPI spec, security audit
143
+ # From stdin
144
+ cat plans/my-plan.md | ./scripts/codex-review/codex-review.sh -
296
145
  ```
297
146
 
298
- ### 🎨 UI Component Example
147
+ ### Prerequisites
299
148
 
300
- **Scenario**: Creating a responsive dashboard with shadcn/ui
149
+ 1. **Codex CLI installed:** `npm install -g @openai/codex`
150
+ 2. **Authenticated:** `codex login` or set `OPENAI_API_KEY`
301
151
 
302
- ```bash
303
- # You ask:
304
- "Create a dashboard with charts and stats cards using shadcn. Use the UI component workflow."
152
+ ### Codex Review Hook (Optional)
305
153
 
306
- # Claude executes:
307
- 1. Frontend Agent → Designs component structure, responsive layout
308
- 2. Shadcn Agent → Implements with shadcn/ui components, themes, animations
309
- 3. Checker Agent → Tests responsiveness, accessibility, performance
310
- ```
154
+ An optional hook that suggests running `/codex-review` when plan files are modified or code changes are detected. Triggers on the `Stop` event.
311
155
 
312
- ### 🔍 Quality Assurance Example
313
-
314
- **Scenario**: Comprehensive review before deployment
156
+ **To activate:**
315
157
 
316
158
  ```bash
317
- # You request:
318
- "Run full QA on the authentication feature we just built."
319
-
320
- # Claude performs:
321
- 1. Researcher Agent → Analyzes all changes, identifies test requirements
322
- 2. Checker Agent → Runs security scans, performance tests, accessibility checks
323
- 3. Coder Agent → Fixes any issues found
324
- 4. Checker Agent → Final validation, generates QA report
159
+ export CCSETUP_CODEX_REVIEW=1
325
160
  ```
326
161
 
327
- ### 💡 How to Use Agent Orchestration
328
-
329
- 1. **Read the orchestration guide**:
330
-
331
- ```
332
- "Read docs/agent-orchestration.md to understand available workflows"
333
- ```
334
-
335
- 2. **Choose your workflow**:
162
+ When unset, the hook is inactive and produces no output.
336
163
 
337
- - Feature Development: Complex new features
338
- - Bug Fix: Investigating and fixing issues
339
- - Refactoring: Improving code quality
340
- - API Development: Building APIs
341
- - UI Components: Frontend development
342
- - Blockchain: Web3 features
343
- - QA: Quality assurance
164
+ ## Ralph Autonomous Agent Loop
344
165
 
345
- 3. **Let Claude guide you**:
166
+ Ralph is an autonomous coding agent that implements user stories from a PRD one at a time, with built-in subagent verification.
346
167
 
347
- ```
348
- "I need to [your task]. Which workflow should we use?"
349
- ```
168
+ ### Workflow
350
169
 
351
- 4. **Follow the flow**:
352
- - Claude will automatically use agents in the correct sequence
353
- - Each agent builds on the previous one's work
354
- - You get systematic, thorough results
170
+ 1. **Create a PRD** — Use `/prd` in Claude Code to generate a codebase-aware PRD
171
+ 2. **Convert to Ralph format** Use `/ralph` to generate `scripts/ralph/prd.json` with quality checks and file hints
172
+ 3. **Run Ralph** Launch the autonomous loop:
355
173
 
356
- The orchestration ensures nothing is missed and follows best practices automatically!
357
-
358
- ## Getting Started with Claude Code
359
-
360
- After setting up your project with `ccsetup`:
361
-
362
- 1. **Open Claude Code** in your project directory:
363
-
364
- ```bash
365
- cd my-awesome-project
366
- claude
367
- ```
368
-
369
- 2. **Let Claude understand your project** by asking:
174
+ ```bash
175
+ # Default: 10 iterations using Claude Code
176
+ ./scripts/ralph/ralph.sh
370
177
 
371
- - "Read the CLAUDE.md file to understand this project"
372
- - "Check the roadmap in docs/ROADMAP.md"
373
- - "What agents are available in the agents directory?"
374
- - "Read the README files in docs, tickets, and plans folders to understand the workflow"
178
+ # Use Claude Code explicitly
179
+ ./scripts/ralph/ralph.sh --tool claude
375
180
 
376
- 3. **Start working** with Claude:
181
+ # Use Codex CLI instead of Claude Code
182
+ ./scripts/ralph/ralph.sh --tool codex
377
183
 
378
- - Use the planner agent: "Use the planner agent to help me design a user authentication system"
379
- - Create tickets: "Create a ticket for implementing user login"
380
- - Implement features: "Use the coder agent to implement the login functionality"
381
- - Review code: "Use the checker agent to review the code we just wrote"
184
+ # Specify model and max iterations
185
+ ./scripts/ralph/ralph.sh --tool claude --model opus 20
382
186
 
383
- 4. **Important setup steps**:
187
+ # Quick Codex run
188
+ ./scripts/ralph/ralph.sh --tool codex --model gpt-5 5
189
+ ```
384
190
 
385
- - **Update ROADMAP.md**: Define your project's goals, features, and development phases
386
- - **Read folder documentation**: Each folder (docs/, tickets/, plans/) has a README explaining its purpose and format
387
- - **Customize CLAUDE.md**: Add project-specific instructions, commands, and context
191
+ ### What happens each iteration
388
192
 
389
- 5. **Workflow tips**:
390
- - Always start with planning for complex features
391
- - Create tickets to track progress
392
- - Use the appropriate agent for each task
393
- - Keep CLAUDE.md updated with project-specific instructions
394
- - Follow the workflow defined in docs/ROADMAP.md
193
+ 1. Reads `prd.json` and picks the next incomplete story
194
+ 2. Reads story `notes` for file hints (pre-populated by `/ralph`)
195
+ 3. Implements the story
196
+ 4. Runs exact quality check commands from `prd.json` (`qualityChecks` field)
197
+ 5. Spawns a **checker subagent** to independently verify the implementation against acceptance criteria
198
+ 6. If reviewer approves commits. If not → fixes and re-verifies (up to 3 cycles)
199
+ 7. Updates `prd.json` (`passes: true`) and appends to `progress.txt`
200
+ 8. Exits when all stories pass, or after max iterations
395
201
 
396
- ## Features
202
+ ### Options
397
203
 
398
- ### Core Features
204
+ | Flag | Default | Description |
205
+ |------|---------|-------------|
206
+ | `--tool claude\|codex` | `claude` | Which AI tool to use |
207
+ | `--model <model>` | (default) | Model selection for the chosen tool |
208
+ | `[number]` | `10` | Max iterations |
399
209
 
400
- - ✅ Pre-configured project structure for Claude Code
401
- - 🤖 50+ specialized agents from the [wshobson/agents](https://github.com/wshobson/agents) collection - [view all →](https://github.com/MrMarciaOng/ccsetup/blob/main/template/agents/README.md)
402
- - 🎫 Built-in ticket and planning system
403
- - 📋 Ready-to-use boilerplate with best practices
404
- - 📁 Automatic .claude directory integration
210
+ ### Archiving
405
211
 
406
- ### CLI Features
212
+ Ralph auto-archives previous runs when the branch changes. Archives are saved to `scripts/ralph/archive/YYYY-MM-DD-feature-name/`.
407
213
 
408
- - 🎯 Interactive agent selection with descriptions
409
- - 🔄 Smart conflict resolution (skip/rename/overwrite)
410
- - 👀 Dry-run mode to preview changes
411
- - ⚡ Force mode for CI/CD pipelines
412
- - 🎨 Standalone agent preview mode
413
- - 🛡️ Security validations for file operations
214
+ ### Prerequisites
414
215
 
415
- ### Agent Orchestration
216
+ 1. **`jq` installed** for PRD parsing and branch tracking
217
+ 2. **Claude Code CLI** for the default runner
218
+ 3. **Codex CLI** if you want `--tool codex`: `npm install -g @openai/codex`
416
219
 
417
- The template includes `docs/agent-orchestration.md` which defines workflows for:
220
+ ## Documentation
418
221
 
419
- - **Feature Development** - Researcher → Planner → Coder → Checker
420
- - **Bug Fixes** - Researcher → Coder → Checker
421
- - **Refactoring** - Researcher → Planner → Coder → Checker
422
- - **API Development** - Planner → Backend → Frontend → Checker
423
- - **UI Components** - Frontend → Shadcn → Checker
424
- - **Blockchain** - Planner → Blockchain → Checker
425
- - **Quality Assurance** - Researcher → Checker → Coder → Checker
222
+ - [Agent Orchestration](docs/agent-orchestration.md)
223
+ - [Available Agents](template/agents/README.md)
224
+ - [Codex Setup](docs/codex-setup.md)
225
+ - [Ticket System](docs/ticket-system.md)
426
226
 
427
227
  ## Credits
428
228
 
429
- Born from our discussions in TechOverflow with [vichannnnn](https://github.com/vichannnnn) and [nasdin](https://github.com/nasdin)
229
+ Born from discussions in TechOverflow with [vichannnnn](https://github.com/vichannnnn), [MrMarciaOng](https://github.com/MrMarciaOng), and [nasdin](https://github.com/nasdin).
230
+
231
+ Agent collection from [wshobson/agents](https://github.com/wshobson/agents).
430
232
 
431
- The 44 specialized agents collection is from [wshobson/agents](https://github.com/wshobson/agents) - an amazing collection of Claude Code subagents for every development need!
233
+ Security workflow and `/secops` skill contribution by [Ciaran Hughes](https://github.com/Ciaran-Hughes).
432
234
 
433
235
  ## License
434
236