mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-06 16:31:12 +08:00
Refactor architecture optimization and issue resolution workflows
- Enhanced multi-perspective discussion capabilities in discuss-subagent for architecture optimization, integrating CLI tools for structured analysis and recommendations. - Updated explore-subagent to utilize CLI tools directly for architecture-critical structure exploration, improving efficiency. - Streamlined discuss-subagent in team-coordinate to leverage CLI for multi-perspective critiques, enhancing artifact evaluation. - Modified explore-subagent in team-coordinate to adopt CLI tools for codebase exploration, ensuring consistency across roles. - Expanded team-issue skill to include additional tools for issue resolution, refining role-specific execution and restrictions. - Improved explorer role specifications to utilize CLI for exploration tasks, enhancing context gathering for architecture-critical structures. - Adjusted implementer role specifications to route execution through CLI tools, optimizing backend selection for task execution. - Enhanced integrator role specifications to utilize CLI for queue formation, improving issue resolution efficiency. - Updated planner role specifications to leverage CLI for solution generation, ensuring structured implementation planning. - Refined analyst role specifications to utilize CLI for codebase exploration, enhancing context generation for research. - Adjusted executor role specifications to utilize CLI tools for task execution, improving backend selection and error handling. - Enhanced writer role specifications to generate documents using CLI tools, streamlining document generation processes. - Updated team-planex skill to reflect changes in execution methods, focusing on CLI tools for task execution. - Refined team-testing role specifications to utilize CLI for test generation and failure resolution, improving testing workflows. - Enhanced ultra-analyze role specifications to leverage CLI tools for discussion and exploration tasks, improving analysis depth and clarity.
This commit is contained in:
@@ -53,31 +53,22 @@ Bash("ccw issue status <issueId> --json")
|
||||
| Complexity | Execution |
|
||||
|------------|-----------|
|
||||
| Low | Direct ACE search: `mcp__ace-tool__search_context(project_root_path, query)` |
|
||||
| Medium/High | Spawn cli-explore-agent: `Agent({ subagent_type: "cli-explore-agent", run_in_background: false })` |
|
||||
| Medium/High | CLI exploration: `Bash("ccw cli -p \"<exploration_prompt>\" --tool gemini --mode analysis", { run_in_background: false })` |
|
||||
|
||||
**cli-explore-agent prompt template**:
|
||||
**CLI exploration prompt template**:
|
||||
|
||||
```
|
||||
## Issue Context
|
||||
ID: <issueId>
|
||||
Title: <issue.title>
|
||||
Description: <issue.context>
|
||||
Priority: <issue.priority>
|
||||
PURPOSE: Explore codebase for issue <issueId> to identify relevant files, dependencies, and impact scope; success = comprehensive context report written to <session>/explorations/context-<issueId>.json
|
||||
|
||||
## MANDATORY FIRST STEPS
|
||||
1. Run: ccw tool exec get_modules_by_depth '{}'
|
||||
2. Execute ACE searches based on issue keywords
|
||||
3. Run: ccw spec load --category exploration
|
||||
TASK: • Run ccw tool exec get_modules_by_depth '{}' • Execute ACE searches for issue keywords • Map file dependencies and integration points • Assess impact scope • Find existing patterns • Check git log for related changes
|
||||
|
||||
## Exploration Focus
|
||||
- Identify files directly related to this issue
|
||||
- Map dependencies and integration points
|
||||
- Assess impact scope (how many modules/files affected)
|
||||
- Find existing patterns relevant to the fix
|
||||
- Check for previous related changes (git log)
|
||||
MODE: analysis
|
||||
|
||||
## Output
|
||||
Write findings to: <session>/explorations/context-<issueId>.json
|
||||
CONTEXT: @**/* | Memory: Issue <issueId> - <issue.title> (Priority: <issue.priority>)
|
||||
|
||||
EXPECTED: JSON report with: relevant_files (path + relevance), dependencies, impact_scope (low/medium/high), existing_patterns, related_changes, key_findings, complexity_assessment
|
||||
|
||||
CONSTRAINTS: Focus on issue context | Write output to <session>/explorations/context-<issueId>.json
|
||||
```
|
||||
|
||||
**Report schema**:
|
||||
|
||||
@@ -15,9 +15,9 @@ Load solution plan, route to execution backend (Agent/Codex/Gemini), run tests,
|
||||
|
||||
| Backend | Condition | Method |
|
||||
|---------|-----------|--------|
|
||||
| agent | task_count <= 3 or explicit | `Agent({ subagent_type: "code-developer", run_in_background: false })` |
|
||||
| codex | task_count > 3 or explicit | `ccw cli --tool codex --mode write --id issue-<issueId>` |
|
||||
| gemini | explicit | `ccw cli --tool gemini --mode write --id issue-<issueId>` |
|
||||
| gemini | task_count <= 3 or explicit | `ccw cli --tool gemini --mode write --id issue-<issueId>` |
|
||||
| qwen | explicit | `ccw cli --tool qwen --mode write --id issue-<issueId>` |
|
||||
|
||||
## Phase 2: Load Solution & Resolve Executor
|
||||
|
||||
@@ -26,7 +26,7 @@ Load solution plan, route to execution backend (Agent/Codex/Gemini), run tests,
|
||||
| Issue ID | Task description (GH-\d+ or ISS-\d{8}-\d{6}) | Yes |
|
||||
| Bound solution | `ccw issue solutions <id> --json` | Yes |
|
||||
| Explorer context | `<session>/explorations/context-<issueId>.json` | No |
|
||||
| Execution method | Task description (`execution_method: Agent|Codex|Gemini|Auto`) | Yes |
|
||||
| Execution method | Task description (`execution_method: Codex|Gemini|Qwen|Auto`) | Yes |
|
||||
| Code review | Task description (`code_review: Skip|Gemini Review|Codex Review`) | No |
|
||||
|
||||
1. Extract issue ID from task description
|
||||
@@ -34,7 +34,7 @@ Load solution plan, route to execution backend (Agent/Codex/Gemini), run tests,
|
||||
3. Load bound solution: `Bash("ccw issue solutions <issueId> --json")`
|
||||
4. If no bound solution -> report error, STOP
|
||||
5. Load explorer context (if available)
|
||||
6. Resolve execution method (Auto: task_count <= 3 -> agent, else codex)
|
||||
6. Resolve execution method (Auto: task_count <= 3 -> gemini, else codex)
|
||||
7. Update issue status: `Bash("ccw issue update <issueId> --status in-progress")`
|
||||
|
||||
## Phase 3: Implementation (Multi-Backend Routing)
|
||||
@@ -69,9 +69,9 @@ Dependencies: <explorerContext.dependencies>
|
||||
```
|
||||
|
||||
Route by executor:
|
||||
- **agent**: `Agent({ subagent_type: "code-developer", run_in_background: false, prompt: <prompt> })`
|
||||
- **codex**: `Bash("ccw cli -p \"<prompt>\" --tool codex --mode write --id issue-<issueId>")`
|
||||
- **gemini**: `Bash("ccw cli -p \"<prompt>\" --tool gemini --mode write --id issue-<issueId>")`
|
||||
- **codex**: `Bash("ccw cli -p \"<prompt>\" --tool codex --mode write --id issue-<issueId>", { run_in_background: false })`
|
||||
- **gemini**: `Bash("ccw cli -p \"<prompt>\" --tool gemini --mode write --id issue-<issueId>", { run_in_background: false })`
|
||||
- **qwen**: `Bash("ccw cli -p \"<prompt>\" --tool qwen --mode write --id issue-<issueId>", { run_in_background: false })`
|
||||
|
||||
On CLI failure, resume: `ccw cli -p "Continue" --resume issue-<issueId> --tool <tool> --mode write`
|
||||
|
||||
|
||||
@@ -34,32 +34,25 @@ Bash("ccw issue solutions <issueId> --json")
|
||||
| All issues bound | Proceed to Phase 3 |
|
||||
| Any issue unbound | Report error to coordinator, STOP |
|
||||
|
||||
## Phase 3: Queue Formation via issue-queue-agent
|
||||
## Phase 3: Queue Formation via CLI
|
||||
|
||||
**Agent invocation**:
|
||||
**CLI invocation**:
|
||||
|
||||
```
|
||||
Agent({
|
||||
subagent_type: "issue-queue-agent",
|
||||
run_in_background: false,
|
||||
description: "Form queue for <count> issues",
|
||||
prompt: "
|
||||
## Issues to Queue
|
||||
Issue IDs: <issueIds>
|
||||
Bash("ccw cli -p \"
|
||||
PURPOSE: Form execution queue for <count> issues with conflict detection and optimal ordering; success = DAG-based queue with parallel groups written to execution-queue.json
|
||||
|
||||
## Bound Solutions
|
||||
<solution list with issue_id, solution_id, task_count>
|
||||
TASK: • Load all bound solutions from .workflow/issues/solutions/ • Analyze file conflicts between solutions • Build dependency graph • Determine optimal execution order (DAG-based) • Identify parallel execution groups • Write queue JSON
|
||||
|
||||
## Instructions
|
||||
1. Load all bound solutions from .workflow/issues/solutions/
|
||||
2. Analyze file conflicts between solutions using Gemini CLI
|
||||
3. Determine optimal execution order (DAG-based)
|
||||
4. Produce ordered execution queue
|
||||
MODE: analysis
|
||||
|
||||
## Expected Output
|
||||
Write queue to: .workflow/issues/queue/execution-queue.json
|
||||
"
|
||||
})
|
||||
CONTEXT: @.workflow/issues/solutions/**/*.json | Memory: Issues to queue: <issueIds>
|
||||
|
||||
EXPECTED: Queue JSON with: ordered issue list, conflict analysis, parallel_groups (issues that can run concurrently), depends_on relationships
|
||||
Write to: .workflow/issues/queue/execution-queue.json
|
||||
|
||||
CONSTRAINTS: Resolve file conflicts | Optimize for parallelism | Maintain dependency order
|
||||
\" --tool gemini --mode analysis", { run_in_background: true })
|
||||
```
|
||||
|
||||
**Parse queue result**:
|
||||
|
||||
@@ -35,39 +35,38 @@ Read("<session>/explorations/context-<issueId>.json")
|
||||
- Design alternative approach addressing reviewer concerns
|
||||
5. Load wisdom files for accumulated codebase knowledge
|
||||
|
||||
## Phase 3: Solution Generation via issue-plan-agent
|
||||
## Phase 3: Solution Generation via CLI
|
||||
|
||||
**Agent invocation**:
|
||||
**CLI invocation**:
|
||||
|
||||
```
|
||||
Agent({
|
||||
subagent_type: "issue-plan-agent",
|
||||
run_in_background: false,
|
||||
description: "Plan solution for <issueId>",
|
||||
prompt: "
|
||||
issue_ids: [\"<issueId>\"]
|
||||
project_root: \"<projectRoot>\"
|
||||
Bash("ccw cli -p \"
|
||||
PURPOSE: Design solution for issue <issueId> and decompose into implementation tasks; success = solution bound to issue with task breakdown
|
||||
|
||||
## Explorer Context (pre-gathered)
|
||||
TASK: • Load issue details from ccw issue status • Analyze explorer context • Design solution approach • Break down into implementation tasks • Generate solution JSON • Bind solution to issue
|
||||
|
||||
MODE: analysis
|
||||
|
||||
CONTEXT: @**/* | Memory: Issue <issueId> - <issue.title> (Priority: <issue.priority>)
|
||||
Explorer findings: <explorerContext.key_findings>
|
||||
Relevant files: <explorerContext.relevant_files>
|
||||
Key findings: <explorerContext.key_findings>
|
||||
Complexity: <explorerContext.complexity_assessment>
|
||||
|
||||
## Revision Required (if SOLVE-fix)
|
||||
Previous solution was rejected by reviewer. Feedback:
|
||||
<reviewFeedback>
|
||||
EXPECTED: Solution JSON with: issue_id, solution_id, approach, tasks (ordered list with descriptions), estimated_files, dependencies
|
||||
Write to: <session>/solutions/solution-<issueId>.json
|
||||
Then bind: ccw issue bind <issueId> <solution_id>
|
||||
|
||||
Design an ALTERNATIVE approach that addresses the reviewer's concerns.
|
||||
"
|
||||
})
|
||||
CONSTRAINTS: Follow existing patterns | Minimal changes | Address reviewer feedback if SOLVE-fix task
|
||||
\" --tool gemini --mode analysis", { run_in_background: true })
|
||||
```
|
||||
|
||||
**Expected agent result**:
|
||||
**Expected CLI output**: Solution file path and binding confirmation
|
||||
|
||||
| Field | Description |
|
||||
|-------|-------------|
|
||||
| `bound` | Array of auto-bound solutions: `[{issue_id, solution_id, task_count}]` |
|
||||
| `pending_selection` | Array of multi-solution issues: `[{issue_id, solutions: [...]}]` |
|
||||
**Parse result**:
|
||||
|
||||
```
|
||||
Read("<session>/solutions/solution-<issueId>.json")
|
||||
```
|
||||
|
||||
## Phase 4: Solution Selection & Reporting
|
||||
|
||||
|
||||
Reference in New Issue
Block a user