continual-learning
microsoft/skills
フック、2層のメモリ(グローバルおよびローカル)、および自動パターン検出を活用し、セッションをまたいで学習内容を保持・適用することで、AIコーディングエージェントのための継続的な学習ループを実現します。
...すべて拡張しますAIコーディングエージェントのための継続的学習
エージェントはセッションの合間にすべてを忘れてしまいます。継続学習はこの問題を解決します。
The Loop
Experience → Capture → Reflect → Persist → Apply
↑ │
└───────────────────────────────────────┘
クイックスタート
フックのインストール(1ステップ):
cp -r hooks/continual-learning .github/hooks/
最初のセッションで自動的に初期化されます。設定は不要です。
2層メモリ
グローバル(~/.copilot/learnings.db) — すべてのプロジェクトにまたがって引き継がれます:
- ツールの動作パターン(どのツールが失敗し、どのツールが機能するか)
- プロジェクト横断的な規約
- 一般的なコーディング設定
ローカル (.copilot-memory/learnings.db) — このリポジトリに固有のもの:
- プロジェクト固有の規約
- このコードベースにおけるよくあるミス
- チームの設定
学習成果の保存方法
自動(フック経由)
フックはツールの処理結果を監視し、失敗パターンを検出します:
Session 1: bash tool fails 4 times → learning stored: "bash frequently fails"
Session 2: hook surfaces that learning at start → agent adjusts approach
エージェントネイティブ(store_memory / SQL経由)
エージェントは学習結果を直接書き込むことができます:
INSERT INTO learnings (scope, category, content, source)
VALUES ('local', 'convention', 'This project uses Result not exceptions', 'user_correction');
カテゴリ: pattern, mistake, preference, tool_insight
手動(メモリファイル)
人間が読み取り可能で、バージョン管理されたナレッジ用:
# .copilot-memory/conventions.md
- Use DefaultAzureCredential for all Azure auth
- Parameter is semantic_configuration_name=, not semantic_configuration=
圧縮
知見は時間の経過とともに陳腐化します:
- ヒット数が少ない60日以上経過したエントリは削除されます
- 価値の高い知見(頻繁に参照されるもの)は半永久的に保持される
- ツールのログは7日後に削除されます
これにより、重要な情報を保持しつつ、無制限な増加を防ぎます。
ベストプラクティス
- インストールは1ステップで完了します — もしそれ以上時間がかかる場合は
cp -r、採用されない - 範囲を正しく設定する — ツールパターンにはグローバルに、プロジェクトの規約にはローカルに
- 具体的にする —
"Use semantic_configuration_name="勝る"use the right parameter" - 積み重ねる — 1回のセッションごとの小さな改善が、数週間で指数関数的な成果を生み出す
---
name: continual-learning
description: Implements a continual learning loop for AI coding agents using hooks, two-tier memory (global and local), and automatic pattern detection to persist and apply learnings across sessions.
---
# 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):
```bash
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:
```sql
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:
```markdown
# .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
すべてのファイル
1件のファイルcontinual-learningをインストール
スキルファイルをダウンロードし、.claude/skills/ ディレクトリに解凍してください。
ZIPをダウンロードリポジトリをクローンし、スキルファイルをプロジェクトにコピーしてください。
git clone https://github.com/microsoft/skills/tree/main/.github/skills/continual-learning # Copy SKILL.md to your .claude/skills/ directory
コピー





家
