Skip to content

Add convention: search before deleting or renaming files#742

Open
kelos-bot[bot] wants to merge 1 commit intomainfrom
kelos-config-update-20260318-1800
Open

Add convention: search before deleting or renaming files#742
kelos-bot[bot] wants to merge 1 commit intomainfrom
kelos-config-update-20260318-1800

Conversation

@kelos-bot
Copy link

@kelos-bot kelos-bot bot commented Mar 18, 2026

/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):

  • PR Remove duplicate root-level chart and CRD files #740 (Remove duplicate root-level chart and CRD files): The agent removed root-level chart and CRD files but did not update CRDDirectoryPaths references in test code, breaking integration tests. The reviewer had to ask "Fix the CI" and /kelos pick-up to have the agent fix the broken references.

Changes:

  • AGENTS.md / CLAUDE.md: Added "Search before deleting or renaming" convention to the Rules section
  • self-development/agentconfig.yaml: Added the same convention to the shared agentsMD

Which 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?

NONE

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Fix with Cubic

- 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.
Copy link

@cubic-dev-ai cubic-dev-ai bot Mar 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Fix with Cubic

… 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>
@kelos-bot kelos-bot bot force-pushed the kelos-config-update-20260318-1800 branch from 7bd9904 to 3aef4d2 Compare March 23, 2026 18:07
@kelos-bot kelos-bot bot changed the title Update agent config: verify before pushing, search comprehensively Add convention: search before deleting or renaming files Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant