Skip to content

refactor(pipeline): multi-phase orchestration and stricter guardrails - #3

Merged
Conava merged 14 commits into
mainfrom
refactor/pipeline-improvement
Apr 9, 2026
Merged

refactor(pipeline): multi-phase orchestration and stricter guardrails#3
Conava merged 14 commits into
mainfrom
refactor/pipeline-improvement

Conversation

@Conava

@Conava Conava commented Apr 9, 2026

Copy link
Copy Markdown
Owner

No description provided.

Conava and others added 14 commits March 26, 2026 17:33
…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>
@Conava Conava changed the title efactor(pipeline): multi-phase orchestration and stricter guardrails refactor(pipeline): multi-phase orchestration and stricter guardrails Apr 9, 2026
@Conava
Conava merged commit 60483a2 into main Apr 9, 2026
1 check failed
@Conava
Conava deleted the refactor/pipeline-improvement branch April 9, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant