Fixes six defects found in the first real end-to-end run of the inbox → OKF knowledge-base pipeline.
P0 fixes (blocked documented workflows):
- The inbox could never be cleared — five files contradicted the sixth's "keep items here only until classified" intent, so an agent following the contract correctly refused to remove anything. Now a scoped clear authority: an inbox copy may be removed once its content is verifiably filed at the destination named in the approved triage table, never before that destination copy exists.
- Every bundle wikilink broke on the first ingest — bundle indexes are all named
index.md, so[[bundle-slug]]could never resolve by filename, andbundle-template.mdshipped noaliases:field. Fixed, withsetup/verify.pynow failing mechanically on a bundle index missing its alias.
P1 fixes:
- Documented that inbox material bound for the knowledge base goes to
04-knowledge/raw/<type>/and is then ingested, not just copied in. - Added
/ingest,/query-knowledge,/lint-knowledgecommands and routing rows so the knowledge base's operating model is actually invokable. - The wiki (the shareable layer) now has an automated anonymity gate:
scripts/privacy_check.pyscans04-knowledge/WorkOSWikiand04-knowledge/schema.
P2 fix:
- Re-derived all 14 built
04-knowledge/files fromsetup/templates/, restoring content that had drifted out (including the aliases rule that would have prevented the bundle-link bug). Addedtests/drift/test_template_drift.pyso this class of drift fails the test suite going forward.
Verified end to end on a clean copy: a document dropped into 00-inbox/ reaches a bundle as a linked OKF page with a provenance page, updated indexes, and a log entry — ending with an empty inbox, no manual file edits, and all checks green.
Full details: 4cb6029