AGENT SKILL

tk-studio-activate

Studio activation front door — health/drift check proving the BMad base, the studio plugin, the per-user store, and the vault window are current. Read-only, loud, guided fixes. Use when the user says "activate the studio", "tk activate", "studio status", or "check for drift".

License 许可
MIT
最近更新
2026-11-10
Stars
★ 0
Forks
0

01 前言 Front Matter

name
tk-studio-activate
description
Studio activation front door — health/drift check proving the BMad base, the studio plugin, the per-user store, and the vault window are current. Read-only, loud, guided fixes. Use when the user says "activate the studio", "tk activate", "studio status", or "check for drift".

02 资源文件 3

03 SKILL.md 正文

tk-studio-activate

Activation cross-checks six planes — base, plugin (the skills-dir folder against the roster), store, vault, tracking, sandbox-login (AD-13) — and reports; it never mutates anything. Version skew is caught here, at the front door, instead of debugged later as ghosts.

Behavior (both modes)

  1. Run the drift check through the plugin root:

    uv run "${CLAUDE_PLUGIN_ROOT}/skills/tk-studio-activate/scripts/drift_check.py" --directory <project-root>
    

    --directory walks up to the nearest folder holding .tk-studio/config.yaml (driver contract 0.1.22), so from inside a nested studio project (apps/supervisor in tk-studio) the nested root wins. The JSON carries project_root, studio_root (the outer repository root, the plugin's home: $TK_STUDIO_ROOT, else the nearest folder holding plugins/tk-studio/; null when neither), nested and project_id.

    Add --guided only when running as part of guided onboarding — it additionally emits onboarding-funnel timing events per plane.

  2. The script checks six planes and emits its own measurement events (drift-detection on clean or drift; activation-failure if a check step itself fails):

    Plane Compares Guided fix on drift
    bmad-base installed _bmad/_config/manifest.yaml vs bmad.lock pins tk install
    plugin the skills-dir folder <home>/skills/tk-studio/'s plugin.json vs the configured channel's roster plugin entry (--channel, default stable; tools/installer/rosters/<channel>.json in the project) and, in a developer checkout only (a marketplace catalog listing tk-studio; a catalog without that entry is skipped), the marketplace catalog; case names ok, stale, missing or shadowed (a marketplace copy is installed). installed_plugins.json is read only to find marketplace copies, never for the version (AD-13, AD-21) stale: tk-studio update (plus --channel <channel> off the default stable); missing: tk-studio install; shadowed: claude plugin uninstall tk-studio@<m> --scope user (plus claude plugin marketplace remove tk-studio when the marketplace is known)
    store ~/.tk-studio skeleton + config keys uv run <plugin>/lib/store.py standup
    vault vault window links for this project (when registered) uv run <plugin>/lib/vault.py link --project-id <id>
    tracking the Atlassian sync-back (Story 31.4): when the last tick ran and whether the binding was reachable, read from .tk-studio/config.yaml and _bmad-output/tracking/sync-state.json only — never a network call; case names not-bound (no planning.jira binding, ok), never-run, ok (last tick complete or partial within 30 minutes), stale, token-missing, unreachable, deactivated or auth — each its own state, never "no changes"; last_run carries the tick's record never-run: plansync.py sync-back --directory <root> and declare the atlassian-sync-back job; stale: check the job is declared and bound; token-missing: set the named variable; unreachable: the network path; deactivated: the owner's sign-in (kb/atlassian-free-tier.md §1 step 10); auth: the 401/403 split's own text
    sandbox-login the engine sandbox's Max login (Story 33.2): for each sandbox the supervisor config (TK_SUPERVISOR_CONFIG jobs.*.sandbox) names, refreshTokenExpiresAt and loggedIn read through sbx exec (never a token) — sbx daemon status first, then sbx ls, sbx exec only on a running sandbox; case names ok, expiring (drift: 7 days or fewer, the expiry unreadable, or the login probe failed), expired (error: expired or logged out) or no-sandbox (missing: none configured, sbx absent, the daemon down, the sandbox stopped) expiring/expired: sbx run --name <sandbox> → /login → /exit; no-sandbox: the condition the detail names

    Exit codes: 0 clean, 1 drift found, 2 check-step error. Every missing or drift plane makes exit 1: sandbox-login missing (no-sandbox, a box with no engine sandbox) is result: drift (exit 1), and so is its expiring; only its expired (error) reaches exit 2. The vault plane records its observed state in the registry entry (writer: activate) — the one sanctioned bookkeeping write; unconfigured is clean (the vault is a view, never a dependency), and links are never repaired here.

  3. Report:

    • Both roots first: name the project root and the studio root from the JSON; when nested is true, say so — "nested project <project_id> at <project_root> inside the studio root <studio_root>".

    • Attended: state each plane's status in one line each; on drift, give the exact fix commands from the fixes array and stop — the fix is the operator's move, never applied silently (NFR6).

    • Headless: no prompts (AD-11). End with the status block: complete on exit 0 or 1 (a drift report is a completed check — the drift itself goes in reason), blocked on exit 2 with the failing step as reason:

      {"status": "complete", "intent": "tk-studio-activate", "artifacts": [], "reason": "drift: bmad-base — tea pinned v1.19.1, installed v1.20.0"}
      

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

  • Read-only, always (AD-13). If a fix is needed, name it; never run it from this skill.
  • All paths resolve through ${CLAUDE_PLUGIN_ROOT} — never assume the plugin lives inside the current repo.
  • scripts/plugin_info.py remains the lightweight identity probe (plugin root/version only) for callers that don't need the full check.

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