agentleFS
Dowon-Kim7949Dowon-Kim7949/llm-wiki-governance/.cursor/rules/llm-wiki-fix.mdc

llm-wiki-governance / rules

Cursor rule0 starsChanged 3 months agoMITView on GitHub

Fix a bug grounded in the project's LLM-WIKI, then update the wiki (needs_review).

The file

We split this llm-wiki-fix.mdc into the rules it gives an agent

11 rules. About 0 are common, 8 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈8

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Run a post-wiki bug fix workflow.

    line 13
  2. Very specific:

    If the docs conflict with the code, or the scope grows beyond what was asked, STOP and confirm with a human before implementing.

    line 20
  3. Distinctive:

    Keep CLI-created or agent-edited wiki documents as status: needs_review.

    line 21
  4. Distinctive:

    Never write sensitive raw values into documents, logs, or reports.

    line 22
  5. Very specific:

    Read a large file by line range or section instead of whole.

    line 25
  6. Distinctive:

    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 …

    line 26
  7. Distinctive:

    Update every affected document in the same task, and refresh its source_files and evidence anchors so the mapping still resolves.

    line 35
  8. Distinctive:

    Verify each claim you leave behind against the actual source.

    line 36
  9. Very specific:

    Run the relevant checks before finishing ('llm-wiki validate', plus 'llm-wiki impact --since <ref>' for the documents your diff touched) …

    line 37
  10. Distinctive:

    Every affected LLM-WIKI document is updated in the same task.

    line 42
  11. Distinctive:

    When a domain document mentions API usage, include this API Services inventory:

    line 48

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
llm-wiki-fix.mdc
---
description: Fix a bug grounded in the project's LLM-WIKI, then update the wiki (needs_review).
alwaysApply: false
---

<!-- estimated-tokens: 1579 (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 engineer working in an LLM-WIKI-enabled project.

Task:
Run a post-wiki bug fix workflow. The project type is library. Active profiles: core, library.

Goal:
Read docs/llm-wiki/index.md first. Inspect actual source files before making claims or code changes. Make the requested code change with the smallest safe scope, grounded in the wiki and verified against the actual source. Update every affected LLM-WIKI document in the same task, so the wiki keeps telling the truth about the code.

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.
- If the docs conflict with the code, or the scope grows beyond what was asked, STOP and confirm with a human before implementing. When the scope is unclear, scope it first with 'llm-wiki prepare --task "<the task>"' (or the /llm-wiki-prepare skill).
- 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):
- The requested change is implemented and verified against the actual source.
- Every affected LLM-WIKI document is updated in the same task.
- Append docs/llm-wiki/log.md in append-only style with changed files, evidence, caveats, and review notes.
- Relevant tests ran, or the reason they were not run is stated exactly.

How you work between those lines — reading order, planning depth, edit sequence — 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 files.
- Source evidence inspected.
- Tests run and results.
- Wiki docs updated.
- Remaining review items or caveats.

Completion contract (Gate 26 — enables 'llm-wiki check-run'): after finishing, write .llm-wiki/runs/run-fix-<timestamp>.json with fields: task="fix", changedSource[] (source files you edited), touchedDocs[] (docs/llm-wiki/* you updated), logAppended (bool), validated {ran, result}, testEvidence {red, green} (test name/summary failing before your change, passing after — red -> green; no secrets). 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 226941d6fa559865 -->

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.