Skip to content

Workflow: Task templates drifted from TaskSpawners and undocumented in README #544

@kelos-bot

Description

@kelos-bot

🤖 Kelos Agent @gjkim42

Area: Task Template Maintenance

Summary

The self-development/tasks/ directory contains one-off Task definitions used by GitHub Actions workflows, but these templates have drifted from their TaskSpawner counterparts and are completely undocumented in the README. This creates maintenance risk as changes to TaskSpawners won't propagate to the corresponding task templates.

Findings

1. fake-strategist-task.yaml prompt drifted from its TaskSpawner

The fake-strategist-task.yaml prompt is missing the triple-backtick fencing around the gh issue create command that exists in kelos-fake-strategist.yaml.

TaskSpawner (kelos-fake-strategist.yaml, lines 64-66):

- Create a GitHub issue with your findings and proposals:
  ` ` `
  gh issue create --title "<title>" --body "<description>" --label generated-by-kelos
  ` ` `

Task template (tasks/fake-strategist-task.yaml, lines 62-63):

- Create a GitHub issue with your findings and proposals:
  gh issue create --title "<title>" --body "<description>" --label generated-by-kelos

While this is a cosmetic difference, it demonstrates that the files can drift independently. The TaskSpawner was updated (possibly during PR #469 or later) without propagating the change to the task template.

2. squash-commits-task.yaml uses misleading task name

squash-commits-task.yaml uses metadata.name: kelos-workers-${ISSUE_NUMBER}, which is intentional — it occupies the same name slot as the worker task to prevent the TaskSpawner from re-spawning a conflicting worker. However, this design decision is not documented anywhere. A developer unfamiliar with this pattern might:

  • Rename the task to something like kelos-squash-${ISSUE_NUMBER}, breaking the mutual exclusion
  • Be confused when debugging why a "worker" task has squash-commits behavior

3. squash-commits-task.yaml has YAML quoting inconsistency

Resource values under requests are unquoted in squash-commits-task.yaml but quoted in all other self-development YAML files:

# squash-commits-task.yaml (unquoted)
requests:
  cpu: 250m
  memory: 512Mi
  ephemeral-storage: 4Gi

# kelos-workers.yaml and all other files (quoted)
requests:
  cpu: "250m"
  memory: "512Mi"
  ephemeral-storage: "4Gi"

While semantically equivalent, this style inconsistency makes it harder to detect real drift via diff or automated checks.

4. README does not document the tasks/ directory or /squash-commits command

The README (self-development/README.md) documents:

  • All 5 TaskSpawners in detail
  • The /reset-worker command (in the kelos-workers section)

But it does not document:

  • The tasks/ directory and its purpose
  • The fake-strategist-task.yaml (used by run-fake-strategist.yaml workflow)
  • The squash-commits-task.yaml (used by squash-kelos-worker-commits.yaml workflow)
  • The /squash-commits command or how it works
  • The relationship between task templates and their TaskSpawner counterparts
  • The deliberate name-slot reuse pattern in squash-commits-task.yaml

The run-fake-strategist.yaml workflow (manual strategist trigger) and squash-kelos-worker-commits.yaml workflow both reference files in self-development/tasks/ but a reader of the README wouldn't know these exist.

5. No task templates exist for 3 TaskSpawners

Only 2 of 5 TaskSpawners have corresponding task templates:

TaskSpawner Task Template GitHub Actions Workflow
kelos-fake-strategist.yaml tasks/fake-strategist-task.yaml run-fake-strategist.yaml
kelos-workers.yaml tasks/squash-commits-task.yaml (utility) squash-kelos-worker-commits.yaml
kelos-triage.yaml None None
kelos-fake-user.yaml None None
kelos-self-update.yaml None None

This may be intentional (no workflow_dispatch use case exists for the missing ones), but it's worth noting for completeness. At minimum, a triage-task.yaml could be useful for manually re-triaging a stuck issue.

Proposed Changes

1. Sync fake-strategist-task.yaml prompt with TaskSpawner

Add the missing triple-backtick fencing to match kelos-fake-strategist.yaml.

2. Add inline comment to squash-commits-task.yaml explaining the name pattern

metadata:
  # Uses the same name as the worker task to prevent the TaskSpawner
  # from re-spawning a conflicting worker while squash is in progress.
  name: kelos-workers-${ISSUE_NUMBER}

3. Normalize YAML quoting in squash-commits-task.yaml

Quote resource request values to match the style used in all other self-development files.

4. Add tasks/ section to README.md

Document the tasks/ directory, its contents, the /squash-commits command, and the relationship between task templates and TaskSpawners. Suggested section:

## One-Off Task Templates

The `tasks/` directory contains standalone Task definitions used by GitHub Actions workflows for manual or utility operations:

### tasks/fake-strategist-task.yaml
Used by the `run-fake-strategist.yaml` workflow (`workflow_dispatch`). Creates a one-off strategist task identical to what the `kelos-fake-strategist` TaskSpawner would create.

### tasks/squash-commits-task.yaml
Used by the `squash-kelos-worker-commits.yaml` workflow. Triggered by the `/squash-commits` command on a PR. Rebases and squashes all commits on the PR branch into a single commit.

**Important:** This task deliberately uses the name `kelos-workers-<ISSUE_NUMBER>` to occupy the same slot as the worker task, preventing the TaskSpawner from re-spawning a conflicting worker during the squash operation.

Related Issues

/kind cleanup

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