1 comments

  • scalefirst 10 hours ago ago

    I built this because I kept running into the same problem at work: an AI agent (Claude Code, Cursor, etc.) would make changes to our codebase, and a week later nobody could explain why it chose to delete a file instead of editing it, or why the same prompt produced different results on Tuesday vs Thursday. The debugging loop was brutal. No execution trace. No way to compare two runs. No way to prove that an artifact was produced by a specific agent invocation. We were flying blind. ContextSubstrate is a CLI tool that treats agent runs the way git treats code changes — as immutable, content-addressed snapshots you can inspect later. Three core operations: ctx capture — Records an agent run into a Context Pack: the prompt, tool calls, model params, input files, timestamps, environment metadata. Everything gets hashed. You get back ctx://sha256:abc123 — share that hash, and anyone can reproduce the run. ctx diff <hash-a> <hash-b> — Compares two runs and shows where decisions diverged. Did the model pick a different tool? Did a parameter drift? Did the prompt change? It outputs a structured diff of decision points, not just text diffs. ctx verify <artifact> — Traces any file back to the Context Pack that produced it. "Who wrote this code, when, and with what instructions?" What it's not:

    Not an agent framework (use whatever agent you want) Not an observability dashboard (no cloud, no SaaS) Not a prompt IDE

    It's infrastructure. Local-first, Git-compatible layout, JSON + content-addressed blobs. Written in Go. The closest analogy is: git gives you blame, log, and diff for human-written code. ContextSubstrate gives you the same primitives for agent-written code. Early stage — the CLI works, Context Packs are solid, and diff/verify are functional. Looking for feedback from anyone who's dealt with "my agent did something last week and I can't figure out what" problems. GitHub: https://github.com/scalefirstai/ContextSubstrate