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.
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,533 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 repository60 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/00-core-principles.mdcCursor rule
- .cursor/rules/01-git-workflow.mdcCursor rule
- .cursor/rules/02-pattern-discovery.mdcCursor rule
- .cursor/rules/03-safe-ai-dlc.mdcCursor rule
- .cursor/rules/10-backend-python.mdcCursor rule
- .cursor/rules/11-frontend-react.mdcCursor rule
- .cursor/rules/12-database-sql.mdcCursor rule
- .cursor/rules/13-testing.mdcCursor rule
- .cursor/rules/14-spec-creation.mdcCursor rule
- .cursor/rules/15-deployment.mdcCursor rule
- .cursor/rules/16-stripe-payments.mdcCursor rule
- .cursor/rules/20-agent-architect.mdcCursor rule
- .cursor/rules/21-agent-backend.mdcCursor rule
- .cursor/rules/22-agent-qas.mdcCursor rule
- .cursor/rules/23-agent-security.mdcCursor rule
- .cursor/rules/30-background-agents.mdcCursor rule
- .cursor/rules/31-mcp-integration.mdcCursor rule
- .cursor/rules/README.mdCursor rule
- agent-coordinationSkill
- api-patternsSkill
- confluence-docsSkill
- deployment-sopSkill
- frontend-patternsSkill
- git-advancedSkill
- linear-sopSkill
- migration-patternsSkill
- orchestration-patternsSkill
- pattern-discoverySkill
- release-patternsSkill
- rls-patternsSkill
- safe-ai-dlcSkill
- safe-workflowSkill
- security-auditSkill
- spec-creationSkill
- stripe-patternsSkill
- team-coordinationSkill
- testing-patternsSkill
- vault-syncSkill
- agent-coordinationSkill
- api-patternsSkill
- confluence-docsSkill
- deployment-sopSkill
- frontend-patternsSkill
- git-advancedSkill
- linear-sopSkill
- migration-patternsSkill
- orchestration-patternsSkill
- pattern-discoverySkill
- release-patternsSkill
- rls-patternsSkill
- safe-ai-dlcSkill
- safe-workflowSkill
- security-auditSkill
- spec-creationSkill
- stripe-patternsSkill
- team-coordinationSkill
- testing-patternsSkill
- vault-syncSkill
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
- Very specific: line 32
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. - Distinctive: line 40
Summarize, never duplicate: If you are restating more than a paragraph, stop and link.
- Distinctive: line 45
No emoji in concept files.
- Very specific: line 63
Must exit 0. Prepend a dated entry to log.md and bump the timestamp of every concept you actually re-verified.
≈ “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: "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
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.

