
Initializes Specwright in a project. Detects stack, asks about practices, creates constitution and charter, configures quality gates and hooks.
Runs configured build and test commands in tiered order. Captures output as evidence per tier. Returns PASS, FAIL, WARN, or SKIP based on per-tier verdicts. Internal gate — invoked by verify, not directly by users.
Captures patterns and learnings from the current work unit. Reviews build failures, gate findings, and architecture decisions. Applies objective promotion criteria autonomously — patterns.md is the artifact.
Periodic codebase health check. Analyzes architecture, complexity, consistency, and debt across the full codebase. Produces persistent findings in AUDIT.md.
Breaks a design into work units with testable specs. Reads design artifacts from sw-design and produces implementation-ready plans.
Fetches and displays PR review comments from GitHub, grouped by priority, and allows the user to reply to or resolve individual threads.
Audits test quality — assertion strength, boundary coverage, mock discipline, error path testing. Delegates to the tester agent for adversarial analysis. Internal gate — invoked by verify.
Autonomous solution architecture. Researches the codebase, designs a solution, challenges it adversarially, and produces design artifacts.
TDD implementation of one work unit. Delegates test writing to the tester agent and implementation to the executor agent. Commits per task.
Specwright health check. Validates shared config, anchor docs, workflow and session state, commands, gates, and hooks. May backfill shipped PR metadata when it can prove the mapping safely.
Research-backed rebaselining. Revises design, plan, or in-progress work while preserving completed scope and approval lineage.
Ships the current work unit. Verifies all gates passed, creates a PR with evidence-mapped body, updates workflow state to shipped.
Orchestrates quality gates for the current work unit. Runs enabled gates in dependency order, produces an aggregate evidence report with gate handoff.
Detects leaked secrets, injection patterns, and sensitive data exposure across changed files. Uses real tooling when configured, LLM judgment for analysis. Internal gate — invoked by verify.
Deep outward-facing research. Investigates external documentation, APIs, industry patterns, and best practices. Produces validated research briefs.
Tiered semantic analysis of changed code (rg → ast-grep → OpenGrep). Detects error-path bugs structural gates miss. Findings default to WARN. Internal — invoked by verify.
Maps every acceptance criterion from the spec to implementation evidence and test evidence. Criteria without evidence fail. The ultimate quality gate. Internal — invoked by verify.
Detects unused exports, orphaned files, architecture layer violations, and circular dependencies across changed files. Delegates to architect agent for structural analysis. Internal gate — invoked by verify.
Explicitly adopt an existing work into the current worktree after validating live ownership, stale sessions, and branch consistency.
Investigation-first debugging workflow. Scopes the problem, delegates root cause analysis, produces a diagnosis report, and applies fix/log/defer autonomously.
Detects project stack and existing guardrails, then interactively configures deterministic quality checks across session, commit, push, and CI/CD layers.
Shows current Specwright state for this worktree, the attached work, repo-wide active works, gate results, and lock status. Supports --reset, --cleanup, and --repair {unitId}.
Syncs the local repository by fetching all remotes, updating the base branch, and removing stale local branches that are not protected by live sessions or helper worktrees.