agentleFS
bybren-llcbybren-llc/safe-agentic-workflow/.cursor/rules/04-knowledge-vault.mdc

safe-agentic-workflow / rules

Cursor rule419 starsChanged 4 months agoMITView on GitHub

Knowledge-vault authoring conventions for OKF bundles: this project's frontmatter contract, link rules, verified_against drift discipline, and the vault-sync loop. Activate when authoring or maintaining knowledge-vault concepts.

The file

We split this 04-knowledge-vault.mdc into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    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:

    Link only to concept IDs listed in _meta/manifest.json: If the concept does not exist, name it in prose and report it as a suggestion.

    line 32
  2. Distinctive:

    Summarize, never duplicate: If you are restating more than a paragraph, stop and link.

    line 40
  3. Distinctive:

    No emoji in concept files.

    line 45
  4. Very specific:

    Must exit 0. Prepend a dated entry to log.md and bump the timestamp of every concept you actually re-verified.

    line 63

≈ “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
04-knowledge-vault.mdc
---
description: "Knowledge-vault authoring conventions for OKF bundles: this project's frontmatter contract, link rules, verified_against drift discipline, and the vault-sync loop. Activate when authoring or maintaining knowledge-vault concepts."
alwaysApply: false
---

# Knowledge Vault Conventions

Activate this rule when writing or maintaining concepts in an OKF knowledge vault.

A vault is a **map, not the territory**. Source-of-truth docs stay where they live; code stays
authoritative over everything, including the vault. A concept is a ~50-line map-card that
summarizes and links — it never restates its source.

## The Frontmatter Contract

Required on every concept: `type`, `title`, `description` (≤160 chars), `tags`, `timestamp`,
`status`.

`timestamp` is **the date the concept was last verified against its sources** — not the date the
file was edited. Optional: `resource`, `domain`, `ticket`, `sources`, `docs`, `verified_against`.

**YAML subset only** — scalars, double-quoted strings, inline lists, and two-space block lists. No
nested maps, no multiline scalars. This is what keeps the validator dependency-free.

## Link Rules

1. Relative markdown links only. **No wikilinks**, no leading-slash paths, no repo-host URLs for
   files in this repo.
2. Concept-to-concept links never leave the bundle.
3. Links that leave the bundle appear only under `## Citations` (`index.md` and `guide` types are
   exempt — they are navigation).
4. **Link only to concept IDs listed in `_meta/manifest.json`.** If the concept does not exist,
   name it in prose and report it as a suggestion. **Never invent a link.**

Rule 4 is the one that matters most when several agents author in parallel. Without it you get a
graph of plausible, confident, broken references.

## Writing Rules

- **Summarize, never duplicate.** If you are restating more than a paragraph, stop and link.
- **Code wins.** Name the helper actually called, not the one the code *should* call. When code
  contradicts docs, document the code and note the discrepancy.
- Section H2s must exactly match the type's template, in order. Do not add, remove, or rename.
- Environment variable names may be mentioned; values never.
- No emoji in concept files.

## Drift Discipline

Staleness is computed, not felt: a concept is stale if and only if a path in its `resource` or
`sources` changed since the manifest's `baseline_sha`.

**A citation is not re-verification.** Linking a concept from somewhere new does not make its
claims fresher. Only re-deriving it from source bumps `timestamp` and `verified_against`.

Deleted source → `status: deprecated`, never a file deletion; inbound links must be cleaned first.

## Before You Commit

```bash
node knowledge-vault/scripts/validate-vault.mjs --vault <vault>
```

Must exit 0. Prepend a dated entry to `log.md` and bump the `timestamp` of every concept you
actually re-verified.

## References

- `knowledge-vault/docs/GUIDE.md` -- the method and why each rule exists
- `knowledge-vault/docs/ADOPTION-PLAYBOOK.md` -- running your first build
- `knowledge-vault/templates/starter-bundle/_meta/CONVENTIONS.md` -- the full constitution

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.