Skip to content

AGENTS.md should document the code-review to pr-review sub-agent propagation requirement #581

Description

@fullsend-ai-retro

What happened

The code agent on fullsend#2133 (predecessor to agents#445) added a new mandatory-finding rule for agent behavior definition changes to skills/code-review/SKILL.md. However, it did not add a corresponding procedural section to skills/pr-review/sub-agents/security.md. In the production pipeline, pr-review dispatches dimension-specific sub-agents that never receive code-review/SKILL.md content — so the rule was inert during orchestrated reviews. The review agent flagged this gap in every review cycle from June 10 through July 30 (run 30583297797), and the fix agent's third iteration (June 29, commit 2be0d71) only partially addressed it by adding an Own: clause without a procedural section. Human reviewer waynesun09 independently confirmed this gap on July 29. The result was 6+ review cycles and 3 fix iterations all driven by the same structural omission.

What could go better

The code agent didn't understand the relationship between code-review/SKILL.md (standalone review) and the pr-review orchestrator that delegates to sub-agents in skills/pr-review/sub-agents/. This architectural relationship is not documented anywhere agents can reference. If AGENTS.md explained that changes to review rules in code-review/SKILL.md must be mirrored with procedural sections in the corresponding pr-review sub-agent, the code agent would have produced a complete implementation on the first attempt. Confidence: high — the code agent's reasoning trace (per the review body) showed no awareness of the sub-agent delegation model, and the fix agent's partial fix confirms neither agent understood the full propagation requirement.

Proposed change

Add a section to AGENTS.md (or a dedicated CONTRIBUTING.md section) documenting the review pipeline architecture. Specifically:

  1. Explain that skills/code-review/SKILL.md defines review dimensions for standalone use, while skills/pr-review/SKILL.md orchestrates parallel sub-agents that each receive only their own definition file (from skills/pr-review/sub-agents/).
  2. State the propagation rule: when adding or modifying a review rule in code-review/SKILL.md, the corresponding pr-review sub-agent must receive a matching procedural section with the category name, severity guidance, and file pattern matching instructions.
  3. Reference the routing table in pr-review/SKILL.md (section 3a) that maps categories to sub-agents, and note that new categories must be added to this table.
  4. Use the existing "Permission and role changes" section in skills/pr-review/sub-agents/security.md as the model for what a complete procedural section looks like.

This is repo-specific architectural documentation, not an agent definition change.

Validation criteria

The next code agent PR that modifies review rules in code-review/SKILL.md should also include corresponding changes to the relevant pr-review sub-agent definition. Verify by checking the next 3 PRs that touch skills/code-review/SKILL.md — each should include changes to the corresponding sub-agent file if the rule introduces a new category or mandatory-finding directive. Additionally, the review agent should stop flagging 'missing procedural section' as a persistent finding on such PRs.


Generated by retro agent from #445

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationready-to-codeTriggers code agent dispatch

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions