feat(sandcastle): open PRs for human review instead of self-merging #8

Merged
weiwen merged 1 commit from sandcastle/issue-7 into main 2026-07-05 03:07:10 +08:00
Owner

Closes #7

What changed

The .sandcastle loop no longer self-merges. Each completed issue is pushed and opened as a PR labelled ready-for-human; the originating issue moves ready-for-agentin-review so the planner stops re-picking it. A human reviews and squash-merges.

Changes

  • main.mts: deleted Phase 3 (combined merge agent + branch-list plumbing); folded a per-issue pr-opener into Phase 2, after the reviewer, only when the implementer produced commits.
  • pr-prompt.md (new): idempotency guard → token-HTTPS push → tea pulls create with Closes #<id> → label PR ready-for-human → relabel issue ready-for-agentin-review (last, so a failure leaves the issue retryable).
  • plan-prompt.md: planner now filters --labels ready-for-agent, excluding in-review.
  • merge-prompt.md: deleted.
  • docs: triage-labels.md gains the in-review row; issue-tracker.md gains PR-creation conventions.

Dogfood note

This PR was opened by running the new pr-prompt.md sequence by hand — it is the workflow's first artifact.

Follow-up (out of band)

Set the repo's default merge style to squash.

Closes #7 ## What changed The `.sandcastle` loop no longer self-merges. Each completed issue is pushed and opened as a PR labelled `ready-for-human`; the originating issue moves `ready-for-agent` → `in-review` so the planner stops re-picking it. A human reviews and squash-merges. ## Changes - **`main.mts`**: deleted Phase 3 (combined merge agent + branch-list plumbing); folded a per-issue `pr-opener` into Phase 2, after the reviewer, only when the implementer produced commits. - **`pr-prompt.md`** (new): idempotency guard → token-HTTPS push → `tea pulls create` with `Closes #<id>` → label PR `ready-for-human` → relabel issue `ready-for-agent`→`in-review` (last, so a failure leaves the issue retryable). - **`plan-prompt.md`**: planner now filters `--labels ready-for-agent`, excluding `in-review`. - **`merge-prompt.md`**: deleted. - **docs**: `triage-labels.md` gains the `in-review` row; `issue-tracker.md` gains PR-creation conventions. ## Dogfood note This PR was opened by running the new `pr-prompt.md` sequence by hand — it is the workflow's first artifact. ## Follow-up (out of band) Set the repo's default merge style to **squash**.
The loop no longer self-merges completed branches. Each completed issue is
pushed and opened as a PR labelled ready-for-human; the issue moves
ready-for-agent -> in-review so the planner stops re-picking it. A human
reviews and squash-merges.

- main.mts: delete Phase 3 merge; fold a per-issue pr-opener into Phase 2
- pr-prompt.md: new; idempotent push + tea pulls create + label handoff
- plan-prompt.md: planner filters --labels ready-for-agent
- docs: add in-review label + PR-creation conventions

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
weiwen merged commit dc437883f1 into main 2026-07-05 03:07:10 +08:00
weiwen deleted branch sandcastle/issue-7 2026-07-05 03:07:10 +08:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
weiwen/evie!8
No description provided.