Repository navigation
Description
Summary
Bring the mechanisms that made a recent large knowledge-compilation effort reliable — temporal validity, evidence anchors, drift detection, explicit supersession, coverage accounting — into Dewey, without replacing human promotion and without requiring development repos to weaken supervisor guards.
Background
A research workspace compiled a 347-claim knowledge base from two Dewey stores plus a third memory corpus (≈773 source files). What made it trustworthy:
- Accounting — every source file dispositioned; a bidirectional coverage check caught 35 truncated citations and ~119 files the first enumeration missed.
- Temporal grounding — each claim pinned to
repo@shawith evidence locators and deep-verified against code at those pins. - Honest uncertainty —
stale-unverifiedseparated claims true only on open-PR branches from claims with no main-branch anchor at all. - Append-only revision — challenges and corrections appended, never edited in place.
Its limits are also instructive: verification checks correspondence (the claim matches the code), not endorsement (the advice is right); the same model class distilled and verified; and repeatability (a second refresh) is not yet proven.
Core idea: trust and validity are orthogonal
Dewey's tiers (authored / curated / validated / draft) answer who vouched for this. Validity answers is it still true as the code evolves. Today Dewey approximates validity with a 30-day age threshold in lint and "favor the newest learning" in compile.
Decision: keep human promotion
- Automate demotion, not promotion. Drift can flag even
validatedentries stale immediately; promotion stays human. - Make the gate cheap. Present a pre-verified, evidence-attached queue for batch promotion.
- Why not auto-promote: with feat: distill knowledge through the running MCP server with OpenAI-compatible synthesis #145, learning files claiming
tier: validatedare re-ingested asdraftuntil a human promotes them; auto-promotion after a correspondence check would let injected content reach the tier review agents trust.
Supervisor guards
Curation at corpus scale tripped opencode-supervisor's reward-hacking guard (it substring-matches authored content, so writing about --no-verify is blocked like using it) and its path-trace guard (hundreds of paths). The workaround — committing blockRewardHacking: false and requireStepReferenceInTools: false to project config — would be unsafe in any development repo.
Principle: the knowledge pipeline must never require weakening development guards in a repo's committed config. Achieved by (1) moving high-volume checks into deterministic Dewey code, (2) fixing the guard false positives, (3) a dedicated narrow-permission curator agent whose guard narrowing is granted only from the user's global config, and (4) never letting auto-answering touch curation's human gates.
| Agent | Guards | Permissions | Question gates |
|---|---|---|---|
| default / build | defaults (all on) | normal development | human |
autonomy |
defaults (all on) | normal development | AI decision engine |
curator |
narrowed, user-config granted | knowledge stores only | human, enforced |
Work items
Phase 1 — deterministic foundation (Dewey)
- feat: temporal-validity fields on learnings (as_of, evidence, validity, supersedes) #146 temporal-validity fields on learnings
- feat: lint anchor_drift / anchor_missing — detect staleness from code drift, not age #147 lint
anchor_drift/anchor_missing
Phase 2 — retrieval (Dewey)
- feat: validity-aware retrieval — return, filter, and rank by validity/as_of #148 validity-aware retrieval
- bug: keyword search matches hyphenated IDs only in full form #149 hyphenated-ID keyword search
Phase 3 — guards (independent of Dewey; can run in parallel)
- fix: scope reward-hacking markers to execution surfaces, not authored content jflowers/opencode-supervisor#46 scope reward-hacking markers to execution surfaces
- feat: configurable trace-check exemptions for knowledge-store MCP tools jflowers/opencode-supervisor#47 trace-check exemptions for knowledge-store tools
- feat: per-agent guard overrides (global-config only, narrowing only) and guard lock jflowers/opencode-supervisor#48 per-agent overrides (global-config only, narrowing only) + guard lock
- feat: never auto-answer human-gate questions; reject human-gated agents in config jflowers/opencode-auto-question#1 never auto-answer human-gate questions
- feat: curator agent for /dewey-distill with enforced human gates #152
curatoragent for/dewey-distillwith enforced human gates (after feat: distill knowledge through the running MCP server with OpenAI-compatible synthesis #145)
Phase 4 — pipeline (after #145 merges and a second refresh proves repetition)
- feat: explicit supersession in compile instead of newest-wins #150 explicit supersession in compile
- feat: /dewey-distill verify step before the review gate #151
/dewey-distillverify step
Phase 5 — git as source of record, unattended curation (added 2026-11-13)
Each teammate runs their own MCP server, so trust must come from git, not a local database. Human promotion stays: the vouch becomes a merged, code-owner-approved PR on the compiled page. At ~500 new learnings a week, humans review compiled articles; learnings stay draft.
- feat: git is the source of record for page trust tiers #203 git is the source of record for page trust tiers
- fix: regenerated compiled article keeps the validated tier of the content it replaced #204 regenerated article keeps the old content's
validatedtier (fix before any unattended run) - chore: require code-owner review for compiled knowledge pages #194 code-owner review on compiled knowledge pages
- feat: unattended weekly /dewey-distill with rolling per-theme review PRs #193 unattended weekly
/dewey-distillwith rolling per-theme review PRs - feat: per-label command for the issue task (scheduled dewey-distill issues) jflowers/gh-hud#28 per-label command for the issue task
- feat: task-scoped guard profiles (command/agent) and guard lock jflowers/opencode-supervisor#51 task-scoped guard profiles (implements feat: add /dewey-store slash command and scaffold all Dewey commands in dewey init #47 and bug: dewey init early return prevents slash command scaffolding on already-initialized repos #48, extended to match on command as well as agent)
Related:
- feat: distill knowledge through the running MCP server with OpenAI-compatible synthesis #145 — open PR implementing feat: /dewey-distill — compile/curate/promote pipeline via the running MCP server with server-side OpenAI-compatible synthesis #133: adds
/dewey-distill, batchpromote, and draft-on-re-ingest. feat: explicit supersession in compile instead of newest-wins #150, feat: /dewey-distill verify step before the review gate #151, feat: curator agent for /dewey-distill with enforced human gates #152 build on it and should start after it merges. - spike: investigate intended multi-repo Dewey setup and cross-repo knowledge isolation #106 — multi-repo setup and knowledge isolation; determines which repo feat: temporal-validity fields on learnings (as_of, evidence, validity, supersedes) #146 pins
as_ofto when a vault indexes sibling repos. - enhancement: dewey_store_compiled should validate sources param maps to existing learnings #93 — validate
store_compiledsources (pairs with feat: explicit supersession in compile instead of newest-wins #150's coverage check). - Content sanitizer (
sanitize/, on main) — already provides page content-hash drift (sanitize.ContentDrift) and theuntrustedtier. feat: lint anchor_drift / anchor_missing — detect staleness from code drift, not age #147's anchor drift is complementary: it tracks the code a claim cites, not the indexed page itself.
Non-goals
- Replacing or auto-running human promotion.
- Turning any guard fully off for any agent.
- Accepting guard relaxation from repo-committed config.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
fix: enforce curator Dewey MCP tool allowlist in agent frontmatter
fix: enforce curator Dewey MCP tool allowlist in agent frontmatter
fix: make gate auto-answer read every config path the plugin reads
fix: make gate auto-answer read every config path the plugin reads
fix: make gate auto-answer read every config path the plugin reads
chore: require code-owner review for compiled knowledge pages
docs(spec): weekly unattended distill with rolling per-theme review P…
jflowers commentedon Nov 16, 2026
All work items across phases 1–5 are closed as completed (last: #193 via #211). A second refresh to prove repeatability is still worth doing.