Skip to content

feat: unattended weekly /dewey-distill with rolling per-theme review PRs #193

Closed

Description

@jflowers

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 --manifest step 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

  1. Trigger: weekly scheduled GitHub Action in each knowledge repo (Dewey ships a template workflow).
  2. Scope is deterministic, no question. In scope: learnings no compiled article's sources cites, computed from git alone (all learning identities minus every cited one). Optional .uf/dewey/distill-policy.yaml excludes tags or stores; without it, the default applies. Unattended mode never calls the question tool.
  3. 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.
  4. Output: rolling per-theme PRs. One branch per theme (for example dewey-distill/<theme>), each a PR containing regenerated articles at tier: draft and machine-side learning hygiene (dedupe, superseded, stale).
  5. The vouch is the merge. A human reviewing a theme PR either sets tier: validated on the articles they accept (by suggestion, or by asking the agent via review comments; gh-hud's feedback task acts on them), or merges at draft. Under feat: git is the source of record for page trust tiers #203, validated is honored only once merged.
  6. Agent: distiller. Knowledge-store tools only, no promote; guard narrowing granted only from the user's global supervisor config, via a command: dewey-distill-auto profile (feat: task-scoped guard profiles (command/agent) and guard lock jflowers/opencode-supervisor#51).
  7. 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.
  8. Interactive /dewey-distill is unchanged, with both HUMAN_GATE: questions.

Acceptance

  • Unattended mode never calls the question tool and never writes a validated tier.
  • 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-distill issue.
  • 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

  1. Scope from policy, not a question. A committed .uf/dewey/distill-policy.yaml sets 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.
  2. 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.
  3. Promotion only happens after the merge.
  4. Interactive mode doesn't change. /dewey-distill keeps both HUMAN_GATE: questions.
  5. 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 question tool.
  • 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

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions