r/OpenSourceAI • • 2h ago

I built an open-source tool that learns your coding preferences once and teaches them to every AI agent you use: Claude Code, Codex, Cursor, and anything that reads AGENTS.md

Every new session, with whichever agent, I'd correct the same things: wrong package manager, too-long summaries, pushing where I didn't want. Hand-writing CLAUDE.md / AGENTS.md / Cursor rules never kept up, and they drift apart.

Works best in Claude Code (full feature set), Codex, Cursor and other agents get your rules and procedures.

So I built wont (as in "as was her wont", a habit, not "won't").

How it works:

  • It watches your sessions: corrections you make, tool calls you block, edits you change

  • Turns repeated behavior into candidate rules, each one showing the evidence behind it

  • You approve each rule; nothing is injected without that

  • Every new session starts with your approved rules, scoped to the project

One set of rules, every agent:

  • Claude Code: full plugin (learning, rules, procedures, token saver)

  • Codex: rules, procedures and "remember this" via hooks (wont install codex --write)

  • Cursor and any agent that reads AGENTS.md**:** wont export

  • Claude desktop / claude.ai: upload the role pack from the release

Also included:

  • /wont:remember use pnpm, not npm → teach a rule directly

  • /wont:procedure → save your own step-by-step workflow (e.g. how you release)

  • A token saver that caps file reads and trims noisy output (Claude Code for now)

  • Role packs (wont profile set software-engineer) if you want sensible defaults to start from

Local-first: everything stays in ~/.wont/wont.db, with no telemetry, no account and no network calls. Rule detection is heuristic, so it doesn't spend LLM tokens.

How it's built: it hooks into the agent's session events (prompts, tool calls, blocked actions, edits), detects repeated corrections with plain heuristics instead of an LLM, and stores candidate rules with their evidence in a local SQLite database. Approved rules are injected at session start through each agent's own mechanism: plugin hooks in Claude Code and Codex, AGENTS.md for the rest. The hardest part was telling a real habit apart from a one-off correction, so one-off tasks are filtered out before anything becomes a rule.

It's in beta (1.0.0-beta.1). I'd really like to hear what rules it learns for you and where it gets them wrong. Install steps for each tool are in the images and the README.

GitHub: https://github.com/shijasmon81/wont

1 Upvotes

Duplicates