fix(prompts): clarify worktree commits aren't auto-commits

This commit is contained in:
mika kuns
2026-08-05 20:42:45 +02:00
parent bdee731376
commit a7d95a000a
2 changed files with 28 additions and 1 deletions
+11 -1
View File
@@ -260,6 +260,13 @@ public static class PromptFiles
- Before claiming done, verify: run the build and relevant tests, confirm they - Before claiming done, verify: run the build and relevant tests, confirm they
pass, and report what you ran. If you couldn't verify something, say so plainly. pass, and report what you ran. If you couldn't verify something, say so plainly.
- Make focused commits using the repository's existing commit-message convention. - Make focused commits using the repository's existing commit-message convention.
You are on this task's own branch in its own worktree a commit here is the
deliverable, not an unrequested auto-commit; a rule against auto-committing
protects `main` and shared checkouts, neither of which is this. Still never
push, never commit on `main`, and never `git add -A` or a bare `git commit`
in a checkout other sessions share.
- Report the real outcome, including the commit SHA if you made one. Don't say
no commit was made when there was.
## Safety ## Safety
- Never force-push, hard-reset, or delete branches/files beyond the task's scope - Never force-push, hard-reset, or delete branches/files beyond the task's scope
@@ -298,7 +305,10 @@ public static class PromptFiles
- Touch as few files as possible. Do not restructure unrelated code. - Touch as few files as possible. Do not restructure unrelated code.
- Do NOT file further improvements improvements are one layer deep. - Do NOT file further improvements improvements are one layer deep.
- Verify the build and relevant tests before finishing, and report what you ran. - Verify the build and relevant tests before finishing, and report what you ran.
- Make one focused commit using the repository's commit-message convention. - Make one focused commit in this task's own worktree using the repository's
commit-message convention that commit is the deliverable, not an unrequested auto-commit.
Report the real outcome, including the commit SHA; don't say no commit was
made when there was.
"""; """;
private const string PlanningSystemDefault = """ private const string PlanningSystemDefault = """
@@ -21,4 +21,21 @@ public class SystemPromptTests
Assert.Contains("follow-up", prompt, StringComparison.OrdinalIgnoreCase); Assert.Contains("follow-up", prompt, StringComparison.OrdinalIgnoreCase);
Assert.Contains("nothing more", prompt, StringComparison.OrdinalIgnoreCase); Assert.Contains("nothing more", prompt, StringComparison.OrdinalIgnoreCase);
} }
[Fact]
public void SystemDefault_clarifies_worktree_commit_is_not_auto_commit()
{
var prompt = PromptFiles.DefaultFor(PromptKind.System);
Assert.Contains("not an unrequested auto-commit", prompt);
Assert.Contains("never commit on `main`", prompt);
Assert.Contains("commit SHA", prompt);
}
[Fact]
public void ImprovementChildDefault_clarifies_worktree_commit_is_not_auto_commit()
{
var prompt = PromptFiles.DefaultFor(PromptKind.ImprovementChild);
Assert.Contains("not an unrequested auto-commit", prompt);
Assert.Contains("commit SHA", prompt);
}
} }