Skip to main content

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

That's it! The installer runs automatically during setup and creates .github/copilot-instructions.md.

That's it! The installer creates .github/copilot-instructions.md with:

  • Memory Persistence Protocol (@History directive)
  • Best practices template
  • Session Learnings Log table

In any Copilot chat, say:

In any Copilot chat, say:

@History save what we learned
save this
remember this
add to memory

Copilot will:

  1. Extract learnings from the conversation
  2. Check for duplicates in the Session Learnings Log
  3. Append new learnings to copilot-instructions.md
  4. 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:

  1. When you see @History, extract learnings from the conversation
  2. Read the existing Session Learnings Log
  3. Skip duplicates
  4. 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

Metadata

Release files for canon-keeper 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for canon-keeper 0.3.0
File Size Uploaded Provenance
canon_keeper-0.3.0.tar.gz 5.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for canon-keeper 0.3.0
File Interpreter ABI Platform
canon_keeper-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.9 kB

Release files / canon_keeper-0.3.0.tar.gz

Download URL canon_keeper-0.3.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
82ea797d93a24eca618ee131b5f1dd1595a81bfb6697c761af188059973a947c
BLAKE2b-256 checksum
How to use checksums
897cbb2fcdde09120e336d500cd31526773d82f6f7dc7bfffe1c3099e27ee97d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / canon_keeper-0.3.0-py3-none-any.whl

Download URL canon_keeper-0.3.0-py3-none-any.whl
Size 6.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83f666502b7cc3af82ab1bcdcbf7e629ebffd123580a2a2a918776046af1bf15
BLAKE2b-256 checksum
How to use checksums
c05a103fe52e52eaaeae5eb503d4100fff4949f29b4073bfbf3f37992e0f51f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Security for canon-keeper 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page