Agentic Skills

Guided Setup

How /devstride:setup detects repository settings, writes one config file, and validates the delivery loop.

Guided Setup

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.

Before you start

  • A git repository with an origin remote. Setup checks origin by name, because the delivery skills use that name. The delivery half assumes GitHub and GitHub Actions; on any other host setup says so plainly, and planning still works.
  • The GitHub CLI, signed in with write access. Validation fails without an authenticated gh that can push to the repository, because the loop cannot push, open a pull request or merge without it.
  • python3 on your PATH. The config shape check, the status line and the Active Agents mode run small Python scripts that ship with the plugin.
  • A DevStride connection. The bundled server offers no tools until you sign in through /mcp. Without it, setup offers two paths: write the config now without the work-type roles (reported as a required follow-up), or stop and resume after you sign in. It never guesses the roles.
  • A checkout on the right branch. When a config already exists and HEAD is on a different branch from its base branch, setup says so and offers to switch before it inspects anything, so it does not describe a stale branch over the maintained config.

What setup does

  1. Finds the git repository root and origin remote, and records the forge host.
  2. Detects the ecosystem, package manager, workspaces, and verify commands.
  3. Inspects GitHub Actions draft gating and branch roles.
  4. Finds coding-convention files, pull-request templates (wherever GitHub looks for them), and possible review engines.
  5. Looks for local-environment tooling (compose files, dev containers, seed and migrate scripts) and proposes the commands that create, recreate, migrate, seed and tear down this checkout's local instance.
  6. Proposes how this checkout resolves its deployment stage, if it deploys one at all, and which stage names are production.
  7. Reports what it found, then reads your DevStride hierarchy and asks you to confirm the release-unit and leaf roles.
  8. Asks only about unresolved choices.
  9. Writes or merges .claude/ds-config.json.
  10. Offers to scaffold the local documentation skills, and to give the repository a status line.
  11. Runs validation against the file it wrote.

Detected values carry their evidence. Ambiguous values become questions with candidates; unknown values become open questions. Detected values are confirmed in one batch, each with its evidence, instead of being asked about one by one.

The questions inspection cannot settle

Setup always confirms the work-type mapping because it determines where integration branches and releases occur. It also asks, on every run:

  • which delivery profile the repository runs (see below);
  • what a merge to the production branch triggers, so /devstride:release can quote the real consequence at the owner gate;
  • where your documentation lives (a directory here, a sibling checkout with its path and branch, a hosted service, or nowhere), how it is updated and published, and how release notes are pushed, then the names for the two local documentation skills and, optionally, a deploy-verification command that succeeds only once production serves the release commit;
  • whether to give the repository a status line;
  • whether the lessons store should use a path other than .claude/ds-lessons.md.

Setup also asks how this checkout's local instance relates to it (one instance per directory, per branch, or none) and, when the recreate command names an instance, whether it resets that instance in place or makes a new one. These are never detected.

An explicit answer always wins over detection.

Exact write boundary

The status line renders two lines of segments, each led by a symbol. Line 1 says where you are: model, effort, repository, checkout and branch. Line 2 says what is in flight: the plugin version this session runs, the deployment stage, the branch's pull request and any release in progress, and it prints only when something is on it. A segment with no value is omitted — symbol, value and separator together — so a repository with no deployment stage never shows a dangling stage marker. 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. The plugin segment is dim while current, and tells you when a newer copy is installed (/reload-plugins) or published (/devstride:update). The bar redraws every 30 seconds. 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.

After writing the status line, setup runs it once to prove it prints something, then asks about the one segment whose absence is ambiguous: the stage. Your answer either writes stage.resolve or records the segment in statusLine.hiddenSegments so nobody asks again; an unanswered question writes nothing. The script carries a "managed" marker line, which lets the session-start hook bring an older copy forward when the plugin ships a newer one (statusLine.autoUpdate, default on); delete that line to take the file over for good. See Status line.

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.

How branch roles are detected

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 roleExact candidates
Development or pre-productiondevelop, development, staging, stage, canary, test, testing, qa
Productionmain, master, production, prod
Single trunktrunk

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. protectedBranches always includes the base, production and release-source branches.

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.

Cautious decisions setup makes

  • Setup asks which delivery profile the repository runs and writes profile plus profile-consistent defaults, standard included. The three choices are extended (the default from 3.49.0, offered first), standard and prototype; a configuration with no profile key is told that the default moved and that standard keeps the finer grain; the retired enterprise is read as standard, and setup says so. The profile moves three keys: epicIntegrationBranches.autoRelease, epicIntegrationBranches.fastStoryMerges.enabled and review.pollTimeoutMinutes (5 minutes under prototype, 10 otherwise).
  • epicIntegrationBranches.autoRelease starts as false under standard and extended, 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, naming the branch, when it writes it. You can instead answer ask, which no profile produces: the loop then asks the owner once per completed release unit.
  • Under standard and extended, 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.
  • No detected local CLI means no second local CLI; no confirmed cloud reviewer means no cloud reviewer. The built-in Claude adversarial pass remains available. Setup always offers to name a local review engine it did not find.
  • Setup records lessonsDoc but never creates the lessons file. review is its only writer.
  • The plugin block is written as updateCheck: true, autoUpdate: true, pin: null, and the session block turns on the job-class gate, which stops one session from mixing authoring and execution commands. After setup or planning, run /clear before starting execution (it ends the session, giving up anything it holds, such as a checkout lease), or pass --same-session to one command to proceed in the same session. The session and deferred-work settings describe those defaults.
  • The stage and localEnvironment blocks are written even when every value is null, because an absent block reads as "nobody asked".

What setup leaves for you to set

Some settings change how work is sequenced across machines, how releases reach production, or how the loop is tuned. Those are your decision, so setup never asks about them and never switches one on: each stays absent or null until you add it by hand. Add what you need, then run /devstride:setup validate:

  • Release coordination: release.clearance (one release in flight at a time), releaseTower (the override label and hotfix pattern the release-tower check reads), release.autoStart.enabled, release.backstop, release.lightRelease.standingYes and release.fullRelease. See Release clearance, Releases that start themselves and Release backstop.
  • Story claims: the claims block, so two agents never build the same story. See Story claims.
  • Session presence: the presence block, { "command": "<your command>", "intervalMinutes": 5 }. When it is set, the plugin's hooks run your command for every session — at start, on prompts, when a turn finishes and Claude waits for you, every interval from a small background keeper while the session lives, and at session end — with the event, state, session, machine, checkout, branch and item number in its environment. The plugin contacts no tracker itself; what a report means and where it is stored is your command's business. Absent, nothing runs.
  • Release branches and the release train: release.releaseBranchPattern, release.releaseBranchFixExclusions, release.syncWorkflow, release.mergeTrainBeforeCut, release.migrationRenumber, release.devDeployVerification and releaseTrain.*.
  • Release hooks: release.classifySkill, release.preMergeSkill, release.postDeployCheckSkill (Post-deploy health check), release.deployApproval and docs.knowledgeBaseSyncSkill.
  • The checkout pool: pool.checkout and pool.checkin, both or neither. See Checkout pool.
  • Tuning: profileOverrides (pin one knob under a profile) and review.localEffort.

The activeAgents block is the one exception: /devstride:setup agents writes it for you (see below).

What validation proves

After writing, setup checks:

  • the file's shape against the JSON Schema the installed plugin publishes: a wrong type, a value outside its allowed set, both forms of release.clearance or a retired key fails, and an unknown key is a warning that suggests the key you probably meant (keys your own tools read go in repoLocalKeys; see The published schema);
  • every typecheck and lint command; tests are offered, never forced;
  • the base, release-source, production, and hotfix branches, including their remote refs;
  • the required GitHub toolchain: origin, GitHub, and an authenticated gh with write access;
  • every declared local or cloud review engine prerequisite, including that a catalogued local review command carries its read-only flag; a known unsafe command fails with a correction, and an engine the plugin does not recognize is marked unverifiable rather than failed (see Choosing a local review engine);
  • the configured work-type roles against the connected organization;
  • that the lessons store’s parent directory is writable;
  • whether the configured CI ordering can actually settle after the ready-for-review flip: an expensive pull-request workflow without the draft hold fails, as does a draft-gated workflow whose triggers omit any of opened, synchronize, reopened or ready_for_review; missing concurrency or production tree skips are cost warnings;
  • each named documentation skill exists and its read-only check mode passes; any deploy approval or verification command resolves, without being run;
  • with release.clearance set, its shape and a read-only status call.

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, and the verdict says when the working tree was dirty or the run was offline.

Re-run and validate modes

Re-running /devstride:setup re-detects the repository and proposes only changes. A changed profile is proposed together with the three keys it moves, as one change; a hand-set value you keep is respected, and setup says the file now disagrees with its profile. Its deep merge preserves:

  • keys it does not recognize;
  • every _-prefixed annotation;
  • any value it did not propose changing.

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
ArgumentWhat it doesWrites
(none)The full run: inspect, ask, write, scaffold, validate.claude/ds-config.json, plus what you accept
validateRuns validation against the existing fileNothing
ecosystem, verify, ci-inspect, branches, enginesInspects and reports one detector, then stopsNothing
docsAsks the documentation questions and the optional deploy-verification command, scaffolds the local skills, then runs the documentation check aloneThe docs block, release.deployVerification, and the scaffolded skills
ciDetects the CI-cost mechanics in your pull-request workflows and offers each missing one as an exact diffOnly the diffs you accept, plus ci.expectedRunsPerPullRequest if absent and the three review.* CI-ordering settings if you accept turning them on
agentsSets up the Active Agents board, tag and shared viewDevStride, after a typed yes, and the activeAgents block

A detector-only run reports its findings and stops; it never writes a partial config. Use ci-inspect, not ci, for a read-only look at CI: the bare ci writes.

/devstride:setup ci

/devstride:setup ci

This is the only mode that touches a workflow file. It looks for four mechanics in each pull-request workflow: the draft gate (every expensive job held while the pull request is a draft, with all four trigger types named), concurrency (a superseded run is cancelled), a skip on the production branch when its tree was already tested, and a courtesy check that tells a person who opens a non-draft pull request about the convention. For each mechanic that is missing, or present but inert, it shows the exact diff and applies only the ones you accept. If you accept a draft-gate diff while the three review.* CI-ordering settings are false, it proposes turning them on in the same change. It offers /devstride:ci-audit first, so you can measure before you change anything, and runs the CI checks from validation afterwards.

With release.clearance set, it also offers a fifth mechanic, release ordering: two files, .github/workflows/release-tower.yaml and .github/scripts/release-tower-check.mjs, which add a release-tower check to pull requests into the production branch. It passes a hotfix, the oldest open release pull request and one carrying the override label, holds a later release until the first merges or closes, and tells any other branch to retarget. Making it a required check on the production branch is your change, once it has posted green on one real release.

/devstride:setup agents

/devstride:setup agents

The one setup mode that writes to DevStride, and it is opt-in. It shows which plans your agents are building on an Active Agents board. With no activeAgents block yet, it first asks for your repository's own start and end commands (the start command must contain <root>, which the loop fills with the plan root's item number). It then reads your organization, prints its name and every change it would make — the tag to create, each tag group's exact list before and after, the board to adopt or create, the view to create and the block to write — and acts only on a typed yes:

  1. Creates the agent active tag (green by default) if it is missing.
  2. Adds the tag to the tag group of every plan-root work type, always writing the merged full list, never only the new tag. A plan-root type with no tag group is reported and skipped.
  3. Adopts the configured board, or an existing board named "Active Agents", or creates one, asking once for the folder and status collection a new board needs.
  4. Creates a shared table view of the board named "Active Agents" with the columns Item, Status, Progress, Priority and Tags, copying the format of an existing view. When there is no view to learn from, it creates everything else and names the view as the one step left for you.
  5. Writes or merges the activeAgents block, never overwriting your commands.

It never moves, edits or untags an item. A permission error stops it after reporting what was already done (tags and tag groups need MANAGE_LABELS). Running it again prints agents: nothing to change. From then on /devstride:build-item places each plan root it works under on that board and runs your commands as it starts and stops; /devstride:doctor agents checks the setup read-only.

Setup versus doctor

/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, merge gates, documentation skills and the Active Agents board.

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:

TierWhat doctor doesTypical findings
Repairs itWrites 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. The one exception, asked about separately once the shared status line is committed, is removing a personal statusLine setting so the repository's takes over.A missing or half-configured status line; a status line set only in your personal settings; a segment with nothing to read from (it asks, then writes stage.resolve or records the segment as hidden).
Offers the command that owns the fixRuns 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 or a legacy release.docsRepo (/devstride:setup docs).
Reports onlyExplains 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.