- Python 100%
The test called invoke("suspend") twice and printed "Unsuspended" for the second,
so it never exercised the unsuspend path and left every test card suspended.
AnkiConnect has a separate `unsuspend` action.
Synced from the internal project (tools/260329-anki backlog A9, found in the
2026-07-21 review, closed 2026-08-02).
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
||
|---|---|---|
| examples | ||
| tests | ||
| .gitignore | ||
| AGENTS.md | ||
| anki_daily_report.py | ||
| apply_cissp_leech_rewrites.py | ||
| build_deck_ankiconnect.py | ||
| CARD-CHANGES.md | ||
| check_leeches.py | ||
| generate_leech_report.py | ||
| KNOWLEDGE.md | ||
| process_card_changes.py | ||
| PROGRESS.md | ||
| README.md | ||
| TUTORIAL-ankiconnect-deck-building.md | ||
comfac-anki — Agent-Assisted Anki Deck Maintenance
A practical toolkit and knowledge base for getting real value out of Anki — especially if you're studying for certifications (CISSP, CompTIA Network+, pfSense/Netgate, …) or need to memorize large compliance corpora (accounting standards, charts of accounts, tax rules, ISO frameworks).
The featured technique: using an AI agent to maintain your decks — diagnosing cards you keep forgetting (leeches), splitting overloaded cards, and applying fixes safely through the AnkiConnect API with backups and verification.
Maintained by Comfac Global Group's IT practice. This is the public, scrubbed copy of an internal deck-maintenance project: techniques, scripts, and sample data — no private decks, no personal configuration.
Who this is for
- Students / professionals preparing for high-stakes exams who want their Anki decks to stop leaking.
- Anyone drowning in leeches — cards Anki marks as repeatedly failed.
- Tinkerers who want an AI agent (Claude, Kimi, OpenCode, any CLI agent) to safely read and improve their decks.
Start here
KNOWLEDGE.md— the core document: why spaced repetition works, why cards actually fail (interference — the prime cause of forgetting), the minimum-information principle, leech triage, agent operating instructions, and the certification/compliance memorization pipeline.TUTORIAL-ankiconnect-deck-building.md— build a whole deck from a JSON file via the AnkiConnect HTTP API, plus the "pull" system for deciding what is worth memorizing.AGENTS.md— if you use an AI coding agent: drop-in operating instructions for safe deck manipulation.
Quickstart
# 1. Install Anki, then the AnkiConnect add-on (code 2055492159), restart Anki.
# 2. Verify connectivity (Anki must be running):
curl localhost:8765 -X POST -d '{"action":"deckNames","version":6}'
# 3. Smoke-test read/write against a throwaway deck:
python3 tests/test_ankiconnect.py
# 4. See which cards are failing in a deck:
python3 check_leeches.py "My Deck Name"
# 5. Full-collection leech report (read-only; adjust the profile path at the
# top of the script or pass --collection):
python3 generate_leech_report.py
# 6. Build the sample catechism deck (149 cards) into a test deck:
python3 build_deck_ankiconnect.py examples/catechism-cards-260715.json --dry-run
python3 build_deck_ankiconnect.py examples/catechism-cards-260715.json
What's inside
| Path | What it is |
|---|---|
KNOWLEDGE.md |
Consolidated theory + techniques + agent instructions + cert/compliance use case |
TUTORIAL-ankiconnect-deck-building.md |
Deck building over the HTTP API; the pull system |
AGENTS.md |
AI-agent operating instructions for deck maintenance |
CARD-CHANGES.md |
Template card-change queue (the human→agent inbox) |
build_deck_ankiconnect.py |
Generic JSON → Anki deck builder (test-deck first, mapping file per batch) |
process_card_changes.py |
Batch card editor: backup → apply → verify; escalation tags (fixme/mic) |
check_leeches.py |
List leech cards in one deck |
generate_leech_report.py |
Full-collection leech report, grouped by deck (read-only) |
anki_daily_report.py |
Daily review stats + leech diagnosis + confusable-cluster detection (read-only; optional AI diagnosis via your own API key) |
apply_cissp_leech_rewrites.py |
Worked example: minimum-information rewrites applied to a test deck |
examples/ |
Sample card JSON (149-card Critical Thought Catechism deck) + a leech-rewrite mapping file |
tests/ |
AnkiConnect connectivity/write smoke test |
Safety model (short version)
- AnkiConnect only — scripts never touch
collection.anki2directly and never re-import.apkgfiles into a live profile. - Backup before every write batch (deck-scoped
exportPackage, scheduling included). - Test decks first (
Anki-Test-<Topic>-<date>); promote only after studying a sample. - Never delete — suspend. Edits are made in place so review history survives.
- Full rules in
KNOWLEDGE.md§3 andAGENTS.md.
Sample data note
examples/catechism-cards-260715.json is sourced from the public Critical Thought Catechism. Build your own Q&A cards from understanding — do not bulk-scrape copyrighted exam question banks.