# Maintaining Agents Md

> Maintains AGENTS.md, AGENT_LEARNINGS.md, AGENT_REQUESTS.md, and CONTRIBUTING.md governance files in sync with codebase changes. Use when updating governance files, during sprint reviews, or after structural changes.

- **Type:** Skill
- **Install:** `agentstack add skill-qte77-claude-code-plugins-maintaining-agents-md`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [qte77](https://agentstack.voostack.com/s/qte77)
- **Installs:** 0
- **Category:** [AI & ML](https://agentstack.voostack.com/c/ai-and-ml)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [qte77](https://github.com/qte77)
- **Source:** https://github.com/qte77/claude-code-plugins/tree/main/plugins/docs-governance/skills/maintaining-agents-md
- **Website:** https://qte77.github.io/claude-code-plugins/

## Install

```sh
agentstack add skill-qte77-claude-code-plugins-maintaining-agents-md
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Maintain Agent Governance Files

**Scope**: $ARGUMENTS

Keeps agent governance files synchronized with codebase state. Detects stale
references, missing updates, and promotion candidates.

## Governance Files

| File | Authority | Purpose |
|------|-----------|---------|
| `AGENTS.md` | Behavioral | Rules, role boundaries, compliance requirements |
| `CONTRIBUTING.md` | Technical | Workflows, commands, coding standards |
| `AGENT_LEARNINGS.md` | Knowledge | Accumulated patterns and solutions |
| `AGENT_REQUESTS.md` | Escalation | Active blockers requiring human input |

## When to Use

- After PRs that change project structure, commands, or patterns
- At sprint start/end for governance health check
- When promoting patterns from `AGENT_LEARNINGS.md` to `.claude/rules/`
- After `make validate` pipeline or Makefile changes
- When adding/removing skills or plugins

## Modes

### `audit` (default)

Scan governance files for staleness and inconsistencies.

**Checks:**

1. **Stale paths**: Grep governance files for `src/`, `docs/`, `tests/` paths.
   Verify each path still exists.
2. **Stale commands**: Parse `CONTRIBUTING.md` command reference table. Verify
   each `make` recipe exists in `Makefile`.
3. **Missing learnings**: Check recent git log for patterns not yet in
   `AGENT_LEARNINGS.md`. If `ralph/docs/LEARNINGS.md` exists, check it too.
4. **Resolved requests**: Check `AGENT_REQUESTS.md` entries — flag any whose
   referenced files/issues no longer exist.
5. **Role boundary drift**: Verify AGENTS.md role definitions match current
   `.claude/skills/` inventory.

**Output**: Findings table with file, line, issue type, description.

### `sync`

Fix staleness found by audit. For each finding:

1. Propose the specific edit
2. Apply on user approval
3. Follow priority order: AGENTS.md > CONTRIBUTING.md > AGENT_LEARNINGS.md > AGENT_REQUESTS.md

### `promote`

Evaluate `AGENT_LEARNINGS.md` entries for promotion per the criteria in
`.claude/rules/compound-learning.md` (3rd occurrence → rule, recurring → skill).

**Procedure:**

1. Read `AGENT_LEARNINGS.md` entries
2. Grep codebase for each pattern's problem statement
3. If pattern appears in 3+ locations or has been referenced in 3+ commits,
   recommend promotion to `.claude/rules/`
4. Draft the rule file content for user approval

### `full`

Run all three modes in sequence: audit → sync → promote.

## Maintenance Priority Order

When multiple files need updates, follow this order to prevent hierarchy
conflicts:

1. **AGENTS.md** — behavioral rules first (highest impact)
2. **CONTRIBUTING.md** — technical standards second
3. **AGENT_LEARNINGS.md** — patterns third (high-value, low-risk)
4. **AGENT_REQUESTS.md** — escalations last (time-sensitive, not structural)

## References

- `.claude/rules/compound-learning.md` — promotion path
- CONTRIBUTING.md "Documentation Hierarchy" — authority structure
- AGENTS.md "Decision Framework" — anti-redundancy rules

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [qte77](https://github.com/qte77)
- **Source:** [qte77/claude-code-plugins](https://github.com/qte77/claude-code-plugins)
- **License:** Apache-2.0
- **Homepage:** https://qte77.github.io/claude-code-plugins/

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-qte77-claude-code-plugins-maintaining-agents-md
- Seller: https://agentstack.voostack.com/s/qte77
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
