Skip to content

agentdiff configure: add AGENTS.md context injection alongside SKILL template #15

Description

@codeprakhar25

What problem does this solve?

The agentdiff configure command currently creates a SKILL file (e.g. .claude/skills/agentdiff-context.md) to give AI agents project context. However, many agentic tools (Codex, Copilot, Cursor, etc.) read context from AGENTS.md at the repo root or .cursor/AGENTS.md — not from Claude-specific skill files.

A user configuring AgentDiff for Codex or Copilot gets no benefit from the SKILL template because those agents don't load it.

What would you like to see?

Extend agentdiff configure (or add a dedicated subcommand) to also inject AgentDiff project context into AGENTS.md:

  • Detect or create AGENTS.md at the repo root
  • Append (or insert) an ## AgentDiff section explaining:
    • What agentdiff does and why it matters in this repo
    • Which agents are active/configured
    • Any capture conventions or commit-hook requirements the agent should know about
  • Idempotent: re-running the command updates the section without duplicating it
  • Respect existing AGENTS.md content — only manage the AgentDiff section, leave the rest untouched
  • Support a flag like --agents-md to opt in or --no-agents-md to skip

Why AGENTS.md specifically?

  • Codex reads AGENTS.md by default for repo-level instructions
  • Cursor and some other tools also honor it
  • It is the emerging standard for multi-agent repo context alongside CLAUDE.md, GEMINI.md, etc.

Acceptance criteria

  • agentdiff configure (or a subcommand) writes/updates an ## AgentDiff section in AGENTS.md
  • The section content mirrors what the SKILL template provides but in plain markdown prose (no skill-specific syntax)
  • Idempotent: running twice does not duplicate content
  • Existing AGENTS.md content outside the managed section is preserved
  • Tests cover create-from-scratch and update-existing paths
  • Docs/README updated to mention AGENTS.md support

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions