revise-ai-docs

revise-ai-docs is a command for Claude Code from manhua-man/harness-coding-protocol. It costs 34 tokens per session (675 once invoked), scanned A, original, MIT.

A command that reviews a coding session and saves durable lessons in the project’s AI guidance files, such as AGENTS.md and CLAUDE.md. It keeps only rules that are likely to help future coding sessions.

In plain words
What is it for?
Use it after a session reveals a repeatable project rule or workflow detail. It helps update the repository’s facts and working procedures with the smallest necessary documentation change.
Why use it?
It prevents future agents from repeatedly rediscovering repository commands, test patterns, module boundaries and recurring tool behavior. It also avoids turning one-off incidents into permanent instructions.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Part of the harness-coding-protocol plugin — 4 skills, 4 commands shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/manhua-man/harness-coding-protocol/revise-ai-docs
Clone the repo
git clone --depth 1 https://github.com/manhua-man/harness-coding-protocol

Made for: Claude Code.

Or install harness-coding-protocol, the plugin that ships this one along with the rest of its 4 skills, 4 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for revise-ai-docs

README.md
[![agentmods](https://agentmods.dev/badge/commands/manhua-man/harness-coding-protocol/revise-ai-docs.svg)](https://agentmods.dev/commands/manhua-man/harness-coding-protocol/revise-ai-docs)
Your own site
<a href="https://agentmods.dev/commands/manhua-man/harness-coding-protocol/revise-ai-docs"><img src="https://agentmods.dev/badge/commands/manhua-man/harness-coding-protocol/revise-ai-docs.svg" alt="Measured on agentmods" height="20"></a>
Per session 34 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 675 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.00675
Opus 5 $0.00017 $0.00338
Sonnet 5 $0.00007 $0.00135
Haiku 4.5 $0.00003 $0.00068

Measured 5d ago against content hash a8fc1f61cff2, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

revise-ai-docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ai-ide/commands/revise-ai-docs.md · 55 lines

How it starts

The opening of the file, as written. The whole thing — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Review this session for durable learnings about working with AI in the current target repository. Update the minimal set of files so future sessions load correct context.

Follow the layer model in ../skills/project-ai-docs-steward/SKILL.md.

事 = AGENTS.md (Facts) · 法 = CLAUDE.md (Protocol)docs/ remains human background unless fixing a link from entry docs.

Step 1: Reflect

What would have changed a future decision? (commands, ports, test patterns, module boundaries, recurring tool behavior)

Before persisting a learning, require all three:

  • Recurrence — evidence that the situation can recur, not merely that it happened once.
  • Future decision value — a future agent would choose differently because this rule exists.
  • Net simplicity — the rule removes more repeated discovery or error than the permanent documentation, state, and maintenance it adds.

Prefer deleting or simplifying a stale rule over adding another exception. One-off incidents, temporary workarounds, speculative governance, and rules with no current caller are not durable learnings.

Step 2: Find target files

Kind Path
Facts ./AGENTS.md
Protocol ./CLAUDE.md
Personal (gitignored) ./.claude.local.md if appropriate
Scoped rules steering/*.md or .kiro/steering/*.md

One line per durable learning. Do not paste session logs.

Step 3: Route

  • Commands / layout / ports → AGENTS.md
  • Tool routing → AGENTS.md § AI Assistant Tool Index; separate repository-owned tools from recommended external/global tools
  • Collaboration norms → CLAUDE.md
  • Narrow technical convention or optional reference rule → matching steering file; keep reference-only material clearly labelled and do not silently promote it into mandatory protocol
  • Create a new steering/*.md reference only when the user explicitly asks for it or explicitly approves a proposed project-specific casebook. Adapt examples to real project paths and invariants; never copy a generic template verbatim.
  • Unsure → do not persist it. Keep uncertainty in the current response and gather evidence in a later session if it recurs.

Read the full file on GitHub · 55 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 55 lines · 34 tokens per session scan A a8fc1f61cff2

Subscribe to this mod's changes

revise-ai-docs is a command published in the GitHub repository manhua-man/harness-coding-protocol (5 stars, last pushed 2d ago), licensed MIT. It adds 34 tokens to every session and 675 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.