Automatically and incrementally keeps AGENTS.md up to date by mining your
AI-assisted coding transcripts. Works in both Cursor and Claude Code —
teammates using either tool contribute to the same shared memory file.
The plugin watches your conversation turns and periodically extracts recurring
corrections and durable workspace facts, then commits them to a dedicated
continual-learning branch. Your team curates what lands on main.
You're using an AI coding agent — let it handle the setup. Copy the prompt below and paste it into a new conversation.
Install the continual-learning plugin from the GitHub repo
samdu/continual-learning-plugin. First ensure bun is installed (bun --version; if missing, install it withcurl -fsSL https://bun.sh/install | bash). Then register the repo as a plugin marketplace and install the plugin:claude plugin marketplace add samdu/continual-learning-plugin claude plugin install continual-learningVerify the plugin is installed with
claude plugin list.
Copy this prompt into a Cursor conversation:
Install the continual-learning plugin from
https://github.com/samdu/continual-learning-plugin. First ensure bun is installed (bun --version; if missing, install it withcurl -fsSL https://bun.sh/install | bash). Then clone the repo into the Cursor plugin cache so it's available across all projects:COMMIT=$(git ls-remote https://github.com/samdu/continual-learning-plugin HEAD | cut -f1) git clone --depth 1 https://github.com/samdu/continual-learning-plugin.git \ ~/.cursor/plugins/cache/cursor-public/continual-learning/$COMMITAfter cloning, reload the Cursor window (Cmd+Shift+P → "Developer: Reload Window") so Cursor picks up the new plugin.
If your team is on a Cursor Teams or Enterprise plan, an admin can also import this repo as a team marketplace (Dashboard > Settings > Plugins > Import) for one-click installs.
Manual installation steps
Bun is required — the hook and helper scripts are TypeScript
files executed directly via bun run.
curl -fsSL https://bun.sh/install | bashNote (macOS/zsh): The bun installer adds
~/.bun/binto yourPATHin~/.zshrc, but hooks run as non-interactive processes that don't source.zshrc. If the hook fails withcommand not found: bun, add the PATH entry to~/.zprofileinstead:echo 'export PATH="$HOME/.bun/bin:$PATH"' >> ~/.zprofile
Clone the repo into the Cursor plugin cache (user-level, applies to all projects):
COMMIT=$(git ls-remote https://github.com/samdu/continual-learning-plugin HEAD | cut -f1)
git clone --depth 1 https://github.com/samdu/continual-learning-plugin.git \
~/.cursor/plugins/cache/cursor-public/continual-learning/$COMMITThen reload the Cursor window (Cmd+Shift+P → "Developer: Reload Window").
Team marketplace (Teams/Enterprise plans): An admin can import this GitHub repo via Dashboard > Settings > Plugins > Import instead.
This repo ships a marketplace.json manifest, so it can act as its own
single-plugin marketplace. Installation is two steps: register the repo as
a marketplace source, then install the plugin from it.
From inside an interactive Claude Code session (slash commands):
/plugin marketplace add samdu/continual-learning-plugin
/plugin install continual-learning
From your terminal (CLI):
claude plugin marketplace add samdu/continual-learning-plugin
claude plugin install continual-learningTip: You may see the
plugin@marketplacesyntax elsewhere (e.g.continual-learning@continual-learning). The@marketplacequalifier is only needed when the same plugin name exists in multiple marketplaces. For most setups you can omit it.
A stop hook fires after each completed conversation turn. When enough turns
have accumulated and enough time has passed, the hook tells the agent to run
the continual-learning skill, which:
- Reads the current
AGENTS.mdfrom thecontinual-learningbranch in git (not the local filesystem). - Scans transcripts from both Cursor and Claude Code across all worktrees.
- Processes only new or changed transcripts (incremental index).
- Extracts high-signal patterns — recurring corrections, durable workspace facts.
- Commits the updated
AGENTS.mdto thecontinual-learningbranch and pushes.
Tier 1 (automated): Each skill run commits directly to a long-lived
continual-learning branch. No PR, no review friction — learnings accumulate immediately.
Tier 2 (manual curation): The team opens a PR from continual-learning → main
whenever they're ready to review and merge. Squash-merge is recommended for clean history.
This keeps the fast path frictionless while giving the team a curation checkpoint
before learnings land on main.
Falls back to writing AGENTS.md directly to the workspace root for repos without
a remote.
Default cadence (after trial window expires):
| Parameter | Default |
|---|---|
| Minimum turns | 10 |
| Minimum minutes since last run | 120 |
Trial mode (first 24 hours after install):
| Parameter | Default |
|---|---|
| Minimum turns | 3 |
| Minimum minutes since last run | 15 |
All settings can be overridden via environment variables:
CONTINUAL_LEARNING_MIN_TURNSCONTINUAL_LEARNING_MIN_MINUTESCONTINUAL_LEARNING_TRIAL_MODE(1/true/yes/on)CONTINUAL_LEARNING_TRIAL_MIN_TURNSCONTINUAL_LEARNING_TRIAL_MIN_MINUTESCONTINUAL_LEARNING_TRIAL_DURATION_MINUTES
Legacy CONTINUOUS_LEARNING_* prefixes also work.
If you use multiple worktrees of the same repo (common for parallel AI coding sessions), the plugin collapses them to repo level:
- Shared cadence state: The hook resolves the main worktree via
git rev-parse --git-common-dirand stores state/index there. Multiple worktrees won't redundantly trigger learning runs. - Cross-worktree transcript discovery: When the skill runs, it calls
git worktree list --porcelainto find all worktree paths, then scans transcript directories for each. Learnings from any worktree are visible everywhere. - Shared output via git: All worktrees commit to the same
continual-learningbranch, so learnings from any checkout are visible to every teammate.
Falls back to single-path behavior for non-git workspaces.
Each harness stores its own cadence state and transcript index under the main worktree root (or workspace root if not in a git repo):
| Harness | State directory |
|---|---|
| Cursor | .cursor/hooks/state/ |
| Claude Code | .claude/hooks/state/ |
The skill maintains two sections:
## Learned User Preferences## Learned Workspace Facts
Plain bullet points only. No metadata, no confidence scores.
MIT
