Skip to main content

sync-knowledgebase-state

Synchronizes deterministic knowledgebase state through narrow allowlisted wrappers. Use when checking or refreshing wiki/index.md without expanding beyond MVP script boundaries.

来源信息

仓库
wryenmeek/knowledgebase
最近来源活动
2026年10月11日 22:40
检测到的 SKILL.md 语言
英语
星标
1
Forks
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
sync-knowledgebase-state
description
Synchronizes deterministic knowledgebase state through narrow allowlisted wrappers. Use when checking or refreshing wiki/index.md without expanding beyond MVP script boundaries.
# Sync Knowledgebase State ## Overview Use this skill to reconcile deterministic governed wiki state while staying inside the MVP control-plane boundary. The wrapper is intentionally narrow: it validates first, then only routes over approved governed artifacts. ## When to Use - After valid wiki content changes need an index refresh - When a governed state artifact staged in-repo is ready to publish under ADR-005 - When confirming state can be synchronized without unsafe side effects - Before or after deterministic ingest flows that should leave index state clean ## Commands Read-only precheck mode: ```bash python3 .github/skills/sync-knowledgebase-state/logic/sync_knowledgebase_state.py --check-only ``` Write mode for index synchronization only: ```bash python3 .github/skills/sync-knowledgebase-state/logic/sync_knowledgebase_state.py --write-index ``` Append-only log mode: ```bash python3 .github/skills/sync-knowledgebase-state/logic/sync_knowledgebase_state.py --append-log-entry "- state changed" --state-changed ``` Atomic publish modes for approved mutable governed artifacts: ```bash python3 .github/skills/sync-knowledgebase-state/logic/sync_knowledgebase_state.py --write-open-questions-from wiki/open-questions.next.md python3 .github/skills/sync-knowledgebase-state/logic/sync_knowledgebase_state.py --write-backlog-from wiki/backlog.next.md python3 .github/skills/sync-knowledgebase-state/logic/sync_knowledgebase_state.py --write-status-from wiki/status.next.md ``` The wrapper uses fixed repo-root execution and only these allowlisted entrypoints or governed helpers: - `scripts/kb/qmd_preflight.py` - `scripts/kb/update_index.py` - `scripts/kb/lint_wiki.py` - `scripts/kb/write_utils.py` - `scripts/kb/checkpoint_registry.py` (registry constants for inline status rendering) Read-only prechecks use `python3 scripts/kb/update_index.py --wiki-root wiki --check` so stale `wiki/index.md` fails closed in `--check-only` mode. Write mode treats stale `wiki/index.md` as the condition it is meant to repair: it runs `qmd_preflight.py`, then `lint_wiki.py --strict --skip-orphan-check`, then `update_index.py --write`, then a final strict lint to prove the synced state is clean. Other write-capable modes are fixed to governed artifacts only: - `wiki/log.md` append-only entry append under `wiki/.kb_write.lock` - `wiki/open-questions.md` atomic replace under `wiki/.kb_write.lock` - `wiki/backlog.md` atomic replace under `wiki/.kb_write.lock` - `wiki/status.md` atomic replace under `wiki/.kb_write.lock` - status publishing appends an inline checkpoint registry summary from `raw/wiki-processing/wiki-processing-checkpoint-registry.json` - unsupported artifact targets are rejected ## Execution boundaries - No shell, `eval`, or dynamic dispatch - No free-form command forwarding - Typed flags only: `--check-only`, `--write-index`, `--append-log-entry`, `--write-open-questions-from`, `--write-backlog-from`, or `--write-status-from` - Read-only prechecks always run before any write - Default mode is read-only - No network behavior - No-write-on-failure: governed artifacts mutate only after their mode-specific prechecks, lock rules, and contract checks pass - This skill does **not** wrap new repo-level maintenance/reporting/context trees ## Out of scope in MVP - Broad stateful automation - Batch reporting or repo crawlers - New `scripts/validation/*`, `scripts/reporting/*`, `scripts/context/*`, or `scripts/maintenance/*` - Replacing `scripts/kb/ingest.py` or `scripts/kb/persist_query.py` ## References - `AGENTS.md` - `docs/architecture.md` - `docs/decisions/ADR-007-control-plane-layering-and-packaging.md` - `docs/mvp-runbook.md`
在 GitHub 查看