Skip to content

feat(agents): add retro agent and supporting skills - #187

Closed
ralphbean wants to merge 1 commit into
mainfrom
feat/retro-agent-stub
Closed

feat(agents): add retro agent and supporting skills#187
ralphbean wants to merge 1 commit into
mainfrom
feat/retro-agent-stub

Conversation

@ralphbean

Copy link
Copy Markdown
Member

Summary

  • Adds the retro agent definition (agents/retro.md) — a retrospective analyst that investigates agent failures, rework, and missed opportunities
  • Adds three supporting skills: trace-gathering, forming-hypotheses, localizing-fixes
  • Adds .claude/agents symlink (matches pattern from feat(agents): add review agent and pr-review skill #171)

The retro agent has three triggers:

  1. /retro <explanation> — human-initiated investigation
  2. Triage follow-up on retro-filed issues — responds to clarifying questions
  3. PR merged/closed — proactive opportunity detection against configured goals

It follows a consistent workflow: gather trace → form hypotheses → localize fix → file issue. It does not propose or implement fixes — it files issues that flow through triage → implementation asynchronously.

Design decisions

  • Retro agent files issues, not fixes. Keeps diagnosis separate from implementation. The agent with the trace context diagnoses; the agent with the code context implements.
  • Fix localization prefers broad scope. "Would every fullsend adopter want this fix?" If yes, recommend upstream. Aligns with open source ethos over defensive scoping.
  • Trace bundle attached to filed issues. Triage and implementation agents get the raw evidence without re-gathering it.
  • Skills kept concise. Reviewed against obra/superpowers writing-skills guidance — all under 400 words, descriptions use "Use when..." trigger format.

Test plan

  • Review agent definition for completeness against Story 8 acceptance criteria
  • Review skill conciseness — do they teach only what Claude doesn't already know?
  • Validate that .claude/agents symlink resolves correctly
  • Skills will need refinement once real agent runs produce traces in GitHub Actions

Closes #131

🤖 Generated with Claude Code

Add the retro agent definition and three skills it uses to perform
retrospective analysis on agent-driven work items. The retro agent
investigates failures, rework, and missed opportunities by gathering
trace evidence, forming root cause hypotheses, and filing issues in
the appropriate layer (repo, org config, or upstream).

Skills:
- trace-gathering: collect label transitions, comments, CI results, timing
- forming-hypotheses: root cause analysis with failure mode taxonomy
- localizing-fixes: determine where a fix belongs (repo/org/upstream)

The retro agent does not propose fixes — it files issues that triage
and implementation agents process asynchronously.

Closes #131

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@ralphbean

Copy link
Copy Markdown
Member Author

Keeping this in draft until the other three agent defs land.

@rh-hemartin

rh-hemartin commented Apr 8, 2026

Copy link
Copy Markdown
Member

I tested it (with Opus 4.6) locally leading to:

 Analysis 1: Slack ADR Notification Chain (#183 → #191 → #198)

  Rework pattern detected. The initial Slack notification workflow needed two follow-up fixes within 30 hours:

  - PR #191 fixed error-swallowing patterns (|| true masking gh pr diff failures) and a missing --repo flag exposed when actions/checkout was removed per review feedback
  - PR #198 switched to pull_request_target because fork PRs can't access repo secrets under the pull_request trigger

  Root causes (high confidence):
  1. Review identified the silent failure issue but marked it "non-blocking" — the fix for it introduced a second-order bug (missing --repo flag)
  2. Fork PR secret access is a non-obvious GitHub Actions behavior that neither author nor reviewer caught

  Recommended fix locations:
  - Upstream — document the pull_request vs pull_request_target security model and the fork secret gotcha
  - Upstream — add linting/skill for detecting || true error-swallowing in workflow scripts
  - Org-level — consider requiring workflow validation before merge for infra changes

  ---
  Analysis 2: Closed PRs #190 and #192

  No issue warranted. These were human-driven (with AI assistance), not agent-driven. The developer followed a normal incremental pattern:

  1. PR #190: regression tests (passed CI)
  2. PR #192: consolidated tests + Makefile fixes (e2e revealed a new bug)
  3. PR #193: all work + org secret visibility fix (still open)

  Each closure was intentional consolidation, not failure. Total time was 75 minutes with minimal waste. The pattern actually helped discover a production bug (org secret visibility) that might have been missed otherwise.
  

@rh-hemartin

rh-hemartin commented Apr 9, 2026

Copy link
Copy Markdown
Member

retro-closed-prs-190-192.md

retro-slack-notify-chain.md

Same tests but more output.

@ralphbean

Copy link
Copy Markdown
Member Author

I'm going to drop this so that it's not in your way, @rh-hemartin .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Story 8: Feedback Loop into Harness - Retro Agent

2 participants