此注册表固定版本所收录的最新上游作者日期。

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