Mining Agent Profiles from Logs
Log Processing Mechanics
Ditto reads raw transcripts instead of user-written rule files. It applies the content of MINING_PROMPT.md to identify repeated signals: what counts as “done,” which suggestions get rejected immediately, when the user demands proof or tests, and how UI or API decisions are phrased during actual work. Separate skill files under the skills/ directory let the miner tag evidence by category before writing the final you.md. The process runs locally; no logs leave the machine.
Users point the script at selected conversation directories or export files. ditto.py then walks the transcripts, scores matches against the prompt criteria, and emits three top-level sections. Each section stays under a fixed token budget so the profile can be prepended to new agent calls without exhausting context windows. The repository includes example logs and a ROADMAP.md that lists planned support for additional log formats.
Workflow Integration Points
After generation, the you.md file is referenced by the agent runtime at the start of every prompt. This replaces repeated manual context such as “always write tests first” or “reject any solution without error handling.” Because the profile derives from observed behavior rather than stated intent, it captures phrasing and rejection thresholds that developers rarely document explicitly.
The tool does not modify existing agent configurations. It simply produces a markdown file that the user includes via system prompt, custom instructions, or a thin wrapper script. The .agents/ and .codex-plugin/ directories contain optional adapters that demonstrate how to inject the profile into Claude Code and Codex sessions respectively. No daemon or background service is required; the profile is static until the user re-runs the miner on new logs.
Current Constraints
Coverage depends entirely on the quality and volume of available logs. Sessions that contain only short exchanges or generic questions produce thin profiles. The miner does not perform incremental updates; each run rebuilds the file from the supplied inputs. There is no built-in validation step that checks whether the generated rules contradict each other across layers.
The repository ships with tests/ and examples/ but no public benchmarks against alternative memory approaches. Users must evaluate output manually by comparing agent behavior with and without the profile. Future changes listed in ROADMAP.md may address continuous ingestion, yet the current release remains a batch process.
FAQs
Does Ditto require an internet connection? No. All processing occurs locally through ditto.py and the supplied prompts.
Can the generated you.md be edited by hand? Yes. The file is plain markdown and accepts manual additions or corrections after the initial mining pass.
Which log sources are supported today? Claude Code, Codex, Copilot CLI, and OpenCode exports are handled out of the box; other formats require custom parsing logic.
---
📖 Related articles
- Agentic Coding: Una Trappola per lo Sviluppo Software?
- File agents.md: utili per gli agenti di coding?
- Lean-ctx: Ottimizzatore Ibrido Riduce Consumo Token LLM del 89-99%
Need a consultation?
I help companies and startups build software, automate workflows, and integrate AI. Let's talk.
Get in touch