harness: claude
prompt: zstack: review the diff on branch feature/tags
exit: 0  seconds: 46
skill tool calls: zstack
zstack files read: SKILL.md, playbooks/review.md, references/principles
---
This is a dry run, so I've only read files: the `review` playbook, the five principle files it cites, the harness notes and the diff stats. The diff from `main...feature/tags` is small, with 4 insertions and 3 deletions across `acme_notes/cli.py` and `acme_notes/store.py`.

```
Route: review, shape: inline, principles: evidence-before-the-word, empty-check-fails, report-the-guard, secrets-stay-in-process, fix-the-class
```

The playbook prefers one background subagent working in its own worktree. I'm running it inline because this session has no subagent tool, and the playbook allows inline when the reviewer didn't write the change, which I didn't.

## Todo list (playbook steps, word for word)

1. Get the diff with git access in a worktree of the branch (`gh pr checkout <n>` or `git diff <base>...<head>`). A review without the diff in hand returns no verdict.
2. Write down the head sha being reviewed. For a delta review, review only `git diff <last-reviewed>..<head>`.
3. Run `<zstack dir>/scripts/classify.sh --pr <n>` (or `--base <base>`). If the class is `solo`, confirm the PR carries the `hold` label.
4. If the diff touches auth, permissions, secrets, payments, crypto, input parsing at a trust boundary or infrastructure, and the `ship-secure` skill is installed, hand that part to it and include its findings. Without it, review those parts against the checklist in step 6 with extra care.
5. Read the change against its stated intent: does it do what the ticket says, and only that?
6. Check, in this order: correctness (edge cases, error paths, off-by-one, nulls), check-then-write races on money or permissions (a concurrency test must exist), data shape and migrations, security (input handling, secrets in code or logs, authorization on every new path), tests (they fail without the change, and the count is non-zero), and readability.
7. Run the repo-wide guard tests and the area's tests yourself and record them: `<zstack dir>/scripts/zcheck.sh --name <check> -- <command>`. Check the PR's own claims against the records with `<zstack dir>/scripts/zcheck.sh --list <head sha>`.
8. Write findings by severity: blocker, major, minor, nit. Each has `path:line`, what is wrong, why it matters, and a suggested fix.
9. Give one verdict, exactly one of: `PASS`, `CHANGES NEEDED`, `FIX FIRST`. `FIX FIRST` means a blocker that must be fixed before anything else is reviewed; `CHANGES NEEDED` means majors or minors to address.
10. Post the review on the PR (`gh pr review <n> --comment --body-file <file>`), naming the head sha the verdict applies to. A later push needs a new verdict for the new commits. *Likely skipped:* this is a local branch with no PR yet, so the verdict will go in chat unless you want a PR opened.

**For you to decide:** I don't have a ticket or description saying what `feature/tags` is meant to do. Step 5 depends on one. If there isn't one, I'll take the intent from the commit messages and say that's what I did.

## How the principles shape the review

- **evidence-before-the-word:** the review won't say "passing" unless a check is recorded at the head sha.
- **empty-check-fails:** a test run that collects zero tests counts as a finding, not a pass.
- **report-the-guard:** any change in the diff that weakens a guard or limit is a blocker.
- **secrets-stay-in-process:** any secret committed or logged in the diff is a blocker.
- **fix-the-class:** for each defect found, I'll search the same diff for others like it.

Plan mode asked me to save this plan to `~/.claude/plans/…`, but the write failed because that directory doesn't exist, so the plan is only in this reply. I've stopped before editing any files or running checks.
