Skip to content

feat: restructure auto-triage to use router + content-checker sub-agents - #282

Merged
theletterf merged 14 commits into
mainfrom
feat/triage-sub-agents
Aug 13, 2026
Merged

theletterf merged 14 commits into
mainfrom
feat/triage-sub-agents

Conversation

@theletterf

@theletterf theletterf commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Summary

Restructures automatic issue triage into two focused inline sub-agents while keeping every write in the parent workflow's constrained safe-output phase:

  • router classifies the issue and recommends existing type and team labels from the repository's labels, CODEOWNERS, and project instructions.
  • content-checker rates the supplied issue content as green, orange, or red and returns actionable missing-detail prompts.
  • The parent workflow applies the final labels and feedback. It never rewrites the issue body.

Outcome behavior

Outcome Feedback Labels
Green Add a 👍 reaction; do not post a redundant comment triaged plus confident type/team routing labels
Orange Post one 🟠 summary that mentions the issue author and asks for specific missing details triaged plus confident type/team routing labels
Red Post one 🔴 summary that mentions the issue author and asks for the context needed to proceed Only human-needed

Per-project context

The reusable workflow now reads .github/triage-instructions.md from the consumer repository's default branch by default. Repositories can use that file for ownership mappings, label terminology, relevant CODEOWNERS paths, and project-specific issue-quality expectations.

The existing additional-instructions caller input remains fully supported, so current callers do not need to migrate immediately. When the project file is absent, the inline instructions continue to provide all repository-specific context. When both are present, the inline instructions are the higher-precedence overlay and can refine or override the file within the supported routing and quality topics.

The precedence model is:

  1. Immutable workflow contract — security policy, safe-output limits, outcome behavior, comment templates, and red-label exclusivity cannot be overridden.
  2. Inline additional-instructions — the caller's explicit per-workflow overrides.
  3. Project instructions file — the repository's persistent default triage context.

Set project-instructions-path to another repository-relative path or to an empty string to disable the file lookup. Conventional AGENTS.md and Copilot instructions remain available independently.

The example caller now relies on the project instructions file instead of embedding the docs-content team map in workflow YAML. A reusable template is included at agentic-workflows/issue-auto-triage/project-instructions.example.md.

Body refinement remains available through the separate manual /triage workflow, unchanged.

Validation

  • gh-aw compilation succeeds with zero warnings
  • Targeted pre-commit hooks pass
  • Red sandbox example: issue 14 / run — author mentioned and only human-needed applied
  • Green sandbox example: issue 16 / run — 👍 reaction and no comment
  • Orange sandbox example: issue 20 / run — author mentioned, no reaction, and project-specific Team:Projects routing applied

Related to #398

theletterf and others added 4 commits August 12, 2026 15:30
Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
The lock files were stale — they were compiled with v0.86.1 output
but the compile script already expected v0.86.2. Running the compile
script with the correct version regenerates all 15 lock files cleanly.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Split the monolithic auto-triage prompt into two focused inline
sub-agents, addressing feedback that the single-pass auto-triage
was too aggressive for issue-open workflows:

- `router` — classifies the issue, applies type and team labels,
  removes `needs-team`. Does not touch the body or post comments.
- `content-checker` — validates against the quality bar and posts
  a single traffic-light comment (🟢/🟠/🔴) with specific gaps.
  Applies `human-needed` only when the issue is 🔴 not actionable.

Neither sub-agent rewrites the issue body. Body rewrites remain
opt-in via the manual `/triage` slash command (gh-aw-issue-triage).

Also removes `update-issue` from auto-triage safe-outputs (no longer
needed) and drops the `triage-refine-logic.md` import (replaced by
inline sub-agent instructions).

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@theletterf
theletterf requested a review from a team as a code owner August 12, 2026 13:53
@theletterf
theletterf requested a review from reakaleek August 12, 2026 13:53
@theletterf theletterf self-assigned this Aug 12, 2026
@theletterf theletterf added the enhancement New feature or request label Aug 12, 2026

@cotti cotti left a comment

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.

Reading-wise it looks good!

I poked it with a robostick as well to be safe, and it found no blockers either.

theletterf and others added 3 commits August 13, 2026 11:50
Applies the same router + content-checker sub-agent architecture from
the auto-triage AW to the manual /triage workflow. The parent is the
sole writer; sub-agents return plain-text decisions only. Outcome
behavior (green/orange/red), comment templates, and project
instructions file support are now identical between the two workflows.

Drops the refinement feature (body rewrite, undo snapshot, findings
block, update-issue safe output) — manual triage now focuses solely
on labeling and content evaluation.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Conflicts were in auto-triage and manual triage lock files, which are
auto-generated. Resolved by recompiling both source .md files with the
v0.86.2 compiler that arrived from main via #281.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Replace the passive "label list must contain only human-needed" check
with an active instruction: when the content-checker returns red,
replace the label list with ["human-needed"] before calling add_labels,
discarding every type, team, and cross-team label the router returned.

Fixes the issue where the parent agent applied bug + triaged on a red
issue instead of only human-needed.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@theletterf
theletterf merged commit 4fb0faa into main Aug 13, 2026
4 checks passed
@theletterf
theletterf deleted the feat/triage-sub-agents branch August 13, 2026 10:40
theletterf added a commit that referenced this pull request Aug 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants