Complete reference for every Vibeflow command: flags, modes, and outputs.
Deep-scans your codebase and learns your patterns, conventions, and architecture. Generates curated documentation in .vibeflow/ that persists and can be committed to git.
Usage /vibeflow:analyze [--fresh] [--scope <path>] [--interactive] [--satellite <url>] [--measure]
Flags & modes (no flags) Incremental mode (default): re-analyzes only what changed since the last run, detected via git. A run is also due when only a test file, the CI configuration, or the test runner's configuration changed.
--fresh Full rebuild from scratch. Ignores existing .vibeflow/, re-analyzes everything.
--scope <path> Deep-dive into a specific module or directory (80%+ of files). Enriches global patterns with module-specific examples.
--interactive Adds a review checkpoint: presents patterns found, asks about false positives and missing patterns before saving.
--satellite <url> Analyzes an external dependency repo (design system, shared lib). Clones it, detects what your main repo uses, merges relevant patterns.
--measure Runs the full-suite command and the affected-tests command once each and records their times and the date. Without it, analyze records the test commands without running them.
Tests and pitfalls index.md gains a Tests and Pitfalls block: the full-suite command, the narrowest affected-tests command with its measured time or unmeasured, and the pitfalls with their source.
Import protection Imported pattern protection: incremental mode skips patterns that have imported versions (from teach --from). External source of truth takes precedence.
Output .vibeflow/index.md, conventions.md, patterns/, decisions.md
Interactive dialogue that transforms a vague idea into a clear, actionable PRD. Challenges assumptions, cuts scope aggressively, and forces decisions.
Usage /vibeflow:discover <idea or area>
Flags & modes Quick round Quick round: if your first response has total clarity (concrete problem, defined audience, closable scope), skips to 1–2 rounds then generates PRD.
Complete flow Complete flow: 3–5 discovery rounds with strategic questioning. Explores problem, audience, success criteria, scope, and trade-offs.
## Clarifications The dialogue's decisive questions and their answers go under ## Clarifications in the PRD, and gen-spec carries them into the spec.
Output .vibeflow/prds/<slug>.md
Generates a technical spec with binary Definition of Done (3–7 pass/fail checks), scope, anti-scope, technical decisions, and risks. Grounded in your project's real patterns.
Usage /vibeflow:gen-spec <feature description or PRD path>
Flags & modes From PRD From PRD: pass a path to .vibeflow/prds/<slug>.md and it uses the PRD as basis for the spec.
From description From description: describe the feature directly and it generates the spec from scratch.
PRD validation PRD validation gate: when input is a PRD (file or >3 lines), runs 5 sanity checks (concrete problem, audience, closable scope, .vibeflow/ conflicts, stack viability). Asks up to 2 questions if issues found. Short descriptions skip the gate.
Auto-split Auto-split: if spec exceeds limits (>7 DoD checks or exceeds budget), automatically splits into numbered parts with dependency tracking.
[NEEDS CLARIFICATION: …] What the spec cannot decide becomes a [NEEDS CLARIFICATION: <question>] marker, aiming at 3 open at most. Before saving, it checks its own draft (binary checks, a test or Scenarios: on each functional check where the project has a test runner, the marker count) and can ask up to 2 questions in one round; markers still open stay in the saved spec and are named in the reply.
## Clarifications Records the questions asked and their answers in ## Clarifications, at most 5 per session, plus the ones a PRD carries.
Scenarios: A functional DoD check can carry Scenarios: lines in the EARS form (WHEN <condition> THE SYSTEM SHALL <behavior>), and a check can be a property that names its oracle. They are fields of a check: the DoD stays 3 to 7 checks.
Risk code: Ends ## Risks with a Risk code: list of the paths or functions the change touches in money and totals, credentials and permissions, deleting or overwriting data, and date and time boundaries (Risk code: none when there are none). That is where the audit sabotages.
No one to answer With no one to answer (claude -p, a pipeline), it can end on its questions with no spec saved.
Literals ## Clarifications, Scenarios:, Risk code:, [NEEDS CLARIFICATION: …] and the EARS keywords stay in English in a spec or PRD written in any language, because other commands match them byte for byte.
Output .vibeflow/specs/<slug>.md (or <slug>-part-N.md if split)
Implements a feature from its spec with hard guardrails. Follows your patterns exactly, respects budget and anti-scope, runs tests, and self-verifies every DoD check.
Usage /vibeflow:implement <spec file or feature name> [--loop | --no-loop]
Pipeline Phase 0 Find & validate spec: locates spec, validates required sections, checks multi-part dependencies.
Phase 1 Extract guardrails: DoD, scope, anti-scope, budget, and technical decisions become hard rules.
Phase 2 Load context: reads conventions, applicable patterns, index.md. Uses Pattern Resolution for smart matching.
Phase 3 Plan: identifies target files, verifies budget, maps DoD to implementation steps.
Phase 4 Implement: executes following patterns exactly. Minimum change principle. No refactoring outside scope.
Phase 5 Run tests: auto-detects test runner (npm test, pytest, cargo test, etc.). Max 2 fix attempts.
Phase 6 Refine (simplify in scope): cleans the diff it wrote (reuse, names, dead code) on a green baseline and re-runs the tests; reverts if they break.
Phase 7 Self-verify DoD: checks each DoD item with evidence. Reports overall status.
Phase 8 Finish: summarizes DoD, budget, and tests, and suggests /vibeflow:audit as the next step.
Loop mode --loop Phases 0 to 3 run as above; in place of phases 4 to 8, the session becomes the orchestrator of the execution loop: an executor implements in a fresh session and the independent audit runs in another.
loop: true In the front matter of .vibeflow/loop/config.md, turns the loop on for the project.
--no-loop Turns the loop off for one run, even with the config on.
Before phase 0 Without the kit, or without Node.js 18 or newer, the loop stops before phase 0, says what to install, and reminds you that implement without --loop still runs.
How the execution loop works → Output Code changes within scope and budget, with DoD verification report.
Budget is a hard limit. Anti-scope is sacred.
Generates a self-contained prompt for a coding agent in a separate session. The agent receives everything it needs: patterns, conventions, file paths, test commands. Zero external context.
Usage /vibeflow:prompt-pack <spec file or feature>
Flags & modes Agent-agnostic Agent-agnostic: works with Codex, Copilot, Cursor, Claude Code, Hermes Agent, or any coding agent.
Embedded patterns Embedded patterns: includes real code examples from your .vibeflow/patterns/ so the agent follows your conventions.
Validation Validation: rejects specs with >7 DoD checks or exceeding budget. Requires splitting first.
Output .vibeflow/prompt-packs/<slug>.md
Audits implementation against the spec on two dimensions: DoD compliance (every check pass/fail with evidence) and pattern compliance (conventions followed or deviations noted). It reads the change from a review package, tests scenarios, and works best in a session that did not implement the work.
Usage /vibeflow:audit <spec file or feature> [--package <path>] [--base <ref>] [--reaudit <round-commit>] [--probes] | --consolidate-hotfixes
Flags & modes Review package The audit reads the change from one file, so the review and the Critical Gate judge the same diff. --package <path> reads that package; without it, the audit builds one in .vibeflow/reviews/<feature-slug>-round-0.md from --base <ref> when given, or else from the merge-base with the default branch (or from HEAD, for uncommitted work on the default branch). The diff runs from there to the working tree, so a branch's commits and its uncommitted work are judged together. With --package, --base or --reaudit given, or in a loop part, an empty package ends in FAIL ("nothing to audit"). In an audit run by hand with no diff to package, or with no kit or no Node.js 18+, there is no package and the report records Review package: none (<reason>).
--reaudit <round-commit> Checks one fix round against its own diff: runs the suite and the audit's probes, closes or keeps each open finding, and looks for new defects in the fix diff only.
--probes Writes behavior probes as tests under <test dir>/audit/ and sabotages risk code, each sabotage undone from a copy checked by hash. By hand, probes and sabotage run only with this flag; without it, the report lists the probe cases as code and records Sabotage: skipped.
Severity and cause Every finding has a severity (defect, risk-gap, low), a cause, and a confidence. An open defect or risk-gap holds the verdict below PASS whatever its confidence, so expect PARTIAL where 1.15 gave PASS. A low finding goes to ### Follow-ups without blocking.
PASS PASS: all DoD checks pass, patterns followed, tests pass, gate clean, and no open defect or risk-gap.
PARTIAL PARTIAL: some checks pass, gaps identified with specific details.
FAIL FAIL: DoD not met, tests failing, an unjustified CRITICAL/HIGH Critical Gate finding, or an empty package where a change was expected. Tests fail = automatic FAIL regardless of other checks.
Incremental fix On PARTIAL or FAIL, generates an incremental prompt pack covering only the gaps, so you can fix without re-reading the full spec.
--consolidate-hotfixes Targets .vibeflow/hotfixes/ instead of a spec: re-runs each doc's DoD checks and regression test against the current code and classifies it as still-holds, promote, or regressed. No PASS/PARTIAL/FAIL verdict.
Output .vibeflow/audits/<slug>-audit.md (in a loop part, <feature>-<part>-audit.md); with --reaudit, .vibeflow/audits/<slug>-reaudit-<n>.md
Fast-track for small, well-defined tasks. Skips discovery, generates an ephemeral spec in memory, and outputs a ready-to-use prompt pack in one command.
Usage /vibeflow:quick <task description>
Flags & modes Budget ≤4 files ≤4 files budget: tighter than the standard ≤6. If the task needs more, it warns you to use the full pipeline.
Ephemeral spec Ephemeral spec: generated in memory only (not saved to disk). Goes straight to prompt pack.
When to use Use for small planned tasks with clear requirements. An observed defect with evidence goes to hotfix, regardless of size. Skip if the idea is vague or architecturally significant.
Output .vibeflow/prompt-packs/<slug>.md
Fixes an observed defect with reproducible evidence in one call: writes a short trace doc before touching code, implements the fix, and backs it with a regression test written before the fix.
Usage /vibeflow:hotfix <symptom + evidence | path to halted doc>
Flags & modes Trace doc Short doc in .vibeflow/hotfixes/, written in 2 moments: symptom, hypothesis, and properties to preserve before any code; root cause, DoD, and regression after the fix.
Red proof The regression test enters the suite before the fix and must fail on the current code, for the reason the hypothesis names. Written after, it could only agree with the fix.
done or HALT Two outcomes: done, or a named HALT from a closed set of 6 (e.g., cannot-reproduce, exceeds-hotfix-budget). Every HALT saves the doc with the human's next step; resume by passing the doc path.
verified status verified requires all 4: real reproduction, regression test red→green, project suite green, and a clean Critical Gate. Anything less becomes partial, with the reason visible in the doc.
Consolidation Later, audit --consolidate-hotfixes reclassifies the trace docs against the current code.
When to use Use when an observed defect has reproducible evidence, even a small one. A planned task with no defect goes to quick; a vague idea goes to discover.
Output .vibeflow/hotfixes/<YYYY-MM-DD>-<slug>.md + fix + regression test
Updates the .vibeflow/ knowledge base with corrections, new conventions, architectural decisions, or new patterns. Also imports patterns from external repos via --from.
Usage /vibeflow:teach <feedback> | --from <url|path> [--name alias]
Flags & modes Pattern correction Pattern correction: updates an existing pattern doc with your correction. Survives incremental updates.
New convention New convention: adds to conventions.md (e.g., "we always use named exports").
Architecture decision Architectural decision: adds to decisions.md with context and discarded alternatives.
New pattern New pattern: creates a new .vibeflow/patterns/<name>.md file with standard structure.
--from --from <url|path>: imports patterns and conventions from an external reference repo (e.g., shared coding guidelines, architecture docs). Interactive review lets you pick what to import. Saves to .vibeflow/patterns/external-<name>/.
Conflict detection Conflict detection: when importing or creating patterns, detects name collisions with existing local or imported patterns. Asks which version to keep, with no silent overwrites.
Output Updates to .vibeflow/ docs (conventions.md, patterns/, decisions.md, patterns/external-*/)
Compiles statistics from all audit reports, and from the loop's ledgers when there are any. Shows pass/fail rates, most violated patterns, common DoD gaps, and quality trend over time.
Usage /vibeflow:stats
Flags & modes Metrics Verdicts breakdown (PASS/PARTIAL/FAIL percentages), DoD pass rate, top 3 most failing checks, top 3 most violated patterns.
Trend Quality trend: improving, stable, or degrading (requires ≥3 audits).
### Loop When .vibeflow/loop/ holds ledgers (its .md files other than config.md), the report gains a ### Loop section with the numbers from the kit's loop-stats.mjs (parts, first-audit PASS rate, average fix rounds, median time from dispatch to PASS) and the findings by severity and cause, counted from the audit reports. Without ledgers, the report is unchanged.
In progress A report with Verdict: pending is an audit in progress or interrupted: stats counts it apart ("N audits in progress or interrupted") and leaves it out of every other count.
Output Chat output only (read-only, no files modified).