Copilot memory persistence - just an installer, no dependencies
Project description
Canon Keeper
Copilot memory persistence - teach Copilot to remember learnings across sessions.
Zero dependencies! Just an installer that sets up copilot-instructions.md.
Install
pip install canon-keeper
python -m canon_keeper install
Or with pipx (no venv needed):
pipx run canon-keeper
That's it! The installer creates .github/copilot-instructions.md with:
- Memory Persistence Protocol (
@Historydirective) - Best practices template
- Session Learnings Log table
Usage
In any Copilot chat, say:
@History save what we learned
save this
remember this
add to memory
Copilot will:
- Extract learnings from the conversation
- Check for duplicates in the Session Learnings Log
- Append new learnings to
copilot-instructions.md - Report what was saved/skipped
How It Works
No MCP server. No API keys. No runtime dependencies.
The installer just creates a copilot-instructions.md file with a directive that tells Copilot:
- When you see
@History, extract learnings from the conversation - Read the existing Session Learnings Log
- Skip duplicates
- Append new rows to the table
Copilot does all the work using its built-in capabilities.
Manual Setup
If you prefer not to use pip, just copy this to .github/copilot-instructions.md:
### Memory Persistence Protocol (@History) - CRITICAL
**Rule:** When the user includes `@History`, `save this`, `remember this`, or `add to memory`:
1. **Extract Learnings:**
- Analyze the conversation for technical decisions, architectural choices, workarounds
- Format each as: `| Date | Topic | Decision | Rationale |`
2. **Check for Duplicates:**
- Read the current `copilot-instructions.md` file
- Skip any learning semantically equivalent to an existing entry
3. **Append New Learnings:**
- For each non-duplicate, append a row to the Session Learnings Log table
- Use today's date (YYYY-MM-DD format)
4. **Report to User:**
- "✅ Saved X new learning(s): [topics]"
- "⏭️ Skipped Y duplicate(s): [topics]"
## Session Learnings Log
| Date | Topic | Decision | Rationale |
|------|-------|----------|----------|
Example Session Learnings Log
After a few sessions, your log might look like:
| Date | Topic | Decision | Rationale |
|---|---|---|---|
| 2026-01-18 | MCP Config Format | Use "servers" key, not "mcpServers" | VS Code MCP expects this format |
| 2026-01-18 | Python Venv | Use absolute paths in configs | ${workspaceFolder} doesn't expand |
| 2026-01-18 | Error Handling | Fail fast with clear messages | Easier debugging |
Options
python -m canon_keeper install --workspace /path/to/project # Specify workspace
python -m canon_keeper install --force # Overwrite existing file
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file canon_keeper-0.2.1.tar.gz.
File metadata
- Download URL: canon_keeper-0.2.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d66f69010654d904d5a7efbee8c28adfce3497b587790f7c5a7de63337237a55
|
|
| MD5 |
209679b73a61ec32512f160c3badbe07
|
|
| BLAKE2b-256 |
528f946dc5cbabce399ba2c22a429aea5b74f03a1302c50220bd0c39193c89ab
|
File details
Details for the file canon_keeper-0.2.1-py3-none-any.whl.
File metadata
- Download URL: canon_keeper-0.2.1-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b57cfb52da5f3b0a229aed9144429ddba0efcd19bddf352c4ef0e96e9c86c8f7
|
|
| MD5 |
5bebc97a808f1284ca62cf619eb3ac03
|
|
| BLAKE2b-256 |
96a649ce138cc1fb16644096fbf9dae1187fb8287c26ab3af9b5a33adb8fd786
|