Skip to content

feat(automode): Plan 4 — episode ledger (SQLite)#34

Merged
Ecko95 merged 8 commits into
gitsfrom
feat/automode-episode-ledger
Jun 21, 2026
Merged

feat(automode): Plan 4 — episode ledger (SQLite)#34
Ecko95 merged 8 commits into
gitsfrom
feat/automode-episode-ledger

Conversation

@Ecko95

@Ecko95 Ecko95 commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Plan 4 of the autonomous-toggle roadmap. Persists a per-landed-slice episode so a brain (Motoko) / cockpit can rehydrate what each autonomous run did, without reading transcripts. Plan: docs/superpowers/plans/2026-06-21-automode-episode-ledger.md.

What this does

On each landed slice (driver done-path, after completeGoal), records an episode capturing the verifier-critic output: verdict, confidence, recommendation, flagged, summary, the goal id/title/repo, slice branch, and the full GitsReviewResult as JSON for lossless rehydrate. Exposes record_episode + list_episodes({ repo?, limit? }) (newest-first).

Surfaces

  • Migration 032automode_episodes table in the shared state.sqlite (with repo + goal_id indexes).
  • AutomodeEpisodeLedger service + layer in persistence/ (mirrors ProviderSessionRuntimeRepository): SqlSchema insert/list, review as JSON TEXT, flagged as 0/1 INTEGER (explicit bool↔int, no Schema.transform precedent in repo).
  • Driver wiring: ledger-write is non-fatal (wrapped in Effect.catchlogWarning; the slice already landed).

Design decisions (2026-06-21 checkpoint)

  • Shared state.sqlite + repo column (not a separate per-project DB; stateDir is global until Plan 7 adds per-project keying).
  • Write + read-back (ledger is useless without reads).
  • One row per landed slice, success path only; PR url not on the episode (per-run, joined via repo if needed).

Verification

🤖 Generated with Claude Code

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:XL labels Jun 20, 2026
@Ecko95
Ecko95 force-pushed the feat/automode-episode-ledger branch from ff24f0a to 2559c58 Compare June 21, 2026 00:03
@Ecko95
Ecko95 force-pushed the feat/automode-episode-ledger branch from 9fec460 to fe5f67a Compare June 21, 2026 10:13
@Ecko95
Ecko95 merged commit 00700de into gits Jun 21, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XL vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant