The nightly retrospective: finished sessions become typed records, records become change commits, and you pick the ones you want onto main.
Every stage is a skill, chained by the smine dispatcher and run by the smine-nightly routine (Routines). Its output waits on the config server's Proposals page (Config server). The planning skills it hands work to are on the Skill map.
Sessions produce evidence, nightly mining turns it into commits, you accept a commit by picking it.
Local Claude Code and Codex sessions work in the project repos, accumulating plans, diffs and transcripts.
Over MCP (Model Context Protocol) to other agents: agent–user conversation, plan, diff, metadata such as touched files and used skills (skills/orchestration/peek).
/smine mines idle sessions newest first, one JSON record each, checked by make sessions. The memory, context, permissions and ACDSL miners read the records directly; smine-problems synthesizes cross-session problems against design intent (context, docs, plans, backlog) for the skills and routines planners. Each finding becomes a change task, one /fimplement commit on the night's branch.
The config server's Proposals page lists change commits: skill rules, context-doc entries (a typed entry in context/actions/), ACDSL rules, allow rules, whole skills (fexplore came from a retrospective). Picking one onto main accepts it; nothing is voted on.
Skills and context deploy; the next session runs under the improved rules.
The next sessions feed the next run.
The nightly run mines sessions into change tasks, implements each as one commit, judges the commits.
| Step | Skill | Artifact out |
|---|---|---|
| 0 | smine-style | ~/.claude/context/global/style-profile.md: the user's voice (transcripts) plus a ## Design taste block (plan Decisions tables, rejection reasons). Injected into every session; smine-problems reads it for solution directions. The nightly runs it when a taste source changed. |
| 1 | smine | Pipeline dispatcher: runs the requested stages (--stages) inline in one session via the Skill tool, owns the implement stage, ends on the run summary. |
| 2 | smine-batch | sessions/<repo>/<YYYY-Www>/<id>.json with a cost object from peek, checked and canonically rewritten by make sessions ARGS="check …". make sessions ARGS="pending" picks sessions newest first; the smine-mine workflow runs one smine-miner per session. |
| 3m | smine-memory | Change tasks draining the auto-memory dir into context facts; ends no auto-memory without one. |
| 3c | smine-context | Change tasks for context entries and acdsl-context declarations, from the records' context-use signals. |
| 3p | smine-permissions | Change tasks adding the gate's candidate allow rules; intended denials dropped. |
| 3a | smine-acdsl | Change tasks for ACDSL rules (rule line, verifier, fixtures) for prose rules sessions kept violating. |
| 4 | smine-problems | Cross-session problems, checked against design intent (intended costs dropped), solved as change tasks by the smine-skills and smine-routines planners. One neither solves becomes a backlog Icebox row marked mined, or enriches a matching item's mined marker. Reads the records make sessions ARGS="unsynthesized" lists, marks them mark --synthesized. |
| 4c | smine-consolidate carry | Cherry-picks every unsettled older change onto this night's proposals branch before the implement stage. |
| 5 | smine implement | /fimplement per change task; each change one commit with trailers Smine-Change: <kind>/<slug> and Smine-Sessions: <ids>. |
| 6 | smine-consolidate | run: every change commit picks onto main alone; changes sharing a file fold into one commit. |
| 7 | smine-orchestrate | run: judges every change commit (ready, or rejected with a reason) and the run. bootstrap: finalizes an initial-setup run. |
| From | To | Kind | Note |
|---|---|---|---|
smine-style | smine-problems | feeds | voice + design taste |
smine-batch | session record JSON | writes | cost from peek |
| session record JSON | smine-memory, smine-context, smine-permissions, smine-acdsl, smine-problems | read by | |
smine-problems | smine-skills, smine-routines planners | hands off | |
smine-problems | backlog row | writes | marked mined |
| the four miners and the planners | change tasks | write | .smine-run/changes/ |
| change tasks | smine-consolidate carry | next | older unsettled changes onto this night |
smine-consolidate carry | implement | next | /fimplement per task, one commit per change |
| implement | smine-consolidate | next | each commit picks alone |
smine-consolidate | smine-orchestrate run | next | verdict per change |
smine-orchestrate run | Proposals page | next | pick onto main |
| Term | Meaning |
|---|---|
| <store> | ~/GolandProjects/agent-plans/<repo>/ (<repo> = the main checkout's directory name): the one live backlog store, committed by the routine runner after each run. Skills resolve it via make rules ARGS="store-root", never spelling the path. A smoke or eval run gets its own (store/ in its throwaway worktree), out of the live one's reach. |
| --cap | Change tasks per mining stage per run. Default 5. |
| /smine-batch | The raw miner alone. |
| /smine-problems | The synthesis alone. |
The nightly is one claude-opus-5-5[1m] dispatcher cell, effort high, $300 budget (routines/smine-nightly/). Measured spend: the usage store behind the config server's /usage page, filled hourly by the smine-budget routine from peek and ccusage, and Token usage. One Team Premium 5-hour window held $262.04 of API-equivalent spend.
Schedule the routine when interactive usage is low: it shares the plan's window.