此登錄庫釘選版本所收錄的最新上游作者日期。

continual-learning

已同步 v1.1.0 授權: MIT 來源: microsoft/skills/.github/skills/continual-learning 提交: cde32f9 收錄的最新變更:

Guide for implementing continual learning in AI coding agents — hooks, memory scoping, reflection patterns. Use when setting up learning infrastructure for agents.

摘要

用途
它協助代理程式透過擷取、反思、保存並運用經驗,在不同工作階段之間延續有用的學習成果。
使用時機
當代理程式需要根據先前的工具結果調整做法,或跨工作階段保留可重用慣例並區分個人與專案知識時,請使用此內容。
輸出結果
內容說明以 hooks 驅動的學習循環、全域與儲存庫專屬記憶、直接或手動記錄方式,以及清理較舊資料的保留規則。
上游變更(2 筆,最新收錄 2026-02-24)
6737dcb refactor: simplify continual learning hook — single script, two-tier memory, auto-init 重寫技能指南,聚焦於自動初始化的 hooks、全域與本機 SQLite 記憶、代理原生與手動學習儲存方式,以及記憶精簡機制。
1ea0f8b feat: add continual learning hooks, skill, and docs site updates 新增持續學習指南,說明擷取、反思、保存與套用的循環、以 hooks 和代理原生工具實作的方法、記憶檔與日誌模式,以及最佳實務。
npx skills add "lettucebo/Skills#v2.2.0@continual-learning" --full-depth

⚠ v2.2.0 發布後即可使用

Continual Learning for AI Coding Agents

Your agent forgets everything between sessions. Continual learning fixes that.

The Loop

Experience → Capture → Reflect → Persist → Apply
     ↑                                       │
     └───────────────────────────────────────┘

Quick Start

Install the hook (one step):

cp -r hooks/continual-learning .github/hooks/

Auto-initializes on first session. No config needed.

Two-Tier Memory

Global (~/.copilot/learnings.db) — follows you across all projects:

  • Tool patterns (which tools fail, which work)
  • Cross-project conventions
  • General coding preferences

Local (.copilot-memory/learnings.db) — stays with this repo:

  • Project-specific conventions
  • Common mistakes for this codebase
  • Team preferences

How Learnings Get Stored

Automatic (via hooks)

The hook observes tool outcomes and detects failure patterns:

Session 1: bash tool fails 4 times → learning stored: "bash frequently fails"
Session 2: hook surfaces that learning at start → agent adjusts approach

Agent-native (via store_memory / SQL)

The agent can write learnings directly:

INSERT INTO learnings (scope, category, content, source)
VALUES ('local', 'convention', 'This project uses Result<T> not exceptions', 'user_correction');

Categories: pattern, mistake, preference, tool_insight

Manual (memory files)

For human-readable, version-controlled knowledge:

# .copilot-memory/conventions.md
- Use DefaultAzureCredential for all Azure auth
- Parameter is semantic_configuration_name=, not semantic_configuration=

Compaction

Learnings decay over time:

  • Entries older than 60 days with low hit count are pruned
  • High-value learnings (frequently referenced) persist indefinitely
  • Tool logs are pruned after 7 days

This prevents unbounded growth while preserving what matters.

Best Practices

  1. One step to install — if it takes more than cp -r, it won't get adopted
  2. Scope correctly — global for tool patterns, local for project conventions
  3. Be specific — "Use semantic_configuration_name=" beats "use the right parameter"
  4. Let it compound — small improvements per session create exponential gains over weeks

歷程

v1.0.0 bootstrap
v1.1.0 baseline-verified cde32f9
v1.1.0 license-refresh cde32f9