Address review: fresh base, named review target, round cap, Gitea API
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
82ba704957
commit
962c1aa9a1
1 file changed
+21
-6
@@ -14,12 +14,27 @@ A tiny zero-dependency Node.js todo CLI, used as a sandbox for trying Claude Cod
|
|||||||
|
|
||||||
## Workflow (required)
|
## Workflow (required)
|
||||||
Never commit, merge, or push to `main`. Only a human (Christian) merges into `main`.
|
Never commit, merge, or push to `main`. Only a human (Christian) merges into `main`.
|
||||||
1. Branch off an up-to-date `main` before any change: `git switch -c <type>/<short-name>` (e.g. `fix/duplicate-ids`, `docs/readme`).
|
This is also enforced outside this file: Gitea branch protection on `main` and a deny rule in `.claude/settings.json`.
|
||||||
2. Commit on that branch; run `npm test` before pushing.
|
1. Start every change from a fresh `main`: `git fetch origin && git switch -c <type>/<short-name> origin/main` (e.g. `fix/duplicate-ids`, `docs/readme`).
|
||||||
3. Push the branch and open a PR against `main`.
|
2. Commit on that branch; run `npm test` before every push.
|
||||||
4. Run `/code-review` on the PR branch.
|
3. Push the branch and open a PR against `main` (see "Gitea API" below).
|
||||||
5. Post the result as a PR comment that starts with either **Approved** or **Needs fixes**, followed by the findings. If it needs fixes, fix them on the same branch, push, and repeat steps 4–5.
|
4. Review it with `/code-review <branch>`. Always name the branch: with no target, the review diffs against the just-pushed upstream and sees nothing.
|
||||||
6. Stop there. Do not merge the PR, even if approved — tell the human it's ready.
|
5. Post the result as a PR comment. Its first line is **Approved** or **Needs fixes**, its second is `_Automated self-review by Claude; not an independent review._`, then the findings.
|
||||||
|
6. If it needs fixes, fix the correctness findings on the same branch and repeat steps 2–5. At most 2 fix rounds: after that, post what's left and hand off to the human.
|
||||||
|
7. Stop there. Do not merge the PR, even if approved; tell the human it's ready.
|
||||||
|
|
||||||
|
### Gitea API
|
||||||
|
No `gh`/`tea`: use `curl` with `$GITEA_TOKEN` (set in the git-ignored `.claude/settings.local.json`). If it's unset, stop and ask the human; don't work around it.
|
||||||
|
```sh
|
||||||
|
API=https://code.westerkam.org/api/v1/repos/christian/claude-playground
|
||||||
|
# Open a PR
|
||||||
|
jq -n --arg head "$BRANCH" --arg title "$TITLE" --arg body "$BODY" '{head:$head, base:"main", title:$title, body:$body}' \
|
||||||
|
| curl -s -X POST -H "Authorization: token $GITEA_TOKEN" -H "Content-Type: application/json" -d @- "$API/pulls"
|
||||||
|
# Comment on PR number $N
|
||||||
|
jq -n --rawfile body comment.md '{body:$body}' \
|
||||||
|
| curl -s -X POST -H "Authorization: token $GITEA_TOKEN" -H "Content-Type: application/json" -d @- "$API/issues/$N/comments"
|
||||||
|
```
|
||||||
|
Run `git commit` and `git push` as standalone commands (no `cd … &&` prefix): only then do they run outside the sandbox, which commit signing needs.
|
||||||
|
|
||||||
## Remote
|
## Remote
|
||||||
Gitea at code.westerkam.org — `origin` = `git@code.westerkam.org:christian/claude-playground.git`.
|
Gitea at code.westerkam.org — `origin` = `git@code.westerkam.org:christian/claude-playground.git`.
|
||||||
Reference in new issue
Block a user