← Back

agree devlog - 02/07

It runs

Got the first full end-to-end example working. You can point it at a repo, it parses the schemas, consolidates them, compares against source, and prints output.

agree check command output showing summary table

Diffing

The trickiest part was figuring out how to display mismatches. First pass was a git-style line-by-line diff, visually familiar, but it didn't really make sense for what I was actually trying to show. The point isn't "line A changed to line B", it's "you said this field was X type but got Y type."

Switched to an expected vs. received format instead. To make that work I needed the raw text of each attribute and schema, so I grabbed those directly from the AST at parse time. That way when a mismatch is found, the output can show:

Expected:  a: int   (source.py:12)
Received:  a: bool  (other.py:47)

File name and line number included so you can jump straight to the right place.

-v flag

Added verbose mode via a -v flag in cobra. Without it you just get a summary table with each entity name and whether it's clear or has drift. With -v you get the full expected/received breakdown per mismatch.

agree check -v output showing detailed expected vs received mismatches

Merged the branch

PR is merged. ft/go-time is now main. The whole pipeline from Python parser through DTO to Go ingestion to comparison to diff output is working.

What's next

A few things on the list:

  • Dict and any support for pydantic schemas, the parser currently skips those (empty list in types, same issue from 01/28)
  • Config from a TOML file in cobra, so you don't need hardcoded paths to examples
  • Glob-style path syntax for specifying which files to check

Docker: keep it or drop it?

Still undecided. Docker works well, first run is slow for the build but after that it's fast and the user doesn't need Python installed at all. The downside is you can't ship a single Go binary. If I drop Docker and handle the Python invocation differently, or rewrite the parser in Go using tree-sitter directly, the whole thing becomes one binary. Avoids dealing with the hard tree-sitter docs and syntax though. Leaving it for now.

Longer-term idea

Once the output is stable and reliable, it'd be really useful to pipe it directly to a GitHub Action that runs an AI agent. Give the agent the CLI output (entity names, file paths, line numbers, expected vs. received) and have it just fix the drift. All the context needed to make the fix is already there in the output.