AGENT SKILL

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)

  1. 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.

  2. 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 route renders 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), regenerates kb/index.md (a foreign index is skipped, never clobbered), lands it on the stable branch knowledge/<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_run payload rides the core's own flag — draft --dry-run — which walks the data gates (routing doc, queue, promoted baseline, sanitization) without touching git. no_pr stops after the push; redraft ignores the promoted baseline and drafts every valid correction. Never substitute a check-only summary for the draft verb: the check step reports, only draft enforces.

  3. 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-promotion ledger 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) and waiting (PR still open) are first-class answers, not errors. Merge detection is local git only; never query the PR API for this.

  4. 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-local result (offline push) or unavailable PR step as the retry guidance the core returned. Headless: a PromoteBlocked refusal (exit 2 — no routing doc, not a git work tree, dirty tree, sanitization finding) ends blocked with the core's error as reason — identically under dry_run: true: the core refusing a dry-run draft is still a refusal, never downgraded to complete; a push or PR step that could not reach the remote ends partial (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/description only; 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-promotion event — sole emitter this skill, through the emit verb 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

thkennedy
thkennedy/tk-studio

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.

★ 0
thkennedy
thkennedy/tk-studio

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.

★ 0
thkennedy
thkennedy/tk-studio

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.

★ 0
thkennedy
thkennedy/tk-studio

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".

★ 0
thkennedy
thkennedy/tk-studio

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".

★ 0
thkennedy
thkennedy/tk-studio

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.

★ 0