/t-stack:tstack-reviewfrom t-stack
Use when a card is handed over for review (READY FOR REVIEW #n on the card), or comes back for round N after CHANGES REQUESTED: check the head against current master with git merge-tree, run the PR's tests in a git-archive scratch copy at the head (they must pass), then with master's non-test source swapped in (they must fail), make one exhaustive mutant pass over each guard the card rests on (auth, tenant, rate limit, dry run, privacy, secret comparison), find what the change could break beyond the diff, read the risky code yourself (authorization, SSRF and redirects, DNS rebinding, secrets, privacy), and write APPROVED #n or CHANGES REQUESTED #n on the card by round-trip, setting its state line in the same put. Skip if you wrote the code, for merging (use tstack-merge-queue) and for production checks (use tstack-verify-production).
Ships in t-stack. 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.
Read when SKILL.md points to them.
The review is an independent verdict. The reviewer didn't write the code, doesn't take the evidence on trust, and checks the head that was handed over. Green CI and a confident summary are not a review. The tests must be shown to catch the defect, and the risky code must be read by a person or agent who wasn't its author.
A reviewer needs the card the handover names, not plan.md or the board. hq and --bot claude-code below are placeholders (tstack-router says how to fill them).
Find the card's current path, then read it in full: what it asked for, the decisions, the evidence and the handoff line. Note the PR and the head SHA it names. Open each image in the evidence and check it shows what the evidence claims, at the widths and themes the card names; a post's attached files come down with sfora attachments <post> --out <dir>. If an earlier ## Review section is on the card, this is a re-review: do the steps in ## Re-review below first.
sfora tasks hq --json --bot claude-code
sfora cat /projects/hq/board/03-in-progress/<card-file>.md --bot claude-code
Check the PR's head is the SHA on the card, see what it changes, and check it against master as it is now, not as it was at the branch point:
gh pr view <pr> --json headRefOid,baseRefName,mergeable
gh pr diff <pr> --name-only
git fetch origin
git merge-tree --write-tree origin/master <sha>
A different head means the evidence is for another commit. Review the head the card names, or send it back. mergeable only says the text merges. If master moved past the merge base, the merged tree is what lands: run the generated-file tests and the generators on it (references/scratch-review.md, "Current master"). On #851 both sides bumped the type census to 1919; git merged it clean and GitHub said MERGEABLE, yet the merged tree failed "is current" (it needed 1920).
Run the PR's tests in a scratch copy at the head. They must pass (references/scratch-review.md).
Swap master's non-test source in under the same tests. They must fail, and for the reason the card is about. Tests that pass on master prove nothing, with one exception: a test that pins a guard the PR doesn't change passes on master by design. Prove those with mutants (step 5) and say so in the verdict.
Make one exhaustive mutant pass over each guard the card rests on: auth, tenant, rate limit, dry run, privacy, a secret comparison, and whatever the card says must never happen. That includes guards outside the diff that the change relies on. Catalogue every mutant of the guard in one pass, not one per round: #851 took five review rounds because each round found one more survivor of the same 10-line sameSecret. How to catalogue, apply, check and judge mutants is in the implementer's mutants.md; what differs for a reviewer is in references/scratch-review.md, "Mutants".
Look beyond the diff. Find what else reads or depends on what changed: a JSON shape another client parses, a column a job reads, a flag, a generated file. Find the one fact the change is safe because of, and prove it by running code, not by argument (references/risky-code.md).
Read the risky code yourself, line by line: authorization, SSRF (redirects followed, DNS rebinding, private addresses), secrets in argv, logs, output or a custom header that a redirect would carry, and privacy. Tests can't prove "no redirect was followed".
Write the verdict on the card and set its state line, in one round-trip. Read the card again right before the put, not at step 1: the lead or the PM may have written since. Append your section, change only the **@agent_state:** line under the H1 (add it if it's missing), put, and read it back. The read-back check is in tstack-handoff.
sfora tasks hq --json --bot claude-code
sfora cat /projects/hq/board/03-in-progress/<card-file>.md --bot claude-code > card.md
sfora put /projects/hq/board/03-in-progress/<card-file>.md card.md --bot claude-code
sfora cat /projects/hq/board/03-in-progress/<card-file>.md --bot claude-code
The section and the state line, by verdict:
| Verdict line | State line |
|---|---|
CHANGES REQUESTED #854 (head ab12cd3) | changes requested (round 1, head ab12cd3). |
APPROVED #854 (head ab12cd3) | approved (PR #210, head ab12cd3). |
Your own captures go in the section the same way as the lead's: as inline images that sfora put uploads (evidence.md, "Screenshots").
The section's heading is ## Review (<role>, <date>, round N). Under it go what you checked, then numbered items (1, 2, …) that block and notes (N1, N2, …) that don't. The template is in references/scratch-review.md, "In the verdict".
If the card has a mission room, post the verdict line there once, then stop:
sfora chat <room> -m "<the verdict line, exactly as on the card>" --bot claude-code
With no room, the state line you set in step 8 is the handoff, and the PR's comments stand in for the room (tstack-router says this once). Post nothing else unless your brief asks for it. Stop.
Round 2 and later: the card has your earlier verdict and a new ## Evidence (lead, <date>, round N) section that answers it. Before any new work:
git diff <last-reviewed-sha> <sha>, and git log over the same range. Anything outside the items' scope gets the full steps 3–7.diff = for diff |=, a loop from 1) survived 3,298 tests. List every survivor of the round at once.references/scratch-review.md, "Current master").The verdict section gets the next round number, and so does the state line. A round is one handover and its review: the first review is round 1, and the lead's answer and the review after it are round 2 (evidence.md, "Rounds").
## Re-review).== ref <ref> = <sha>) names the head you review, and the changed files in the gate's copy match the head (cmp each against your head copy). Otherwise re-run the gate. Either way, the verdict says which you did.The card, the round, the head you reviewed and the master you checked it against, pass at head and fail on master (with counts), each mutant and its result, what you read and what you found, what you carried over and at which SHA, and the verdict and state lines as written on the card.
Detail: references/scratch-review.md, references/risky-code.md.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub wavyrai/sfora-skills --plugin t-stack28 skills in this plugin
/tstack-architectUse when a change is big enough that writing code first would fix the wrong shape: a new module, a new data model, a change to who owns some state, or a card whose design the owner must see. Sketch the caller's usage, the types and the signatures first, compare at least two shapes, put the chosen sketch on the card or a doc, then build against it and scrap it when it keeps fighting you. Skip for a one-file fix with an obvious shape (just build it, with tstack-tdd), and for comparing finished candidates (use tstack-arena)./tstack-arenaUse when one attempt at a non-trivial piece of work would fix the wrong shape: a contested design, an API, a tricky algorithm, a page of copy. Run two to four independent candidates on the same brief, have a separate judge score them against a written rubric, pick one as the base, graft the best parts of the others into it by hand, and verify the result. Covers the brief, the rubric, the judge and the synthesis note on the card. Skip for work with one obvious answer, and for splitting work into slices (use tstack-swarm)./tstack-benchmark-checklistUse before you report or act on a performance number you measured: a speedup or regression in a PR, a CI step's time, a job's duration, a choice between two libraries or settings. Seven questions to answer with evidence from runs: what limits it, was each side tuned, does it break physical limits, did it error, does it repeat, does it matter end to end, and did the work happen at all. Covers how to state the number on a card. Skip for numbers you didn't measure, and for finding the slow code in the first place (use tstack-how, then measure).