feat(integrations): Cursor + install.sh --dry-run + stale-doc sweep - #32
Conversation
Phase 1 of the post-1.0 roadmap. No wire-format change; all additive.
integrations/cursor/ — mirrors integrations/claude-code/ shape:
- install.sh registers ~/.cursor/mcp.json globally and optionally
copies .cursor/rules/{crumb-export,crumb-import,crumb-it}.mdc
into the current project. Marker-tracked, idempotent.
- uninstall.sh respects the install.sh marker (preserves
user-managed entries).
- mcp.json.template uses the same __CRUMB_PYTHON__ /
__CRUMB_INSTALL_PATH__ substitution shape as Claude Code.
- Three .mdc rule files: crumb-it is alwaysApply: true (ambient
format recognition); crumb-export and crumb-import fire on
demand or on .crumb file open.
install.sh --dry-run on both Claude Code and Cursor installers.
Shows every action (mkdir, file write, MCP merge, prompt) without
touching the filesystem. Reject unknown args with exit 2.
Stale design-doc sweep:
- docs/v1.2-ref-resolution.md, docs/v1.2-fold-heuristic.md:
cleared TODO(author) markers; "shipped in v=1.3" headers.
- docs/v1.3-DRAFT.md: "shipped" header.
- docs/v1.4-scoping.md: "shipped" header.
- docs/v1.4/{agent-failure-modes,handoff-deadlines,typed-checks}.md:
"shipped in v=1.4" headers.
- docs/integrations/cursor.md: "Plan only" → "shipping".
- grep -rln "TODO(author)" docs/ now returns zero.
README: new "Native integrations" section with one-line install
pointers for Claude Code and Cursor; CLI install block now mentions
crumb hello and crumb doctor.
21 new tests in tests/test_integrations_smoke.py:
- per-integration installer syntax + --help + --dry-run + unknown-arg
- MCP template renders to valid JSON after substitution
- Cursor rule frontmatter checks (crumb-it always-apply, others not)
- Claude Code slash command frontmatter checks
- uninstaller marker-check assertion
673 passing total (was 652).
https://claude.ai/code/session_01Ewf1noyQc9gc6DmohyR32z
✅ Shadow AI ScanNo Shadow AI findings detected at or above medium risk. |
CRUMB Bench Results
Powered by crumb-format — two-stage context compression |
1 similar comment
CRUMB Bench Results
Powered by crumb-format — two-stage context compression |
First post-1.0 minor. No wire-format change (stays at v=1.4). Semver-minor: adds Cursor integration (PR #32), three top-level CLI commands (PR #31: hello, doctor, friendlier argparse errors), --dry-run on installers, stale-doc cleanup. CLI_VERSION → 1.1.0. pyproject.toml version → 1.1.0. 673 tests passing. 39/39 examples + fixtures green on Python and Node.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dfc3880925
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| echo "$CRUMB_MANAGED_MARKER" | ||
| cat "$src" |
There was a problem hiding this comment.
Keep Cursor rule frontmatter as first line
Do not prepend the managed-marker line before copying .mdc rules, because this makes installed rule files start with <!-- ... --> instead of ---. The integration’s own rule contract assumes frontmatter is at the top (see tests/test_integrations_smoke.py asserting text.startswith("---\n")), so a non-dry-run install can write rule files Cursor may not parse/apply, breaking crumb-export/crumb-import/crumb-it behavior for end users.
Useful? React with 👍 / 👎.
Summary
Phase 1 of the post-1.0 roadmap. Doubles the IDE coverage (Claude Code + Cursor today) and lays trust groundwork (
--dry-runpreviews + integration smoke tests + stale-doc cleanup). No wire-format change; all additive.What ships
integrations/cursor/— Cursor is now a one-line installbash <(curl -fsSL https://raw.githubusercontent.com/XioAISolutions/crumb-format/main/integrations/cursor/install.sh)install.sh~/.cursor/mcp.json; optionally copies rule files into./.cursor/rules/. Idempotent, marker-tracked.uninstall.shmcp.json.template__CRUMB_PYTHON__/__CRUMB_INSTALL_PATH__substitution shape as Claude Code. Carries_managed_byfield.rules/crumb-export.mdckind=task(or right kind) crumb.rules/crumb-import.mdc.crumbfile is opened or pasted.rules/crumb-it.mdcalwaysApply: true— ambient format recognition for the verbal trigger.README.mdMirrors the Claude Code integration's three-artifact pattern. Cursor uses
.cursor/rules/*.mdcfiles instead of slash commands; the per-project rules install only when the user is in a.cursor/-tracked dir or opts in interactively.install.sh --dry-runBoth
claude-code/install.shandcursor/install.shaccept--dry-run(or-n). Every write —mkdir, file write, MCP merge, CLAUDE.md append prompt — prints what it would do without touching the filesystem.--helpand unknown-arg rejection (exit 2) also added.Stale-doc sweep
Eight docs that described draft-or-shipped designs are now correctly labeled.
grep -rln "TODO(author)" docs/returns zero.docs/v1.2-ref-resolution.md## TODO(author)docs/v1.2-fold-heuristic.md## TODO(author)docs/v1.3-DRAFT.mddocs/v1.4-scoping.mddocs/v1.4/handoff-deadlines.mddocs/v1.4/typed-checks.mddocs/v1.4/agent-failure-modes.mddocs/integrations/cursor.mdREADME
Added a "Native integrations —
crumb itinside your AI tool" section right after the CLI install block, with one-line install commands for both Claude Code and Cursor and pointers to the per-integration READMEs. Existing CLI block now mentionscrumb helloandcrumb doctorso new users see them.Test plan
python3 -m pytest tests/ -q— 673 passing (was 652; +21 intests/test_integrations_smoke.py)bash -n integrations/{claude-code,cursor}/install.sh integrations/{claude-code,cursor}/uninstall.sh— all syntax-cleanbash integrations/cursor/install.sh --dry-runproduces clean preview, writes nothingbash integrations/claude-code/install.sh --dry-rundittobash integrations/{claude-code,cursor}/install.sh --bogusexits 2 with clear error.mdcrules pass frontmatter validation;crumb-itisalwaysApply: true, othersfalse_managed_bymarker before deletinggrep -rln "TODO(author)" docs/returns nothingStats
19 files changed, +807 / -41.
integrations/cursor/(new)integrations/claude-code/install.sh--dry-run,--help, unknown-arg rejectiontests/test_integrations_smoke.py(new)docs/README.mdCHANGELOG.mdOut of scope (for follow-ups)
docs/integrations/.tests/test_e2e_roundtrip.py) — Phase 2 work. This PR's smoke tests cover installer shape; e2e coversnew → handoff → receive → resume.crumb contextglow-up — Phase 2 work.Sequencing
Stacks cleanly on top of
mainpost-PR-31. Phase 2 (e2e tests + JSON schema +crumb context) can start once this lands.https://claude.ai/code/session_01Ewf1noyQc9gc6DmohyR32z
Generated by Claude Code