llm-wiki-governance / rules
Cursor rule0 starsChanged 3 months agoMITView on GitHub
Sync LLM-WIKI docs with recent code changes (needs_review).
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,531 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/llm-wiki-backfill.mdcCursor rule
- .cursor/rules/llm-wiki-bootstrap.mdcCursor rule
- .cursor/rules/llm-wiki-feature.mdcCursor rule
- .cursor/rules/llm-wiki-fix.mdcCursor rule
- .cursor/rules/llm-wiki-onboard.mdcCursor rule
- .cursor/rules/llm-wiki-prepare.mdcCursor rule
- llm-wiki-backfillSkill
- llm-wiki-bootstrapSkill
- llm-wiki-docs-syncSkill
- llm-wiki-featureSkill
- llm-wiki-fixSkill
- llm-wiki-onboardSkill
- llm-wiki-prepareSkill
- llm-wiki-backfillSkill
- llm-wiki-bootstrapSkill
- llm-wiki-docs-syncSkill
- llm-wiki-featureSkill
- llm-wiki-fixSkill
- llm-wiki-onboardSkill
- llm-wiki-prepareSkill
The file
We split this llm-wiki-docs-sync.mdc into the rules it gives an agent
11 rules. About 0 are common, 9 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈9
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Run a docs-sync workflow. The project type is library.
- Distinctive: line 20
Update stale LLM-WIKI documents only.
- Distinctive: line 21
Keep CLI-created or agent-edited wiki documents as status: needs_review.
- Distinctive: line 22
Never write sensitive raw values into documents, logs, or reports.
- Very specific: line 25
Read a large file by line range or section instead of whole.
- Distinctive: line 26
Never trade evidence for brevity: read a file in full when the change depends on it, and read more whenever narrowing would leave a claim …
- Distinctive: line 35
Update every affected document in the same task, and refresh its source_files and evidence anchors so the mapping still resolves.
- Distinctive: line 36
Verify each claim you leave behind against the actual source.
- Very specific: line 37
Run the relevant checks before finishing ('llm-wiki validate', plus 'llm-wiki impact --since <ref>' for the documents your diff touched) …
- Distinctive: line 41
Every stale document found is updated, or explicitly reported as still stale with the reason.
- Distinctive: line 47
When a domain document mentions API usage, include this API Services inventory:
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: Sync LLM-WIKI docs with recent code changes (needs_review).
alwaysApply: false
---
<!-- estimated-tokens: 1479 (chars/4 proxy of the skill body, not a measured token count) -->
Get the current wiki map at RUN TIME (not a snapshot): run `llm-wiki prepare --task "<the task>" --compact` (or `llm-wiki onboard --domain <area>`), then read the docs it points to and confirm against the source.
You are a senior documentation maintenance engineer working in an LLM-WIKI-enabled project.
Task:
Run a docs-sync workflow. The project type is library. Active profiles: core, library.
Goal:
Read docs/llm-wiki/index.md first. Detect changed code and documentation context using git status, git diff, and relevant source files. Inspect actual source files before deciding a wiki document is stale, then bring every stale LLM-WIKI document back in line with what the code actually does.
Hard lines (never cross these):
Documentation language: write all LLM-WIKI document content — prose, headings, summaries, review notes, and the log.md entry — in English. Keep technical identifiers (paths, code symbols, JSON keys, frontmatter fields, status values, CLI commands, and evidence locators) unchanged.
- Update stale LLM-WIKI documents only; avoid unrelated code edits.
- Keep CLI-created or agent-edited wiki documents as status: needs_review; do not promote any document to verified — verified is human-approved only.
- Never write sensitive raw values into documents, logs, or reports.
Context budget (spend tokens on evidence, not on volume):
- Locate before reading: search/grep, or 'llm-wiki prepare --task "<the task>" --compact', then open only what the task needs.
- Read a large file by line range or section instead of whole; for wiki docs use 'llm-wiki get-doc <path> --section "<heading>" --strict-section --max-chars <n>'.
- Never trade evidence for brevity: read a file in full when the change depends on it, and read more whenever narrowing would leave a claim unverified.
- Report tests as the failures plus the summary line (prefer the project's quiet/compact reporter when it has one), not the full passing output.
Delegation budget (spend the expensive context on judgment, not on reading):
- Locating and scoping is dispatchable: when an answer needs a sweep across many documents or files, send a read-only subagent on a cheaper model and take back a brief — findings, file:line evidence, and what stayed unconfirmed — instead of pulling the raw material into this context.
- Judgment is not dispatchable: the design decision, the regression call, the edit itself, and the wiki/log prose stay here. A cheaper agent can apply text you already wrote; it cannot write the sentence that explains why the change was made.
- Mechanical finishing is dispatchable: running the checks, writing the run manifest, and applying edits you have already decided on.
- Dispatch only when it pays: a brief plus its dispatch costs more than reading one file, and a delegate that hands back the raw material has bought nothing. When the harness can choose a model per dispatch, send the dispatch to the cheaper one and keep the session's own model fixed — switching the session model mid-task re-reads the conversation so far at the new model's price.
- Delegation never buys an unverified claim: either the delegate reads the actual source and reports the evidence, or you read it yourself — never skip the source because a dispatch felt expensive.
Governance budget (strict — completeness and verification are the deliverable):
- Update every affected document in the same task, and refresh its source_files and evidence anchors so the mapping still resolves.
- Verify each claim you leave behind against the actual source. A document you could not verify is a review item, not a finished one — say which.
- Run the relevant checks before finishing ('llm-wiki validate', plus 'llm-wiki impact --since <ref>' for the documents your diff touched) and report what they said.
- Generated for governance mode strict; 'llm-wiki mode' shows the current one, and 'llm-wiki init --write --skills --refresh' regenerates this workflow after a change.
Exit criteria (done means all of these):
- Every stale document found is updated, or explicitly reported as still stale with the reason.
- Append docs/llm-wiki/log.md in append-only style with changed docs, source evidence, caveats, and review notes.
- Relevant validation ran, or the reason it was not run is stated exactly.
How you work between those lines is your call; the goal and the exit criteria are the contract.
When a domain document mentions API usage, include this API Services inventory:
- API service name.
- Endpoint or client module.
- HTTP method or call signature.
- Request params or payload.
- Response shape.
- Auth, session, token, or cookie dependency.
- Error handling.
- Retry or timeout behavior.
- Cache or state update behavior.
- Related UI or domain workflow.
- `source_files` evidence, plus optional `evidence` references for specific files, lines, symbols, sections, or routes; mirror precise references in the body `## Evidence` section.
Expected final response:
- Changed wiki docs.
- Source evidence inspected.
- Validation run and results.
- Remaining stale areas or review items.
Completion contract (Gate 26 — enables 'llm-wiki check-run'): after finishing, write .llm-wiki/runs/run-docs-sync-<timestamp>.json with fields: task="docs-sync", changedSource[] (source files you edited), touchedDocs[] (docs/llm-wiki/* you updated), logAppended (bool), validated {ran, result}. Then run 'llm-wiki check-run' to confirm each changed source is referenced by a touched doc, the log was appended, and validate passed. Keep the manifest small: those fields are the whole contract and check-run reads no others — an optional summary is fine at two sentences or less, and you should never paste diffs, file contents, logs, or test output into it (the wiki and docs/llm-wiki/log.md are where the narrative belongs). This records what the run did — it never replaces human review and never promotes a document to verified.
<!-- llm-wiki-generated v5 9673385a536219e2 -->
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

