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

    Security scanned

    Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIMuseMuseDotsDots+22 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.)

    How to use

    Skills on Agensi run inside your AI agent. Copy the prompt, paste it into your agent, and it connects to Agensi and installs this skill for you. If a payment is needed, your agent shows it to you first.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill passes our trust checks below.

    Security scanned

    Passed our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Free forever

    No account required to browse

    Trust & safety

    Security scanned

    Verified clean 8 days ago

    • Free to download with an account

    Requires

    Python
    Node.js
    tsc
    playwright
    stryker
    c8
    jest

    Listed8 days ago

    What's inside

    Frequently Asked Questions