|
1 | 1 | --- |
2 | 2 | name: continual-learning |
3 | | -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. |
| 3 | +description: Orchestrate continual learning by delegating transcript mining and AGENTS.md updates to `agents-memory-updater`. |
4 | 4 | disable-model-invocation: true |
5 | 5 | --- |
6 | 6 |
|
7 | 7 | # Continual Learning |
8 | 8 |
|
9 | | -Keep `AGENTS.md` current using transcript deltas instead of full rescans. |
| 9 | +Keep `AGENTS.md` current by delegating the memory update flow to one subagent. |
10 | 10 |
|
11 | | -## Inputs |
| 11 | +## Trigger |
12 | 12 |
|
13 | | -- Transcript root: `~/.cursor/projects/<workspace-slug>/agent-transcripts/` |
14 | | -- Existing memory file: `AGENTS.md` |
15 | | -- Incremental index: `.cursor/hooks/state/continual-learning-index.json` |
16 | | -- AGENTS updater subagent: `agents-memory-updater` |
| 13 | +Use when the user asks to mine prior chats, maintain `AGENTS.md`, or run the continual-learning loop. |
17 | 14 |
|
18 | 15 | ## Workflow |
19 | 16 |
|
20 | | -1. Read existing `AGENTS.md` first. |
21 | | -2. Load incremental index if present. |
22 | | -3. Discover transcript files and identify only: |
23 | | - - new files not in index, or |
24 | | - - files whose mtime is newer than indexed mtime. |
25 | | -4. Extract only high-signal, reusable information: |
26 | | - - recurring user corrections/preferences |
27 | | - - durable workspace facts |
28 | | -5. Invoke the `agents-memory-updater` subagent to do the actual `AGENTS.md` merge/write: |
29 | | - - pass the transcript root, incremental index path, and any narrowed set of changed transcripts |
30 | | - - pass the extracted candidate bullets grouped into user preferences vs workspace facts |
31 | | - - tell it to update matching bullets in place, add only net-new bullets, and deduplicate semantic duplicates |
32 | | - - do not edit `AGENTS.md` directly in the parent flow; the subagent owns that step |
33 | | -6. Let the subagent write back the incremental index: |
34 | | - - store latest mtimes for processed files |
35 | | - - remove entries for files that no longer exist |
36 | | -7. If no meaningful updates exist, respond exactly: `No high-signal memory updates.` |
| 17 | +1. Call `agents-memory-updater`. |
| 18 | +2. Return the updater result. |
37 | 19 |
|
38 | | -## AGENTS.md Output Contract |
| 20 | +## Guardrails |
39 | 21 |
|
40 | | -- Keep only these sections: |
41 | | - - `## Learned User Preferences` |
42 | | - - `## Learned Workspace Facts` |
43 | | -- Use plain bullet points only. |
44 | | -- Do not write evidence/confidence tags. |
45 | | -- Do not write process instructions, rationale, or metadata blocks. |
46 | | -- Keep each learned section to at most 12 bullets. |
47 | | - |
48 | | -## Inclusion Bar |
49 | | - |
50 | | -Keep an item only if all are true: |
51 | | - |
52 | | -- actionable in future sessions |
53 | | -- stable across sessions |
54 | | -- repeated in multiple transcripts, or explicitly stated as a broad rule |
55 | | -- non-sensitive |
56 | | - |
57 | | -## Exclusions |
58 | | - |
59 | | -Never store: |
60 | | - |
61 | | -- secrets, tokens, credentials, private personal data |
62 | | -- one-off task instructions |
63 | | -- transient details (branch names, commit hashes, temporary errors) |
64 | | - |
65 | | -## Incremental Index Format |
66 | | - |
67 | | -```json |
68 | | -{ |
69 | | - "version": 1, |
70 | | - "transcripts": { |
71 | | - "/abs/path/to/file.jsonl": { |
72 | | - "mtimeMs": 1730000000000, |
73 | | - "lastProcessedAt": "2026-02-18T12:00:00.000Z" |
74 | | - } |
75 | | - } |
76 | | -} |
77 | | -``` |
| 22 | +- Keep the parent skill orchestration-only. |
| 23 | +- Do not mine transcripts or edit files in the parent flow. |
| 24 | +- Do not bypass the subagent. |
0 commit comments