From 09b28cbe2b331508b74c070d0cfed653af49d29f Mon Sep 17 00:00:00 2001 From: Gunju Kim Date: Sun, 24 May 2026 01:21:17 +0000 Subject: [PATCH] self-development: scope webhook-driven spawners with commentOn Add the commentOn filter (introduced in #1081) to the three remaining webhook-driven TaskSpawners so each declares its intended subject at the filter layer instead of relying on prompt-side workarounds: - kelos-planner: add commentOn: Issue and drop the now-redundant step-0 prompt block that exited if the target was a PR. - kelos-reviewer: add commentOn: PullRequest to the issue_comment filter so /kelos review on a plain issue no longer spawns a task whose prompt unconditionally runs gh pr view and git diff. - kelos-api-reviewer: split the issue_comment filter into two entries with explicit commentOn: Issue and commentOn: PullRequest. This spawner is intentionally dual-mode (the prompt dispatches on gh pr view to handle both subjects), so two explicit filters make the dual-mode intent visible at the webhook layer. Co-Authored-By: Claude Opus 4.7 --- self-development/kelos-api-reviewer.yaml | 7 +++++++ self-development/kelos-planner.yaml | 5 +---- self-development/kelos-reviewer.yaml | 1 + 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/self-development/kelos-api-reviewer.yaml b/self-development/kelos-api-reviewer.yaml index b0de1afe0..d8d5de049 100644 --- a/self-development/kelos-api-reviewer.yaml +++ b/self-development/kelos-api-reviewer.yaml @@ -50,6 +50,13 @@ spec: - event: issue_comment action: created bodyPattern: /kelos api-review + commentOn: Issue + state: open + author: gjkim42 + - event: issue_comment + action: created + bodyPattern: /kelos api-review + commentOn: PullRequest state: open author: gjkim42 - event: pull_request_review diff --git a/self-development/kelos-planner.yaml b/self-development/kelos-planner.yaml index fe0ecb1d3..2f5736953 100644 --- a/self-development/kelos-planner.yaml +++ b/self-development/kelos-planner.yaml @@ -36,6 +36,7 @@ spec: - event: issue_comment action: created bodyPattern: /kelos plan + commentOn: Issue state: open author: gjkim42 reporting: @@ -80,10 +81,6 @@ spec: ## Your tasks - ### 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. - ### 1. Refresh issue context Re-read the latest issue state and all comments: `gh issue view {{.Number}} --comments` diff --git a/self-development/kelos-reviewer.yaml b/self-development/kelos-reviewer.yaml index 33330b87f..0ef1aa953 100644 --- a/self-development/kelos-reviewer.yaml +++ b/self-development/kelos-reviewer.yaml @@ -49,6 +49,7 @@ spec: - event: issue_comment action: created bodyPattern: /kelos review + commentOn: PullRequest state: open author: gjkim42 - event: pull_request_review