Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 45 additions & 22 deletions .claude/commands/address-feedback.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .claude/commands/continue-plan.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .claude/commands/finish-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Finish the plan whose work is already pushed or merged: retire `PLAN.md`, bring

Extra instructions (may be empty): $ARGUMENTS

1. Read the state: run `pwsh -NoProfile -File .template/Get-PlanState.ps1` from the repository root, adding `-Path <folder>` when the plan is in another folder. It fetches `origin` and prints `key: value` lines; `-` means none. Below, `<default branch>` is its `default` value and `<plan's branch>` its `branch` value. When `dirty` is `yes`, stop and list the files `git status --porcelain` prints. When `steps` isn't `-` and its two counts differ, as in `3/5`, stop and list the step headings in `PLAN.md` that don't start with `### [x]`. When `unfiled` is above 0 and the `landing` line's `follow-ups` isn't `none`, stop: the `## Follow-ups` section of `PLAN.md` lists follow-ups that were never filed as issues. List those lines, and say to run ship-plan, which files them, then finish-plan again.
1. Read the state: run `pwsh -NoProfile -File .template/Get-PlanState.ps1` from the repository root, adding `-Path <folder>` when the plan is in another folder. It fetches `origin` and prints `key: value` lines; `-` means none. Below, `<default branch>` is its `default` value and `<plan's branch>` its `branch` value. When `dirty` is `yes`, stop and list the files `git status --porcelain` prints. When `feedback` isn't `-`, stop: the plan belongs to a stopped `/address-feedback` run on pull request `<feedback>`, and `/address-feedback <feedback>` finishes it, or discards it once that pull request is merged or closed. When `steps` isn't `-` and its two counts differ, as in `3/5`, stop and list the step headings in `PLAN.md` that don't start with `### [x]`. When `unfiled` is above 0 and the `landing` line's `follow-ups` isn't `none`, stop: the `## Follow-ups` section of `PLAN.md` lists follow-ups that were never filed as issues. List those lines, and say to run ship-plan, which files them, then finish-plan again.
2. Check the work is upstream: the check passed when `landed` is `yes`. The script counts the branch as landed when `HEAD` is on `origin/<default branch>`, or when `gh` or `glab` finds a merged pull request from it whose merge commit is on `origin/<default branch>` and whose head holds `HEAD` or has the same tree, as a squash merge or a merge queue leaves it. When `ahead` isn't `0`, it landed the second way: name the pull request on the `pr` line. When `default` is `-`, stop: there is no `origin` remote. Otherwise — no such pull request, or `pr` is `unknown` because the CLI is missing or failed — show `git log --oneline origin/<default branch>..HEAD` and stop to ask me whether to push those commits first or whether they reached the default branch another way.
3. Retire the plan: delete `PLAN.md` when it exists.
4. Fast-forward the default branch: run `git switch <default branch>`, then `git pull --ff-only`. When either fails, stop and report the error.
Expand Down
14 changes: 9 additions & 5 deletions .claude/commands/handoff-plan.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .claude/commands/orchestrate-plan.md

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions .claude/commands/plan-bugfix.md

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions .claude/commands/plan-docs.md

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions .claude/commands/plan-feature.md

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions .claude/commands/plan-issue.md

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions .claude/commands/plan-migration.md

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions .claude/commands/plan-performance.md

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions .claude/commands/plan-refactor.md

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions .claude/commands/plan-security.md

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions .claude/commands/plan-template-update.md

Large diffs are not rendered by default.

14 changes: 9 additions & 5 deletions .claude/commands/plan-tests.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .claude/commands/replan-step.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .claude/commands/review-plan-diff.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ If empty, use `git merge-base HEAD origin/<default>`, where `<default>` is the d
1. Read `PLAN.md`: Goal, Decisions, Out of scope, Steps and Review checklist.
2. Read the full diff (`git diff <base>` including uncommitted changes) and the changed files in full where context matters.
3. Check every step was done as written: the right files, the right behavior, and no shortcuts such as skipped or weakened tests, swallowed errors, hard-coded values or leftover TODOs. Flag every deviation from the step text as at least should-fix even when its checks pass — creating something the step said already exists, touching files the step doesn't list, or changing an interface — because a deviation means the executor improvised instead of escalating.
4. Check what the Done-when commands can't: edge cases, error handling, security, performance, API compatibility, and each Review checklist item.
4. Check what the Done-when commands can't: edge cases, error handling, security, performance, API compatibility, and each Review checklist item. In a pre-release project, which `pwsh -NoProfile -File .template/Get-PlanState.ps1` shows as `pre-release: yes`, also check that every text the plan wrote, the changelog included, describes the product as it is, with no `**Breaking:**` label, no conventional-commit `!` marker or `BREAKING CHANGE:` footer in a commit message or the pull request's title, no wording set against an earlier state, no migration note and no compatibility shim, as ADR-0015 says, and that the changelog keeps `## [Unreleased]` a catalog under `### Added` and `### Security` alone.
5. Run the test suite and the checks listed under Context for the executor, after its `- Prelude:` command, when it has one, dot-sourced in the same PowerShell: `$global:LASTEXITCODE = 0; try { . <prelude> } catch { $_; "prelude failed"; exit 2 }; if (-not $? -or $LASTEXITCODE) { "prelude failed"; exit 2 }; <the command>`, where `<prelude>` is that line's command. When it exits 2 and the output's last line, apart from any exit code your shell adds, is `prelude failed`, the command never ran: stop the review without adding steps or a `Reviewed:` line, show me the prelude's error, and say to fix the `- prelude:` line in the `## Landing` section of `AGENTS.md`, or the script it names, and the plan's `- Prelude:` line.
6. Report findings as a table: severity (blocker, should-fix, nit), file and line, problem, fix.
7. For every blocker and should-fix, append a new step to the end of the Steps section of `PLAN.md`, numbered in sequence and in the same format as the existing steps (`### [ ] N. …` with Files, Change and a Done-when command), so the executor model can fix it. Delete any `Reviewed:` line from `PLAN.md`. Work this plan shouldn't do but someone would plan as its own task, such as a separate defect or gap, goes under a `## Follow-ups` heading at the end of `PLAN.md`, one line each as `<short title>: <what to change, where, and why it matters>`, which `/ship-plan` files as an issue; add the heading when it's missing. A nit, a style preference or an idea for someday goes in your reply, not in `PLAN.md`. Change nothing else in the repository.
8. When the review found no blocker or should-fix, record it: put `Reviewed: <the commit git rev-parse HEAD prints>` on its own line among the lines under the plan's title, after `Issue:`, `Release:` and `Refs:`, replacing any `Reviewed:` line there. `/ship-plan` lands only work that matches the reviewed commit, so any later change needs another review. Then say the plan is done, and give the next command: `/ship-plan`, which lands it as `AGENTS.md`'s Landing section says. When `PLAN.md` has an `Issue:` line, also say that the pull request description gets one `Closes <issue reference>` line per issue on it, one `Refs <issue reference>` line per reference on its `Refs:` line, and a two-to-five-line summary of the plan's steps and Decisions, which `/ship-plan` writes.
8. When the review found no blocker or should-fix, record it: put `Reviewed: <the commit git rev-parse HEAD prints>` on its own line among the lines under the plan's title, after `Issue:`, `Release:` and `Refs:`, or after `Pull request:` and `Start:` in an `/address-feedback` run's plan, replacing any `Reviewed:` line there. `/ship-plan` lands only work that matches the reviewed commit, so any later change needs another review. Then say the plan is done, and give the next command: `/ship-plan`, which lands it as `AGENTS.md`'s Landing section says. For a plan with a `Pull request:` line, an `/address-feedback` run's, give `/address-feedback <its number>` instead, which pushes the work to that pull request's branch and replies to its items. When `PLAN.md` has an `Issue:` line, also say that the pull request description gets one `Closes <issue reference>` line per issue on it, one `Refs <issue reference>` line per reference on its `Refs:` line, and a two-to-five-line summary of the plan's steps and Decisions, which `/ship-plan` writes.
9. When the review added fix steps, give the next command instead: `/orchestrate-plan`.
Loading
Loading