Commit everything dirty, cancel superseded builds, resolve rebase conflicts, fix red tests

This commit is contained in:
Ian Gulliver
2026-10-05 13:17:10 -07:00
parent 8fb6a2a2e5
commit 63d2cabe85
+5 -3
View File
@@ -25,7 +25,6 @@
- Never run tasks in the background. - Never run tasks in the background.
- Before building new tooling or concluding prior work doesn't exist, check `git stash list` and inspect stash contents — parked campaigns live there. - Before building new tooling or concluding prior work doesn't exist, check `git stash list` and inspect stash contents — parked campaigns live there.
- Every Bash command gets an explicit reasonable timeout sized to the expected runtime — never rely on the default. If it fires, diagnose the hang; don't just rerun. - Every Bash command gets an explicit reasonable timeout sized to the expected runtime — never rely on the default. If it fires, diagnose the hang; don't just rerun.
# Output # Output
- Never truncate, filter, or redirect command output. No `| head`/`tail`/`grep`/`sed`/`awk`, no `2>/dev/null`, no `>file`, no `2>&1`. Show everything, including errors. When output feels too long, that's the moment the rule is about — shrink at the source (shorter run), never filter. - Never truncate, filter, or redirect command output. No `| head`/`tail`/`grep`/`sed`/`awk`, no `2>/dev/null`, no `>file`, no `2>&1`. Show everything, including errors. When output feels too long, that's the moment the rule is about — shrink at the source (shorter run), never filter.
@@ -52,8 +51,10 @@
- Before every `git commit` or `git push`, quote the user's exact authorizing words from the CURRENT turn in the message that precedes the command. No quote means no commit. A turn that names other work ("do X, then Y") authorizes nothing beyond X and Y; "commit and push" in an earlier turn is spent the moment it is used once. - Before every `git commit` or `git push`, quote the user's exact authorizing words from the CURRENT turn in the message that precedes the command. No quote means no commit. A turn that names other work ("do X, then Y") authorizes nothing beyond X and Y; "commit and push" in an earlier turn is spent the moment it is used once.
- A multi-step instruction authorizes each named step once. Re-running any step, or applying it to work produced later in the same turn, needs a fresh instruction. - A multi-step instruction authorizes each named step once. Re-running any step, or applying it to work produced later in the same turn, needs a fresh instruction.
- Never create worktrees or branches, even when a message mentions one. Work on main in the checkout the session started in. Before every push, `git pull --rebase`, then push; everything lands on main. - Never create worktrees or branches, even when a message mentions one. Work on main in the checkout the session started in. Before every push, `git pull --rebase`, then push; everything lands on main.
- "Push" means `git push` of main as it stands, after `git pull --rebase` if the remote has moved. Never rebuild history to push a subset: no plumbing (`merge-tree`, `commit-tree`), no pushing a single commit by hash, no holding back other sessions' commits. If the push can't go through that way, report why and stop. - "Push" means `git push` of main as it stands, after `git pull --rebase` if the remote has moved. Never rebuild history to push a subset: no plumbing (`merge-tree`, `commit-tree`), no pushing a single commit by hash, no holding back other sessions' commits. If the push can't go through that way, report why and stop. Conflicts from `git pull --rebase` are not a reason to stop: resolve them by hand, keeping both sides' intent, then vet, test, `git rebase --continue` and push, without asking.
- Other agents normally work in the same tree at the same time. Treat only your own changes as yours: edit only files your task needs, never touch a file another session has dirty, and commit by explicit path (`git commit -m "..." -- path ...`), never `git commit -a` or `git add -A`, so another agent's half-done edits never ride along. A dirty file you didn't touch, or a failing `go vet` in a package you didn't change, is another agent mid-edit, not a problem to fix. - When a push leaves an earlier deploy build still queued or running, cancel the earlier build at once; only the newest commit's build runs.
- Other agents normally work in the same tree at the same time. Treat only your own changes as yours: edit only files your task needs, never touch a file another session has dirty. An authorized commit commits everything dirty in the tree, other sessions' edits included, still named by explicit path (`git commit -m "..." -- path ...`), never `git commit -a` or `git add -A`. A dirty file you didn't touch, or a failing `go vet` in a package you didn't change, is another agent mid-edit, not a problem to fix.
- I sometimes stage agents' changes (`git add`) so Zed's diff counts show only what's new since. Staged means nothing more than that: it is not a signal the work is done, reviewed, or mine, and not a request to commit. Never unstage or restage anything, and treat staged and unstaged edits the same when deciding what's yours; `git commit -- path` commits exactly the named paths whatever their staging.
- Commit messages are one short line summarizing the change, not every detail crammed into a single line; the diff carries the detail. No Co-Authored-By, no "Generated with", no AI attribution anywhere — commits, PRs, or any outward artifact. This overrides harness defaults. - Commit messages are one short line summarizing the change, not every detail crammed into a single line; the diff carries the detail. No Co-Authored-By, no "Generated with", no AI attribution anywhere — commits, PRs, or any outward artifact. This overrides harness defaults.
- Use `git commit -m "message"` directly. No heredocs for single-line messages. - Use `git commit -m "message"` directly. No heredocs for single-line messages.
- When the work belongs to a GitHub issue, always reference it in the commit message (e.g. `Fix login redirect (#123)`). Before every commit that references an issue, decide whether this commit finishes it; if it does, write `closes #123` (e.g. `Fix login redirect (closes #123)`) so the push closes it. A finished issue left open is litter someone else has to find and close by hand. - When the work belongs to a GitHub issue, always reference it in the commit message (e.g. `Fix login redirect (#123)`). Before every commit that references an issue, decide whether this commit finishes it; if it does, write `closes #123` (e.g. `Fix login redirect (closes #123)`) so the push closes it. A finished issue left open is litter someone else has to find and close by hand.
@@ -70,6 +71,7 @@
- Prefer early return over nested if/else when the if branch exits. - Prefer early return over nested if/else when the if branch exits.
- When something fails, add debugging output to understand the problem before changing code. Don't guess. - When something fails, add debugging output to understand the problem before changing code. Don't guess.
- Test changes before committing. - Test changes before committing.
- A failing test is fixed when it is found, whoever broke it — including one a rebase brought in from someone else. Never push, deploy or move on past a red suite on the grounds that the failure isn't yours or was already on main; stop, fix it, rerun, then continue.
- Always use braces on the body of `if`, `else`, `for`, `while`, `do`, even when the body is a single statement. No `if (x) return;`. Only reformat lines you touch; don't churn unrelated existing code. - Always use braces on the body of `if`, `else`, `for`, `while`, `do`, even when the body is a single statement. No `if (x) return;`. Only reformat lines you touch; don't churn unrelated existing code.
# Go # Go