Skip to content

feat(meta-mode): bind playbooks to T3 Code native primitives - #38

Merged
3metaJun merged 4 commits into
mainfrom
feat/t3code-host-bindings
Oct 6, 2026
Merged

3metaJun merged 4 commits into
mainfrom
feat/t3code-host-bindings

Conversation

@3metaJun

@3metaJun 3metaJun commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Inside T3 Code, mstack skills run beside T3's native primitives without using them. babysit drives the Bun watch-pr under /loop, meta-mode and orchestrate delegate through run-role (children are invisible in T3's Agents UI and Stop does not reach them), recall cannot read T3 threads, /loop is the only unattended wake, and create-verification-skill has no path to T3's browser or simulator tools. CONTRIBUTING.md forbids hardcoding a delegation API into the skills, so a fork-style rewrite is out.

This adds a portable host-binding layer. Playbooks name capabilities and add one pointer sentence: on a host with native delegation, PR-watching, scheduling, history, or browser tools, read its file under references/hosts/ first, otherwise continue unchanged.

  • New skills/meta-mode/references/hosts/t3code.md: host detection (the t3-code MCP tools, one orchestrator_capabilities probe, matching docs/session-context/T3-CODE.md), a capability to T3 tool table with limits, fallbacks, and the rules that do not change (no merge on a wake, child modes cannot exceed the parent, a full brief on every delegate_task round, no t3_thread_launch for plain "subagent" requests, clientRequestId caveats).
  • Small hosts/t3code.md files for recall (T3 thread search and read) and create-verification-skill (preview_* and device_* as drivers and evidence).
  • Pointer sentences in meta-mode/SKILL.md, babysit, orchestrate, autonomous-run, autopilot-full, multi-phase-plan, shipping, session-pickup, capability-matrix.md, history-sources.md, harness-paths.md, and docs/guide/07-overnight.md. None names a T3 tool.
  • scripts/validate.mjs (via host-binding-lib.mjs) fails when a T3-only tool name appears under skills/ outside skills/*/references/hosts/. scripts/host-binding.test.mjs is table-driven and also checks that every tool named in a host reference is on a verified list.
  • docs/t3code.md "Orchestration overlap" now describes the binding. docs/session-context/T3-CODE.md does not contradict it and is unchanged.

Some details differ from what the T3 prompt text suggests, and the reference records them. Model and provider go in delegate_task's target, not at the top level. run_scheduled_task_now takes taskId while its siblings take scheduledTaskId. A merge ends watch_pull_request without a wake. A delegated child cannot watch a PR.

Verification:

  • Every tool name, argument, and limit was read from the T3 source at commit 8f75697 (mcp/toolkits/*, packages/contracts, T3OrchestrationInstructions.ts, RuntimeInstructions.ts, PullRequestWatchReactor.ts). Nothing was run against a live T3.
  • npm test passes (630 tests) on Windows. check-upstream --strict and skill-baseline --check pass against the pinned pstack and mattpocock checkouts. The skill baseline and the meta-mode canonical digest are refreshed, and docs/guide/07-overnight.md is recorded as a reviewed adaptation, since the upstream guide pin covers it.
  • scripts/check-package.mjs fails locally with spawnSync npm ENOENT on Windows. It does not touch these changes.

Model: Claude Sonnet 5.5
Harness: Claude Code

🤖 Generated with Claude Code

3metaJun and others added 4 commits October 6, 2026 18:39
Add a portable host-binding layer. Playbooks and the recall and create-verification-skill workflows point to a per-host reference under references/hosts/ when the host provides native delegation, PR watching, scheduling, thread history, or browser and simulator tools, and otherwise behave unchanged. The T3 Code references map each capability to the verified T3 MCP tool, its limits, and the rules that must not change.

validate.mjs now fails when a T3-only tool name appears under skills/ outside a references/hosts/ directory.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The identifier regex held literal backspace characters instead of word boundaries, so it matched nothing. Rewrite it as a shared helper and add negative fixtures for bogus thread, preview, and device tools plus a check that the real host references name many verified tools.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ding

T3 clears a merged PR's watch without waking the thread, so a turn ended on a green wake is never resumed by the merge. The host reference now adds a bounded schedule_task confirmation wake for merge waits. Also match list_scheduled_tasks in the host-tool gate, assert every verified tool is caught by it, and let create-verification-skill try portable drivers before declaring a path blocked.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
T3 scheduled tasks have no expiry and nothing cleans up after a Stop or crash. The reference now has the task delete itself on merge, close, hard-fail, a 6-hour deadline, or an exhausted run counter embedded in its prompt, uses a discoverable title, sweeps stale tasks at the start of later runs, and requires the final reply to name the task and how to delete it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@3metaJun
3metaJun merged commit ba55b36 into main Oct 6, 2026
9 checks passed
@3metaJun
3metaJun deleted the feat/t3code-host-bindings branch October 6, 2026 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant