Flow is a unified toolkit for Spec-Driven Development backed by Open Knowledge Format (OKF v0.2) bundles. It works natively from a single repository root across Google Antigravity (IDE & CLI), Claude Code, Codex CLI, Cursor, OpenCode V2, and VS Code / Copilot.
Architecture & Lifecycle
Flow separates planning and review from isolated task execution:
- Setup (
/flow:setup):
- Runs Brownfield Alignment & Legacy Migration (
align mode) to upgrade existing .agents/ layouts without data loss, or initializes a new repository from scratch.
- Probes host binaries (
uv, python3, cargo, go, bun, pnpm, npm, make, just, pwsh, powershell) and scaffolds core context chapters (product/product.md, product/product-guidelines.md, product/tech-stack.md, knowledge/workflow.md). Adds <= 40-line <!-- truth: start --> blocks and nested knowledge/** chapters anchored to path/to/file::Symbol.
- Seeds engineering disciplines (deep-module design, domain modeling, public-interface TDD, bug diagnosis, and first-time reader docs) alongside stack-specific
.agents/skills/<domain>/, .agents/skills/review-<domain>/, and .agents/agents/<domain>-{reviewer,specialist}.md subagents.
- Configures Git tracking (
shared team mode vs. local-only stealth mode via .git/info/exclude) and opt-in cross-harness settings.
- Spec (
/flow:prd, /flow:spec, /flow:revise, /flow:research) — Upfront Chapter Plans:
- Parallel Research & Questioning: Fans out read-only
@researcher subagents returning subsystem summaries, then resolves open decisions (1 question for dependent forks; 2–3 batched independent questions with <Label> (Recommended) first).
- Feature-Sized Specifications (
/flow:prd & /flow:spec): Defaults cohesive features to a single-chapter spec.md (has_chapters: false) and splits into chapters/ch01..chNN/ only at real checkpoints or independent subsystems. Allows compact worksheets for any size, runs parallel per-chapter planners for >= 2 chapters, validates OKF v0.2 right after writing, and warns on planning_quality: degraded.
- Independent Spec Review & Revision (
/flow:revise): Runs independent reviewers (1 combined reviewer up to 4 chapters) using only disk paths and decides on each finding (ADOPT, CONTEST, ESCALATE). Keeps root spec.md, chapters/index.md, and chapter worksheets synced in present tense.
- Research & Prototyping (
/flow:research, alias /flow:task): Runs primary-source @researcher audits promoted into research/*.md with sources: + [^id]: footnotes, or time-boxed prototypes in untracked .agents/scratch/<slug>/.
- Implement (
/flow:implement, /flow:status) — Parallel Steps & Fast Chapter Check:
- Resolves linked
git worktree checkouts (symlinking .venv/node_modules and routing shared vs. local-only .agents/), runs preflight, and executes the active chapter (1..N tasks; or ready chapters with --all). Runs parallel workers on separate files (small_swarm on Antigravity; parallel_tasks on Claude Code, Codex CLI, Cursor, and OpenCode) or sequential chapter_batch passes.