--- name: continual-learning description: "Capture durable user coding preferences and project facts into AGENTS.md so future sessions reuse them. Use for /continual-learning, 'remember this', 'update AGENTS.md', 'learn my preferences', or when a recurring preference, project convention, or engineering decision is worth persisting. Incremental, idempotent, and never stores secrets." license: MIT metadata: adapted-from: "cursor/plugins/continual-learning" version: "1.0.0" --- # Continual Learning (persistent memory) Keep a durable memory of the user's coding preferences and stable project facts so future sessions apply them without being re-told. The store is `AGENTS.md` at the workspace root (read by Kiro on every session, and syncable across projects). This skill is **manual / on-invocation** by design: it runs when asked or when you have just observed a genuinely durable, reusable signal. It does not run as an uncontrolled background process. ## When to run Run when the user asks to remember something, update `AGENTS.md`, or mine the conversation for durable learnings — or when you notice a recurring correction, a stated preference, or a stable project fact that will matter in future sessions. Do not run for one-off or transient details. ## What counts as durable (save) - Recurring user coding preferences and corrections (style, tooling, patterns they consistently want or reject). - Stable workspace/project facts (build/test commands, architecture conventions, where things live). - Recurring engineering decisions and conventions the team follows. ## What must NOT be saved - **Secrets or sensitive data of any kind**: API keys, passwords, tokens, credentials, connection strings, private URLs, personal data. Never write these to `AGENTS.md`. If a candidate learning contains one, drop the whole item. - One-off instructions, transient state, or details specific to a single task. - Noisy or speculative items. Prefer fewer, higher-signal bullets. ## Workflow 1. **Read `AGENTS.md` first** (workspace root). If it does not exist, create it with only these two sections: ```markdown ## Learned User Preferences ## Learned Workspace Facts ``` Preserve any other existing content in the file; only manage these two sections. 2. **Extract only durable, reusable items** from the conversation or the user's explicit request, per the save/never-save rules above. 3. **Merge carefully and idempotently:** - Update a matching bullet in place rather than adding a duplicate. - Add only genuinely net-new bullets. - Deduplicate semantically similar bullets. - Keep each section to at most 12 bullets. If full, replace the weakest bullet rather than growing unbounded. - Use plain bullet points only. No evidence/confidence tags, rationale blocks, or process metadata. 4. **Idempotency check:** if the merge produces no change, leave `AGENTS.md` unchanged. 5. **Report:** summarize what you added/updated, or if nothing was durable, respond exactly: `No high-signal memory updates.` ## Optional: Kiro global learnings For a preference that should apply across *all* your repositories (not just this workspace), Kiro also offers a global learnings store via its feedback-learning mechanism. Prefer `AGENTS.md` for project-scoped memory; use the global store for cross-project preferences. Never put secrets in either. ## Kiro adaptation Cursor shipped this as a `stop` hook (TypeScript) that auto-triggered after N turns / M minutes, delegating to an `agents-memory-updater` subagent. Kiro Web does not provide a reliable post-turn hook trigger, and an uncontrolled background writer is undesirable, so this port makes the same methodology **skill-invoked**. The AGENTS.md format, the two fixed sections, the merge/dedupe/idempotency rules, the 12-bullet cap, and the no-secrets guardrails are preserved exactly. An optional best-effort hook is documented in the power's `INSTALL.md`, but the skill is the supported path.