Autopilot - Red/Blue Adversarial Coding Workflow

    1

    Goal in, merged code out: blind red-team acceptance tests vs blue-team implementation, layered QA, two gates under your control.

    Free

    1 useSecurity scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+21 more

    Autopilot - Red/Blue Adversarial Coding Workflow

    Example session with this skill installed

    /autopilot Add JWT auth with refresh-token rotation to the Express API

    (mid-size TypeScript service, Vitest + Prisma, ~40k LOC)

    • Read your context and instructions
    • Compiled the autopilot - red

    What happened

    Autopilot ran the full loop (design → implement → qa → merge). You approved the design once; everything below ran without further input.

    Design gate (your approval #1)

    Design doc produced at .autopilot/runtime/requirements/jwt-auth/design.md: token lifetimes, rotation endpoint contract, Prisma schema change (2 tables), impact scope (14 files), 3 risks with mitigations, 7 acceptance scenarios.

    Red/Blue parallel coding

    • Blue team: implemented the feature — 9 files changed, +412/−38

    Red team (code-blind, design doc only): wrote 7 acceptance tests — rotation reuse detection, expired-token rejection, clock-skew window, concurrent-refresh race, revoked-user invalidation, audience mismatch, refresh-chain depth cap

    Five-layer QA

    LayerResult
    Red acceptance tests7/7 pass (1 failed on first run — see below)
    Type check + lint + unit + buildall green
    AI reviews (design conformance + code quality)0 blockers, 2 nits auto-fixed
    Smoke: real server, curl flowslogin → refresh → reuse detected ✅
    Regression214 existing tests green

    The concurrent-refresh race test failed on first run. Autopilot diagnosed it (observe → hypothesis → minimal repro → fix the implementation, never the test), re-ran only the failing layer, and proceeded.

    Merge (your approval #2)

    Squash-merged with a generated commit message. 3 design decisions + 1 debugging lesson written to the project knowledge base, loaded automatically on the next related task.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Autopilot is a full-cycle autonomous engineering workflow plugin for Claude Code. It does not start writing code when you describe a goal — it first produces a design document. You can require manual approval at both gates, or let it self-approve low-risk designs and auto-merge fully verified work; every decision is logged to the state file either way.

    The core idea is information isolation. After the design gate clears, two independent agents run in parallel:

    • Blue team receives the design doc and implementation plan, and writes the code.
    • Red team receives only the design doc — it cannot see blue's code — and writes acceptance tests blind.

    Red-team tests therefore represent design intent, not a rubber stamp of whatever got implemented. If the implementation drifts from the design, the tests catch it.

    Five-layer QA — no "tests pass, ship it":

    1. Red acceptance tests — a failure means the code drifted from the design
    2. Type check, lint, unit tests, and build verification, run in parallel
    3. Two independent AI reviews: design conformance, then code quality
    4. Real-scenario smoke tests: boot the server, hit the API, run the CLI
    5. Regression checks, with conditional performance tiers for hot paths

    Systematic debugging, not shotgun fixing. On failure: observe the full error, form a causal hypothesis, verify with a minimal experiment, only then fix. A failing red test means the implementation gets fixed. Red tests are hash-locked against tampering: changing one requires an explicit, logged evidence trail, never a silent edit. Up to 3 auto-fix rounds, then control returns to you.

    Knowledge capture. After merge, design decisions and debugging lessons are distilled into a project knowledge base and loaded automatically on similar future tasks.

    What's inside: main 6-phase state machine (design, implement, qa, auto-fix, merge, done) with Git worktree isolation; design-phase brainstorm skill; smart commit skill; project-health doctor skill; multi-task DAG orchestration skill; stop-hook phase enforcement.

    Transparency note: as a plugin, autopilot registers Claude Code hooks (Stop / SessionStart / WorktreeCreate) that run the bundled scripts in scripts/ and hooks/, including automatic worktree bootstrap with dependency install. Review these files before installing; the full source is on GitHub.

    Iterated through daily dogfooding in real projects since January 2026. Free, open source (MIT); canonical source: https://github.com/strzhao/autopilot

    (This listing packages the same plugin; install as a Claude Code plugin for the full hook-driven experience.)

    Requires Git for worktree isolation and Node.js for state orchestration. Works best when installed as a plugin to enable automated hooks.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before any payment.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    1 use

    Times used to date

    Free forever

    No account required to browse

    Trust & safety

    Security scan

    Security scan passed 1 month ago

    • Free with an Agensi account

    Requires

    Python
    Node.js
    tsc
    playwright
    stryker
    c8
    jest

    Permissions

    Terminal / Shell
    Browser
    Network Access
    Environment Variables
    Listed1 month ago

    What's inside

    Frequently Asked Questions

    The skill uses Git worktrees to isolate a 'Blue Team' (coder) from a 'Red Team' (tester). This prevents the agent from writing tests that merely confirm its own bugs, ensuring that acceptance tests are based on design requirements rather than the implementation logic.

    Autopilot requires a local installation of Claude Code, Git (for worktree management), and a Node.js environment to run the state machine and the visual design review server.

    While it works best with modern TypeScript/JavaScript stacks, the underlying five-layer QA and scientific debugging workflow can be adapted to any language that supports CLI-based linting and testing tools.

    No, the agent will never write code or commit changes without your explicit sign-off on the initial Architectural Design and the final QA report. You remain the final gatekeeper for all codebase modifications.

    You receive the full state orchestration scripts, the visual design review server package, and the configuration templates needed to integrate the workflow directly into your Claude Code environment.

    Updates are delivered via the marketplace; you will receive notifications when new versions are released to handle Claude Code API changes or to add new QA layer integrations.

    New in Testing & Debugging