ai-fication-kit / rules
Cursor rule3 starsChanged 5 months agoApache-2.0View on GitHub
Bootstrap the ai/guide maps and diagrams (the cold-start pass). Drafts everything as [inferred] for a human to audit.
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 repository32 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/add-feature.mdcCursor rule
- .cursor/rules/adversarial-audit.mdcCursor rule
- .cursor/rules/ai-knowledge-layer.mdcCursor rule
- .cursor/rules/check-drift.mdcCursor rule
- .cursor/rules/create-feature-catalog.mdcCursor rule
- .cursor/rules/fix-bug.mdcCursor rule
- .cursor/rules/perform-feature-add-simulation.mdcCursor rule
- .cursor/rules/post-cold-start-verification.mdcCursor rule
- .cursor/rules/review-agent-config.mdcCursor rule
- .cursor/rules/review-change.mdcCursor rule
- .cursor/rules/verify-ai-readiness.mdcCursor rule
- add-featureSkill
- cold-startSkill
- deep-testSkill
- fix-bugSkill
- review-changeSkill
- add-featureSkill
- adversarial-auditSkill
- check-docsSkill
- check-driftSkill
- cold-startSkill
- create-feature-catalogSkill
- fix-bugSkill
- implement-specSkill
- perform-feature-add-simulationSkill
- post-cold-start-verificationSkill
- review-agent-configSkill
- review-changeSkill
- verify-ai-readinessSkill
The file
We split this cold-start.mdc into the rules it gives an agent
12 rules. About 0 are common, 3 are distinctive, and 9 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
9
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 7
Run the cold-start bootstrap.
- Very specific: line 11
Read ai/repo-profile.json (deterministic output of the kit's orient step).
- Very specific: line 17
If the profile contains a humanContext block (captured by the first-run wizard), use it — these are the user's own answers, not detection:
- Very specific: line 29
Check repo-profile.json → maturity.process.
- Very specific: line 31
If CLAUDE_bkp_*.md or AGENTS_bkp_*.md exist at the repo root, they contain the previous AI configuration written by the team or another …
- Distinctive: line 54
Do NOT blindly copy the backup content.
- Very specific: line 59
Explore cheaply: If a repo-explorer chat mode is available, switch to it to protect this context window — it is read-only by design.
- Very specific: line 70
Correct the stamped commands: If the build/test commands you verified in config files differ from the Build/Test lines stamped into …
- Very specific: line 80
Update
ai/guide/ARCHITECTURE.mdandPROJECT_OVERVIEW.md: only where you VERIFIED something in code or config. - Very specific: line 89
Do NOT modify any source file.
- Very specific: line 92
If rows already carry [verified], leave them unchanged.
- Distinctive: line 96
When the drafts are written, STOP and print an "AUDIT TODO" table:
≈ “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: Bootstrap the ai/guide maps and diagrams (the cold-start pass). Drafts everything as [inferred] for a human to audit. alwaysApply: false --- <!-- Copyright (c) 2026 Kunal Suri (CEA LIST). All rights reserved. --> Run the **cold-start bootstrap**. This is a one-time, read-and-write-docs-only pass. You will draft the AI metadata; a human will audit it afterward. Do NOT touch source code. ## Step 0 — load the facts Read `ai/repo-profile.json` (deterministic output of the kit's orient step). Treat its stack facts as given; VERIFY its build/test commands against real config files before writing them anywhere as confirmed. If the profile says this repo is a fork, **distinguishing OUR code from FROZEN upstream code is the single most important output of this pass.** If the profile contains a `humanContext` block (captured by the first-run wizard), use it — these are the user's own answers, not detection: - `developer.skillLevel` / `developer.codebaseFamiliarity` — calibrate your output. For a junior or someone new to this codebase, explain more, and lean MORE conservative on Stability (prefer `?`/`frozen` when unsure). For an expert who knows the repo, be terse. - `stack` — if `kind` is `split`, expect distinct frontend/backend trees and map them separately; if `single`, don't invent a split; if `unknown`, flag the stack as a thing to resolve. The user's `description`/`frontend`/`backend` strings override loose guesses. - `branch` / `firstRunAt` — provenance; record the first-run date in `PROJECT_OVERVIEW.md`. ## Step 0.5 — absorb prior knowledge (Process 2 repos only) Check `repo-profile.json` → `maturity.process`. If it is `2`, backup files exist. If `CLAUDE_bkp_*.md` or `AGENTS_bkp_*.md` exist at the repo root, they contain the previous AI configuration written by the team or another tool. Extract and reuse: 1. **Read** the backup files (glob `*_bkp_*.md` at the repo root). 2. **Extract** any information that is USEFUL for the `ai/` knowledge layer: - Build/test commands (cross-reference with `repo-profile.json`) - Project description and purpose - Coding conventions and style rules - Architecture notes (layers, boundaries, patterns) - Known gotchas, forbidden patterns, or "never do X" rules - Module or directory descriptions - References to external systems or APIs 3. **Merge** extracted knowledge into the appropriate `ai/guide/` documents: - Conventions → `ai/guide/CONVENTIONS.md` - Architecture notes → `ai/guide/ARCHITECTURE.md` - Module info → `ai/guide/MODULE_MAP.md` (as seed rows) - Project purpose → `ai/guide/PROJECT_OVERVIEW.md` 4. **Enrich** the new `CLAUDE.md` and `AGENTS.md` with any project-specific hard rules from the backups that are NOT already covered by the kit's templates (e.g., "never use ORM X", "always use Y pattern"). 5. Tag everything extracted as `[inferred — from prior config]` so the human auditor knows the provenance. Do NOT blindly copy the backup content. Parse it for KNOWLEDGE. The structure of the new files comes from the kit's templates; only the FACTS from the backups are reused. ## Steps 1. **Explore cheaply.** If a `repo-explorer` chat mode is available, switch to it to protect this context window — it is read-only by design. Otherwise, explore read-only yourself: list the tree 2 levels deep; read build manifests (not source); check the last ~30 commit subjects for active areas. Prefer grep + line counts over whole-file reads. 2. **Fill `ai/guide/MODULE_MAP.md`:** one row per module/package — directory, a one-line responsibility, the entry-point file, and a Stability GUESS. Use the ACTUAL names you found; do not assume names. Each row has FIVE cells — Directory, Responsibility, Entry point, Stability guess, Status — and the Status cell is where the `[inferred]` tag goes (the tooling reads provenance from the LAST cell only). 3. **Correct the stamped commands.** If the build/test commands you verified in config files differ from the Build/Test lines stamped into `CLAUDE.md` and `AGENTS.md`, correct exactly those lines (and the Definition-of-done line in `ai/guide/CONVENTIONS.md`), tag the correction `[inferred]`, and change nothing else in those files. This is the sanctioned exception to the No-Churn rule. 4. **Draft diagrams into `ai/analysis/diagrams/`** as Mermaid `.mmd`: `package-deps.mmd` (dependency graph), `domain-core.mmd` (core types), `seam.mmd` (the main boundary — note the protocol as a question if unverified). 5. **Note candidate features** in `ai/guide/FEATURE_MAP.md` using its template. 6. **Update `ai/guide/ARCHITECTURE.md` and `PROJECT_OVERVIEW.md`** only where you VERIFIED something in code or config. ## Hard rules for this pass - Tag EVERYTHING you write `[inferred]`. You are guessing; say so. - Separate OBSERVED facts (file A imports B) from INFERENCES (A is "the domain layer"). - On a fork: mark anything that looks inherited as Stability `frozen` and FLAG it "UNSURE — needs human", rather than asserting it. - Where you cannot tell, write `?` and "UNSURE — needs human". Never guess confidently. - Do NOT modify any source file. Only write inside `ai/`. ## Re-run safety If rows already carry `[verified]`, leave them unchanged. Only populate rows that are still `?` or contain placeholder text like `<fill in>`. ## Stop condition When the drafts are written, STOP and print an "AUDIT TODO" table: | # | Location | What to verify | Why uncertain | |---|---|---|---| | 1 | `ai/guide/MODULE_MAP.md` row X | … | [inferred] / `?` stability | Cover: all rows still `?`, all `frozen` guesses needing confirmation, and any protocol or command assumptions still `[inferred]`. The human sets Stability and flips `[inferred]` → `[verified]`. Do not proceed to building features. Tell the user that after they complete their audit, they can run the following prompts to check the configuration and knowledge layer: - `/review-agent-config` — to perform a quick diagnostic check of `CLAUDE.md` and `AGENTS.md` structural completeness and consistency. - `/post-cold-start-verification` — to perform a deep semantic audit of all drafted `ai/` files.
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.

