diff options
| author | Claude Sonnet 4.6 <noreply@anthropic.com> | 2026-03-14 18:11:44 +0000 |
|---|---|---|
| committer | Claude Sonnet 4.6 <noreply@anthropic.com> | 2026-03-14 18:11:44 +0000 |
| commit | 43440200facf9f7c51ba4f4638e69e7d651dd50d (patch) | |
| tree | 5984798cb6ba0038e17c0e175ab35054276b38cf /CLAUDE.md | |
| parent | 5ad88bfc08584585b56ac8eee9cde95ed20b7b43 (diff) | |
feat(Phase4): add file changes for changestats executor wiring
Files changed: CLAUDE.md, internal/api/changestats.go,
internal/executor/executor.go, internal/executor/executor_test.go,
internal/task/changestats.go (new)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'CLAUDE.md')
| -rw-r--r-- | CLAUDE.md | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -105,6 +105,20 @@ Batch files wrap multiple tasks under a `tasks:` key. Two tables: `tasks` (with `config_json`, `retry_json`, `tags_json`, `depends_on_json` as JSON blobs) and `executions` (with paths to log files). Schema is auto-migrated on `storage.Open()`. +## Features + +### Changestats + +After each task execution, Claudomator extracts git diff statistics from the execution's stdout log. If the log contains a git `diff --stat` summary line (e.g. `5 files changed, 127 insertions(+), 43 deletions(-)`), the stats are parsed and stored in the `executions.changestats_json` column via `storage.DB.UpdateExecutionChangestats`. + +**Extraction points:** +- `internal/executor.Pool.handleRunResult` — calls `task.ParseChangestatFromFile(exec.StdoutPath)` after every execution; stores via `Store.UpdateExecutionChangestats`. +- `internal/api.Server.processResult` — also extracts changestats when the API server processes a result (same file, idempotent second write). + +**Parser location:** `internal/task/changestats.go` — exported functions `ParseChangestatFromOutput` and `ParseChangestatFromFile` usable by any package without creating circular imports. + +**Frontend display:** `web/app.js` renders a `.changestats-badge` on COMPLETED/READY task cards and in execution history rows. + ## ADRs See `docs/adr/001-language-and-architecture.md` for the Go + SQLite + WebSocket rationale. |
