Skip to content

Commit 21f963f

Browse files
author
StackMemory Bot (CLI)
committed
feat(conductor): add trace-based evidence system with SQLite logging
- Add conductor_traces SQLite table for per-turn conversation logging - TraceCollector records tool calls, tokens, phases, content previews - Pre-extracted TurnData avoids double content-block iteration in hot path - stringifyEventTruncated with JSON replacer for single-pass truncation - classifyErrorText shared classifier unifies trace + heuristic analysis - withDb helper eliminates try/finally boilerplate across query functions - SQL json_each for server-side tool frequency aggregation - Evidence display on by default (--no-evidence to disable) - CLI: conductor traces, replay, trace-stats commands - 22 tests covering collector, queries, classifier, and truncation
1 parent 40a2802 commit 21f963f

File tree

5 files changed

+1438
-41
lines changed

5 files changed

+1438
-41
lines changed

CLAUDE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ stackmemory conductor learn --evolve # Auto-mutate prompt template from failure
6969
stackmemory conductor status # Live agent status dashboard
7070
stackmemory conductor monitor # Real-time TUI with phase tracking
7171
stackmemory conductor finalize # Clean up dead/stale agents
72+
stackmemory conductor traces <issue-id> # View conversation traces for an agent run
73+
stackmemory conductor replay <session-id> # Replay full agent conversation from traces
74+
stackmemory conductor trace-stats # Aggregate trace statistics
7275
stackmemory loop "<cmd>" --until "<pattern>" # Poll until condition met (alias: watch)
7376
```
7477

@@ -161,6 +164,7 @@ The conductor manages autonomous coding agents via Linear issues:
161164
- `evolution-log.jsonl` — History of `--evolve` mutations applied to the prompt template
162165
- `agents/<issue-id>/status.json` — Per-agent status files
163166
- `agents/<issue-id>/output.log` — Agent stdout/stderr
167+
- `traces.db` — SQLite database with per-turn conversation traces (tool calls, tokens, phases, content previews)
164168

165169
**Learning loop**:
166170
1. Agents run → outcomes logged to `outcomes.jsonl`

0 commit comments

Comments
 (0)