/devstride:setup is rarely needed there: re-running it merges only what changed and keeps hand edits, and /devstride:setup validate checks the existing configuration. Setting up a machine is a different command, ./setup: see Set up your machine.Run this after installing the plugin and connecting DevStride:
/devstride:setup
Setup’s job is to produce a repository-specific .claude/ds-config.json from evidence, not guesses, and prove that the resulting commands and branch roles work.
origin remote..claude/ds-config.json.Detected values carry their evidence. Ambiguous values become questions with candidates; unknown values become open questions. One unambiguous repository fact is confirmed in a batch instead of being asked again individually.
Setup always confirms the work-type mapping because it determines where integration branches and releases occur. It also asks:
/devstride:release can quote the real consequence at the owner gate;.claude/ds-lessons.md.An explicit answer always wins over detection.
.claude/ds-config.json always, and three things only when you accept them: the documentation skills it scaffolds under .claude/skills/, a repository status line (.claude/statusline.sh plus a statusLine entry in .claude/settings.json), and — in /devstride:setup ci only — CI workflow changes, offered as a diff you review.
It does not edit code, AGENTS.md, CLAUDE.md, .gitignore, Claude permissions, git config, branches, or DevStride items. It never installs or updates tools, and it never overwrites a .claude/statusline.sh it did not write.
The status line renders Model · Effort · Repo · Checkout · Branch · Stage · PR, omitting any segment it has no value for — label, value and separator together — so a repository with no deployment stage never shows a dangling Stage:. Checkout distinguishes the main checkout from a linked worktree, which matters because release-unit integration branches put work in worktrees. Stage appears only where a stage was configured, and turns red for a name you listed as production. Because the setting lives in the repository's own .claude/settings.json, it outranks any personal status line in ~/.claude/settings.json; use .claude/settings.local.json to override it for yourself alone.
Inspection and interviewing are read-only. The repository’s own verify commands run during validation and may themselves create caches, regenerate files, or format code; setup asks before running a command that looks mutating and reports if the tree changes.
The plugin has fixed no-config fallbacks—develop for normal work and release source, master for production and hotfixes—but setup does not blindly write those names. In a git repository with an origin remote, it enumerates the branches that actually exist and confirms remote-only or cached evidence before proposing four explicit settings:
baseBranch and release.releaseSource, where normal work lands and releases start;release.productionBranch and hotfixBaseBranch, where production releases and urgent fixes are based.Setup recognizes exact common names among those existing branches:
| Likely role | Exact candidates |
|---|---|
| Development or pre-production | develop, development, staging, stage, canary, test, testing, qa |
| Production | main, master, production, prod |
| Single trunk | trunk |
One development candidate and one production candidate form a proposed pair. If several names match either role—for example both main and production—setup shows the candidates and asks; list order is not a ranking. A lone staging, canary, test, or QA branch is never promoted to production by name alone. Matching is on the whole branch name, so production-fix is not mistaken for production.
origin/HEAD helps identify the repository’s ordinary pull-request base, but it does not prove which branch deploys. An explicit answer or existing config always wins.
Doctor applies the same read-only detection when an absent branch setting falls back to a ref that does not exist. It prints the exact mapping setup would propose, but never edits the config. An explicit configured branch that does not exist is reported as invalid rather than replaced by a naming guess.
profile plus profile-consistent defaults. The four choices are prototype, standard (the default), extended and enterprise. epicIntegrationBranches.autoRelease starts as false under standard, extended and enterprise, so a completed release unit stops at release-ready until an owner deliberately enables automatic release; under prototype it starts as true, and setup says so out loud when it writes it.standard, extended and enterprise, fast item merges are enabled when both verify.typecheck and verify.test are set; otherwise each item keeps its own pull-request path, and setup names the missing verification command. Under prototype they are enabled whenever verify.typecheck is set. Every fast-merged item still gets the build engine’s risk check and a green local gate; a local CLI reviewer is optional support, not a precondition.verify.skipDuringStoryBuilds, preShipChecks, and preCommitWiringChecks start empty. Setup does not invent expensive or repository-specific gates.lessonsDoc but never creates the lessons file. review is its only writer.After writing, setup checks:
origin, GitHub, and an authenticated gh with write access;Every check reports PASS, FAIL, SKIPPED, or UNVERIFIABLE. Setup runs all checks even after a failure and calls the repository loop-ready only when there are no failures. A skipped test or offline organization check is named rather than silently treated as a pass.
Re-running /devstride:setup re-detects the repository and proposes only changes. Its deep merge preserves:
_-prefixed annotation;It does not normalize or replace the whole file. A documentation hook is cleared only after you explicitly say that documentation system no longer applies, and a pre-1.0 release.docsRepo block is migrated into a local skill only when you accept that change.
To validate an existing file without inspecting for a rewrite, asking questions, or writing anything:
/devstride:setup validate
For read-only inspection of one detector, use ecosystem, verify, ci-inspect, branches, or engines. Two narrowed modes write, each only the keys its own questions answer: docs (the documentation hooks, and the local skills it scaffolds) and ci (the CI-cost mechanics, applied to your pull-request workflows as diffs you accept one by one):
/devstride:setup ci
A detector-only run reports its findings and stops; it never writes a partial config.
/devstride:setup validate proves the config file. /devstride:doctor checks the broader machine and repository state, including the installed plugin version, marketplace registration, DevStride connection, CI draft gate, and merge gates.
Both are designed to be re-run. Neither is a one-time step: /devstride:setup validate and /devstride:doctor write nothing until you accept something, so run them whenever config changes, whenever the loop behaves oddly, or simply at the start of a session.
Doctor runs in two phases. It diagnoses read-only and prints a finished report; then, in one batch with a single question, it offers the repairs it is allowed to make and re-verifies each by re-running the check that found it. Run non-interactively, it repairs nothing.
What it may touch is a fixed classification, not a judgment made in the moment:
| Tier | What doctor does | Typical findings |
|---|---|---|
| Repairs it | Writes the fix, then re-verifies. Every write lands inside this repository's .claude/, needs no network, changes no git state, and is undone by reverting a file. | A missing or half-configured status line; a status line set only in your personal settings; a segment with nothing to read from. |
| Offers the command that owns the fix | Runs an existing command on your say-so, rather than reimplementing it. | gh not authenticated or missing a scope; a config that is absent or has branch roles that do not resolve; a localEnvironment or stage gap; a missing docs skill. |
| Reports only | Explains the fix and stops. | Workflow files, merge gates and branch protection, git state, DevStride records, anything on a deployed stage, an unrecognized config key, a conventionsDoc pointing at a missing file, a configured command that does not resolve, and more than one DevStride MCP server connected. |
Anything not named above is report-only. The boundary is the useful part: workflow files reach CI for everyone, branch protection affects every contributor, and a "correction" to a config key doctor merely failed to recognize would be a silent config change — so those stay decisions you make.
/devstride:update and stops, because that skill acts only on your explicit invocation. Session-start plugin.autoUpdate is the other path; doctor is not one.Setup checks whether HEAD matches the existing configuration's base branch and offers to switch before inspecting a stale checkout. Setup and Doctor also verify the configured local review commands' read-only flags; known unsafe commands fail with a correction, while unknown engines are marked unverifiable. See Choosing a local review engine.
Choose epicIntegrationBranches.autoRelease: "ask" to approve each completed release unit individually. After setup or planning, run /clear before starting execution. The session and deferred-defect settings describe those defaults.