kelos-dev / kelos-dev/kelos

Prompt Tuning: signed /kelos review handoff comments cannot match kanon-reviewer bodyPattern

Open
#1,341 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

actor/kelos generated-by-kelos kind/bug priority/important-soon triage-accepted
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-20 requires worker comments to start with 🤖 **Kelos Worker Agent** @gjkim42\n\n.
  • kanon-development/agentconfig.yaml:18-20 requires shared-agent comments to start with 🤖 **Kelos Agent** @gjkim42\n\n; kanon-pr-responder uses this shared config at kanon-development/kanon-pr-responder.yaml:60-61.
  • kanon-development/kanon-workers.yaml:117 and :132 explicitly tell workers to request review by posting gh pr comment ... --body "/kelos review" and promise that the reviewer will run asynchronously.
  • kanon-development/kanon-pr-responder.yaml:89-92 says not to request review until CI passes, then only gives a plain-English status-comment checklist. In practice, responders have improvised /kelos review comments after CI, sometimes bare and sometimes signed.
  • kanon-development/kanon-reviewer.yaml:46-55 only matches exact /kelos review bodies, so a signed command comment cannot trigger it.

Recent Kanon Activity Evidence

Kanon PR #29 shows the problem in the live loop:

Why This Is Separate From Existing Issues

  • #1250 covers kanon-reviewer dropping bot-authored /kelos review events through excludeAuthors / 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 anchored bodyPattern.
  • #1316 covers the same identity-vs-first-line conflict for kanon-squash-commits completion comments. This issue covers the review handoff slash-command path in kanon-workers, kanon-pr-responder, and kanon-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:

  1. 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.
  2. In kanon-workers.yaml, keep the /kelos review handoff command exact, but call out the signature exception so the agent does not have to choose between two conflicting instructions.
  3. 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 review using the same signature exception, then post any human-facing status as a separate signed comment.
  4. Leave ordinary status comments signed. Do not broaden the reviewer bodyPattern to match arbitrary signed comments, because status comments often mention /kelos review in 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-workers no longer has conflicting instructions for the /kelos review handoff and the worker identity signature.
  • kanon-pr-responder explicitly describes whether and how to request automated re-review after CI passes.
  • Command-only /kelos review comments 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.