Local-model commits carry Co-Authored-By: <model> <agent@wntrmute.dev>

Owner's rule. The implementer often cannot know which model it is, so
run-plan.sh derives the name from OPENCODE_MODEL (the part after the
provider), gives the exact trailer and the Model column's value in the
session prompt, and stops the run when a task's commit lacks that exact
line. AGENTS.md replaces the old Implemented-By trailer and the "owner
fills in the model" rule.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-09-26 00:10:00 -07:00
co-authored by Claude Opus 5.5
parent cc04b3923b
commit f98ec2a908
2 changed files with 17 additions and 7 deletions
+5 -3
View File
@@ -97,8 +97,10 @@ Useful while working: `cargo test -p <crate> --test <file>` runs one test file,
- Work on the branch the task names. One task is one commit. - Work on the branch the task names. One task is one commit.
- Stage only the paths the task lists: `git add <path> ...`. Never `git add -A` or `git add .`. - Stage only the paths the task lists: `git add <path> ...`. Never `git add -A` or `git add .`.
- Never push, amend, rebase, reset, or switch to another branch. - Never push, amend, rebase, reset, or switch to another branch.
- Commit message: the subject line the task gives, a blank line, then this trailer: - Commit message: the subject line the task gives, a blank line, then the `Co-Authored-By` line
`Implemented-By: OpenCode session (model recorded in docs/implementer-log.md)` your session prompt gives, exactly, for example
`Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>`. If the prompt gives none, stop and
report.
## The implementer log ## The implementer log
@@ -115,4 +117,4 @@ bad one.
| First gate | `pass` or `fail` for the first run | | First gate | `pass` or `fail` for the first run |
| Deviations | Anything you did that the task did not say, or `none` | | Deviations | Anything you did that the task did not say, or `none` |
| Notes | Problems you hit and how you solved them, in one or two sentences | | Notes | Problems you hit and how you solved them, in one or two sentences |
| Model | Write `?`. The owner fills this in. | | Model | The model name your session prompt gives (as in the `Co-Authored-By` line), or `?` if it gives none. |
+12 -4
View File
@@ -5,7 +5,9 @@
# #
# Usage: tools/run-plan.sh docs/plans/M2a [FIRST] FIRST is a task number such as 04 # Usage: tools/run-plan.sh docs/plans/M2a [FIRST] FIRST is a task number such as 04
# Options (environment): # Options (environment):
# OPENCODE_MODEL model to use (default straylight/laguna-s-2.1; OpenCode's own default differs) # OPENCODE_MODEL model to use (default straylight/laguna-s-2.1; OpenCode's own default differs).
# The part after the provider (`ornith-1.5-35b-a3b`) names the model in each
# commit's `Co-Authored-By: <model> <agent@wntrmute.dev>` trailer and in the log.
# OPENCODE_FLAGS extra flags for `opencode run`, for example "--pure" or "--auto" # OPENCODE_FLAGS extra flags for `opencode run`, for example "--pure" or "--auto"
# DRY_RUN=1 print what would be run and stop # DRY_RUN=1 print what would be run and stop
set -eu set -eu
@@ -13,6 +15,8 @@ set -eu
plan="${1:?usage: tools/run-plan.sh docs/plans/<milestone> [FIRST]}" plan="${1:?usage: tools/run-plan.sh docs/plans/<milestone> [FIRST]}"
first="${2:-00}" first="${2:-00}"
model="${OPENCODE_MODEL:-straylight/laguna-s-2.1}" model="${OPENCODE_MODEL:-straylight/laguna-s-2.1}"
agent="${model##*/}"
trailer="Co-Authored-By: $agent <agent@wntrmute.dev>"
log=docs/implementer-log.md log=docs/implementer-log.md
milestone=$(basename "$plan") milestone=$(basename "$plan")
runs=".state/runs/$milestone" runs=".state/runs/$milestone"
@@ -25,7 +29,7 @@ for task in "$plan"/[0-9][0-9]-*.md; do
name=$(basename "$task" .md) name=$(basename "$task" .md)
number=$(echo "$name" | cut -c1-2) number=$(echo "$name" | cut -c1-2)
[ "$number" -ge "$first" ] || continue [ "$number" -ge "$first" ] || continue
prompt="Read \`$task\` and do exactly that task." prompt="Read \`$task\` and do exactly that task. You are $agent: write $agent in the log row's Model column, and end the commit message with this line, exactly: $trailer"
if [ "${DRY_RUN:-0}" = 1 ]; then if [ "${DRY_RUN:-0}" = 1 ]; then
echo "opencode run -m $model ${OPENCODE_FLAGS:-} --title $milestone/$name \"$prompt\"" echo "opencode run -m $model ${OPENCODE_FLAGS:-} --title $milestone/$name \"$prompt\""
@@ -47,8 +51,8 @@ for task in "$plan"/[0-9][0-9]-*.md; do
fi fi
echo "=== $milestone/$name: session ended $(date '+%H:%M:%S')" echo "=== $milestone/$name: session ended $(date '+%H:%M:%S')"
# The task must have left exactly what AGENTS.md asks for: a commit, a clean tree, and a # The task must have left exactly what AGENTS.md asks for: a commit carrying the trailer, a
# `done` row in the log. Anything else needs a person, so stop. # clean tree, and a `done` row in the log. Anything else needs a person, so stop.
if [ "$(git rev-parse HEAD)" = "$before" ]; then if [ "$(git rev-parse HEAD)" = "$before" ]; then
echo "run-plan: $name made no commit; stopping" >&2 echo "run-plan: $name made no commit; stopping" >&2
exit 1 exit 1
@@ -57,6 +61,10 @@ for task in "$plan"/[0-9][0-9]-*.md; do
echo "run-plan: $name left uncommitted changes; stopping" >&2 echo "run-plan: $name left uncommitted changes; stopping" >&2
exit 1 exit 1
fi fi
if ! git log -1 --format=%B | grep -qxF "$trailer"; then
echo "run-plan: $name's commit lacks the line '$trailer'; stopping" >&2
exit 1
fi
if ! grep -Eq "^\| *$milestone/$name *\|[^|]*\| *done *\|" "$log"; then if ! grep -Eq "^\| *$milestone/$name *\|[^|]*\| *done *\|" "$log"; then
echo "run-plan: no 'done' row for $milestone/$name in $log; stopping" >&2 echo "run-plan: no 'done' row for $milestone/$name in $log; stopping" >&2
grep -E "^\| *$milestone/$name *\|" "$log" >&2 || true grep -E "^\| *$milestone/$name *\|" "$log" >&2 || true