Install
openclaw skills install @wljmmx/competitive-agent-loop3-Agent competitive loop with Planner/Generator/Evaluator and Sprint Contract
openclaw skills install @wljmmx/competitive-agent-loopStandardized workflow based on Anthropic 3-Agent architecture. Implements Planner/Generator/Evaluator role separation with multi-solution competition and Sprint Contract mechanism.
Core thesis: "The winners will not have the smartest model, they will have the best loop."
When receiving a development task, auto-determine complexity level:
| Agent | Role | Responsibility | Model | VRAM |
|---|---|---|---|---|
| main | Planner | Requirements analysis, complexity assessment, orchestration | qwen3.6_35b_un | ~20GB |
| coder | Generator | Code implementation, contract-based delivery | qwen3.6_35b_un | ~20GB |
| checker | Evaluator | Independent verification, scoring, acceptance reports | Qwythos | ~6GB |
| memowriter | Documenter | Documentation, technical reports, knowledge base | qwen3.5:9b | ~6GB |
VRAM constraint: RTX 4090 (24GB), coder (~20GB) and checker (~6GB) execute serially, peak ~20GB. keep_alive=1h keeps models warm; serial execution avoids VRAM contention.
main assesses complexity of each approach and calculates time budget
Formula: dev_time = accepted_standards x base_time(3min) x complexity_multiplier verify_time = dev_time x 0.4 total_budget = dev_time + verify_time
Per solution execution flow:
Execution order: simple solutions first for quick baseline, complex solutions follow
| Factor | Weight | Description |
|---|---|---|
| new_technology_learning | 0.3 | New tech learning cost (0-1) |
| integration_complexity | 0.25 | Integration complexity (0-1) |
| data_model_changes | 0.2 | Data model change volume (0-1) |
| test_coverage_needed | 0.15 | Test coverage scope (0-1) |
| deployment_risk | 0.1 | Deployment risk (0-1) |
complexity_multiplier = sum(factors) Examples: simple=1.2, medium=2.5, complex>3.0
| Point | Trigger Condition | Decision |
|---|---|---|
| Contract Approval | After coder+checker negotiation complete | Are criteria reasonable? Is tech approach acceptable? |
| Consecutive Failure Threshold | 3 failed iterations in same sprint | Direction adjustment/solution swap/terminate sprint |
| Fallback Switch | Fallback triggered | Specific decisions on changing tech route |
| Final Sign-off | All verifications passed | Last quality gate before delivery |
| Mechanism | Purpose |
|---|---|
| Task Flow managed mode | Persistent workflow orchestration, survives restarts |
| sessions_spawn | Agent parallel scheduling with agentId targeting |
| push completion | Post-task push notification, no polling needed |
| SQLite durable state | Progress persistence + revision tracking |
| notification policy | done_only (terminal state notifications only) |
Each agent has a fallback chain for resilience if the primary model is unavailable.
| Agent | Primary | Fallback 1 | Fallback 2 |
|---|---|---|---|
| main (Planner) | qwen3.6_35b_un | qwen3.6:27b | Qwythos |
| coder (Generator) | qwen3.6_35b_un | qwen3.6:27b | Qwythos |
| checker (Evaluator) | Qwythos | qwen3.6_35b_un | qwen3.6:27b |
| memowriter (Documenter) | qwen3.5:9b | Qwythos | qwen3.5:4b |
When the current conversation session uses a local Ollama model (provider is “ollama” or “ollama-256k”), all child agents should prefer using the same model as the session’s primary model to avoid repeated model loading/unloading on the GPU.
Rule:
Rationale: When coder/session models differ (e.g., session uses qwen3.6_35b_un while coder is configured for qwen3.6:27b), each agent switch forces Ollama to unload the current model and load another, causing 100s+ of latency per swap. For RTX 4090 with 24GB VRAM, even with keep_alive=1h, the GPU can only hold one large model at a time. Using the session model exclusively avoids this thrashing entirely.
When session model is local Ollama, effective runtime assignment:
| Agent | Model |
|---|---|
| main | session model |
| coder | session model |
| checker | session model |
| memowriter | session model |
Note: For cloud/hosted models (non-Ollama), the original tiered model assignments still apply as hardware limits are not a concern.
Why each agent uses its assigned model:
Global brain requiring maximum reasoning depth for requirement decomposition, complexity assessment, and solution comparison. No-audit version enables unrestricted judgment. Serial execution means VRAM swap cost is negligible.
Code generation is the most frequently called agent per sprint. Benchmarks show 35b_un and 27b have nearly identical code quality (60/60 vs 58/60 coding, both 60/60 fullstack), but 35b_un is 3.7x faster (167 vs 45 tok/s). This speed advantage means faster iteration cycles and shorter sprint times, directly impacting user experience. coder workload (~20GB) and checker (~6GB) execute serially within the 24GB RTX 4090 limit.
Pure evaluation task (score assignment, criteria verification, fix suggestions). 9B inference capability is sufficient for checklist-style validation. Chain-of-thought depth of 32B models provides diminishing returns here. Main already analyzed requirements upfront; checker executes acceptance checks.
Documentation generation requires sufficient output capacity for technical reports. Benchmarks show 9b scores 60/60 on document tasks versus 4b only generating 2.4K tokens before stopping. At 115 tok/s, 9b is fast enough for non-blocking documentation work, and its 6GB VRAM fits easily within the 24GB limit alongside serial execution with coder and checker.