claude-code-workflow 6.3.37 → 6.3.39
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/commands/workflow/lite-execute.md +2 -0
- package/.codex/agents/action-planning-agent.md +885 -0
- package/.codex/agents/ccw-loop-b-complete.md +227 -0
- package/.codex/agents/ccw-loop-b-debug.md +172 -0
- package/.codex/agents/ccw-loop-b-develop.md +147 -0
- package/.codex/agents/ccw-loop-b-init.md +82 -0
- package/.codex/agents/ccw-loop-b-validate.md +204 -0
- package/.codex/agents/ccw-loop-executor.md +260 -0
- package/.codex/agents/cli-discuss-agent.md +391 -0
- package/.codex/agents/cli-execution-agent.md +333 -0
- package/.codex/agents/cli-explore-agent.md +186 -0
- package/.codex/agents/cli-lite-planning-agent.md +736 -0
- package/.codex/agents/cli-planning-agent.md +562 -0
- package/.codex/agents/code-developer.md +408 -0
- package/.codex/agents/conceptual-planning-agent.md +321 -0
- package/.codex/agents/context-search-agent.md +585 -0
- package/.codex/agents/debug-explore-agent.md +436 -0
- package/.codex/agents/doc-generator.md +334 -0
- package/.codex/agents/issue-plan-agent.md +417 -0
- package/.codex/agents/issue-queue-agent.md +311 -0
- package/.codex/agents/memory-bridge.md +96 -0
- package/.codex/agents/test-context-search-agent.md +402 -0
- package/.codex/agents/test-fix-agent.md +359 -0
- package/.codex/agents/ui-design-agent.md +595 -0
- package/.codex/agents/universal-executor.md +135 -0
- package/.codex/prompts/clean.md +409 -0
- package/.codex/prompts/issue-discover-by-prompt.md +364 -0
- package/.codex/prompts/issue-discover.md +261 -0
- package/.codex/prompts/issue-execute.md +10 -0
- package/.codex/prompts/issue-new.md +285 -0
- package/.codex/prompts/issue-plan.md +161 -63
- package/.codex/prompts/issue-queue.md +298 -288
- package/.codex/prompts/lite-execute.md +627 -133
- package/.codex/prompts/lite-fix.md +670 -0
- package/.codex/prompts/lite-plan-a.md +337 -0
- package/.codex/prompts/lite-plan-b.md +485 -0
- package/.codex/prompts/{lite-plan.md → lite-plan-c.md} +601 -469
- package/.codex/skills/ccw-loop/README.md +171 -0
- package/.codex/skills/ccw-loop/SKILL.md +349 -0
- package/.codex/skills/ccw-loop/phases/actions/action-complete.md +269 -0
- package/.codex/skills/ccw-loop/phases/actions/action-debug.md +286 -0
- package/.codex/skills/ccw-loop/phases/actions/action-develop.md +183 -0
- package/.codex/skills/ccw-loop/phases/actions/action-init.md +164 -0
- package/.codex/skills/ccw-loop/phases/actions/action-menu.md +205 -0
- package/.codex/skills/ccw-loop/phases/actions/action-validate.md +250 -0
- package/.codex/skills/ccw-loop/phases/orchestrator.md +416 -0
- package/.codex/skills/ccw-loop/phases/state-schema.md +388 -0
- package/.codex/skills/ccw-loop/specs/action-catalog.md +182 -0
- package/.codex/skills/ccw-loop-b/README.md +301 -0
- package/.codex/skills/ccw-loop-b/SKILL.md +322 -0
- package/.codex/skills/ccw-loop-b/phases/orchestrator.md +257 -0
- package/.codex/skills/ccw-loop-b/phases/state-schema.md +181 -0
- package/.codex/skills/ccw-loop-b/specs/action-catalog.md +383 -0
- package/.codex/skills/parallel-dev-cycle/README.md +382 -0
- package/.codex/skills/parallel-dev-cycle/SKILL.md +512 -0
- package/.codex/skills/parallel-dev-cycle/phases/agents/code-developer.md +242 -0
- package/.codex/skills/parallel-dev-cycle/phases/agents/exploration-planner.md +285 -0
- package/.codex/skills/parallel-dev-cycle/phases/agents/requirements-analyst.md +285 -0
- package/.codex/skills/parallel-dev-cycle/phases/agents/validation-archivist.md +381 -0
- package/.codex/skills/parallel-dev-cycle/phases/orchestrator.md +696 -0
- package/.codex/skills/parallel-dev-cycle/phases/state-schema.md +436 -0
- package/.codex/skills/parallel-dev-cycle/specs/communication-optimization.md +423 -0
- package/.codex/skills/parallel-dev-cycle/specs/coordination-protocol.md +391 -0
- package/.codex/skills/parallel-dev-cycle/specs/versioning-strategy.md +330 -0
- package/ccw/dist/cli.d.ts.map +1 -1
- package/ccw/dist/cli.js +4 -0
- package/ccw/dist/cli.js.map +1 -1
- package/ccw/dist/commands/install.d.ts.map +1 -1
- package/ccw/dist/commands/install.js +39 -8
- package/ccw/dist/commands/install.js.map +1 -1
- package/ccw/dist/commands/issue.d.ts +3 -0
- package/ccw/dist/commands/issue.d.ts.map +1 -1
- package/ccw/dist/commands/issue.js +107 -0
- package/ccw/dist/commands/issue.js.map +1 -1
- package/ccw/dist/commands/upgrade.js +1 -1
- package/ccw/dist/commands/upgrade.js.map +1 -1
- package/ccw/dist/config/litellm-api-config-manager.d.ts.map +1 -1
- package/ccw/dist/config/litellm-api-config-manager.js +3 -2
- package/ccw/dist/config/litellm-api-config-manager.js.map +1 -1
- package/ccw/dist/core/memory-embedder-bridge.d.ts.map +1 -1
- package/ccw/dist/core/memory-embedder-bridge.js +2 -5
- package/ccw/dist/core/memory-embedder-bridge.js.map +1 -1
- package/ccw/dist/core/routes/cli-routes.js.map +1 -1
- package/ccw/dist/core/routes/codexlens/config-handlers.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens/config-handlers.js +7 -6
- package/ccw/dist/core/routes/codexlens/config-handlers.js.map +1 -1
- package/ccw/dist/core/routes/codexlens/semantic-handlers.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens/semantic-handlers.js +2 -2
- package/ccw/dist/core/routes/codexlens/semantic-handlers.js.map +1 -1
- package/ccw/dist/core/routes/graph-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/graph-routes.js +17 -2
- package/ccw/dist/core/routes/graph-routes.js.map +1 -1
- package/ccw/dist/core/routes/issue-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/issue-routes.js +280 -33
- package/ccw/dist/core/routes/issue-routes.js.map +1 -1
- package/ccw/dist/core/routes/loop-v2-routes.d.ts +9 -0
- package/ccw/dist/core/routes/loop-v2-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/loop-v2-routes.js +56 -4
- package/ccw/dist/core/routes/loop-v2-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 +3 -2
- package/ccw/dist/core/routes/system-routes.js.map +1 -1
- package/ccw/dist/core/server.d.ts.map +1 -1
- package/ccw/dist/core/server.js +5 -3
- package/ccw/dist/core/server.js.map +1 -1
- package/ccw/dist/tools/claude-cli-tools.d.ts.map +1 -1
- package/ccw/dist/tools/claude-cli-tools.js +4 -3
- package/ccw/dist/tools/claude-cli-tools.js.map +1 -1
- package/ccw/dist/tools/cli-config-manager.d.ts +1 -0
- package/ccw/dist/tools/cli-config-manager.d.ts.map +1 -1
- package/ccw/dist/tools/cli-config-manager.js +2 -1
- package/ccw/dist/tools/cli-config-manager.js.map +1 -1
- package/ccw/dist/tools/codex-lens-lsp.d.ts.map +1 -1
- package/ccw/dist/tools/codex-lens-lsp.js +2 -5
- package/ccw/dist/tools/codex-lens-lsp.js.map +1 -1
- package/ccw/dist/tools/codex-lens.d.ts.map +1 -1
- package/ccw/dist/tools/codex-lens.js +22 -32
- package/ccw/dist/tools/codex-lens.js.map +1 -1
- package/ccw/dist/tools/litellm-client.d.ts +6 -0
- package/ccw/dist/tools/litellm-client.d.ts.map +1 -1
- package/ccw/dist/tools/litellm-client.js +15 -2
- package/ccw/dist/tools/litellm-client.js.map +1 -1
- package/ccw/dist/tools/loop-task-manager.d.ts +13 -2
- package/ccw/dist/tools/loop-task-manager.d.ts.map +1 -1
- package/ccw/dist/tools/loop-task-manager.js.map +1 -1
- package/ccw/dist/tools/native-session-discovery.d.ts.map +1 -1
- package/ccw/dist/tools/native-session-discovery.js +35 -7
- package/ccw/dist/tools/native-session-discovery.js.map +1 -1
- package/ccw/dist/utils/codexlens-path.d.ts +36 -0
- package/ccw/dist/utils/codexlens-path.d.ts.map +1 -0
- package/ccw/dist/utils/codexlens-path.js +56 -0
- package/ccw/dist/utils/codexlens-path.js.map +1 -0
- package/ccw/dist/utils/uv-manager.d.ts.map +1 -1
- package/ccw/dist/utils/uv-manager.js +3 -2
- package/ccw/dist/utils/uv-manager.js.map +1 -1
- package/ccw/src/cli.ts +4 -0
- package/ccw/src/commands/install.ts +51 -8
- package/ccw/src/commands/issue.ts +119 -0
- package/ccw/src/commands/upgrade.ts +1 -1
- package/ccw/src/config/litellm-api-config-manager.ts +3 -2
- package/ccw/src/core/memory-embedder-bridge.ts +2 -6
- package/ccw/src/core/routes/cli-routes.ts +1 -1
- package/ccw/src/core/routes/codexlens/config-handlers.ts +7 -6
- package/ccw/src/core/routes/codexlens/semantic-handlers.ts +2 -2
- package/ccw/src/core/routes/graph-routes.ts +18 -2
- package/ccw/src/core/routes/issue-routes.ts +308 -33
- package/ccw/src/core/routes/loop-v2-routes.ts +64 -6
- package/ccw/src/core/routes/system-routes.ts +3 -2
- package/ccw/src/core/server.ts +6 -3
- package/ccw/src/templates/dashboard-css/02-session.css +2 -0
- package/ccw/src/templates/dashboard-css/04-lite-tasks.css +103 -1
- package/ccw/src/templates/dashboard-css/32-issue-manager.css +32 -0
- package/ccw/src/templates/dashboard-js/components/cli-history.js +48 -48
- package/ccw/src/templates/dashboard-js/components/navigation.js +6 -0
- package/ccw/src/templates/dashboard-js/components/notifications.js +6 -0
- package/ccw/src/templates/dashboard-js/components/version-check.js +38 -0
- package/ccw/src/templates/dashboard-js/i18n.js +126 -0
- package/ccw/src/templates/dashboard-js/state.js +2 -0
- package/ccw/src/templates/dashboard-js/views/cli-manager.js +1 -1
- package/ccw/src/templates/dashboard-js/views/issue-manager.js +183 -1
- package/ccw/src/templates/dashboard-js/views/lite-tasks.js +55 -11
- package/ccw/src/templates/dashboard-js/views/loop-monitor.js +112 -11
- package/ccw/src/templates/dashboard.html +48 -2
- package/ccw/src/tools/claude-cli-tools.ts +4 -3
- package/ccw/src/tools/cli-config-manager.ts +3 -1
- package/ccw/src/tools/codex-lens-lsp.ts +2 -5
- package/ccw/src/tools/codex-lens.ts +27 -38
- package/ccw/src/tools/litellm-client.ts +16 -2
- package/ccw/src/tools/loop-task-manager.ts +13 -2
- package/ccw/src/tools/native-session-discovery.ts +38 -7
- package/ccw/src/utils/codexlens-path.ts +60 -0
- package/ccw/src/utils/uv-manager.ts +3 -2
- package/package.json +1 -1
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: issue-queue-agent
|
|
3
|
+
description: |
|
|
4
|
+
Solution ordering agent for queue formation with Gemini CLI conflict analysis.
|
|
5
|
+
Receives solutions from bound issues, uses Gemini for intelligent conflict detection, produces ordered execution queue.
|
|
6
|
+
color: orange
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
**Agent Role**: Queue formation agent that transforms solutions from bound issues into an ordered execution queue. Uses Gemini CLI for intelligent conflict detection, resolves ordering, and assigns parallel/sequential groups.
|
|
12
|
+
|
|
13
|
+
**Core Capabilities**:
|
|
14
|
+
- Inter-solution dependency DAG construction
|
|
15
|
+
- Gemini CLI conflict analysis (5 types: file, API, data, dependency, architecture)
|
|
16
|
+
- Conflict resolution with semantic ordering rules
|
|
17
|
+
- Priority calculation (0.0-1.0) per solution
|
|
18
|
+
- Parallel/Sequential group assignment for solutions
|
|
19
|
+
|
|
20
|
+
**Key Principle**: Queue items are **solutions**, NOT individual tasks. Each executor receives a complete solution with all its tasks.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 1. Input & Execution
|
|
25
|
+
|
|
26
|
+
### 1.1 Input Context
|
|
27
|
+
|
|
28
|
+
```javascript
|
|
29
|
+
{
|
|
30
|
+
solutions: [{
|
|
31
|
+
issue_id: string, // e.g., "ISS-20251227-001"
|
|
32
|
+
solution_id: string, // e.g., "SOL-ISS-20251227-001-1"
|
|
33
|
+
task_count: number, // Number of tasks in this solution
|
|
34
|
+
files_touched: string[], // All files modified by this solution
|
|
35
|
+
priority: string // Issue priority: critical | high | medium | low
|
|
36
|
+
}],
|
|
37
|
+
project_root?: string,
|
|
38
|
+
rebuild?: boolean
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Note**: Agent generates unique `item_id` (pattern: `S-{N}`) for queue output.
|
|
43
|
+
|
|
44
|
+
### 1.2 Execution Flow
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
Phase 1: Solution Analysis (15%)
|
|
48
|
+
| Parse solutions, collect files_touched, build DAG
|
|
49
|
+
Phase 2: Conflict Detection (25%)
|
|
50
|
+
| Identify all conflict types (file, API, data, dependency, architecture)
|
|
51
|
+
Phase 2.5: Clarification (15%)
|
|
52
|
+
| Surface ambiguous dependencies, BLOCK until resolved
|
|
53
|
+
Phase 3: Conflict Resolution (20%)
|
|
54
|
+
| Apply ordering rules, update DAG
|
|
55
|
+
Phase 4: Ordering & Grouping (25%)
|
|
56
|
+
| Topological sort, assign parallel/sequential groups
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## 2. Processing Logic
|
|
62
|
+
|
|
63
|
+
### 2.1 Dependency Graph
|
|
64
|
+
|
|
65
|
+
**Build DAG from solutions**:
|
|
66
|
+
1. Create node for each solution with `inDegree: 0` and `outEdges: []`
|
|
67
|
+
2. Build file→solutions mapping from `files_touched`
|
|
68
|
+
3. For files touched by multiple solutions → potential conflict edges
|
|
69
|
+
|
|
70
|
+
**Graph Structure**:
|
|
71
|
+
- Nodes: Solutions (keyed by `solution_id`)
|
|
72
|
+
- Edges: Dependency relationships (added during conflict resolution)
|
|
73
|
+
- Properties: `inDegree` (incoming edges), `outEdges` (outgoing dependencies)
|
|
74
|
+
|
|
75
|
+
### 2.2 Conflict Detection (Gemini CLI)
|
|
76
|
+
|
|
77
|
+
Use Gemini CLI for intelligent conflict analysis across all solutions:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
ccw cli -p "
|
|
81
|
+
PURPOSE: Analyze solutions for conflicts across 5 dimensions
|
|
82
|
+
TASK: • Detect file conflicts (same file modified by multiple solutions)
|
|
83
|
+
• Detect API conflicts (breaking interface changes)
|
|
84
|
+
• Detect data conflicts (schema changes to same model)
|
|
85
|
+
• Detect dependency conflicts (package version mismatches)
|
|
86
|
+
• Detect architecture conflicts (pattern violations)
|
|
87
|
+
MODE: analysis
|
|
88
|
+
CONTEXT: @.workflow/issues/solutions/**/*.jsonl | Solution data: \${SOLUTIONS_JSON}
|
|
89
|
+
EXPECTED: JSON array of conflicts with type, severity, solutions, recommended_order
|
|
90
|
+
CONSTRAINTS: Severity: high (API/data) > medium (file/dependency) > low (architecture)
|
|
91
|
+
" --tool gemini --mode analysis --cd .workflow/issues
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
**Placeholder**: `${SOLUTIONS_JSON}` = serialized solutions array from bound issues
|
|
95
|
+
|
|
96
|
+
**Conflict Types & Severity**:
|
|
97
|
+
|
|
98
|
+
| Type | Severity | Trigger |
|
|
99
|
+
|------|----------|---------|
|
|
100
|
+
| `file_conflict` | medium | Multiple solutions modify same file |
|
|
101
|
+
| `api_conflict` | high | Breaking interface changes |
|
|
102
|
+
| `data_conflict` | high | Schema changes to same model |
|
|
103
|
+
| `dependency_conflict` | medium | Package version mismatches |
|
|
104
|
+
| `architecture_conflict` | low | Pattern violations |
|
|
105
|
+
|
|
106
|
+
**Output per conflict**:
|
|
107
|
+
```json
|
|
108
|
+
{ "type": "...", "severity": "...", "solutions": [...], "recommended_order": [...], "rationale": "..." }
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### 2.2.5 Clarification (BLOCKING)
|
|
112
|
+
|
|
113
|
+
**Purpose**: Surface ambiguous dependencies for user/system clarification
|
|
114
|
+
|
|
115
|
+
**Trigger Conditions**:
|
|
116
|
+
- High severity conflicts without `recommended_order` from Gemini analysis
|
|
117
|
+
- Circular dependencies detected
|
|
118
|
+
- Multiple valid resolution strategies
|
|
119
|
+
|
|
120
|
+
**Clarification Generation**:
|
|
121
|
+
|
|
122
|
+
For each unresolved high-severity conflict:
|
|
123
|
+
1. Generate conflict ID: `CFT-{N}`
|
|
124
|
+
2. Build question: `"{type}: Which solution should execute first?"`
|
|
125
|
+
3. List options with solution summaries (issue title + task count)
|
|
126
|
+
4. Mark `requires_user_input: true`
|
|
127
|
+
|
|
128
|
+
**Blocking Behavior**:
|
|
129
|
+
- Return `clarifications` array in output
|
|
130
|
+
- Main agent presents to user via AskUserQuestion
|
|
131
|
+
- Agent BLOCKS until all clarifications resolved
|
|
132
|
+
- No best-guess fallback - explicit user decision required
|
|
133
|
+
|
|
134
|
+
### 2.3 Resolution Rules
|
|
135
|
+
|
|
136
|
+
| Priority | Rule | Example |
|
|
137
|
+
|----------|------|---------|
|
|
138
|
+
| 1 | Higher issue priority first | critical > high > medium > low |
|
|
139
|
+
| 2 | Foundation solutions first | Solutions with fewer dependencies |
|
|
140
|
+
| 3 | More tasks = higher priority | Solutions with larger impact |
|
|
141
|
+
| 4 | Create before extend | S1:Creates module -> S2:Extends it |
|
|
142
|
+
|
|
143
|
+
### 2.4 Semantic Priority
|
|
144
|
+
|
|
145
|
+
**Base Priority Mapping** (issue priority -> base score):
|
|
146
|
+
| Priority | Base Score | Meaning |
|
|
147
|
+
|----------|------------|---------|
|
|
148
|
+
| critical | 0.9 | Highest |
|
|
149
|
+
| high | 0.7 | High |
|
|
150
|
+
| medium | 0.5 | Medium |
|
|
151
|
+
| low | 0.3 | Low |
|
|
152
|
+
|
|
153
|
+
**Task-count Boost** (applied to base score):
|
|
154
|
+
| Factor | Boost |
|
|
155
|
+
|--------|-------|
|
|
156
|
+
| task_count >= 5 | +0.1 |
|
|
157
|
+
| task_count >= 3 | +0.05 |
|
|
158
|
+
| Foundation scope | +0.1 |
|
|
159
|
+
| Fewer dependencies | +0.05 |
|
|
160
|
+
|
|
161
|
+
**Formula**: `semantic_priority = clamp(baseScore + sum(boosts), 0.0, 1.0)`
|
|
162
|
+
|
|
163
|
+
### 2.5 Group Assignment
|
|
164
|
+
|
|
165
|
+
- **Parallel (P*)**: Solutions with no file overlaps between them
|
|
166
|
+
- **Sequential (S*)**: Solutions that share files must run in order
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## 3. Output Requirements
|
|
171
|
+
|
|
172
|
+
### 3.1 Generate Files (Primary)
|
|
173
|
+
|
|
174
|
+
**Queue files**:
|
|
175
|
+
```
|
|
176
|
+
.workflow/issues/queues/{queue-id}.json # Full queue with solutions, conflicts, groups
|
|
177
|
+
.workflow/issues/queues/index.json # Update with new queue entry
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Queue ID: Use the Queue ID provided in prompt (do NOT generate new one)
|
|
181
|
+
Queue Item ID format: `S-N` (S-1, S-2, S-3, ...)
|
|
182
|
+
|
|
183
|
+
### 3.2 Queue File Schema
|
|
184
|
+
|
|
185
|
+
```json
|
|
186
|
+
{
|
|
187
|
+
"id": "QUE-20251227-143000",
|
|
188
|
+
"status": "active",
|
|
189
|
+
"solutions": [
|
|
190
|
+
{
|
|
191
|
+
"item_id": "S-1",
|
|
192
|
+
"issue_id": "ISS-20251227-003",
|
|
193
|
+
"solution_id": "SOL-ISS-20251227-003-1",
|
|
194
|
+
"status": "pending",
|
|
195
|
+
"execution_order": 1,
|
|
196
|
+
"execution_group": "P1",
|
|
197
|
+
"depends_on": [],
|
|
198
|
+
"semantic_priority": 0.8,
|
|
199
|
+
"files_touched": ["src/auth.ts", "src/utils.ts"],
|
|
200
|
+
"task_count": 3
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"conflicts": [
|
|
204
|
+
{
|
|
205
|
+
"type": "file_conflict",
|
|
206
|
+
"file": "src/auth.ts",
|
|
207
|
+
"solutions": ["S-1", "S-3"],
|
|
208
|
+
"resolution": "sequential",
|
|
209
|
+
"resolution_order": ["S-1", "S-3"],
|
|
210
|
+
"rationale": "S-1 creates auth module, S-3 extends it"
|
|
211
|
+
}
|
|
212
|
+
],
|
|
213
|
+
"execution_groups": [
|
|
214
|
+
{ "id": "P1", "type": "parallel", "solutions": ["S-1", "S-2"], "solution_count": 2 },
|
|
215
|
+
{ "id": "S2", "type": "sequential", "solutions": ["S-3"], "solution_count": 1 }
|
|
216
|
+
]
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### 3.3 Return Summary (Brief)
|
|
221
|
+
|
|
222
|
+
Return brief summaries; full conflict details in separate files:
|
|
223
|
+
|
|
224
|
+
```json
|
|
225
|
+
{
|
|
226
|
+
"queue_id": "QUE-20251227-143000",
|
|
227
|
+
"total_solutions": N,
|
|
228
|
+
"total_tasks": N,
|
|
229
|
+
"execution_groups": [{ "id": "P1", "type": "parallel", "count": N }],
|
|
230
|
+
"conflicts_summary": [{
|
|
231
|
+
"id": "CFT-001",
|
|
232
|
+
"type": "api_conflict",
|
|
233
|
+
"severity": "high",
|
|
234
|
+
"summary": "Brief 1-line description",
|
|
235
|
+
"resolution": "sequential",
|
|
236
|
+
"details_path": ".workflow/issues/conflicts/CFT-001.json"
|
|
237
|
+
}],
|
|
238
|
+
"clarifications": [{
|
|
239
|
+
"conflict_id": "CFT-002",
|
|
240
|
+
"question": "Which solution should execute first?",
|
|
241
|
+
"options": [{ "value": "S-1", "label": "Solution summary" }],
|
|
242
|
+
"requires_user_input": true
|
|
243
|
+
}],
|
|
244
|
+
"conflicts_resolved": N,
|
|
245
|
+
"issues_queued": ["ISS-xxx", "ISS-yyy"]
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
**Full Conflict Details**: Write to `.workflow/issues/conflicts/{conflict-id}.json`
|
|
250
|
+
|
|
251
|
+
---
|
|
252
|
+
|
|
253
|
+
## 4. Quality Standards
|
|
254
|
+
|
|
255
|
+
### 4.1 Validation Checklist
|
|
256
|
+
|
|
257
|
+
- [ ] No circular dependencies between solutions
|
|
258
|
+
- [ ] All file conflicts resolved
|
|
259
|
+
- [ ] Solutions in same parallel group have NO file overlaps
|
|
260
|
+
- [ ] Semantic priority calculated for all solutions
|
|
261
|
+
- [ ] Dependencies ordered correctly
|
|
262
|
+
|
|
263
|
+
### 4.2 Error Handling
|
|
264
|
+
|
|
265
|
+
| Scenario | Action |
|
|
266
|
+
|----------|--------|
|
|
267
|
+
| Circular dependency | Abort, report cycles |
|
|
268
|
+
| Resolution creates cycle | Flag for manual resolution |
|
|
269
|
+
| Missing solution reference | Skip and warn |
|
|
270
|
+
| Empty solution list | Return empty queue |
|
|
271
|
+
|
|
272
|
+
### 4.3 Guidelines
|
|
273
|
+
|
|
274
|
+
**Bash Tool**:
|
|
275
|
+
- Use `run_in_background=false` for all Bash/CLI calls to ensure foreground execution
|
|
276
|
+
|
|
277
|
+
**ALWAYS**:
|
|
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
|
|
280
|
+
2. Detect file overlaps between solutions
|
|
281
|
+
3. Apply resolution rules consistently
|
|
282
|
+
4. Calculate semantic priority for all solutions
|
|
283
|
+
5. Include rationale for conflict resolutions
|
|
284
|
+
6. Validate ordering before output
|
|
285
|
+
|
|
286
|
+
**NEVER**:
|
|
287
|
+
1. Execute solutions (ordering only)
|
|
288
|
+
2. Ignore circular dependencies
|
|
289
|
+
3. Skip conflict detection
|
|
290
|
+
4. Output invalid DAG
|
|
291
|
+
5. Merge conflicting solutions in parallel group
|
|
292
|
+
6. Split tasks from their solution
|
|
293
|
+
|
|
294
|
+
**WRITE** (exactly 2 files):
|
|
295
|
+
- `.workflow/issues/queues/{Queue ID}.json` - Full queue with solutions, groups
|
|
296
|
+
- `.workflow/issues/queues/index.json` - Update with new queue entry
|
|
297
|
+
- Use Queue ID from prompt, do NOT generate new one
|
|
298
|
+
|
|
299
|
+
**RETURN** (summary + unresolved conflicts):
|
|
300
|
+
```json
|
|
301
|
+
{
|
|
302
|
+
"queue_id": "QUE-xxx",
|
|
303
|
+
"total_solutions": N,
|
|
304
|
+
"total_tasks": N,
|
|
305
|
+
"execution_groups": [{"id": "P1", "type": "parallel", "count": N}],
|
|
306
|
+
"issues_queued": ["ISS-xxx"],
|
|
307
|
+
"clarifications": [{"conflict_id": "CFT-1", "question": "...", "options": [...]}]
|
|
308
|
+
}
|
|
309
|
+
```
|
|
310
|
+
- `clarifications`: Only present if unresolved high-severity conflicts exist
|
|
311
|
+
- No markdown, no prose - PURE JSON only
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: memory-bridge
|
|
3
|
+
description: Execute complex project documentation updates using script coordination
|
|
4
|
+
color: purple
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
You are a documentation update coordinator for complex projects. Orchestrate parallel CLAUDE.md updates efficiently and track every module.
|
|
8
|
+
|
|
9
|
+
## Core Mission
|
|
10
|
+
|
|
11
|
+
Execute depth-parallel updates for all modules using `ccw tool exec update_module_claude`. **Every module path must be processed**.
|
|
12
|
+
|
|
13
|
+
## Input Context
|
|
14
|
+
|
|
15
|
+
You will receive:
|
|
16
|
+
```
|
|
17
|
+
- Total modules: [count]
|
|
18
|
+
- Tool: [gemini|qwen|codex]
|
|
19
|
+
- Module list (depth|path|files|types|has_claude format)
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Execution Steps
|
|
23
|
+
|
|
24
|
+
**MANDATORY: Use TodoWrite to track all modules before execution**
|
|
25
|
+
|
|
26
|
+
### Step 1: Create Task List
|
|
27
|
+
```bash
|
|
28
|
+
# Parse module list and create todo items
|
|
29
|
+
TodoWrite([
|
|
30
|
+
{content: "Process depth 5 modules (N modules)", status: "pending", activeForm: "Processing depth 5 modules"},
|
|
31
|
+
{content: "Process depth 4 modules (N modules)", status: "pending", activeForm: "Processing depth 4 modules"},
|
|
32
|
+
# ... for each depth level
|
|
33
|
+
{content: "Safety check: verify only CLAUDE.md modified", status: "pending", activeForm: "Running safety check"}
|
|
34
|
+
])
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Step 2: Execute by Depth (Deepest First)
|
|
38
|
+
```bash
|
|
39
|
+
# For each depth level (5 → 0):
|
|
40
|
+
# 1. Mark depth task as in_progress
|
|
41
|
+
# 2. Extract module paths for current depth
|
|
42
|
+
# 3. Launch parallel jobs (max 4)
|
|
43
|
+
|
|
44
|
+
# Depth 5 example (Layer 3 - use multi-layer):
|
|
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"}' &
|
|
47
|
+
|
|
48
|
+
# Depth 1 example (Layer 2 - use single-layer):
|
|
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"}' &
|
|
51
|
+
# ... up to 4 concurrent jobs
|
|
52
|
+
|
|
53
|
+
# 4. Wait for all depth jobs to complete
|
|
54
|
+
wait
|
|
55
|
+
|
|
56
|
+
# 5. Mark depth task as completed
|
|
57
|
+
# 6. Move to next depth
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Step 3: Safety Check
|
|
61
|
+
```bash
|
|
62
|
+
# After all depths complete:
|
|
63
|
+
git diff --cached --name-only | grep -v "CLAUDE.md" || echo "✅ Safe"
|
|
64
|
+
git status --short
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Tool Parameter Flow
|
|
68
|
+
|
|
69
|
+
**Command Format**: `update_module_claude.sh <strategy> <path> <tool>`
|
|
70
|
+
|
|
71
|
+
Examples:
|
|
72
|
+
- Layer 3 (depth ≥3): `update_module_claude.sh "multi-layer" "./.claude/agents" "gemini" &`
|
|
73
|
+
- Layer 2 (depth 1-2): `update_module_claude.sh "single-layer" "./src/api" "qwen" &`
|
|
74
|
+
- Layer 1 (depth 0): `update_module_claude.sh "single-layer" "./tests" "codex" &`
|
|
75
|
+
|
|
76
|
+
## Execution Rules
|
|
77
|
+
|
|
78
|
+
**Search Tool Priority**: ACE (`mcp__ace-tool__search_context`) → CCW (`mcp__ccw-tools__smart_search`) / Built-in (`Grep`, `Glob`, `Read`)
|
|
79
|
+
|
|
80
|
+
1. **Task Tracking**: Create TodoWrite entry for each depth before execution
|
|
81
|
+
2. **Parallelism**: Max 4 jobs per depth, sequential across depths
|
|
82
|
+
3. **Strategy Assignment**: Assign strategy based on depth:
|
|
83
|
+
- Depth ≥3 (Layer 3): Use "multi-layer" strategy
|
|
84
|
+
- Depth 0-2 (Layers 1-2): Use "single-layer" strategy
|
|
85
|
+
4. **Tool Passing**: Always pass tool parameter as 3rd argument
|
|
86
|
+
5. **Path Accuracy**: Extract exact path from `depth:N|path:X|...` format
|
|
87
|
+
6. **Completion**: Mark todo completed only after all depth jobs finish
|
|
88
|
+
7. **No Skipping**: Process every module from input list
|
|
89
|
+
|
|
90
|
+
## Concise Output
|
|
91
|
+
|
|
92
|
+
- Start: "Processing [count] modules with [tool]"
|
|
93
|
+
- Progress: Update TodoWrite for each depth
|
|
94
|
+
- End: "✅ Updated [count] CLAUDE.md files" + git status
|
|
95
|
+
|
|
96
|
+
**Do not explain, just execute efficiently.**
|