claude-code-workflow 6.1.1 → 6.1.3
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/.claude/skills/command-guide/SKILL.md +3 -3
- package/.claude/workflows/tool-strategy.md +79 -90
- package/README.md +7 -18
- package/ccw/src/cli.js +5 -2
- package/ccw/src/commands/tool.js +18 -97
- package/ccw/src/core/server.js +2063 -1948
- package/ccw/src/templates/dashboard-css/01-base.css +130 -0
- package/ccw/src/templates/dashboard-js/components/version-check.js +167 -0
- package/ccw/src/templates/dashboard-js/main.js +1 -0
- package/ccw/src/templates/dashboard-js/views/hook-manager.js +11 -9
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: command-guide
|
|
3
|
-
description: Workflow command guide for Claude
|
|
3
|
+
description: Workflow command guide for Claude Code Workflow (78 commands). Search/browse commands, get next-step recommendations, view documentation, report issues. Triggers "CCW-help", "CCW-issue", "ccw-help", "ccw-issue", "ccw"
|
|
4
4
|
allowed-tools: Read, Grep, Glob, AskUserQuestion
|
|
5
5
|
version: 5.8.0
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# Command Guide Skill
|
|
9
9
|
|
|
10
|
-
Comprehensive command guide for Claude
|
|
10
|
+
Comprehensive command guide for Claude Code Workflow (CCW) system covering 78 commands across 5 categories (workflow, cli, memory, task, general).
|
|
11
11
|
|
|
12
12
|
## 🆕 What's New in v5.8.0
|
|
13
13
|
|
|
@@ -385,4 +385,4 @@ This SKILL documentation is kept in sync with command implementations through a
|
|
|
385
385
|
- 4 issue templates for standardized problem reporting
|
|
386
386
|
- CLI-assisted complex query analysis with gemini/qwen integration
|
|
387
387
|
|
|
388
|
-
**Maintainer**:
|
|
388
|
+
**Maintainer**: CCW Team
|
|
@@ -1,90 +1,79 @@
|
|
|
1
|
-
# Tool Strategy
|
|
2
|
-
|
|
3
|
-
## ⚡ Exa Triggering Mechanisms
|
|
4
|
-
|
|
5
|
-
**Auto-Trigger**:
|
|
6
|
-
- User mentions "exa-code" or code-related queries → `mcp__exa__get_code_context_exa`
|
|
7
|
-
- Need current web information → `mcp__exa__web_search_exa`
|
|
8
|
-
|
|
9
|
-
**Manual Trigger**:
|
|
10
|
-
- Complex API research → Exa Code Context
|
|
11
|
-
- Real-time information needs → Exa Web Search
|
|
12
|
-
|
|
13
|
-
## ⚡ CCW edit_file Tool (AI-Powered Editing)
|
|
14
|
-
|
|
15
|
-
**When to Use**: Edit tool fails
|
|
16
|
-
|
|
17
|
-
###
|
|
18
|
-
|
|
19
|
-
**Best for**: Code block replacements, function rewrites, multi-line changes
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
ccw tool exec edit_file
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
- ✅
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
| Config line change | line | Precise line number control |
|
|
81
|
-
| Insert at specific position | line | Exact line number needed |
|
|
82
|
-
| Delete line range | line | Line-based operation |
|
|
83
|
-
|
|
84
|
-
### Fallback Strategy
|
|
85
|
-
|
|
86
|
-
1. **Edit fails 1+ times** → Use `ccw tool exec edit_file` (update mode)
|
|
87
|
-
2. **update mode fails** → Try line mode with precise line numbers
|
|
88
|
-
3. **All fails** → Use Write to recreate file
|
|
89
|
-
|
|
90
|
-
**Default mode**: update (exact matching with line ending adaptation)
|
|
1
|
+
# Tool Strategy
|
|
2
|
+
|
|
3
|
+
## ⚡ Exa Triggering Mechanisms
|
|
4
|
+
|
|
5
|
+
**Auto-Trigger**:
|
|
6
|
+
- User mentions "exa-code" or code-related queries → `mcp__exa__get_code_context_exa`
|
|
7
|
+
- Need current web information → `mcp__exa__web_search_exa`
|
|
8
|
+
|
|
9
|
+
**Manual Trigger**:
|
|
10
|
+
- Complex API research → Exa Code Context
|
|
11
|
+
- Real-time information needs → Exa Web Search
|
|
12
|
+
|
|
13
|
+
## ⚡ CCW edit_file Tool (AI-Powered Editing)
|
|
14
|
+
|
|
15
|
+
**When to Use**: Edit tool fails 1+ times on same file
|
|
16
|
+
|
|
17
|
+
### Usage
|
|
18
|
+
|
|
19
|
+
**Best for**: Code block replacements, function rewrites, multi-line changes
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
ccw tool exec edit_file --path "file.py" --old "def old():
|
|
23
|
+
pass" --new "def new():
|
|
24
|
+
return True"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Parameters**:
|
|
28
|
+
- `--path`: File path to edit
|
|
29
|
+
- `--old`: Text to find and replace
|
|
30
|
+
- `--new`: New text to insert
|
|
31
|
+
|
|
32
|
+
**Features**:
|
|
33
|
+
- ✅ Exact text matching (precise and predictable)
|
|
34
|
+
- ✅ Auto line ending adaptation (CRLF/LF)
|
|
35
|
+
- ✅ No JSON escaping issues
|
|
36
|
+
- ✅ Multi-line text supported with quotes
|
|
37
|
+
|
|
38
|
+
### Fallback Strategy
|
|
39
|
+
|
|
40
|
+
1. **Edit fails 1+ times** → Use `ccw tool exec edit_file`
|
|
41
|
+
2. **Still fails** → Use Write to recreate file
|
|
42
|
+
|
|
43
|
+
## ⚡ sed Line Operations (Line Mode Alternative)
|
|
44
|
+
|
|
45
|
+
**When to Use**: Precise line number control (insert, delete, replace specific lines)
|
|
46
|
+
|
|
47
|
+
### Common Operations
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Insert after line 10
|
|
51
|
+
sed -i '10a\new line content' file.txt
|
|
52
|
+
|
|
53
|
+
# Insert before line 5
|
|
54
|
+
sed -i '5i\new line content' file.txt
|
|
55
|
+
|
|
56
|
+
# Delete line 3
|
|
57
|
+
sed -i '3d' file.txt
|
|
58
|
+
|
|
59
|
+
# Delete lines 5-8
|
|
60
|
+
sed -i '5,8d' file.txt
|
|
61
|
+
|
|
62
|
+
# Replace line 3 content
|
|
63
|
+
sed -i '3c\replacement line' file.txt
|
|
64
|
+
|
|
65
|
+
# Replace lines 3-5 content
|
|
66
|
+
sed -i '3,5c\single replacement line' file.txt
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Operation Reference
|
|
70
|
+
|
|
71
|
+
| Operation | Command | Example |
|
|
72
|
+
|-----------|---------|---------|
|
|
73
|
+
| Insert after | `Na\text` | `sed -i '10a\new' file` |
|
|
74
|
+
| Insert before | `Ni\text` | `sed -i '5i\new' file` |
|
|
75
|
+
| Delete line | `Nd` | `sed -i '3d' file` |
|
|
76
|
+
| Delete range | `N,Md` | `sed -i '5,8d' file` |
|
|
77
|
+
| Replace line | `Nc\text` | `sed -i '3c\new' file` |
|
|
78
|
+
|
|
79
|
+
**Note**: Use `sed -i` for in-place file modification (works in Git Bash on Windows)
|
package/README.md
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
# 🚀 Claude Code Workflow (CCW)
|
|
2
2
|
|
|
3
|
+
[](https://smithery.ai/skills?ns=catlog22&utm_source=github&utm_medium=badge)
|
|
4
|
+
|
|
5
|
+
|
|
3
6
|
<div align="center">
|
|
4
7
|
|
|
5
|
-
[](https://github.com/catlog22/Claude-Code-Workflow/releases)
|
|
6
9
|
[](https://www.npmjs.com/package/claude-code-workflow)
|
|
7
10
|
[](LICENSE)
|
|
8
11
|
[]()
|
|
@@ -15,13 +18,11 @@
|
|
|
15
18
|
|
|
16
19
|
**Claude Code Workflow (CCW)** is a JSON-driven multi-agent development framework with intelligent CLI orchestration (Gemini/Qwen/Codex), context-first architecture, and automated workflow execution. It transforms AI development from simple prompt chaining into a powerful orchestration system.
|
|
17
20
|
|
|
18
|
-
> **🎉 Version 6.1.
|
|
21
|
+
> **🎉 Version 6.1.2: Dashboard Update Notification & Bug Fixes**
|
|
19
22
|
>
|
|
20
23
|
> **Core Improvements**:
|
|
21
|
-
> -
|
|
22
|
-
> -
|
|
23
|
-
> - 🚀 **Explorer Enhancements**: Async task execution, CLI selector improvements, WebSocket frame handling
|
|
24
|
-
> - ✨ **Smart Server Recognition**: Intelligent workspace switching and MCP multi-source configuration
|
|
24
|
+
> - 🔔 **Version Update Notification**: Dashboard now checks npm for updates and displays upgrade banner
|
|
25
|
+
> - 🔧 **Hook Manager Fix**: Fixed button click event handling for edit/delete operations
|
|
25
26
|
>
|
|
26
27
|
> See [CHANGELOG.md](CHANGELOG.md) for complete details.
|
|
27
28
|
|
|
@@ -63,18 +64,6 @@ ccw install -m Global
|
|
|
63
64
|
ccw install -m Path -p /path/to/project
|
|
64
65
|
```
|
|
65
66
|
|
|
66
|
-
### **🚀 Alternative: One-Click Script Install**
|
|
67
|
-
|
|
68
|
-
**Windows (PowerShell):**
|
|
69
|
-
```powershell
|
|
70
|
-
Invoke-Expression (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.ps1" -UseBasicParsing).Content
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
**Linux/macOS (Bash/Zsh):**
|
|
74
|
-
```bash
|
|
75
|
-
bash <(curl -fsSL https://raw.githubusercontent.com/catlog22/Claude-Code-Workflow/main/install-remote.sh)
|
|
76
|
-
```
|
|
77
|
-
|
|
78
67
|
### **✅ Verify Installation**
|
|
79
68
|
After installation, open **Claude Code** and verify that workflow commands are available by running:
|
|
80
69
|
```bash
|
package/ccw/src/cli.js
CHANGED
|
@@ -108,9 +108,12 @@ export function run(argv) {
|
|
|
108
108
|
|
|
109
109
|
// Tool command
|
|
110
110
|
program
|
|
111
|
-
.command('tool [subcommand] [args]
|
|
111
|
+
.command('tool [subcommand] [args]')
|
|
112
112
|
.description('Execute CCW tools')
|
|
113
|
-
.
|
|
113
|
+
.option('--path <path>', 'File path (for edit_file)')
|
|
114
|
+
.option('--old <text>', 'Old text to replace (for edit_file)')
|
|
115
|
+
.option('--new <text>', 'New text (for edit_file)')
|
|
116
|
+
.action((subcommand, args, options) => toolCommand(subcommand, args, options));
|
|
114
117
|
|
|
115
118
|
program.parse(argv);
|
|
116
119
|
}
|
package/ccw/src/commands/tool.js
CHANGED
|
@@ -66,80 +66,13 @@ async function schemaAction(options) {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
/**
|
|
70
|
-
* Read from stdin if available
|
|
71
|
-
*/
|
|
72
|
-
async function readStdin() {
|
|
73
|
-
// Check if stdin is a TTY (interactive terminal)
|
|
74
|
-
if (process.stdin.isTTY) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
return new Promise((resolve, reject) => {
|
|
79
|
-
let data = '';
|
|
80
|
-
|
|
81
|
-
process.stdin.setEncoding('utf8');
|
|
82
|
-
|
|
83
|
-
process.stdin.on('readable', () => {
|
|
84
|
-
let chunk;
|
|
85
|
-
while ((chunk = process.stdin.read()) !== null) {
|
|
86
|
-
data += chunk;
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
process.stdin.on('end', () => {
|
|
91
|
-
resolve(data.trim() || null);
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
process.stdin.on('error', (err) => {
|
|
95
|
-
reject(err);
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Smart JSON parser with Windows path handling
|
|
102
|
-
*/
|
|
103
|
-
function parseJsonWithPathFix(jsonString) {
|
|
104
|
-
try {
|
|
105
|
-
// Try normal parse first
|
|
106
|
-
return JSON.parse(jsonString);
|
|
107
|
-
} catch (firstError) {
|
|
108
|
-
// If parsing fails, try to fix Windows paths
|
|
109
|
-
try {
|
|
110
|
-
// Pattern: "path": "X:\..." or "path":"X:\..."
|
|
111
|
-
const fixedJson = jsonString.replace(
|
|
112
|
-
/("(?:path|file|target|source|dest|destination)":\s*")([A-Za-z]:[^"]+)"/g,
|
|
113
|
-
(match, prefix, path) => {
|
|
114
|
-
// Convert backslashes to forward slashes (universal)
|
|
115
|
-
const fixedPath = path.replace(/\\/g, '/');
|
|
116
|
-
return `${prefix}${fixedPath}"`;
|
|
117
|
-
}
|
|
118
|
-
);
|
|
119
|
-
|
|
120
|
-
return JSON.parse(fixedJson);
|
|
121
|
-
} catch (secondError) {
|
|
122
|
-
// If still fails, throw original error with helpful message
|
|
123
|
-
const errorMsg = firstError.message;
|
|
124
|
-
const hint = errorMsg.includes('escaped character') || errorMsg.includes('position')
|
|
125
|
-
? '\n\n' + chalk.yellow('Hint: Windows paths in JSON need forward slashes or double backslashes:') +
|
|
126
|
-
'\n ' + chalk.green('✓ "D:/Claude_dms3/file.md"') +
|
|
127
|
-
'\n ' + chalk.green('✓ "D:\\\\Claude_dms3\\\\file.md"') +
|
|
128
|
-
'\n ' + chalk.red('✗ "D:\\Claude_dms3\\file.md"')
|
|
129
|
-
: '';
|
|
130
|
-
|
|
131
|
-
throw new Error(errorMsg + hint);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
69
|
/**
|
|
137
70
|
* Execute a tool with given parameters
|
|
138
71
|
*/
|
|
139
|
-
async function execAction(toolName,
|
|
72
|
+
async function execAction(toolName, options) {
|
|
140
73
|
if (!toolName) {
|
|
141
74
|
console.error(chalk.red('Tool name is required'));
|
|
142
|
-
console.error(chalk.gray('Usage: ccw tool exec
|
|
75
|
+
console.error(chalk.gray('Usage: ccw tool exec edit_file --path file.txt --old "old" --new "new"'));
|
|
143
76
|
process.exit(1);
|
|
144
77
|
}
|
|
145
78
|
|
|
@@ -150,34 +83,22 @@ async function execAction(toolName, jsonInput, options) {
|
|
|
150
83
|
process.exit(1);
|
|
151
84
|
}
|
|
152
85
|
|
|
153
|
-
//
|
|
154
|
-
|
|
86
|
+
// Build params from CLI options
|
|
87
|
+
const params = {};
|
|
155
88
|
|
|
156
|
-
if (
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
console.error(chalk.red(`Invalid JSON: ${error.message}`));
|
|
89
|
+
if (toolName === 'edit_file') {
|
|
90
|
+
if (!options.path || !options.old || !options.new) {
|
|
91
|
+
console.error(chalk.red('edit_file requires --path, --old, and --new parameters'));
|
|
92
|
+
console.error(chalk.gray('Usage: ccw tool exec edit_file --path file.txt --old "old text" --new "new text"'));
|
|
161
93
|
process.exit(1);
|
|
162
94
|
}
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
if (tool.parameters?.properties?.input) {
|
|
171
|
-
params.input = stdinData;
|
|
172
|
-
} else {
|
|
173
|
-
try {
|
|
174
|
-
const stdinJson = JSON.parse(stdinData);
|
|
175
|
-
params = { ...stdinJson, ...params };
|
|
176
|
-
} catch {
|
|
177
|
-
// If not JSON, store as 'input' anyway
|
|
178
|
-
params.input = stdinData;
|
|
179
|
-
}
|
|
180
|
-
}
|
|
95
|
+
params.path = options.path;
|
|
96
|
+
params.oldText = options.old;
|
|
97
|
+
params.newText = options.new;
|
|
98
|
+
} else {
|
|
99
|
+
console.error(chalk.red(`Tool "${toolName}" is not supported via CLI parameters`));
|
|
100
|
+
console.error(chalk.gray('Currently only edit_file is supported'));
|
|
101
|
+
process.exit(1);
|
|
181
102
|
}
|
|
182
103
|
|
|
183
104
|
// Execute tool
|
|
@@ -200,7 +121,7 @@ export async function toolCommand(subcommand, args, options) {
|
|
|
200
121
|
await schemaAction({ name: args });
|
|
201
122
|
break;
|
|
202
123
|
case 'exec':
|
|
203
|
-
await execAction(args, options
|
|
124
|
+
await execAction(args, options);
|
|
204
125
|
break;
|
|
205
126
|
default:
|
|
206
127
|
console.log(chalk.bold.cyan('\nCCW Tool System\n'));
|
|
@@ -209,9 +130,9 @@ export async function toolCommand(subcommand, args, options) {
|
|
|
209
130
|
console.log(chalk.gray(' schema [name] Show tool schema (JSON)'));
|
|
210
131
|
console.log(chalk.gray(' exec <name> Execute a tool'));
|
|
211
132
|
console.log();
|
|
212
|
-
console.log('
|
|
133
|
+
console.log('Usage:');
|
|
213
134
|
console.log(chalk.gray(' ccw tool list'));
|
|
214
135
|
console.log(chalk.gray(' ccw tool schema edit_file'));
|
|
215
|
-
console.log(chalk.gray(' ccw tool exec edit_file
|
|
136
|
+
console.log(chalk.gray(' ccw tool exec edit_file --path file.txt --old "old text" --new "new text"'));
|
|
216
137
|
}
|
|
217
138
|
}
|