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.
- License 许可
- MIT
- 最近更新
- 2026-11-10
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- tk-studio-session
- description
- 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.
02 资源文件 1
- 其他customize.toml591 B
03 SKILL.md 正文
tk-studio-session
Long work splits at declared boundaries (ST-6.6, spine conventions); this
skill is that discipline as an invocable surface (ST-9.2, Epic 9). Two
verbs: handoff lands the compact resume point and directs the session to
END; resume gives a fresh session everything it needs from the run
workspace alone — never by replaying history. Ending the session never
ends the run.
Behavior (both modes)
-
Every verb goes through the deterministic core:
uv run "${CLAUDE_PLUGIN_ROOT}/lib/session.py" handoff --directory <root> (--run-id <rid> | --job-id <id>) --boundary epic|story|phase|budget --name <boundary> --done ... --next ... [--gotcha ...] [--artifact ...] [--delta '<json>' ...] uv run "${CLAUDE_PLUGIN_ROOT}/lib/session.py" resume --directory <root> (--run-id <rid> | --job-id <id>)Exactly one selector:
--run-idnames the run;--job-idresolves the job's sole resumable run (zero or several is a named refusal, never a guess) — for drivers that submitted a job and never saw the minted run id. -
Handoffs carry corrections.
--delta(repeatable) attaches one structured delta — the closedcontracts/knowledge.schema.jsonshape{anchor, verdict: WRONG|STALE|CONFIRMED, reality, evidence, tier: run-local|spine}— validated bylib/knowledge.pyagainst the run workspace'sseed.md(anchors defined + inherited). Unanchored, dangling, and duplicate deltas (same anchor + verdict + reality + tier in one handoff — one correction, stated once) are named rejections, never silently dropped; a workspace with no seed has no anchors, so any delta against it dangles. Aid, not gate: only the delta-carrying handoff refuses — the run stays resumable, and a handoff without deltas lands regardless of seed state. -
Compact is enforced. The 16 KB budget did not grow for deltas (ST-9.2 ruling): deltas share it, the list is capped at 16, and
reality/evidenceare pointers (path:line, a URL), not essays. The budget measures the artifact as written to disk (ST-058) — the result'sbytesis the on-disk size, so payloads that once passed near the ceiling on a compact measurement now refuse honestly. Past either limit the handoff refuses — point at artifacts instead of inlining them. Onehandoff.jsonper run, overwritten each boundary; the latest boundary is the resume point. -
After
handoff: END the session. Relay the core's directive and stop — a handoff that keeps working is a history replay in the making. Afterresume: continue fromhandoff.nextwith the run record's checkpoint; nothing outside the workspace is required (success criterion 8). Surface anydeltas[]to the operator — they are corrections, not decoration: a delta-carrying handoff is captured into the per-project reconciliation queue at the boundary (ST-9.4,lib/reconcile.py, deduped — the response'scapturekey is the evidence), and the wrapper'sfinishcaptures again at run close. -
Attended: summarize the boundary, what landed, and (on resume) the next steps before continuing. Headless: an unknown/terminal run, an ambiguous
--job-id, a rejected delta, or a budget overrun endsblockedwith the gap named — never a prompt (AD-11). End headless runs with the status block:{"status": "complete", "intent": "tk-studio-session", "artifacts": ["~/.tk-studio/projects/<key>/runs/<run-id>/handoff.json"], "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
- The workspace is the resumable truth: resume reads
run.json+handoff.json+ the file listing, nothing else — never replay history. - Deltas cite identity, not location: an anchor id from the seed's available set, verbatim. Never invent, renumber, or "fix" an anchor to make a delta pass — a dangling delta means the seed moved or the claim is unanchored, and that is worth surfacing, not papering over.
- Provisional knowledge stays in the per-user store (AD-3):
seed.mdlives in the workspace, deltas ridehandoff.json— nothing here touches projectkb/(promotion is ST-9.5's PR membrane, D3). - The contract's §2 row for this surface shipped with the 0.1.7 bump (ST-9.6) — the row and the conformance manifest drives together are the driver-visible definition.
- 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-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.
tk-studio-orchestrator
The studio's front door — resolve who you are (role, per-user store), what this project needs (confirmed working_set.<role>), and route to resources by name, statelessly. Use when the user says "enter the studio", "tk studio", "orchestrate", "convene the council", or asks what to work on through the studio.