Skip to content

Add native Cursor plugin via canonical harness paths#319

Open
harshav167 wants to merge 3 commits into
pbakaus:mainfrom
harshav167:feat/cursor-native-plugin
Open

Add native Cursor plugin via canonical harness paths#319
harshav167 wants to merge 3 commits into
pbakaus:mainfrom
harshav167:feat/cursor-native-plugin

Conversation

@harshav167

@harshav167 harshav167 commented Jun 29, 2026

Copy link
Copy Markdown

Summary

Adds a native Cursor plugin by generating .cursor-plugin/plugin.json and .cursor-plugin/marketplace.json from the build. The manifest points at the canonical harness tree already shipped in this repo (.cursor/skills/, .claude/agents/, .cursor/hooks.json) instead of copying a duplicate plugin-cursor/ payload.

Cursor users can install from the marketplace (source: "./") or symlink the repo locally. The pre-write blocking hook reuses the same .cursor/hooks.json path and script as project-level installs.

Type of change

  • Build system / tooling
  • Documentation update

Checklist

  • Source files updated in source/ (skill/ unchanged; build/transformer/test sources updated)
  • bun run build ran successfully
  • bun test passes (tests/hook-build.test.mjs, tests/validate-plugin-versions.test.js)
  • Tested with at least one provider (Cursor — smoke-tested pre-write hook)
  • README / DEVELOP.md updated if needed

Test plan

  • bun run build:release
  • bun test tests/hook-build.test.mjs
  • bun test tests/validate-plugin-versions.test.js
  • Install plugin locally (ln -sf "$(pwd)" ~/.cursor/plugins/local/impeccable) and verify skill, agent, and hook under Customize

@harshav167 harshav167 marked this pull request as ready for review June 29, 2026 16:00
@harshav167 harshav167 requested a review from pbakaus as a code owner June 29, 2026 16:00
@harshav167 harshav167 marked this pull request as draft June 29, 2026 16:10
@harshav167 harshav167 changed the title Add native Cursor plugin generated by the build Add native Cursor plugin via canonical harness paths Jun 29, 2026
@harshav167 harshav167 marked this pull request as ready for review June 29, 2026 16:14
@greptile-apps

greptile-apps Bot commented Jun 29, 2026

Copy link
Copy Markdown

Greptile Summary

This PR introduces a native Cursor plugin by generating .cursor-plugin/plugin.json and .cursor-plugin/marketplace.json from the build, pointing at the canonical harness paths (.cursor/skills/, .claude/agents/, .cursor/hooks.json) that already exist in the repo rather than duplicating a separate plugin-cursor/ payload.

  • Build: build.js is extended to generate the two Cursor manifest files after the Claude Code plugin subtree is written; the Cursor manifest reuses rootManifest fields (version, author, description, homepage) and overrides skills, agents, and hooks to point at canonical harness paths.
  • Version drift guard: validate-plugin-versions.js now checks .cursor-plugin/marketplace.json, .cursor-plugin/plugin.json, and .cursor/skills/impeccable/SKILL.md against the root source-of-truth version, with corresponding unit tests.
  • Housekeeping: README option numbering updated, .cursor/settings.json added to .gitignore, and hooks.js comment clarified to mention the shared Cursor hooks path.

Confidence Score: 5/5

Safe to merge; the new Cursor plugin manifests are generated from the same root source of truth already used for the Claude Code plugin, and the version-drift guard now covers all three new files.

All new files are generated by the build and cross-checked by the expanded version validator. Tests cover both drift-detection and the happy path. The only lingering concern — a hardcoded command count string in the marketplace metadata.description template — was already raised in a prior review comment and does not affect runtime correctness.

scripts/build.js — the hardcoded '23 commands' in the cursor marketplace metadata.description template is not validated by generateCounts; already flagged in a prior comment.

Important Files Changed

Filename Overview
scripts/build.js Generates .cursor-plugin manifests from rootManifest; the metadata.description string hardcodes "23 commands" and is not in filesToCheck, so it will silently drift if the command count changes (already flagged in a prior review comment).
scripts/lib/validate-plugin-versions.js Correctly adds .cursor-plugin/marketplace.json, .cursor-plugin/plugin.json, and .cursor/skills/impeccable/SKILL.md to the version-drift checks; logic is clean and consistent with existing checks.
tests/validate-plugin-versions.test.js Adds two well-structured test cases for drifted and matching Cursor plugin files; fixtures cover all three new version-bearing paths.
tests/hook-build.test.mjs New integration test verifies plugin.json points at canonical harness paths, hooks manifest matches builder output, and all required canonical files exist; correct and thorough.
.cursor-plugin/plugin.json Generated manifest; skills/agents/hooks fields correctly point at canonical harness paths; version matches root.
.cursor-plugin/marketplace.json Generated marketplace manifest; source "./" correctly points at repo root; version matches plugin.json.
scripts/lib/transformers/hooks.js Comment-only update clarifying the shared Cursor hooks path; no logic changes.
README.md Option numbering updated and Cursor native plugin install instructions added; accurate and complete.
.gitignore Correctly gitignores .cursor/settings.json (per-developer workspace settings).

Reviews (2): Last reviewed commit: "Point Cursor plugin at canonical harness..." | Re-trigger Greptile

harshav167 and others added 3 commits July 7, 2026 14:30
Generate a Cursor-native plugin subtree at ./plugin-cursor/ alongside the
existing Claude plugin, so Cursor users can install Impeccable as a real
plugin (skill + manual-edit-applier agent + blocking pre-write hook) instead
of copying skill folders.

- build.js: emit plugin-cursor/ (.cursor-plugin/plugin.json, skills/, agents/,
  hooks/hooks.json, README) and a root .cursor-plugin/marketplace.json
- transformers/hooks.js: add buildCursorPluginHooksManifest with
  plugin-root-relative hook command paths
- validate-plugin-versions.js: extend the version-drift guard to the
  Cursor plugin subtree
- tests: unit + integration coverage for the Cursor plugin hook and packaged
  artifacts; version-guard drift cases
- README: document the native Cursor plugin install option

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
… skills.

Co-authored-by: Cursor <cursoragent@cursor.com>
@harshav167 harshav167 force-pushed the feat/cursor-native-plugin branch from 8a62e60 to 60a5e81 Compare July 7, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant