docs-sync

A project rule requiring documentation to be updated whenever a feature, behavior, name, or major development surface changes.

In plain words
What is it for?
Maintaining the right architecture, user guide, data schema, build workflow, and agent documentation when the corresponding parts of a project change.
Why use it?
It keeps written instructions and the code aligned, so developers and agents are less likely to follow outdated information.

Cursor rule for Cursor

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 rules/yuz9610/poe2overlay/docs-sync
Clone the repo
git clone --depth 1 https://github.com/yuz9610/POE2Overlay

Made for: Cursor.

Per session 831 This file is loaded in full into every session.
When invoked 831 The same file — it is already loaded in full.
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.00831 $0.00831
Opus 5 $0.00415 $0.00415
Sonnet 5 $0.00166 $0.00166
Haiku 4.5 $0.00083 $0.00083

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

Security

Grade A, and why

docs-sync 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.

.cursor/rules/docs-sync.mdc · 42 lines

How it starts

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

Documentation sync

When you add a feature, change behavior, or rename/remove user-visible or architectural surfaces, update the matching docs in the same change (same PR / session). Do not leave code and docs out of sync.

Canonical matrix: docs/ARCHITECTURE.md § 文檔同步. Docs ownership / target architecture: docs/README.md § 目標信息架構.

Quick checklist

Change type Update at minimum
New/changed Tauri command or event lib.rs, src/api/tauri.ts, types.ts if needed, ARCHITECTURE.md IPC tables
New UI panel, shortcut, setting USER_GUIDE.md, ARCHITECTURE.md (modules / 常見修改入口), SettingsPanel area in ARCHITECTURE if new setting key
New/changed data/ schema or file BUILD_JSON.md or README data section, ARCHITECTURE.md data table, example JSON if applicable
Build JSON AI workflow or prompt template CREATE_BUILD.md; BUILD_JSON.md if schema changes
New Rust module or major frontend folder ARCHITECTURE.md directory / module tables
Dev workflow (scripts, npm/cargo commands) ARCHITECTURE.md, README.md, PROJECT_WORKFLOW.md, AGENTS.md if agent-facing
Task / sprint / commit workflow 先 PROJECT_WORKFLOW.md;再 AI_AGENT_PROMPTS.md 開頭、AGENTS.mdCLAUDE.mdAI_AGENT_SETUP.mdworkflow.mdcSPRINTS.mdsprints/README.md(SUMMARY 模板)、task docs
Encoding / tooling policy ENCODING.md, .cursor/rules/encoding.mdc
New doc file under docs/ docs/README.md index / target architecture; new file starts with 文檔目的 / 不負責
Docs information architecture / SOT ownership 先 docs/README.md § 目標信息架構;再 AGENTS.md.cursor/rules/architecture.mdc、this file if agent-facing

Rules

  1. Same change: code + docs together; mention doc updates in the summary.
  2. No orphan docs: if removing a feature, remove or update stale sections (grep doc filenames for old command/event names).
  3. One source of truth: IPC lists live in ARCHITECTURE.md; AGENTS.md / cursor rules only summarize—update ARCHITECTURE first when IPC changes.
  4. User vs dev: player-facing text → USER_GUIDE; architecture/IPC → ARCHITECTURE; JSON schema → BUILD_JSON.
  5. Workflow state: idea/task/sprint transitions live in PROJECT_WORKFLOW.md; prompt templates live in AI_AGENT_PROMPTS.md. Follow the workflow state transition table before editing BRAINSTORM.md, SPRINTS.md, task docs, or sprint summaries.
  6. Purpose block: every docs/**/*.md should state its 文檔目的 and what it does not own near the top.
  7. No long duplication: if content belongs to another SOT, link to it instead of copying long rules or tables.
  8. Skip only when: pure internal refactor with zero behavior/API/UI/data change (state explicitly: "no doc updates needed").

Read the full file on GitHub · 42 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 · 42 lines · 831 tokens per session scan A d12fa6fe7999

Subscribe to this mod's changes

docs-sync is a cursor rule published in the GitHub repository yuz9610/POE2Overlay (8 stars, last pushed 3mo ago), licensed MIT. It adds 831 tokens to every session, about $0.0042 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.