mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-10 02:24:35 +08:00
Add benchmark results for fast3 and fast4, implement KeepAliveLspBridge, and add tests for staged strategies
- Added new benchmark result files: compare_2026-02-09_score_fast3.json and compare_2026-02-09_score_fast4.json. - Implemented KeepAliveLspBridge to maintain a persistent LSP connection across multiple queries, improving performance. - Created unit tests for staged clustering strategies in test_staged_stage3_fast_strategies.py, ensuring correct behavior of score and dir_rr strategies.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
name: parallel-dev-cycle
|
||||
description: Multi-agent parallel development cycle with requirement analysis, exploration planning, code development, and validation. Supports continuous iteration with markdown progress documentation. Triggers on "parallel-dev-cycle".
|
||||
description: Multi-agent parallel development cycle with requirement analysis, exploration planning, code development, and validation. Orchestration runs inline in main flow (no separate orchestrator agent). Supports continuous iteration with markdown progress documentation. Triggers on "parallel-dev-cycle".
|
||||
allowed-tools: spawn_agent, wait, send_input, close_agent, AskUserQuestion, Read, Write, Edit, Bash, Glob, Grep
|
||||
---
|
||||
|
||||
@@ -12,6 +12,8 @@ Multi-agent parallel development cycle using Codex subagent pattern with four sp
|
||||
3. **Code Development** (CD) - Code development with debug strategy support
|
||||
4. **Validation & Archival Summary** (VAS) - Validation and archival summary
|
||||
|
||||
Orchestration logic (phase management, state updates, feedback coordination) runs **inline in the main flow** — no separate orchestrator agent is spawned. Only 4 worker agents are allocated.
|
||||
|
||||
Each agent **maintains one main document** (e.g., requirements.md, plan.json, implementation.md) that is completely rewritten per iteration, plus auxiliary logs (changes.log, debug-log.ndjson) that are append-only.
|
||||
|
||||
## Architecture Overview
|
||||
@@ -22,10 +24,10 @@ Each agent **maintains one main document** (e.g., requirements.md, plan.json, im
|
||||
└────────────────────────────┬────────────────────────────────┘
|
||||
│
|
||||
v
|
||||
┌──────────────────────┐
|
||||
│ Orchestrator Agent │ (Coordinator)
|
||||
│ (spawned once) │
|
||||
└──────────────────────┘
|
||||
┌──────────────────────────────┐
|
||||
│ Main Flow (Inline Orchestration) │
|
||||
│ Phase 1 → 2 → 3 → 4 │
|
||||
└──────────────────────────────┘
|
||||
│
|
||||
┌────────────────────┼────────────────────┐
|
||||
│ │ │
|
||||
@@ -44,10 +46,10 @@ Each agent **maintains one main document** (e.g., requirements.md, plan.json, im
|
||||
└────────┘
|
||||
│
|
||||
v
|
||||
┌──────────────────────┐
|
||||
│ Summary Report │
|
||||
│ & Markdown Docs │
|
||||
└──────────────────────┘
|
||||
┌──────────────────────────────┐
|
||||
│ Summary Report │
|
||||
│ & Markdown Docs │
|
||||
└──────────────────────────────┘
|
||||
```
|
||||
|
||||
## Key Design Principles
|
||||
@@ -56,7 +58,7 @@ Each agent **maintains one main document** (e.g., requirements.md, plan.json, im
|
||||
2. **Version-Based Overwrite**: Main documents completely rewritten per version; logs append-only
|
||||
3. **Automatic Archival**: Old main document versions automatically archived to `history/` directory
|
||||
4. **Complete Audit Trail**: Changes.log (NDJSON) preserves all change history
|
||||
5. **Parallel Coordination**: Four agents launched simultaneously; coordination via shared state and orchestrator
|
||||
5. **Parallel Coordination**: Four agents launched simultaneously; coordination via shared state and inline main flow
|
||||
6. **File References**: Use short file paths instead of content passing
|
||||
7. **Self-Enhancement**: RA agent proactively extends requirements based on context
|
||||
8. **Shared Discovery Board**: All agents share exploration findings via `discoveries.ndjson` — read on start, write as you discover, eliminating redundant codebase exploration
|
||||
@@ -315,7 +317,7 @@ All agents share a real-time discovery board at `coordination/discoveries.ndjson
|
||||
3. Deduplicate — check existing entries; skip if same `type` + dedup key value already exists
|
||||
4. Append-only — never modify or delete existing lines
|
||||
|
||||
### Agent → Orchestrator Communication
|
||||
### Agent → Main Flow Communication
|
||||
```
|
||||
PHASE_RESULT:
|
||||
- phase: ra | ep | cd | vas
|
||||
@@ -325,7 +327,7 @@ PHASE_RESULT:
|
||||
- issues: []
|
||||
```
|
||||
|
||||
### Orchestrator → Agent Communication
|
||||
### Main Flow → Agent Communication
|
||||
|
||||
Feedback via `send_input` (file refs + issue summary, never full content):
|
||||
```
|
||||
@@ -337,7 +339,7 @@ Feedback via `send_input` (file refs + issue summary, never full content):
|
||||
1. [Specific fix]
|
||||
```
|
||||
|
||||
**Rules**: Only orchestrator writes state file. Agents read state, write to own `.progress/{agent}/` directory only.
|
||||
**Rules**: Only main flow writes state file. Agents read state, write to own `.progress/{agent}/` directory only.
|
||||
|
||||
## Core Rules
|
||||
|
||||
@@ -346,7 +348,7 @@ Feedback via `send_input` (file refs + issue summary, never full content):
|
||||
3. **Parse Every Output**: Extract PHASE_RESULT data from each agent for next phase
|
||||
4. **Auto-Continue**: After each phase, execute next pending phase automatically
|
||||
5. **Track Progress**: Update TodoWrite dynamically with attachment/collapse pattern
|
||||
6. **Single Writer**: Only orchestrator writes to master state file; agents report via PHASE_RESULT
|
||||
6. **Single Writer**: Only main flow writes to master state file; agents report via PHASE_RESULT
|
||||
7. **File References**: Pass file paths between agents, not content
|
||||
8. **DO NOT STOP**: Continuous execution until all phases complete or max iterations reached
|
||||
|
||||
@@ -357,11 +359,11 @@ Feedback via `send_input` (file refs + issue summary, never full content):
|
||||
| Agent timeout | send_input requesting convergence, then retry |
|
||||
| State corrupted | Rebuild from progress markdown files and changes.log |
|
||||
| Agent failed | Re-spawn agent with previous context |
|
||||
| Conflicting results | Orchestrator sends reconciliation request |
|
||||
| Conflicting results | Main flow sends reconciliation request |
|
||||
| Missing files | RA/EP agents identify and request clarification |
|
||||
| Max iterations reached | Generate summary with remaining issues documented |
|
||||
|
||||
## Coordinator Checklist
|
||||
## Coordinator Checklist (Main Flow)
|
||||
|
||||
### Before Each Phase
|
||||
|
||||
|
||||
@@ -258,4 +258,4 @@ function checkControlSignals(cycleId) {
|
||||
|
||||
## Next Phase
|
||||
|
||||
Return to orchestrator, then auto-continue to [Phase 2: Agent Execution](02-agent-execution.md).
|
||||
Return to main flow, then auto-continue to [Phase 2: Agent Execution](02-agent-execution.md).
|
||||
|
||||
@@ -446,4 +446,4 @@ Execution timeout reached. Please:
|
||||
|
||||
## Next Phase
|
||||
|
||||
Return to orchestrator, then auto-continue to [Phase 3: Result Aggregation & Iteration](03-result-aggregation.md).
|
||||
Return to main flow, then auto-continue to [Phase 3: Result Aggregation & Iteration](03-result-aggregation.md).
|
||||
|
||||
@@ -227,4 +227,4 @@ Phase 3: Result Aggregation
|
||||
## Next Phase
|
||||
|
||||
If iteration continues: Return to Phase 2.
|
||||
If iteration completes: Return to orchestrator, then auto-continue to [Phase 4: Completion & Summary](04-completion-summary.md).
|
||||
If iteration completes: Return to main flow, then auto-continue to [Phase 4: Completion & Summary](04-completion-summary.md).
|
||||
|
||||
@@ -83,7 +83,7 @@ Object.values(agents).forEach(id => {
|
||||
### Step 4.4: Return Result
|
||||
|
||||
```javascript
|
||||
console.log('\n=== Parallel Dev Cycle Orchestrator Finished ===')
|
||||
console.log('\n=== Parallel Dev Cycle Finished ===')
|
||||
|
||||
return {
|
||||
status: 'completed',
|
||||
|
||||
@@ -181,7 +181,7 @@ When tests fail during implementation, the CD agent MUST initiate the hypothesis
|
||||
|---------|-----------|--------|
|
||||
| **Test Failure** | Automated tests fail during implementation | Start debug workflow |
|
||||
| **Integration Conflict** | Blockers logged in `issues.md` | Start debug workflow |
|
||||
| **VAS Feedback** | Orchestrator provides validation failure feedback | Start debug workflow |
|
||||
| **VAS Feedback** | Main flow provides validation failure feedback | Start debug workflow |
|
||||
|
||||
### Debug Workflow Phases
|
||||
|
||||
@@ -356,7 +356,7 @@ PHASE_RESULT:
|
||||
- Used to guide development
|
||||
- **RA (Requirements Analyst)**: "Requirement FR-X means..."
|
||||
- Used for clarification
|
||||
- **Orchestrator**: "Fix these issues in next iteration"
|
||||
- **Main Flow**: "Fix these issues in next iteration"
|
||||
- Used for priority setting
|
||||
|
||||
### Sends To:
|
||||
@@ -364,7 +364,7 @@ PHASE_RESULT:
|
||||
- Used for test generation
|
||||
- **RA (Requirements Analyst)**: "FR-X is unclear, need clarification"
|
||||
- Used for requirement updates
|
||||
- **Orchestrator**: "Found blocker X, need help"
|
||||
- **Main Flow**: "Found blocker X, need help"
|
||||
- Used for decision making
|
||||
|
||||
## Code Quality Standards
|
||||
|
||||
@@ -333,7 +333,7 @@ PHASE_RESULT:
|
||||
### Receives From:
|
||||
- **RA (Requirements Analyst)**: "Definitive requirements, version X.Y.Z"
|
||||
- Used to structure plan
|
||||
- **Orchestrator**: "Continue planning with iteration X"
|
||||
- **Main Flow**: "Continue planning with iteration X"
|
||||
- Used to update plan for extensions
|
||||
|
||||
### Sends To:
|
||||
|
||||
@@ -427,7 +427,7 @@ This section documents auto-generated requirements by the RA agent.
|
||||
|
||||
### Integration Notes
|
||||
|
||||
- Self-enhancement is **internal to RA agent** - no orchestrator changes needed
|
||||
- Self-enhancement is **internal to RA agent** - no main flow changes needed
|
||||
- Read-only access to codebase and cycle state required
|
||||
- Enhanced requirements are **transparently marked** for user review
|
||||
- User can accept, modify, or reject enhanced requirements in next iteration
|
||||
|
||||
@@ -420,7 +420,7 @@ PHASE_RESULT:
|
||||
### Sends To:
|
||||
- **CD (Developer)**: "These tests are failing, needs fixes"
|
||||
- Used for prioritizing work
|
||||
- **Orchestrator**: "Quality report and recommendations"
|
||||
- **Main Flow**: "Quality report and recommendations"
|
||||
- Used for final sign-off
|
||||
|
||||
## Quality Standards
|
||||
|
||||
Reference in New Issue
Block a user