From 7b570bffad2c38fb2b92f0335e7aa2adaa98a5e9 Mon Sep 17 00:00:00 2001 From: Gunju Kim Date: Thu, 5 Mar 2026 12:03:05 +0000 Subject: [PATCH] Sync task templates with TaskSpawners and document tasks/ directory - Add missing triple-backtick fencing in fake-strategist-task.yaml to match kelos-fake-strategist.yaml TaskSpawner - Add inline comment in squash-commits-task.yaml explaining why it reuses the worker task name slot - Normalize YAML quoting for resource values in squash-commits-task.yaml to match the style used in all other self-development files - Add "One-Off Task Templates" section to README.md documenting the tasks/ directory, its contents, and the /squash-commits command Co-Authored-By: Claude Opus 4.6 --- self-development/README.md | 14 ++++++++++++++ self-development/tasks/fake-strategist-task.yaml | 2 ++ self-development/tasks/squash-commits-task.yaml | 12 +++++++----- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/self-development/README.md b/self-development/README.md index c2a891be..84bcbfeb 100644 --- a/self-development/README.md +++ b/self-development/README.md @@ -206,6 +206,20 @@ Creates GitHub issues for actionable improvements found. kubectl apply -f self-development/kelos-self-update.yaml ``` +## One-Off Task Templates + +The `tasks/` directory contains standalone Task definitions used by GitHub Actions workflows for manual or utility operations. Unlike TaskSpawner-created tasks, these are applied directly via `kubectl apply` from workflow YAML. + +### 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, allowing manual triggering outside the cron schedule. + +### 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-` to occupy the same slot as the worker task, preventing the TaskSpawner from re-spawning a conflicting worker during the squash operation. + ## Customizing for Your Repository To adapt these examples for your own repository: diff --git a/self-development/tasks/fake-strategist-task.yaml b/self-development/tasks/fake-strategist-task.yaml index 2ad290eb..b87766b1 100644 --- a/self-development/tasks/fake-strategist-task.yaml +++ b/self-development/tasks/fake-strategist-task.yaml @@ -59,7 +59,9 @@ spec: Actions: - Create a GitHub issue with your findings and proposals: + ``` gh issue create --title "" --body "<description>" --label generated-by-kelos + ``` - Do NOT create PRs. Only create issues - Prefer well-researched issues with clear proposals over broad, vague suggestions diff --git a/self-development/tasks/squash-commits-task.yaml b/self-development/tasks/squash-commits-task.yaml index 23555ab1..14544b94 100644 --- a/self-development/tasks/squash-commits-task.yaml +++ b/self-development/tasks/squash-commits-task.yaml @@ -1,6 +1,8 @@ apiVersion: kelos.dev/v1alpha1 kind: Task 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} labels: kelos.dev/type: squash-commits @@ -19,13 +21,13 @@ spec: podOverrides: resources: requests: - cpu: 250m - memory: 512Mi - ephemeral-storage: 4Gi + cpu: "250m" + memory: "512Mi" + ephemeral-storage: "4Gi" limits: cpu: "1" - memory: 2Gi - ephemeral-storage: 4Gi + memory: "2Gi" + ephemeral-storage: "4Gi" prompt: | You are a coding agent.