- Add system-watchdog audit for PRs with 3+ failed attempts
- Implement automatic human assistance requests with detailed analysis
- Add deep context gathering to implementation-worker before fixes
- Enhance all agents with enriched context propagation
- Add loop detection to prevent repetitive failed attempts
- Improve PR reviewer with anti-pattern detection
- Update human-liaison to provide targeted help for struggling PRs
- Add historical awareness to PR fix orchestrator
- Enhance epic-planner with context-aware issue creation
- Create documentation for improvements and future agent ideas
These changes enable the system to:
- Recognize when it's stuck and needs human help
- Learn from previous failures to avoid repetition
- Understand full context including comments and history
- Provide detailed debugging information to humans
- Add permissions for async-agent-starter, async-agent-monitor, async-agent-cleanup
- Convert test writers (behave-tester, robot-tester, asv-benchmarker) to async
- Launch all test writers in parallel via async-agent-starter
- Monitor completion with async-agent-monitor
- Clean up sessions with async-agent-cleanup
- Convert quality gates to async parallel execution
- Launch all 5 quality gates (coverage, lint, typecheck, unit tests, integration tests) in parallel
- Support both first-pass (all gates) and subsequent passes (selective re-runs)
- Monitor and handle failures/restarts
- Implement unique tagging system for session recovery:
- Test writers: AUTO-SUBTASK-{TYPE}-{attempt}
- Quality gates: AUTO-SUBTASK-{GATE}-A{attempt}-P{pass}
- Add monitoring loops with health checks and automatic restart capability
- Maintain existing escalation logic while gaining 60-80% speedup from parallelization
This change eliminates the synchronous bottleneck in subtask-loop where quality
gates and test writers were running sequentially despite the "IN PARALLEL"
pseudo-code. Now they truly run in parallel using the established async
infrastructure, significantly reducing subtask completion time.
- Remove quality-gate-escalator.md (unnecessary orchestration layer)
- Update subtask-loop to directly manage quality gates with escalation
- Quality gates now start at haiku tier for cost efficiency
- Inner stabilization loop remains (5 passes)
- Failed gates escalate individually after inner loop exhaustion
- Maintains original parallel execution behavior
- Update test-fixer invocation to use tier selectors
- Fix issue-comment-formatter to use new agent naming convention
- Change "implementer-opus" to "implementer (tier: opus)" etc.
The system now maintains the exact same high-level behavior as before:
- subtask-loop directly invokes all quality gates
- No new primary agents or orchestration layers
- Tier selector architecture is purely an implementation detail
- All agents support escalation but primary agent behavior unchanged
BREAKING CHANGE: Removed all tier-specific agents in favor of model-agnostic versions
Key changes:
- Create model-agnostic agents:
- behave-tester.md (replaces 4 tier-specific versions)
- robot-tester.md (replaces 4 tier-specific versions)
- coverage-improver.md (replaces coverage-checker with escalation)
- Convert existing agents to support escalation:
- lint-fixer.md (now model-agnostic)
- test-fixer.md (now model-agnostic)
- integration-test-runner.md (now model-agnostic)
- Update tier selectors to support all new agents
- Update quality-gate-escalator to handle all quality fixers
- Update subtask-loop to use quality-gate-escalator for all quality gates
- Empty redundant tier-specific agents for deletion:
- All implementer-{tier}.md files
- All behave-tester-{tier}.md files
- All robot-tester-{tier}.md files
- coverage-checker.md (replaced by coverage-improver.md)
Benefits:
- Eliminates ~90% code duplication
- All agents now support full 4-tier escalation (haiku→codex→sonnet→opus)
- Consistent escalation behavior across all agent types
- Single source of truth for each agent's logic
- Significant cost savings by defaulting to haiku for all quality gates
The system now uses tier selectors (tier-haiku, tier-codex, tier-sonnet,
tier-opus) that set the model and invoke model-agnostic worker agents,
eliminating the need for separate implementations per model tier.
- Update subtask-loop.md to use the new tier selector architecture
- Remove v2 references - we maintain only the latest version
- Effectively remove subtask-loop-v2.md (emptied for deletion)
- Keep single source of truth without version suffixes
The subtask-loop agent now uses the tier selector architecture
without any version references.
BREAKING CHANGE: New escalation architecture eliminates duplicate agent code
Key changes:
- Add tier selector agents (tier-haiku, tier-codex, tier-sonnet, tier-opus)
that set the model and invoke worker agents
- Create model-agnostic implementer.md that inherits model from caller
- Update unit-test-runner and typecheck-fixer to support escalation
- Add quality-gate-escalator to manage escalation for quality fixers
- Create subtask-loop-v2.md demonstrating the new architecture
- Document the new architecture in escalation-architecture-proposal.md
Benefits:
- Eliminates 90% code duplication across tier-specific agents
- Single source of truth for implementation logic
- Easy to add new tiers or modify escalation paths
- Consistent behavior across all model tiers
- Quality gate fixers now support full escalation starting from haiku
The architecture leverages the fact that agents without a model specification
inherit the model from their caller, allowing thin tier selectors to control
which model executes the actual work.
- Add implementer-haiku.md as ultra-fast, cost-effective first tier
- Add behave-tester-haiku.md and robot-tester-haiku.md for fast testing
- Update difficulty-evaluator.md to assess 4 tiers (haiku/codex/sonnet/opus)
- Update subtask-loop.md with 4-tier escalation logic and state persistence
- Add PR comment state tracking for escalation recovery after restarts
- Conservative evaluator defaults to Haiku when in doubt for cost efficiency
- New escalation path: haiku → haiku → codex → sonnet → opus (forever)
- Includes state persistence to resume from correct tier after agent restarts