Skip to content

Workflow Completeness: self-development README Customizing section uses deprecated bodyContains and omits commentOn/excludeAuthors/author/draft #1131

@kelos-bot

Description

@kelos-bot

🤖 Kelos Self-Update Agent @gjkim42

Area: Workflow Completeness

Summary

self-development/README.md is the canonical reference for users adapting the self-development patterns to their own repositories. The "Customizing for Your Repository" section's only webhook-filter example still uses the deprecated bodyContains field and silently omits every modern filter field that the actual TaskSpawners depend on (bodyPattern, commentOn, excludeAuthors, author, draft, excludeBodyPatterns). A user who copies the example verbatim ends up with the now-deprecated configuration shape and has no visibility into the safety filters every shipped spawner uses.

This is distinct from the existing open README issues:

So self-development/README.md is the last bodyContains survivor in this directory and it stands as a direct contradiction of every TaskSpawner sitting next to it.

Findings

1. Deprecated bodyContains in the only filter example (line 407)

self-development/README.md lines 397–410:

spec:
  when:
    githubWebhook:
      repository: your-org/your-repo
      events: [issue_comment]
      filters:
        - event: issue_comment
          action: created
          bodyContains: /kelos pick-up   # <-- deprecated
          labels: [your-label]
          state: open

The Kelos API marks bodyContains deprecated in favor of bodyPattern (api/v1alpha1/taskspawner_types.go:433-438):

// BodyContains filters by case-sensitive substring match on the
// comment/review body.
// Deprecated: use BodyPattern instead, which supports regex.

All six webhook-driven TaskSpawners in this directory now use bodyPattern after #1127. The verifier holds:

$ grep -c bodyContains self-development/*.yaml
self-development/kelos-api-reviewer.yaml:0
self-development/kelos-config-update.yaml:0
self-development/kelos-fake-strategist.yaml:0
self-development/kelos-fake-user.yaml:0
self-development/kelos-image-update.yaml:0
self-development/kelos-planner.yaml:0
self-development/kelos-pr-responder.yaml:0
self-development/kelos-reviewer.yaml:0
self-development/kelos-self-update.yaml:0
self-development/kelos-squash-commits.yaml:0
self-development/kelos-triage.yaml:0
self-development/kelos-workers.yaml:0
$ grep -c bodyPattern self-development/README.md
0

The example is the only bodyContains reference left in self-development/.

2. Filter fields used by every spawner are absent from the README

The Customizing section's example presents only three filter fields (bodyContains, labels, state). The shipped TaskSpawners rely on five more — none of which are documented anywhere in self-development/README.md:

Field Used by Purpose actually served
excludeAuthors (top-level under githubWebhook) api-reviewer, planner, pr-responder, reviewer, workers Filter out the agent's own bot comments (kelos-bot[bot]) — prevents trigger loops. Added by PR #1100 to break the self-development loop.
commentOn pr-responder (PullRequest), workers (Issue) Scopes issue_comment events to issues only or PRs only; GitHub fires issue_comment for both. Critical for keeping planner/workers off PRs and pr-responder off issues.
author api-reviewer, planner, pr-responder, reviewer, squash-commits, workers (gjkim42) Restricts triggers to maintainer-authored comments — the actual maintainer-approval gate.
draft pr-responder (draft: false) Skips draft PRs.
excludeBodyPatterns (not yet used, but available since #1081 era) Regex exclusion list — paired with bodyPattern.

A reader of the README who copies the example will:

  1. Use a now-deprecated field, generating no warning but cementing technical debt.
  2. Have no maintainer-author gate, so any GitHub user posting /kelos pick-up can fan out an Opus task on their repo.
  3. Have no excludeAuthors exclusion, so as soon as the spawned agent comments /kelos pick-up-like text (e.g., echoing a maintainer's comment), the spawner will re-trigger.
  4. Have no commentOn, so /kelos pick-up on a PR comment will trigger a spawner that was meant for issues (or vice versa).

Items 2 and 3 in particular are the same hardening problems the self-development pipeline itself has had to address over the last quarter (#1098/#1100 for excludeAuthors, #1080/#1081 for commentOn, the maintainer-author gates introduced piecemeal).

3. The Customizing section does not point users at the more complete reference

docs/reference.md documents the full GitHubWebhookFilter field set (modulo #1095 / #1120 deprecation-notice gaps already filed). The README's Customizing section does not link to docs/reference.md or any other authoritative source, so a user reading only self-development/README.md has no path to the unfiltered field list.

Proposed Fix

  1. Replace bodyContains: /kelos pick-up on line 407 with bodyPattern: /kelos pick-up and add a one-line comment noting that bodyContains is deprecated.

  2. Extend the example to show excludeAuthors (top-level under githubWebhook) and the per-filter fields commentOn, author, and draft — using values consistent with the shipped spawners. A representative example:

    spec:
      when:
        githubWebhook:
          repository: your-org/your-repo
          excludeAuthors:
            - your-bot[bot]            # avoid self-trigger loops
          events: [issue_comment]
          filters:
            - event: issue_comment
              action: created
              bodyPattern: /kelos pick-up
              commentOn: Issue          # or PullRequest, depending on spawner
              author: your-maintainer   # maintainer-approval gate
              labels: [your-label]
              state: open
  3. Add a short prose paragraph (or a new bullet under "Update the webhook repository and filters") summarising the field set with one-line descriptions, and link to docs/reference.md#githubwebhookfilter for the canonical reference. Mirror the wording style of the existing "template variables" prose so the section stays consistent.

  4. Optional but recommended: add excludeBodyPatterns to the documented set with a one-line mention so users discover the regex-exclusion option that pairs with bodyPattern.

Verification

Once fixed:

$ grep -c bodyContains self-development/README.md
0
$ grep -E 'bodyPattern|commentOn|excludeAuthors|author:|draft:' self-development/README.md | wc -l
# should be > 0

Not covered by existing issues

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions