From 0a1b31d636d0708975aece6559fea7ac95ffc207 Mon Sep 17 00:00:00 2001 From: Gunju Kim Date: Mon, 16 Feb 2026 05:59:09 +0000 Subject: [PATCH] Add issue triage TaskSpawner to self-development workflow Add axon-triage.yaml that automates the issue triage bottleneck by watching for issues labeled needs-triage and applying appropriate kind/*, priority/*, and actor/* labels. This closes the gap between issue creation and agent pickup in the self-development pipeline. Co-Authored-By: Claude Opus 4.6 --- self-development/README.md | 23 ++++++ self-development/axon-triage.yaml | 116 ++++++++++++++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100644 self-development/axon-triage.yaml diff --git a/self-development/README.md b/self-development/README.md index 1d604b5f..2d0255d0 100644 --- a/self-development/README.md +++ b/self-development/README.md @@ -5,6 +5,7 @@ This directory contains real-world orchestration patterns used by the Axon proje ## Overview These TaskSpawners demonstrate how to orchestrate fully autonomous AI workers that: +- Triage incoming issues with appropriate labels - Monitor GitHub issues - Investigate and fix problems - Create or update pull requests @@ -130,6 +131,28 @@ kubectl get taskspawner axon-workers -o yaml kubectl logs -l job-name= -f ``` +### axon-triage.yaml + +This TaskSpawner automatically triages new GitHub issues by reading their content and applying appropriate labels (`kind/*`, `priority/*`, `actor/*`, `triage-accepted`). + +**Key features:** +- Watches issues labeled `needs-triage` (applied automatically by the label workflow) +- Reads the issue body, comments, and codebase to determine appropriate labels +- Applies `kind/*`, `priority/*`, and `actor/*` labels based on decision guidelines +- Marks issues as `triage-accepted` when done, which removes `needs-triage` automatically +- Falls back to `axon/needs-input` when the issue is ambiguous +- Uses a cheaper model (sonnet) since triage doesn't require code generation + +**Deploy:** +```bash +kubectl apply -f self-development/axon-triage.yaml +``` + +**How it fits in the pipeline:** +``` +Issue created → label.yaml adds needs-triage → axon-triage labels it → axon-workers picks it up (if actor/axon) +``` + ### axon-fake-user.yaml This TaskSpawner runs daily to test the developer experience as if you were a new user. diff --git a/self-development/axon-triage.yaml b/self-development/axon-triage.yaml new file mode 100644 index 00000000..5c700117 --- /dev/null +++ b/self-development/axon-triage.yaml @@ -0,0 +1,116 @@ +apiVersion: axon.io/v1alpha1 +kind: TaskSpawner +metadata: + name: axon-triage +spec: + when: + githubIssues: + labels: + - needs-triage + excludeLabels: + - triage-accepted + - axon/needs-input + maxConcurrency: 1 + taskTemplate: + workspaceRef: + name: axon-agent + model: sonnet + type: claude-code + ttlSecondsAfterFinished: 600 + credentials: + type: oauth + secretRef: + name: axon-credentials + podOverrides: + resources: + requests: + cpu: "250m" + memory: "512Mi" + ephemeral-storage: "2Gi" + limits: + cpu: "1" + memory: "2Gi" + ephemeral-storage: "2Gi" + agentConfigRef: + name: axon-dev-agent + promptTemplate: | + You are an issue triage agent for the Axon project — a Kubernetes-native controller that runs autonomous AI coding agents. + Your job is to read a newly filed issue and apply the correct labels so it can be routed to the right workflow. + + Issue to triage: #{{.Number}} + Title: {{.Title}} + URL: {{.URL}} + Filed by: (see issue metadata) + Current labels: {{.Labels}} + + Issue body: + {{.Body}} + + Comments: + {{.Comments}} + + ## Label taxonomy + + You must determine and apply ONE label from each of the following categories: + + ### Kind (exactly one required) + - `kind/bug` — Something is broken or behaving incorrectly + - `kind/feature` — A new capability or enhancement + - `kind/api` — A change to CRD types or the Kubernetes API surface (often combined with kind/feature) + - `kind/docs` — Documentation improvement or addition + + ### Priority (exactly one required) + - `priority/critical-urgent` — Blocks usage or development; must fix immediately + - `priority/imporant-soon` — Should be addressed in the next development cycle + - `priority/import-longterm` — Valuable but not time-sensitive + - `priority/backlog` — Nice to have; may or may not be addressed + + ### Actor (exactly one required) + - `actor/axon` — Can be handled autonomously by the Axon worker agent (straightforward code changes, doc fixes, test additions) + - `actor/human` — Requires human judgment, architecture decisions, or access the agent does not have + + ### Additional labels (optional) + - `good first issue` — Simple, well-scoped issue suitable for new contributors + + ## Decision guidelines + + For **kind**: + - If the issue reports something not working as expected, use `kind/bug` + - If it proposes new CRD fields, new types, or API changes, use `kind/api` (can combine with `kind/feature`) + - If it is about README, examples, help text, or documentation, use `kind/docs` + - Otherwise use `kind/feature` + + For **priority**: + - Bugs that block basic functionality → `priority/critical-urgent` + - Concrete improvements with clear implementation path → `priority/imporant-soon` + - Proposals that require design discussion or are enhancements → `priority/import-longterm` + - Vague suggestions, edge cases, or low-impact improvements → `priority/backlog` + + For **actor**: + - Issues that involve clear code changes within existing patterns → `actor/axon` + - Issues needing architectural decisions, new CRD design, or external coordination → `actor/human` + - Documentation fixes, example improvements, small bug fixes → `actor/axon` + - Broad proposals, multi-system changes, or design decisions → `actor/human` + + ## Steps + + 1. Read the issue body and comments carefully. + 2. Read the codebase if needed to understand the scope of the issue. + 3. Determine the correct labels from each category. + 4. Apply the labels using: + ``` + gh issue edit {{.Number}} --add-label "" --add-label "" --add-label "" + ``` + 5. Apply `triage-accepted` to mark the issue as triaged: + ``` + gh issue edit {{.Number}} --add-label "triage-accepted" + ``` + 6. Leave a brief comment explaining your triage decision (1-3 sentences). + + ## Constraints + - Do NOT modify any code or create PRs + - Do NOT close or reopen issues + - Do NOT remove existing labels — only add new ones + - If you are genuinely unsure about an issue (ambiguous scope, unclear intent), add `axon/needs-input` instead of `triage-accepted` and leave a comment asking for clarification + - Be conservative with `actor/axon` — only assign it when the fix is clearly within the agent's capabilities + pollInterval: 5m