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

llm-wiki-governance / rules

Cursor rule0 starsChanged 3 months agoMITView on GitHub

Reconstruct an incomplete LLM-WIKI from the current repository for a handoff, labeling every fact verified / inferred / unknown (needs_review).

The file

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

7 rules. About 0 are common, 5 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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
  1. Very specific:

    Read docs/llm-wiki/index.md and the 'llm-wiki backfill' report first, then work the gaps it names.

    line 36
  2. Distinctive:

    Never present the ABSENCE of evidence as evidence.

    line 41
  3. Distinctive:

    Never write sensitive raw values into documents or reports.

    line 44
  4. Distinctive:

    Keep every created or edited wiki document at status: needs_review.

    line 45
  5. Distinctive:

    Do not promote anything to verified — verified is human-approved only, and a reconstructed document is precisely the kind that needs a …

    line 46
  6. Very specific:

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

    line 51
  7. 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 52

≈ “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-backfill.mdc
---
description: Reconstruct an incomplete LLM-WIKI from the current repository for a handoff, labeling every fact verified / inferred / unknown (needs_review).
alwaysApply: false
---

<!-- estimated-tokens: 2056 (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 reconstructing an LLM-WIKI from the repository as it stands today, so this project can be handed to someone else.

Task:
Recover as many EVIDENCE-BACKED facts about this project as possible, and clearly identify what cannot be recovered. The project type is library. Active profiles: core, library. Governance mode: strict.
Preconditions: run 'llm-wiki backfill' first and use its inventory, coverage, evidence ledger, and readiness report as your starting map. 'llm-wiki backfill --write' creates the missing document stubs; this workflow fills them.

What this task IS and IS NOT:
- It IS: recover what the repository can prove, and name what it cannot.
- It is NOT: produce a complete and convincing story about the project. A plausible history that nobody can verify is worse than an admitted gap, because the next developer will act on it.

Evidence ladder (prefer the higher source; never let a lower one contradict a higher one):
1. current source code — what the system does today
2. tests — the behavior somebody committed to
3. configuration and manifests — how it is built, wired, and deployed
4. existing wiki documents — a compressed map, not an authority
5. ADRs / decision records — the only real source for WHY
6. git commit messages — intent where the author recorded it
7. git diff / history — what changed and when, not why
8. locally available issue/PR metadata — context where present, if any

Label every claim you write with one of three confidence levels, and keep them apart:
- verified: read directly from the current source, tests, or configuration. Cite the file (and symbol or line range) in source_files / evidence.
- inferred: derived from directory boundaries, naming, or history. Write it as inferred, in the sentence itself ("inferred from commit history"), never as plain fact.
- unknown: the repository cannot answer it. Say so in the document, and leave it as an open review item.

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.
1. Read docs/llm-wiki/index.md and the 'llm-wiki backfill' report first, then work the gaps it names.
2. Establish CURRENT behavior before anything historical: entrypoints, architecture, data flow, external integrations, public contracts, configuration, and the business rules the code actually enforces.
3. Rebuild the source mapping as you go: broad evidence in source_files, precise references in the frontmatter evidence entries, mirrored in the body ## Evidence section. A document with no source mapping is not finished.
4. For each domain the report lists as a source boundary with no document, describe what the code in it does. The boundary is evidence; the business MEANING of the domain is not — mark it inferred unless a test, a contract, or a document confirms it.
5. Then, and only then, attempt history. Look for ADRs, decision records, and commit messages that recorded a rationale. Where one exists, cite the commit or the document. Where none exists, write "Decision reason: unknown" and stop — do NOT reconstruct a rationale from file layout, naming, dependency choices, or commit subjects.
6. Never present the ABSENCE of evidence as evidence. "No ADR exists for this" is a fact; "this was probably chosen for performance" is an invention.
7. Cover the handoff areas the report and the profile documents ask for, ONLY where evidence exists: purpose, technology stack, local setup, build/run, deployment, directory and architecture overview, important source locations, core domain concepts, major data flows, external integrations, API usage, state management, important business rules, operational constraints, known issues, technical debt, recorded decisions, and open items. Where a section has no evidence, keep the section and record it as unknown rather than deleting it or filling it in.
8. Produce an explicit "Unknown / needs human confirmation" list — the questions only the outgoing maintainer can answer. This list is a deliverable, not a failure.
9. Never write sensitive raw values into documents or reports; describe them only in redacted form when necessary.
10. Keep every created or edited wiki document at status: needs_review.
11. Do not promote anything to verified — verified is human-approved only, and a reconstructed document is precisely the kind that needs a human to read it.
12. Append docs/llm-wiki/log.md in append-only style with the documents touched, the evidence used, what stayed inferred, and what stayed unknown.
13. Finish by running 'llm-wiki backfill' again (add --strict for the pre-handoff gate) and report which readiness checks are now complete and which are not.
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.

Expected final response:
- Documents created or filled, with the confidence label distribution.
- Source evidence inspected, and the source mappings rebuilt.
- What stayed INFERRED, and on what basis.
- What stayed UNKNOWN, as questions for the outgoing maintainer.
- The readiness checks still incomplete, and why each one cannot be closed by writing text.

Completion contract (Gate 26 — enables 'llm-wiki check-run'): after finishing, write .llm-wiki/runs/run-backfill-<timestamp>.json with fields: task="backfill", 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 0bbef4df8b4396c8 -->

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.