agentic-os
Build persistent multi-agent systems without external databases, using file-based memory and scheduled tasks.
AFaffaan-m/ECC314k3,503 new stars in the last 7 days
Measure the SQL a change actually issues with sql-tap, and back claims like "fixed the N+1" or "reduced queries" with a before/after report. Use when changing code that talks to a database (ORM queries, repositories, data loaders, query optimization, N+1 fixes) in a project where sql-tapd is available, and before reporting that SQL behavior improved or did not regress.
Measure the same command before and after the change with sql-tap run, compare with sql-tap diff, and report only what the reports show.
Before measuring, confirm all of these. If one cannot be confirmed, stop and ask the user instead of guessing.
-grpc, default localhost:9091). A project may configure it in .sql-tap.yaml (grpc:).-listen port, not the database's own port. For example, if sql-tapd listens on :5433 in front of PostgreSQL on :5432, the command's DATABASE_URL must use 5433. If it points at the database directly, nothing is captured.-count=1 to go test.Pick the narrowest command that exercises the code you are changing, and use exactly the same command afterwards.
sql-tap run -out=<tmp>/before.json <addr> -- go test -count=1 ./order/...
Write reports to a scratch location, not into the repository, and create its directory first: run does not create it.
The baseline must come from the unchanged code. If the change is already made, measure "before" on the commit without it: HEAD if the change is uncommitted, otherwise the commit the branch started from (e.g. git merge-base HEAD main). Use a separate worktree (git worktree add <tmp>/base <commit>, run the command there, then remove the worktree), or stash an uncommitted change (git stash, measure, git stash pop). Never measure the changed code as "before": the diff would show no change and prove nothing.
sql-tap run -out=<tmp>/after.json <addr> -- go test -count=1 ./order/...
runrun passes the command's own exit code through when the command fails, so a code like 1 or 2 may come from the command, not from sql-tap. Check the command's output first (e.g. FAIL lines from go test). If the command failed, the code is the command's: fix that first; the SQL numbers do not matter yet.
Only when the command succeeded, read the code as sql-tap's:
| Exit code | Meaning | What to do |
|---|---|---|
2 | No statements captured, sql-tapd did not confirm the subscription, the measurement may be incomplete, or another error (bad arguments, the command could not start, -out could not be written) | Do not use the report. Read sql-tap's Error: line on stderr: no statements means the command bypassed the proxy; an incomplete measurement (incomplete / dropped_events in the JSON) means measure again; an unconfirmed subscription means sql-tapd may be older than sql-tap; anything else names the problem to fix |
1 | N+1 or slow queries found | The report is valid; these are findings, not errors |
0 | No problems found | The report is valid |
sql-tap diff -format=markdown <tmp>/before.json <tmp>/after.json
| Exit code | Meaning |
|---|---|
0 | No regressions |
1 | Regressions: more statements, more N+1 queries, or a query newly flagged as N+1 |
2 | The comparison is invalid (different commands, no statements, an incomplete report), or another error (a missing or unreadable report file, bad arguments) |
1, investigate and fix before reporting. Do not claim the change is fine.2, read the Error: line on stderr first. Measure again only for an invalid comparison; fix the path or arguments for other errors. Do not work around it.-allow-command-mismatch, -allow-increase or -fail-on-slow unless the user asked for it, and say so in the report when you do.Include the Markdown output of diff as is, then state separately:
go test -count=1 ./order/..."; cite the exact command you measured).Keep these limits in mind:
diff only warns about slow queries; do not present either as a measured improvement.Build persistent multi-agent systems without external databases, using file-based memory and scheduled tasks.
AFaffaan-m/ECC314k3,503 new stars in the last 7 days
GAgarrytan/gstack143k524 new stars in the last 7 days
ADaddyosmani/agent-skills122k1,421 new stars in the last 7 days
THthedotmack/claude-mem121k1,354 new stars in the last 7 days
THthedotmack/claude-mem121k1,354 new stars in the last 7 days
THthedotmack/claude-mem121k1,354 new stars in the last 7 days