tk-studio-knowledge
The knowledge promotion gate — draft reconciled corrections from the routing doc into ordinary kb/ files on a feature branch behind a membrane PR; review is the gate, nothing auto-applies. Use when the user says "promote the corrections", "tk promote", "draft the promotion", "promote-draft", or a job's invoke-skill directive names this skill.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- tk-studio-knowledge
- description
- The knowledge promotion gate — draft reconciled corrections from the routing doc into ordinary kb/ files on a feature branch behind a membrane PR; review is the gate, nothing auto-applies. Use when the user says "promote the corrections", "tk promote", "draft the promotion", "promote-draft", or a job's invoke-skill directive names this skill.
03 SKILL.md 正文
tk-studio-knowledge
The promotion gate of the Research→Knowledge Lifecycle port (ST-9.5; D3,
AD-12): corrections that reached the per-project reconciliation queue cross
to the project's canonical kb/ ONLY as a drafted ordinary kb file on a
feature branch behind PR review. Only a human writes canonical — this
skill drafts and opens the PR; merging it is the human's act. It never
pushes a base branch, never merges, never closes or approves the PR.
Behavior (both modes)
-
Check first (read-only, no network):
uv run "${CLAUDE_PLUGIN_ROOT}/lib/promote.py" check --directory <project-root>Reports routing-doc presence, queue counts, the promoted baseline, and the unpromoted-correction count. Zero unpromoted is a first-class clean no-op, not an error.
-
Draft through the core (never hand-drive git for this):
uv run "${CLAUDE_PLUGIN_ROOT}/lib/promote.py" draft --directory <project-root>The core refuses without a rendered routing doc (
reconcile.py routerenders it — the routing doc is the human's promotion-decision surface), drops corrections already recorded as drafted, sanitization-scans what would cross (NFR5), renders ONE new dated kb file (ordinary frontmatter — no new keys;scope:stays reserved, AD-8), regenerateskb/index.md(a foreign index is skipped, never clobbered), lands it on the stable branchknowledge/<user>-<machine>, pushes, and opens the membrane PR — or recognizes the open one the draft just updated (repeat drafts update the same PR, never a duplicate).A
dry_runpayload rides the core's own flag —draft --dry-run— which walks the data gates (routing doc, queue, promoted baseline, sanitization) without touching git.no_prstops after the push;redraftignores the promoted baseline and drafts every valid correction. Never substitute a check-only summary for the draft verb: the check step reports, onlydraftenforces. -
Emit after merges (the D4 measurement verb, ST-9.6):
uv run "${CLAUDE_PLUGIN_ROOT}/lib/promote.py" emit --directory <project-root>Reconciles the promotions record against what actually merged: a recorded draft whose kb file now exists on its base branch has crossed the membrane, and each batch of newly-merged drafts — at this cadence, one merged promotion PR's worth — emits ONE
knowledge-promotionledger event, then an emitted marker in the record so nothing ever emits twice. Run it whenever this skill is invoked —no-op(nothing drafted or all emitted) andwaiting(PR still open) are first-class answers, not errors. Merge detection is local git only; never query the PR API for this. -
Attended: summarize what was drafted — correction count, file, branch, PR URL — and remind the operator the drafted file is ordinary kb markdown they can edit on the branch before merging. Surface a
committed-localresult (offline push) orunavailablePR step as the retry guidance the core returned. Headless: aPromoteBlockedrefusal (exit 2 — no routing doc, not a git work tree, dirty tree, sanitization finding) endsblockedwith the core's error asreason— identically underdry_run: true: the core refusing a dry-run draft is still a refusal, never downgraded tocomplete; a push or PR step that could not reach the remote endspartial(useful work landed: the local branch commit) — never a prompt (AD-11). End headless runs with the status block:{"status": "complete", "intent": "tk-studio-knowledge", "artifacts": ["kb/reconciliation-<date>.md"], "reason": null}
If the deterministic core is unrunnable — a tool call denied by permissions, uv/python unavailable — end blocked with the status block naming the unrunnable core as reason: never a question, never a headless run that ends without the block (AD-11).
Rules
- Never merge, never close or approve the PR, never push a base branch — review is the promotion gate (D3, AD-12).
- Nothing auto-applies: a draft writes ONE new dated kb file; existing kb content is never edited or deleted by a draft.
- Provisional knowledge (spine, seed, queue, routing doc, promotions record) stays in the per-user store (AD-3); only the drafted file crosses, through the PR.
- kb frontmatter gains nothing —
title/descriptiononly;scope:stays reserved and unread (AD-8). - A sanitization finding is a hard stop, not a warning — resolve the flagged correction, re-draft; never hand-edit the finding away on the branch (NFR5).
- Measurement (D4): the
knowledge-promotionevent — sole emitter this skill, through theemitverb alone (contract 0.1.7, ST-9.6). A draft emits nothing (a mover, AD-12); the promotions record is the exactly-once baseline emit reconciles against — one merged promotion PR, one event, never a duplicate. - All paths resolve through
${CLAUDE_PLUGIN_ROOT}.
04 同仓库更多 Skills
tk-studio-track
Tracking verbs on the bound Jira project — `block` moves a story the loop cannot progress, and each dependent story, to "Blocked - Awaiting User" with a comment that @mentions the owner (or, with `--engagement`, one engagement's questions issue, which `close` later moves to "Done"); `reply` posts the owner's answer (or "Done.") with the owner's host-only token and moves the issue to "Block Resolved"; `validate` checks that resolution and passes the issue back to work or re-blocks it with a follow-up. Use when the user says "block this story", "tk track block", "put it in the owner's inbox", "reply to the blocked issue", "validate the resolution", or a supervisor or engagement payload names this skill.
tk-studio-session
Session discipline as a surface — land a boundary handoff (optionally carrying knowledge deltas) and end the session, or resume a fresh session from a run workspace alone. Use when the user says "hand off this run", "tk session", "resume the run", or a boundary/budget trigger says the session must split.
tk-studio-research
Run a chartered research pass — survey the topics a charter scopes, grade every finding by evidence, land the findings in the run workspace, and emit observation events for recommendation-worthy ones. Use when the user says "run the ecosystem watch", "tk research", or a research job's invoke-skill directive names this skill.
tk-studio-report
One-verb human defect report — "the skill did the wrong thing" — recorded as a report event in the local measurement ledger. Use when the user says "tk report", "report a defect", "that skill misbehaved", or "log a studio issue".
tk-studio-playable-judge
The playable-verify leg's screenshot judge (Story 34.3) — reads only a playable run's report.json and its frames, answers the fixed rubric (scene loaded, player visible and framed, no magenta or error overlay, HUD reads, the named moments shown) with pass or fail and findings each naming a frame and a rubric line. Driven headless by the supervisor's host leg on the project's sandbox tier; use when the payload names a playable `media` folder, or the user says "judge the playable frames".
tk-studio-plan-sync
Planning adapter — canonicalize BMad-native planning artifacts (normalize pass, sole id authority) and sync them with the bound planning backend. Use when the user says "sync the plan", "normalize planning artifacts", "tk plan sync", or after stock BMad planning flows produce or change epics/stories.