Add convention: search before deleting or renaming files#742
Open
kelos-bot[bot] wants to merge 1 commit intomainfrom
Open
Add convention: search before deleting or renaming files#742kelos-bot[bot] wants to merge 1 commit intomainfrom
kelos-bot[bot] wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
2 issues found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="self-development/kelos-pr-responder.yaml">
<violation number="1" location="self-development/kelos-pr-responder.yaml:89">
P2: The re-review loop allows commit/push after new changes without rerunning `make verify`/`make test`, so subsequent pushes can bypass the new local verification requirement.</violation>
</file>
<file name="self-development/kelos-workers.yaml">
<violation number="1" location="self-development/kelos-workers.yaml:121">
P2: The no-PR flow can lose verification fixes: it asks to fix failures after committing, then immediately pushes without requiring those fixes to be committed.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| - 8. Make sure the PR passes all CI tests. | ||
| - 5. Run `make verify` and `make test` locally to catch issues before pushing. Fix any failures. | ||
| - 6. Commit and push your changes to origin {{.Branch}}. | ||
| - 7. /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. |
There was a problem hiding this comment.
P2: The re-review loop allows commit/push after new changes without rerunning make verify/make test, so subsequent pushes can bypass the new local verification requirement.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At self-development/kelos-pr-responder.yaml, line 89:
<comment>The re-review loop allows commit/push after new changes without rerunning `make verify`/`make test`, so subsequent pushes can bypass the new local verification requirement.</comment>
<file context>
@@ -84,10 +84,11 @@ spec:
- - 8. Make sure the PR passes all CI tests.
+ - 5. Run `make verify` and `make test` locally to catch issues before pushing. Fix any failures.
+ - 6. Commit and push your changes to origin {{.Branch}}.
+ - 7. /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.
+ - 8. 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 #123` or `Closes #123`). 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). If `KELOS_UPSTREAM_REPO` is set, include `--repo "$KELOS_UPSTREAM_REPO"`.
+ - 9. Make sure the PR passes all CI tests.
</file context>
Suggested change
| - 7. /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. | |
| - 7. /review the PR to verify your changes address the feedback. If changes are needed, make them, run `make verify` and `make test`, then commit and push, then /review again. Repeat until the review passes. |
self-development/kelos-workers.yaml
Outdated
| - 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. | ||
| - 4b. Run `make verify` and `make test` locally to catch issues before pushing. Fix any failures. |
There was a problem hiding this comment.
P2: The no-PR flow can lose verification fixes: it asks to fix failures after committing, then immediately pushes without requiring those fixes to be committed.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At self-development/kelos-workers.yaml, line 121:
<comment>The no-PR flow can lose verification fixes: it asks to fix failures after committing, then immediately pushes without requiring those fixes to be committed.</comment>
<file context>
@@ -115,10 +118,11 @@ spec:
- - 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.
+ - 4b. Run `make verify` and `make test` locally to catch issues before pushing. Fix any failures.
+ - 5b. Push your branch to origin kelos-task-{{.Number}}.
+ - 6b. 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.
</file context>
Suggested change
| - 4b. Run `make verify` and `make test` locally to catch issues before pushing. Fix any failures. | |
| - 4b. Run `make verify` and `make test` locally to catch issues before pushing. Fix any failures, and commit (or amend) those fixes before pushing. |
… files Agents that remove, move, or rename files must search the entire codebase for references (including tests, configs, and documentation) and update them before pushing. This prevents broken CI from stale references. Motivated by review feedback on PR #740 where the agent deleted root-level chart and CRD files without updating test infrastructure references, breaking integration tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
7bd9904 to
3aef4d2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
/kind cleanup
What this PR does / why we need it:
Adds a new project convention requiring agents to search the entire codebase for all references before deleting, moving, or renaming files. This includes test infrastructure, configs, and documentation.
Motivation (PR review evidence):
CRDDirectoryPathsreferences in test code, breaking integration tests. The reviewer had to ask "Fix the CI" and/kelos pick-upto have the agent fix the broken references.Changes:
AGENTS.md/CLAUDE.md: Added "Search before deleting or renaming" convention to the Rules sectionself-development/agentconfig.yaml: Added the same convention to the shared agentsMDWhich issue(s) this PR is related to:
N/A
Special notes for your reviewer:
This PR was rebased on main (which includes PR #748's changes). The previous version of this PR also proposed "verify before pushing" and "search comprehensively" conventions, but those have been narrowed down to just the file-deletion reference search, which is the most clearly evidence-backed pattern.
Does this PR introduce a user-facing change?