mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-05 16:13:08 +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:
@@ -3,7 +3,7 @@ role: writer
|
||||
prefix: DRAFT
|
||||
inner_loop: true
|
||||
discuss_rounds: [DISCUSS-002, DISCUSS-003, DISCUSS-004, DISCUSS-005]
|
||||
subagents: [discuss, doc-generation]
|
||||
subagents: [discuss]
|
||||
message_types:
|
||||
success: draft_ready
|
||||
revision: draft_revision
|
||||
@@ -56,42 +56,23 @@ message_types:
|
||||
|
||||
## Phase 3: Subagent Document Generation
|
||||
|
||||
**Objective**: Delegate document generation to doc-generation subagent.
|
||||
**Objective**: Generate document using CLI tool.
|
||||
|
||||
Do NOT execute CLI calls in main agent. Delegate to subagent:
|
||||
Use Gemini CLI for document generation:
|
||||
|
||||
```
|
||||
Agent({
|
||||
subagent_type: "universal-executor",
|
||||
run_in_background: false,
|
||||
description: "Generate <doc-type> document",
|
||||
prompt: `<from subagents/doc-generation-subagent.md>
|
||||
|
||||
## Task
|
||||
- Document type: <doc-type>
|
||||
- Session folder: <session-folder>
|
||||
- Template: <template-path>
|
||||
|
||||
## Context
|
||||
- Spec config: <spec-config content>
|
||||
- Discovery context: <discovery-context summary>
|
||||
- Prior discussion feedback: <discussion-file content if exists>
|
||||
- Prior decisions (from writer accumulator):
|
||||
<context_accumulator serialized>
|
||||
|
||||
## Expected Output
|
||||
Return JSON:
|
||||
{
|
||||
"artifact_path": "<output-path>",
|
||||
"summary": "<100-200 char summary>",
|
||||
"key_decisions": ["<decision-1>", ...],
|
||||
"sections_generated": ["<section-1>", ...],
|
||||
"warnings": ["<warning if any>"]
|
||||
}`
|
||||
Bash({
|
||||
command: `ccw cli -p "PURPOSE: Generate <doc-type> document following template and standards
|
||||
TASK: • Load template from <template-path> • Apply spec config and discovery context • Integrate prior discussion feedback • Generate all required sections
|
||||
MODE: write
|
||||
CONTEXT: @<session-folder>/spec/*.json @<template-path> | Memory: Prior decisions: <context_accumulator summary>
|
||||
EXPECTED: Document at <output-path> with: YAML frontmatter, all template sections, cross-references, session_id
|
||||
CONSTRAINTS: Follow document-standards.md" --tool gemini --mode write --rule development-implement-feature --cd <session-folder>`,
|
||||
run_in_background: false
|
||||
})
|
||||
```
|
||||
|
||||
Main agent receives only the JSON summary. Document is written to disk by subagent.
|
||||
Parse CLI output for artifact path and summary. Document is written to disk by CLI.
|
||||
|
||||
## Phase 4: Self-Validation + Inline Discuss
|
||||
|
||||
@@ -119,7 +100,7 @@ Handle discuss verdict per team-worker consensus handling protocol.
|
||||
|
||||
| Scenario | Resolution |
|
||||
|----------|------------|
|
||||
| Subagent failure | Retry once with alternative subagent_type. Still fails → log error, continue next task |
|
||||
| CLI failure | Retry once with alternative tool. Still fails → log error, continue next task |
|
||||
| Discuss subagent fails | Skip discuss, log warning |
|
||||
| Cumulative 3 task failures | SendMessage to coordinator, STOP |
|
||||
| Prior doc not found | Notify coordinator, request prerequisite |
|
||||
|
||||
Reference in New Issue
Block a user