Repository navigation
Description
Part of #153. Depends on #203 (git is the source of record) and #204 (stale validated tier). gh-hud side: jflowers/gh-hud#28.
Revised 2026-11-13. The promotion-manifest design (original text below) is replaced: under #203 a merged, code-owner-approved PR is the vouch, so no manifest or
promote --manifeststep is needed.
Why: volume
Measured on unbound-force main, 2026-11-13:
| Learnings | 2,368, all draft, 394 distinct tags |
| Cited by a compiled article | 639 (27%); last compile 2026-10-25 |
| Not yet distilled | 1,729 (1,676 created since that compile, across 244 tags) |
| Rate | ~73/day, ~500/week (peak days 150–177), via daily chore(dewey) PRs from 6+ fleet machines |
| Compiled articles | 39; 38 human-validated in git |
Per-learning review can't keep up, and none has ever happened. The human reviews compiled articles as diffs; learnings stay raw material.
Design
- Trigger: weekly scheduled GitHub Action in each knowledge repo (Dewey ships a template workflow).
- If an open issue labeled
dewey-distillexists, it comments to re-trigger rather than opening another. - Otherwise it opens one, assigned to the maintainer.
- gh-hud dispatches it with
/dewey-distill-auto #{num}(feat: per-label command for the issue task (scheduled dewey-distill issues) jflowers/gh-hud#28), as theautonomyagent in a TUI pane.
- If an open issue labeled
- Scope is deterministic, no question. In scope: learnings no compiled article's
sourcescites, computed from git alone (all learning identities minus every cited one). Optional.uf/dewey/distill-policy.yamlexcludes tags or stores; without it, the default applies. Unattended mode never calls thequestiontool. - Assignment and supersession. Group in-scope learnings into existing articles (or new ones) using embeddings plus the current compile clustering, and apply feat: explicit supersession in compile instead of newest-wins #150's explicit supersession. Start without an LLM judge; add one (Jev, called from Dewey server-side, with every decision logged with its confidence) only where the first runs show ambiguity. Tag sprawl (394 tags, many near-duplicates) is the expected first use.
- Output: rolling per-theme PRs. One branch per theme (for example
dewey-distill/<theme>), each a PR containing regenerated articles attier: draftand machine-side learning hygiene (dedupe,superseded,stale).- Each run updates the open PR for its theme instead of stacking a new one.
- The PR body is the review queue: per article, what changed in what we know, the learnings it newly cites, supersessions, and lint drift (feat: lint anchor_drift / anchor_missing — detect staleness from code drift, not age #147).
- Labeled
human-gate; never auto-merged (chore: require code-owner review for compiled knowledge pages #194 enforces this).
- The vouch is the merge. A human reviewing a theme PR either sets
tier: validatedon the articles they accept (by suggestion, or by asking the agent via review comments; gh-hud'sfeedbacktask acts on them), or merges atdraft. Under feat: git is the source of record for page trust tiers #203,validatedis honored only once merged. - Agent:
distiller. Knowledge-store tools only, nopromote; guard narrowing granted only from the user's global supervisor config, via acommand: dewey-distill-autoprofile (feat: task-scoped guard profiles (command/agent) and guard lock jflowers/opencode-supervisor#51). - First run is a backlog run. 1,729 learnings is far beyond a weekly batch. Run once, split by the 2026-10-25 index's themes (Governance, Review System, …), preferably in a watched pane.
- Interactive
/dewey-distillis unchanged, with bothHUMAN_GATE:questions.
Acceptance
- Unattended mode never calls the
questiontool and never writes avalidatedtier. - Scope computed from git matches a hand count on a fixture repo.
- A second run with no new learnings changes no PR; a run with new learnings updates the existing theme PR, not a new one.
- The workflow never leaves more than one open
dewey-distillissue. - A run that finds the previous run's PR for a theme still unmerged rebases or updates it and keeps the human's review commits.
Original design (2026-11-11, superseded)
Part of #153. Builds on #150 (explicit supersession), #151 (verify step) and #152 (curator agent).
Goal
Make curation a regular, unattended fleet event. The human gate becomes a PR review instead of an interactive question, which an unattended run can't answer safely.
Design
- Scope from policy, not a question. A committed
.uf/dewey/distill-policy.yamlsets which tags to compile, full or incremental, and which stores to curate. Unattended mode never asks the scope question; without a valid policy it refuses. - Review gate becomes a PR.
- The run commits the compiled articles and curation output.
- It adds a promotion manifest at
.uf/dewey/promotions/<run-id>.yaml. Each entry gives the page, the content hash of what was reviewed, its evidence, the verify step's result, and what it supersedes. - It opens a PR labeled
human-gate. The PR body is the review queue: lint drift and missing anchors, proposed promotions with their evidence, and supersessions.
- Promotion only happens after the merge.
- A new command,
dewey promote --manifest <file>, applies only entries whose manifest is on the default branch and whose page content still matches the recorded hash. - Any mismatch stays
draftand is reported. - Nothing promotes on a branch.
- This keeps feat: distill knowledge through the running MCP server with OpenAI-compatible synthesis #145's rule that file-claimed tiers are re-ingested as
draft.
- A new command,
- Interactive mode doesn't change.
/dewey-distillkeeps bothHUMAN_GATE:questions. - Scheduled trigger. A scheduled GitHub workflow opens a "Dewey curation" issue assigned to the maintainer. Someone dispatches it by hand. Issue runs stay manual, and issue auto-dispatch is not enabled.
Acceptance
- Unattended mode never calls the
questiontool. - It refuses when the policy is missing or invalid.
- Applying a manifest is idempotent.
- A hash mismatch blocks that one entry and reports it.
- A manifest that isn't on the default branch is refused.
- Tests cover each of these cases.
- The scheduled workflow opens at most one open curation issue at a time.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
[-]feat: unattended /dewey-distill that opens a human-gate PR with a promotion manifest[/-][+]feat: unattended weekly /dewey-distill with rolling per-theme review PRs[/+]Dispatch: per-label commands for the issue task
feat: add distiller agent, unattended command, and policy scaffolding…
feat: add distill scope foundation, branch sanitizer, and tier guard …
feat: document and verify the weekly distill trigger contract (T011-T…
feat: deterministic scope computation with durable no-op record (T016…
docs(spec): weekly unattended distill with rolling per-theme review P…
feat: add distiller agent, unattended command, and policy scaffolding…
feat: add distill scope foundation, branch sanitizer, and tier guard …
feat: document and verify the weekly distill trigger contract (T011-T…
feat: deterministic scope computation with durable no-op record (T016…