Skip to content
Merged
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
22 changes: 15 additions & 7 deletions .github/aw/subagents.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Define a sub-agent with a level-2 Markdown heading of the form `## agent: \`name
## agent: `file-summarizer`
---
description: Summarizes the content of a file in a few concise sentences
model: claude-haiku-4.5
model: small
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🪨 Me see model: small here. Good! No hard-code model name. Alias better - work forever, no break!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Good change — using the small alias here is more portable than claude-haiku-4.5. This way the workflow adapts automatically as model versions evolve.

---
You are a file summarization assistant. When given a file path, read the
file and return a brief summary (2–4 sentences) describing its purpose
Expand All @@ -58,7 +58,15 @@ Only two fields are supported inside a sub-agent frontmatter block:
| Field | Required | Default | Notes |
|---|---|---|---|
| `description` | No | — | Human-readable summary of the sub-agent's role |
| `model` | No | `"inherited"` | Model override; `"inherited"` uses the parent workflow's model |
| `model` | No | `"inherited"` | Model override; `"inherited"` uses the parent workflow's model. Prefer model aliases (e.g. `small`, `large`) over specific model IDs for portability. |

**Prefer model aliases over model IDs.** Built-in aliases resolve to the best available model for each provider, so they continue to work as models are updated. Commonly used aliases for sub-agents:

| Alias | Resolves to | When to use |
|---|---|---|
| `small` | `mini` → haiku, gpt-5-mini, gpt-5-nano, gemini-flash | Cheap, fast tasks: extraction, classification, formatting |
| `large` | sonnet, gpt-5-pro, gpt-5, gemini-pro | Complex reasoning or synthesis tasks |
| `inherited` | Parent workflow model | Default — use when the sub-agent needs the same capability as the parent |

All other fields (`engine`, `tools`, `network`, etc.) are stripped at runtime with a warning. Sub-agents inherit the parent's engine, tool access, and network configuration.

Expand Down Expand Up @@ -127,7 +135,7 @@ The top item must have a linked PR draft or issue.
## agent: `dependency-scanner`
---
description: Lists outdated npm/pip/go packages
model: claude-haiku-4.5
model: small
---
Run the appropriate package-manager audit command and return a
machine-readable list of outdated packages with their current and
Expand All @@ -136,22 +144,22 @@ latest versions.
## agent: `test-coverage`
---
description: Summarises low-coverage code paths
model: claude-haiku-4.5
model: small
---
Read the most recent test coverage report and list the top 5 files or
functions with coverage below 60 %. Include the file path and line range.

## agent: `secret-scanner`
---
description: Checks for potential credential leaks
model: claude-haiku-4.5
model: small
---
Scan staged changes and recently modified files for patterns that
resemble API keys, tokens, or passwords. Report any findings with the
file name and approximate line number.
```

The parent model (e.g. Claude Sonnet or Copilot) orchestrates, while the sub-agents do the heavy lifting with a haiku-size model at lower cost.
The parent model (e.g. Claude Sonnet or Copilot) orchestrates, while the sub-agents do the heavy lifting with a `small` model at lower cost.

### 2 — Reusable specialised helpers

Expand Down Expand Up @@ -184,7 +192,7 @@ tools:
## agent: `diff-explainer`
---
description: Produces a plain-English summary of a pull request diff
model: claude-haiku-4.5
model: small
---
You receive a unified diff. Describe each changed file in one sentence,
focusing on *what changed* and *why it matters*. Ignore formatting-only
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/agent-performance-analyzer.md
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ Execute all phases systematically and maintain an objective, data-driven approac

## agent: `metrics-extractor`
---
model: claude-haiku-4.5
model: small
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Using the small alias for the metrics-extractor sub-agent is the right call — extraction tasks are well-suited for a lightweight model and this ensures cross-provider compatibility.

description: Reads shared repo-memory metric files and returns structured JSON with all relevant performance data
---
You are a metrics extraction assistant. When given a newline-separated list of file paths (one path per line), read each file using bash and return a single JSON object containing all data found.
Expand All @@ -613,7 +613,7 @@ Return the result as a single valid JSON object with no additional commentary.

## agent: `pattern-detector`
---
model: claude-haiku-4.5
model: small
description: Classifies agent behavioral patterns from profiles and returns a structured categorization of issues found
---
You are an agent behavior classification assistant. When given a JSON object containing agent profiles (with fields such as output counts, types, success rates, and resource usage), classify each agent's behavioral patterns.
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/daily-security-red-team.md
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ Initialize your cache-memory, determine today's technique, and begin your compre

## agent: `forensics-extractor`
---
model: claude-haiku-4.5
model: small
description: Run git blame on each security finding and extract commit origin metadata as JSON
---
You receive security findings as plain text, one per line, in the format:
Expand Down Expand Up @@ -754,7 +754,7 @@ Output one JSON object per line. No preamble, no summary.

## agent: `fix-task-generator`
---
model: claude-haiku-4.5
model: small
description: Generate markdown remediation checklist from classified security findings
---
You receive security finding records as JSON objects, one per line:
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/daily-subagent-optimizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ imports:

# Daily Sub-Agent Optimizer

You are an LLM efficiency expert specializing in agentic workflow optimization. Your mission today: identify one workflow that would benefit from inline sub-agent refactoring, reason carefully about which tasks a smaller model (haiku/mini) can handle, and produce a copy-paste-ready proposal issue.
You are an LLM efficiency expert specializing in agentic workflow optimization. Your mission today: identify one workflow that would benefit from inline sub-agent refactoring, reason carefully about which tasks a smaller model (small alias) can handle, and produce a copy-paste-ready proposal issue.

## Context

Expand Down Expand Up @@ -128,7 +128,7 @@ Use the `prefix-analyzer` sub-agent to perform this analysis. Pass it the full p

## Phase 5 — LLM Expert Analysis

As an LLM efficiency expert, identify where the workflow's prompt does work that a smaller haiku/mini model can handle independently.
As an LLM efficiency expert, identify where the workflow's prompt does work that a smaller model can handle independently.

### Sub-Agent Candidate Scoring

Expand All @@ -145,7 +145,7 @@ Threshold: **≥ 6 → strong candidate, 4–5 → moderate, < 4 → keep in mai

### Heuristics Cheatsheet

Tasks a **haiku/mini model handles well**:
Tasks a **`small` model handles well**:
- Summarizing a single file or code section
- Extracting specific fields from structured/semi-structured text
- Classifying items into a predefined set of categories
Expand All @@ -171,7 +171,7 @@ Collect all sections scoring ≥ 4. Pick the **top 2–4** by score to propose a
For each selected sub-agent candidate, design a concrete inline sub-agent:

1. **Name**: lowercase, hyphenated, descriptive (e.g., `file-summarizer`, `category-detector`)
2. **Model**: `claude-haiku-4.5`
2. **Model**: `small`
3. **Description**: one sentence (≤ 15 words)
4. **Agent prompt**: focused, ≤ 15 lines, imperative mood
5. **Invocation change**: the 1–3 line replacement in the main prompt that calls the sub-agent by name
Expand All @@ -198,7 +198,7 @@ Body:
### Why This Workflow

[2–3 sentences: what makes it a good candidate — high token usage, number of distinct phases,
specific tasks identified as haiku-appropriate or having repeated tool prefixes]
specific tasks identified as small-appropriate or having repeated tool prefixes]

---

Expand Down Expand Up @@ -242,11 +242,11 @@ Then remove the duplicate calls from each of the affected sections.

### Proposed Sub-Agents

#### 1. `<agent-name>` (`claude-haiku-4.5`)
#### 1. `<agent-name>` (`small`)

**Extracted task**: [1 sentence]
**Why haiku**: [1 sentence — which heuristic applies]
**Score**: <X>/10 (independence: N, haiku-adequacy: N, parallelism: N, size: N)
**Why small**: [1 sentence — which heuristic applies]
**Score**: <X>/10 (independence: N, model-adequacy: N, parallelism: N, size: N)
**Estimated savings**: ~N tokens/run

<details>
Expand All @@ -256,7 +256,7 @@ Then remove the duplicate calls from each of the affected sections.
## agent: `<agent-name>`
---
description: <description>
model: claude-haiku-4.5
model: small
---
<agent prompt>
```
Expand Down Expand Up @@ -340,7 +340,7 @@ Load the existing array from that path if the file is present, append the new en
## agent: `prefix-analyzer`
---
description: Detects repeated tool-call prefixes across workflow prompt sections and scores extraction value
model: claude-haiku-4.5
model: small
---
You are a prompt-structure analyst. Given the full body text of an agentic workflow prompt (everything after the closing frontmatter `---`), identify repeated tool invocations that appear as opening instructions in multiple sections.

Expand Down Expand Up @@ -380,7 +380,7 @@ reasoning: <1–2 sentences explaining the finding>
## agent: `workflow-screener`
---
description: Reads a workflow .md file and reports whether inline-agents are enabled, the engine, and prompt complexity
model: claude-haiku-4.5
model: small
---
You are a workflow file scanner. When given a file path, read the file using bash and report the following facts:

Expand All @@ -403,27 +403,27 @@ notes: <one sentence>

## agent: `opportunity-classifier`
---
description: Scores a workflow prompt section on its suitability for extraction into a haiku/mini sub-agent
model: claude-haiku-4.5
description: Scores a workflow prompt section on its suitability for extraction into a small sub-agent
model: small
---
You are an LLM task-decomposition expert. Given a section of an agentic workflow prompt, score it on its suitability to be extracted into a sub-agent using a smaller haiku/mini model.
You are an LLM task-decomposition expert. Given a section of an agentic workflow prompt, score it on its suitability to be extracted into a sub-agent using a smaller model.

Score each dimension:

- **independence** (0–3): Can this section run without the outputs of other sections? 3 = fully independent, 0 = deeply coupled to earlier results
- **haiku_adequacy** (0–3): Is the reasoning simple enough for a smaller model? 3 = pure extraction/classification/formatting, 0 = requires deep synthesis or cross-referencing many sources
- **model_adequacy** (0–3): Is the reasoning simple enough for a smaller model? 3 = pure extraction/classification/formatting, 0 = requires deep synthesis or cross-referencing many sources
- **parallelism** (0–2): Could this run concurrently with other sections? 2 = yes, 0 = must be sequential
- **size** (0–2): Is the task substantial enough to warrant a separate agent call? 2 = many tool calls or long output, 0 = trivial (< 2 tool calls)

Compute: `total = independence + haiku_adequacy + parallelism + size` (max 10)
Compute: `total = independence + model_adequacy + parallelism + size` (max 10)

Verdict: `strong` (≥ 6), `moderate` (4–5), `weak` (< 4)

Return in this exact format:
```
total: <score>/10
independence: <0-3>
haiku_adequacy: <0-3>
model_adequacy: <0-3>
parallelism: <0-2>
size: <0-2>
verdict: strong/moderate/weak
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/developer-docs-consolidator.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ Begin the consolidation process now. Use Serena for analysis, **directly apply c
## agent: `file-cataloger`
---
description: Discover and catalog all markdown files in specs/ and scratchpad/
model: claude-haiku-4.5
model: small
---
You receive no arguments. Discover all markdown files in the `specs/` and `scratchpad/` directories using bash:

Expand All @@ -561,7 +561,7 @@ Return only the table, no other commentary.
## agent: `tone-analyzer`
---
description: Scan a markdown file for marketing language and formatting violations
model: claude-haiku-4.5
model: small
---
You receive a single file path as your input. Read the file and perform two scans:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/smoke-copilot.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ If all tests pass and this workflow was triggered by a pull_request event:

## agent: `file-summarizer`
---
model: claude-haiku-4.5
model: small
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🪨 model: small here too. Me approve! Portability good. No model die when version change.

description: Summarizes the content of a file in a few concise sentences
---
You are a file summarization assistant. When given a file path, read the file and return a brief summary (2–4 sentences) describing its purpose and key contents. Be concise and factual.
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/spec-librarian.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ The following specifications are outdated:

## agent: `coverage-checker`
---
model: claude-haiku-4.5
model: small
description: Lists all pkg/ packages and reports README.md coverage metrics as JSON
---
You are a coverage auditor for a Go repository. Your task is to enumerate all packages
Expand Down Expand Up @@ -292,7 +292,7 @@ Return ONLY a JSON object with these six fields and no additional text.

## agent: `staleness-detector`
---
model: claude-haiku-4.5
model: small
description: Compares git timestamps for each package's source vs spec and detects API drift
---
You are a staleness detector for Go package specifications. You receive a list of packages
Expand Down Expand Up @@ -330,7 +330,7 @@ Return ONLY the JSON object and no additional text.

## agent: `consistency-checker`
---
model: claude-haiku-4.5
model: small
description: Validates import paths, naming conventions, and dependency declarations across all specs
---
You are a cross-package consistency checker for Go package specifications. Your task is to
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unbloat-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ Begin by scanning the docs directory and selecting the best candidate for improv

## agent: `file-bloat-analyzer`
---
model: claude-haiku-4.5
model: small
description: Reads a single documentation file and returns a structured inventory of bloat indicators
---
You are a documentation bloat analysis agent. The file path to analyze is provided as the first line of your input (or as the argument you are invoked with). Read that file using the `bash` tool (`cat <file_path>`) and return a structured JSON inventory of bloat indicators.
Expand Down Expand Up @@ -533,7 +533,7 @@ Return a JSON object only — no prose, no extra text:

## agent: `doc-page-screenshotter`
---
model: claude-haiku-4.5
model: small
description: Navigates to a documentation page URL using Playwright and captures a full-page screenshot, returning a structured JSON result with screenshot paths and any blocked domains
---
You are a documentation screenshot agent. Your input is a full page URL to screenshot (e.g., `http://localhost:4321/gh-aw/guides/ephemerals/`).
Expand Down
Loading