Get started

Detect your substrate.
Preview before you write.

Start with a read-only evaluation from source. AgentFlow 2.0 inspects your installed AI CLIs to recommend `S0` (Single-CLI), `S1` (Multi-CLI Orthogonal Four-Eyes), or `S2` (OpenRig Lean 4-Seat Squad) and previews every file action before touching your project.

Explore in the browser

Test the 2.0 control loop.

Compare `P0`/`P1` Composite Builder Passes, Consequence-Floor escalations, Epoch Circuit Breaker triage, and Closed-Loop RSI in the interactive model.

Try the interactive 2.0 model →

Run locally from source

Inspect your machine and preview adoption.

Run `doctor-env` and `adopt plan` to see your detected execution substrate (`S0`/`S1`/`S2`) and proposed project changes with zero writes.

Start the local evaluation ↓

1. Clone the 2.0 source.

Clone the repository and install dependencies locally. Nothing is installed globally unless you choose to link the CLI.

Source checkout
git clone https://github.com/smota/agentflow-sdlc.git
cd agentflow-sdlc
pnpm install --frozen-lockfile

A local, reproducible checkout of the 2.0 release line (`v1.10.0` / 2.0 release candidate).

2. Detect your execution substrate (`S0` / `S1` / `S2`).

Run `doctor-env` and `config doctor` against your target repository. AgentFlow inspects available CLIs (`claude`, `codex`, `agy`, `pi`, `grok`, `openrig`) and recommends the matching substrate tier and 2026 model calibration.

Substrate & environment discovery
node bin/cli.mjs doctor-env --target "../my-project"
node bin/cli.mjs config doctor --target "../my-project"

Reports detected CLIs, recommended substrate (`S0` Single-CLI, `S1` Multi-CLI Orthogonal Four-Eyes, or `S2` OpenRig 4-Seat Squad), and checks for high-effort context degradation risks.

3. Preview your adoption plan (read-only).

Generate a preview-first adoption plan for your target repository, or inspect the canonical role catalog and capability profiles.

Read-only project preview
node bin/cli.mjs roles catalog --json
node bin/cli.mjs adopt plan --profile standard --target "../my-project" --json

A JSON plan listing proposed files, conflict checks, and a freshness plan token. Zero target files are modified.

4. Generate an assistant onboarding brief.

Want your coding agent to guide the setup conversationally? Generate an onboarding prompt tailored to your detected substrate.

Onboarding prompt
node bin/cli.mjs onboarding-prompt --target "../my-project"

A review-first setup brief ready to paste into Claude Code, Codex, Agy, Pi, or Grok.

Adopt, project a squad, or run RSI.

Interactive adaptive initialization (`init`) or transactional `adopt apply`

Use `init` for guided substrate calibration (`S0`, `S1`, or `S2`), or apply a reviewed `adopt plan` token directly:

Guided init or transactional apply
# Guided interactive setup (auto-detects S0 / S1 / S2):
node bin/cli.mjs init --target "../my-project"

# Or deterministic transactional apply from a reviewed plan token:
node bin/cli.mjs adopt apply --profile standard --target "../my-project" --confirm "<plan-token>" --receipt "../agentflow-receipt.json" --json

Both paths configure `.agentflow/config.json` with the Effort-Degradation Guard (`effort: medium` default for persistent seats, clean-context `high` for councils) and Grounded Decider Port (`d3-flash`).

Project an `S2` OpenRig Lean 4-Seat Squad (optional)

When OpenRig is installed, generate the Lean 4-Seat Default Squad (`orch.arch`, `dev.build`, `dev.qa`, `rev.review`) plus out-of-band `steer.lead` and `eval.tester` specs:

OpenRig 4-Seat projection
node bin/cli.mjs adapters install openrig --target "../my-project" --topology 4-seat
node bin/cli.mjs sdlc validate --target "../my-project" --json
node bin/cli.mjs sdlc validate-authority --target "../my-project" --json

Pass `--topology 6-seat` if your repository requires dedicated `dev.test-eng` and `ops.pr` L1 seats.

Operate Plane 1 Steer & Plane 3 Closed-Loop RSI

Run out-of-band supervisory steering verbs and audit execution traces to synthesize human-gated policy refinements:

Supervisory Steer & RSI commands
# Plane 1 Supervisory Steer (out-of-rig):
node bin/cli.mjs steer status --target "../my-project"

# Plane 3 Closed-Loop RSI trace audit & refinement proposal:
node scripts/rsi/audit-traces.mjs --target "../my-project"
node scripts/rsi/synthesize-refinements.mjs --target "../my-project" --propose
Read upgrade, rollback, and recovery commands ↗

Upgrading from 1.0 to 2.0.

2.0 replaces v1 lockfiles and static 9-role handoff templates with lockfile v2, adaptive `S0`–`S2` substrate profiles, and three-plane governance contracts.

  1. Preserve your current branch.

    Commit or back up existing 1.0 policy files. Run `doctor-env` and `adopt plan` from a clean checkout to inspect conflicts before modifying the repository.

  2. Calibrate your execution substrate.

    Let `init` or `config project` map your installed CLIs onto `S0` (Single-CLI), `S1` (Multi-CLI Orthogonal Four-Eyes), or `S2` (OpenRig Lean 4-Seat Squad) and enable the Effort-Degradation Guard.

  3. Apply and verify with `config doctor`.

    Apply the reviewed plan, run `sdlc validate` and `config doctor`, and commit the updated `.agentflow/` configuration and lockfile v2.

Read the 2.0 breaking-change and migration guide ↗

Common questions

Start with one CLI.
Add seats only when they help.

Do I need OpenRig or multiple paid AI accounts to use AgentFlow 2.0?

No. `S0` (Single-CLI + L2 Subagents) is a first-class execution substrate. One installed CLI (`claude`, `codex`, `agy`, `pi`, or `grok`) runs the full delivery model and Composite Phase 3–5 Builder Passes without any daemon.

When should I move from `S0` to `S1` or `S2`?

Move to `S1` (Multi-CLI Orthogonal) as soon as you have two CLIs from different model families on your workstation so Phase 6 reviews run with true cross-family Four-Eyes independence. Move to `S2` (OpenRig Lean 4-Seat Squad) when you want persistent L1 seats working concurrently across isolated `.worktrees/` with automated Plane 3 RSI probes.

Why does 2.0 clamp persistent builders to `effort: medium`?

2026 frontier models degrade when forced to reason at `effort: high` inside deep (>80k token) tool histories—they second-guess passing tests and over-mutate code. Clamping persistent worktree loops to `effort: medium` and reserving `effort: high` for clean-context (<40k token) Council or Audit bursts improves reliability and cuts token spend.

Does Closed-Loop RSI modify my repository policy automatically?

Never without approval. Plane 3 (`eval.tester`, `audit-traces`, `synthesize-refinements --propose`) generates evidence-backed refinement diffs, but applying them to `.agentflow/` or `skills/` requires an explicit human gate (`--apply`).

Where can I read the complete 2.0 specification?

Explore the 2.0 Documentation Hub, Three-Plane Workflow Policy, and Execution Targets & Calibration Guide on GitHub.