Skip to content

feat: sub-agent pattern for triage + new /scope workflow - #284

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

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

Conversation

@theletterf

Copy link
Copy Markdown
Member

Summary

  • Triage sub-agents: rebuilds both issue-triage and issue-auto-triage on the parent-as-semaphore pattern — sub-agents (router, content-checker) return plain-text decisions only; the parent is the sole caller of safe-output tools. Fixes the red-outcome contract violation where router labels bled into red results.
  • New /scope workflow: merges issue-size (/size) and docs-issue-scope (/docs-issue-scope) into a single /scope command that posts one combined comment, never rewrites the issue body, and follows a 🟢/🟠/🔴 outcome contract. Deletes both old workflows.
  • Orange wording: updates the orange triage heading from "Insufficient context" to "Additional context might help" in all three workflows.
  • gh-aw v0.86.2: bumps Makefile, check-aw-updates.yml, and run-gh-aw-compile.sh to the current release.

Changes

Triage workflows

  • gh-aw-issue-triage.md / .lock.yml — sub-agent pattern (router → content-checker), red label fix, orange wording
  • gh-aw-issue-auto-triage.md / .lock.yml — same pattern, same fixes
  • agentic-workflows/issue-triage/ and issue-auto-triage/ — updated docs and example callers

Scope workflow (new)

  • gh-aw-issue-scope.md / .lock.yml — new combined workflow with scoper + sizer sub-agents
  • agentic-workflows/issue-scope/ — example caller and README

Deleted

  • gh-aw-docs-issue-scope.md / .lock.yml
  • gh-aw-issue-size.md / .lock.yml
  • gh-aw-fragments/size-logic.md
  • agentic-workflows/docs-issue-scope/
  • agentic-workflows/issue-size/

Docs

  • README.md, agentic-workflows/README.md, agentic-workflows/DEVELOPING.md, .github/zizmor.yml, .claude/skills/

Test plan

Sandbox tests in elastic/docs-actions-sandbox against the branch lock files:

🤖 Generated with Claude Code

theletterf and others added 17 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]>
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]>
Replaces the two separate size and scope workflows with one combined
/scope command that posts a single comment, uses the sub-agent semaphore
pattern (parent-as-sole-writer), and follows the 🟢/🟠/🔴 outcome
contract. Deletes the old workflows and size-logic fragment in the same
commit. Also bumps gh-aw to v0.86.2 in Makefile and check-aw-updates.yml.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
theletterf and others added 4 commits August 13, 2026 16:43
Based on elastic.co/docs/contribute-docs/how-to/good-issues. Each of
five criteria (specific title, definition of done, context/motivation,
template compliance, one issue/one problem) scores 0 or 1. Total maps
to rating: 4-5 green, 2-3 orange, 0-1 red. Makes orange lighter and
less easy to trigger than the previous any-weak-section approach.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
…rse issues

Generic verbs without specifying what to change now explicitly score 0
on criterion 2. Undefined sets ("some pages", "the relevant pages") now
explicitly score 0 on criterion 5.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Documents the 1-5 scoring system and outcome thresholds so issue
authors know what triggers green, orange, or red.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@theletterf
theletterf merged commit db1f823 into main Aug 13, 2026
4 checks passed
@theletterf
theletterf deleted the feat/triage-sub-agents branch August 13, 2026 16:27
theletterf added a commit to elastic/docs-content that referenced this pull request Aug 13, 2026
…#7947)

## Summary

Migrates from the two separate size (\`/size\`) and scope
(\`/docs-issue-scope\`) workflows to the new combined \`/scope\`
workflow from elastic/docs-actions#284.

**Workflow file changes:**
- Deletes \`docs-size.yml\` and \`docs-issue-scope.yml\`
- Adds \`docs-scope.yml\` (triggers on \`/scope\`, calls
\`gh-aw-issue-scope.lock.yml@v1\`)
- Updates \`docs-ai-menu.yml\`: removes the \`run-docs-size\` job and
\`refresh-menu-after-docs-size\` job; updates \`run-docs-issue-scope\`
to call the new \`gh-aw-issue-scope.lock.yml@v1\`

**AI menu script change (\`docs_ai_menu.cjs\`):**
- Removes the \`size\` menu item from \`WORKFLOW_CONFIG\` and
\`WORKFLOW_ORDER\`
- Updates the \`issueScope\` label to link to the new
\`gh-aw-issue-scope.md\` source

The "Scope the docs work" AI menu checkbox now triggers \`/scope\`
(which covers both docs scope and cost/benefit sizing in one comment).

**Merge after** elastic/docs-actions#284 is merged and the \`v1\` tag is
moved.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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