Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions self-development/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -130,6 +131,28 @@ kubectl get taskspawner axon-workers -o yaml
kubectl logs -l job-name=<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.
Expand Down
116 changes: 116 additions & 0 deletions self-development/axon-triage.yaml
Original file line number Diff line number Diff line change
@@ -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
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Typo in priority label: priority/imporant-soon should be priority/important-soon. The agent will apply a misspelled label that won't match any existing GitHub label or downstream automation. This same typo also appears on line 85 in the decision guidelines.

Prompt for AI agents
Check if this issue is valid β€” if so, understand the root cause and fix it. At self-development/axon-triage.yaml, line 64:

<comment>Typo in priority label: `priority/imporant-soon` should be `priority/important-soon`. The agent will apply a misspelled label that won't match any existing GitHub label or downstream automation. This same typo also appears on line 85 in the decision guidelines.</comment>

<file context>
@@ -0,0 +1,116 @@
+
+      ### 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
</file context>
Fix with Cubic

- `priority/import-longterm` β€” Valuable but not time-sensitive
Copy link

@cubic-dev-ai cubic-dev-ai bot Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1: Typo in priority label: priority/import-longterm should be priority/important-longterm. The agent will apply a misspelled label that won't match any existing GitHub label or downstream automation. This same typo also appears on line 86 in the decision guidelines.

Prompt for AI agents
Check if this issue is valid β€” if so, understand the root cause and fix it. At self-development/axon-triage.yaml, line 65:

<comment>Typo in priority label: `priority/import-longterm` should be `priority/important-longterm`. The agent will apply a misspelled label that won't match any existing GitHub label or downstream automation. This same typo also appears on line 86 in the decision guidelines.</comment>

<file context>
@@ -0,0 +1,116 @@
+      ### 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
+
</file context>
Fix with Cubic

- `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 "<label1>" --add-label "<label2>" --add-label "<label3>"
```
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