claude-code-workflow 6.3.27 → 6.3.29
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/CLAUDE.md +7 -1
- package/.claude/agents/action-planning-agent.md +1 -0
- package/.claude/agents/cli-discuss-agent.md +391 -0
- package/.claude/agents/cli-execution-agent.md +2 -0
- package/.claude/agents/cli-explore-agent.md +2 -1
- package/.claude/agents/cli-lite-planning-agent.md +1 -0
- package/.claude/agents/cli-planning-agent.md +1 -0
- package/.claude/agents/code-developer.md +1 -0
- package/.claude/agents/conceptual-planning-agent.md +2 -0
- package/.claude/agents/context-search-agent.md +1 -0
- package/.claude/agents/debug-explore-agent.md +2 -0
- package/.claude/agents/doc-generator.md +1 -0
- package/.claude/agents/issue-plan-agent.md +2 -1
- package/.claude/agents/issue-queue-agent.md +2 -1
- package/.claude/agents/memory-bridge.md +2 -0
- package/.claude/agents/test-context-search-agent.md +2 -0
- package/.claude/agents/test-fix-agent.md +1 -0
- package/.claude/agents/ui-design-agent.md +2 -0
- package/.claude/agents/universal-executor.md +1 -0
- package/.claude/commands/issue/execute.md +269 -176
- package/.claude/commands/workflow/debug.md +6 -0
- package/.claude/commands/workflow/execute.md +4 -0
- package/.claude/commands/workflow/lite-execute.md +4 -0
- package/.claude/commands/workflow/lite-lite-lite.md +433 -0
- package/.claude/commands/workflow/multi-cli-plan.md +510 -0
- package/.claude/commands/workflow/review-fix.md +4 -0
- package/.claude/commands/workflow/test-cycle-execute.md +4 -0
- package/.claude/skills/ccw/SKILL.md +262 -372
- package/.claude/skills/ccw/command.json +547 -0
- package/.claude/skills/ccw-help/SKILL.md +46 -107
- package/.claude/skills/ccw-help/command.json +511 -0
- package/.claude/skills/skill-tuning/SKILL.md +303 -0
- package/.claude/skills/skill-tuning/phases/actions/action-abort.md +164 -0
- package/.claude/skills/skill-tuning/phases/actions/action-analyze-requirements.md +406 -0
- package/.claude/skills/skill-tuning/phases/actions/action-apply-fix.md +206 -0
- package/.claude/skills/skill-tuning/phases/actions/action-complete.md +195 -0
- package/.claude/skills/skill-tuning/phases/actions/action-diagnose-agent.md +317 -0
- package/.claude/skills/skill-tuning/phases/actions/action-diagnose-context.md +243 -0
- package/.claude/skills/skill-tuning/phases/actions/action-diagnose-dataflow.md +318 -0
- package/.claude/skills/skill-tuning/phases/actions/action-diagnose-docs.md +299 -0
- package/.claude/skills/skill-tuning/phases/actions/action-diagnose-memory.md +269 -0
- package/.claude/skills/skill-tuning/phases/actions/action-diagnose-token-consumption.md +200 -0
- package/.claude/skills/skill-tuning/phases/actions/action-gemini-analysis.md +322 -0
- package/.claude/skills/skill-tuning/phases/actions/action-generate-report.md +228 -0
- package/.claude/skills/skill-tuning/phases/actions/action-init.md +149 -0
- package/.claude/skills/skill-tuning/phases/actions/action-propose-fixes.md +317 -0
- package/.claude/skills/skill-tuning/phases/actions/action-verify.md +222 -0
- package/.claude/skills/skill-tuning/phases/orchestrator.md +377 -0
- package/.claude/skills/skill-tuning/phases/state-schema.md +378 -0
- package/.claude/skills/skill-tuning/specs/category-mappings.json +284 -0
- package/.claude/skills/skill-tuning/specs/dimension-mapping.md +212 -0
- package/.claude/skills/skill-tuning/specs/problem-taxonomy.md +318 -0
- package/.claude/skills/skill-tuning/specs/quality-gates.md +263 -0
- package/.claude/skills/skill-tuning/specs/skill-authoring-principles.md +189 -0
- package/.claude/skills/skill-tuning/specs/tuning-strategies.md +1537 -0
- package/.claude/skills/skill-tuning/templates/diagnosis-report.md +153 -0
- package/.claude/skills/skill-tuning/templates/fix-proposal.md +204 -0
- package/.claude/workflows/cli-templates/schemas/multi-cli-discussion-schema.json +421 -0
- package/.claude/workflows/cli-tools-usage.md +0 -41
- package/.codex/prompts/issue-execute.md +72 -12
- package/README.md +3 -0
- package/ccw/dist/core/data-aggregator.d.ts +2 -0
- package/ccw/dist/core/data-aggregator.d.ts.map +1 -1
- package/ccw/dist/core/data-aggregator.js +5 -2
- package/ccw/dist/core/data-aggregator.js.map +1 -1
- package/ccw/dist/core/lite-scanner.d.ts +2 -1
- package/ccw/dist/core/lite-scanner.d.ts.map +1 -1
- package/ccw/dist/core/lite-scanner.js +348 -6
- package/ccw/dist/core/lite-scanner.js.map +1 -1
- package/ccw/dist/core/routes/session-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/session-routes.js +166 -48
- package/ccw/dist/core/routes/session-routes.js.map +1 -1
- package/ccw/dist/core/routes/system-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/system-routes.js +87 -0
- package/ccw/dist/core/routes/system-routes.js.map +1 -1
- package/ccw/dist/core/server.js +2 -2
- package/ccw/dist/core/server.js.map +1 -1
- package/ccw/dist/tools/memory-update-queue.d.ts.map +1 -1
- package/ccw/dist/tools/memory-update-queue.js +5 -11
- package/ccw/dist/tools/memory-update-queue.js.map +1 -1
- package/ccw/scripts/IMPLEMENTATION-SUMMARY.md +226 -0
- package/ccw/scripts/QUICK-REFERENCE.md +135 -0
- package/ccw/scripts/README-memory-embedder.md +157 -0
- package/ccw/scripts/__pycache__/memory_embedder.cpython-313.pyc +0 -0
- package/ccw/scripts/__pycache__/test_memory_embedder.cpython-313-pytest-8.4.2.pyc +0 -0
- package/ccw/scripts/memory-embedder-example.ts +184 -0
- package/ccw/scripts/memory_embedder.py +428 -0
- package/ccw/scripts/test_memory_embedder.py +245 -0
- package/ccw/src/core/data-aggregator.ts +7 -2
- package/ccw/src/core/lite-scanner.ts +495 -6
- package/ccw/src/core/routes/session-routes.ts +201 -48
- package/ccw/src/core/routes/system-routes.ts +102 -0
- package/ccw/src/core/server.ts +2 -2
- package/ccw/src/templates/dashboard-css/01-base.css +8 -0
- package/ccw/src/templates/dashboard-css/02-session.css +81 -0
- package/ccw/src/templates/dashboard-css/03-tasks.css +5 -0
- package/ccw/src/templates/dashboard-css/04-lite-tasks.css +3071 -0
- package/ccw/src/templates/dashboard-css/21-cli-toolmgmt.css +157 -0
- package/ccw/src/templates/dashboard-css/32-issue-manager.css +23 -0
- package/ccw/src/templates/dashboard-js/components/cli-stream-viewer.js +38 -4
- package/ccw/src/templates/dashboard-js/components/hook-manager.js +68 -34
- package/ccw/src/templates/dashboard-js/components/navigation.js +24 -4
- package/ccw/src/templates/dashboard-js/i18n.js +278 -4
- package/ccw/src/templates/dashboard-js/views/api-settings.js +32 -0
- package/ccw/src/templates/dashboard-js/views/claude-manager.js +44 -3
- package/ccw/src/templates/dashboard-js/views/cli-manager.js +303 -31
- package/ccw/src/templates/dashboard-js/views/history.js +44 -6
- package/ccw/src/templates/dashboard-js/views/home.js +1 -0
- package/ccw/src/templates/dashboard-js/views/issue-manager.js +54 -7
- package/ccw/src/templates/dashboard-js/views/lite-tasks.js +2621 -4
- package/ccw/src/templates/dashboard.html +5 -0
- package/ccw/src/tools/memory-update-queue.js +5 -11
- package/package.json +2 -1
- package/.claude/skills/ccw/index/command-capabilities.json +0 -127
- package/.claude/skills/ccw/index/intent-rules.json +0 -136
- package/.claude/skills/ccw/index/workflow-chains.json +0 -451
- package/.claude/skills/ccw/phases/actions/bugfix.md +0 -218
- package/.claude/skills/ccw/phases/actions/coupled.md +0 -194
- package/.claude/skills/ccw/phases/actions/docs.md +0 -93
- package/.claude/skills/ccw/phases/actions/full.md +0 -154
- package/.claude/skills/ccw/phases/actions/issue.md +0 -201
- package/.claude/skills/ccw/phases/actions/rapid.md +0 -104
- package/.claude/skills/ccw/phases/actions/review-fix.md +0 -84
- package/.claude/skills/ccw/phases/actions/tdd.md +0 -66
- package/.claude/skills/ccw/phases/actions/ui.md +0 -79
- package/.claude/skills/ccw/phases/orchestrator.md +0 -435
- package/.claude/skills/ccw/specs/intent-classification.md +0 -336
- package/.claude/skills/ccw-help/index/all-agents.json +0 -82
- package/.claude/skills/ccw-help/index/all-commands.json +0 -882
- package/.claude/skills/ccw-help/index/by-category.json +0 -914
- package/.claude/skills/ccw-help/index/by-use-case.json +0 -896
- package/.claude/skills/ccw-help/index/command-relationships.json +0 -160
- package/.claude/skills/ccw-help/index/essential-commands.json +0 -112
package/.claude/CLAUDE.md
CHANGED
|
@@ -29,7 +29,13 @@ Available CLI endpoints are dynamically defined by the config file:
|
|
|
29
29
|
```
|
|
30
30
|
Bash({ command: "ccw cli -p '...' --tool gemini", run_in_background: true })
|
|
31
31
|
```
|
|
32
|
-
- **After CLI call**: Stop immediately - let CLI execute in background, do NOT
|
|
32
|
+
- **After CLI call**: Stop immediately - let CLI execute in background, do NOT
|
|
33
|
+
poll with TaskOutput
|
|
34
|
+
|
|
35
|
+
### CLI Analysis Calls
|
|
36
|
+
- **Wait for results**: MUST wait for CLI analysis to complete before taking any write action. Do NOT proceed with fixes while analysis is running
|
|
37
|
+
- **Value every call**: Each CLI invocation is valuable and costly. NEVER waste analysis results:
|
|
38
|
+
- Aggregate multiple analysis results before proposing solutions
|
|
33
39
|
|
|
34
40
|
## Code Diagnostics
|
|
35
41
|
|
|
@@ -855,6 +855,7 @@ Use `analysis_results.complexity` or task count to determine structure:
|
|
|
855
855
|
### 3.3 Guidelines Checklist
|
|
856
856
|
|
|
857
857
|
**ALWAYS:**
|
|
858
|
+
- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
858
859
|
- Apply Quantification Requirements to all requirements, acceptance criteria, and modification points
|
|
859
860
|
- Load IMPL_PLAN template: `Read(~/.claude/workflows/cli-templates/prompts/workflow/impl-plan-template.txt)` before generating IMPL_PLAN.md
|
|
860
861
|
- Use provided context package: Extract all information from structured context
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: cli-discuss-agent
|
|
3
|
+
description: |
|
|
4
|
+
Multi-CLI collaborative discussion agent with cross-verification and solution synthesis.
|
|
5
|
+
Orchestrates 5-phase workflow: Context Prep → CLI Execution → Cross-Verify → Synthesize → Output
|
|
6
|
+
color: magenta
|
|
7
|
+
allowed-tools: mcp__ace-tool__search_context(*), Bash(*), Read(*), Write(*), Glob(*), Grep(*)
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
You are a specialized CLI discussion agent that orchestrates multiple CLI tools to analyze tasks, cross-verify findings, and synthesize structured solutions.
|
|
11
|
+
|
|
12
|
+
## Core Capabilities
|
|
13
|
+
|
|
14
|
+
1. **Multi-CLI Orchestration** - Invoke Gemini, Codex, Qwen for diverse perspectives
|
|
15
|
+
2. **Cross-Verification** - Compare findings, identify agreements/disagreements
|
|
16
|
+
3. **Solution Synthesis** - Merge approaches, score and rank by consensus
|
|
17
|
+
4. **Context Enrichment** - ACE semantic search for supplementary context
|
|
18
|
+
|
|
19
|
+
**Discussion Modes**:
|
|
20
|
+
- `initial` → First round, establish baseline analysis (parallel execution)
|
|
21
|
+
- `iterative` → Build on previous rounds with user feedback (parallel + resume)
|
|
22
|
+
- `verification` → Cross-verify specific approaches (serial execution)
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 5-Phase Execution Workflow
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
Phase 1: Context Preparation
|
|
30
|
+
↓ Parse input, enrich with ACE if needed, create round folder
|
|
31
|
+
Phase 2: Multi-CLI Execution
|
|
32
|
+
↓ Build prompts, execute CLIs with fallback chain, parse outputs
|
|
33
|
+
Phase 3: Cross-Verification
|
|
34
|
+
↓ Compare findings, identify agreements/disagreements, resolve conflicts
|
|
35
|
+
Phase 4: Solution Synthesis
|
|
36
|
+
↓ Extract approaches, merge similar, score and rank top 3
|
|
37
|
+
Phase 5: Output Generation
|
|
38
|
+
↓ Calculate convergence, generate questions, write synthesis.json
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Input Schema
|
|
44
|
+
|
|
45
|
+
**From orchestrator** (may be JSON strings):
|
|
46
|
+
- `task_description` - User's task or requirement
|
|
47
|
+
- `round_number` - Current discussion round (1, 2, 3...)
|
|
48
|
+
- `session` - `{ id, folder }` for output paths
|
|
49
|
+
- `ace_context` - `{ relevant_files[], detected_patterns[], architecture_insights }`
|
|
50
|
+
- `previous_rounds` - Array of prior SynthesisResult (optional)
|
|
51
|
+
- `user_feedback` - User's feedback from last round (optional)
|
|
52
|
+
- `cli_config` - `{ tools[], timeout, fallback_chain[], mode }` (optional)
|
|
53
|
+
- `tools`: Default `['gemini', 'codex']` or `['gemini', 'codex', 'claude']`
|
|
54
|
+
- `fallback_chain`: Default `['gemini', 'codex', 'claude']`
|
|
55
|
+
- `mode`: `'parallel'` (default) or `'serial'`
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Output Schema
|
|
60
|
+
|
|
61
|
+
**Output Path**: `{session.folder}/rounds/{round_number}/synthesis.json`
|
|
62
|
+
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"round": 1,
|
|
66
|
+
"solutions": [
|
|
67
|
+
{
|
|
68
|
+
"name": "Solution Name",
|
|
69
|
+
"source_cli": ["gemini", "codex"],
|
|
70
|
+
"feasibility": 0.85,
|
|
71
|
+
"effort": "low|medium|high",
|
|
72
|
+
"risk": "low|medium|high",
|
|
73
|
+
"summary": "Brief analysis summary",
|
|
74
|
+
"implementation_plan": {
|
|
75
|
+
"approach": "High-level technical approach",
|
|
76
|
+
"tasks": [
|
|
77
|
+
{
|
|
78
|
+
"id": "T1",
|
|
79
|
+
"name": "Task name",
|
|
80
|
+
"depends_on": [],
|
|
81
|
+
"files": [{"file": "path", "line": 10, "action": "modify|create|delete"}],
|
|
82
|
+
"key_point": "Critical consideration for this task"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"id": "T2",
|
|
86
|
+
"name": "Second task",
|
|
87
|
+
"depends_on": ["T1"],
|
|
88
|
+
"files": [{"file": "path2", "line": 1, "action": "create"}],
|
|
89
|
+
"key_point": null
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"execution_flow": "T1 → T2 → T3 (T2,T3 can parallel after T1)",
|
|
93
|
+
"milestones": ["Interface defined", "Core logic complete", "Tests passing"]
|
|
94
|
+
},
|
|
95
|
+
"dependencies": {
|
|
96
|
+
"internal": ["@/lib/module"],
|
|
97
|
+
"external": ["npm:package@version"]
|
|
98
|
+
},
|
|
99
|
+
"technical_concerns": ["Potential blocker 1", "Risk area 2"]
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"convergence": {
|
|
103
|
+
"score": 0.75,
|
|
104
|
+
"new_insights": true,
|
|
105
|
+
"recommendation": "converged|continue|user_input_needed"
|
|
106
|
+
},
|
|
107
|
+
"cross_verification": {
|
|
108
|
+
"agreements": ["point 1"],
|
|
109
|
+
"disagreements": ["point 2"],
|
|
110
|
+
"resolution": "how resolved"
|
|
111
|
+
},
|
|
112
|
+
"clarification_questions": ["question 1?"]
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
**Schema Fields**:
|
|
117
|
+
|
|
118
|
+
| Field | Purpose |
|
|
119
|
+
|-------|---------|
|
|
120
|
+
| `feasibility` | Quantitative viability score (0-1) |
|
|
121
|
+
| `summary` | Narrative analysis summary |
|
|
122
|
+
| `implementation_plan.approach` | High-level technical strategy |
|
|
123
|
+
| `implementation_plan.tasks[]` | Discrete implementation tasks |
|
|
124
|
+
| `implementation_plan.tasks[].depends_on` | Task dependencies (IDs) |
|
|
125
|
+
| `implementation_plan.tasks[].key_point` | Critical consideration for task |
|
|
126
|
+
| `implementation_plan.execution_flow` | Visual task sequence |
|
|
127
|
+
| `implementation_plan.milestones` | Key checkpoints |
|
|
128
|
+
| `technical_concerns` | Specific risks/blockers |
|
|
129
|
+
|
|
130
|
+
**Note**: Solutions ranked by internal scoring (array order = priority). `pros/cons` merged into `summary` and `technical_concerns`.
|
|
131
|
+
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
## Phase 1: Context Preparation
|
|
135
|
+
|
|
136
|
+
**Parse input** (handle JSON strings from orchestrator):
|
|
137
|
+
```javascript
|
|
138
|
+
const ace_context = typeof input.ace_context === 'string'
|
|
139
|
+
? JSON.parse(input.ace_context) : input.ace_context || {}
|
|
140
|
+
const previous_rounds = typeof input.previous_rounds === 'string'
|
|
141
|
+
? JSON.parse(input.previous_rounds) : input.previous_rounds || []
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**ACE Supplementary Search** (when needed):
|
|
145
|
+
```javascript
|
|
146
|
+
// Trigger conditions:
|
|
147
|
+
// - Round > 1 AND relevant_files < 5
|
|
148
|
+
// - Previous solutions reference unlisted files
|
|
149
|
+
if (shouldSupplement) {
|
|
150
|
+
mcp__ace-tool__search_context({
|
|
151
|
+
project_root_path: process.cwd(),
|
|
152
|
+
query: `Implementation patterns for ${task_keywords}`
|
|
153
|
+
})
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Create round folder**:
|
|
158
|
+
```bash
|
|
159
|
+
mkdir -p {session.folder}/rounds/{round_number}
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Phase 2: Multi-CLI Execution
|
|
165
|
+
|
|
166
|
+
### Available CLI Tools
|
|
167
|
+
|
|
168
|
+
三方 CLI 工具:
|
|
169
|
+
- **gemini** - Google Gemini (deep code analysis perspective)
|
|
170
|
+
- **codex** - OpenAI Codex (implementation verification perspective)
|
|
171
|
+
- **claude** - Anthropic Claude (architectural analysis perspective)
|
|
172
|
+
|
|
173
|
+
### Execution Modes
|
|
174
|
+
|
|
175
|
+
**Parallel Mode** (default, faster):
|
|
176
|
+
```
|
|
177
|
+
┌─ gemini ─┐
|
|
178
|
+
│ ├─→ merge results → cross-verify
|
|
179
|
+
└─ codex ──┘
|
|
180
|
+
```
|
|
181
|
+
- Execute multiple CLIs simultaneously
|
|
182
|
+
- Merge outputs after all complete
|
|
183
|
+
- Use when: time-sensitive, independent analysis needed
|
|
184
|
+
|
|
185
|
+
**Serial Mode** (for cross-verification):
|
|
186
|
+
```
|
|
187
|
+
gemini → (output) → codex → (verify) → claude
|
|
188
|
+
```
|
|
189
|
+
- Each CLI receives prior CLI's output
|
|
190
|
+
- Explicit verification chain
|
|
191
|
+
- Use when: deep verification required, controversial solutions
|
|
192
|
+
|
|
193
|
+
**Mode Selection**:
|
|
194
|
+
```javascript
|
|
195
|
+
const execution_mode = cli_config.mode || 'parallel'
|
|
196
|
+
// parallel: Promise.all([cli1, cli2, cli3])
|
|
197
|
+
// serial: await cli1 → await cli2(cli1.output) → await cli3(cli2.output)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### CLI Prompt Template
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
ccw cli -p "
|
|
204
|
+
PURPOSE: Analyze task from {perspective} perspective, verify technical feasibility
|
|
205
|
+
TASK:
|
|
206
|
+
• Analyze: \"{task_description}\"
|
|
207
|
+
• Examine codebase patterns and architecture
|
|
208
|
+
• Identify implementation approaches with trade-offs
|
|
209
|
+
• Provide file:line references for integration points
|
|
210
|
+
|
|
211
|
+
MODE: analysis
|
|
212
|
+
CONTEXT: @**/* | Memory: {ace_context_summary}
|
|
213
|
+
{previous_rounds_section}
|
|
214
|
+
{cross_verify_section}
|
|
215
|
+
|
|
216
|
+
EXPECTED: JSON with feasibility_score, findings, implementation_approaches, technical_concerns, code_locations
|
|
217
|
+
|
|
218
|
+
RULES: $(cat ~/.claude/workflows/cli-templates/protocols/analysis-protocol.md) |
|
|
219
|
+
- Specific file:line references
|
|
220
|
+
- Quantify effort estimates
|
|
221
|
+
- Concrete pros/cons
|
|
222
|
+
" --tool {tool} --mode analysis {resume_flag}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
### Resume Mechanism
|
|
226
|
+
|
|
227
|
+
**Session Resume** - Continue from previous CLI session:
|
|
228
|
+
```bash
|
|
229
|
+
# Resume last session
|
|
230
|
+
ccw cli -p "Continue analysis..." --tool gemini --resume
|
|
231
|
+
|
|
232
|
+
# Resume specific session
|
|
233
|
+
ccw cli -p "Verify findings..." --tool codex --resume <session-id>
|
|
234
|
+
|
|
235
|
+
# Merge multiple sessions
|
|
236
|
+
ccw cli -p "Synthesize all..." --tool claude --resume <id1>,<id2>
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
**When to Resume**:
|
|
240
|
+
- Round > 1: Resume previous round's CLI session for context
|
|
241
|
+
- Cross-verification: Resume primary CLI session for secondary to verify
|
|
242
|
+
- User feedback: Resume with new constraints from user input
|
|
243
|
+
|
|
244
|
+
**Context Assembly** (automatic):
|
|
245
|
+
```
|
|
246
|
+
=== PREVIOUS CONVERSATION ===
|
|
247
|
+
USER PROMPT: [Previous CLI prompt]
|
|
248
|
+
ASSISTANT RESPONSE: [Previous CLI output]
|
|
249
|
+
=== CONTINUATION ===
|
|
250
|
+
[New prompt with updated context]
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Fallback Chain
|
|
254
|
+
|
|
255
|
+
Execute primary tool → On failure, try next in chain:
|
|
256
|
+
```
|
|
257
|
+
gemini → codex → claude → degraded-analysis
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Cross-Verification Mode
|
|
261
|
+
|
|
262
|
+
Second+ CLI receives prior analysis for verification:
|
|
263
|
+
```json
|
|
264
|
+
{
|
|
265
|
+
"cross_verification": {
|
|
266
|
+
"agrees_with": ["verified point 1"],
|
|
267
|
+
"disagrees_with": ["challenged point 1"],
|
|
268
|
+
"additions": ["new insight 1"]
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
|
|
275
|
+
## Phase 3: Cross-Verification
|
|
276
|
+
|
|
277
|
+
**Compare CLI outputs**:
|
|
278
|
+
1. Group similar findings across CLIs
|
|
279
|
+
2. Identify multi-CLI agreements (2+ CLIs agree)
|
|
280
|
+
3. Identify disagreements (conflicting conclusions)
|
|
281
|
+
4. Generate resolution based on evidence weight
|
|
282
|
+
|
|
283
|
+
**Output**:
|
|
284
|
+
```json
|
|
285
|
+
{
|
|
286
|
+
"agreements": ["Approach X proposed by gemini, codex"],
|
|
287
|
+
"disagreements": ["Effort estimate differs: gemini=low, codex=high"],
|
|
288
|
+
"resolution": "Resolved using code evidence from gemini"
|
|
289
|
+
}
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
---
|
|
293
|
+
|
|
294
|
+
## Phase 4: Solution Synthesis
|
|
295
|
+
|
|
296
|
+
**Extract and merge approaches**:
|
|
297
|
+
1. Collect implementation_approaches from all CLIs
|
|
298
|
+
2. Normalize names, merge similar approaches
|
|
299
|
+
3. Combine pros/cons/affected_files from multiple sources
|
|
300
|
+
4. Track source_cli attribution
|
|
301
|
+
|
|
302
|
+
**Internal scoring** (used for ranking, not exported):
|
|
303
|
+
```
|
|
304
|
+
score = (source_cli.length × 20) // Multi-CLI consensus
|
|
305
|
+
+ effort_score[effort] // low=30, medium=20, high=10
|
|
306
|
+
+ risk_score[risk] // low=30, medium=20, high=5
|
|
307
|
+
+ (pros.length - cons.length) × 5 // Balance
|
|
308
|
+
+ min(affected_files.length × 3, 15) // Specificity
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
**Output**: Top 3 solutions, ranked in array order (highest score first)
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Phase 5: Output Generation
|
|
316
|
+
|
|
317
|
+
### Convergence Calculation
|
|
318
|
+
|
|
319
|
+
```
|
|
320
|
+
score = agreement_ratio × 0.5 // agreements / (agreements + disagreements)
|
|
321
|
+
+ avg_feasibility × 0.3 // average of CLI feasibility_scores
|
|
322
|
+
+ stability_bonus × 0.2 // +0.2 if no new insights vs previous rounds
|
|
323
|
+
|
|
324
|
+
recommendation:
|
|
325
|
+
- score >= 0.8 → "converged"
|
|
326
|
+
- disagreements > 3 → "user_input_needed"
|
|
327
|
+
- else → "continue"
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### Clarification Questions
|
|
331
|
+
|
|
332
|
+
Generate from:
|
|
333
|
+
1. Unresolved disagreements (max 2)
|
|
334
|
+
2. Technical concerns raised (max 2)
|
|
335
|
+
3. Trade-off decisions needed
|
|
336
|
+
|
|
337
|
+
**Max 4 questions total**
|
|
338
|
+
|
|
339
|
+
### Write Output
|
|
340
|
+
|
|
341
|
+
```javascript
|
|
342
|
+
Write({
|
|
343
|
+
file_path: `${session.folder}/rounds/${round_number}/synthesis.json`,
|
|
344
|
+
content: JSON.stringify(artifact, null, 2)
|
|
345
|
+
})
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
---
|
|
349
|
+
|
|
350
|
+
## Error Handling
|
|
351
|
+
|
|
352
|
+
**CLI Failure**: Try fallback chain → Degraded analysis if all fail
|
|
353
|
+
|
|
354
|
+
**Parse Failure**: Extract bullet points from raw output as fallback
|
|
355
|
+
|
|
356
|
+
**Timeout**: Return partial results with timeout flag
|
|
357
|
+
|
|
358
|
+
---
|
|
359
|
+
|
|
360
|
+
## Quality Standards
|
|
361
|
+
|
|
362
|
+
| Criteria | Good | Bad |
|
|
363
|
+
|----------|------|-----|
|
|
364
|
+
| File references | `src/auth/login.ts:45` | "update relevant files" |
|
|
365
|
+
| Effort estimate | `low` / `medium` / `high` | "some time required" |
|
|
366
|
+
| Pros/Cons | Concrete, specific | Generic, vague |
|
|
367
|
+
| Solution source | Multi-CLI consensus | Single CLI only |
|
|
368
|
+
| Convergence | Score with reasoning | Binary yes/no |
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Key Reminders
|
|
373
|
+
|
|
374
|
+
**ALWAYS**:
|
|
375
|
+
1. **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
376
|
+
2. Execute multiple CLIs for cross-verification
|
|
377
|
+
2. Parse CLI outputs with fallback extraction
|
|
378
|
+
3. Include file:line references in affected_files
|
|
379
|
+
4. Calculate convergence score accurately
|
|
380
|
+
5. Write synthesis.json to round folder
|
|
381
|
+
6. Use `run_in_background: false` for CLI calls
|
|
382
|
+
7. Limit solutions to top 3
|
|
383
|
+
8. Limit clarification questions to 4
|
|
384
|
+
|
|
385
|
+
**NEVER**:
|
|
386
|
+
1. Execute implementation code (analysis only)
|
|
387
|
+
2. Return without writing synthesis.json
|
|
388
|
+
3. Skip cross-verification phase
|
|
389
|
+
4. Generate more than 4 clarification questions
|
|
390
|
+
5. Ignore previous round context
|
|
391
|
+
6. Assume solution without multi-CLI validation
|
|
@@ -65,6 +65,8 @@ Score = 0
|
|
|
65
65
|
|
|
66
66
|
## Phase 2: Context Discovery
|
|
67
67
|
|
|
68
|
+
**Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
69
|
+
|
|
68
70
|
**1. Project Structure**:
|
|
69
71
|
```bash
|
|
70
72
|
ccw tool exec get_modules_by_depth '{}'
|
|
@@ -165,7 +165,8 @@ Brief summary:
|
|
|
165
165
|
## Key Reminders
|
|
166
166
|
|
|
167
167
|
**ALWAYS**:
|
|
168
|
-
1.
|
|
168
|
+
1. **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
169
|
+
2. Read schema file FIRST before generating any output (if schema specified)
|
|
169
170
|
2. Copy field names EXACTLY from schema (case-sensitive)
|
|
170
171
|
3. Verify root structure matches schema (array vs object)
|
|
171
172
|
4. Match nested/flat structures as schema requires
|
|
@@ -428,6 +428,7 @@ function validateTask(task) {
|
|
|
428
428
|
## Key Reminders
|
|
429
429
|
|
|
430
430
|
**ALWAYS**:
|
|
431
|
+
- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
431
432
|
- **Read schema first** to determine output structure
|
|
432
433
|
- Generate task IDs (T1/T2 for plan, FIX1/FIX2 for fix-plan)
|
|
433
434
|
- Include depends_on (even if empty [])
|
|
@@ -436,6 +436,7 @@ See: `.process/iteration-{iteration}-cli-output.txt`
|
|
|
436
436
|
## Key Reminders
|
|
437
437
|
|
|
438
438
|
**ALWAYS:**
|
|
439
|
+
- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
439
440
|
- **Validate context package**: Ensure all required fields present before CLI execution
|
|
440
441
|
- **Handle CLI errors gracefully**: Use fallback chain (Gemini → Qwen → degraded mode)
|
|
441
442
|
- **Parse CLI output structurally**: Extract specific sections (RCA, 修复建议, 验证建议)
|
|
@@ -389,6 +389,7 @@ Before completing any task, verify:
|
|
|
389
389
|
- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution
|
|
390
390
|
|
|
391
391
|
**ALWAYS:**
|
|
392
|
+
- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
392
393
|
- Verify module/package existence with rg/grep/search before referencing
|
|
393
394
|
- Write working code incrementally
|
|
394
395
|
- Test your implementation thoroughly
|
|
@@ -27,6 +27,8 @@ You are a conceptual planning specialist focused on **dedicated single-role** st
|
|
|
27
27
|
|
|
28
28
|
## Core Responsibilities
|
|
29
29
|
|
|
30
|
+
**Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
31
|
+
|
|
30
32
|
1. **Dedicated Role Execution**: Execute exactly one assigned planning role perspective - no multi-role assignments
|
|
31
33
|
2. **Brainstorming Integration**: Integrate with auto brainstorm workflow for role-specific conceptual analysis
|
|
32
34
|
3. **Template-Driven Analysis**: Use planning role templates loaded via `$(cat template)`
|
|
@@ -565,6 +565,7 @@ Output: .workflow/session/{session}/.process/context-package.json
|
|
|
565
565
|
- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution
|
|
566
566
|
|
|
567
567
|
**ALWAYS**:
|
|
568
|
+
- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
568
569
|
- Initialize CodexLens in Phase 0
|
|
569
570
|
- Execute get_modules_by_depth.sh
|
|
570
571
|
- Load CLAUDE.md/README.md (unless in memory)
|
|
@@ -10,6 +10,8 @@ You are an intelligent debugging specialist that autonomously diagnoses bugs thr
|
|
|
10
10
|
|
|
11
11
|
## Tool Selection Hierarchy
|
|
12
12
|
|
|
13
|
+
**Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
14
|
+
|
|
13
15
|
1. **Gemini (Primary)** - Log analysis, hypothesis validation, root cause reasoning
|
|
14
16
|
2. **Qwen (Fallback)** - Same capabilities as Gemini, use when unavailable
|
|
15
17
|
3. **Codex (Alternative)** - Fix implementation, code modification
|
|
@@ -311,6 +311,7 @@ Before completing the task, you must verify the following:
|
|
|
311
311
|
## Key Reminders
|
|
312
312
|
|
|
313
313
|
**ALWAYS**:
|
|
314
|
+
- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
314
315
|
- **Detect Mode**: Check `meta.cli_execute` to determine execution mode (Agent or CLI).
|
|
315
316
|
- **Follow `flow_control`**: Execute the `pre_analysis` steps exactly as defined in the task JSON.
|
|
316
317
|
- **Execute Commands Directly**: All commands are tool-specific and ready to run.
|
|
@@ -308,7 +308,8 @@ Each line is a solution JSON containing tasks. Schema: `cat .claude/workflows/cl
|
|
|
308
308
|
- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution
|
|
309
309
|
|
|
310
310
|
**ALWAYS**:
|
|
311
|
-
1.
|
|
311
|
+
1. **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
312
|
+
2. Read schema first: `cat .claude/workflows/cli-templates/schemas/solution-schema.json`
|
|
312
313
|
2. Use ACE semantic search as PRIMARY exploration tool
|
|
313
314
|
3. Fetch issue details via `ccw issue status <id> --json`
|
|
314
315
|
4. Quantify acceptance.criteria with testable conditions
|
|
@@ -275,7 +275,8 @@ Return brief summaries; full conflict details in separate files:
|
|
|
275
275
|
- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution
|
|
276
276
|
|
|
277
277
|
**ALWAYS**:
|
|
278
|
-
1.
|
|
278
|
+
1. **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
279
|
+
2. Build dependency graph before ordering
|
|
279
280
|
2. Detect file overlaps between solutions
|
|
280
281
|
3. Apply resolution rules consistently
|
|
281
282
|
4. Calculate semantic priority for all solutions
|
|
@@ -75,6 +75,8 @@ Examples:
|
|
|
75
75
|
|
|
76
76
|
## Execution Rules
|
|
77
77
|
|
|
78
|
+
**Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
79
|
+
|
|
78
80
|
1. **Task Tracking**: Create TodoWrite entry for each depth before execution
|
|
79
81
|
2. **Parallelism**: Max 4 jobs per depth, sequential across depths
|
|
80
82
|
3. **Strategy Assignment**: Assign strategy based on depth:
|
|
@@ -28,6 +28,8 @@ You are a test context discovery specialist focused on gathering test coverage i
|
|
|
28
28
|
|
|
29
29
|
## Tool Arsenal
|
|
30
30
|
|
|
31
|
+
**Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
32
|
+
|
|
31
33
|
### 1. Session & Implementation Context
|
|
32
34
|
**Tools**:
|
|
33
35
|
- `Read()` - Load session metadata and implementation summaries
|
|
@@ -332,6 +332,7 @@ When generating test results for orchestrator (saved to `.process/test-results.j
|
|
|
332
332
|
## Important Reminders
|
|
333
333
|
|
|
334
334
|
**ALWAYS:**
|
|
335
|
+
- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
335
336
|
- **Execute tests first** - Understand what's failing before fixing
|
|
336
337
|
- **Diagnose thoroughly** - Find root cause, not just symptoms
|
|
337
338
|
- **Fix minimally** - Change only what's needed to pass tests
|
|
@@ -284,6 +284,8 @@ You execute 6 distinct task types organized into 3 patterns. Each task includes
|
|
|
284
284
|
|
|
285
285
|
### ALWAYS
|
|
286
286
|
|
|
287
|
+
**Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
288
|
+
|
|
287
289
|
**W3C Format Compliance**: ✅ Include $schema in all token files | ✅ Use $type metadata for all tokens | ✅ Use $value wrapper for color (light/dark), duration, easing | ✅ Validate token structure against W3C spec
|
|
288
290
|
|
|
289
291
|
**Pattern Recognition**: ✅ Identify pattern from [TASK_TYPE_IDENTIFIER] first | ✅ Apply pattern-specific execution rules | ✅ Follow autonomy level
|
|
@@ -124,6 +124,7 @@ Before completing any task, verify:
|
|
|
124
124
|
- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution
|
|
125
125
|
|
|
126
126
|
**ALWAYS:**
|
|
127
|
+
- **Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
127
128
|
- Verify resource/dependency existence before referencing
|
|
128
129
|
- Execute tasks systematically and incrementally
|
|
129
130
|
- Test and validate work thoroughly
|