diff --git a/.agents/README.md b/.agents/README.md index b5b11c3..d080417 100644 --- a/.agents/README.md +++ b/.agents/README.md @@ -1,18 +1,19 @@ # `.agents/` — rules & skills -Source of truth for AI agent configuration. Cursor consumes via symlinks in `.cursor/rules/` and `.cursor/skills/`. +Source of truth for AI agent configuration. Cursor loads skills from `.agents/skills/` natively and rules via `.cursor/rules/*.mdc` → `.agents/rules/*.md` symlinks. ## Start here -| Question | Read | -| --------------------------------- | --------------------------------------------------------------------- | -| Repo-root stub (cross-tool) | [`AGENTS.md`](../AGENTS.md) | -| Where files live, symlinks | [rules/agents-first-convention.md](rules/agents-first-convention.md) | -| Tier 1 / 2 / 3 attachment modes | [rules/agents-tier-system.md](rules/agents-tier-system.md) | -| Codemap tier/pairing deltas | [skills/writing-agents-config](skills/writing-agents-config/SKILL.md) | -| Authoring new rules/skills (meta) | [`writing-great-skills`](skills/writing-great-skills/SKILL.md) | -| Past corrections | [`lessons.md`](lessons.md) | -| What exists on disk right now | `ls .agents/rules` · `ls .agents/skills` | +| Question | Read | +| -------------------------------------- | --------------------------------------------------------------------- | +| Repo-root stub (cross-tool) | [`AGENTS.md`](../AGENTS.md) | +| Where files live, rule `.mdc` symlinks | [rules/agents-first-convention.md](rules/agents-first-convention.md) | +| Tier 1 / 2 / 3 attachment modes | [rules/agents-tier-system.md](rules/agents-tier-system.md) | +| Codemap tier/pairing deltas | [skills/writing-agents-config](skills/writing-agents-config/SKILL.md) | +| Authoring new rules/skills (meta) | [`writing-great-skills`](skills/writing-great-skills/SKILL.md) | +| Unslop (always-on) | [`unslop`](skills/unslop/SKILL.md) | +| Past corrections | [`lessons.md`](lessons.md) | +| What exists on disk right now | `ls .agents/rules` · `ls .agents/skills` | ## Tier legend (summary) @@ -37,6 +38,6 @@ Discover on disk via `ls` + the frontmatter audit in [`agents-tier-system`](rule ```text .agents/ rules/.md → .cursor/rules/.mdc (symlink) - skills//SKILL.md → .cursor/skills/ (symlink) + skills//SKILL.md → Cursor reads in place lessons.md → .cursor/rules/lessons.mdc (symlink) ``` diff --git a/.agents/rules/agents-first-convention.md b/.agents/rules/agents-first-convention.md index 5bd6ccd..a5218ce 100644 --- a/.agents/rules/agents-first-convention.md +++ b/.agents/rules/agents-first-convention.md @@ -1,5 +1,5 @@ --- -description: When creating or moving rules/skills, always store the source file in .agents/ and symlink from .cursor/ +description: When creating or moving rules/skills, store the source in .agents/. Rules need a .cursor/rules .mdc symlink. Skills do not — Cursor reads .agents/skills/ natively. alwaysApply: true --- @@ -20,24 +20,19 @@ When creating **any** new rule or skill, follow this convention: ## Skills (`SKILL.md` files) -1. Create the directory and file in `.agents/skills//SKILL.md` -2. Create a symlink in `.cursor/skills/`: - - ```bash - ln -s ../../.agents/skills/ .cursor/skills/ - ``` +Create `.agents/skills//SKILL.md` only — never start in `.cursor/skills/`. Cursor loads `.agents/skills/` natively. Do **not** symlink into `.cursor/skills/` (double-registers). If `/create-skill` writes there, move the folder to `.agents/skills/` and delete the `.cursor/` copy. **Never** name bulk reference files `AGENTS.md` inside skill folders — use `FULL-GUIDE.md` or topic siblings. ## Why - `.agents/` is the **source of truth** — it is IDE-agnostic and works across different AI coding tools. -- `.cursor/` only contains **symlinks** pointing back to `.agents/`. +- `.cursor/rules/` contains **`.mdc` symlinks** pointing back to `.agents/rules/`. Skills are not mirrored there. - This keeps configuration portable and avoids duplication. ## Never -- Never place original rule/skill content directly in `.cursor/rules/` or `.cursor/skills/`. -- Never create a rule or skill without both the `.agents/` file and the `.cursor/` symlink. +- Never place original rule content directly in `.cursor/rules/`. +- Never create a rule without both the `.agents/` file and the `.cursor/rules/.mdc` symlink. Skills need `.agents/` source only. Related: [`agents-tier-system.md`](./agents-tier-system.md) · [`AGENTS.md`](../../AGENTS.md). diff --git a/.agents/rules/agents-tier-system.md b/.agents/rules/agents-tier-system.md index b742975..a1b0b4c 100644 --- a/.agents/rules/agents-tier-system.md +++ b/.agents/rules/agents-tier-system.md @@ -4,7 +4,6 @@ globs: - ".agents/rules/**" - ".agents/skills/**" - ".cursor/rules/**" - - ".cursor/skills/**" alwaysApply: false --- @@ -20,7 +19,7 @@ for f in .agents/rules/*.md .agents/lessons.md; do done ``` -**When authoring:** pick tier before writing; pair fat rules with skills; symlinks per [`agents-first-convention`](./agents-first-convention.md). Default to intent-triggered skills and a thin always-on set. +**When authoring:** pick tier before writing; pair fat rules with skills; layout per [`agents-first-convention`](./agents-first-convention.md). Default to intent-triggered skills and a thin always-on set. ## Reference diff --git a/.agents/rules/authoring-discipline.md b/.agents/rules/authoring-discipline.md index c8318db..7ce69af 100644 --- a/.agents/rules/authoring-discipline.md +++ b/.agents/rules/authoring-discipline.md @@ -22,4 +22,4 @@ User-requested **doc audits** may slim redundant markdown; preservation above ap - **JSDoc as types (`.mjs`, `@ts-check`):** `@typedef`, `@param`, `@returns`, inline `@type` are the type system — keep them; apply the decision test only to prose in those blocks. - **End-of-turn:** cut duplicate tables/narration; after doc slim → [`docs-governance`](../skills/docs-governance/SKILL.md) slimming audit. -Related: [`concise-reporting`](./concise-reporting.md) · [`docs-lifecycle-sweep`](../skills/docs-lifecycle-sweep/SKILL.md). +Related: [`concise-reporting`](./concise-reporting.md) · [`docs-lifecycle-sweep`](../skills/docs-lifecycle-sweep/SKILL.md) · [`unslop`](../skills/unslop/SKILL.md). diff --git a/.agents/rules/unslop.md b/.agents/rules/unslop.md new file mode 100644 index 0000000..781828f --- /dev/null +++ b/.agents/rules/unslop.md @@ -0,0 +1,12 @@ +--- +description: Cut AI tells from any writing. Must always apply. +alwaysApply: true +--- + +# Unslop (STOP) + +Before sending a reply or committing prose, **read [`unslop`](../skills/unslop/SKILL.md)** and apply it. + +Scan for AI patterns, rewrite in human voice, self-audit remaining tells. Depth lives in the skill, not here. + +Related: [`authoring-discipline`](./authoring-discipline.md) · [`concise-reporting`](./concise-reporting.md). diff --git a/.agents/skills/agents-tier-system/SKILL.md b/.agents/skills/agents-tier-system/SKILL.md index fef1082..0c6a357 100644 --- a/.agents/skills/agents-tier-system/SKILL.md +++ b/.agents/skills/agents-tier-system/SKILL.md @@ -27,7 +27,7 @@ Always-on priming: [`.agents/rules/agents-tier-system.md`](../../rules/agents-ti 1. **Decide the tier** before writing. 2. **Tier 1 needs justification** — every turn? If file/intent scoped, demote to Tier 2 or Tier 3. 3. **Tier 2 globs** — broadest meaningful scope; pair with skill when applicable. -4. **Source + symlink** per [`agents-first-convention`](../../rules/agents-first-convention.md). +4. **Layout** per [`agents-first-convention`](../../rules/agents-first-convention.md) — rules: source + `.mdc` symlink; skills: `.agents/` only. ### Adding a new skill diff --git a/.agents/skills/authoring-discipline/SKILL.md b/.agents/skills/authoring-discipline/SKILL.md index 9458c33..2364e7c 100644 --- a/.agents/skills/authoring-discipline/SKILL.md +++ b/.agents/skills/authoring-discipline/SKILL.md @@ -10,4 +10,4 @@ Always-on priming: [`.agents/rules/authoring-discipline.md`](../../rules/authori Full checklists and examples: [`PROSE.md`](./PROSE.md). -Related: [`docs-governance`](../docs-governance/SKILL.md), [`docs-lifecycle-sweep`](../docs-lifecycle-sweep/SKILL.md), [`writing-great-skills`](../writing-great-skills/SKILL.md). +Related: [`docs-governance`](../docs-governance/SKILL.md), [`docs-lifecycle-sweep`](../docs-lifecycle-sweep/SKILL.md), [`writing-great-skills`](../writing-great-skills/SKILL.md), [`unslop`](../unslop/SKILL.md). diff --git a/.agents/skills/docs-governance/LIFECYCLE.md b/.agents/skills/docs-governance/LIFECYCLE.md index 2afe5e9..04ed318 100644 --- a/.agents/skills/docs-governance/LIFECYCLE.md +++ b/.agents/skills/docs-governance/LIFECYCLE.md @@ -9,7 +9,7 @@ Every doc in this repo lives in one of **two surface tiers** (codemap is small e | Tier | Substrate | Examples today | Governance shape | | ------------------------------------ | ---------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Tier B** — repo-wide cross-cutting | `docs/` at repo root | `docs/architecture.md`, `docs/glossary.md`, `docs/roadmap.md`, `docs/plans/`, `docs/research/`, `docs/agents.md`, `docs/benchmark.md`, `docs/golden-queries.md`, `docs/packaging.md`, `docs/why-codemap.md` | Single `docs/README.md` carrying the **canonical numbered Rules** + ownership table + lifecycle prescription; cross-cutting reference docs at the root; `plans/`, `research/`, and (when needed) `audits/` substrate folders | -| **Tier 0** — per-tooling-area | `.agents/`, `.cursor/`, `scripts/` | `.agents/rules/`, `.agents/skills/`, `.cursor/rules/` (symlinks), `.cursor/skills/` (symlinks), `templates/agents/` (bundled for `codemap agents init`) | Implicit governance via [`agents-first-convention`](../../rules/agents-first-convention.md) + [`agents-tier-system`](../../rules/agents-tier-system.md); no per-area `README.md` needed; the rules + skills are themselves the docs and earn their place per § 2 below | +| **Tier 0** — per-tooling-area | `.agents/`, `.cursor/`, `scripts/` | `.agents/rules/`, `.agents/skills/`, `.cursor/rules/` (`.mdc` symlinks), `templates/agents/` (bundled for `codemap agents init`) | Implicit governance via [`agents-first-convention`](../../rules/agents-first-convention.md) + [`agents-tier-system`](../../rules/agents-tier-system.md); no per-area `README.md` needed; the rules + skills are themselves the docs and earn their place per § 2 below | The same shared spine applies to both. The differences are what subset each tier needs. @@ -177,7 +177,7 @@ When present, the repo-root `docs/README.md` documents: `.agents/`, `.cursor/`, `scripts/`, `templates/agents/` — no per-area `README.md` needed (with the exception of `templates/agents/README.md`, which exists because the bundled templates ship to npm consumers and the README explains the consumer-vs-maintainer distinction). Governance lives in the rules + skills themselves: -- File-layout discipline → [`agents-first-convention`](../../rules/agents-first-convention.md) (`.agents/` is source of truth; `.cursor/` is symlinks) +- File-layout discipline → [`agents-first-convention`](../../rules/agents-first-convention.md) (`.agents/` is source of truth; rules also get `.cursor/rules/*.mdc` symlinks) - Tier system for rules → [`agents-tier-system`](../../rules/agents-tier-system.md) These rules are themselves docs; they're governed by their own existence test (do they earn their place per § 2?). diff --git a/.agents/skills/unslop/PROVENANCE.md b/.agents/skills/unslop/PROVENANCE.md new file mode 100644 index 0000000..ccfb254 --- /dev/null +++ b/.agents/skills/unslop/PROVENANCE.md @@ -0,0 +1,3 @@ +source: https://github.com/cursor/plugins +path: pstack/skills/unslop +fetched: 2026-08-19 diff --git a/.agents/skills/unslop/SKILL.md b/.agents/skills/unslop/SKILL.md new file mode 100644 index 0000000..2a93c06 --- /dev/null +++ b/.agents/skills/unslop/SKILL.md @@ -0,0 +1,80 @@ +--- +name: unslop +description: Cut AI tells from any writing. Must always apply. +--- + +# Unslop + +Edit text to remove AI patterns and add human voice. + +## Process + +1. Scan for the patterns below. +2. Rewrite. Preserve meaning, match intended tone. +3. Add soul (see next section). +4. Self-audit: "What makes this obviously AI generated?" Fix remaining tells. + +## Adding soul + +Removing patterns is half the job. Sterile, voiceless writing is just as obvious. + +- **Have opinions.** React to facts instead of neutrally listing pros and cons. +- **Vary rhythm.** Short sentences. Then longer ones that take their time. Mix it up. +- **Acknowledge complexity.** "Impressive but also kind of unsettling" beats "impressive." +- **Use "I" when it fits.** First person isn't unprofessional. +- **Let some mess in.** Perfect structure looks machine-made. +- **Be specific.** Not "this is concerning" but "there's something unsettling about agents churning away at 3am." + +## Patterns to detect and fix + +### Content + +1. **Puffery.** "pivotal moment", "testament to", "evolving landscape", "setting the stage for", "indelible mark", "deeply rooted". Cut puffery, state what happened. +2. **Name-dropping.** Listing media outlets without context. Pick one, say what was said. +3. **Superficial -ing phrases.** "highlighting...", "ensuring...", "reflecting...", "showcasing...", "fostering...". Delete or expand with real sources. +4. **Promotional language.** "nestled", "vibrant", "breathtaking", "groundbreaking", "renowned", "stunning", "must-visit". Use neutral descriptions. +5. **Vague attributions.** "Experts believe", "Industry reports suggest", "Some critics argue". Name the source or delete. +6. **Formulaic challenges.** "Despite challenges... continues to thrive." Replace with specific facts. + +### Language + +7. **AI vocabulary.** Additionally, crucial, delve, enduring, enhance, fostering, garner, interplay, intricate, landscape (abstract), pivotal, showcase, tapestry (abstract), testament, underscore, vibrant. Replace with plain words. +8. **Fancy ways to say "is".** "serves as", "stands as", "boasts", "features". Just say "is" or "has". +9. **"Not just X, but Y."** State the point directly instead. +10. **Rule of three.** Forcing ideas into groups of three. Use the natural number. +11. **Synonym cycling.** Protagonist, main character, central figure, hero all in one paragraph. Pick one, repeat it. +12. **False ranges.** "from X to Y" where X and Y aren't on a meaningful scale. List topics directly. + +### Style + +13. **Em dash overuse.** Avoid em dashes entirely. Use periods or commas only (no parentheses, no en dashes, no hyphen-as-dash substitutes). Em dashes are an AI tell, and reaching for parentheses instead just trades one tell for another. If a thought needs separation, end the sentence or use a comma. +14. **Colon overuse.** Colons are fine before a list or example. Not as mid-sentence connectors. "If you're coming from traditional automation: instead of registering event handlers, you describe conditions" adds nothing with the colon. Rewrite to let the point stand on its own without comparison framing. "Describing when the scheduler should fire works best as plain English." Same meaning, no crutch punctuation. +15. **Boldface overuse.** Don't bold every proper noun or acronym. +16. **Inline-header lists.** The tell is a bold label and colon that restates the line: "**Performance:** Performance improved...". Convert those to prose. A bold lead-in that ends in a period, names the item, and is followed by genuinely new detail ("**Schema in TypeScript.** Tables live in one file.") is fine, not a tell. +17. **Title case headings.** Use sentence case. +18. **Decorative emojis.** Remove from headings and bullets. +19. **Curly quotes.** Replace with straight quotes. + +### Communication artifacts + +20. **Chatbot phrases.** "I hope this helps!", "Let me know if...", "Of course!", "Certainly!", "Found the smoking gun!" Remove. +21. **Cutoff disclaimers.** "While specific details are limited..." Find sources or remove. +22. **Sycophantic tone.** "Great question! You're absolutely right!" Respond directly. + +### Filler + +23. **Filler phrases.** "In order to" becomes "To". "Due to the fact that" becomes "Because". "It is important to note that" gets deleted. +24. **Excessive hedging.** "could potentially possibly be argued that it might" becomes "may". +25. **Generic conclusions.** "The future looks bright." State specific plans or facts. + +### Jargon + +26. **Abstract metaphor nouns.** Substrate, wedge, vector, locus, vantage, nexus, primitive (as noun), harness (as metaphor), surface (as in "API surface"), bedrock, scaffolding (as metaphor), modality, paradigm, gold-plating, ratchet (as metaphor), evacuate (for moving code), endgame, north star, flywheel. These read as technical but usually have a plainer concrete word. "Substrate" becomes "base". "Wedge in" becomes "add". "Vector" becomes "way" or "method". "Gold-plating" becomes "more than the job needs". "Ratchet" becomes the mechanism's real name or "a limit that only tightens". "Evacuate" becomes "move out". "Endgame" becomes "the last phase". Pick the concrete word. + +### Plain speech + +27. **Say what it does, not how it feels.** "the database stays close at hand", "SQL you can read", "types that follow your schema" name a feeling. The fix names the mechanism or a number: "`.toSQL()` returns the exact string sent to the database", "a column rename fails the build". Ask what the sentence tells the reader to do or know, then write that. If you can't restate it as a concrete instruction, fact, or number, cut it. One more check: if the sentence could appear unchanged in another project's docs, it says nothing about this one. Cut it. +28. **Shorten or split dense sentences.** If the reader has to backtrack to parse a sentence, break it in two or drop clauses. One idea per sentence. +29. **Active voice.** Prefer it. Catch "is/are/was/were + past participle" and name the actor: "queries are validated" becomes "the compiler validates queries", "the file is parsed by the loader" becomes "the loader parses the file". Passive is fine only when the actor is unknown or genuinely doesn't matter. +30. **Cut adverbs, or use a stronger verb.** "runs quickly" becomes "is fast" or the number. "significantly improves" becomes the measured delta. An adverb propping up a weak verb means the verb is wrong. +31. **Prefer the plain word.** "utilize" becomes "use", "leverage" becomes "use", "facilitate" becomes "help", "numerous" becomes "many", "in the event that" becomes "if". The fancier synonym is rarely clearer. diff --git a/.agents/skills/writing-agents-config/SKILL.md b/.agents/skills/writing-agents-config/SKILL.md index d3c7912..50f5031 100644 --- a/.agents/skills/writing-agents-config/SKILL.md +++ b/.agents/skills/writing-agents-config/SKILL.md @@ -62,7 +62,7 @@ find .agents/skills -name SKILL.md -exec sh -c 'n=$(wc -l < "$1"); [ "$n" -gt 12 - **Tier-2 attach** — `agents-tier-system` (`agents/**` + `cursor/**`); `docs-governance` (`docs/**`, `.agents/**`); `architecture-priming` when authoring structural refactors. - **Intent-only skills** — `improve-codebase-architecture`, `domain-modeling`, `docs-lifecycle-sweep`, `diagnosing-bugs`, `tdd`, `pr-comment-fact-check`, `harden-pr`, `codemap`, `audit-pr-architecture`. No glob (no per-file tax). - **Ship policy** — `templates/agent-content/**` is served live (CLI/MCP/HTTP); `templates/agents/**` is copied by `codemap agents init`. Consumer surfaces describe behavior only ([`consumer-surfaces`](../../rules/consumer-surfaces.md)). -- **Symlink convention** — source under `.agents/`; `.cursor/rules/.mdc` and `.cursor/skills/` are symlinks only. +- **Layout convention** — source under `.agents/`; rules also get `.cursor/rules/.mdc` symlinks. Skills are not mirrored into `.cursor/skills/`. - **Cross-skill links** — relative `../skill/SKILL.md` and sibling files resolve reliably in Cursor agents. Relative links inside `.agents/` are an **intentional delta**, not drift. - **Indexer-first exploration** — skills that explore structure prefer `codemap query` over grep; the `codemap` rule is Tier 1 always-on. diff --git a/.changeset/cursor-native-skills.md b/.changeset/cursor-native-skills.md new file mode 100644 index 0000000..d86343b --- /dev/null +++ b/.changeset/cursor-native-skills.md @@ -0,0 +1,5 @@ +--- +"@stainless-code/codemap": patch +--- + +Stop mirroring skills into `.cursor/skills` during `codemap agents init`. Cursor loads skills from `.agents/skills/` natively, so the extra copies double-registered. diff --git a/.cursor/rules/unslop.mdc b/.cursor/rules/unslop.mdc new file mode 120000 index 0000000..71a7e71 --- /dev/null +++ b/.cursor/rules/unslop.mdc @@ -0,0 +1 @@ +../../.agents/rules/unslop.md \ No newline at end of file diff --git a/.cursor/skills/agents-tier-system b/.cursor/skills/agents-tier-system deleted file mode 120000 index d167cc7..0000000 --- a/.cursor/skills/agents-tier-system +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/agents-tier-system \ No newline at end of file diff --git a/.cursor/skills/ask-agents b/.cursor/skills/ask-agents deleted file mode 120000 index 5d6e99a..0000000 --- a/.cursor/skills/ask-agents +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/ask-agents \ No newline at end of file diff --git a/.cursor/skills/audit-pr-architecture b/.cursor/skills/audit-pr-architecture deleted file mode 120000 index e8394ce..0000000 --- a/.cursor/skills/audit-pr-architecture +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/audit-pr-architecture \ No newline at end of file diff --git a/.cursor/skills/authoring-discipline b/.cursor/skills/authoring-discipline deleted file mode 120000 index 8a5a195..0000000 --- a/.cursor/skills/authoring-discipline +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/authoring-discipline \ No newline at end of file diff --git a/.cursor/skills/codemap b/.cursor/skills/codemap deleted file mode 120000 index d827dc9..0000000 --- a/.cursor/skills/codemap +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/codemap \ No newline at end of file diff --git a/.cursor/skills/diagnosing-bugs b/.cursor/skills/diagnosing-bugs deleted file mode 120000 index b2134ff..0000000 --- a/.cursor/skills/diagnosing-bugs +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/diagnosing-bugs \ No newline at end of file diff --git a/.cursor/skills/docs-governance b/.cursor/skills/docs-governance deleted file mode 120000 index 4442f5c..0000000 --- a/.cursor/skills/docs-governance +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/docs-governance \ No newline at end of file diff --git a/.cursor/skills/docs-lifecycle-sweep b/.cursor/skills/docs-lifecycle-sweep deleted file mode 120000 index 0ee4b53..0000000 --- a/.cursor/skills/docs-lifecycle-sweep +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/docs-lifecycle-sweep \ No newline at end of file diff --git a/.cursor/skills/docs-voice b/.cursor/skills/docs-voice deleted file mode 120000 index a5a7397..0000000 --- a/.cursor/skills/docs-voice +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/docs-voice \ No newline at end of file diff --git a/.cursor/skills/domain-modeling b/.cursor/skills/domain-modeling deleted file mode 120000 index e672a60..0000000 --- a/.cursor/skills/domain-modeling +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/domain-modeling \ No newline at end of file diff --git a/.cursor/skills/grill-me b/.cursor/skills/grill-me deleted file mode 120000 index eea91a8..0000000 --- a/.cursor/skills/grill-me +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/grill-me \ No newline at end of file diff --git a/.cursor/skills/grill-with-docs b/.cursor/skills/grill-with-docs deleted file mode 120000 index f6cbb9c..0000000 --- a/.cursor/skills/grill-with-docs +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/grill-with-docs \ No newline at end of file diff --git a/.cursor/skills/grilling b/.cursor/skills/grilling deleted file mode 120000 index e712452..0000000 --- a/.cursor/skills/grilling +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/grilling \ No newline at end of file diff --git a/.cursor/skills/harden-pr b/.cursor/skills/harden-pr deleted file mode 120000 index 69b49c1..0000000 --- a/.cursor/skills/harden-pr +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/harden-pr \ No newline at end of file diff --git a/.cursor/skills/improve-codebase-architecture b/.cursor/skills/improve-codebase-architecture deleted file mode 120000 index be3dac9..0000000 --- a/.cursor/skills/improve-codebase-architecture +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/improve-codebase-architecture \ No newline at end of file diff --git a/.cursor/skills/pr-comment-fact-check b/.cursor/skills/pr-comment-fact-check deleted file mode 120000 index 0819e3d..0000000 --- a/.cursor/skills/pr-comment-fact-check +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/pr-comment-fact-check \ No newline at end of file diff --git a/.cursor/skills/product-tenets b/.cursor/skills/product-tenets deleted file mode 120000 index 07b8f76..0000000 --- a/.cursor/skills/product-tenets +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/product-tenets \ No newline at end of file diff --git a/.cursor/skills/tdd b/.cursor/skills/tdd deleted file mode 120000 index 2178bb8..0000000 --- a/.cursor/skills/tdd +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/tdd \ No newline at end of file diff --git a/.cursor/skills/teach b/.cursor/skills/teach deleted file mode 120000 index 8397735..0000000 --- a/.cursor/skills/teach +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/teach \ No newline at end of file diff --git a/.cursor/skills/tracer-bullets b/.cursor/skills/tracer-bullets deleted file mode 120000 index 11a5f2d..0000000 --- a/.cursor/skills/tracer-bullets +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/tracer-bullets \ No newline at end of file diff --git a/.cursor/skills/update-docs b/.cursor/skills/update-docs deleted file mode 120000 index 7459411..0000000 --- a/.cursor/skills/update-docs +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/update-docs \ No newline at end of file diff --git a/.cursor/skills/upgrade-packages b/.cursor/skills/upgrade-packages deleted file mode 120000 index d083b42..0000000 --- a/.cursor/skills/upgrade-packages +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/upgrade-packages \ No newline at end of file diff --git a/.cursor/skills/verify-after-each-step b/.cursor/skills/verify-after-each-step deleted file mode 120000 index 0b0998c..0000000 --- a/.cursor/skills/verify-after-each-step +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/verify-after-each-step \ No newline at end of file diff --git a/.cursor/skills/writing-agents-config b/.cursor/skills/writing-agents-config deleted file mode 120000 index 60448b7..0000000 --- a/.cursor/skills/writing-agents-config +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/writing-agents-config \ No newline at end of file diff --git a/.cursor/skills/writing-great-skills b/.cursor/skills/writing-great-skills deleted file mode 120000 index 07320a2..0000000 --- a/.cursor/skills/writing-great-skills +++ /dev/null @@ -1 +0,0 @@ -../../.agents/skills/writing-great-skills \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 1bbfd37..f22761c 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -63,16 +63,15 @@ Releases: **[@changesets/cli](https://github.com/changesets/changesets)** — ru **Upstream** skill and rules in this repo (e.g. `codemap`) stay **generic** — placeholder SQL and triggers, no product-specific paths. Consumer projects can run **`codemap agents init`** (ships **`templates/agents`** on npm; see [docs/agents.md](../docs/agents.md)) or **copy/symlink** manually, then **edit their copy** for team aliases and queries. Customization always belongs in the **consumer** repo. -Rules live under **`.agents/rules/`** as `.md` files; skills under **`.agents/skills//SKILL.md`**. Symlink into **`.cursor/`** with `.mdc` extension (Cursor requires `.mdc` for frontmatter parsing; see [agents-first-convention.md](../.agents/rules/agents-first-convention.md)). Full rule inventory and tier system: [docs/agents.md](../docs/agents.md) and [agents-tier-system.md](../.agents/rules/agents-tier-system.md). +Rules live under **`.agents/rules/`** as `.md` files; skills under **`.agents/skills//SKILL.md`**. Symlink rules into **`.cursor/rules/`** with `.mdc` extension (Cursor requires `.mdc` for frontmatter parsing and loads skills from `.agents/skills/` natively; see [agents-first-convention.md](../.agents/rules/agents-first-convention.md)). Full rule inventory and tier system: [docs/agents.md](../docs/agents.md) and [agents-tier-system.md](../.agents/rules/agents-tier-system.md). Example minimum symlink set: ```bash -mkdir -p .cursor/rules .cursor/skills +mkdir -p .cursor/rules for f in codemap agents-first-convention no-bypass-hooks verify-after-each-step tracer-bullets concise-reporting; do ln -sf "../../.agents/rules/${f}.md" ".cursor/rules/${f}.mdc" done -ln -sf ../../.agents/skills/codemap .cursor/skills/codemap ``` Thank you for helping make structural codebase queries fast and reusable for agents. diff --git a/AGENTS.md b/AGENTS.md index 3c12876..01bc246 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -12,6 +12,7 @@ Canonical read order: [`.agents/rules/agents-first-convention.md`](.agents/rules | Pre-commit hooks | [`.agents/rules/no-bypass-hooks.md`](.agents/rules/no-bypass-hooks.md) | | Verify each step | [`.agents/rules/verify-after-each-step.md`](.agents/rules/verify-after-each-step.md) | | Authoring discipline | [`.agents/rules/authoring-discipline.md`](.agents/rules/authoring-discipline.md) | +| Unslop | [`.agents/skills/unslop/SKILL.md`](.agents/skills/unslop/SKILL.md) | | Architecture priming | [`.agents/rules/architecture-priming.md`](.agents/rules/architecture-priming.md) | | Consumer surfaces | [`.agents/rules/consumer-surfaces.md`](.agents/rules/consumer-surfaces.md) | | Docs governance | [`.agents/rules/docs-governance.md`](.agents/rules/docs-governance.md) | diff --git a/docs/agents.md b/docs/agents.md index d720d01..4b149aa 100644 --- a/docs/agents.md +++ b/docs/agents.md @@ -35,8 +35,8 @@ codemap agents init --git-hooks # opt-in background index on git events codemap agents init --no-git-hooks # remove codemap hook blocks ``` -- **`--force`** — if **`.agents/`** already exists, delete only the **same file paths** that ship in **`templates/agents`** (under **`rules/`** and **`skills/`**), then copy those files from the template. Any **other** files next to them (your custom rules, extra skill dirs, notes at **`.agents/`** root, etc.) are **not** removed. IDE mirrors (`.cursor/rules`, …) sync **only bundled template paths** (today `rules/codemap.md` and `skills/codemap/SKILL.md`) — not your whole **`.agents/`** tree. **`--force`** overwrites an existing IDE mirror **only** when it has **``** or matches the **legacy mirror heuristic** (see [§ IDE mirror provenance](#ide-mirror-provenance-codemap-initmanaged)). Pointer files (`CLAUDE.md`, …): **`--force`** refreshes the `codemap-pointer` section only; your prose outside the markers is kept. Use **`--interactive`**, not a bare **`interactive`** argument (unknown tokens are rejected). -- **`--interactive`** — multiselect which tools to wire (see below); choose **symlink** vs **copy** for integrations that mirror **bundled** **`.agents/rules`** paths (and Cursor also bundled **`.agents/skills`**). Uses [**@clack/prompts**](https://github.com/bombshell-dev/clack); **non-TTY** runs exit with an error. Mutually exclusive with **`--targets`**. +- **`--force`** — if **`.agents/`** already exists, delete only the **same file paths** that ship in **`templates/agents`** (under **`rules/`** and **`skills/`**), then copy those files from the template. Any **other** files next to them (your custom rules, extra skill dirs, notes at **`.agents/`** root, etc.) are **not** removed. IDE mirrors (`.cursor/rules`, `.windsurf/rules`, …) sync **only bundled rule paths** (today `rules/codemap.md`) — not your whole **`.agents/`** tree and not skills. Cursor loads skills from **`.agents/skills/`** natively. **`--force`** overwrites an existing IDE mirror **only** when it has **``** or matches the **legacy mirror heuristic** (see [§ IDE mirror provenance](#ide-mirror-provenance-codemap-initmanaged)). Pointer files (`CLAUDE.md`, …): **`--force`** refreshes the `codemap-pointer` section only; your prose outside the markers is kept. Use **`--interactive`**, not a bare **`interactive`** argument (unknown tokens are rejected). +- **`--interactive`** — multiselect which tools to wire (see below); choose **symlink** vs **copy** for integrations that mirror **bundled** **`.agents/rules`** paths. Uses [**@clack/prompts**](https://github.com/bombshell-dev/clack); **non-TTY** runs exit with an error. Mutually exclusive with **`--targets`**. - **`--targets`** — comma-separated integration ids (`cursor`, `copilot`, `claude-md`, `windsurf`, `continue`, `cline`, `amazon-q`, `agents-md`, `gemini-md`) or repeated `--targets` flags. Wires IDE mirrors without a TTY. With **`--mcp`**, only MCP configs for the selected integrations are written (e.g. `cursor` alone → `.cursor/mcp.json` only, not root `.mcp.json`). Default **`--link-mode`** is **symlink** when omitted. Unknown ids exit 1 with the valid list. - **`--link-mode`** — `symlink` or `copy`; only valid when **`--targets`** includes a rule-mirror integration (`cursor`, `windsurf`, `continue`, `cline`, `amazon-q`). @@ -50,17 +50,17 @@ The user's root **`.gitignore`** is no longer touched by `codemap agents init`. All integrations reuse the **same** bundled content under **`.agents/`**. Symlink-style rows use one **link mode** for the whole run (**symlink** or **copy**) when any of them is selected. -| Integration | What gets created | Notes | -| ------------------------------------- | ------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- | -| **Cursor** | **`.cursor/rules`**, **`.cursor/skills`** → bundled **`.agents/`** paths | Per-file symlink or copy of **bundled** rule/skill paths only (not your whole **`.agents/`** tree). | -| **Windsurf** | **`.windsurf/rules`** → bundled **`.agents/rules`** paths | Bundled rules only. | -| **Continue** | **`.continue/rules`** → bundled **`.agents/rules`** paths | [Continue rules](https://docs.continue.dev/customize/rules). | -| **Cline** | **`.clinerules`** → bundled **`.agents/rules`** paths | Per-file symlink or copy (bundled paths only). | -| **Amazon Q** | **`.amazonq/rules`** → bundled **`.agents/rules`** paths | [AWS rules](https://aws.amazon.com/blogs/devops/mastering-amazon-q-developer-with-rules/). | -| **GitHub Copilot** | **`.github/copilot-instructions.md`** | Pointer + link to [GitHub Docs](https://docs.github.com/copilot/customizing-copilot/adding-custom-instructions-for-github-copilot). | -| **Claude Code** | **`CLAUDE.md`** | Root onboarding pointer. | -| **Zed / JetBrains / Aider (generic)** | **`AGENTS.md`** | Many tools read root **`AGENTS.md`**; JetBrains/Aider have no single mandated path — this file is the shared hook. | -| **Gemini** | **`GEMINI.md`** | For integrations that load **`GEMINI.md`**. | +| Integration | What gets created | Notes | +| ------------------------------------- | --------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | +| **Cursor** | **`.cursor/rules`** → bundled **`.agents/rules`** paths; skills stay in **`.agents/skills/`** | Per-file symlink or copy of **bundled** rule paths only (not your whole **`.agents/`** tree). Cursor loads skills from `.agents/skills/` natively. | +| **Windsurf** | **`.windsurf/rules`** → bundled **`.agents/rules`** paths | Bundled rules only. | +| **Continue** | **`.continue/rules`** → bundled **`.agents/rules`** paths | [Continue rules](https://docs.continue.dev/customize/rules). | +| **Cline** | **`.clinerules`** → bundled **`.agents/rules`** paths | Per-file symlink or copy (bundled paths only). | +| **Amazon Q** | **`.amazonq/rules`** → bundled **`.agents/rules`** paths | [AWS rules](https://aws.amazon.com/blogs/devops/mastering-amazon-q-developer-with-rules/). | +| **GitHub Copilot** | **`.github/copilot-instructions.md`** | Pointer + link to [GitHub Docs](https://docs.github.com/copilot/customizing-copilot/adding-custom-instructions-for-github-copilot). | +| **Claude Code** | **`CLAUDE.md`** | Root onboarding pointer. | +| **Zed / JetBrains / Aider (generic)** | **`AGENTS.md`** | Many tools read root **`AGENTS.md`**; JetBrains/Aider have no single mandated path — this file is the shared hook. | +| **Gemini** | **`GEMINI.md`** | For integrations that load **`GEMINI.md`**. | ## Git hooks (opt-in freshness) @@ -95,6 +95,8 @@ Bundled templates ship **``**. **Copy mode** writes **Upgrading from pre-marker init:** Re-run **`codemap agents init --force`** with your IDE targets selected (or **`--interactive`**). Copy-mode mirrors from older inits are migrated once via the legacy heuristic; symlink mode needs no mirror migration (init reads markers through the link into **`.agents/`**). If **`--force`** still refuses a mirror path, delete that single file manually and re-run init. +Cursor no longer writes **`.cursor/skills/`**. Leftover Codemap-managed skill mirrors from an older init still register as duplicates until you delete those files (keep any skill dirs you authored yourself). Init does not garbage-collect that directory. + ## Live fetch surface (CLI + MCP + HTTP) Once `agents init` has written the pointer templates, the consumer's disk holds ~18-line SKILL + ~25-line rule. The actual content is served live: diff --git a/src/agents-init-interactive.ts b/src/agents-init-interactive.ts index 29846e0..d2d73e6 100644 --- a/src/agents-init-interactive.ts +++ b/src/agents-init-interactive.ts @@ -31,7 +31,7 @@ const INTEGRATION_OPTIONS: { { value: "cursor", label: "Cursor", - hint: ".cursor/rules + skills → .agents/", + hint: ".cursor/rules → .agents/rules (skills load from .agents/skills/)", }, { value: "claude-md", diff --git a/src/agents-init.test.ts b/src/agents-init.test.ts index ea3d97f..c29a658 100644 --- a/src/agents-init.test.ts +++ b/src/agents-init.test.ts @@ -392,9 +392,10 @@ describe("runAgentsInit", () => { expect( readFileSync(join(dir, ".cursor", "rules", "codemap.mdc"), "utf-8"), ).toContain("codemap"); + expect(existsSync(join(dir, ".cursor", "skills"))).toBe(false); expect( readFileSync( - join(dir, ".cursor", "skills", "codemap", "SKILL.md"), + join(dir, ".agents", "skills", "codemap", "SKILL.md"), "utf-8", ).length, ).toBeGreaterThan(100); @@ -415,11 +416,9 @@ describe("runAgentsInit", () => { }), ).toBe(true); const rulesDir = join(dir, ".cursor", "rules"); - const skillsDir = join(dir, ".cursor", "skills"); expect(lstatSync(rulesDir).isSymbolicLink()).toBe(false); - expect(lstatSync(skillsDir).isSymbolicLink()).toBe(false); expect(lstatSync(rulesDir).isDirectory()).toBe(true); - expect(lstatSync(skillsDir).isDirectory()).toBe(true); + expect(existsSync(join(dir, ".cursor", "skills"))).toBe(false); for (const rel of resolveBundledAgentMirrorPaths().ruleFiles) { const cursorRel = rel.endsWith(".md") ? rel.slice(0, -3) + ".mdc" : rel; expect( @@ -428,13 +427,6 @@ describe("runAgentsInit", () => { ).isSymbolicLink(), ).toBe(true); } - for (const rel of resolveBundledAgentMirrorPaths().skillFiles) { - expect( - lstatSync( - join(dir, ".cursor", "skills", ...rel.split("/")), - ).isSymbolicLink(), - ).toBe(true); - } } finally { rmSync(dir, { recursive: true, force: true }); } diff --git a/src/agents-init.ts b/src/agents-init.ts index 3285183..8d296e5 100644 --- a/src/agents-init.ts +++ b/src/agents-init.ts @@ -432,19 +432,12 @@ export function applyAgentsInitTargets( ); } - const { ruleFiles: bundledRuleFiles, skillFiles: bundledSkillFiles } = - resolveBundledAgentMirrorPaths(); + const { ruleFiles: bundledRuleFiles } = resolveBundledAgentMirrorPaths(); for (const t of targets) { switch (t) { case "cursor": { - applyCursorIntegration( - projectRoot, - bundledRuleFiles, - bundledSkillFiles, - linkMode, - force, - ); + applyCursorIntegration(projectRoot, bundledRuleFiles, linkMode, force); break; } case "windsurf": { @@ -540,14 +533,11 @@ function mdToMdc(rel: string): string { function applyCursorIntegration( projectRoot: string, ruleRelPaths: string[], - skillRelPaths: string[], linkMode: AgentsInitLinkMode, force: boolean, ): void { const agentsRules = join(projectRoot, ".agents", "rules"); - const agentsSkills = join(projectRoot, ".agents", "skills"); const cursorRules = join(projectRoot, ".cursor", "rules"); - const cursorSkills = join(projectRoot, ".cursor", "skills"); mkdirSync(join(projectRoot, ".cursor"), { recursive: true }); @@ -560,23 +550,15 @@ function applyCursorIntegration( force, mdToMdc, ); - symlinkFilesGranular( - agentsSkills, - cursorSkills, - skillRelPaths, - ".cursor/skills", - force, - ); console.log( - ` Linked ${ruleRelPaths.length} bundled rule file(s) and ${skillRelPaths.length} bundled skill file(s) under .cursor/ → .agents/`, + ` Linked ${ruleRelPaths.length} bundled rule file(s) under .cursor/rules → .agents/rules (skills load from .agents/skills/ natively)`, ); return; } copyFilesGranular(agentsRules, cursorRules, ruleRelPaths, force, mdToMdc); - copyFilesGranular(agentsSkills, cursorSkills, skillRelPaths, force); console.log( - " Copied bundled rules and skills into .cursor/rules and .cursor/skills", + " Copied bundled rules into .cursor/rules (skills load from .agents/skills/ natively)", ); }