Skill v1.0.1
currentAutomated scan100/100+2 new
version: "1.0.1" name: knowledge-base-sync description: Stage, incrementally refresh, validate, and publish the DocMason knowledge base from the local source corpus.
Knowledge-Base Sync
Use this skill when the task is to build or refresh the DocMason knowledge base.
This is a top-level operator workflow. Ordinary users should not need to name knowledge-construction or validation-repair themselves.
Required Capabilities
- local file access
- shell or command execution
- ability to inspect structured JSON output
If the agent cannot run local commands or inspect the resulting artifacts, stop and explain that the workspace cannot be synced reliably.
Procedure
- Start with
docmason status --jsonwhen you need the current stage, pending actions, or control-plane state. - Use
docmason sync --jsonas the default build or refresh entry point.
- let sync classify the physical cause before staging
zero-deltaand foregroundinteraction-promotion-onlychecks return the current legal
truth without full staging, validation, or publication; pending interaction promotion stays deferred maintenance rather than an answer-critical invalidation
- for a source delta, preserve source-scoped transactional staging, cached validation for
unchanged sources, compact global checks, and the existing atomic single-current publish model; do not improvise a parallel full-copy or publication path
- use the reported cause, dirty/reused counts, phase timings, cache hits/misses, and physical
clone/copy telemetry when diagnosing performance or unexpected work
- keep workspace commands sequential while the sync lease is active
- do not overlap
status,sync,retrieve,trace, orvalidate-kbagainst the same workspace
- Respect the control-plane result before reasoning about later workflow steps.
- if
sync_status=awaiting-confirmation, surface the confirmation prompt and continue withdocmason sync --yes --json - if
sync_status=waiting-shared-job, treat the existing shared sync job as the legal owner and wait or retry rather than starting a second path - if
sync_status=action-required, surface the blocker directly - when the blocker is missing sync capability, route the operator to
prepare - when the blocker is a repairable Office machine-baseline gap and the host can provide
Full access, continue throughdocmason prepare --yes --jsonand then resume the same sync task instead of stopping at a passive blocker report
- Treat successful
syncas the deterministic truth-building path.
- detect source changes
- rebuild or reuse staged evidence
- apply safe staged repairs
- validate
- publish to
knowledge_base/current
- If
sync_statusisvalidorwarnings, inspecthybrid_enrichment.
hybrid_enrichmentdescribes whether deterministic sync left a remaining multimodal semantic gap- if
modeisnot-neededorcovered, stop and return the publication result - if the sync payload also includes
lane_b_follow_up.work_path, open that governed work packet first and treat it as the authoritative next step for this sync state lane_b_follow_upis the bounded sync-time follow-up packet for that current staging state- when that governed packet is present, do not consume the broad queue blindly; only fall back to
hybrid_work_pathwhen no bounded packet was handed off hybrid_work_pathis the broader staged queue and is only the fallback when no bounded packet was handed off- if
modeiscandidate-preparedorpartially-coveredand no governed packet path was handed off, treathybrid_work_pathas the authoritative hard-artifact queue - do not improvise a second sync path or rewrite deterministic sidecars
- write only additive
semantic_overlay/sidecars for units you can support honestly, then rerundocmason sync --json
- Treat
pending-synthesisas a compatibility or deliberate manual-mode state, not the normal operator destination.
- route to
knowledge-constructiononly when that legacy or manual path is actually intended - rerun
docmason sync --jsonafter staged authoring completes
- If validation still blocks publication after the deterministic sync path finishes, route to
validation-repair, then rerundocmason sync --json. - Return the final publication judgment to the main agent. Do not delegate final publication sign-off.
Escalation Rules
- Do not invent a second approval surface. The public approval command is
docmason sync --yes. - If Office rendering is required but unavailable, stop only when the governed
preparepath still cannot repair or install LibreOffice honestly; otherwise continue through that repair path first. - If staged or hybrid follow-up work requires per-source editing, that bounded work may be parallelized, but the final rerun and final judgment remain on the main path.
- Do not silently trigger this workflow from an ordinary answer path without surfacing the governed state transition.
Completion Signal
- The workflow is complete when
docmason sync --jsonreturns a final publication outcome for the current workspace state and any remaining hybrid state is either honestly covered, explicitly blocked, or explicitly surfaced through the governed follow-up packet and control-plane state.
Notes
- Bare
docmason syncremains the deterministic published-truth builder. - Shared-job reuse is part of the sync contract. Matching asks and operator sync commands should converge on one shared sync job, not parallel owners.
- PDF rendering uses Python dependencies. PPTX, DOCX, and XLSX rendering requires LibreOffice
soffice. - Interaction-derived memories may also be promoted through the same autonomous sync loop when the staged interaction path is relevant and supported.