/stories:setupfrom stories
Interactive onboarding that configures a repository for the story-workflow project: merge-mode selection, verification gates with test-runner detection, gitignore wiring, and optional reviewer personas.
Ships in stories. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
An interview, then story init writes everything. Never hand-write .agents/shousper-stories/config.json — the CLI owns the format.
Core principle: every answer becomes committed config; the gates you define here are what story done will enforce forever after. Get them runnable, not aspirational.
.agents/shousper-stories/config.json exists, this is reconfiguration — show the current config and confirm with your human partner before overwriting anything.git rev-parse --show-toplevel). The board, worktrees, and locks are all repo-relative.One topic at a time. Propose detected defaults; the human confirms or corrects.
| Mode | Who integrates | When to pick |
|---|---|---|
self | The agent merges story/st-<id> into main when gates pass | Solo, high trust, fastest iteration |
local | Story parks in-review; human reviews the worktree and merges locally | Solo, human wants eyes on every change |
pr | Push branch + GitHub PR; humans review/merge on GitHub | Teams ("multiplayer") |
If pr, probe before accepting the answer:
gh auth status # must be logged in
git remote get-url origin # must have a remote
gh repo view --json viewerPermission -q .viewerPermission # must be WRITE or ADMIN
Any probe fails → report exactly which one and what it said, and offer local as the fallback. Never configure pr mode on hope.
Detect the test runner from signature files and PROPOSE a test command gate:
| Signal | Proposed gate command |
|---|---|
bun.lock / bun.lockb | bun test |
pnpm-lock.yaml | pnpm test |
yarn.lock | yarn test |
package-lock.json | npm test |
Cargo.toml | cargo test |
go.mod | go test ./... |
pyproject.toml / pytest.ini | pytest |
Justfile | inspect just --list for test/check recipes |
Run the proposed command once, now. A gate that does not pass (or at least run) on the current tree is misconfigured — fix the command, or flag the broken baseline to the human before proceeding.
Then offer optional gates:
e2e — if playwright.config.* exists, propose npx playwright test as a command gate.visual — a review gate: a capture command (screenshot script, just screenshot, a playwright capture) plus a persona (bundled visual-reviewer, or a generated one). Offer only when the project has a UI.lint / build — if the project has obvious commands and the human wants them enforced per story.Map type defaults: feature / bug / chore → ["test"]; add a ui type mapping to ["test", "visual"] only if a visual gate was defined.
Budgets: propose the defaults (maxStalls: 3 — consecutive turn ends without board progress before a run ends; maxFixRoundsPerStory: 3); change only on request.
Offer to analyze the project (README, stack, domain) and generate reviewer personas into .agents/shousper-stories/personas/ — an api-contract-reviewer for a service, an art-director for a game. Model them on the bundled templates in stories:work's references/personas/ directory: inputs are the story file path + evidence paths; output is a single VERDICT: pass|fail line plus notes. A gate's persona field names the file; .agents/shousper-stories/personas/<name>.md wins over bundled templates.
Skip freely — the bundled qa-reviewer and visual-reviewer cover most projects.
Assemble the config object and write it to a scratch file, then run story init --config <file>. The CLI writes .agents/shousper-stories/config.json, scaffolds stories/ + stories/archive/, and prints what it created. Config shape:
{
"version": 1,
"storiesDir": "stories",
"merge": "self",
"gates": {
"test": { "kind": "command", "run": "bun test" },
"visual": { "kind": "review", "capture": "just screenshot", "persona": "visual-reviewer" }
},
"defaults": { "feature": ["test"], "bug": ["test"], "chore": ["test"] },
"gateLock": true,
"budgets": { "maxStalls": 3, "maxFixRoundsPerStory": 3 }
}
Ensure .gitignore contains each of these two lines exactly (append the missing ones; nothing else):
.worktrees/
.agents/shousper-stories/local/
Verify: story doctor reports a clean board; cat .agents/shousper-stories/config.json matches the approved answers.
Remind the human to commit .agents/shousper-stories/config.json (and personas/ if generated) and the stories/ scaffold — the committed marker is what activates the hooks for every session in this repo. Same-machine assumption is hard: parallel workers coordinate through file locks; workers on other machines or network filesystems are not supported.
Setup ends with exactly one of:
Never:
.agents/shousper-stories/config.json by hand — always through story init.pr mode with failing gh probes.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
story-workflow, project-setup, onboarding, verification-gates
Other plugins' skills for the same job
npx claudepluginhub shousper/clanker-kit --plugin stories5 skills in this plugin
/cancelStops an active story loop and reports where the board stands. Use when asked to "stop the loop", "cancel the story run", "halt autonomous story work", "kill the worker loop", or when a runaway run must be shut down. DO NOT TRIGGER for closing a single story (that is story done inside stories:work), for deleting or archiving stories, or for removing the story workflow from a project./planDecomposes a spec or approved design into epics and stories on the story board — sized, dependency-ordered, gated, human-approved, then filed via the story CLI. Use in a project with .agents/shousper-stories/config.json when there is a design doc (often from kit:brainstorming), spec, requirements file, or feature request to break down; it replaces kit:writing-plans in the workflow chain for story-based projects. Also use for "file stories", "break this into stories", "populate the board". DO NOT TRIGGER in projects without .agents/shousper-stories/config.json (use kit:writing-plans), for executing stories (stories:work), or for filing a single discovered-work story mid-loop (plain story create)./using-storiesCompressed story-workflow rulebook, injected automatically at session start (including after compaction) in projects with .agents/shousper-stories/config.json. Use when unsure of the workflow rules mid-session, when asked "how does the story workflow work here", or for a story CLI quick reference. DO NOT TRIGGER in projects without .agents/shousper-stories/config.json, to set up the workflow (stories:setup), to file stories (stories:plan), or to run the loop (stories:work)./workRuns the story worker loop in a story-workflow project — claim ready stories, implement each in its own worktree, close through verification gates, repeat until the goal is met or the loop stalls. Use when asked to "work the board", "complete all stories", "work on epic st-XXXX", "pick up the next story", "start a worker", or to resume or continue a story run — and when a loop re-prompt names the next story in a session that started the loop. DO NOT TRIGGER without .agents/shousper-stories/config.json (use stories:setup first), for decomposing a spec into stories (stories:plan), or to stop a run (stories:cancel).