claude-cli-advanced-starter-pack 1.1.0 → 1.8.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.
Files changed (56) hide show
  1. package/OVERVIEW.md +5 -1
  2. package/README.md +241 -132
  3. package/bin/gtask.js +53 -0
  4. package/package.json +1 -1
  5. package/src/cli/menu.js +27 -0
  6. package/src/commands/explore-mcp/mcp-registry.js +99 -0
  7. package/src/commands/init.js +339 -351
  8. package/src/commands/install-panel-hook.js +108 -0
  9. package/src/commands/install-scripts.js +232 -0
  10. package/src/commands/install-skill.js +220 -0
  11. package/src/commands/panel.js +297 -0
  12. package/src/commands/setup-wizard.js +4 -3
  13. package/src/commands/test-setup.js +4 -5
  14. package/src/data/releases.json +164 -0
  15. package/src/panel/queue.js +188 -0
  16. package/templates/commands/ask-claude.template.md +118 -0
  17. package/templates/commands/ccasp-panel.template.md +72 -0
  18. package/templates/commands/ccasp-setup.template.md +470 -79
  19. package/templates/commands/create-smoke-test.template.md +186 -0
  20. package/templates/commands/project-impl.template.md +9 -113
  21. package/templates/commands/refactor-check.template.md +112 -0
  22. package/templates/commands/refactor-cleanup.template.md +144 -0
  23. package/templates/commands/refactor-prep.template.md +192 -0
  24. package/templates/docs/AI_ARCHITECTURE_CONSTITUTION.template.md +198 -0
  25. package/templates/docs/DETAILED_GOTCHAS.template.md +347 -0
  26. package/templates/docs/PHASE-DEV-CHECKLIST.template.md +241 -0
  27. package/templates/docs/PROGRESS_JSON_TEMPLATE.json +117 -0
  28. package/templates/docs/background-agent.template.md +264 -0
  29. package/templates/hooks/autonomous-decision-logger.template.js +207 -0
  30. package/templates/hooks/branch-merge-checker.template.js +272 -0
  31. package/templates/hooks/git-commit-tracker.template.js +267 -0
  32. package/templates/hooks/issue-completion-detector.template.js +205 -0
  33. package/templates/hooks/panel-queue-reader.template.js +83 -0
  34. package/templates/hooks/phase-validation-gates.template.js +307 -0
  35. package/templates/hooks/session-id-generator.template.js +236 -0
  36. package/templates/hooks/token-usage-monitor.template.js +193 -0
  37. package/templates/patterns/README.md +129 -0
  38. package/templates/patterns/l1-l2-orchestration.md +189 -0
  39. package/templates/patterns/multi-phase-orchestration.md +258 -0
  40. package/templates/patterns/two-tier-query-pipeline.md +192 -0
  41. package/templates/scripts/README.md +109 -0
  42. package/templates/scripts/analyze-delegation-log.js +299 -0
  43. package/templates/scripts/autonomous-decision-logger.js +277 -0
  44. package/templates/scripts/git-history-analyzer.py +269 -0
  45. package/templates/scripts/phase-validation-gates.js +307 -0
  46. package/templates/scripts/poll-deployment-status.js +260 -0
  47. package/templates/scripts/roadmap-scanner.js +263 -0
  48. package/templates/scripts/validate-deployment.js +293 -0
  49. package/templates/skills/agent-creator/skill.json +18 -0
  50. package/templates/skills/agent-creator/skill.md +335 -0
  51. package/templates/skills/hook-creator/skill.json +18 -0
  52. package/templates/skills/hook-creator/skill.md +318 -0
  53. package/templates/skills/panel/skill.json +18 -0
  54. package/templates/skills/panel/skill.md +90 -0
  55. package/templates/skills/rag-agent-creator/skill.json +18 -0
  56. package/templates/skills/rag-agent-creator/skill.md +307 -0
@@ -0,0 +1,188 @@
1
+ /**
2
+ * CCASP Panel Queue System
3
+ *
4
+ * Handles IPC between the CCASP Panel (separate terminal) and Claude Code CLI
5
+ * via a file-based queue + clipboard fallback.
6
+ */
7
+
8
+ import { existsSync, readFileSync, writeFileSync, mkdirSync, unlinkSync, watchFile, unwatchFile } from 'fs';
9
+ import { join, dirname } from 'path';
10
+ import { homedir } from 'os';
11
+ import { execSync } from 'child_process';
12
+
13
+ // Queue file location - in user's .claude folder for cross-project access
14
+ const QUEUE_DIR = join(homedir(), '.claude', 'ccasp-panel');
15
+ const QUEUE_FILE = join(QUEUE_DIR, 'command-queue.json');
16
+ const LOCK_FILE = join(QUEUE_DIR, '.lock');
17
+
18
+ /**
19
+ * Ensure queue directory exists
20
+ */
21
+ export function ensureQueueDir() {
22
+ if (!existsSync(QUEUE_DIR)) {
23
+ mkdirSync(QUEUE_DIR, { recursive: true });
24
+ }
25
+ }
26
+
27
+ /**
28
+ * Write a command to the queue
29
+ */
30
+ export function queueCommand(command, args = '', metadata = {}) {
31
+ ensureQueueDir();
32
+
33
+ const entry = {
34
+ id: Date.now().toString(36) + Math.random().toString(36).substr(2, 5),
35
+ command,
36
+ args,
37
+ timestamp: Date.now(),
38
+ cwd: process.cwd(),
39
+ status: 'pending',
40
+ ...metadata
41
+ };
42
+
43
+ // Read existing queue
44
+ let queue = [];
45
+ if (existsSync(QUEUE_FILE)) {
46
+ try {
47
+ queue = JSON.parse(readFileSync(QUEUE_FILE, 'utf8'));
48
+ } catch {
49
+ queue = [];
50
+ }
51
+ }
52
+
53
+ // Add new entry
54
+ queue.push(entry);
55
+
56
+ // Keep only last 50 entries
57
+ if (queue.length > 50) {
58
+ queue = queue.slice(-50);
59
+ }
60
+
61
+ writeFileSync(QUEUE_FILE, JSON.stringify(queue, null, 2), 'utf8');
62
+
63
+ return entry;
64
+ }
65
+
66
+ /**
67
+ * Get the next pending command from queue
68
+ */
69
+ export function getNextCommand() {
70
+ if (!existsSync(QUEUE_FILE)) {
71
+ return null;
72
+ }
73
+
74
+ try {
75
+ const queue = JSON.parse(readFileSync(QUEUE_FILE, 'utf8'));
76
+ return queue.find(entry => entry.status === 'pending') || null;
77
+ } catch {
78
+ return null;
79
+ }
80
+ }
81
+
82
+ /**
83
+ * Mark a command as processed
84
+ */
85
+ export function markCommandProcessed(id, status = 'completed') {
86
+ if (!existsSync(QUEUE_FILE)) {
87
+ return false;
88
+ }
89
+
90
+ try {
91
+ const queue = JSON.parse(readFileSync(QUEUE_FILE, 'utf8'));
92
+ const entry = queue.find(e => e.id === id);
93
+ if (entry) {
94
+ entry.status = status;
95
+ entry.processedAt = Date.now();
96
+ writeFileSync(QUEUE_FILE, JSON.stringify(queue, null, 2), 'utf8');
97
+ return true;
98
+ }
99
+ } catch {
100
+ return false;
101
+ }
102
+
103
+ return false;
104
+ }
105
+
106
+ /**
107
+ * Clear the entire queue
108
+ */
109
+ export function clearQueue() {
110
+ if (existsSync(QUEUE_FILE)) {
111
+ unlinkSync(QUEUE_FILE);
112
+ }
113
+ }
114
+
115
+ /**
116
+ * Get queue status
117
+ */
118
+ export function getQueueStatus() {
119
+ if (!existsSync(QUEUE_FILE)) {
120
+ return { total: 0, pending: 0, completed: 0, failed: 0 };
121
+ }
122
+
123
+ try {
124
+ const queue = JSON.parse(readFileSync(QUEUE_FILE, 'utf8'));
125
+ return {
126
+ total: queue.length,
127
+ pending: queue.filter(e => e.status === 'pending').length,
128
+ completed: queue.filter(e => e.status === 'completed').length,
129
+ failed: queue.filter(e => e.status === 'failed').length,
130
+ };
131
+ } catch {
132
+ return { total: 0, pending: 0, completed: 0, failed: 0 };
133
+ }
134
+ }
135
+
136
+ /**
137
+ * Copy text to clipboard (cross-platform)
138
+ */
139
+ export function copyToClipboard(text) {
140
+ try {
141
+ if (process.platform === 'win32') {
142
+ // PowerShell clip
143
+ execSync(`echo ${text} | clip`, { stdio: 'pipe' });
144
+ } else if (process.platform === 'darwin') {
145
+ execSync(`echo "${text}" | pbcopy`, { stdio: 'pipe' });
146
+ } else {
147
+ // Linux - try xclip or xsel
148
+ try {
149
+ execSync(`echo "${text}" | xclip -selection clipboard`, { stdio: 'pipe' });
150
+ } catch {
151
+ execSync(`echo "${text}" | xsel --clipboard`, { stdio: 'pipe' });
152
+ }
153
+ }
154
+ return true;
155
+ } catch {
156
+ return false;
157
+ }
158
+ }
159
+
160
+ /**
161
+ * Watch queue for changes (for Claude Code hook)
162
+ */
163
+ export function watchQueue(callback) {
164
+ ensureQueueDir();
165
+
166
+ // Create empty queue file if doesn't exist
167
+ if (!existsSync(QUEUE_FILE)) {
168
+ writeFileSync(QUEUE_FILE, '[]', 'utf8');
169
+ }
170
+
171
+ watchFile(QUEUE_FILE, { interval: 500 }, (curr, prev) => {
172
+ if (curr.mtime !== prev.mtime) {
173
+ const command = getNextCommand();
174
+ if (command) {
175
+ callback(command);
176
+ }
177
+ }
178
+ });
179
+
180
+ return () => unwatchFile(QUEUE_FILE);
181
+ }
182
+
183
+ /**
184
+ * Get the queue file path (for hook configuration)
185
+ */
186
+ export function getQueueFilePath() {
187
+ return QUEUE_FILE;
188
+ }
@@ -0,0 +1,118 @@
1
+ ---
2
+ description: Natural language command discovery - find the right command for any task
3
+ ---
4
+
5
+ # Ask Claude
6
+
7
+ Find the right command, skill, or workflow using natural language. Smart command discovery for CCASP.
8
+
9
+ ## Usage
10
+
11
+ Describe what you want to do:
12
+
13
+ ```
14
+ /ask-claude how do I deploy to production?
15
+ /ask-claude create a new API endpoint
16
+ /ask-claude fix the failing tests
17
+ /ask-claude analyze code quality
18
+ ```
19
+
20
+ ## How It Works
21
+
22
+ 1. **Parse Intent** - Understand what you're trying to accomplish
23
+ 2. **Match Commands** - Find relevant slash commands and skills
24
+ 3. **Suggest Workflow** - Recommend the best approach
25
+ 4. **Execute or Guide** - Run the command or explain how to use it
26
+
27
+ ## Command Categories
28
+
29
+ ### Development
30
+ | Intent | Command |
31
+ |--------|---------|
32
+ | "create agent" | `/create-agent` |
33
+ | "create hook" | `/create-hook` |
34
+ | "create skill" | `/create-skill` |
35
+ | "create command" | `/create-command` |
36
+
37
+ ### Testing
38
+ | Intent | Command |
39
+ |--------|---------|
40
+ | "run tests" | `/e2e-test` |
41
+ | "create test" | `/create-smoke-test` |
42
+ | "fix failing tests" | `/e2e-test --ralph` |
43
+
44
+ ### GitHub
45
+ | Intent | Command |
46
+ |--------|---------|
47
+ | "create issue" | `/github-task` |
48
+ | "start task" | `/github-task-start` |
49
+ | "check status" | `/github-update` |
50
+
51
+ ### Refactoring
52
+ | Intent | Command |
53
+ |--------|---------|
54
+ | "check quality" | `/refactor-check` |
55
+ | "cleanup code" | `/refactor-cleanup` |
56
+ | "analyze code" | `/refactor-analyze` |
57
+
58
+ ### Deployment
59
+ | Intent | Command |
60
+ |--------|---------|
61
+ | "deploy" | `/deploy-full` |
62
+ | "start tunnel" | `/tunnel-start` |
63
+
64
+ ### Setup
65
+ | Intent | Command |
66
+ |--------|---------|
67
+ | "configure project" | `/ccasp-setup` |
68
+ | "audit setup" | `/claude-audit` |
69
+ | "explore MCP" | `/explore-mcp` |
70
+
71
+ ## Response Format
72
+
73
+ ```
74
+ You asked: "how do I deploy to production?"
75
+
76
+ Recommended: /deploy-full
77
+
78
+ This command:
79
+ - Builds the frontend
80
+ - Deploys backend to Railway (or configured platform)
81
+ - Deploys frontend to Cloudflare (or configured platform)
82
+ - Runs smoke tests to verify deployment
83
+
84
+ Would you like me to run /deploy-full now?
85
+ [Y] Yes, deploy now
86
+ [C] Configure deployment platforms first
87
+ [H] Show detailed help for this command
88
+ ```
89
+
90
+ ## Smart Matching
91
+
92
+ The command uses fuzzy matching to understand:
93
+
94
+ - **Synonyms**: "deploy", "publish", "release" → `/deploy-full`
95
+ - **Actions**: "create", "make", "add" → context-dependent
96
+ - **Targets**: "test", "agent", "hook" → specific command
97
+ - **Modifiers**: "quick", "full", "all" → command options
98
+
99
+ ## Fallback Behavior
100
+
101
+ If no exact match is found:
102
+
103
+ 1. Show top 3 most likely commands
104
+ 2. Ask clarifying questions
105
+ 3. Suggest reading `/menu` for full command list
106
+
107
+ ## Configuration
108
+
109
+ Commands are discovered from:
110
+ - `.claude/commands/INDEX.md`
111
+ - Built-in CCASP commands
112
+ - Tech-stack specific commands
113
+
114
+ ## Related Commands
115
+
116
+ - `/menu` - Interactive command browser
117
+ - `/help-examples` - Detailed usage examples
118
+ - `/ccasp-setup` - Project configuration wizard
@@ -0,0 +1,72 @@
1
+ # CCASP Control Panel
2
+
3
+ Launch the CCASP Control Panel in a separate terminal window.
4
+
5
+ ## Instructions for Claude
6
+
7
+ **IMPORTANT**: Execute the appropriate Bash command below to launch the panel in a new terminal window.
8
+
9
+ ### Step 1: Launch Panel in New Window
10
+
11
+ Use the Bash tool to run ONE of these commands based on the platform:
12
+
13
+ **Windows (default):**
14
+ ```bash
15
+ start powershell -NoExit -Command "ccasp panel"
16
+ ```
17
+
18
+ **macOS:**
19
+ ```bash
20
+ osascript -e 'tell application "Terminal" to do script "ccasp panel"'
21
+ ```
22
+
23
+ **Linux (gnome-terminal):**
24
+ ```bash
25
+ gnome-terminal -- ccasp panel &
26
+ ```
27
+
28
+ ### Step 2: Confirm Launch
29
+
30
+ After running the command, tell the user:
31
+
32
+ ```
33
+ ✅ CCASP Panel launched in a new terminal window!
34
+
35
+ How to use:
36
+ 1. Switch to the new terminal window
37
+ 2. Press a key to select a command (e.g., 'A' for Create Agent)
38
+ 3. Come back here and press Enter to execute
39
+
40
+ Panel Controls:
41
+ [A] Create Agent [H] Create Hook [S] Create Skill
42
+ [M] Explore MCP [C] Claude Audit [E] Explore Codebase
43
+ [P] Phase Dev Plan [G] GitHub Task [T] Run E2E Tests
44
+ [Q] Quit [R] Refresh [X] Clear Queue
45
+ ```
46
+
47
+ ### First-Time Setup (if hook not installed)
48
+
49
+ If the user hasn't set up the panel hook yet, run:
50
+
51
+ ```bash
52
+ ccasp install-panel-hook --global
53
+ ```
54
+
55
+ Then tell them to restart Claude Code for the hook to take effect.
56
+
57
+ ## Architecture
58
+
59
+ ```
60
+ ┌─────────────────────────────────────────────────────────────────┐
61
+ │ CCASP Control Panel (NEW terminal window) │
62
+ │ │
63
+ │ Press key → Command queued to ~/.claude/ccasp-panel/ │
64
+ └─────────────────────────────────────────────────────────────────┘
65
+
66
+
67
+ ┌─────────────────────────────────────────────────────────────────┐
68
+ │ Claude Code CLI (THIS terminal) │
69
+ │ │
70
+ │ Press Enter → Hook reads queue → Executes command │
71
+ └─────────────────────────────────────────────────────────────────┘
72
+ ```