ccstart 2.0.0 → 2.0.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 CHANGED
@@ -21,325 +21,106 @@ npm install -g ccstart
21
21
  ccstart my-project
22
22
  ```
23
23
 
24
- ## Command Line Options
25
-
26
- ```bash
27
- ccstart [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
- --help, -h Show help message
36
-
37
- Examples:
38
- ccstart # Create in current directory
39
- ccstart my-project # Create in new directory
40
- ccstart . --force # Overwrite files in current directory
41
- ccstart my-app --dry-run # Preview changes without creating files
42
- ccstart --agents # Interactive agent selection only
43
- ccstart my-app --all-agents # Include all agents automatically
44
- ```
45
-
46
24
  ## What's Included
47
25
 
48
- The boilerplate template creates:
49
26
  - **CLAUDE.md** - Project instructions for Claude (references claude/ subdirectories)
50
27
  - **claude/** - All Claude-related files in one organized directory:
51
- - **claude/agents/** - Specialized AI agents (planner, coder, checker, etc.)
52
- - **claude/tickets/** - Task tracking system
53
- - **claude/plans/** - Project planning documents
54
- - **claude/docs/** - Documentation with ROADMAP.md and agent-orchestration.md
55
- - **.claude/** - Claude Code specific directory structure (created automatically)
28
+ - **agents/** - 8 specialized AI agents (planner, coder, checker, researcher, etc.)
29
+ - **tickets/** - Task tracking system with ticket templates
30
+ - **plans/** - Project planning documents
31
+ - **docs/** - ROADMAP.md and agent orchestration workflows
32
+ - **.claude/** - Claude Code configuration (created automatically):
33
+ - **agents/** - Selected agents for Claude Code integration
34
+ - **commands/** - Custom slash commands including `/update-claude-md`
35
+ - **hooks/** - Automatic workflow detection
36
+ - **settings.json.example** - Hook configuration
56
37
 
57
38
  ## Key Features
58
39
 
59
40
  - 🎯 **Interactive Agent Selection** - Choose which agents to include during setup
60
- - 🔄 **Agent Orchestration Workflows** - Pre-defined workflows that automatically coordinate multiple agents for complex tasks
41
+ - 🔄 **Agent Orchestration Workflows** - Pre-defined workflows that coordinate multiple agents
61
42
  - 🔒 **Smart Conflict Resolution** - Handle existing files with skip/rename/overwrite options
62
- - 📁 **.claude Directory Support** - Automatic creation of Claude Code directory structure
43
+ - 📁 **Auto-detects Claude Code** - Creates .claude directory structure automatically
63
44
  - 🏃 **Dry Run Mode** - Preview changes before applying them
64
45
  - ⚡ **Force Mode** - Skip all prompts for automated workflows
65
- - 🎨 **Standalone Agent Preview** - Explore available agents without setup
66
- - 🎭 **Systematic Task Execution** - Agents work in sequence, building on each other's outputs
67
-
68
- ## Project Structure
69
-
70
- - **templates/** - The boilerplate templates that will be copied to user's project
71
- - **bin/** - CLI executable for ccstart
72
- - **agents/**, **docs/**, **plans/**, **tickets/** - Working files for ccstart development (not part of the template)
73
-
74
- ## Usage
75
-
76
- 1. Create a new project:
77
- ```bash
78
- npx ccstart my-awesome-project
79
- cd my-awesome-project
80
- ```
81
-
82
- 2. Edit `CLAUDE.md` with your project-specific instructions
83
-
84
- 3. Update `claude/docs/ROADMAP.md` with your project goals
85
-
86
- 4. Start creating tickets in `claude/tickets/` directory
87
-
88
- ## Claude Code Integration
89
-
90
- ccstart seamlessly integrates with Claude Code:
91
-
92
- - **Automatic Detection** - Checks if Claude Code is initialized in your project
93
- - **.claude Directory** - Creates Claude Code directory structure automatically
94
- - **Agent Installation** - Copies agents to `.claude/agents/` for native Claude Code support
95
- - **Smart Initialization** - Offers to create `.claude` directory if Claude Code isn't detected
96
-
97
- When running in the current directory (`npx ccstart .`), it will check for Claude Code and provide instructions if not found. For new projects, ccstart will remind you to initialize Claude Code after setup.
98
-
99
- ## Using Agents
100
-
101
- The boilerplate includes several specialized agents in the `agents/` directory:
102
-
103
- - **planner.md** - Strategic planning and task breakdown
104
- - **coder.md** - Implementation and development
105
- - **checker.md** - Testing and quality assurance
106
- - **researcher.md** - Research and information gathering
107
- - **blockchain.md** - Web3 and smart contract development
108
- - **frontend.md** - UI/UX and frontend development
109
- - **backend.md** - API design and server-side development
110
- - **shadcn.md** - shadcn/ui component development
111
-
112
- ### Interactive Agent Selection
113
-
114
- During setup, ccstart will prompt you to select which agents to include:
115
-
116
- ```bash
117
- 🤖 Select agents to include in your Claude Code project
118
-
119
- Use arrow keys to navigate, space to select/deselect, 'a' to toggle all
120
-
121
- Choose your agents:
122
- ◯ backend - Backend development specialist for API design and server optimization
123
- ◯ blockchain - Web3 and smart contract development expert
124
- ◯ checker - Quality assurance and code review specialist
125
- ◯ coder - Expert software developer for implementation
126
- ◯ frontend - Frontend development specialist for UI/UX
127
- ◯ planner - Strategic planning specialist for complex problems
128
- ◯ researcher - Research specialist for documentation and code analysis
129
- ◯ shadcn - shadcn/ui component library expert
130
- ```
46
+ - 🎭 **Workflow Commands** - Execute complex workflows with single commands
47
+ - 🪝 **Intelligent Hooks** - Automatically detect task patterns and suggest workflows
131
48
 
132
- You can also use flags to control agent selection:
133
- - `--all-agents` - Include all available agents
134
- - `--no-agents` - Skip agent selection entirely
135
- - `--agents` - Preview available agents without creating a project
49
+ ## Quick Start
136
50
 
137
- Example:
138
51
  ```bash
139
- # Include all agents without prompting
140
- npx ccstart my-project --all-agents
141
-
142
- # Create project without any agents
143
- npx ccstart my-project --no-agents
52
+ npx ccstart my-project
53
+ cd my-project
144
54
 
145
- # Preview available agents only
146
- npx ccstart --agents
55
+ # Edit CLAUDE.md with your project details
56
+ # Start using Claude Code with pre-configured agents and workflows
147
57
  ```
148
58
 
149
- ### Conflict Resolution
150
-
151
- When existing files are detected, ccstart offers smart conflict resolution:
59
+ ## Command Line Options
152
60
 
153
61
  ```bash
154
- ⚠️ File conflicts detected. You will be asked how to handle each category.
155
-
156
- 📄 CLAUDE.md conflicts:
157
- - CLAUDE.md
158
-
159
- Conflict resolution options:
160
- 1) skip (s) - Keep your existing files
161
- 2) rename (r) - Save template files with -ccstart suffix
162
- 3) overwrite (o) - Replace with template versions
163
-
164
- Your choice for CLAUDE.md [s/r/o]:
165
- ```
166
-
167
- Categories are handled separately:
168
- - **CLAUDE.md** - Project instructions (warns before overwriting)
169
- - **Agents** - AI agent files
170
- - **Documentation** - docs/ folder files
171
- - **Plans** - plans/ folder files
172
- - **Tickets** - tickets/ folder files
173
-
174
- ## Agent Orchestration Showcase
175
-
176
- The template includes powerful agent orchestration workflows that guide Claude through complex tasks systematically. Here are real-world examples:
177
-
178
- ### 🚀 Feature Development Example
62
+ ccstart [project-name] [options]
179
63
 
180
- **Scenario**: Building a user authentication system
64
+ Options:
65
+ --force, -f Skip all prompts and overwrite existing files
66
+ --dry-run, -d Show what would be done without making changes
67
+ --agents Interactive agent selection mode
68
+ --all-agents Include all agents without prompting
69
+ --no-agents Skip agent selection entirely
70
+ --help, -h Show help message
181
71
 
182
- ```bash
183
- # In Claude Code, you would say:
184
- "I need to add user authentication to my app. Use the feature development workflow to guide me through this."
185
-
186
- # Claude will automatically orchestrate:
187
- 1. Researcher Agent → Analyzes existing codebase, identifies auth patterns
188
- 2. Planner Agent → Creates detailed implementation plan with JWT, sessions, etc.
189
- 3. Coder Agent → Implements auth endpoints, middleware, and UI components
190
- 4. Checker Agent → Tests security, validates implementation, checks edge cases
72
+ Examples:
73
+ ccstart my-app --all-agents # Include all agents
74
+ ccstart . --force # Overwrite in current directory
75
+ ccstart --agents # Preview available agents
191
76
  ```
192
77
 
193
- ### 🐛 Bug Fix Example
78
+ ## Agent Orchestration
194
79
 
195
- **Scenario**: Users report login failures after 5 minutes
80
+ The template includes pre-configured workflows that automatically coordinate agents:
196
81
 
197
- ```bash
198
- # You tell Claude:
199
- "Users are getting logged out after 5 minutes. Use the bug fix workflow to investigate and fix this."
82
+ - **Feature Development** → Researcher → Planner → Coder → Checker
83
+ - **Bug Fix** → Researcher → Coder → Checker
84
+ - **API Development** Planner Backend Frontend Checker
85
+ - **Refactoring** → Researcher → Planner → Coder → Checker
86
+ - **UI Components** → Frontend → Shadcn → Checker
87
+ - **Quality Assurance** → Researcher → Checker → Coder → Checker
200
88
 
201
- # Claude orchestrates:
202
- 1. Researcher Agent → Investigates session handling, token expiry, logs
203
- 2. Coder Agent → Fixes token refresh logic, updates session timeout
204
- 3. Checker Agent → Verifies fix, tests edge cases, ensures no regressions
205
- ```
89
+ See `claude/docs/agent-orchestration.md` for detailed workflow documentation.
206
90
 
207
- ### 🏗️ API Development Example
91
+ ## Custom Commands & Hooks
208
92
 
209
- **Scenario**: Building a REST API for a blog platform
93
+ ### Slash Commands
94
+ - `/update-claude-md` - Automatically populate project information in CLAUDE.md
95
+ - `/workflow-*` commands - Execute orchestrated workflows (coming soon)
210
96
 
211
- ```bash
212
- # You request:
213
- "Help me build a complete REST API for blog posts with CRUD operations. Follow the API development workflow."
214
-
215
- # Claude coordinates:
216
- 1. Planner Agent Designs RESTful endpoints, database schema, auth strategy
217
- 2. Backend Agent → Implements controllers, models, middleware, validation
218
- 3. Frontend Agent → Creates API client, integration examples (if needed)
219
- 4. Checker Agent → Tests all endpoints, validates OpenAPI spec, security audit
220
- ```
97
+ ### Automatic Workflow Detection
98
+ Hooks automatically detect task patterns and suggest appropriate workflows:
99
+ - Feature requests suggests `/workflow-feature`
100
+ - Bug reports → suggests `/workflow-bug`
101
+ - API tasks → suggests `/workflow-api`
102
+ - And more! (QA, refactoring, UI components, blockchain)
221
103
 
222
- ### 🎨 UI Component Example
104
+ Hooks are automatically enabled - no setup required!
223
105
 
224
- **Scenario**: Creating a responsive dashboard with shadcn/ui
106
+ ## Local Development
225
107
 
226
108
  ```bash
227
- # You ask:
228
- "Create a dashboard with charts and stats cards using shadcn. Use the UI component workflow."
229
-
230
- # Claude executes:
231
- 1. Frontend Agent → Designs component structure, responsive layout
232
- 2. Shadcn Agent → Implements with shadcn/ui components, themes, animations
233
- 3. Checker Agent → Tests responsiveness, accessibility, performance
234
- ```
235
-
236
- ### 🔍 Quality Assurance Example
109
+ # Method 1: npm link (Recommended)
110
+ cd /path/to/ccstart
111
+ npm link
112
+ ccstart test-project
237
113
 
238
- **Scenario**: Comprehensive review before deployment
114
+ # Method 2: Direct execution
115
+ node bin/create-project.js ../test-project
239
116
 
240
- ```bash
241
- # You request:
242
- "Run full QA on the authentication feature we just built."
243
-
244
- # Claude performs:
245
- 1. Researcher Agent → Analyzes all changes, identifies test requirements
246
- 2. Checker Agent → Runs security scans, performance tests, accessibility checks
247
- 3. Coder Agent → Fixes any issues found
248
- 4. Checker Agent → Final validation, generates QA report
117
+ # Clean up
118
+ npm unlink -g ccstart
249
119
  ```
250
120
 
251
- ### 💡 How to Use Agent Orchestration
252
-
253
- 1. **Read the orchestration guide**:
254
- ```
255
- "Read docs/agent-orchestration.md to understand available workflows"
256
- ```
257
-
258
- 2. **Choose your workflow**:
259
- - Feature Development: Complex new features
260
- - Bug Fix: Investigating and fixing issues
261
- - Refactoring: Improving code quality
262
- - API Development: Building APIs
263
- - UI Components: Frontend development
264
- - Blockchain: Web3 features
265
- - QA: Quality assurance
266
-
267
- 3. **Let Claude guide you**:
268
- ```
269
- "I need to [your task]. Which workflow should we use?"
270
- ```
271
-
272
- 4. **Follow the flow**:
273
- - Claude will automatically use agents in the correct sequence
274
- - Each agent builds on the previous one's work
275
- - You get systematic, thorough results
276
-
277
- The orchestration ensures nothing is missed and follows best practices automatically!
278
-
279
- ## Getting Started with Claude Code
280
-
281
- After setting up your project with `ccstart`:
282
-
283
- 1. **Open Claude Code** in your project directory:
284
- ```bash
285
- cd my-awesome-project
286
- claude
287
- ```
288
-
289
- 2. **Let Claude understand your project** by asking:
290
- - "Read the CLAUDE.md file to understand this project"
291
- - "Check the roadmap in docs/ROADMAP.md"
292
- - "What agents are available in the agents directory?"
293
- - "Read the README files in docs, tickets, and plans folders to understand the workflow"
294
-
295
- 3. **Start working** with Claude:
296
- - Use the planner agent: "Use the planner agent to help me design a user authentication system"
297
- - Create tickets: "Create a ticket for implementing user login"
298
- - Implement features: "Use the coder agent to implement the login functionality"
299
- - Review code: "Use the checker agent to review the code we just wrote"
300
-
301
- 4. **Important setup steps**:
302
- - **Update ROADMAP.md**: Define your project's goals, features, and development phases
303
- - **Read folder documentation**: Each folder (docs/, tickets/, plans/) has a README explaining its purpose and format
304
- - **Customize CLAUDE.md**: Add project-specific instructions, commands, and context
305
-
306
- 5. **Workflow tips**:
307
- - Always start with planning for complex features
308
- - Create tickets to track progress
309
- - Use the appropriate agent for each task
310
- - Keep CLAUDE.md updated with project-specific instructions
311
- - Follow the workflow defined in docs/ROADMAP.md
312
-
313
- ## Features
314
-
315
- ### Core Features
316
- - ✅ Pre-configured project structure for Claude Code
317
- - 🤖 Multiple specialized agents for different tasks
318
- - 🎫 Built-in ticket and planning system
319
- - 📋 Ready-to-use boilerplate with best practices
320
- - 📁 Automatic .claude directory integration
321
-
322
- ### CLI Features
323
- - 🎯 Interactive agent selection with descriptions
324
- - 🔄 Smart conflict resolution (skip/rename/overwrite)
325
- - 👀 Dry-run mode to preview changes
326
- - ⚡ Force mode for CI/CD pipelines
327
- - 🎨 Standalone agent preview mode
328
- - 🛡️ Security validations for file operations
329
-
330
- ### Agent Orchestration
331
- The template includes `docs/agent-orchestration.md` which defines workflows for:
332
- - **Feature Development** - Researcher → Planner → Coder → Checker
333
- - **Bug Fixes** - Researcher → Coder → Checker
334
- - **Refactoring** - Researcher → Planner → Coder → Checker
335
- - **API Development** - Planner → Backend → Frontend → Checker
336
- - **UI Components** - Frontend → Shadcn → Checker
337
- - **Blockchain** - Planner → Blockchain → Checker
338
- - **Quality Assurance** - Researcher → Checker → Coder → Checker
339
-
340
121
  ## Credits
341
122
 
342
- Born from our discussions in TechOverflow with [vichannnnn](https://github.com/vichannnnn) and [nasdin](https://github.com/nasdin)
123
+ Born from our discussions in TechOverflow with [vichannnnn](https://github.com/vichannnnn), [MrMarciaOng](https://github.com/MrMarciaOng), and [nasdin](https://github.com/nasdin)
343
124
 
344
125
  ## License
345
126
 
@@ -1004,7 +1004,7 @@ async function main() {
1004
1004
  console.log(` ⏭️ Skipped ${claudeInitResult.skippedAgents} existing agents in .claude/agents`);
1005
1005
  }
1006
1006
 
1007
- console.log(`\n✅ Claude Code project ${flags.dryRun ? 'would be' : ''} created successfully!`);
1007
+ console.log(`\n✅ Claude Code project ${flags.dryRun ? 'would be' : ''}created successfully!`);
1008
1008
 
1009
1009
  // Show summary of what happened
1010
1010
  if (fileConflicts.length > 0 || copiedCount > 0 || selectedAgentFiles.length > 0 || claudeInitResult) {
@@ -369,6 +369,176 @@ async function initializeClaudeDirectory(selectedAgentFiles, conflictStrategy, d
369
369
  }
370
370
  }
371
371
 
372
+ // Copy .claude/commands directory
373
+ const claudeCommandsDir = path.join(claudeDir, 'commands');
374
+ const templateCommandsDir = path.join(templateDir, '.claude', 'commands');
375
+
376
+ if (fs.existsSync(templateCommandsDir)) {
377
+ // Create .claude/commands directory
378
+ if (!fs.existsSync(claudeCommandsDir)) {
379
+ if (!dryRun) {
380
+ fs.mkdirSync(claudeCommandsDir, { recursive: true });
381
+ }
382
+ createdItems.push('.claude/commands/');
383
+ if (dryRun) {
384
+ console.log(' 📁 Would create directory: .claude/commands/');
385
+ }
386
+ }
387
+
388
+ // Copy all files from template commands directory
389
+ const commandFiles = fs.readdirSync(templateCommandsDir);
390
+ for (const commandFile of commandFiles) {
391
+ const commandSrc = path.join(templateCommandsDir, commandFile);
392
+ const commandDest = path.join(claudeCommandsDir, commandFile);
393
+
394
+ if (fs.statSync(commandSrc).isFile()) {
395
+ if (!fs.existsSync(commandDest)) {
396
+ if (!dryRun) {
397
+ fs.copyFileSync(commandSrc, commandDest);
398
+ }
399
+ createdItems.push(`.claude/commands/${commandFile}`);
400
+ if (dryRun) {
401
+ console.log(` ✨ Would copy: .claude/commands/${commandFile}`);
402
+ }
403
+ } else {
404
+ if (conflictStrategy === 'overwrite') {
405
+ if (!dryRun) {
406
+ fs.copyFileSync(commandSrc, commandDest);
407
+ }
408
+ if (dryRun) {
409
+ console.log(` ♻️ Would replace: .claude/commands/${commandFile}`);
410
+ }
411
+ } else if (conflictStrategy === 'rename') {
412
+ const ext = path.extname(commandFile);
413
+ const baseName = path.basename(commandFile, ext);
414
+ let newDest = path.join(claudeCommandsDir, `${baseName}-ccstart${ext}`);
415
+ let counter = 1;
416
+ while (fs.existsSync(newDest)) {
417
+ newDest = path.join(claudeCommandsDir, `${baseName}-ccstart-${counter}${ext}`);
418
+ counter++;
419
+ }
420
+ if (!dryRun) {
421
+ fs.copyFileSync(commandSrc, newDest);
422
+ }
423
+ const relativePath = path.relative(claudeDir, newDest);
424
+ createdItems.push(relativePath);
425
+ if (dryRun) {
426
+ console.log(` 📄 Would create: ${relativePath}`);
427
+ }
428
+ } else {
429
+ skippedItems.push(`.claude/commands/${commandFile}`);
430
+ if (dryRun) {
431
+ console.log(` ⏭️ Would skip: .claude/commands/${commandFile}`);
432
+ }
433
+ }
434
+ }
435
+ }
436
+ }
437
+ }
438
+
439
+ // Copy .claude/hooks directory
440
+ const claudeHooksDir = path.join(claudeDir, 'hooks');
441
+ const templateHooksDir = path.join(templateDir, '.claude', 'hooks');
442
+
443
+ if (fs.existsSync(templateHooksDir)) {
444
+ // Create .claude/hooks directory
445
+ if (!fs.existsSync(claudeHooksDir)) {
446
+ if (!dryRun) {
447
+ fs.mkdirSync(claudeHooksDir, { recursive: true });
448
+ }
449
+ createdItems.push('.claude/hooks/');
450
+ if (dryRun) {
451
+ console.log(' 📁 Would create directory: .claude/hooks/');
452
+ }
453
+ }
454
+
455
+ // Copy all files from template hooks directory
456
+ const hookFiles = fs.readdirSync(templateHooksDir);
457
+ for (const hookFile of hookFiles) {
458
+ const hookSrc = path.join(templateHooksDir, hookFile);
459
+ const hookDest = path.join(claudeHooksDir, hookFile);
460
+
461
+ if (fs.statSync(hookSrc).isFile()) {
462
+ if (!fs.existsSync(hookDest)) {
463
+ if (!dryRun) {
464
+ fs.copyFileSync(hookSrc, hookDest);
465
+ // Make shell scripts executable
466
+ if (hookFile.endsWith('.sh')) {
467
+ fs.chmodSync(hookDest, '755');
468
+ }
469
+ }
470
+ createdItems.push(`.claude/hooks/${hookFile}`);
471
+ if (dryRun) {
472
+ console.log(` ✨ Would copy: .claude/hooks/${hookFile}`);
473
+ }
474
+ } else {
475
+ if (conflictStrategy === 'overwrite') {
476
+ if (!dryRun) {
477
+ fs.copyFileSync(hookSrc, hookDest);
478
+ if (hookFile.endsWith('.sh')) {
479
+ fs.chmodSync(hookDest, '755');
480
+ }
481
+ }
482
+ if (dryRun) {
483
+ console.log(` ♻️ Would replace: .claude/hooks/${hookFile}`);
484
+ }
485
+ } else if (conflictStrategy === 'rename') {
486
+ const ext = path.extname(hookFile);
487
+ const baseName = path.basename(hookFile, ext);
488
+ let newDest = path.join(claudeHooksDir, `${baseName}-ccstart${ext}`);
489
+ let counter = 1;
490
+ while (fs.existsSync(newDest)) {
491
+ newDest = path.join(claudeHooksDir, `${baseName}-ccstart-${counter}${ext}`);
492
+ counter++;
493
+ }
494
+ if (!dryRun) {
495
+ fs.copyFileSync(hookSrc, newDest);
496
+ if (newDest.endsWith('.sh')) {
497
+ fs.chmodSync(newDest, '755');
498
+ }
499
+ }
500
+ const relativePath = path.relative(claudeDir, newDest);
501
+ createdItems.push(relativePath);
502
+ if (dryRun) {
503
+ console.log(` 📄 Would create: ${relativePath}`);
504
+ }
505
+ } else {
506
+ skippedItems.push(`.claude/hooks/${hookFile}`);
507
+ if (dryRun) {
508
+ console.log(` ⏭️ Would skip: .claude/hooks/${hookFile}`);
509
+ }
510
+ }
511
+ }
512
+ }
513
+ }
514
+ }
515
+
516
+ // Copy settings.json.example if it doesn't exist
517
+ const settingsExampleSrc = path.join(templateDir, '.claude', 'settings.json.example');
518
+ const settingsExampleDest = path.join(claudeDir, 'settings.json.example');
519
+
520
+ if (fs.existsSync(settingsExampleSrc) && !fs.existsSync(settingsExampleDest)) {
521
+ if (!dryRun) {
522
+ fs.copyFileSync(settingsExampleSrc, settingsExampleDest);
523
+ }
524
+ createdItems.push('.claude/settings.json.example');
525
+ if (dryRun) {
526
+ console.log(' ✨ Would copy: .claude/settings.json.example');
527
+ }
528
+ }
529
+
530
+ // Also create settings.json from the example if it doesn't exist
531
+ const settingsJsonDest = path.join(claudeDir, 'settings.json');
532
+ if (fs.existsSync(settingsExampleSrc) && !fs.existsSync(settingsJsonDest)) {
533
+ if (!dryRun) {
534
+ fs.copyFileSync(settingsExampleSrc, settingsJsonDest);
535
+ }
536
+ createdItems.push('.claude/settings.json');
537
+ if (dryRun) {
538
+ console.log(' ✨ Would create: .claude/settings.json (with hooks enabled)');
539
+ }
540
+ }
541
+
372
542
  return {
373
543
  createdItems,
374
544
  skippedItems,
@@ -1049,17 +1219,17 @@ async function main() {
1049
1219
  console.log(` ⏭️ Skipped ${claudeInitResult.skippedAgents} existing agents in .claude/agents`);
1050
1220
  }
1051
1221
 
1052
- console.log(`\n✅ Claude Code project ${flags.dryRun ? 'would be' : ''} created successfully!`);
1222
+ console.log(`\n✅ Claude Code project ${flags.dryRun ? 'would be ' : ''}created successfully!`);
1053
1223
 
1054
1224
  // Show summary of what happened
1055
1225
  if (fileConflicts.length > 0 || copiedCount > 0 || selectedAgentFiles.length > 0 || claudeInitResult) {
1056
1226
  console.log('\n📊 Summary:');
1057
- if (copiedCount > 0) console.log(` ✨ ${copiedCount} new files ${flags.dryRun ? 'would be' : ''} copied`);
1058
- if (skippedCount > 0) console.log(` ⏭️ ${skippedCount} existing files ${flags.dryRun ? 'would be' : ''} kept unchanged`);
1059
- if (renamedCount > 0) console.log(` 📄 ${renamedCount} template files ${flags.dryRun ? 'would be' : ''} saved with -ccstart suffix`);
1060
- if (overwrittenCount > 0) console.log(` ♻️ ${overwrittenCount} files ${flags.dryRun ? 'would be' : ''} replaced with template versions`);
1227
+ if (copiedCount > 0) console.log(` ✨ ${copiedCount} new files ${flags.dryRun ? 'would be ' : ''}copied`);
1228
+ if (skippedCount > 0) console.log(` ⏭️ ${skippedCount} existing files ${flags.dryRun ? 'would be ' : ''}kept unchanged`);
1229
+ if (renamedCount > 0) console.log(` 📄 ${renamedCount} template files ${flags.dryRun ? 'would be ' : ''}saved with -ccstart suffix`);
1230
+ if (overwrittenCount > 0) console.log(` ♻️ ${overwrittenCount} files ${flags.dryRun ? 'would be ' : ''}replaced with template versions`);
1061
1231
  if (!flags.noAgents && !flags.dryRun) {
1062
- console.log(` 🤖 ${selectedAgentFiles.length} agent${selectedAgentFiles.length === 1 ? '' : 's'} ${flags.dryRun ? 'would be' : ''} included in claude/agents`);
1232
+ console.log(` 🤖 ${selectedAgentFiles.length} agent${selectedAgentFiles.length === 1 ? '' : 's'} ${flags.dryRun ? 'would be ' : ''}included in claude/agents`);
1063
1233
  }
1064
1234
  if (claudeInitResult && claudeInitResult.createdItems.length > 0) {
1065
1235
  console.log(` 📁 ${claudeInitResult.createdItems.length} items created in .claude directory`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccstart",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Start your Claude Code projects with a well-organized structure including agents, tickets, plans and orchestration workflows",
5
5
  "bin": {
6
6
  "ccstart": "bin/create-project.js"
@@ -22,9 +22,9 @@
22
22
  "license": "MIT",
23
23
  "repository": {
24
24
  "type": "git",
25
- "url": "git+https://github.com/vichannnnn/claude-code.git"
25
+ "url": "git+https://github.com/vichannnnn/ccstart.git"
26
26
  },
27
- "homepage": "https://github.com/vichannnnn/claude-code#readme",
27
+ "homepage": "https://github.com/vichannnnn/ccstart#readme",
28
28
  "files": [
29
29
  "bin/",
30
30
  "template/",
@@ -0,0 +1,70 @@
1
+ # Claude Code Custom Commands
2
+
3
+ This directory contains custom slash commands for Claude Code. These commands enhance your development workflow by providing project-specific functionality.
4
+
5
+ ## Available Commands
6
+
7
+ ### /update-claude-md
8
+ Updates the CLAUDE.md file with project-specific information automatically detected from your codebase.
9
+
10
+ Usage: `/update-claude-md`
11
+
12
+ ## Creating Custom Commands
13
+
14
+ To create a new custom command:
15
+
16
+ 1. Create a new `.md` file in this directory (e.g., `my-command.md`)
17
+ 2. The filename becomes the command name (e.g., `/my-command`)
18
+ 3. Add your command prompt or instructions in the file
19
+
20
+ ### Command Structure
21
+
22
+ Basic command:
23
+ ```markdown
24
+ Analyze the codebase and provide a summary of the architecture
25
+ ```
26
+
27
+ Command with frontmatter:
28
+ ```markdown
29
+ ---
30
+ description: "Analyze project architecture"
31
+ allowedTools: ["Read", "Grep", "LS"]
32
+ model: "claude-3-sonnet-20240229"
33
+ ---
34
+
35
+ Analyze the codebase structure and provide:
36
+ 1. Project architecture overview
37
+ 2. Key components and their relationships
38
+ 3. Technology stack summary
39
+ ```
40
+
41
+ ### Using Arguments
42
+
43
+ Commands can accept arguments using `$ARGUMENTS`:
44
+ ```markdown
45
+ Search for all occurrences of "$ARGUMENTS" in the codebase and list the files
46
+ ```
47
+
48
+ Usage: `/search-term useState`
49
+
50
+ ### Executing Bash Commands
51
+
52
+ You can include bash commands to be executed:
53
+ ```markdown
54
+ Run the following command and analyze the output:
55
+ ```bash
56
+ npm test
57
+ ```
58
+ ```
59
+
60
+ ## Command Naming
61
+
62
+ - Use lowercase letters and hyphens
63
+ - Be descriptive but concise
64
+ - Examples: `update-docs`, `run-tests`, `analyze-deps`
65
+
66
+ ## Subdirectories
67
+
68
+ You can organize commands in subdirectories for namespacing:
69
+ - `.claude/commands/git/status.md` → `/git/status`
70
+ - `.claude/commands/npm/audit.md` → `/npm/audit`
@@ -0,0 +1,23 @@
1
+ ---
2
+ description: "Automatically update CLAUDE.md with project-specific information"
3
+ allowedTools: ["Read", "Write", "Edit", "Grep", "LS", "Bash"]
4
+ ---
5
+
6
+ I'll analyze your project and automatically update the CLAUDE.md file with project-specific information.
7
+
8
+ First, let me examine your project structure to understand:
9
+ 1. Project type and technology stack
10
+ 2. Available scripts and commands
11
+ 3. Directory structure
12
+ 4. Dependencies and frameworks
13
+ 5. Testing and build configurations
14
+
15
+ Then I'll update the following sections in CLAUDE.md:
16
+ - Project Overview
17
+ - Key Objectives (based on README if available)
18
+ - Common Commands
19
+ - Additional Notes
20
+
21
+ I'll preserve any existing custom content you've added while updating the auto-generated sections.
22
+
23
+ Let me start by analyzing your project...
@@ -0,0 +1,65 @@
1
+ # Claude Code Hooks
2
+
3
+ This directory contains hooks that automatically enhance Claude's behavior based on your interactions.
4
+
5
+ ## Available Hooks
6
+
7
+ ### workflow-detector.sh
8
+ Automatically detects when you're describing a task that matches one of our workflow patterns and suggests the appropriate workflow command.
9
+
10
+ **Detects:**
11
+ - Feature development requests
12
+ - Bug reports and fixes
13
+ - API development tasks
14
+ - QA and testing requests
15
+ - Refactoring needs
16
+ - UI component development
17
+
18
+ ### How It Works
19
+ When you type a message to Claude, the hook analyzes it for patterns and adds helpful context suggesting the appropriate workflow command.
20
+
21
+ ## Setup
22
+
23
+ 1. **Enable hooks in Claude Code settings**:
24
+ Create or update `.claude/settings.json`:
25
+ ```json
26
+ {
27
+ "hooks": {
28
+ "UserPromptSubmit": [
29
+ {
30
+ "hooks": [
31
+ {
32
+ "type": "command",
33
+ "command": ".claude/hooks/workflow-detector.sh"
34
+ }
35
+ ]
36
+ }
37
+ ]
38
+ }
39
+ }
40
+ ```
41
+
42
+ 2. **Make hooks executable**:
43
+ ```bash
44
+ chmod +x .claude/hooks/*.sh
45
+ ```
46
+
47
+ ## Examples
48
+
49
+ ### Input: "I need to add user authentication to my app"
50
+ **Hook adds**: "Detected feature request. Consider using /workflow-feature command for systematic implementation."
51
+
52
+ ### Input: "Fix the bug where users get logged out after 5 minutes"
53
+ **Hook adds**: "Detected bug report. Consider using /workflow-bug command for systematic debugging."
54
+
55
+ ### Input: "Create REST API for managing blog posts"
56
+ **Hook adds**: "Detected API development task. Consider using /workflow-api command."
57
+
58
+ ## Creating Custom Hooks
59
+
60
+ You can create your own hooks by:
61
+ 1. Adding a new script to this directory
62
+ 2. Updating `.claude/settings.json` to reference it
63
+ 3. Using exit codes and JSON output to control behavior
64
+
65
+ See Claude Code documentation for more details on hook development.
@@ -0,0 +1,61 @@
1
+ #!/bin/bash
2
+ # workflow-detector.sh - Detects workflow patterns in user prompts
3
+ # and suggests appropriate workflow commands
4
+
5
+ input=$(cat)
6
+
7
+ # Store original input for passthrough
8
+ original_input="$input"
9
+
10
+ # Initialize suggestions array
11
+ suggestions=""
12
+
13
+ # Detect feature requests
14
+ if echo "$input" | grep -iE "(implement|add|create|build|develop).*(feature|functionality|component|system)" > /dev/null; then
15
+ suggestions="${suggestions}🚀 Detected feature development task. Consider using: /workflow-feature [your feature description]\n"
16
+ fi
17
+
18
+ # Detect bug reports
19
+ if echo "$input" | grep -iE "(fix|bug|error|issue|broken|not working|problem|crash)" > /dev/null; then
20
+ suggestions="${suggestions}🐛 Detected bug fix task. Consider using: /workflow-bug [issue description]\n"
21
+ fi
22
+
23
+ # Detect API development
24
+ if echo "$input" | grep -iE "(api|endpoint|rest|graphql|route).*(create|implement|build|design)" > /dev/null; then
25
+ suggestions="${suggestions}🔌 Detected API development task. Consider using: /workflow-api [API description]\n"
26
+ fi
27
+
28
+ # Detect QA/testing requests
29
+ if echo "$input" | grep -iE "(test|qa|quality|review|audit|check).*(feature|code|implementation|system)" > /dev/null; then
30
+ suggestions="${suggestions}🧪 Detected QA task. Consider using: /workflow-qa [what to test]\n"
31
+ fi
32
+
33
+ # Detect refactoring needs
34
+ if echo "$input" | grep -iE "(refactor|improve|optimize|clean up|restructure).*(code|implementation|architecture)" > /dev/null; then
35
+ suggestions="${suggestions}🔧 Detected refactoring task. Consider using: /workflow-refactor [what to refactor]\n"
36
+ fi
37
+
38
+ # Detect UI component development
39
+ if echo "$input" | grep -iE "(ui|interface|component|frontend|design).*(create|implement|build|develop)" > /dev/null; then
40
+ suggestions="${suggestions}🎨 Detected UI development task. Consider using: /workflow-ui [component description]\n"
41
+ fi
42
+
43
+ # Detect blockchain/web3 development
44
+ if echo "$input" | grep -iE "(blockchain|smart contract|web3|defi|nft|crypto)" > /dev/null; then
45
+ suggestions="${suggestions}⛓️ Detected blockchain task. Consider using: /workflow-blockchain [blockchain feature]\n"
46
+ fi
47
+
48
+ # If we detected any patterns, add suggestions as additional context
49
+ if [ -n "$suggestions" ]; then
50
+ # Create JSON response with additional context
51
+ context="💡 Workflow Suggestions:\\n${suggestions}\\nThese commands will automatically orchestrate the appropriate agents for your task."
52
+
53
+ # Escape for JSON
54
+ context=$(echo -n "$context" | sed 's/"/\\"/g')
55
+
56
+ # Output JSON with additional context
57
+ echo "{\"additionalContext\": \"$context\"}"
58
+ else
59
+ # No patterns detected, pass through without modification
60
+ echo "$original_input"
61
+ fi
@@ -0,0 +1,18 @@
1
+ {
2
+ "hooks": {
3
+ "UserPromptSubmit": [
4
+ {
5
+ "description": "Detect workflow patterns and suggest appropriate commands",
6
+ "hooks": [
7
+ {
8
+ "type": "command",
9
+ "command": ".claude/hooks/workflow-detector.sh"
10
+ }
11
+ ]
12
+ }
13
+ ]
14
+ },
15
+ "tools": {
16
+ "enabled": true
17
+ }
18
+ }
@@ -1,14 +1,16 @@
1
1
  # Claude Code Project Instructions
2
2
 
3
3
  ## Project Overview
4
-
4
+ <!-- auto-generated-start:overview -->
5
5
  [Brief description of your project goes here]
6
+ <!-- auto-generated-end:overview -->
6
7
 
7
8
  ## Key Objectives
8
-
9
+ <!-- auto-generated-start:objectives -->
9
10
  - [Objective 1]
10
11
  - [Objective 2]
11
12
  - [Objective 3]
13
+ <!-- auto-generated-end:objectives -->
12
14
 
13
15
  ## Project Structure
14
16
 
@@ -16,7 +18,8 @@
16
18
  .
17
19
  ├── CLAUDE.md # This file - project instructions for Claude
18
20
  ├── .claude/ # Claude Code configuration (auto-generated)
19
- └── agents/ # Project-specific agent overrides
21
+ ├── agents/ # Project-specific agent overrides
22
+ │ └── commands/ # Custom slash commands for Claude Code
20
23
  ├── claude/ # Claude Code project organization
21
24
  │ ├── agents/ # Custom agents for specialized tasks
22
25
  │ ├── docs/ # Project documentation
@@ -45,14 +48,82 @@
45
48
  - Keep commits focused and atomic
46
49
  - Review changes before committing
47
50
 
48
- ## Common Commands
51
+ ## Commit Convention and Pull Request Guidelines
52
+
53
+ ### Commit Message Format
54
+ Follow the conventional commits specification:
55
+ ```
56
+ <type>(<scope>): <subject>
57
+
58
+ <body>
59
+
60
+ <footer>
61
+ ```
62
+
63
+ **Types:**
64
+ - `feat`: New feature
65
+ - `fix`: Bug fix
66
+ - `docs`: Documentation changes
67
+ - `style`: Code style changes (formatting, missing semicolons, etc.)
68
+ - `refactor`: Code refactoring without changing functionality
69
+ - `test`: Adding or modifying tests
70
+ - `chore`: Maintenance tasks (updating dependencies, build process, etc.)
71
+ - `perf`: Performance improvements
72
+
73
+ **Examples:**
74
+ ```
75
+ feat(auth): add password reset functionality
76
+ fix(api): handle null values in user response
77
+ docs: update API documentation for book endpoints
78
+ refactor(frontend): extract BookTable into separate components
79
+ chore(deps): update FastAPI to 0.104.1
80
+ ```
81
+
82
+ ### Pull Request Guidelines
83
+
84
+ **PR Title**: Use the same format as commit messages
49
85
 
86
+ **PR Description Template:**
87
+ ```markdown
88
+ ## Summary
89
+ Brief description of what this PR does and why it's needed.
90
+
91
+ ## Changes
92
+ - List of specific changes made
93
+ - Technical implementation details if relevant
94
+
95
+ ## Testing
96
+ - [ ] Tests pass (if applicable)
97
+ - [ ] Manual testing completed
98
+ - [ ] No console errors or warnings
99
+
100
+ ## Manual Testing Steps
101
+ 1. Describe steps to manually test the feature
102
+ 2. Expected behavior and edge cases tested
103
+
104
+ ## Screenshots (if UI changes)
105
+ Attach relevant screenshots here
106
+
107
+ ## Related Issues
108
+ Closes #XXX (if applicable)
109
+
110
+ ## Checklist
111
+ - [ ] Code follows project conventions
112
+ - [ ] Self-documented code without unnecessary comments
113
+ - [ ] All tests pass
114
+ - [ ] Documentation updated if needed
115
+ - [ ] No sensitive information exposed
116
+ ```
117
+
118
+ ## Common Commands
119
+ <!-- auto-generated-start:commands -->
50
120
  ```bash
51
121
  # Add your common project commands here
52
122
  # npm install
53
123
  # npm run dev
54
124
  # npm test
55
125
  ```
126
+ <!-- auto-generated-end:commands -->
56
127
 
57
128
  ## Important Context
58
129
 
@@ -66,6 +137,12 @@ See @claude/agents/README.md for available agents and their purposes
66
137
 
67
138
  After adding the agents you want to in `./claude/agents` folder, setup the workflow for Claude code to follow
68
139
 
140
+ ## Custom Commands
141
+
142
+ Custom slash commands are available in `.claude/commands/`:
143
+ - **/update-claude-md** - Automatically updates this file with project-specific information
144
+ - See `.claude/commands/README.md` for creating your own commands
145
+
69
146
  ## Tickets
70
147
 
71
148
  See @claude/tickets/README.md for ticket format and management approach
@@ -100,5 +177,6 @@ Before starting any task:
100
177
  6. **Maintain ticket list**: Always update @claude/tickets/ticket-list.md when creating, updating, or completing tickets to maintain a clear project overview
101
178
 
102
179
  ## Additional Notes
103
-
104
- [Any other important information for Claude to know about this project]
180
+ <!-- auto-generated-start:notes -->
181
+ [Any other important information for Claude to know about this project]
182
+ <!-- auto-generated-end:notes -->