Prompt Tuning: signed /kelos review handoff comments cannot match kanon-reviewer bodyPattern
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 331
- Forks
- 40
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 70
Description
🤖 Kelos Agent @gjkim42
Area
Prompt Tuning for kanon-development/.
Summary
Kanon's PR handoff prompts depend on command-only /kelos review comments, but the shared identity instructions require issue/PR comments to start with a signature. Those two rules are incompatible with kanon-reviewer's anchored webhook pattern:
bodyPattern: '^\s*/kelos review\s*$'
If an agent follows the identity rule, the signed comment no longer matches the reviewer trigger. If it posts a bare slash command, it violates the AgentConfig identity rule. Recent Kanon PR activity shows both outcomes, which makes the worker/responder → reviewer handoff brittle even after the existing bot-author filter issue is fixed.
Config Evidence
kanon-development/kanon-workers.yaml:18-20requires worker comments to start with🤖 **Kelos Worker Agent** @gjkim42\n\n.kanon-development/agentconfig.yaml:18-20requires shared-agent comments to start with🤖 **Kelos Agent** @gjkim42\n\n;kanon-pr-responderuses this shared config atkanon-development/kanon-pr-responder.yaml:60-61.kanon-development/kanon-workers.yaml:117and:132explicitly tell workers to request review by postinggh pr comment ... --body "/kelos review"and promise that the reviewer will run asynchronously.kanon-development/kanon-pr-responder.yaml:89-92says not to request review until CI passes, then only gives a plain-English status-comment checklist. In practice, responders have improvised/kelos reviewcomments after CI, sometimes bare and sometimes signed.kanon-development/kanon-reviewer.yaml:46-55only matches exact/kelos reviewbodies, so a signed command comment cannot trigger it.
Recent Kanon Activity Evidence
Kanon PR #29 shows the problem in the live loop:
-
The bot posted exact, unsigned
/kelos reviewcomments on PR #29, for example https://github.com/kelos-dev/kanon/pull/29#issuecomment-4609333845 and https://github.com/kelos-dev/kanon/pull/29#issuecomment-4613372121. These match the command shape but violate the identity rule. -
Later in the same PR, the bot posted a signed command comment: https://github.com/kelos-dev/kanon/pull/29#issuecomment-4622511601
🤖 **Kelos Agent** @gjkim42 /kelos reviewThat satisfies the identity rule but cannot match
^\s*/kelos review\s*$. -
The following status comment says the agent expected the handoff to run but no new automated review task appeared: https://github.com/kelos-dev/kanon/pull/29#issuecomment-4622523302
Why This Is Separate From Existing Issues
- #1250 covers
kanon-reviewerdropping bot-authored/kelos reviewevents throughexcludeAuthors/author: gjkim42. This issue is the next prompt/body-shape problem: even after bot-authored events are admitted, signed command comments still will not match the anchoredbodyPattern. - #1316 covers the same identity-vs-first-line conflict for
kanon-squash-commitscompletion comments. This issue covers the review handoff slash-command path inkanon-workers,kanon-pr-responder, andkanon-reviewer. - #1313 covers reviewer verdict fallback after the reviewer task runs. This issue is about getting the reviewer task spawned reliably.
Proposal
Pick one explicit convention for automation trigger comments and encode it in the Kanon prompts. The minimal, safer option is:
- Add a narrow exception to the relevant Kanon AgentConfig instructions: command-only comments whose sole purpose is to trigger another TaskSpawner are exempt from the normal signature prefix.
- In
kanon-workers.yaml, keep the/kelos reviewhandoff command exact, but call out the signature exception so the agent does not have to choose between two conflicting instructions. - In
kanon-pr-responder.yaml, add an explicit post-CI handoff step: when the PR is ready for automated re-review, post a command-only comment whose body is exactly/kelos reviewusing the same signature exception, then post any human-facing status as a separate signed comment. - Leave ordinary status comments signed. Do not broaden the reviewer
bodyPatternto match arbitrary signed comments, because status comments often mention/kelos reviewin prose and should not accidentally retrigger the reviewer.
Suggested wording for the exception:
Exception: when posting a slash-command comment solely to trigger another TaskSpawner (for example `/kelos review`), the comment body must be exactly the command text and must not include the signature prefix. Post any human-facing explanation as a separate signed status comment.
Acceptance Criteria
kanon-workersno longer has conflicting instructions for the/kelos reviewhandoff and the worker identity signature.kanon-pr-responderexplicitly describes whether and how to request automated re-review after CI passes.- Command-only
/kelos reviewcomments are documented as a narrow signature exception, while normal issue/PR status comments remain signed. - The change stays limited to files under
kanon-development/.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with kanon-development/kanon-workers.yaml, agentconfig.yaml, kanon-pr-responder.yaml, and kanon-reviewer.yaml, comparing the signature instructions with the exact /kelos review bodyPattern. Review the linked Kanon PR activity for the observed handoff behavior. Done means the relevant prompts consistently document the narrow command-only exception, preserve signed status comments, and limit changes to kanon-development/.
Written by the indexing model from the issue text.
Assessment
- Domain
- ai, tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100