{"slug":"continual-learning","title":"continual-learning","summary":"Guide for implementing continual learning in AI coding agents — hooks, memory scoping, reflection patterns. Use when setting up learning infrastructure for agents.","platform":"GitHub Copilot","tags":[],"authorName":"Ciza","authorSlug":"ciza","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-08-12T21:05:24.989144Z","repo":{"url":"https://github.com/microsoft/skills","stars":3052,"forks":351,"license":"MIT","updatedAt":"2026-09-24T16:38:17Z"},"bodyHtml":"<hr>\n<h2>name: continual-learning\ndescription: Guide for implementing continual learning in AI coding agents — hooks, memory scoping, reflection patterns. Use when setting up learning infrastructure for agents.</h2>\n<h1>Continual Learning for AI Coding Agents</h1>\n<p>Your agent forgets everything between sessions. Continual learning fixes that.</p>\n<h2>The Loop</h2>\n<pre><code>Experience → Capture → Reflect → Persist → Apply\n     ↑                                       │\n     └───────────────────────────────────────┘\n</code></pre>\n<h2>Quick Start</h2>\n<p>Install the hook (one step):</p>\n<pre><code>cp -r hooks/continual-learning .github/hooks/\n</code></pre>\n<p>Auto-initializes on first session. No config needed.</p>\n<h2>Two-Tier Memory</h2>\n<p><strong>Global</strong> (<code>~/.copilot/learnings.db</code>) — follows you across all projects:</p>\n<ul>\n<li>Tool patterns (which tools fail, which work)</li>\n<li>Cross-project conventions</li>\n<li>General coding preferences</li>\n</ul>\n<p><strong>Local</strong> (<code>.copilot-memory/learnings.db</code>) — stays with this repo:</p>\n<ul>\n<li>Project-specific conventions</li>\n<li>Common mistakes for this codebase</li>\n<li>Team preferences</li>\n</ul>\n<h2>How Learnings Get Stored</h2>\n<h3>Automatic (via hooks)</h3>\n<p>The hook observes tool outcomes and detects failure patterns:</p>\n<pre><code>Session 1: bash tool fails 4 times → learning stored: \"bash frequently fails\"\nSession 2: hook surfaces that learning at start → agent adjusts approach\n</code></pre>\n<h3>Agent-native (via store_memory / SQL)</h3>\n<p>The agent can write learnings directly:</p>\n<pre><code>INSERT INTO learnings (scope, category, content, source)\nVALUES ('local', 'convention', 'This project uses Result&lt;T&gt; not exceptions', 'user_correction');\n</code></pre>\n<p>Categories: <code>pattern</code>, <code>mistake</code>, <code>preference</code>, <code>tool_insight</code></p>\n<h3>Manual (memory files)</h3>\n<p>For human-readable, version-controlled knowledge:</p>\n<pre><code># .copilot-memory/conventions.md\n- Use DefaultAzureCredential for all Azure auth\n- Parameter is semantic_configuration_name=, not semantic_configuration=\n</code></pre>\n<h2>Compaction</h2>\n<p>Learnings decay over time:</p>\n<ul>\n<li>Entries older than 60 days with low hit count are pruned</li>\n<li>High-value learnings (frequently referenced) persist indefinitely</li>\n<li>Tool logs are pruned after 7 days</li>\n</ul>\n<p>This prevents unbounded growth while preserving what matters.</p>\n<h2>Best Practices</h2>\n<ol>\n<li><strong>One step to install</strong> — if it takes more than <code>cp -r</code>, it won't get adopted</li>\n<li><strong>Scope correctly</strong> — global for tool patterns, local for project conventions</li>\n<li><strong>Be specific</strong> — <code>\"Use semantic_configuration_name=\"</code> beats <code>\"use the right parameter\"</code></li>\n<li><strong>Let it compound</strong> — small improvements per session create exponential gains over weeks</li>\n</ol>\n","files":[{"path":"SKILL.md","sizeBytes":2592,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"moderator-approved","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"moderator-approved","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-08-12T21:52:45.908171Z","sha256":"D1B179F8DE3C134F3F75690CF987051D7B88F871E8FA38FAE0756563200D32C3","sizeBytes":1388},"review":null,"source":{"repositoryUrl":"https://github.com/microsoft/skills","path":".github/skills/continual-learning","license":"MIT","commit":"23d0dac5f83f268166a17f0bc7dc6c73dc348a33","subtreeSha":"4238D85C702C8F25D82C50620F3D21161019C623C14ED50B4FF760978DEDEF01","lastSyncedAt":"2026-09-25T06:48:53.330584Z"},"reviewedAt":"2026-08-12T21:59:32.888915Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/microsoft/skills/tree/main/.github/skills/continual-learning"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install microsoft-skills@llmmart"},{"target":"git","command":"git clone https://github.com/microsoft/skills.git"}]}