Make the learning loop compound (reconcile merge by id + confidence)
task-compounding-reconcile-merge
Make the learning loop compound — DONE
The mission word "compounding … humans curate and agents extend" (Dossier — Mission & North Star) was unbuilt: extraction emit.ts overwrote atoms by path, run() never read the existing KB back, and the prompt told the model to "reuse an existing id" while supplying none — so a re-pass silently clobbered human curation. The compounding merge — the per-tenant learning loop accumulates by id + confidence instead of overwriting (okf reconcile() + opt-in reconcile in extraction/runtime) closed that.
Outcome (verified)
- Pure
@dossier/okfreconcile()— merges existing-on-disk vs incoming byid, honoring the existing confidence ladder (verified>asserted>inferred). Actions:added/updated/unchanged/preserved(the curation guard — a lower-confidence incoming never clobbers a higher-confidence atom) /orphaned(flagged, never deleted). No new schema — rides the existingconfidencefield. @dossier/extractionrun()— opt-inreconcile: reads the tenant OKF repo once, feeds known ids into the prompt, emits only the add/update diff.@dossier/runtime—--reconcileflag + a per-iteration tally surfaced in the stage reports.
Verified offline: a human edit (body rewrite + confidence → verified) survives a second machine pass; the contrast run without --reconcile proves the clobber it prevents; pnpm test 322 passed / 1 skipped (commit 64856ad).
Why kept on the board
Marked done, not deleted — ids are permanent addresses, and the completed-work record stays legible. This task is also the prerequisite that unblocked the agentic board (Agentic "sprint board" architecture — a git-resident OKF task board worked by bounded, hook-governed Agent SDK loops): repeated agent writes are unsafe while a re-extraction overwrites wholesale. Its open refinement lives on as Tighten reconcile diffs against timestamp churn on live re-crawls.