refactor(pipeline): multi-phase orchestration and stricter guardrails - #3
Merged
Conversation
…tive framing, and infrastructure-level guardrails
Rewrites all 10 agents and 2 orchestrator skills against three principles:
concise (focus on what matters), positive framing (instruct how, not what
to avoid), and proper role identity lines.
Key structural changes:
- Extract verbose templates to reference files (frontend-planner 1221→181 lines,
devline orchestrator 537→226 lines, planner 311→180 lines)
- Add kb-blast-radius skill with grep-based reverse dependency analysis
- Wire blast-radius into planner, reviewer, and deep-review agents
State persistence and recovery hardened:
- state.md schema: integrity marker, absolute timestamps, active agent counter,
pending fix cycle tracking, explicit status values
- Cross-session recovery: Stage 0 detects active pipelines on new conversations
- Orphaned fix-task file detection in recovery protocol
- Deferred findings track partial fix progress with [FIXED] prefix
- Proactive checkpointing every 5 agent completions
Lessons system fixed (was write-only — agents never read CLAUDE.md):
- Planner reads lessons and bakes them into plan constraints
- Reviewer reads lessons as additional review checkpoints
- Debugger reads lessons before forming hypotheses
Agent-level improvements from production lesson analysis:
- Reviewer: variant coverage gaps, overly broad source assertions,
full-function mock detection, multi-tenant auth scope verification,
cross-task contract grep, public endpoint identity safety
- Implementer: contract preservation on pattern deviation, existing
utility check, parallel compilation safety with dependency reporting
- Planner: secondary touchpoint mapping for migrations, type-reference
dependency detection across tasks
Infrastructure-level guardrails:
- Build invocation counter in validate-bash.sh hook (hard limit 12/task)
- maxTurns on all agents (20-70 depending on role)
- PreCompact hook auto-injects state.md into context after compaction
- SubagentStop hook logs agent completions for timing reconstruction
- ask() hook fd bug fixed (was writing to stderr, silently passing)
Plugin compliance fixes:
- Remove bypassPermissions from all agents (ignored for plugin agents)
- Replace model:inherit with model:sonnet (undocumented value)
- Script paths use ${CLAUDE_SKILL_DIR} instead of find hacks
- Exit cleanup includes all frontend-planner artifacts
README rewritten with Mermaid diagrams, collapsible sections, install
instructions, permissions guide, and state persistence documentation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…nd hook fixes - Planner: replace scattered Implementation Steps / Integration Contracts / Review Checklist with unified Spec section (signatures, behavior, I/O, errors, integration points). Plans are now precise enough that implementers make zero design decisions. - Proactive improvements: bake into existing tasks or create standalone — no longer a separate category. Ask user when unclear. - Mandatory reviewer: orchestrator can no longer skip reviews by reading files itself. Every task requires a reviewer agent verdict. - Gradle isolation: GRADLE_USER_HOME must resolve to worktree path, not main repo. Added verification step to prevent parallel cache corruption. - Hook fix: validate-bash.sh crashed on relative paths in rm -rf (grep exit 1 + set -e). Now handles relative paths and suppresses no-match. - Removed build invocation budget hook (not working well in practice). - Added CI: shellcheck + JSON validation on PRs, tag-triggered GitHub releases with auto-changelog. - Added release.sh for single-command version bumps across JSON files. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ask context - Orchestrator NEVER edits code directly — all changes delegated to agents - Strict wave barriers: complete entire wave before launching next - Tasks require zero file overlap and zero dependencies within a wave - Merge→review sequence is atomic — no task done without reviewer verdict - Orchestrator scope limited: no inspecting diffs, committing for agents, or manual salvaging - Plan format adds Context section (why), Model field (sonnet/opus), and agent selection - Planner/implementer boundary clarified: planner owns what/why, implementer owns how - Deep review: removed maxTurns limit, must always produce verdict - Failed agents get clean relaunch, not manual recovery - Removed redundant stage-level progress tables (built-in task list suffices) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.