Repository navigation
RFC: knowledge intake — merged-PR and bugfix learnings return as reviewed knowledge PRs #111
Description
Background
The knowledge tree has a written intake contract (knowledge/AGENTS.md: PR-learning produces only executable rules in the nearest owner's rules.md, validators + release audit gate every batch) — but no automated feeder. Learnings evaporate at the two moments they are freshest:
- a vllm-omni PR merges (review discussion + final diff carry generalizable lessons), and
- a copilot
pr_debugrun lands a verified fix (root cause + verification stop at run-scoped debug memory and never reach the human-curated tree).
The governing constraint is the knowledge plane's safety model: agents propose, humans promote. A pull request against this repo is the promotion gate, so the design delivers validator-clean proposals as PRs and nothing else.
Design
Three decoupled stages (full record: doc/RFC-knowledge-intake.md on the PR below):
- Recording (cheap, every watch cycle) — the reviewbot scans all merged PRs straight from GitHub's closed pulls (drafts and untracked PRs included, durable overlap-safe cursor) and ingests copilot bugfix drop files (
pr.harvest_debug_knowledgewrites one JSON per landed, non-dry-run fix). Rows wait in aknowledge_intakeSQLite table so a distiller outage never loses an event. - Distillation (at most once a day) — the model only proposes: catalog-constrained rule sections as structured output, sources fenced as untrusted data. Code applies append-only (new
## <rule-id>sections +updated:bump, never a rewrite);check_knowledge_tree.py+check_wiki_lint.pygate the batch fail-closed, with a bounded attempt cap parking poison rows visibly. - Publication (fork-based, double-gated) — the date-scoped branch pushes to the bot's fork and the PR targets this repo; merging is the human promotion act. Shadow by default; posting requires
POST_MODE=reviewandKNOWLEDGE_PR_ENABLEDplus a configured fork. Same-day reruns build on the day's branch and resume failed publication.
Implementation
- zuiho-kai/omni-reviewbot#21 — intake ledger + merged-PR/drop scanner
- zuiho-kai/omni-reviewbot#22 — daily distiller + fork PR publication (stacked on Preserve Strict findings for inline GitHub reviews #21)
- pr-debug: drop a landed-fix record for external knowledge intake #110 —
pr.harvest_debug_knowledgestep + executor/resume e2e +doc/RFC-knowledge-intake.md
End-to-end tests pin the watch-cycle flow (reviewbot) and the crash-then-resume checkpoint path (copilot); the cross-repo drop-record contract is pinned by deliberately duplicated fixtures on each side.
Rollout
KNOWLEDGE_INTAKE_ENABLED (recording + shadow batches) → wire KNOWLEDGE_INTAKE_DIR = COPILOT_INTAKE_DIR (bugfix channel, shared host) → create the bot's fork + KNOWLEDGE_FORK_SLUG → KNOWLEDGE_PR_ENABLED under POST_MODE=review. Rollback at any stage is turning the flag off; nothing in the tree changes without a merged PR.
🤖 Generated with Claude Code
Activity
tzhouam commentedon Aug 28, 2026
Design accepted and implemented; closing as the record. Code is in the three PRs above (all green, pending merge), the living design doc ships as doc/RFC-knowledge-intake.md on #110, and enablement is operational (flag order in the Rollout section).