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
@@ -0,0 +1,313 @@
1
+ /**
2
+ * Create Skill Command
3
+ *
4
+ * Interactive wizard for creating Claude Code RAG-enhanced skills
5
+ */
6
+
7
+ import chalk from 'chalk';
8
+ import inquirer from 'inquirer';
9
+ import ora from 'ora';
10
+ import { existsSync, mkdirSync, writeFileSync } from 'fs';
11
+ import { join } from 'path';
12
+ import { showHeader, showSuccess, showError, showWarning, showInfo } from '../cli/menu.js';
13
+ import {
14
+ generateSkillTemplate,
15
+ generateSkillContextReadme,
16
+ generateSkillWorkflowsReadme,
17
+ generateAgentTemplate,
18
+ } from '../agents/templates.js';
19
+
20
+ /**
21
+ * Run the create-skill wizard
22
+ */
23
+ export async function runCreateSkill(options) {
24
+ showHeader('Create Skill Package');
25
+
26
+ console.log(chalk.dim('Skills are RAG-enhanced packages with context, patterns, and workflows.'));
27
+ console.log(chalk.dim('They can be invoked with skill: "name" or via slash commands.\n'));
28
+
29
+ // Step 1: Skill name
30
+ const { name } = await inquirer.prompt([
31
+ {
32
+ type: 'input',
33
+ name: 'name',
34
+ message: 'Skill name (kebab-case):',
35
+ default: options.name || 'my-skill',
36
+ validate: (input) => {
37
+ if (!/^[a-z][a-z0-9-]*$/.test(input)) {
38
+ return 'Use kebab-case (lowercase letters, numbers, hyphens)';
39
+ }
40
+ return true;
41
+ },
42
+ },
43
+ ]);
44
+
45
+ // Step 2: Description
46
+ const { description } = await inquirer.prompt([
47
+ {
48
+ type: 'input',
49
+ name: 'description',
50
+ message: 'What does this skill provide?',
51
+ default: `${name} domain expertise and workflows`,
52
+ },
53
+ ]);
54
+
55
+ // Step 3: Triggers
56
+ console.log('');
57
+ console.log(chalk.cyan.bold('Triggers:'));
58
+ console.log(chalk.dim(' Skills activate on slash commands, keywords, or explicit invocation.'));
59
+ console.log('');
60
+
61
+ const { triggers } = await inquirer.prompt([
62
+ {
63
+ type: 'input',
64
+ name: 'triggers',
65
+ message: 'Trigger patterns (comma-separated):',
66
+ default: `/${name}, skill: "${name}"`,
67
+ filter: (input) =>
68
+ input
69
+ .split(',')
70
+ .map((t) => t.trim())
71
+ .filter(Boolean),
72
+ },
73
+ ]);
74
+
75
+ // Step 4: Knowledge areas
76
+ const { knowledgeAreas } = await inquirer.prompt([
77
+ {
78
+ type: 'input',
79
+ name: 'knowledgeAreas',
80
+ message: 'Areas of expertise (comma-separated):',
81
+ default: 'Best practices, Common patterns, Domain knowledge',
82
+ filter: (input) =>
83
+ input
84
+ .split(',')
85
+ .map((k) => k.trim())
86
+ .filter(Boolean),
87
+ },
88
+ ]);
89
+
90
+ // Step 5: Create workflows?
91
+ const { createWorkflows } = await inquirer.prompt([
92
+ {
93
+ type: 'confirm',
94
+ name: 'createWorkflows',
95
+ message: 'Create agent workflows for this skill?',
96
+ default: true,
97
+ },
98
+ ]);
99
+
100
+ const workflows = [];
101
+ if (createWorkflows) {
102
+ let addingWorkflows = true;
103
+
104
+ while (addingWorkflows) {
105
+ const { workflowName, workflowDesc } = await inquirer.prompt([
106
+ {
107
+ type: 'input',
108
+ name: 'workflowName',
109
+ message: 'Workflow name:',
110
+ default: workflows.length === 0 ? 'analyzer' : 'implementer',
111
+ },
112
+ {
113
+ type: 'input',
114
+ name: 'workflowDesc',
115
+ message: 'Workflow description:',
116
+ default: `${name} workflow agent`,
117
+ },
118
+ ]);
119
+
120
+ workflows.push({
121
+ name: workflowName,
122
+ file: `${workflowName}-agent.md`,
123
+ description: workflowDesc,
124
+ });
125
+
126
+ const { continueAdding } = await inquirer.prompt([
127
+ {
128
+ type: 'confirm',
129
+ name: 'continueAdding',
130
+ message: 'Add another workflow?',
131
+ default: workflows.length < 2,
132
+ },
133
+ ]);
134
+ addingWorkflows = continueAdding;
135
+ }
136
+ }
137
+
138
+ // Step 6: Create hooks?
139
+ const { createHooks } = await inquirer.prompt([
140
+ {
141
+ type: 'confirm',
142
+ name: 'createHooks',
143
+ message: 'Create enforcement hooks for this skill?',
144
+ default: false,
145
+ },
146
+ ]);
147
+
148
+ const hooks = [];
149
+ if (createHooks) {
150
+ const { hookName } = await inquirer.prompt([
151
+ {
152
+ type: 'input',
153
+ name: 'hookName',
154
+ message: 'Hook name:',
155
+ default: `${name}-enforcer`,
156
+ },
157
+ ]);
158
+ hooks.push(`${hookName}.js`);
159
+ }
160
+
161
+ // Step 7: Output location
162
+ const { outputPath } = await inquirer.prompt([
163
+ {
164
+ type: 'list',
165
+ name: 'outputPath',
166
+ message: 'Where should the skill be created?',
167
+ choices: [
168
+ { name: '.claude/skills/ (standard location)', value: '.claude/skills' },
169
+ { name: 'Custom location', value: 'custom' },
170
+ ],
171
+ },
172
+ ]);
173
+
174
+ let basePath = join(process.cwd(), outputPath, name);
175
+ if (outputPath === 'custom') {
176
+ const { customPath } = await inquirer.prompt([
177
+ {
178
+ type: 'input',
179
+ name: 'customPath',
180
+ message: 'Custom base path:',
181
+ default: `.claude/skills/${name}`,
182
+ },
183
+ ]);
184
+ basePath = join(process.cwd(), customPath);
185
+ }
186
+
187
+ // Generate the skill
188
+ const spinner = ora('Generating skill package...').start();
189
+
190
+ // Create directory structure
191
+ const dirs = [basePath, join(basePath, 'context'), join(basePath, 'context', 'patterns'), join(basePath, 'workflows')];
192
+
193
+ for (const dir of dirs) {
194
+ if (!existsSync(dir)) {
195
+ mkdirSync(dir, { recursive: true });
196
+ }
197
+ }
198
+
199
+ // Generate files
200
+ const files = [];
201
+
202
+ // 1. SKILL.md
203
+ const skillContent = generateSkillTemplate({
204
+ name,
205
+ description,
206
+ triggers,
207
+ knowledgeAreas,
208
+ workflows,
209
+ hooks,
210
+ });
211
+ const skillPath = join(basePath, 'SKILL.md');
212
+ writeFileSync(skillPath, skillContent, 'utf8');
213
+ files.push(skillPath);
214
+
215
+ // 2. Context README
216
+ const contextReadme = generateSkillContextReadme({
217
+ name,
218
+ description,
219
+ knowledgeAreas,
220
+ });
221
+ const contextPath = join(basePath, 'context', 'README.md');
222
+ writeFileSync(contextPath, contextReadme, 'utf8');
223
+ files.push(contextPath);
224
+
225
+ // 3. Workflows README
226
+ const workflowsReadme = generateSkillWorkflowsReadme({
227
+ name,
228
+ workflows,
229
+ });
230
+ const workflowsPath = join(basePath, 'workflows', 'README.md');
231
+ writeFileSync(workflowsPath, workflowsReadme, 'utf8');
232
+ files.push(workflowsPath);
233
+
234
+ // 4. Generate workflow agent files
235
+ for (const workflow of workflows) {
236
+ const agentContent = generateAgentTemplate({
237
+ name: `${name}-${workflow.name}`,
238
+ description: workflow.description,
239
+ level: 'L2',
240
+ tools: ['Read', 'Grep', 'Glob', 'Task'],
241
+ model: 'sonnet',
242
+ specialization: `Specialized for ${workflow.name} tasks in the ${name} domain.`,
243
+ whenToUse: [
244
+ `When ${workflow.name} operations are needed`,
245
+ `When working within the ${name} skill context`,
246
+ ],
247
+ workflow: [
248
+ { title: 'Analyze', instructions: 'Analyze the request and gather context.' },
249
+ { title: 'Execute', instructions: 'Perform the workflow task.' },
250
+ { title: 'Report', instructions: 'Summarize findings and next steps.' },
251
+ ],
252
+ });
253
+ const agentPath = join(basePath, 'workflows', workflow.file);
254
+ writeFileSync(agentPath, agentContent, 'utf8');
255
+ files.push(agentPath);
256
+ }
257
+
258
+ // 5. Create patterns placeholder
259
+ const patternsReadme = `# ${name} - Patterns
260
+
261
+ Common patterns and best practices for ${name}.
262
+
263
+ ## Contents
264
+
265
+ Add pattern documentation here:
266
+ - \`naming-conventions.md\`
267
+ - \`common-patterns.md\`
268
+ - \`anti-patterns.md\`
269
+
270
+ ---
271
+ *Part of ${name} skill*
272
+ `;
273
+ const patternsPath = join(basePath, 'context', 'patterns', 'README.md');
274
+ writeFileSync(patternsPath, patternsReadme, 'utf8');
275
+ files.push(patternsPath);
276
+
277
+ spinner.succeed('Skill package created');
278
+
279
+ // Summary
280
+ const details = [
281
+ `Name: ${name}`,
282
+ `Triggers: ${triggers.join(', ')}`,
283
+ `Knowledge areas: ${knowledgeAreas.length}`,
284
+ `Workflows: ${workflows.length}`,
285
+ hooks.length > 0 ? `Hooks: ${hooks.join(', ')}` : '',
286
+ '',
287
+ 'Files created:',
288
+ ...files.map((f) => ` ${f.replace(process.cwd(), '.')}`),
289
+ ].filter(Boolean);
290
+
291
+ showSuccess('Skill Package Created!', details);
292
+
293
+ // Directory structure
294
+ console.log(chalk.dim('\nDirectory structure:'));
295
+ console.log(chalk.cyan(`
296
+ ${basePath.replace(process.cwd(), '.')}/
297
+ ├── SKILL.md # Main skill definition
298
+ ├── context/
299
+ │ ├── README.md # Context overview
300
+ │ └── patterns/
301
+ │ └── README.md # Pattern documentation
302
+ └── workflows/
303
+ ├── README.md # Workflow index
304
+ ${workflows.map((w) => ` └── ${w.file}`).join('\n')}
305
+ `));
306
+
307
+ // Instructions
308
+ console.log(chalk.dim('To use this skill in Claude Code:'));
309
+ console.log(chalk.cyan(` skill: "${name}"`));
310
+ console.log('');
311
+
312
+ return { name, path: basePath, files, workflows };
313
+ }