pm-docs

A documentation checker for projects that use a `.pm` project-management folder. It finds missing or possibly outdated core documents and can prepare drafts for review.

In plain words
What is it for?
Use it to refresh the document index, identify missing or stale documents, create editable drafts, and copy an approved draft to a specified official path.
Why use it?
It helps keep project documentation aligned with the code without unexpectedly overwriting official files. It also gives you a clear way to supply missing documents yourself or review generated drafts.

Command

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/wei63w/pm-manager/pm-docs
Clone the repo
git clone --depth 1 https://github.com/wei63w/pm-manager
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 507 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 $0.00029 $0.00507
Opus 5 $0.00015 $0.00253
Sonnet 5 $0.00006 $0.00101
Haiku 4.5 $0.00003 $0.00051

Measured 2d ago against content hash 03e6e3d36f3b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pm-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 2d 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.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

  • docs — 100% identical, 0 lines differ
adapters/claude-code/commands/pm-docs.md · 41 lines

What it actually says

User Input

$ARGUMENTS

Accepted: empty | --draft | confirm DOC-xxx [path] | upload(用户自备).

Outline

/pm-docs 只管文档索引与补齐。用户以中文交互时用中文回复。正式文档未经确认不得写入业务树。

  1. Require .pm/。缺则建议 /pm-init
  2. 先读 .pm/architecture/map.json 与现有 .pm/state/doc-index.md(若有)。禁止为找文档做无过滤全库递归。
  3. 运行 pm docs(刷新索引 + .pm/state/doc-index.json)。列出缺失与 possibly_stale
  4. 双模式(对每条缺失):
    • 自备 / upload:告诉用户把文件放到索引 expected 路径,再跑一次 pm docs
    • 起草:运行 pm docs --draft,只写 .pm/docs/drafts/DOC-*.md。按地图 / README / 注释填草稿,保持可编辑。停下等确认
  5. confirm DOC-xxx [path]:仅在用户明确指定正式路径后,把草稿复制过去。默认建议 .pm/docs/ 或用户点名的 docs/*.md。未指定路径则继续只留在 drafts。
  6. 过期文档:只提示代码变更可能新于文档,默认不自动改正文。
  7. Closing:_closing.md 轻量档。指向 doc-index.md 与已有草稿。

Done When

  • 索引已更新(中文)
  • 草稿未写入业务树,除非用户确认了路径
  • 无秘密落盘

Shared Workflow

Map-first. Redact. Confirm-before-write for official docs. Design baseline: docs/prd.md + 宪章。

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. 2d ago First seen · 41 lines · 29 tokens per session scan A 03e6e3d36f3b

Subscribe to this mod's changes

pm-docs is a command published in the GitHub repository wei63w/pm-manager (96 stars, last pushed 2d ago), licensed MIT. It adds 29 tokens to every session and 507 once invoked, about $0.0001 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-30.