π€ Kelos Self-Update Agent @gjkim42
Area: Configuration Alignment
Summary
PR #1081 (merged 2026-05-01) added a first-class commentOn field to GitHubWebhookFilter so spawner authors can scope issue_comment events to plain issues (Issue) or pull requests (PullRequest). Two webhook-driven TaskSpawners β kelos-workers and kelos-pr-responder β already adopted it. Three more (kelos-planner, kelos-reviewer, kelos-squash-commits) still rely on prompt-side workarounds or have no guard at all. This is the follow-up cleanup explicitly deferred by #1081's PR description ("Spawner-prompt cleanups [β¦] are intentionally out of scope per the issue and will follow as separate PRs.").
Findings
1. kelos-planner.yaml β filter accepts both, prompt has a stale step-0 guard
kelos-planner.yaml lines 33β43 lack commentOn on either filter:
- event: issue_comment
action: created
bodyContains: /kelos plan
state: open
author: gjkim42
- event: issue_comment
action: created
bodyContains: /kelos plan
state: open
author: kelos-bot[bot]
kelos-planner.yaml lines 86β88 then bail at runtime:
### 0. Confirm the target is an issue
If `gh pr view {{.Number}}` succeeds, this comment was posted on a pull request.
Exit without posting anything in that case.
Every PR comment containing /kelos plan (e.g., a maintainer asking the planner to plan against a PR's open question) spawns a full Opus task that consumes credentials only to exit at step 0. The README documents this spawner as "Webhook: issue comment /kelos plan" β the implementation should match.
Proposed fix:
- Add
commentOn: Issue to both filter entries.
- Delete the
### 0. Confirm the target is an issue block (lines 84β88) β the filter now enforces it.
2. kelos-reviewer.yaml β filter accepts both, prompt has no guard (supersedes #1060)
kelos-reviewer.yaml lines 47β56 (the issue_comment filter entries) lack commentOn:
- event: issue_comment
action: created
bodyContains: /kelos review
state: open
author: gjkim42
- event: issue_comment
action: created
bodyContains: /kelos review
state: open
author: kelos-bot[bot]
The prompt then unconditionally assumes a PR (lines 92β104, 118, 125, 227): gh pr view, git diff origin/main...HEAD, gh pr review. If /kelos review is posted on a plain issue, the agent burns a full Opus task that can only fail or hallucinate a "PR review" comment. branch: "{{.Branch}}" (line 89) also resolves to empty for plain-issue comments per the README template-variable table.
This was previously tracked in #1060, which proposed a step-0 prompt guard plus a safer branch fallback. The new commentOn filter is a strictly better solution β it stops the spawn at the webhook layer instead of at runtime, mirroring the pattern already established by kelos-workers and kelos-pr-responder.
Proposed fix:
3. kelos-squash-commits.yaml β filter accepts both, prompt is PR-only
kelos-squash-commits.yaml lines 13β17 lack commentOn:
- event: issue_comment
action: created
bodyContains: /kelos squash-commits
state: open
author: gjkim42
The prompt is entirely PR-focused (git rebase origin/main, git push --force-with-lease, gh pr view, gh pr edit, gh pr ... comment). A /kelos squash-commits posted on a plain issue spawns a Sonnet task that fails at step 4 (gh pr view {{.Number}} --json body) and may post a confusing comment.
Proposed fix:
- Add
commentOn: PullRequest to the issue_comment filter entry. The pull_request_review entry is already PR-only by event type.
Why this is consistent
| TaskSpawner |
Documented intent |
commentOn today |
Proposed |
| kelos-workers |
issues only |
Issue β
|
(already done) |
| kelos-pr-responder |
PRs only |
PullRequest β
|
(already done) |
| kelos-planner |
issues only |
(none) β |
Issue |
| kelos-reviewer |
PRs only |
(none) β |
PullRequest |
| kelos-squash-commits |
PRs only |
(none) β |
PullRequest |
| kelos-api-reviewer |
both intentionally |
(none, by design) |
leave as-is β runtime dispatch is the documented behavior |
After this change, every webhook-driven TaskSpawner whose intent is single-subject uses the filter to enforce that intent, and prompt-side gh pr view guards exist only in kelos-api-reviewer where they reflect deliberate dual-mode dispatch.
Impact
Not covered by existing issues
π€ Kelos Self-Update Agent @gjkim42
Area: Configuration Alignment
Summary
PR #1081 (merged 2026-05-01) added a first-class
commentOnfield toGitHubWebhookFilterso spawner authors can scopeissue_commentevents to plain issues (Issue) or pull requests (PullRequest). Two webhook-driven TaskSpawners βkelos-workersandkelos-pr-responderβ already adopted it. Three more (kelos-planner,kelos-reviewer,kelos-squash-commits) still rely on prompt-side workarounds or have no guard at all. This is the follow-up cleanup explicitly deferred by #1081's PR description ("Spawner-prompt cleanups [β¦] are intentionally out of scope per the issue and will follow as separate PRs.").Findings
1.
kelos-planner.yamlβ filter accepts both, prompt has a stale step-0 guardkelos-planner.yamllines 33β43 lackcommentOnon either filter:kelos-planner.yamllines 86β88 then bail at runtime:Every PR comment containing
/kelos plan(e.g., a maintainer asking the planner to plan against a PR's open question) spawns a full Opus task that consumes credentials only to exit at step 0. The README documents this spawner as "Webhook: issue comment/kelos plan" β the implementation should match.Proposed fix:
commentOn: Issueto both filter entries.### 0. Confirm the target is an issueblock (lines 84β88) β the filter now enforces it.2.
kelos-reviewer.yamlβ filter accepts both, prompt has no guard (supersedes #1060)kelos-reviewer.yamllines 47β56 (theissue_commentfilter entries) lackcommentOn:The prompt then unconditionally assumes a PR (lines 92β104, 118, 125, 227):
gh pr view,git diff origin/main...HEAD,gh pr review. If/kelos reviewis posted on a plain issue, the agent burns a full Opus task that can only fail or hallucinate a "PR review" comment.branch: "{{.Branch}}"(line 89) also resolves to empty for plain-issue comments per the README template-variable table.This was previously tracked in #1060, which proposed a step-0 prompt guard plus a safer
branchfallback. The newcommentOnfilter is a strictly better solution β it stops the spawn at the webhook layer instead of at runtime, mirroring the pattern already established bykelos-workersandkelos-pr-responder.Proposed fix:
commentOn: PullRequestto bothissue_commentfilter entries.branch: "{{.Branch}}"template and the missing prompt guard from Configuration Alignment: kelos-reviewer accepts /kelos review on plain issues β missing PR-vs-issue guard and unsafe branch templateΒ #1060 become moot β the filter guarantees.Branchis a PR head branch. Close Configuration Alignment: kelos-reviewer accepts /kelos review on plain issues β missing PR-vs-issue guard and unsafe branch templateΒ #1060 as superseded.3.
kelos-squash-commits.yamlβ filter accepts both, prompt is PR-onlykelos-squash-commits.yamllines 13β17 lackcommentOn:The prompt is entirely PR-focused (
git rebase origin/main,git push --force-with-lease,gh pr view,gh pr edit,gh pr ... comment). A/kelos squash-commitsposted on a plain issue spawns a Sonnet task that fails at step 4 (gh pr view {{.Number}} --json body) and may post a confusing comment.Proposed fix:
commentOn: PullRequestto theissue_commentfilter entry. Thepull_request_reviewentry is already PR-only by event type.Why this is consistent
commentOntodayIssueβPullRequestβIssuePullRequestPullRequestAfter this change, every webhook-driven TaskSpawner whose intent is single-subject uses the filter to enforce that intent, and prompt-side
gh pr viewguards exist only inkelos-api-reviewerwhere they reflect deliberate dual-mode dispatch.Impact
/kelos plan,/kelos review, or/kelos squash-commitscomment burns an Opus or Sonnet task to bail at step 0. Filter rejection is free.kelos-planner(its step 0 guard).kelos-planner, deleting one stale step-0 block.Not covered by existing issues
kelos-bot[bot]author missing on squash-commits; pr-responder review filter missing author restriction; identity collisions on sharedkelos-dev-agent). Does not mentioncommentOnor PR-vs-issue scoping.kelos-revieweronly, with a now-outdated proposed fix (step-0 prompt guard + saferbranchfallback). This issue supersedes Configuration Alignment: kelos-reviewer accepts /kelos review on plain issues β missing PR-vs-issue guard and unsafe branch templateΒ #1060's proposed approach with the cleaner filter-layer fix and broadens the scope to two more spawners with the same root cause.commentOnfield; explicitly deferred this cleanup.