Scaffold CLI Reference

Overview

This is a terse index of the whole scaffold command surface. It tells you which command does what and points to the deep guides where a subsystem earns its own page. For the full mental model of a subsystem, follow the links:

Commands are registered on a single yargs root (src/cli/index.ts:30) and every command accepts the global options --format json, --auto, --verbose, --root <dir>, and --force (src/cli/index.ts:59).

All commands at a glance

CommandGroupWhat it does
scaffold initSetup & adoptionInitialize scaffold for this project
scaffold adoptSetup & adoptionAdopt an existing project into scaffold
scaffold nextPipeline navigationShow next eligible step(s)
scaffold run <step>Pipeline navigationRun a pipeline step (assemble + emit the prompt)
scaffold complete <step>Pipeline navigationMark a step done (for steps run outside scaffold run)
scaffold reworkPipeline navigationRe-run steps by phase for depth/cleanup
scaffold skip <step..>Pipeline navigationSkip one or more steps
scaffold reset [step]Pipeline navigationReset a step (or the whole pipeline) to pending
scaffold check <step>Pipeline navigationCheck whether a conditional step applies here
scaffold statusStatus & dashboardShow pipeline progress and step statuses
scaffold info [step]Status & dashboardShow project info, or detail on one step
scaffold listStatus & dashboardList methodologies, platform adapters, and tools
scaffold decisionsStatus & dashboardShow recorded decisions
scaffold dashboardStatus & dashboardOpen the visual pipeline dashboard in a browser
scaffold observe event <type>ObservabilityWrite a ledger event
scaffold observe progressObservabilityShow the build-progress snapshot (with --replay)
scaffold observe auditObservabilityRun the audit lenses and report findings
scaffold observe ack <prefix-or-id>ObservabilityAcknowledge or reopen a finding by ID prefix
scaffold observe harvestObservabilityFlush a worktree ledger to the primary archive
scaffold knowledge <subcommand>KnowledgeManage knowledge entries (list|show|update|reset)
scaffold knowledge-freshness <command>KnowledgeRun knowledge-base freshness audits
scaffold validateValidationValidate meta-prompts and config
scaffold validate-knowledgeValidationValidate frontmatter on all knowledge entries
scaffold versionVersion & updateShow version and check for updates
scaffold updateVersion & updateCheck for and display CLI updates
scaffold buildPlatform & skillsGenerate platform adapter output files
scaffold skill <action>Platform & skillsManage scaffold skills for Claude Code / shared agents
scaffold guides [topic]Platform & skillsOpen, list, or build the reference guides

Setup & adoption

Two entry points: init for a fresh project, adopt for an existing codebase.

scaffold init
scaffold adopt --dry-run    # preview what adoption would write

Pipeline navigation

The core loop. next tells you what's eligible, run emits the assembled prompt, complete records work done outside the CLI, and rework/skip/reset adjust state. See the Pipeline guide for phase ordering and dependencies.

scaffold next                 # what can I run now?
scaffold run user-stories     # emit the prompt for a step
scaffold rework --through 3   # re-run phases 1 through 3

Status & dashboard

Read-only views of project and pipeline state.

Observability — scaffold observe …

observe is the build-observability surface: a durable event ledger, a fused progress timeline, a multi-lens audit, and worktree-ledger harvesting. It demands a subcommand (src/cli/commands/observe.ts:398). This guide only lists the verbs — the Build Observability guide documents the event schemas, the nine audit lenses, verdicts, stall signals, and config.

SubcommandWhat it does
observe event <type> --branch <branch> [--task-id <id>] [payload flags]Write one ledger event (task_claimed, decision_recorded, blocker_hit, …); --branch is required
observe progressSnapshot of in-flight/completed work; --replay fuses git/gh/mmr/state/tests
observe auditRun the audit lenses; exits 1 when blocked
observe ack <prefix-or-id>Acknowledge or reopen a finding by ID prefix
observe harvestFlush a worktree ledger to the primary archive; --recover sweeps stale ones
scaffold observe progress --replay
scaffold observe audit --scope docs --profile full
scaffold observe ack 3a8c1f02 --status acknowledged --note "tracked in #412"
scaffold observe harvest --worktree ../wt-alice

Knowledge

Two distinct command trees: knowledge manages the entries themselves; knowledge-freshness audits them for staleness.

scaffold knowledge list
scaffold knowledge show react-state-management

Validation

Version & update

Platform & skills

scaffold guides --list --format json   # discover guides (agents)
scaffold guides cli --markdown         # read this guide's source
scaffold guides --build                # regenerate index.html (maintainer/CI)

Agents read markdown, never HTML. Use scaffold guides <topic> --markdown or read the bundled content/guides/<topic>/index.md directly. The generated index.html is for humans.

See also