knowledge-base-sync
Skill152 starsChanged 4 months agoApache-2.0View on GitHub
Stage, incrementally refresh, validate, and publish the DocMason knowledge base from the local source corpus.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- adapter-syncSkill
- askSkill
- grounded-answerSkill
- grounded-compositionSkill
- knowledge-constructionSkill
- provenance-traceSkill
- retrieval-workflowSkill
- runtime-log-reviewSkill
- validation-repairSkill
- workspace-bootstrapSkill
- workspace-doctorSkill
- workspace-statusSkill
- operator-evalSkill
- public-sample-workspaceSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
26 rules. About 0 are common, 6 are distinctive, and 20 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
20
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Use this skill when the task is to build or refresh the DocMason knowledge base.
- Distinctive: line 19
If the agent cannot run local commands or inspect the resulting artifacts, stop and explain that the workspace cannot be synced reliably.
- Very specific: line 23
Start with docmason status --json when you need the current stage, pending actions, or control-plane state.
- Very specific: line 24
Use docmason sync --json as the default build or refresh entry point.
- Distinctive: line 32
use the reported cause, dirty/reused counts, phase timings, cache hits/misses, and physical clone/copy telemetry when diagnosing …
- Distinctive: line 34
keep workspace commands sequential while the sync lease is active
- Very specific: line 35
do not overlap status, sync, retrieve, trace, or validate-kb against the same workspace
- Very specific: line 37
if sync_status=awaiting-confirmation, surface the confirmation prompt and continue with docmason sync --yes --json
- Very specific: line 38
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 …
- Very specific: line 39
if sync_status=action-required, surface the blocker directly
- Very specific: line 40
when the blocker is missing sync capability, route the operator to prepare
- Very specific: line 41
when the blocker is a repairable Office machine-baseline gap and the host can provide Full access, continue through docmason prepare --yes …
- Very specific: line 42
Treat successful sync as the deterministic truth-building path.
- Very specific: line 48
If sync_status is valid or warnings, inspect hybrid_enrichment.
- Very specific: line 50
if mode is not-needed or covered, stop and return the publication result
- Very specific: line 51
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 …
- Very specific: line 53
when that governed packet is present, do not consume the broad queue blindly.
- Very specific: line 55
if mode is candidate-prepared or partially-covered and no governed packet path was handed off, treat hybrid_work_path as the authoritative …
- Distinctive: line 56
do not improvise a second sync path or rewrite deterministic sidecars
- Very specific: line 57
write only additive semantic_overlay/ sidecars for units you can support honestly, then rerun docmason sync --json
- Very specific: line 58
Treat pending-synthesis as a compatibility or deliberate manual-mode state, not the normal operator destination.
- Very specific: line 61
If validation still blocks publication after the deterministic sync path finishes, route to validation-repair, then rerun docmason sync …
- Very specific: line 66
Do not invent a second approval surface.
- Very specific: line 67
If Office rendering is required but unavailable, stop only when the governed prepare path still cannot repair or install LibreOffice …
- Distinctive: line 68
If staged or hybrid follow-up work requires per-source editing, that bounded work may be parallelized, but the final rerun and final …
- Distinctive: line 69
Do not silently trigger this workflow from an ordinary answer path without surfacing the governed state transition.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
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
- when the blocker is missing sync capability, route the operator to
- if
- 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 statelane_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 offhybrid_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
- route to
- 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.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

