Dev ships Canon CLI to fix AI coding agents rehashing rejected approaches
letsrediit · reddit · 2026-08-15
A developer released Canon, a local-first CLI tool designed to prevent AI coding agents (like Claude Code and Cursor) from repeatedly proposing previously rejected approaches or inventing stale conventions.
The Problem
Agents often lose context between sessions, re-proposing rejected PRs, asking settled questions, or treating old comments as current truth. Maintaining static ADRs manually is costly and prone to staleness.
How Canon Works
- Local & Private: Uses SQLite with no cloud account required. GitHub integration is read-only for PR mining.
- Auto-Injection: Hooks into Claude Code (SessionStart) and Cursor (always-apply rule) to inject only active decisions automatically.
- Decision Tracking: Suggests decisions with provenance (e.g., PR #184) for approval. Replaces rather than deletes old decisions to ensure context accuracy.
- Fail-Safe: Prefers stating "no confirmed decision" over guessing when confidence is low.
Installation
bash
pip install git+https://github.com/Adarshk18/Canon.git
canon init
canon suggest
Currently supports Claude Code and Cursor auto-injection; ChatGPT requires manual attachment of .canon/injection.md.
Related event: Developer Open-Sources Canon, Giving AI Coding Agents a Decision Memory(2 posts)→
More from coding & agent
- Antigravity remote control may not be enabled for enterprise accounts — gharik · 2026-11-30
- How Much Agent Swarm Hype Is Just Distributed Systems Rediscovered? — edgarpavlovsky · 2026-11-30
- Know PyTorch vs. Know What PyTorch Does: A 5-Step Learning Path — cneuralnetwork · 2026-11-30
- PAL adds E2EE multi-machine remote memory for Claude Code with BYO S3 — rchardkovacs · 2026-11-30
- Reddit asks: did anyone keep autoresearch agent loops in daily workflows? — Jumpy-Cobbler1020 · 2026-11-30
- Dev ports 4 Obsidian plugins to Antigravity native plugins, all open-sourced on GitHub — vista8 · 2026-11-30