From 747736b1f2529d71ca4d91b6e24b51c3b7849c11 Mon Sep 17 00:00:00 2001 From: Gunju Kim Date: Sun, 8 Mar 2026 18:10:20 +0000 Subject: [PATCH] Add self-review and commit hygiene instructions to workers prompt Replace non-functional "/review" slash command references with explicit self-review instructions that tell agents to read their own diff. Add commit squashing and rebase verification guidance to prevent the recurring reviewer feedback about stale patches and messy commit history. Co-Authored-By: Claude Opus 4.6 --- self-development/kelos-workers.yaml | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/self-development/kelos-workers.yaml b/self-development/kelos-workers.yaml index 57e6040..d7f96bc 100644 --- a/self-development/kelos-workers.yaml +++ b/self-development/kelos-workers.yaml @@ -98,7 +98,7 @@ spec: - 3a. Read the existing diff (git diff main...HEAD) to understand what has already been done. Do NOT start over or rewrite from scratch. - 4a. Make only the incremental changes needed to address review feedback or remaining issues. Preserve existing work. - 5a. Commit and push your changes to origin kelos-task-{{.Number}}. - - 6a. /review the PR to verify your changes address the feedback. If changes are needed, make them, commit and push, then /review again. Repeat until the review passes. + - 6a. Self-review your changes: run `git diff origin/main...HEAD` and read the full diff to verify correctness, check for unintended changes, and ensure the diff only contains changes relevant to the task. Fix any issues you find, then commit and push again. Do NOT post "/review" as a PR comment — it does not trigger anything. - 7a. Update the PR title and description to reflect the final diff. The PR body MUST contain a standard closing keyword reference on its own line (e.g., `Fixes #{{.Number}}` or `Closes #{{.Number}}`). Do not embed the issue number in natural language. Ensure the PR has labels "generated-by-kelos" and "ok-to-test" (use `gh pr edit {{.Number}} --add-label generated-by-kelos --add-label ok-to-test` if missing). - 8a. Make sure the PR passes all CI tests. @@ -110,9 +110,14 @@ spec: - Only implement what the issue explicitly asks for. If you discover related improvements, create separate issues for them. - 3b. Create a commit that fixes the issue. - 4b. Push your branch to origin kelos-task-{{.Number}}. - - 5b. Create a PR with labels "generated-by-kelos" and "ok-to-test" (use `gh pr create --label generated-by-kelos --label ok-to-test`), then /review it. If changes are needed, make them, commit and push, then /review again. Repeat until the review passes. - - 6b. Update the PR title and description to reflect the final diff. The PR body MUST contain a standard closing keyword reference on its own line (e.g., `Fixes #{{.Number}}` or `Closes #{{.Number}}`). Do not embed the issue number in natural language. - - 7b. Make sure the PR passes all CI tests. + - 5b. Create a PR with labels "generated-by-kelos" and "ok-to-test" (use `gh pr create --label generated-by-kelos --label ok-to-test`). + - 6b. Self-review your changes: run `git diff origin/main...HEAD` and read the full diff to verify correctness, check for unintended changes, and ensure the diff only contains changes relevant to the task. Fix any issues you find, then commit and push again. Do NOT post "/review" as a PR comment — it does not trigger anything. + - 7b. Update the PR title and description to reflect the final diff. The PR body MUST contain a standard closing keyword reference on its own line (e.g., `Fixes #{{.Number}}` or `Closes #{{.Number}}`). Do not embed the issue number in natural language. + - 8b. Make sure the PR passes all CI tests. + + Commit hygiene: + - Before your final push, squash your commits into a single clean commit with a descriptive message. Reviewers will request this if you don't. + - After rebasing on origin/main, verify your diff (`git diff origin/main...HEAD`) only contains changes relevant to the task. If you see unrelated patches, your rebase picked up stale changes — reset and redo. Post-checklist: - Add kelos/needs-input label to the issue (gh issue edit {{.Number}} --add-label kelos/needs-input) and leave a comment for the reason if any of the following applies: