Working with stamity
This page is for you once stamity is installed and you have real work to do. It answers three questions: which of the nine touchpoints to open, what
that one may do, and what is on disk when it stops. A touchpoint is one of the /st- slash commands your agent runs. Nine of them cover the SDLC,
and setup leaves all nine in place.
Which touchpoint does what
| Touchpoint | Its job |
|---|---|
/st-spec | create or maintain the project spec under docs/specs/; greenfield and brownfield auto-detected |
/st-plan | route an intent (feature, bug, refactor, migration, test, roadmap) into a persisted plan |
/st-work | execute planned work end to end; closes with the QA human checkpoint |
/st-board | work a task board: chat, a referenced file, or a linked platform board |
/st-ask | read-only codebase Q&A; writes nothing |
/st-debug | reproduce, root-cause, and fix a defect |
/st-quick | Tier-1 small-change lane; gates still run |
/st-rework | apply structured feedback to agent-implemented work |
/st-pr-resolve | resolve pull-request review comments |
All four clients get these as invocations. Claude Code, Copilot and Cursor type /st-<name>. Cursor and Codex share them as
explicitly invoked skills under .agents/skills/, and Codex starts a skill with a dollar sign, so there you type $st-<name>. The
capability matrix is the one home for that, per client.
How the nine fit together
Three touchpoints form the spine. /st-spec grounds the intent. /st-plan turns it into an artifact somebody can argue with. /st-work executes.
The other six are entry points onto that spine. /st-ask hands off to /st-work, /st-debug, /st-quick or /st-plan, whichever its ladder names.
/st-debug hands over a root cause plus a failing test, and that pair stands in for the plan. /st-quick joins at the gate, because it delegates its
verification.
Picking the entry point
Read the table top to bottom. The first row that fits wins.
| If … | open … |
|---|---|
| it is a question, not a change | /st-ask |
| feedback on delivered work, on a pull request | /st-pr-resolve |
| feedback on delivered work, anywhere else | /st-rework |
| a backlog, not one change | /st-board |
| behaviour is wrong and nobody knows the cause | /st-debug |
| the definition of done is unwritten, and it spans more than this change | /st-spec |
| small, obvious, five files or fewer, and someone is watching (an unattended run is refused there) | /st-quick |
| research spans several angles, or a human reads the plan before code moves | /st-plan |
| otherwise | /st-work |
/st-quick refuses rather than stretches. Five thresholds end the lane for an item. More than five files. Roughly 200 changed lines across the
batch, counted as added plus removed. Any added dependency, version bump or lockfile change. Any API shape, database schema, event payload or
migration. Any touch on authentication, authorization, session or credential handling, key material, payments or access-control configuration. That
last row has no size floor: a one-character edit under a credential path is refused, because that surface needs the review loop quick does not run.
The refusal names the row that fired and the value it measured, and the item list carries over to /st-work. Handing you the diff to paste, or
splitting an item into pieces that each miss a threshold, is the same refused change with a different hand on the keyboard.
/st-debug instruments to observe, never to fix. Its exit is a root cause with cited evidence, plus a failing test. That pair becomes the plan handed
to /st-work, or to /st-quick for one mechanical slip inside the thresholds above. Unattended, it stops there and the fix becomes a
needs a planned run morning-list row. A touchpoint that fixes by default cannot gate the step that performs the fix. /st-plan and /st-work differ
in what outlives the session. /st-work decomposes the work in-session and continues straight into Build. /st-plan stops at a persisted artifact
under docs/plans/. That artifact survives the session, gets reviewed, and is picked up by a later /st-work run or by /st-board fill.
Walking one change through
Say the work is a rate limit on an existing endpoint. It is a feature. It lands on a public contract. Nothing yet says what done means.
- Orient.
/st-asktells you what already exists: the middleware, the error shape, whether anything retries. It writes nothing, so it costs you only the reading. - Plan.
/st-planpersists one artifact underdocs/plans/. It decomposes the work into units executable without session history, each carrying its acceptance criteria. Two head keys record freshness:stamp:is the head commit, andreads:is the paths the plan read. A later run judges staleness per path, so a one-file drift does not invalidate the rest. - Execute.
/st-workruns Frame, Understand, Plan, Build and Prove. Build dispatches to sub-agents. Charter invariant 7 keeps the orchestrator out of product files itself. For a unit thatstamity gate classifyplacesproduct,public-contractorsecurity-sensitive, a tests-only pass writes its tests from the criteria first, and they are held: no builder or fixer edits them, and every Prove pass checks their digest withstamity gate held. - Prove. Each pass spawns a dedicated
test-runner. It returns the verification gates one by one, with the exact command and any verbatim failing excerpt. Bare pass or fail is not a result. Then a reviewer and fixer loop onfile:lineevidence, capped at three rounds by default. A loop that runs out stops as blocked, with the open findings attached. - Close. The QA human checkpoint is mandatory at every intensity. First the
test-runnertries to prove each row itself, cheapest route first (a committed test, a command, aghread, a headless session, a browser run), and records each it proves asagent-run. You get a what-to-verify summary of only the rows left for you, at most three, each a matter of taste, a real account, a step that cannot be undone, physical use, or legal wording, plus any security denial no committed test covers, which always comes first; each comes with a check you can run in under a minute, and any other row it cannot prove is listed underNot done:. A row whose run showed something other than the expected result is marked contradicted and carries that output, wherever it goes; it counts as failing, and only a later run that shows the expected result clears it, not your walk. Then a guided pass: each row closes walked, auto-proven, agent-run or accepted-unwalked; when every row is proven nothing is asked, and an unattended run recordsnot signed. The close then walks what is left, one question per item in your client's question tool (numbered text where it has none), recommended option first, in as many rounds as the tool needs: the rows left for you, the spec delta merge and, as its third part, the leftovers. Those are the findings neither fixed nor rejected and the inbox rows that came due or that the change touched, each with a recommendation to fix now, schedule or drop. A part with nothing to decide drops out. The commit is no question: after your last answer the close commits, pushes the branch tooriginand opens or updates a draft pull request throughstamity run checkpoint --pr, then runsstamity run land --ready, which marks it ready and merges it when the evidence holds (every required check run green on the exact head commit, no unresolved review thread, no open Critical or Warning row in the ledger, a clean merge state, and the review tool's clean word where you named one) and otherwise leaves each reason as a held row, anasksoutcome coming to you as one question, a red default branch among them; a wait for the review tool is no question, and the flow runs the land step again; unattended, the run's ending takes those steps, and your own answer not to commit is honoured. After your last answer the proof block goes to the run record, and chat prints a plain summary in its place: what changed, what to check,Not done:, one line on the gates and one on whatrun landcleaned up. Nothing prints after it.
On disk when the run stops: a proof block under .stamity/runs/. It carries gate results with their commands, review verdicts per round, the
decisions trace, artifacts touched with their owning sub-agent, and a next step derived from that run's own state. Beside it sits the findings ledger,
one row per finding. No finding ends the run pending: each closes fixed, deferred with a rationale, or rejected with reasoning. Spec deltas merge into
docs/specs/ at Prove, confirm-gated and append/merge-only, so the change earns its spec entry on the way. A typo instead is one /st-quick item
closing in a single pass. A bug with no known cause starts at /st-debug and reaches the same pipeline one step later, carrying a failing test.
Which flows run the gates
Every flow that changes product code ends on the charter's verification gates. Here that is npm run lint && npm run typecheck && node scripts/ci/test-run.mjs --coverage, the full gate this repository's charter declares: its test step is the coverage run, which holds the per-file coverage floors that a plain npm run test never evaluates.
/st-work and /st-quick run them. /st-debug, /st-rework and /st-pr-resolve reach them through /st-work or a test-runner spawn.
/st-quick delegates its gates even though it applies its own edits inline. This holds at every tier and in every lane that edits code. /st-spec,
/st-plan and /st-board write records rather than product files, so they end on that artifact or on a handoff into /st-work; /st-board also
writes to a linked board, behind its one preview. A run that cannot reach green ships a Not done: list naming each open gap.
Running two changes at once
stamity worktree gives you one tree per change, one branch each, out of one clone. It creates the checkout, places the machine-local files a
checkout cannot carry, records what it placed, and tears down from that record. Nothing lands in your working tree, because the record goes in the
new tree's git directory. So there is no ignore rule to add, and git status is unchanged.
stamity worktree setup <name>creates the tree under the farm. The farm defaults to../.stamity-worktrees/<repo-name>/, beside the clone rather than inside it.<name>is both the directory under the farm and the branch the worktree checks out. A setup that gets half way exits 1. It still reports the worktree's path, its branch, and each entry's own outcome. The recovery iscleanup <name>, orcleanup <name> --forcewhen even the receipt failed to write and nothing can scope the tree. A run refused before anything was created reports no worktree, because there is none.stamity worktree listprints one row per worktree git knows about, managed by this lane or not. Each row carries the path, the branch and the head. It adds the dirty counts, and how far ahead of or behind its upstream the branch is. It then says whether a receipt is present, whether that tree carries a stamity setup, and how many handoff records it holds. If the clone has stashed work, one line above the table says so. A stash is one list for the whole clone, so it belongs to no row below it.stamity worktree cleanup <name>inverts the receipt and nothing else. It removes what setup recorded placing. A copy whose bytes you have edited since is not inverted: it is reported as diverged and left where it is. A full cleanup then removes the directory around it, so--files-onlyis the invocation that actually preserves an edited copy. A worktree with no readable receipt is a consent gate of its own. Interactively you get the question. Under--jsonor with no TTY the run refuses, naming--force. Consent is--force,-y, or a yes at the prompt. With it the tree goes as a whole, because nothing can scope a file-by-file inversion there. Only--files-onlyleaves it standing, and it says why. Then the checkout goes:--force,-yor a yes for one carrying uncommitted changes,--files-onlyto leave the checkout in place,--allto sweep every worktree this lane manages.
What travels with the checkout:
- Committed files travel.
AGENTS.md, the managed block inCLAUDE.md, the.agents/and.claude/trees, and.stamity/with its manifest, learnings and handoffs all come across. They are committed on purpose. The new worktree comes up with the same charter, rules, skills and touchpoints as the original. Records written but never committed do not travel. That is a property of a checkout, andlistis what makes it visible rather than surprising. .env.mcpdoes not, so setup places it..gitignoreexcludes it as MCP credentials. Setup copies it across and holds it at0600, rather than leaving you to remember.node_modulesdoes not, and setup leaves it alone. It ships as a built-inskip, because a symlinked dependency directory gets written through by the next install. Install inside the new tree. If your.stamity/worktree.jsonlinks it instead, add a.gitignorelinenode_moduleswith no trailing slash, since git ignores a link only that way; setup then prints where to install, and the guard refuses an install run through the link..stamity/worktree.jsonreplaces both of those defaults wholesale. It does not layer on them, so a file naming only a new entry drops the.env.mcpcopy and thenode_modulesskip. Restate the rows you want kept, add an entry, mark onesecret, or skip something..env.mcpstayssecretby identity whatever the file says. Most repositories have no such file, and then the two defaults apply.
| Consent gate | Interactively | Under --json or with no TTY |
|---|---|---|
| a branch that already exists locally | you get the question | it refuses, naming --use-existing |
a branch that exists on origin | you get the question | it refuses, naming --track |
copying anything marked secret | you get the question | the copy is skipped, the report naming --copy-secrets |
| all three at once | -y answers them | --dry-run prints the resolved farm, the branch plan, the entry table and every gate's answer, and asks nothing |
worktree never deletes a branch. Not by setup, not by cleanup, not under --force. The report prints the git branch -d <name> line for you to run
yourself, because a directory is reconstructible from a ref and a ref is not from a directory. Two other verbs delete one, only with git branch -d: a session's run land, once the run has landed, takes the run's own stamity/<run-id> branch and the clean lanes worktree setup --run <run-id> tagged with it, and stamity gc --apply --branches takes merged local stamity/* branches. stamity gc alone only reports what runs left behind. Plain git worktree add still works. A tree outside
the farm shows in list as unmanaged, and cleanup leaves it alone. One inside the farm with no receipt goes only with consent, and then as a whole
tree. Run touchpoints and gates in each tree independently: a green gate in one says nothing about the other. The branches meet only at merge, where
charter invariant 6 applies if they touch the same API shape, schema or event. File-disjoint is not contract-disjoint.
Where to go next
- Getting started — install, what lands, and the first proven change.
- CLI reference — every verb, flag, and exit status.
- Packs and trust — adding content on top of the corpus, and the gates it passes.
- Troubleshooting — what
checkprints, and what each row means.