ccsetup 1.2.0 → 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 +93 -24
- package/bin/create-project.js +373 -773
- package/lib/templates/README.md +2 -2
- package/lib/templates/metadata/agents.json +1 -1
- package/package.json +3 -2
- package/template/.claude/settings.json +18 -1
- package/template/.claude/skills/codex-review/SKILL.md +139 -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 +106 -4
- package/template/docs/codex-setup.md +32 -0
- package/template/hooks/codex-review/index.js +105 -0
- package/template/scripts/codex-review/codex-review.sh +266 -0
- package/template/scripts/ralph/CODEX.md +76 -0
- package/template/scripts/ralph/ralph.sh +32 -9
- package/bin/lib/contextGenerator.js +0 -287
- package/bin/lib/scanner/index.js +0 -28
- package/bin/scan.js +0 -367
- package/lib/aiMergeHelper.js +0 -112
- package/lib/contextGenerator.js +0 -574
- package/lib/contextMerger.js +0 -812
- package/lib/progressReporter.js +0 -88
- package/lib/scanConfig.js +0 -200
- package/lib/scanner/fileAnalyzer.js +0 -605
- package/lib/scanner/index.js +0 -164
- package/lib/scanner/patterns.js +0 -277
- package/lib/scanner/projectDetector.js +0 -147
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/ccsetup)
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
|
|
6
|
-
One-command setup for Claude Code projects. Creates a ready-to-use project structure with
|
|
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.
|
|
7
7
|
|
|
8
8
|
## Quick Start
|
|
9
9
|
|
|
@@ -22,17 +22,21 @@ npx ccsetup .
|
|
|
22
22
|
|
|
23
23
|
```
|
|
24
24
|
my-project/
|
|
25
|
-
├── CLAUDE.md # Project instructions for Claude
|
|
25
|
+
├── CLAUDE.md # Project instructions for Claude (Claude/Both)
|
|
26
|
+
├── AGENTS.md # Project instructions for Codex (Codex/Both)
|
|
26
27
|
├── CONTRIBUTING.md # Contribution guidelines
|
|
27
28
|
├── GEMINI.md # Gemini setup (optional)
|
|
28
29
|
├── .claude/
|
|
29
30
|
│ ├── agents/ # 8 core agents
|
|
30
|
-
│ ├── skills/ # /prd and /
|
|
31
|
-
│ └── settings.json
|
|
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
|
|
32
35
|
├── agents/
|
|
33
36
|
│ └── README.md # Agent documentation
|
|
34
37
|
├── scripts/
|
|
35
|
-
│
|
|
38
|
+
│ ├── ralph/ # Autonomous agent loop for Claude Code or Codex
|
|
39
|
+
│ └── codex-review/ # Codex CLI review script
|
|
36
40
|
├── docs/
|
|
37
41
|
│ ├── ROADMAP.md # Development roadmap
|
|
38
42
|
│ └── agent-orchestration.md
|
|
@@ -48,6 +52,10 @@ backend, blockchain, checker, coder, frontend, planner, researcher, shadcn
|
|
|
48
52
|
|
|
49
53
|
- **/prd** — Scans your codebase (tech stack, quality gates, architecture), then generates a structured PRD with real file paths and auto-detected quality criteria
|
|
50
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
|
|
57
|
+
|
|
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.
|
|
51
59
|
|
|
52
60
|
## Key Options
|
|
53
61
|
|
|
@@ -55,25 +63,13 @@ backend, blockchain, checker, coder, frontend, planner, researcher, shadcn
|
|
|
55
63
|
npx ccsetup my-project --agents # Interactive agent selection
|
|
56
64
|
npx ccsetup my-project --all-agents # Include all agents
|
|
57
65
|
npx ccsetup my-project --no-agents # Skip agent selection entirely
|
|
58
|
-
npx ccsetup . --scan-context # Scan existing project for context
|
|
59
|
-
npx ccsetup --scan-only # Only scan and update CLAUDE.md
|
|
60
66
|
npx ccsetup my-project --dry-run # Preview without creating files
|
|
61
67
|
npx ccsetup my-project --force # Skip prompts, overwrite existing
|
|
62
68
|
npx ccsetup my-project --browse # Enhanced template browsing UI
|
|
63
69
|
npx ccsetup --install-hooks # Install workflow selection hooks (advanced)
|
|
64
70
|
```
|
|
65
71
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
Scan existing projects to auto-generate CLAUDE.md context:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
ccsetup scan # Scan current directory
|
|
72
|
-
ccsetup scan --update # Update existing CLAUDE.md
|
|
73
|
-
ccsetup scan --update --merge-strategy replace # Replace CLAUDE.md entirely
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Detects languages, frameworks, project structure, and commands from package.json/Makefile/Docker Compose.
|
|
72
|
+
During setup, `ccsetup` asks whether to generate a `Claude`, `Codex`, or `Both` project environment.
|
|
77
73
|
|
|
78
74
|
## Agent Workflows
|
|
79
75
|
|
|
@@ -104,6 +100,67 @@ export CCSETUP_WORKFLOW=1
|
|
|
104
100
|
|
|
105
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.
|
|
106
102
|
|
|
103
|
+
## Codex Review — Plan, Implementation, and Code Review
|
|
104
|
+
|
|
105
|
+
Get a second opinion from OpenAI's Codex CLI. The script auto-detects what to review:
|
|
106
|
+
|
|
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 |
|
|
112
|
+
|
|
113
|
+
### Usage
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
/codex-review # Auto-detect from context
|
|
117
|
+
/codex-review plans/my-feature-plan.md # Review a specific plan
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### What happens
|
|
121
|
+
|
|
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
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
# Plan review (no git changes)
|
|
132
|
+
./scripts/codex-review/codex-review.sh plans/my-plan.md
|
|
133
|
+
|
|
134
|
+
# Implementation review (plan + git changes auto-detected)
|
|
135
|
+
./scripts/codex-review/codex-review.sh plans/my-plan.md
|
|
136
|
+
|
|
137
|
+
# Code review (no plan, just git changes)
|
|
138
|
+
./scripts/codex-review/codex-review.sh
|
|
139
|
+
|
|
140
|
+
# Override the model
|
|
141
|
+
./scripts/codex-review/codex-review.sh plans/my-plan.md --model o3-mini
|
|
142
|
+
|
|
143
|
+
# From stdin
|
|
144
|
+
cat plans/my-plan.md | ./scripts/codex-review/codex-review.sh -
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Prerequisites
|
|
148
|
+
|
|
149
|
+
1. **Codex CLI installed:** `npm install -g @openai/codex`
|
|
150
|
+
2. **Authenticated:** `codex login` or set `OPENAI_API_KEY`
|
|
151
|
+
|
|
152
|
+
### Codex Review Hook (Optional)
|
|
153
|
+
|
|
154
|
+
An optional hook that suggests running `/codex-review` when plan files are modified or code changes are detected. Triggers on the `Stop` event.
|
|
155
|
+
|
|
156
|
+
**To activate:**
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
export CCSETUP_CODEX_REVIEW=1
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
When unset, the hook is inactive and produces no output.
|
|
163
|
+
|
|
107
164
|
## Ralph — Autonomous Agent Loop
|
|
108
165
|
|
|
109
166
|
Ralph is an autonomous coding agent that implements user stories from a PRD one at a time, with built-in subagent verification.
|
|
@@ -115,17 +172,20 @@ Ralph is an autonomous coding agent that implements user stories from a PRD one
|
|
|
115
172
|
3. **Run Ralph** — Launch the autonomous loop:
|
|
116
173
|
|
|
117
174
|
```bash
|
|
118
|
-
# Default: 10 iterations using
|
|
175
|
+
# Default: 10 iterations using Claude Code
|
|
119
176
|
./scripts/ralph/ralph.sh
|
|
120
177
|
|
|
121
|
-
# Use Claude Code
|
|
178
|
+
# Use Claude Code explicitly
|
|
122
179
|
./scripts/ralph/ralph.sh --tool claude
|
|
123
180
|
|
|
181
|
+
# Use Codex CLI instead of Claude Code
|
|
182
|
+
./scripts/ralph/ralph.sh --tool codex
|
|
183
|
+
|
|
124
184
|
# Specify model and max iterations
|
|
125
185
|
./scripts/ralph/ralph.sh --tool claude --model opus 20
|
|
126
186
|
|
|
127
|
-
# Quick run
|
|
128
|
-
./scripts/ralph/ralph.sh --tool
|
|
187
|
+
# Quick Codex run
|
|
188
|
+
./scripts/ralph/ralph.sh --tool codex --model gpt-5 5
|
|
129
189
|
```
|
|
130
190
|
|
|
131
191
|
### What happens each iteration
|
|
@@ -143,18 +203,25 @@ Ralph is an autonomous coding agent that implements user stories from a PRD one
|
|
|
143
203
|
|
|
144
204
|
| Flag | Default | Description |
|
|
145
205
|
|------|---------|-------------|
|
|
146
|
-
| `--tool
|
|
147
|
-
| `--model
|
|
206
|
+
| `--tool claude\|codex` | `claude` | Which AI tool to use |
|
|
207
|
+
| `--model <model>` | (default) | Model selection for the chosen tool |
|
|
148
208
|
| `[number]` | `10` | Max iterations |
|
|
149
209
|
|
|
150
210
|
### Archiving
|
|
151
211
|
|
|
152
212
|
Ralph auto-archives previous runs when the branch changes. Archives are saved to `scripts/ralph/archive/YYYY-MM-DD-feature-name/`.
|
|
153
213
|
|
|
214
|
+
### Prerequisites
|
|
215
|
+
|
|
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`
|
|
219
|
+
|
|
154
220
|
## Documentation
|
|
155
221
|
|
|
156
222
|
- [Agent Orchestration](docs/agent-orchestration.md)
|
|
157
223
|
- [Available Agents](template/agents/README.md)
|
|
224
|
+
- [Codex Setup](docs/codex-setup.md)
|
|
158
225
|
- [Ticket System](docs/ticket-system.md)
|
|
159
226
|
|
|
160
227
|
## Credits
|
|
@@ -163,6 +230,8 @@ Born from discussions in TechOverflow with [vichannnnn](https://github.com/vicha
|
|
|
163
230
|
|
|
164
231
|
Agent collection from [wshobson/agents](https://github.com/wshobson/agents).
|
|
165
232
|
|
|
233
|
+
Security workflow and `/secops` skill contribution by [Ciaran Hughes](https://github.com/Ciaran-Hughes).
|
|
234
|
+
|
|
166
235
|
## License
|
|
167
236
|
|
|
168
237
|
MIT
|