Feat/cursor-support - #1
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds Cursor support and a persistent “learnings” self-improvement overlay to the Habit plugin/tooling, and replaces the ad-hoc test script with a Bats-based test suite plus CI.
Changes:
- Add Cursor-compatible hook wiring, transcript discovery, and a manual installer path.
- Introduce persistent “learnings” (write/read/prune) and update skills/distill flow to use them.
- Migrate tests to Bats, add ShellCheck linting and GitHub Actions CI.
Reviewed changes
Copilot reviewed 21 out of 26 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
test/unit.bats |
New unit tests for core lib behaviors (resolve/frontmatter/read/index/log/transcript extraction/write). |
test/triggers.bats |
New tests for trigger semantics and prune-log bounds, including Cursor session detection. |
test/test_helper.bash |
Shared fixtures + assertion helpers for the Bats suite. |
test/static.bats |
New static checks for skill dialect/conventions and manifest parity/validity. |
test/integration.bats |
New end-to-end tests for CLI, hooks, install linking, learnings, corruption tolerance. |
test_staged_changes.sh |
Removes the legacy custom test harness script. |
skills/watch/SKILL.md |
Rename + add setup flow using breadcrumb-resolved HABIT_BIN/HABIT_SID; Cursor-friendly instructions. |
skills/suggest/SKILL.md |
Rename + add learnings overlay + friction logging guidance; Cursor-friendly setup. |
skills/run/SKILL.md |
Rename + add learnings overlay + friction logging guidance; Cursor-friendly setup. |
skills/habit/SKILL.md |
Add setup + learnings overlay; update routing language away from hardcoded /habit: mentions. |
skills/edit/SKILL.md |
Rename + add setup + learnings overlay; clarify load/write/verify steps. |
skills/distill/SKILL.md |
Rename + add distill-preload precondition; switch self-improve to learnings model; update lifecycle. |
README.md |
Document Cursor support, manual install, updated distill/self-improvement behavior, and updated uninstall command. |
Makefile |
Add lint (ShellCheck) and test (Bats) targets; check aggregates both. |
install.sh |
New manual installer that links repo into Claude/Cursor skills and wires Cursor hook script link. |
hooks/hooks.json |
Update Claude Code hook commands to rely on stdin payload parsing (no field args). |
hooks/hooks.cursor.json |
New Cursor hook config to call the shared dispatcher. |
hooks/habit-hook.sh |
Rewrite hook dispatcher to parse stdin JSON for both Claude/Cursor and resolve transcript path fallback. |
bin/lib/session.sh |
Write/clear breadcrumb on session start/end to support cross-host skill setup. |
bin/lib/query.sh |
Add Cursor transcript parsing support; unify Claude/Cursor session discovery; update trigger semantics. |
bin/lib/learnings.sh |
New persistent learnings store: write/read/prune. |
bin/lib/common.sh |
Add Cursor transcript discovery helpers; add breadcrumb helpers; add LEARN_RETAIN and learnings in DEFAULT_STATE. |
bin/habit-tools.sh |
Wire new learnings commands, env-context, and distill-preload dispatch; update usage list. |
.github/workflows/ci.yml |
New CI workflow running ShellCheck and Bats tests. |
.cursor-plugin/plugin.json |
Add Cursor plugin manifest. |
.claude-plugin/plugin.json |
Bump plugin version to 2.0.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.