CommunityWriting & Editinggithub.com

brenoacker/agent-skills

End-to-end multi-agent Software Factory (DISCOVER -> PLAN -> CHECKS -> BUILD -> VERIFY) with a Thin-Orchestrator subagent-per-phase architecture across Antigravity, Claude Code, and Codex. Freezes obligations with EARS criteria and proof-backed checks, delegates every heavy phase to fresh isolated subagents to protect the main context window, and gates completion with an independent Verifier. Use when the user says "software-factory", "discover feature", "plan feature", "specify feature", "write the checks", "build this plan", or "verify work".

What is agent-skills?

agent-skills is a Claude Code agent skill that end-to-end multi-agent Software Factory (DISCOVER -> PLAN -> CHECKS -> BUILD -> VERIFY) with a Thin-Orchestrator subagent-per-phase architecture across Antigravity, Claude Code, and Codex. Freezes obligations with EARS criteria and proof-backed checks, delegates every heavy phase to fresh isolated subagents to protect the main context window, and gates completion with an independent Verifier. Use when the user says "software-factory", "discover feature", "plan feature", "specify feature", "write the checks", "build this plan", or "verify work".

Works with✓Claude Code✓Codex CLI~Cursor✓Antigravity
npx skills add https://github.com/brenoacker/agent-skills/tree/HEAD/skills/software-factory

Installed? Explore more Writing & Editing skills: steipete/notion, langchain-ai/langchain, bytedance/podcast-generation · View all 6 →

Ask in your favorite AI

Open a new chat with this agent skill pre-loaded.

Documentation

Software Factory

Close every scope doubt first. Freeze the obligations. Delegate every heavy phase to a fresh subagent. Prove completion with an independent Verifier who did not write the code.

┌──────────┐   ┌──────┐   ┌────────┐   ┌───────┐   ┌────────┐
│ DISCOVER │ → │ PLAN │ → │ CHECKS │ → │ BUILD │ → │ VERIFY │
└──────────┘   └──────┘   └────────┘   └───────┘   └────────┘
 0 doubts       confirm    obligations   batches     author != verifier

Five moves, three durable artifacts under .specs/features/<feature>/, and a Thin Orchestrator in the main chat that never bloats its context window.

  1. DISCOVER: A read-only scout subagent scans the codebase and returns a compact (~30-line) ambiguity brief. The main chat interviews the user with concrete options and recommended defaults until zero unconfirmed assumptions remain (Confirmed? y for every row). See discovery.md.
  2. PLAN: A planner subagent writes .specs/features/<feature>/plan.md (Problem, Flow, Impact, Relations, Surface, Landing, Criteria, Out of scope, Assumptions, Observable, Sources) and runs validate_plan.py. The user gives a quick sign-off on plan.md. See plan.md.
  3. CHECKS: After plan.md sign-off, the autonomous post-plan loop begins. A specifier subagent derives .specs/features/<feature>/checks.md (claims + proofs, Coverage join, Test policy, Swept, Handoff arithmetic) and runs validate_checks.py. See checks.md.
  4. BUILD: One builder subagent per slice/batch writes tests strictly from the checks, implements the code, runs proofs, updates checks.md, and commits using check_commit.py. See build.md.
  5. VERIFY (and FIX loop): An independent verifier subagent (never the builder) audits <feature base>..HEAD against every check, writes .specs/features/<feature>/verification.md, and runs validate_verification.py. If any check fails, a fixer subagent resolves the ranked gaps and a fresh verifier re-verifies (up to 3 rounds). See verify.md and orchestration.md.

Why this shape

Coding agents fail on complex features for two predictable reasons:

  1. Context window bloat: When a single chat session explores the repo, interviews the user, writes the plan, derives checks, writes tests and code, and verifies its own work, the context window fills up and triggers lossy compaction.
  2. Unconfirmed requirements & self-review blind spots: Silently guessing product behavior (Confirmed? n) or letting the author self-certify completion ships the author's own blind spots.

software-factory solves both:

  • Thin Orchestrator (<15k tokens in main chat): The main chat acts strictly as coordinator and user interviewer. All codebase reading, artifact authoring, coding, testing, and verification run inside isolated ephemeral subagents (scout, planner, specifier, builder, verifier, fixer) that communicate exclusively via .specs/features/<feature>/ files on disk and git commits. Full dispatch protocol: orchestration.md.
  • Small, frozen obligation set + independent Verifier: There is no granular task checklist or component catalogue (Purpose/Location/Interfaces per class) to go stale. One-way doors get a literal shape in Landing; reversible placement is decided in the diff.

Critical rules

The pinned set. These hold at every profile:

  1. Zero unconfirmed assumptions (Confirmed? y). Never guess product or scope behavior silently. Every gray area surfaced during DISCOVER must be asked with concrete options and a recommended default, or explicitly delegated by the user (Confirmed? y). validate_plan.py rejects any row where Confirmed? is n or blank.
  2. Thin Orchestrator & Strict 1-Subagent-Per-Phase Boundary (scout != planner != specifier != builder != verifier). Keep the main chat under ~15k tokens. Never merge two phases into a single subagent call:
    • scout ONLY explores and returns the ~30-line ambiguity brief.
    • planner ONLY writes plan.md + runs validate_plan.py, then stops and exits.
    • specifier ONLY writes checks.md + runs validate_checks.py, then stops and exits (it MUST NEVER write test files or implementation code or continue into BUILD).
    • builder ONLY runs after specifier has returned. For multi-slice features (S1, S2, ...), dispatch one separate builder subagent per slice sequentially so each slice executes in a fresh context window and reports progress to the user.
    • verifier ONLY runs in a fresh subagent after the final builder commits.
  3. Every check is one observable claim with a concrete value plus the proof — the exact test selector or command whose exit code settles it. No proof, no check.
  4. Tests assert what the checks say, never what the code happens to do. Never write a test by reading the implementation.
  5. Never weaken an assertion, delete a test, or skip one to make a suite pass. A genuinely wrong check is a stop-and-ask, not an edit.
  6. Checks and Test policy rows are fixed once approved. In plan.md, Landing, Relations, and Surface are additive — a door discovered while building gets a row before the code that closes it, and a row the user approved is never rewritten. Flow and Impact are kept true in the commit that changes the path.
  7. The Verifier is a fresh subagent, never the author, never optional, never waiting to be asked. The Orchestrator dispatches it immediately after the last commit of the feature lands over <feature base>..HEAD with every check.
  8. The profile is a floor and is enforced by validate_verification.py.
  9. The completion gate is a script, not a feeling: validate_verification.py must exit 0.
  10. Blast radius: an approved spec authorizes local edits and local commits. git push, deploy, and production data changes need an explicit go-ahead for that action.

Profile

The project declares how much runs, in AGENTS.md or equivalent. Absent a declaration: light.

## software-factory

profile: light
budget: 150k
ProfileAddsCannot catch
light (default)proofs run at HEAD with each named test shown to exist and run, one located assertion per check, level and sampling gaps, Swept existing re-reada set member with no proof; a test that would pass under a wrong implementation
standardthe Coverage join recomputed, Test policy rows with a verdict each, one fault per assertion surfacea check that contradicts a binding source; a screen nobody built
uibinding sources opened and compared, per-screen enumeration of copy and arrangementonly spacing, colour and type weight, enumerated per screen

validate_verification.py fails a report whose profile differs from the one checks.md was approved under, fails a standard report with no fault rows or no recomputed coverage, and fails a ui report with no binding-sources section.

Artifacts

.specs/
├── STATE.md                    # Decisions log (AD-NNN) + Handoff snapshot
├── LESSONS.md                  # rendered by scripts/lessons.py - never hand-edit
├── lessons.json                # machine-owned
└── features/<feature>/
    ├── plan.md                 # problem, flow, impact, relations, surface, landing, criteria, assumptions (all y), observable
    ├── checks.md               # claims + proofs, coverage join, test policy, swept, handoff batches
    └── verification.md         # the independent Verifier's report

Create each file when its phase produces content. For a change under roughly three files with no one-way door and zero scope ambiguity, write only checks.md with an ## Intent paragraph and skip plan.md.

Five bounded design sections in plan.md

SectionReviewsKept out
Flowthe path, one line per hopany module that neither exists nor is created by a door - that is placement
Impactwhat changes underneath: terms, and existing datarisk registers
Relationsentities, cardinality, one-way constraintscolumns and types
Surfaceroute, in, out, statusesrequest-body specification, and check ids - those do not exist yet
Landingthe one-way doors, with the literal shape and the rejected alternativeanything a refactor reverses

Flow

  • Discover — Dispatch the read-only scout subagent to inspect the repo, .specs/STATE.md, and .specs/LESSONS.md and return a ~30-line ambiguity brief. Walk the user through genuine product and scope gray areas (at most 2 questions per turn, concrete options with recommended default) across Observable surfaces and the 9 implicit dimensions until 0 doubts remain: discovery.md.
  • Plan — Dispatch the planner subagent with the confirmed discovery decisions to write .specs/features/<feature>/plan.md and pass validate_plan.py. Present plan.md to the user for quick sign-off: plan.md.
  • Checks — Once plan.md is approved, run autonomously. Dispatch a dedicated specifier subagent to derive .specs/features/<feature>/checks.md (claims + proofs, Coverage join, Swept, and ## Handoff batch sizing) and pass validate_checks.py, then terminate that subagent before any code or tests are written: checks.md.
  • Build — After specifier finishes, dispatch one fresh builder subagent per slice (S1, S2, ...) sequentially. Each builder writes tests from the checks for its assigned slice, implements, runs proofs, records Boundary in checks.md, commits with check_commit.py, and exits: build.md.
  • Verify & Fix — Dispatch a fresh verifier subagent over <feature base>..HEAD to write verification.md and run validate_verification.py. If FAIL, dispatch a fixer subagent and re-verify (up to 3 rounds): verify.md.
  • Orchestration & Subagent Dispatch — Thin-Orchestrator rules, context-window budgets, and multi-agent mappings (antigravity, claude, codex): orchestration.md.
  • Durable Memory — Project decisions (STATE.md), session handoff, and verification-grounded lessons (lessons.py): memory.md.

Scripts

Resolve <skill-dir> as the directory containing this SKILL.md and invoke python3 <skill-dir>/scripts/<name>.py. Pass --root when cwd differs from the project root. A non-zero exit means STOP and fix.

WhenCommand
Inspect pipeline phase & next subagent roleorchestrate.py status <feature> --root <dir>
Generate isolated subagent promptorchestrate.py prompt <feature> --role <scout|planner|specifier|builder|verifier|fixer> --root <dir>
Run phase gate via orchestratororchestrate.py gate <feature> --phase <plan|checks|verify> --root <dir>
Dispatch subagent via CLI (or --dry-run)orchestrate.py dispatch <feature> --role <role> --agent <antigravity|claude|codex> [--dry-run]
Before presenting plan.mdvalidate_plan.py <feature>
Before starting BUILDvalidate_checks.py <feature>
Before each commitcheck_commit.py --message "<msg>"
Before declaring donevalidate_verification.py <feature>
At distillationlessons.py add ...
After editing a validator, script, or templateselftest.py

Subagents and handoff

Every phase is strictly isolated in its own subagent invocation (scout -> planner -> specifier -> builder [S1] -> builder [S2] -> ... -> verifier -> fixer). Never combine specifier (CHECKS) and builder (BUILD) in the same subagent. During BUILD, when a feature has multiple slices (S1, S2, ...), dispatch one separate builder subagent per slice sequentially so each builder starts with a clean context window, finishes quickly, commits its slice on green, and returns a progress update to the Thin Orchestrator.

When the final builder slice returns green, the Orchestrator immediately dispatches the independent verifier subagent in the same turn without asking the user.

Knowledge chain

In strict order: existing code and conventions, project docs, library documentation (Context7 where available), web search, then flag as uncertain. Never invent an API, a flag, a command, or a behaviour.

Output behaviour

Produce the artifact; do not narrate the phase. Lead with the verdict. State decisions definitively. Cut filler and mechanical hedging. Keep section headings in English (they are a schema verified by the gates).

Individual skills in this repo

This repo contains 2 individual skills — each has its own dedicated page.

Related Skills