claude-cli-advanced-starter-pack 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/LICENSE +21 -0
  2. package/OVERVIEW.md +597 -0
  3. package/README.md +439 -0
  4. package/bin/gtask.js +282 -0
  5. package/bin/postinstall.js +53 -0
  6. package/package.json +69 -0
  7. package/src/agents/phase-dev-templates.js +1011 -0
  8. package/src/agents/templates.js +668 -0
  9. package/src/analysis/checklist-parser.js +414 -0
  10. package/src/analysis/codebase.js +481 -0
  11. package/src/cli/menu.js +958 -0
  12. package/src/commands/claude-audit.js +1482 -0
  13. package/src/commands/claude-settings.js +2243 -0
  14. package/src/commands/create-agent.js +681 -0
  15. package/src/commands/create-command.js +337 -0
  16. package/src/commands/create-hook.js +262 -0
  17. package/src/commands/create-phase-dev/codebase-analyzer.js +813 -0
  18. package/src/commands/create-phase-dev/documentation-generator.js +352 -0
  19. package/src/commands/create-phase-dev/post-completion.js +404 -0
  20. package/src/commands/create-phase-dev/scale-calculator.js +344 -0
  21. package/src/commands/create-phase-dev/wizard.js +492 -0
  22. package/src/commands/create-phase-dev.js +481 -0
  23. package/src/commands/create-skill.js +313 -0
  24. package/src/commands/create.js +446 -0
  25. package/src/commands/decompose.js +392 -0
  26. package/src/commands/detect-tech-stack.js +768 -0
  27. package/src/commands/explore-mcp/claude-md-updater.js +252 -0
  28. package/src/commands/explore-mcp/mcp-installer.js +346 -0
  29. package/src/commands/explore-mcp/mcp-registry.js +438 -0
  30. package/src/commands/explore-mcp.js +638 -0
  31. package/src/commands/gtask-init.js +641 -0
  32. package/src/commands/help.js +128 -0
  33. package/src/commands/init.js +1890 -0
  34. package/src/commands/install.js +250 -0
  35. package/src/commands/list.js +116 -0
  36. package/src/commands/roadmap.js +750 -0
  37. package/src/commands/setup-wizard.js +482 -0
  38. package/src/commands/setup.js +351 -0
  39. package/src/commands/sync.js +534 -0
  40. package/src/commands/test-run.js +456 -0
  41. package/src/commands/test-setup.js +456 -0
  42. package/src/commands/validate.js +67 -0
  43. package/src/config/tech-stack.defaults.json +182 -0
  44. package/src/config/tech-stack.schema.json +502 -0
  45. package/src/github/client.js +359 -0
  46. package/src/index.js +84 -0
  47. package/src/templates/claude-command.js +244 -0
  48. package/src/templates/issue-body.js +284 -0
  49. package/src/testing/config.js +411 -0
  50. package/src/utils/template-engine.js +398 -0
  51. package/src/utils/validate-templates.js +223 -0
  52. package/src/utils.js +396 -0
  53. package/templates/commands/ccasp-setup.template.md +113 -0
  54. package/templates/commands/context-audit.template.md +97 -0
  55. package/templates/commands/create-task-list.template.md +382 -0
  56. package/templates/commands/deploy-full.template.md +261 -0
  57. package/templates/commands/github-task-start.template.md +99 -0
  58. package/templates/commands/github-update.template.md +69 -0
  59. package/templates/commands/happy-start.template.md +117 -0
  60. package/templates/commands/phase-track.template.md +142 -0
  61. package/templates/commands/tunnel-start.template.md +127 -0
  62. package/templates/commands/tunnel-stop.template.md +106 -0
  63. package/templates/hooks/context-guardian.template.js +173 -0
  64. package/templates/hooks/deployment-orchestrator.template.js +219 -0
  65. package/templates/hooks/github-progress-hook.template.js +197 -0
  66. package/templates/hooks/happy-checkpoint-manager.template.js +222 -0
  67. package/templates/hooks/phase-dev-enforcer.template.js +183 -0
package/README.md ADDED
@@ -0,0 +1,439 @@
1
+ # Claude CLI Advanced Starter Pack
2
+
3
+ **Advanced Claude Code CLI Toolkit - Agents, Hooks, Skills, MCP Servers, Phased Development, and GitHub Integration**
4
+
5
+ A platform-agnostic toolkit for supercharging your Claude Code CLI experience with:
6
+ - Vibe-code friendly setup wizard (mobile-ready, single-character inputs)
7
+ - Tech stack auto-detection and template-based configuration
8
+ - L1/L2/L3 agent hierarchy, hooks, and RAG-enhanced skills
9
+ - GitHub Project Board integration with codebase analysis
10
+ - Phased development planning with 95%+ success rate
11
+
12
+ ## Important: Two Types of Commands
13
+
14
+ This package provides **two types of commands**:
15
+
16
+ | Type | Where to Run | Example | AI Required? |
17
+ |------|--------------|---------|--------------|
18
+ | **Terminal Commands** | Your shell (bash, PowerShell, etc.) | `ccasp wizard` | No - file-based detection |
19
+ | **Slash Commands** | Inside Claude Code CLI | `/menu`, `/github-update` | Yes - AI-powered |
20
+
21
+ **The "auto-detection" in terminal commands does NOT use AI.** It reads your project files (`package.json`, config files, directory structure) to detect frameworks and settings - pure pattern matching.
22
+
23
+ ## Quick Start
24
+
25
+ ```bash
26
+ # STEP 1: Install globally (terminal command)
27
+ npm install -g claude-cli-advanced-starter-pack
28
+
29
+ # STEP 2: Run setup wizard (terminal command - no AI needed)
30
+ ccasp wizard
31
+
32
+ # STEP 3: Restart Claude Code CLI, then use slash commands (AI-powered)
33
+ # Inside Claude: /menu, /github-update, /deploy-full, etc.
34
+ ```
35
+
36
+ After installation, a welcome message shows your options:
37
+
38
+ ```
39
+ 🚀 Claude CLI Advanced Starter Pack
40
+
41
+ ✓ Installation complete!
42
+
43
+ Quick Setup Options:
44
+
45
+ 1. Run vibe-friendly setup wizard:
46
+ $ npx ccasp wizard
47
+
48
+ 2. Quick init (auto-detect + deploy):
49
+ $ npx ccasp init
50
+
51
+ 3. Full interactive menu:
52
+ $ npx ccasp
53
+ ```
54
+
55
+ ## Features
56
+
57
+ ### Vibe-Code Friendly Setup Wizard
58
+
59
+ Mobile-ready setup with single-character inputs:
60
+
61
+ ```
62
+ 🚀 CCASP Setup Wizard
63
+
64
+ ? What would you like to do?
65
+ 1. Quick Start - Detect stack + init .claude
66
+ 2. Full Setup - All features + customization
67
+ 3. GitHub Setup - Connect project board
68
+ 4. Audit CLAUDE.md - Check existing config
69
+ 5. Enhance CLAUDE.md - Generate/improve docs
70
+ 6. Detect Tech Stack - Auto-detect project
71
+ 7. View Templates - Browse available items
72
+ 8. Project Settings - Configure deployment, tunnels, etc.
73
+ 0. Exit
74
+ ```
75
+
76
+ **Feature Presets** (just type A, B, C, or D):
77
+ | Letter | Preset | Features |
78
+ |--------|--------|----------|
79
+ | A | Minimal | Menu + help only |
80
+ | B | Standard | GitHub + phased dev (recommended) |
81
+ | C | Full | All features including deployment |
82
+ | D | Custom | Pick individual features |
83
+
84
+ ### Tech Stack Auto-Detection (No AI Required)
85
+
86
+ **This is file-based pattern matching, not AI inference.** The detection reads your project files:
87
+
88
+ | File/Pattern | What It Detects |
89
+ |--------------|-----------------|
90
+ | `package.json` | React, Vue, Next.js, Express, testing tools |
91
+ | `vite.config.js` | Vite bundler |
92
+ | `next.config.js` | Next.js framework |
93
+ | `tsconfig.json` | TypeScript usage |
94
+ | `.git/config` | Repository URL |
95
+ | `src/`, `apps/`, `backend/` | Project structure |
96
+
97
+ Generates `tech-stack.json` with all detected values for template placeholders.
98
+
99
+ ### Platform-Agnostic Templates
100
+
101
+ All templates use `{{placeholder}}` syntax - no hardcoded values:
102
+
103
+ ```markdown
104
+ {{#if deployment.backend.platform}}
105
+ ## Backend Deployment
106
+
107
+ {{#if (eq deployment.backend.platform "railway")}}
108
+ Using Railway MCP:
109
+ mcp__railway-mcp-server__deployment_trigger({
110
+ projectId: "{{deployment.backend.projectId}}",
111
+ serviceId: "{{deployment.backend.serviceId}}"
112
+ })
113
+ {{/if}}
114
+
115
+ {{#if (eq deployment.backend.platform "vercel")}}
116
+ Using Vercel:
117
+ vercel --prod
118
+ {{/if}}
119
+ {{/if}}
120
+ ```
121
+
122
+ ### Claude Code Tooling
123
+
124
+ - **Agent Creation Suite** - Create L1 orchestrators, L2 specialists, L3 workers, and RAG pipelines
125
+ - **Hook Generator** - Build PreToolUse, PostToolUse, and UserPromptSubmit enforcement hooks
126
+ - **Skill Builder** - Create RAG-enhanced skill packages with context and workflows
127
+ - **Command Generator** - Create custom slash commands for Claude Code
128
+ - **Claude Settings** - Configure permissions, agent-only mode, and allow/deny rules
129
+ - **Claude Audit + Enhance** - Verify and generate CLAUDE.md against Anthropic best practices
130
+
131
+ ### Optional Features
132
+
133
+ Select during setup - each adds specific commands and hooks:
134
+
135
+ | Feature | Description | Commands Added |
136
+ |---------|-------------|----------------|
137
+ | **GitHub Integration** | Project Board tracking, issue creation | `/github-update`, `/github-task-start` |
138
+ | **Token Management** | API usage tracking with thresholds | `/context-audit` |
139
+ | **Phased Development** | 95%+ success rate planning | `/phase-dev-plan`, `/phase-track` |
140
+ | **Deployment Automation** | Railway, Vercel, Cloudflare, self-hosted | `/deploy-full` |
141
+ | **Tunnel Services** | ngrok, localtunnel, cloudflare-tunnel | `/tunnel-start`, `/tunnel-stop` |
142
+ | **Happy Mode** | Mobile app integration | `/happy-start` |
143
+
144
+ Features marked with (*) require post-install configuration via `/menu` → Project Settings.
145
+
146
+ ### MCP Server Explorer
147
+
148
+ Discover and install MCP servers based on your tech stack:
149
+
150
+ ```bash
151
+ ccasp explore-mcp # Interactive menu
152
+ ccasp explore-mcp --recommend # Auto-recommend based on codebase
153
+ ccasp explore-mcp --testing # Quick install Playwright + Puppeteer
154
+ ```
155
+
156
+ **Available Categories:** Testing, VCS, Deployment, Database, Automation, Communication, Utilities
157
+
158
+ ### Phased Development Plans
159
+
160
+ Create comprehensive development plans with 95%+ success probability:
161
+
162
+ ```bash
163
+ ccasp create-phase-dev # Interactive wizard
164
+ ccasp create-phase-dev --scale M # Medium: 3-4 phases
165
+ ccasp create-phase-dev --autonomous # Minimal prompts
166
+ ```
167
+
168
+ **Generated Artifacts:**
169
+ - `PROGRESS.json` - Task tracking and state management
170
+ - `EXECUTIVE_SUMMARY.md` - Project overview
171
+ - Phase Executor Agent - Autonomous execution
172
+ - Slash Command - `/phase-dev-{project-slug}`
173
+
174
+ ### GitHub Integration
175
+
176
+ ```bash
177
+ ccasp create # Create issue with codebase analysis
178
+ ccasp decompose 123 # Break down issue into tasks
179
+ ccasp sync watch 123 # Bidirectional sync
180
+ ccasp list # List recent tasks
181
+ ```
182
+
183
+ ## Installation Paths
184
+
185
+ ### Path A: Vibe Wizard (Recommended)
186
+
187
+ ```bash
188
+ npm install -g claude-cli-advanced-starter-pack
189
+ ccasp wizard
190
+ ```
191
+
192
+ Single-character inputs, mobile-friendly, progressive disclosure.
193
+
194
+ ### Path B: Quick Init
195
+
196
+ ```bash
197
+ npx claude-cli-advanced-starter-pack init
198
+ ```
199
+
200
+ Auto-detects tech stack, deploys commands with minimal prompts.
201
+
202
+ ### Path C: Full Wizard
203
+
204
+ ```bash
205
+ ccasp project-init
206
+ ```
207
+
208
+ Full interactive wizard with all configuration options.
209
+
210
+ ## What Gets Installed
211
+
212
+ After running init, your project gets:
213
+
214
+ ```
215
+ .claude/
216
+ ├── commands/ # Slash commands
217
+ │ ├── menu.md
218
+ │ ├── ccasp-setup.md # Setup wizard (always included)
219
+ │ ├── github-update.md
220
+ │ └── ...
221
+ ├── agents/ # Agent definitions
222
+ ├── skills/ # Skill packages
223
+ ├── hooks/ # Enforcement hooks
224
+ ├── docs/ # Generated documentation
225
+ ├── settings.json # Project settings
226
+ └── tech-stack.json # Detected/configured values
227
+ ```
228
+
229
+ **Safe Integration:** Existing `.claude/` folders are preserved - new files are added alongside.
230
+
231
+ ## After Installation
232
+
233
+ **Important:** Changes to `.claude/` require a new Claude Code session.
234
+
235
+ ```
236
+ ⚠️ RESTART REQUIRED
237
+
238
+ Changes to .claude/ require a new Claude Code session.
239
+
240
+ To apply changes:
241
+ 1. Exit this session (Ctrl+C or /exit)
242
+ 2. Restart: claude or claude .
243
+ 3. New commands will be available
244
+ ```
245
+
246
+ ## Commands Reference
247
+
248
+ ### Setup Commands (Terminal - one-time use)
249
+
250
+ These terminal commands are used **once** to set up your project. They don't require AI.
251
+
252
+ | Command | Description |
253
+ |---------|-------------|
254
+ | `ccasp wizard` | **Vibe-code friendly setup wizard** |
255
+ | `ccasp init` | Deploy slash commands to project |
256
+ | `ccasp detect-stack` | Auto-detect tech stack (reads files) |
257
+
258
+ ### Slash Commands (Inside Claude Code CLI - AI-powered)
259
+
260
+ After running `ccasp init`, these slash commands become available inside Claude Code CLI. They are AI-powered and can understand context, execute complex tasks, and interact with your codebase intelligently.
261
+
262
+ **Core Commands (always installed):**
263
+
264
+ | Command | Description |
265
+ |---------|-------------|
266
+ | `/menu` | Interactive ASCII menu |
267
+ | `/ccasp-setup` | Setup wizard (vibe-code friendly) |
268
+ | `/e2e-test` | Run E2E tests with Playwright |
269
+ | `/create-agent` | Create L1/L2/L3 agents |
270
+ | `/create-hook` | Build enforcement hooks |
271
+ | `/create-skill` | Create RAG skill packages |
272
+ | `/explore-mcp` | Discover MCP servers |
273
+ | `/claude-audit` | Audit CLAUDE.md |
274
+ | `/phase-dev-plan` | Create phased development plans |
275
+ | `/create-task-list` | Create intelligent task list |
276
+ | `/codebase-explorer` | Analyze codebase structure |
277
+
278
+ **Feature-Specific Commands (based on preset selection):**
279
+
280
+ | Command | Feature | Description |
281
+ |---------|---------|-------------|
282
+ | `/github-update` | GitHub Integration | View Project Board status |
283
+ | `/github-task-start` | GitHub Integration | Start/complete GitHub task |
284
+ | `/phase-track` | Phased Development | Track phase progress |
285
+ | `/deploy-full` | Deployment Automation | Full-stack deployment |
286
+ | `/tunnel-start` | Tunnel Services | Start ngrok/localtunnel |
287
+ | `/tunnel-stop` | Tunnel Services | Stop tunnel |
288
+ | `/context-audit` | Token Management | Audit token usage |
289
+ | `/happy-start` | Happy Mode | Start mobile integration |
290
+
291
+ > **Note:** Slash commands are created in `.claude/commands/` by the terminal commands. You must restart Claude Code CLI after running `ccasp init` for slash commands to become available.
292
+
293
+ ## Configuration
294
+
295
+ ### tech-stack.json
296
+
297
+ Auto-generated during init with detected values:
298
+
299
+ ```json
300
+ {
301
+ "version": "2.0.0",
302
+ "project": {
303
+ "name": "my-project",
304
+ "type": "fullstack"
305
+ },
306
+ "frontend": {
307
+ "framework": "react",
308
+ "port": 5173
309
+ },
310
+ "backend": {
311
+ "framework": "fastapi",
312
+ "port": 8001
313
+ },
314
+ "deployment": {
315
+ "backend": {
316
+ "platform": "railway",
317
+ "projectId": "{{DEPLOY_BACKEND_PROJECT_ID}}"
318
+ }
319
+ },
320
+ "githubIntegration": { "enabled": true },
321
+ "phasedDevelopment": { "enabled": true },
322
+ "tokenManagement": { "enabled": false }
323
+ }
324
+ ```
325
+
326
+ ### Post-Install Configuration
327
+
328
+ For features requiring additional setup, use the Project Settings menu:
329
+
330
+ ```bash
331
+ ccasp wizard
332
+ # Select: 8. Project Settings
333
+ ```
334
+
335
+ Or from Claude Code CLI:
336
+ ```
337
+ /menu → Project Settings
338
+ ```
339
+
340
+ Configure:
341
+ - GitHub Project Board connection
342
+ - Deployment platform credentials
343
+ - Tunnel service selection
344
+ - Token management thresholds
345
+ - Happy Mode settings
346
+
347
+ ## Template Engine
348
+
349
+ Supports advanced templating:
350
+
351
+ ```handlebars
352
+ {{#if condition}}...{{/if}}
353
+ {{#if (eq path "value")}}...{{/if}}
354
+ {{#each array}}{{this}}{{/each}}
355
+ ${CWD}, ${HOME} path variables
356
+ ```
357
+
358
+ ## Prerequisites
359
+
360
+ 1. **Node.js 18+**
361
+ 2. **GitHub CLI** (`gh`) - For GitHub integration features
362
+
363
+ ```bash
364
+ gh --version # Should be 2.40+
365
+ node --version # Should be 18+
366
+ gh auth login # Authenticate
367
+ ```
368
+
369
+ ## API Usage
370
+
371
+ ```javascript
372
+ import {
373
+ runSetupWizard,
374
+ detectTechStack,
375
+ runClaudeAudit,
376
+ runEnhancement,
377
+ ENHANCEMENT_TEMPLATES,
378
+ replacePlaceholders,
379
+ } from 'claude-cli-advanced-starter-pack';
380
+
381
+ // Detect tech stack
382
+ const techStack = await detectTechStack(process.cwd());
383
+
384
+ // Generate CLAUDE.md content
385
+ const content = ENHANCEMENT_TEMPLATES.fullTemplate(techStack, 'My Project');
386
+
387
+ // Process templates with values
388
+ const { content, warnings } = replacePlaceholders(template, techStack);
389
+ ```
390
+
391
+ ## CLI Aliases
392
+
393
+ - `ccasp` - Short form (recommended)
394
+ - `ccasp w` - Wizard shortcut
395
+ - `claude-advanced` - Medium form
396
+ - `claude-cli-advanced-starter-pack` - Full name
397
+
398
+ ## Architecture
399
+
400
+ ```
401
+ ┌─────────────────────────────────────────────────────────────┐
402
+ │ CLAUDE CLI ADVANCED STARTER PACK │
403
+ │ │
404
+ │ PHASE 1: TERMINAL (No AI) ───────────────────────────── │
405
+ │ │
406
+ │ npm install → postinstall message → ccasp wizard │
407
+ │ │
408
+ │ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
409
+ │ │ Tech Stack │ │ Template │ │ Feature │ │
410
+ │ │ Detection │→ │ Engine │→ │ Selection │ │
411
+ │ │ (file-based)│ │(no AI) │ │(interactive)│ │
412
+ │ └─────────────┘ └─────────────┘ └─────────────┘ │
413
+ │ ↓ │
414
+ │ ┌─────────────────────────────────────────────────┐ │
415
+ │ │ YOUR PROJECT (.claude/) │ │
416
+ │ │ commands/ │ agents/ │ skills/ │ hooks/ │ docs/ │ │
417
+ │ └─────────────────────────────────────────────────┘ │
418
+ │ │
419
+ │ PHASE 2: CLAUDE CODE CLI (AI-Powered) ───────────────── │
420
+ │ │
421
+ │ ┌─────────────────────────────────────────────────┐ │
422
+ │ │ CLAUDE CODE CLI (restart required) │ │
423
+ │ │ /menu │ /ccasp-setup │ /github-update │ ... │ │
424
+ │ │ ↑ These are AI-powered slash commands │ │
425
+ │ └─────────────────────────────────────────────────┘ │
426
+ └─────────────────────────────────────────────────────────────┘
427
+ ```
428
+
429
+ ## Contributing
430
+
431
+ Contributions welcome! Please read our contributing guidelines first.
432
+
433
+ ## License
434
+
435
+ MIT
436
+
437
+ ---
438
+
439
+ **Made for Claude Code CLI** - Supercharge your AI-assisted development workflow.