Skip to content

Remove PR and insight-recording rules from shared AGENTS.md #540

Description

@williamthorsen

Problem

The shared AGENTS.md file (packages/agents/content/guidance/shared/AGENTS.md) is installed as ambient context into every agent conversation. To preserve its signal-to-noise ratio, guidance that only applies in specific skill-bound surfaces should live in those skills, not in AGENTS.md.

Two sections currently fail this test because the actions they govern are owned exclusively by the main agent (not by subagents), and the corresponding skills already encode the rules:

  1. ## PRs section — "Never include automated quality checks (CI, linting, type-checking, formatting) in PR test plans." This rule applies only when authoring a PR description's test plan. Subagents do not create PRs; the main agent does, via create-pr / summarize-change / merge-pr. All three skills already encode the rule at their own boundary.

  2. ## Workflow → "Record insights as comments on the relevant GitHub issue, not just in conversation. Insights about conventions, API patterns, codebase discoveries, and architectural decisions have lasting value." — This is a wrap-up activity. Subagents do not run wrap-up; the main agent does, via the wrap-up skill, which already encodes the insight-recording behavior.

Context

What this ticket explicitly does NOT change

Other sections that look superficially similar (Commits, Shell commands, Don't test write operations against a live repo, Code descriptions, Style code-specific bullets) must remain ambient because subagents with Bash / Edit / Write access can plausibly take the actions they govern without invoking the corresponding skill — making AGENTS.md the necessary fail-safe for those rules. This ticket does not touch them.

Removal criterion (rationale for this ticket's removals)

A section may be removed from AGENTS.md only when both of the following hold:

  • No standard subagent has the capability to perform the action the rule governs (or, if it does, no realistic workflow has it doing so).
  • The skill that owns the action reliably encodes the rule at its boundary.

The criterion is the rationale for this ticket's removals. Going forward it will be carried by the update-agent-guidance skill (filed as #546), not duplicated in directory-level documentation — keeping a single source of truth for the rule that this ticket establishes.

Confirmed skill-level encodings (precondition for safe removal)

  • summarize-change/SKILL.md (line 120) — PR rule
  • create-pr/SKILL.md (line 114) — PR rule
  • merge-pr/SKILL.md (line 181) — PR rule
  • wrap-up/SKILL.md (Phase 5 step 3) — insight-recording via gh issue comment

Solution

Edit packages/agents/content/guidance/shared/AGENTS.md:

  • Remove the entire ## PRs section (header + the single bullet beneath it).
  • Remove the single bullet "Record insights as comments on the relevant GitHub issue, not just in conversation. Insights about conventions, API patterns, codebase discoveries, and architectural decisions have lasting value." from the ## Workflow section. Leave the other four bullets in that section intact.

Create packages/agents/content/guidance/README.md — a maintainer-facing README that documents what the directory is and how shared/AGENTS.md reaches agents (inlined verbatim into every rendered platform guidance file, ambient to every invocation including subagents). The README sits outside the include-directive graph, so its content stays out of rendered platform files. Prescriptive maintenance guidance (the removal criterion, the inverse-risk guard) is intentionally NOT in the README — it belongs to the update-agent-guidance skill (#546), not directory-level documentation.

Verification: Run nmr --filter agents test and codeassembly-agents install against a temp target and inspect rendered files.

Acceptance criteria

  • The ## PRs section is removed from packages/agents/content/guidance/shared/AGENTS.md.
  • The bullet "Record insights as comments on the relevant GitHub issue..." is removed from the ## Workflow section of the same file.
  • Existing skill-level encodings of the removed rules remain present and self-sufficient (verified before the ambient copy is removed): summarize-change/SKILL.md, create-pr/SKILL.md, merge-pr/SKILL.md, wrap-up/SKILL.md.
  • packages/agents/content/guidance/README.md exists and documents the directory's purpose and how shared/AGENTS.md is rendered.
  • After running install, the rendered ~/.claude/CLAUDE.md, ~/.rovodev/AGENTS.md, and standalone ~/.agents/AGENTS.md no longer contain either removed passage.

Out of scope (filed separately)

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactoringImprovement to code without change in functionalityscope:agents

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions