Skip to content

Commit 813bfa8

Browse files
catlog22claude
andcommitted
fix(claude): 修复 ccw tool exec 命令格式 - 位置参数改为JSON格式
修复内容: - 将位置参数格式改为JSON格式: ccw tool exec tool '{"param":"value"}' - 修复双引号字符串内的JSON引号转义问题 - 更新deprecated脚本的使用示例 受影响文件: - commands/memory/update-full.md, docs-full-cli.md, docs-related-cli.md, update-related.md - commands/workflow/ui-design/generate.md, import-from-code.md - scripts/*.sh (9个deprecated脚本) - skills/command-guide/reference/* (通过analyze_commands.py自动同步) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 8b29f6b commit 813bfa8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1310
-1736
lines changed

.claude/agents/action-planning-agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ Generate individual `.task/IMPL-*.json` files with the following structure:
392392
// Pattern: Project structure analysis
393393
{
394394
"step": "analyze_project_architecture",
395-
"commands": ["bash(~/.claude/scripts/get_modules_by_depth.sh)"],
395+
"commands": ["bash(ccw tool exec get_modules_by_depth '{}')"],
396396
"output_to": "project_architecture"
397397
},
398398

.claude/agents/cli-execution-agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Score = 0
6767

6868
**1. Project Structure**:
6969
```bash
70-
~/.claude/scripts/get_modules_by_depth.sh
70+
ccw tool exec get_modules_by_depth '{}'
7171
```
7272

7373
**2. Content Search**:

.claude/agents/cli-explore-agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ Phase 4: Output Generation
6767

6868
```bash
6969
# Project structure
70-
~/.claude/scripts/get_modules_by_depth.sh
70+
ccw tool exec get_modules_by_depth '{}'
7171

7272
# Pattern discovery (adapt based on language)
7373
rg "^export (class|interface|function) " --type ts -n

.claude/agents/context-search-agent.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ You are a context discovery specialist focused on gathering relevant project inf
3131
### 1. Reference Documentation (Project Standards)
3232
**Tools**:
3333
- `Read()` - Load CLAUDE.md, README.md, architecture docs
34-
- `Bash(~/.claude/scripts/get_modules_by_depth.sh)` - Project structure
34+
- `Bash(ccw tool exec get_modules_by_depth '{}')` - Project structure
3535
- `Glob()` - Find documentation files
3636

3737
**Use**: Phase 0 foundation setup
@@ -82,7 +82,7 @@ mcp__code-index__set_project_path(process.cwd())
8282
mcp__code-index__refresh_index()
8383

8484
// 2. Project Structure
85-
bash(~/.claude/scripts/get_modules_by_depth.sh)
85+
bash(ccw tool exec get_modules_by_depth '{}')
8686

8787
// 3. Load Documentation (if not in memory)
8888
if (!memory.has("CLAUDE.md")) Read(CLAUDE.md)

.claude/agents/memory-bridge.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ You are a documentation update coordinator for complex projects. Orchestrate par
88

99
## Core Mission
1010

11-
Execute depth-parallel updates for all modules using `~/.claude/scripts/update_module_claude.sh`. **Every module path must be processed**.
11+
Execute depth-parallel updates for all modules using `ccw tool exec update_module_claude`. **Every module path must be processed**.
1212

1313
## Input Context
1414

@@ -42,12 +42,12 @@ TodoWrite([
4242
# 3. Launch parallel jobs (max 4)
4343

4444
# Depth 5 example (Layer 3 - use multi-layer):
45-
~/.claude/scripts/update_module_claude.sh "multi-layer" "./.claude/workflows/cli-templates/prompts/analysis" "gemini" &
46-
~/.claude/scripts/update_module_claude.sh "multi-layer" "./.claude/workflows/cli-templates/prompts/development" "gemini" &
45+
ccw tool exec update_module_claude '{"strategy":"multi-layer","path":"./.claude/workflows/cli-templates/prompts/analysis","tool":"gemini"}' &
46+
ccw tool exec update_module_claude '{"strategy":"multi-layer","path":"./.claude/workflows/cli-templates/prompts/development","tool":"gemini"}' &
4747

4848
# Depth 1 example (Layer 2 - use single-layer):
49-
~/.claude/scripts/update_module_claude.sh "single-layer" "./src/auth" "gemini" &
50-
~/.claude/scripts/update_module_claude.sh "single-layer" "./src/api" "gemini" &
49+
ccw tool exec update_module_claude '{"strategy":"single-layer","path":"./src/auth","tool":"gemini"}' &
50+
ccw tool exec update_module_claude '{"strategy":"single-layer","path":"./src/api","tool":"gemini"}' &
5151
# ... up to 4 concurrent jobs
5252

5353
# 4. Wait for all depth jobs to complete

.claude/commands/cli/cli-init.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ target/
191191
### Step 2: Workspace Analysis (MANDATORY FIRST)
192192
```bash
193193
# Analyze workspace structure
194-
bash(~/.claude/scripts/get_modules_by_depth.sh json)
194+
bash(ccw tool exec get_modules_by_depth '{"format":"json"}')
195195
```
196196

197197
### Step 3: Technology Detection

.claude/commands/memory/docs-full-cli.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ src/ (depth 1) → SINGLE STRATEGY
101101
Bash({command: "pwd && basename \"$(pwd)\" && git rev-parse --show-toplevel 2>/dev/null || pwd", run_in_background: false});
102102

103103
// Get module structure with classification
104-
Bash({command: "~/.claude/scripts/get_modules_by_depth.sh list | ~/.claude/scripts/classify-folders.sh", run_in_background: false});
104+
Bash({command: "ccw tool exec get_modules_by_depth '{\"format\":\"list\"}' | ccw tool exec classify_folders '{}'", run_in_background: false});
105105

106106
// OR with path parameter
107-
Bash({command: "cd <target-path> && ~/.claude/scripts/get_modules_by_depth.sh list | ~/.claude/scripts/classify-folders.sh", run_in_background: false});
107+
Bash({command: "cd <target-path> && ccw tool exec get_modules_by_depth '{\"format\":\"list\"}' | ccw tool exec classify_folders '{}'", run_in_background: false});
108108
```
109109

110110
**Parse output** `depth:N|path:<PATH>|type:<code|navigation>|...` to extract module paths, types, and count.
@@ -200,7 +200,7 @@ for (let layer of [3, 2, 1]) {
200200
let strategy = module.depth >= 3 ? "full" : "single";
201201
for (let tool of tool_order) {
202202
Bash({
203-
command: `cd ${module.path} && ~/.claude/scripts/generate_module_docs.sh "${strategy}" "." "${project_name}" "${tool}"`,
203+
command: `cd ${module.path} && ccw tool exec generate_module_docs '{"strategy":"${strategy}","sourcePath":".","projectName":"${project_name}","tool":"${tool}"}'`,
204204
run_in_background: false
205205
});
206206
if (bash_result.exit_code === 0) {
@@ -263,7 +263,7 @@ MODULES:
263263
264264
TOOLS (try in order): {{tool_1}}, {{tool_2}}, {{tool_3}}
265265
266-
EXECUTION SCRIPT: ~/.claude/scripts/generate_module_docs.sh
266+
EXECUTION SCRIPT: ccw tool exec generate_module_docs
267267
- Accepts strategy parameter: full | single
268268
- Accepts folder type detection: code | navigation
269269
- Tool execution via direct CLI commands (gemini/qwen/codex)
@@ -273,7 +273,7 @@ EXECUTION FLOW (for each module):
273273
1. Tool fallback loop (exit on first success):
274274
for tool in {{tool_1}} {{tool_2}} {{tool_3}}; do
275275
Bash({
276-
command: `cd "{{module_path}}" && ~/.claude/scripts/generate_module_docs.sh "{{strategy}}" "." "{{project_name}}" "${tool}"`,
276+
command: `cd "{{module_path}}" && ccw tool exec generate_module_docs '{"strategy":"{{strategy}}","sourcePath":".","projectName":"{{project_name}}","tool":"${tool}"}'`,
277277
run_in_background: false
278278
})
279279
exit_code=$?
@@ -322,7 +322,7 @@ let project_root = get_project_root();
322322
report("Generating project README.md...");
323323
for (let tool of tool_order) {
324324
Bash({
325-
command: `cd ${project_root} && ~/.claude/scripts/generate_module_docs.sh "project-readme" "." "${project_name}" "${tool}"`,
325+
command: `cd ${project_root} && ccw tool exec generate_module_docs '{"strategy":"project-readme","sourcePath":".","projectName":"${project_name}","tool":"${tool}"}'`,
326326
run_in_background: false
327327
});
328328
if (bash_result.exit_code === 0) {
@@ -335,7 +335,7 @@ for (let tool of tool_order) {
335335
report("Generating ARCHITECTURE.md and EXAMPLES.md...");
336336
for (let tool of tool_order) {
337337
Bash({
338-
command: `cd ${project_root} && ~/.claude/scripts/generate_module_docs.sh "project-architecture" "." "${project_name}" "${tool}"`,
338+
command: `cd ${project_root} && ccw tool exec generate_module_docs '{"strategy":"project-architecture","sourcePath":".","projectName":"${project_name}","tool":"${tool}"}'`,
339339
run_in_background: false
340340
});
341341
if (bash_result.exit_code === 0) {
@@ -350,7 +350,7 @@ if (bash_result.stdout.includes("API_FOUND")) {
350350
report("Generating HTTP API documentation...");
351351
for (let tool of tool_order) {
352352
Bash({
353-
command: `cd ${project_root} && ~/.claude/scripts/generate_module_docs.sh "http-api" "." "${project_name}" "${tool}"`,
353+
command: `cd ${project_root} && ccw tool exec generate_module_docs '{"strategy":"http-api","sourcePath":".","projectName":"${project_name}","tool":"${tool}"}'`,
354354
run_in_background: false
355355
});
356356
if (bash_result.exit_code === 0) {

.claude/commands/memory/docs-related-cli.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Orchestrates context-aware documentation generation/update for changed modules u
5151
Bash({command: "pwd && basename \"$(pwd)\" && git rev-parse --show-toplevel 2>/dev/null || pwd", run_in_background: false});
5252

5353
// Detect changed modules
54-
Bash({command: "~/.claude/scripts/detect_changed_modules.sh list", run_in_background: false});
54+
Bash({command: "ccw tool exec detect_changed_modules '{\"format\":\"list\"}'", run_in_background: false});
5555

5656
// Cache git changes
5757
Bash({command: "git add -A 2>/dev/null || true", run_in_background: false});
@@ -123,7 +123,7 @@ for (let depth of sorted_depths.reverse()) { // N → 0
123123
return async () => {
124124
for (let tool of tool_order) {
125125
Bash({
126-
command: `cd ${module.path} && ~/.claude/scripts/generate_module_docs.sh "single" "." "${project_name}" "${tool}"`,
126+
command: `cd ${module.path} && ccw tool exec generate_module_docs '{"strategy":"single","sourcePath":".","projectName":"${project_name}","tool":"${tool}"}'`,
127127
run_in_background: false
128128
});
129129
if (bash_result.exit_code === 0) {
@@ -207,21 +207,21 @@ EXECUTION:
207207
For each module above:
208208
1. Try tool 1:
209209
Bash({
210-
command: `cd "{{module_path}}" && ~/.claude/scripts/generate_module_docs.sh "single" "." "{{project_name}}" "{{tool_1}}"`,
210+
command: `cd "{{module_path}}" && ccw tool exec generate_module_docs '{"strategy":"single","sourcePath":".","projectName":"{{project_name}}","tool":"{{tool_1}}"}'`,
211211
run_in_background: false
212212
})
213213
→ Success: Report "✅ {{module_path}} docs generated with {{tool_1}}", proceed to next module
214214
→ Failure: Try tool 2
215215
2. Try tool 2:
216216
Bash({
217-
command: `cd "{{module_path}}" && ~/.claude/scripts/generate_module_docs.sh "single" "." "{{project_name}}" "{{tool_2}}"`,
217+
command: `cd "{{module_path}}" && ccw tool exec generate_module_docs '{"strategy":"single","sourcePath":".","projectName":"{{project_name}}","tool":"{{tool_2}}"}'`,
218218
run_in_background: false
219219
})
220220
→ Success: Report "✅ {{module_path}} docs generated with {{tool_2}}", proceed to next module
221221
→ Failure: Try tool 3
222222
3. Try tool 3:
223223
Bash({
224-
command: `cd "{{module_path}}" && ~/.claude/scripts/generate_module_docs.sh "single" "." "{{project_name}}" "{{tool_3}}"`,
224+
command: `cd "{{module_path}}" && ccw tool exec generate_module_docs '{"strategy":"single","sourcePath":".","projectName":"{{project_name}}","tool":"{{tool_3}}"}'`,
225225
run_in_background: false
226226
})
227227
→ Success: Report "✅ {{module_path}} docs generated with {{tool_3}}", proceed to next module

.claude/commands/memory/docs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@ bash(jq '. + {"target_path":"{target_path}","project_root":"{project_root}","pro
8585

8686
```bash
8787
# 1. Run folder analysis
88-
bash(~/.claude/scripts/get_modules_by_depth.sh | ~/.claude/scripts/classify-folders.sh)
88+
bash(ccw tool exec get_modules_by_depth '{}' | ccw tool exec classify_folders '{}')
8989

9090
# 2. Get top-level directories (first 2 path levels)
91-
bash(~/.claude/scripts/get_modules_by_depth.sh | ~/.claude/scripts/classify-folders.sh | awk -F'|' '{print $1}' | sed 's|^\./||' | awk -F'/' '{if(NF>=2) print $1"/"$2; else if(NF==1) print $1}' | sort -u)
91+
bash(ccw tool exec get_modules_by_depth '{}' | ccw tool exec classify_folders '{}' | awk -F'|' '{print $1}' | sed 's|^\./||' | awk -F'/' '{if(NF>=2) print $1"/"$2; else if(NF==1) print $1}' | sort -u)
9292

9393
# 3. Find existing docs (if directory exists)
9494
bash(if [ -d .workflow/docs/\${project_name} ]; then find .workflow/docs/\${project_name} -type f -name "*.md" ! -path "*/README.md" ! -path "*/ARCHITECTURE.md" ! -path "*/EXAMPLES.md" ! -path "*/api/*" 2>/dev/null; fi)

.claude/commands/memory/load.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Task(
109109
110110
1. **Project Structure**
111111
\`\`\`bash
112-
bash(~/.claude/scripts/get_modules_by_depth.sh)
112+
bash(ccw tool exec get_modules_by_depth '{}')
113113
\`\`\`
114114
115115
2. **Core Documentation**

0 commit comments

Comments
 (0)