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.
- package/README.md +144 -342
- package/bin/create-project.js +1246 -90
- package/bin/lib/claudeInterface.js +209 -0
- package/lib/aiAgentSelector.js +155 -0
- package/lib/templates/README.md +176 -0
- package/lib/templates/catalog.js +230 -0
- package/lib/templates/filter.js +257 -0
- package/lib/templates/index.js +45 -0
- package/lib/templates/metadata/agents.json +413 -0
- package/lib/templates/metadata-extractor.js +329 -0
- package/lib/templates/search.js +356 -0
- package/package.json +13 -5
- package/template/{agents → .claude/agents}/checker.md +29 -0
- package/template/.claude/settings.json +32 -0
- package/template/.claude/skills/codex-review/SKILL.md +139 -0
- package/template/.claude/skills/prd/SKILL.md +343 -0
- package/template/.claude/skills/ralph/SKILL.md +339 -0
- package/template/.claude/skills/secops/SKILL.md +259 -0
- package/template/.codex/skills/codex-review/SKILL.md +139 -0
- package/template/.codex/skills/prd/SKILL.md +343 -0
- package/template/.codex/skills/ralph/SKILL.md +339 -0
- package/template/AGENTS.md +43 -0
- package/template/CLAUDE.md +141 -21
- package/template/CONTRIBUTING.md +37 -0
- package/template/agents/README.md +15 -171
- package/template/docs/ROADMAP.md +0 -36
- package/template/docs/agent-orchestration.md +24 -141
- package/template/docs/codex-setup.md +32 -0
- package/template/hooks/codex-review/index.js +105 -0
- package/template/hooks/workflow-selector/index.js +398 -0
- package/template/scripts/codex-review/codex-review.sh +266 -0
- package/template/scripts/ralph/CLAUDE.md +174 -0
- package/template/scripts/ralph/CODEX.md +76 -0
- package/template/scripts/ralph/ralph.sh +150 -0
- package/template/tickets/ticket-list.md +17 -68
- package/template/agents/ai-engineer.md +0 -31
- package/template/agents/api-documenter.md +0 -31
- package/template/agents/architect-review.md +0 -42
- package/template/agents/backend-architect.md +0 -29
- package/template/agents/business-analyst.md +0 -34
- package/template/agents/c-pro.md +0 -34
- package/template/agents/cloud-architect.md +0 -31
- package/template/agents/code-reviewer.md +0 -28
- package/template/agents/content-marketer.md +0 -34
- package/template/agents/context-manager.md +0 -63
- package/template/agents/cpp-pro.md +0 -37
- package/template/agents/customer-support.md +0 -34
- package/template/agents/data-engineer.md +0 -31
- package/template/agents/data-scientist.md +0 -28
- package/template/agents/database-admin.md +0 -31
- package/template/agents/database-optimizer.md +0 -31
- package/template/agents/debugger.md +0 -29
- package/template/agents/deployment-engineer.md +0 -31
- package/template/agents/devops-troubleshooter.md +0 -31
- package/template/agents/dx-optimizer.md +0 -62
- package/template/agents/error-detective.md +0 -31
- package/template/agents/frontend-developer.md +0 -30
- package/template/agents/golang-pro.md +0 -31
- package/template/agents/graphql-architect.md +0 -31
- package/template/agents/incident-responder.md +0 -73
- package/template/agents/javascript-pro.md +0 -34
- package/template/agents/legacy-modernizer.md +0 -31
- package/template/agents/ml-engineer.md +0 -31
- package/template/agents/mlops-engineer.md +0 -56
- package/template/agents/mobile-developer.md +0 -31
- package/template/agents/network-engineer.md +0 -31
- package/template/agents/payment-integration.md +0 -31
- package/template/agents/performance-engineer.md +0 -31
- package/template/agents/prompt-engineer.md +0 -58
- package/template/agents/python-pro.md +0 -31
- package/template/agents/quant-analyst.md +0 -31
- package/template/agents/risk-manager.md +0 -40
- package/template/agents/rust-pro.md +0 -34
- package/template/agents/sales-automator.md +0 -34
- package/template/agents/search-specialist.md +0 -58
- package/template/agents/security-auditor.md +0 -31
- package/template/agents/sql-pro.md +0 -34
- package/template/agents/terraform-specialist.md +0 -34
- package/template/agents/test-automator.md +0 -31
- /package/template/{agents → .claude/agents}/backend.md +0 -0
- /package/template/{agents → .claude/agents}/blockchain.md +0 -0
- /package/template/{agents → .claude/agents}/coder.md +0 -0
- /package/template/{agents → .claude/agents}/frontend.md +0 -0
- /package/template/{agents → .claude/agents}/planner.md +0 -0
- /package/template/{agents → .claude/agents}/researcher.md +0 -0
- /package/template/{agents → .claude/agents}/shadcn.md +0 -0
|
@@ -1,189 +1,33 @@
|
|
|
1
1
|
# Agents Directory
|
|
2
2
|
|
|
3
|
-
This directory
|
|
3
|
+
This directory is for documentation only. All active agents live in `.claude/agents/`.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Available Core Agents
|
|
6
6
|
|
|
7
|
-
|
|
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
|
-
|
|
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
|
-
|
|
14
|
-
These 8 agents were created specifically for the ccsetup boilerplate:
|
|
18
|
+
## Adding Custom Agents
|
|
15
19
|
|
|
16
|
-
|
|
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
|
-
##
|
|
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
|
-
-
|
|
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.
|
package/template/docs/ROADMAP.md
CHANGED
|
@@ -4,42 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
High-level overview of the project, what it does, the main features
|
|
6
6
|
|
|
7
|
-
## Development Workflow
|
|
8
|
-
|
|
9
|
-
1. **Task Planning**
|
|
10
|
-
- Study the existing codebase and understand the current state
|
|
11
|
-
- Use the **planner** agent to break down complex problems and create implementation roadmaps
|
|
12
|
-
- Create a plan document in the `/plans` directory for complex features
|
|
13
|
-
- Update `ROADMAP.md` to include the new task under Development
|
|
14
|
-
- Priority tasks should be inserted after the last completed task
|
|
15
|
-
|
|
16
|
-
2. **Ticket Creation**
|
|
17
|
-
- Study the existing codebase and understand the current state
|
|
18
|
-
- Create a new ticket file in the `/tickets` directory
|
|
19
|
-
- Name format: `TICKET-XXX-description.md` (e.g., `TICKET-001-user-auth.md`)
|
|
20
|
-
- Include high-level specifications, relevant files, acceptance criteria, and implementation steps
|
|
21
|
-
- Refer to last completed ticket in the `/tickets` directory for examples
|
|
22
|
-
- Note that completed tickets show checked boxes and summary of changes
|
|
23
|
-
- For new tickets, use empty checkboxes and no summary section
|
|
24
|
-
|
|
25
|
-
3. **Task Implementation**
|
|
26
|
-
- Use the **coder** agent for implementing features, fixing bugs, and optimizing code
|
|
27
|
-
- Follow the specifications in the ticket file
|
|
28
|
-
- Implement features and functionality following project conventions
|
|
29
|
-
- Update step progress within the ticket file after each step
|
|
30
|
-
- Stop after completing each step and wait for further instructions
|
|
31
|
-
|
|
32
|
-
4. **Quality Assurance**
|
|
33
|
-
- Use the **checker** agent for testing, security analysis, and code review
|
|
34
|
-
- Verify all acceptance criteria are met
|
|
35
|
-
- Run tests and ensure code quality standards
|
|
36
|
-
- Document any issues found and their resolutions
|
|
37
|
-
|
|
38
|
-
5. **Roadmap Updates**
|
|
39
|
-
- Mark completed tasks with ✅ in the roadmap
|
|
40
|
-
- Add reference to the ticket file (e.g., `See: /tickets/TICKET-001-user-auth.md`)
|
|
41
|
-
- Update related plan documents if applicable
|
|
42
|
-
|
|
43
7
|
## Development
|
|
44
8
|
|
|
45
9
|
### Project Setup and Boilerplate
|
|
@@ -1,152 +1,35 @@
|
|
|
1
|
-
# Agent Orchestration
|
|
1
|
+
# Agent Orchestration
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
This document defines the standard workflows for orchestrating multiple agents in Claude Code to complete complex tasks efficiently. Follow these patterns to ensure consistent and thorough task execution.
|
|
3
|
+
Standard workflows for chaining agents on complex tasks. Always end with **Checker**.
|
|
5
4
|
|
|
6
|
-
##
|
|
5
|
+
## Workflows
|
|
7
6
|
|
|
8
|
-
###
|
|
9
|
-
|
|
7
|
+
### Feature Development
|
|
8
|
+
researcher → planner → coder → checker
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
2. **Planner Agent** → Create detailed implementation plan and architecture
|
|
14
|
-
3. **Coder Agent** → Implement the feature following the plan
|
|
15
|
-
4. **Checker Agent** → Test, review, and validate the implementation
|
|
10
|
+
### Bug Fix
|
|
11
|
+
researcher → coder → checker
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"I need to add user authentication to the app. First use the researcher agent to understand the current architecture, then the planner to design the auth system, coder to implement it, and checker to validate."
|
|
20
|
-
```
|
|
13
|
+
### Refactoring
|
|
14
|
+
researcher → planner → coder → checker
|
|
21
15
|
|
|
22
|
-
###
|
|
23
|
-
|
|
16
|
+
### API Development
|
|
17
|
+
planner → backend → frontend (optional) → checker
|
|
24
18
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
2. **Coder Agent** → Implement the fix
|
|
28
|
-
3. **Checker Agent** → Verify fix and check for regressions
|
|
19
|
+
### UI Component
|
|
20
|
+
frontend → shadcn (if React) → checker
|
|
29
21
|
|
|
30
|
-
###
|
|
31
|
-
|
|
22
|
+
### Blockchain
|
|
23
|
+
planner → blockchain → checker
|
|
32
24
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
2. **Planner Agent** → Design refactoring approach
|
|
36
|
-
3. **Coder Agent** → Execute refactoring
|
|
37
|
-
4. **Checker Agent** → Ensure functionality remains intact
|
|
25
|
+
### QA
|
|
26
|
+
researcher → checker → coder (fix issues) → checker
|
|
38
27
|
|
|
39
|
-
|
|
40
|
-
**Purpose**: Design and implement APIs
|
|
28
|
+
## Rules
|
|
41
29
|
|
|
42
|
-
**
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
### 5. UI Component Workflow
|
|
49
|
-
**Purpose**: Create user interface components
|
|
50
|
-
|
|
51
|
-
**Flow**:
|
|
52
|
-
1. **Frontend Agent** → Design and implement UI components
|
|
53
|
-
2. **Shadcn Agent** → Apply shadcn/ui styling (if using React)
|
|
54
|
-
3. **Checker Agent** → Test accessibility and responsiveness
|
|
55
|
-
|
|
56
|
-
### 6. Blockchain Development Workflow
|
|
57
|
-
**Purpose**: Develop Web3 features and smart contracts
|
|
58
|
-
|
|
59
|
-
**Flow**:
|
|
60
|
-
1. **Planner Agent** → Design smart contract architecture
|
|
61
|
-
2. **Blockchain Agent** → Implement contracts and Web3 integration
|
|
62
|
-
3. **Checker Agent** → Security audit and testing
|
|
63
|
-
|
|
64
|
-
## Orchestration Best Practices
|
|
65
|
-
|
|
66
|
-
### 1. Always Start with Understanding
|
|
67
|
-
- Use Researcher Agent first for non-trivial tasks
|
|
68
|
-
- Understand existing code before making changes
|
|
69
|
-
- Document findings in plans directory
|
|
70
|
-
|
|
71
|
-
### 2. Plan Before Implementation
|
|
72
|
-
- Use Planner Agent for complex features
|
|
73
|
-
- Create detailed plans in `/plans` directory
|
|
74
|
-
- Break down large tasks into smaller tickets
|
|
75
|
-
|
|
76
|
-
### 3. Sequential Execution
|
|
77
|
-
- Complete each agent's task before moving to the next
|
|
78
|
-
- Use TodoWrite to track progress through the workflow
|
|
79
|
-
- Don't skip agents unless explicitly instructed
|
|
80
|
-
|
|
81
|
-
### 4. Validation is Mandatory
|
|
82
|
-
- Always end with Checker Agent
|
|
83
|
-
- Run tests and linting
|
|
84
|
-
- Verify all acceptance criteria
|
|
85
|
-
|
|
86
|
-
### 5. Documentation Updates
|
|
87
|
-
- Update ROADMAP.md after completing workflows
|
|
88
|
-
- Mark tickets as complete with summaries
|
|
89
|
-
- Keep plans updated with outcomes
|
|
90
|
-
|
|
91
|
-
## Workflow Triggers
|
|
92
|
-
|
|
93
|
-
### When to use Feature Development Workflow:
|
|
94
|
-
- Adding new functionality
|
|
95
|
-
- Implementing user stories
|
|
96
|
-
- Creating new modules or services
|
|
97
|
-
|
|
98
|
-
### When to use Bug Fix Workflow:
|
|
99
|
-
- Fixing reported issues
|
|
100
|
-
- Addressing error messages
|
|
101
|
-
- Resolving unexpected behavior
|
|
102
|
-
|
|
103
|
-
### When to use Refactoring Workflow:
|
|
104
|
-
- Improving code readability
|
|
105
|
-
- Optimizing performance
|
|
106
|
-
- Updating deprecated code
|
|
107
|
-
|
|
108
|
-
### When to use API Development Workflow:
|
|
109
|
-
- Creating new endpoints
|
|
110
|
-
- Designing service interfaces
|
|
111
|
-
- Building integrations
|
|
112
|
-
|
|
113
|
-
### When to use UI Component Workflow:
|
|
114
|
-
- Building new UI elements
|
|
115
|
-
- Updating existing interfaces
|
|
116
|
-
- Implementing design changes
|
|
117
|
-
|
|
118
|
-
### When to use Blockchain Workflow:
|
|
119
|
-
- Smart contract development
|
|
120
|
-
- DeFi integrations
|
|
121
|
-
- Web3 features
|
|
122
|
-
|
|
123
|
-
## Example Multi-Agent Execution
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
User: "I need to add a payment processing feature"
|
|
127
|
-
|
|
128
|
-
Claude's Response Flow:
|
|
129
|
-
1. "I'll help you add payment processing. Let me start by using the researcher agent to understand your current architecture and any existing payment-related code."
|
|
130
|
-
[Uses Researcher Agent]
|
|
131
|
-
|
|
132
|
-
2. "Based on my research, I'll now use the planner agent to design the payment processing system."
|
|
133
|
-
[Uses Planner Agent, creates plan in /plans]
|
|
134
|
-
|
|
135
|
-
3. "With the plan ready, I'll use the backend agent to implement the server-side payment processing."
|
|
136
|
-
[Uses Backend Agent]
|
|
137
|
-
|
|
138
|
-
4. "Now I'll use the frontend agent to create the payment UI components."
|
|
139
|
-
[Uses Frontend Agent]
|
|
140
|
-
|
|
141
|
-
5. "Finally, let me use the checker agent to verify the implementation and ensure security."
|
|
142
|
-
[Uses Checker Agent]
|
|
143
|
-
```
|
|
144
|
-
|
|
145
|
-
## Workflow Customization
|
|
146
|
-
|
|
147
|
-
You can create custom workflows by:
|
|
148
|
-
1. Combining agents in different sequences
|
|
149
|
-
2. Adding conditional paths based on findings
|
|
150
|
-
3. Creating specialized workflows for your project
|
|
151
|
-
|
|
152
|
-
Remember: The goal is systematic, thorough task completion with proper validation at each step.
|
|
30
|
+
1. Use **Researcher** first for non-trivial tasks
|
|
31
|
+
2. Use **Planner** before implementing complex features
|
|
32
|
+
3. Execute agents sequentially — complete each step before the next
|
|
33
|
+
4. Always finish with **Checker** for validation
|
|
34
|
+
5. Track progress with TodoWrite
|
|
35
|
+
6. Update ROADMAP.md and tickets after completing workflows
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Codex Setup
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
|
|
5
|
+
This project can be used with Codex CLI as well as Claude Code.
|
|
6
|
+
|
|
7
|
+
The Codex-facing project instructions live in `AGENTS.md`.
|
|
8
|
+
|
|
9
|
+
## Project-Local Skills
|
|
10
|
+
|
|
11
|
+
Project-local Codex skills are stored in:
|
|
12
|
+
|
|
13
|
+
```text
|
|
14
|
+
.codex/skills/
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The project-local skill set mirrors the Claude template:
|
|
18
|
+
|
|
19
|
+
- `prd`
|
|
20
|
+
- `ralph`
|
|
21
|
+
- `codex-review`
|
|
22
|
+
|
|
23
|
+
Keep these files in the project so Codex has project-specific workflow context alongside `AGENTS.md`.
|
|
24
|
+
|
|
25
|
+
## Suggested Workflow
|
|
26
|
+
|
|
27
|
+
1. Read `AGENTS.md`
|
|
28
|
+
2. Review `docs/ROADMAP.md`
|
|
29
|
+
3. Check relevant tickets and plans
|
|
30
|
+
4. Implement the change
|
|
31
|
+
5. Run the quality checks
|
|
32
|
+
6. Use `scripts/codex-review/codex-review.sh` for review when useful
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
const { execSync } = require('child_process');
|
|
6
|
+
|
|
7
|
+
// Environment variable toggle — exit early if not enabled
|
|
8
|
+
// Enable with: export CCSETUP_CODEX_REVIEW=1
|
|
9
|
+
const enabled = process.env.CCSETUP_CODEX_REVIEW;
|
|
10
|
+
if (!enabled || (enabled !== '1' && enabled.toLowerCase() !== 'true')) {
|
|
11
|
+
console.log('{}');
|
|
12
|
+
process.exit(0);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const PLAN_DIRS = ['plans'];
|
|
16
|
+
const PLAN_PATTERN = /plan.*\.md$/i;
|
|
17
|
+
const RECENCY_THRESHOLD_MS = 60 * 1000;
|
|
18
|
+
|
|
19
|
+
function findRecentlyModifiedPlans() {
|
|
20
|
+
const now = Date.now();
|
|
21
|
+
const recentPlans = [];
|
|
22
|
+
|
|
23
|
+
for (const dir of PLAN_DIRS) {
|
|
24
|
+
const fullDir = path.join(process.cwd(), dir);
|
|
25
|
+
if (!fs.existsSync(fullDir)) continue;
|
|
26
|
+
|
|
27
|
+
try {
|
|
28
|
+
const files = fs.readdirSync(fullDir);
|
|
29
|
+
for (const file of files) {
|
|
30
|
+
if (!file.endsWith('.md')) continue;
|
|
31
|
+
const filePath = path.join(fullDir, file);
|
|
32
|
+
const stats = fs.statSync(filePath);
|
|
33
|
+
if (now - stats.mtimeMs < RECENCY_THRESHOLD_MS) {
|
|
34
|
+
recentPlans.push(filePath);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
} catch (err) {
|
|
38
|
+
// Skip directories we can't read
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// Also check for *plan*.md files in the project root
|
|
43
|
+
try {
|
|
44
|
+
const rootFiles = fs.readdirSync(process.cwd());
|
|
45
|
+
for (const file of rootFiles) {
|
|
46
|
+
if (PLAN_PATTERN.test(file)) {
|
|
47
|
+
const filePath = path.join(process.cwd(), file);
|
|
48
|
+
const stats = fs.statSync(filePath);
|
|
49
|
+
if (stats.isFile() && now - stats.mtimeMs < RECENCY_THRESHOLD_MS) {
|
|
50
|
+
recentPlans.push(filePath);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
} catch (err) {
|
|
55
|
+
// Skip if we can't read root
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return recentPlans;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function hasGitChanges() {
|
|
62
|
+
try {
|
|
63
|
+
execSync('git diff HEAD --quiet', { stdio: 'pipe' });
|
|
64
|
+
return false;
|
|
65
|
+
} catch (err) {
|
|
66
|
+
// Exit code 1 = diff found changes; other codes = command failed (e.g., no HEAD, not a repo)
|
|
67
|
+
if (err.status === 1) return true;
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Main — reads from stdin as Claude Code provides
|
|
73
|
+
let inputData = '';
|
|
74
|
+
|
|
75
|
+
process.stdin.on('data', (chunk) => {
|
|
76
|
+
inputData += chunk;
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
process.stdin.on('end', () => {
|
|
80
|
+
try {
|
|
81
|
+
const recentPlans = findRecentlyModifiedPlans();
|
|
82
|
+
const gitChanges = hasGitChanges();
|
|
83
|
+
let output = {};
|
|
84
|
+
|
|
85
|
+
if (recentPlans.length > 0 && gitChanges) {
|
|
86
|
+
const planNames = recentPlans.map(p => path.basename(p)).join(', ');
|
|
87
|
+
output = {
|
|
88
|
+
message: `Plan updated with code changes. Run /codex-review to validate implementation. (${planNames})`
|
|
89
|
+
};
|
|
90
|
+
} else if (recentPlans.length > 0) {
|
|
91
|
+
const planNames = recentPlans.map(p => path.basename(p)).join(', ');
|
|
92
|
+
output = {
|
|
93
|
+
message: `Plan created. Run /codex-review for a second opinion from Codex CLI. (${planNames})`
|
|
94
|
+
};
|
|
95
|
+
} else if (gitChanges) {
|
|
96
|
+
output = {
|
|
97
|
+
message: `Code changes detected. Run /codex-review for a code review from Codex CLI.`
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
console.log(JSON.stringify(output));
|
|
102
|
+
} catch (error) {
|
|
103
|
+
console.log('{}');
|
|
104
|
+
}
|
|
105
|
+
});
|