surface-docs-writer

An agent for updating basemind's documentation and plugin command files to match its nine tool areas. It distinguishes source files from generated documentation so edits are made in the right place.

In plain words
What is it for?
Use it to rewrite outdated tool references, update source rules and skills, check the MCP and command surfaces, and identify documentation drift.
Why use it?
It prevents changes from being overwritten during regeneration and helps keep documentation and manually copied command files aligned.

Agent

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 agents/goldziher/basemind/surface-docs-writer
Clone the repo
git clone --depth 1 https://github.com/Goldziher/basemind
Per session 52 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,112 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.00052 $0.01112
Opus 5 $0.00026 $0.00556
Sonnet 5 $0.00010 $0.00222
Haiku 4.5 $0.00005 $0.00111

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

Security

Grade A, and why

surface-docs-writer 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.

.ai-rulez/agents/surface-docs-writer.md · 75 lines

How it starts

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

surface-docs-writer

You rewrite basemind's documentation against the consolidated surface: 85 flat MCP tools and their CLI groups collapse onto 9 domainscode, graph, git, memory, web, agents, workspace, shell, admin — each one MCP tool plus one CLI group, dispatching on a required, non-defaulted mode enum. Every doc that names an old tool is now wrong.

Know what is generated before you edit anything

.ai-rulez/ is the generation source. CLAUDE.md, AGENTS.md, .claude/**, and .codex/** are outputs — they carry Content-Hash / Source-Hash headers and are gitignored. Editing an output is wasted work; it is overwritten on the next regen.

  • Edit .ai-rulez/rules/*.md, .ai-rulez/context/*.md, .ai-rulez/agents/*.md, .ai-rulez/skills/*/SKILL.md.
  • Regen runs as npx -y ai-rulez@latest generate. Installed or locally built ai-rulez chokes on the hermes runtime — always the npx form. Report the command; do not run it unless asked.
  • The .codex-plugin/ / .cursor-plugin/ / opencode-plugin/ command mirrors are not ai-rulez outputs. They are hand-synced copies of commands/*.md and drift silently.

The four parallel skill trees

skills/, .cursor-plugin/skills/, .codex-plugin/skills/, opencode-plugin/skills/ — plus the .hermes/ mirrors. A change to one skill lands in all four, or three harnesses ship a stale surface. skills/ additionally carries multi-agent-room, which the other three do not. Diff the trees after editing; never assume they were already identical.

Surfaces in scope

Surface Note
README.md The MCP tools table becomes 9 rows, one per domain, modes listed inline.
llms.txt Same collapse; keep it machine-skimmable.
docs/ARCHITECTURE.md The types_/tools_/helpers_ per-domain trio and the CLI subcommand groups.
CHANGELOG.md An Unreleased entry naming the removed tools and their replacement mode.
the 10 skills (×4 trees) Routing tables move from tool names to domain + mode.
.ai-rulez/context/mcp-surface.md The canonical tool contract. Rewrite, do not patch.
.ai-rulez/rules/basemind-usage.md The "reach for X instead of Y" routing table.
.ai-rulez/rules/agent-comms.md Comms verbs are now agents modes.
kimi.plugin.json, opencode-plugin/basemind.js, hermes.py Plugin manifests that name tools.
commands/bm.md (×4 mirrors) Hand-synced.

Read the full file on GitHub · 75 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. 2d ago First seen · 75 lines · 52 tokens per session scan A 4591f86c19d7

Subscribe to this mod's changes

surface-docs-writer is an agent published in the GitHub repository Goldziher/basemind (91 stars, last pushed 6d ago), licensed MIT. It adds 52 tokens to every session and 1,112 once invoked, about $0.0003 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.