feat(sessions): git-anchored session/LCM correlation - #281
Conversation
|
Resume-packet renderer (48af578). Candidate input for the session- intelligence work in PR #281. Next: review, rebase, own PR. Fact 35. Recovery: orchestrating Claude session 2c51d204-3565-4a10-833d-d8fbd51620c3 (project /home/zack/projects/tracedecay); replay: tracedecay tool lcm_load_session --provider claude --session-id 2c51d204-3565-4a10-833d-d8fbd51620c3 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Unfinished-workflow-evidence CLI (7fcca35) becomes a subcommand of the workflow/thread indexing feature. Design: fact 38; feature branch: feat/session-git-correlation (PR #281). Recovery: orchestrating Claude session 2c51d204-3565-4a10-833d-d8fbd51620c3 (project /home/zack/projects/tracedecay); replay: tracedecay tool lcm_load_session --provider claude --session-id 2c51d204-3565-4a10-833d-d8fbd51620c3 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Cross-session workflow guidance docs (2e8e85e). Overlaps the session- intelligence feature (PR #281, facts 20/30/38); fold or land separately. Recovery: orchestrating Claude session 2c51d204-3565-4a10-833d-d8fbd51620c3 (project /home/zack/projects/tracedecay); replay: tracedecay tool lcm_load_session --provider claude --session-id 2c51d204-3565-4a10-833d-d8fbd51620c3 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Full recovery manifest (all session + workflow ids)Main orchestrating session: Workflow runs (transcripts: session dir →
Research agents (task transcripts in the session's Durable decisions: facts 17–39 in this project's fact store ( |
Query sessions and messages by branch, worktree, or commit: span-based attribution tables (session_git_spans, commit_sessions) in the per- project session store; live span recording from hook-route metadata (incl. linked-worktree resolution via git-common-dir identity); commit attribution on ingest; historical backfill CLI (sessions git-backfill, reflog-segmented, idempotent); tracedecay_sessions_for MCP tool plus branch/worktree/commit filters on message_search and lcm_grep. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
564af78 to
4888ad5
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Layer 2 of session intelligence (builds on #281's git spans). Indexes Claude Code workflow runs + agents into the session store, attached to the parent thread and to branches/worktrees/commits. Adds the tracedecay_workflows tool (list by thread or git ref, show a run, drill an agent), workflow_run/agent filters on message_search, and a 'sessions unfinished' CLI. Ingest is idempotent + incremental. Tool count 100 -> 101. Verified against ~/.claude: 11 runs / 79 agents. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Layer 2 of session intelligence (builds on #281's git spans). Indexes Claude Code workflow runs + agents into the session store, attached to the parent thread and to branches/worktrees/commits. Adds the tracedecay_workflows tool (list by thread or git ref, show a run, drill an agent), workflow_run/agent filters on message_search, and a 'sessions unfinished' CLI. Ingest is idempotent + incremental. Tool count 100 -> 101. Verified against ~/.claude: 11 runs / 79 agents. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…telligence) (#284) * feat(sessions): index workflow runs and their agents Layer 2 of session intelligence (builds on #281's git spans). Indexes Claude Code workflow runs + agents into the session store, attached to the parent thread and to branches/worktrees/commits. Adds the tracedecay_workflows tool (list by thread or git ref, show a run, drill an agent), workflow_run/agent filters on message_search, and a 'sessions unfinished' CLI. Ingest is idempotent + incremental. Tool count 100 -> 101. Verified against ~/.claude: 11 runs / 79 agents. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * test: set directory mtime cross-platform in workflow_ingest tests The set_mtime helper opened files read-only and called set_times, which works on Unix but panics on Windows (adjusting a directory's timestamps needs backup-semantics access). Switch to filetime::set_file_mtime (already a transitive dep; added as an explicit dev-dependency). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * chore: deslop workflow indexing comments * refactor(workflow): dedup helpers and hoist loop-invariant resolution /simplify cleanup (behavior-preserving), converged on by 4 reviewers: - delete WorkflowStatus::from_db (redundant with the infallible from_disk given the status column's CHECK constraint) - reuse crate::sessions::claude::transcript_cwd instead of a byte-copy - promote string_arg/argument_error/tool_json_with_md to handlers/support and share them between session.rs and workflow_query.rs - one shared shared::one_line_truncated (single ellipsis convention) replacing three divergent copies - ProjectRootMatcher resolves the fixed project side's git worktree/common dir once, so the ingest loop stops re-resolving it per run Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * refactor: split workflow session tests * refactor(sessions): simplify workflow indexing reuse and dedup Reuse git_scope_exists_clauses for workflow git-scope queries, avoid per-status string allocations, HashSet dedup in roster assembly, and colocate one_line_truncated tests with shared helpers. * refactor(sessions): dedupe workflow args * refactor(sessions): extract workflow scope EXISTS predicate * fix(workflow): satisfy branch quality gates * fix(test): normalize CI path assertions * fix(test): normalize Windows command paths * fix(test): normalize Cursor hook paths --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
First-class correlation between sessions/LCM messages and git artifacts: query all sessions/messages for a branch, worktree, or commit ("the conversations that produced this commit").
What's in it
session_git_spans,commit_sessions) in the per-project session store, version-gated migrationcommit_sessionsrowstracedecay sessions git-backfill— reflog-segmented historical attribution from existing hook analytics + session timestamps; idempotent; interior branch segments seeded correctly (second review-caught defect)tracedecay_sessions_forMCP tool (git_ref: branch|worktree|commit) +branch/worktree/commitfilter pushdown ontracedecay_message_searchandtracedecay_lcm_grepStatus: assembled onto current master, ready for review pending CI
Gates: git_correlation 21/21 · backfill 3/3 · full mcp_suite 313/313 · clean squash (zero conflicts). Built by the Fable-foundation → Opus-implement → review → fix pipeline (workflow
wf_f46d3a1c-ccb); two review-caught product defects fixed pre-merge.Follow-up (designed, separate PR): layer-2 workflow indexing
Workflows attach to parent threads, agents attach to workflows, joined to these git spans (
tracedecay_workflowstool); absorbscodex/workflow-state-tool. Fact 38.Recovery context
Session
2c51d204-3565-4a10-833d-d8fbd51620c3· workflowwf_f46d3a1c-ccb· facts 20/30/38/39 (tracedecay tool fact_store --action get --fact-id 39= full manifest)🤖 Generated with Claude Code