What is Flint?
Flint is a command-line and JSON tool that helps AI agents work with code, JSON, and text while retaining the information needed to recover originals and make changes. It provides reversible compression, focused source reads, persistent memory, and edits tied to the version of a file the agent inspected. Developers can connect it to workflows independently of the AI model or provider, or install its skills for Codex and Claude Code. It runs on Python 3.11 or later on Linux or WSL.
Flint Features:
Reversible Compression: Encode code, JSON, and text in compact formats, then decode them to recover original content or JSON values.
Focused Source Reads: Select complete Python definitions, line ranges, or text matches, with byte budgets and exact source retained.
Context Packing: Assemble selected sources and declared dependencies into a context package constrained by a byte budget.
Persistent Memory: Save decisions, search and recall complete memories within a byte budget, and retain earlier versions when a note changes.
Version Bound Edits: Apply proposed changes against a revision ticket and refuse the write if the source file has changed since it was read.
Source Tracking: Link memories to source files so memories tied to changed or missing sources are marked stale and excluded from current recall.
Flint Benefits:
Smaller Context: Compact representations can reduce the amount of code, JSON, or text an agent needs to carry while preserving a way to recover it.
Targeted Review: Agents can work from the relevant definitions or excerpts instead of receiving an entire source file.
Safer Changes: Revision checks help prevent an agent from applying an edit to a file that changed after it was inspected.
Reusable Decisions: Stored decisions remain available across calls, while version history provides a way to retrieve earlier notes.
Current Recall: Source tracking helps keep memories based on outdated or missing files out of current search results.
Use Cases:
Agent Code Changes: Have an AI agent inspect a Python definition and propose a focused edit that is checked against the file version it read.
Large JSON Inputs: Compress repeated fields or values in a JSON dataset before passing its representation into an agent workflow.
Project Decisions: Save decisions made during development and recall them in a later agent call without reopening the full discussion.
Source Excerpts: Give an agent selected line ranges or matching text when a task concerns only part of a codebase.
Changing Documentation: Track a memory against a source note so a changed or missing file flags that memory as stale before recall.

