gspec

Getting Started

Two ways to use gspec: let it build autonomously, or drive the workflow one spec at a time.

Introduction

gspec meets you where your project is. There are two paths through it, and they share the same specs — so you can start with one and switch to the other at any time:

  • Autonomous build — describe your idea once and let /gspec-build drive the whole workflow to working code. Best for greenfield projects and fast prototypes.
  • Spec by spec — run each command yourself, reviewing as you go. Best when you want hands-on control, or when you're layering gspec onto an existing codebase.

Both paths produce the same living specs in your gspec/ directory. Pick a path below — everything the autonomous build does, you can also do by hand.

Install

You'll need two things first: Node.js (the npx command ships with it) and at least one supported AI coding tool already set up. Then, either way, start by installing gspec into your AI coding tool:

shell
npx gspec

The CLI will prompt you to select your platform — Claude Code, Cursor, Antigravity, Codex, Open Code, or Pi. It installs the gspec commands, skills, and agents into your tool of choice.

Pi runs gspec through sub-agents, so it needs the pi-subagents extension: pi install npm:pi-subagents. The installer reminds you after a Pi install.

If you have saved specs in ~/.gspec/ from a previous project, the installer will offer to seed your new project from them — either from a playbook or by picking individual specs. This is optional. Learn more about saving and reusing specs across projects.

Choose your path

Pick how you want to work. You can switch tabs at any time — the specs are shared between both paths.

When to use it

Best for greenfield. If you're starting a brand-new project from zero — or spinning up a prototype fast — the autonomous build is the shortest path from idea to running code. There's nothing to set up first; the build creates your foundation specs as it goes.

It works on existing projects too — foundation specs you already have are reused, not regenerated, and an architecture you already have is amended rather than rewritten: the writer preserves your recorded decisions and cannot rename or drop a module, because the Modules table is what every feature spec points at. But this path shines on zero-to-one work where there's little or nothing yet.

The autonomous build needs a harness — the AI coding tool gspec is installed into — with a wired headless engine: Claude Code, Codex, or Pi. On other harnesses, use the spec-by-spec path instead.

Run the build

After installing, run it one of two ways. From inside your coding harness, use the slash command — pass your idea in quotes, or run it bare to be interviewed:

command
/gspec-build "a habit tracker with streaks and reminders"

Or run it headless as a script from your terminal or CI. The engine defaults to the platform you installed gspec for; override it with --engine, and resume a paused run with --resume:

shell
gspec build "a habit tracker with streaks and reminders"
gspec build --engine codex --resume

If you pass an idea directly, the build uses it as the brief; if you leave it off, it opens with a short intake interview — a few questions about your idea and the essentials (audience, platform, key constraints). Either way you answer up front; the run won't stop to re-ask. Then a deterministic runtime drives all nine stages in order:

  1. profile — product identity and positioning
  2. stack — technology and infrastructure
  3. practices — standards and quality gates
  4. style — design system
  5. features — prioritized feature PRDs
  6. architecture — data models, APIs, structure
  7. plan — ordered, dependency-aware tasks
  8. implement — write the code
  9. reconcile — sync the specs back to reality

Want a richer feature set out of the gate? Pass --research and the build adds an optional competitive-research stage right after profile: it researches your competitors on the web, writes gspec/research.md, and feeds the auto-accepted findings into the feature PRDs. The spec-review pause below is where you prune any findings you disagree with.

Every stage runs as an isolated agent checked by an independent validator (the writer never grades its own work), and the implementation stage is backed by a generated verify.sh that builds and tests the project. If a gate fails, the run gets a revision attempt — one by default, more with --qa-retries — then pauses for you rather than shipping something broken, keeping the full failing verdict in .gspec/build/last-failure.md.

Between plan and implement the run pauses once on purpose: every spec is written and no code exists yet, so you can review and edit gspec/ before anything is built. Continue with gspec build --resume — or pass --no-review for a fully unattended run.

What you get

When the run finishes you have a working baseline: living specs in gspec/, an ordered plan, and implemented code that passed its own build-and-test gate. The run is tracked in a resumable manifest — if it stops, restart it and it picks up where it left off — and it ends by recording the learnings it captured along the way.

From here, switch to the spec-by-spec path whenever you want to refine a specific spec by hand. For the full mechanics of the pipeline, see the autonomous build page.

Next Steps

Whichever path you took, gspec offers more depth for projects that need it:

  • research — Analyze competitors and identify feature gaps before committing to a roadmap
  • architect — Design a technical blueprint with data models, APIs, and project structure
  • analyze — Cross-reference all specs and resolve contradictions before implementing
  • qa — Run the producer ≠ checker quality gate on your specs and code on demand
  • How it works — The five-layer agent-team architecture behind every command

Explore the full documentation for detailed coverage of every command. Or start with your own project — run npx gspec.