Skip to content

Cursor plugin specification and official plugins

TypeScript

Simplify continual-learning to one subagent

ericzakariassonac93d26be3c3
diff --git a/continual-learning/README.md b/continual-learning/README.md
index 610e1e52..410fe925 100644
--- a/continual-learning/README.md
+++ b/continual-learning/README.md
@@ -5,8 +5,8 @@ Automatically and incrementally keeps `AGENTS.md` up to date from transcript cha
The plugin combines:
- A `stop` hook that decides when to trigger learning.
-- A `continual-learning` skill that mines only high-signal transcript deltas.
-- An `agents-memory-updater` subagent that owns the `AGENTS.md` merge/write step.
+- A `continual-learning` skill that orchestrates the learning flow.
+- An `agents-memory-updater` subagent that mines new or changed transcripts and updates `AGENTS.md`.
It is designed to avoid noisy rewrites by:
@@ -24,13 +24,13 @@ It is designed to avoid noisy rewrites by:
On eligible `stop` events, the hook may emit a `followup_message` that asks the agent to run the `continual-learning` skill.
-The skill is marked `disable-model-invocation: true`, so it will not be auto-selected during normal model invocation. When it does run, it delegates the final `AGENTS.md` merge/write work to the `agents-memory-updater` subagent.
+The skill is marked `disable-model-invocation: true`, so it will not be auto-selected during normal model invocation. When it does run, it delegates the full memory update flow to `agents-memory-updater`.
The hook keeps local runtime state in:
- `.cursor/hooks/state/continual-learning.json` (cadence state)
-The skill uses an incremental transcript index at:
+The updater uses an incremental transcript index at:
- `.cursor/hooks/state/continual-learning-index.json`
diff --git a/continual-learning/agents/agents-memory-updater.md b/continual-learning/agents/agents-memory-updater.md
index a2b2e700..631429f8 100644
--- a/continual-learning/agents/agents-memory-updater.md
+++ b/continual-learning/agents/agents-memory-updater.md
@@ -1,20 +1,16 @@
---
name: agents-memory-updater
-description: Merge high-signal continual-learning updates into `AGENTS.md` and keep the incremental transcript index in sync. Use from the `continual-learning` skill when transcript deltas may change durable memory.
+description: Mine high-signal transcript deltas, update `AGENTS.md`, and keep the incremental transcript index in sync.
model: inherit
---
# AGENTS.md memory updater
-Own the actual `AGENTS.md` write for continual learning.
+Own the full memory update flow for continual learning.
-## Inputs
+## Trigger
-- Existing memory file: `AGENTS.md`
-- Incremental index: `.cursor/hooks/state/continual-learning-index.json`
-- Transcript root: `~/.cursor/projects/<workspace-slug>/agent-transcripts/`
-- Any narrowed list of changed transcripts from the caller
-- Any extracted candidate bullets from the caller
+Use from `continual-learning` when transcript deltas may produce durable memory updates.
## Workflow
@@ -22,19 +18,18 @@ Own the actual `AGENTS.md` write for continual learning.
- `## Learned User Preferences`
- `## Learned Workspace Facts`
2. Load the incremental index if present.
-3. Use the caller's narrowed transcript set or extracted bullets when provided. Otherwise, inspect only transcript files that are new or whose mtimes are newer than the index.
-4. Keep only high-signal reusable information:
- - recurring user corrections/preferences
- - durable workspace facts
+3. Inspect only transcript files under `~/.cursor/projects/<workspace-slug>/agent-transcripts/` that are new or have newer mtimes than the index.
+4. Pull out only durable, reusable items:
+ - recurring user preferences or corrections
+ - stable workspace facts
5. Update `AGENTS.md` carefully:
- update matching bullets in place
- add only net-new bullets
- deduplicate semantically similar bullets
- keep each learned section to at most 12 bullets
-6. Write back the incremental index:
- - store latest mtimes for processed files
- - remove entries for files that no longer exist
-7. If no meaningful updates exist, leave `AGENTS.md` unchanged and respond exactly: `No high-signal memory updates.`
+6. Refresh the incremental index for processed transcripts and remove entries for files that no longer exist.
+7. If the merge produces no `AGENTS.md` changes, leave `AGENTS.md` unchanged but still refresh the index.
+8. If no meaningful updates exist, respond exactly: `No high-signal memory updates.`
## Guardrails
@@ -44,8 +39,7 @@ Own the actual `AGENTS.md` write for continual learning.
- `## Learned Workspace Facts`
- Do not write evidence/confidence tags.
- Do not write process instructions, rationale, or metadata blocks.
-- Never store secrets, credentials, private personal data, or one-off instructions.
-- Exclude transient details like branch names, commit hashes, or temporary errors.
+- Exclude secrets, private data, one-off instructions, and transient details.
## Output
diff --git a/continual-learning/hooks/continual-learning-stop.ts b/continual-learning/hooks/continual-learning-stop.ts
index 6f8a45c1..fa6f5d95 100644
--- a/continual-learning/hooks/continual-learning-stop.ts
+++ b/continual-learning/hooks/continual-learning-stop.ts
@@ -15,7 +15,7 @@ const TRIAL_DEFAULT_MIN_MINUTES = 15;
const TRIAL_DEFAULT_DURATION_MINUTES = 24 * 60;
const FOLLOWUP_MESSAGE =
- `Run the \`continual-learning\` skill now. Use the \`agents-memory-updater\` subagent for the actual \`AGENTS.md\` merge/write. First read existing \`AGENTS.md\`. Use incremental transcript processing with index file \`${INCREMENTAL_INDEX_PATH}\`: only read transcripts not in the index or transcripts whose mtime is newer than indexed mtime (re-read changed transcripts). After processing, have the subagent update existing entries in place (do not only append), write back the updated index mtimes, and remove entries for deleted transcripts. Update \`AGENTS.md\` only for high-signal, repeated user-correction patterns or durable workspace facts. Exclude one-off/transient details and secrets. Keep each learned section to at most 12 bullets. Write plain bullet points only, with no evidence/confidence tags or other metadata annotations. If no meaningful updates exist, respond exactly: No high-signal memory updates.`;
+ `Run the \`continual-learning\` skill now. Use the \`agents-memory-updater\` subagent for the full memory update flow. Use incremental transcript processing with index file \`${INCREMENTAL_INDEX_PATH}\`: only consider transcripts not in the index or transcripts whose mtime is newer than indexed mtime. Have the subagent refresh index mtimes, remove entries for deleted transcripts, and update \`AGENTS.md\` only for high-signal recurring user corrections and durable workspace facts. Exclude one-off/transient details and secrets. If no meaningful updates exist, respond exactly: No high-signal memory updates.`;
interface StopHookInput {
conversation_id: string;
diff --git a/continual-learning/skills/continual-learning/SKILL.md b/continual-learning/skills/continual-learning/SKILL.md
index 9ca34996..f1beb5c7 100644
--- a/continual-learning/skills/continual-learning/SKILL.md
+++ b/continual-learning/skills/continual-learning/SKILL.md
@@ -1,77 +1,24 @@
---
name: continual-learning
-description: Incrementally extract recurring user corrections and durable workspace facts from transcript changes, then delegate the AGENTS.md merge/update to a dedicated subagent. Use when the user asks to mine previous chats, maintain AGENTS.md memory, or build a self-learning preference loop.
+description: Orchestrate continual learning by delegating transcript mining and AGENTS.md updates to `agents-memory-updater`.
disable-model-invocation: true
---
# Continual Learning
-Keep `AGENTS.md` current using transcript deltas instead of full rescans.
+Keep `AGENTS.md` current by delegating the memory update flow to one subagent.
-## Inputs
+## Trigger
-- Transcript root: `~/.cursor/projects/<workspace-slug>/agent-transcripts/`
-- Existing memory file: `AGENTS.md`
-- Incremental index: `.cursor/hooks/state/continual-learning-index.json`
-- AGENTS updater subagent: `agents-memory-updater`
+Use when the user asks to mine prior chats, maintain `AGENTS.md`, or run the continual-learning loop.
## Workflow
-1. Read existing `AGENTS.md` first.
-2. Load incremental index if present.
-3. Discover transcript files and identify only:
- - new files not in index, or
- - files whose mtime is newer than indexed mtime.
-4. Extract only high-signal, reusable information:
- - recurring user corrections/preferences
- - durable workspace facts
-5. Invoke the `agents-memory-updater` subagent to do the actual `AGENTS.md` merge/write:
- - pass the transcript root, incremental index path, and any narrowed set of changed transcripts
- - pass the extracted candidate bullets grouped into user preferences vs workspace facts
- - tell it to update matching bullets in place, add only net-new bullets, and deduplicate semantic duplicates
- - do not edit `AGENTS.md` directly in the parent flow; the subagent owns that step
-6. Let the subagent write back the incremental index:
- - store latest mtimes for processed files
- - remove entries for files that no longer exist
-7. If no meaningful updates exist, respond exactly: `No high-signal memory updates.`
+1. Call `agents-memory-updater`.
+2. Return the updater result.
-## AGENTS.md Output Contract
+## Guardrails
-- Keep only these sections:
- - `## Learned User Preferences`
- - `## Learned Workspace Facts`
-- Use plain bullet points only.
-- Do not write evidence/confidence tags.
-- Do not write process instructions, rationale, or metadata blocks.
-- Keep each learned section to at most 12 bullets.
-
-## Inclusion Bar
-
-Keep an item only if all are true:
-
-- actionable in future sessions
-- stable across sessions
-- repeated in multiple transcripts, or explicitly stated as a broad rule
-- non-sensitive
-
-## Exclusions
-
-Never store:
-
-- secrets, tokens, credentials, private personal data
-- one-off task instructions
-- transient details (branch names, commit hashes, temporary errors)
-
-## Incremental Index Format
-
-```json
-{
- "version": 1,
- "transcripts": {
- "/abs/path/to/file.jsonl": {
- "mtimeMs": 1730000000000,
- "lastProcessedAt": "2026-02-18T12:00:00.000Z"
- }
- }
-}
-```
+- Keep the parent skill orchestration-only.
+- Do not mine transcripts or edit files in the parent flow.
+- Do not bypass the subagent.