Repository navigation
feat(t3): schema-driven T3 options, muse pool selection, T3 tools, and t3:setup live gate #319
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+401
−47
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
8754cae
feat(t3): read T3 model options from schema, add muse driver pool rul…
ericlitman 512efb4
feat(verify): add t3:setup and cross-provider Muse dispatch to T3 liv…
ericlitman 27aa1b3
fix(verify): read t3:setup probe receipt from probes/ dir so shell-va…
ericlitman c11ca60
fix(verify): stop filtering failed delegate_task calls in t3:dispatch…
ericlitman a11727d
fix(verify): expand shell variables in t3:setup sheetWrite detector
ericlitman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,21 +1,54 @@ | ||
| # T3 parent dispatch | ||
| # T3 parent dispatch and setup | ||
|
|
||
| ## Sub-features | ||
|
|
||
| `t3:dispatch`: a T3 Code parent running the installed `poteto-mode` routes a role whose provider T3 offers through T3's `delegate_task`, with the model and effort from the model sheet, and judges the result by the T3 host completion rules in `provider-dispatch.md`. Select it for a change to `provider-dispatch.md`, `codex-tools.md`, `setup-pstack/SKILL.md` or `recipes.ts`. A path that reaches it never adds it to every run; name it with `--feature t3:dispatch`. | ||
| `t3:dispatch`: a T3 Code parent running the installed `poteto-mode` routes each role whose provider T3 offers through T3's `delegate_task`, on the instance and effort option that the T3 host instance rule in `provider-dispatch.md` picks, and judges each result by that section's completion rules. One lane is Claude and one is an unregistered Muse model on T3's `muse` driver. | ||
|
|
||
| `t3:setup`: a T3 Code parent runs the installed `/setup-pstack` over a fixture sheet. It probes the T3-routed family through `delegate_task` and the Codex family through the runner, and writes the sheet only after both probes pass. | ||
|
|
||
| Select both for a change to `provider-dispatch.md`, `codex-tools.md`, `setup-pstack/SKILL.md`, `recipes.ts`, `harness.ts` or `doctor.ts`. A path that reaches them never adds them to every run; name them with `--feature t3:dispatch --feature t3:setup`. | ||
|
|
||
| ## How to get to it (user POV) | ||
|
|
||
| Start a T3 Code thread on the Claude provider with the candidate plugin loaded, and ask `poteto-mode` to dispatch one role from a model sheet. | ||
| Start a T3 Code thread on the Claude provider with the candidate plugin loaded. Ask `poteto-mode` to dispatch roles from a model sheet, or run `/setup-pstack`. | ||
|
|
||
| ## Driving it with verify-open-pstack | ||
|
|
||
| The `t3` transport runs a disposable T3 server from the operator's installed service binary, `~/.t3/runtime/versions/<activeVersion>/t3`, which `~/.t3/runtime/service-state.json` names. The server's base directory and project live in the run root. Its `userdata/settings.json` sets the `claudeAgent` provider's `launchArgs` to the same session-only `--plugin-dir <exact-head checkout>/plugins/pstack --settings '{"enabledPlugins":{"pstack@open-pstack":false}}'` the Claude harness uses, so the parent and every Claude child it delegates to load the candidate. Each case adds the fixture as a project, runs its prompt with `t3 thread start --provider claudeAgent --model claude-sonnet-5-5 --wait --json`, and stops the server. | ||
| The `t3` transport runs a disposable T3 server from the operator's installed service binary, `~/.t3/runtime/versions/<activeVersion>/t3`, which `~/.t3/runtime/service-state.json` names. The server's base directory and project live in the run root. Its `userdata/settings.json` sets the `claudeAgent` provider's `launchArgs` to the same session-only `--plugin-dir <exact-head checkout>/plugins/pstack --settings '{"enabledPlugins":{"pstack@open-pstack":false}}'` the Claude harness uses, so the parent and every Claude child it delegates to load the candidate. A case adds more provider instances to those settings: | ||
|
|
||
| - `dispatch` copies each enabled `muse` instance from the operator's `~/.t3/userdata/settings.json`, such as `muse_pool`, with only its driver, `enabled: true` and `config.binaryPath`. The base `muse` instance stays off by default, so the server has a disabled `muse` beside an enabled pool. The enabled `codex` instance also lists Muse models. The run stops with `t3-instance-missing:muse` when the operator has no enabled Muse instance. | ||
| - `setup` turns the `codex` instance off, so the Codex family takes the standalone route through the runner with `--parent claude`. | ||
|
|
||
| Each case adds the fixture as a project, runs its prompt with `t3 thread start --provider claudeAgent --model claude-sonnet-5-5 --wait --json`, and stops the server. The transport hashes the operator's `~/.t3/userdata/settings.json` before and after each case and fails the run on any change (`t3-operator-settings-unchanged`). | ||
|
|
||
| ## Gotchas | ||
|
|
||
| `t3 thread show --json` carries neither tool calls nor options, so the transport reads the parent's Claude transcript. The run-owned `statev2.sqlite` maps the T3 thread to its Claude session id (`nativeThreadRef.nativeId`), and the transcript is `<Claude config>/projects/<project realpath, each non-alphanumeric character as ->/<session>.jsonl`. That transcript and the delegated child's stay in the operator's Claude projects folder; the verifier copies the parent's into the run root. The operator's T3 service, settings and data are never touched. | ||
| `t3 thread show --json` carries neither tool calls nor options, so the transport reads the parent's Claude transcript. The run-owned `statev2.sqlite` maps the T3 thread to its Claude session id (`nativeThreadRef.nativeId`), and the transcript is `<Claude config>/projects/<project realpath, each non-alphanumeric character as ->/<session>.jsonl`. That transcript and the delegated children's stay in the operator's Claude projects folder; the verifier copies the parent's into the run root. The operator's T3 service, settings and data are never touched. | ||
|
|
||
| `orchestrator_capabilities` lists a provider's models only for a search, so the `dispatch` case merges the models of every capability call in the transcript before it applies the instance rule. | ||
|
|
||
| The T3 Claude runtime uses the operator's real Claude config home. `setup` is a setup feature, so the run snapshots `pstack-models.md` and `CLAUDE.md` there first, and restores and checks their bytes after the case. | ||
|
|
||
| ## Headless | ||
|
|
||
| The `dispatch` case writes a fixture sheet whose `bug-fix` role is `claude:claude-haiku-5-5@low` and a `marker.txt` holding a per-run `crypto.randomUUID()` that the prompt never contains. It asserts the transcript's `Base directory for this skill` line for `poteto-mode` is the candidate plugin path; exactly one `delegate_task` call has `target.providerInstanceId` `claudeAgent`, `target.model` `claude-haiku-5-5` and `target.options` `{"effort":"low"}`; its result names the same provider, model and effort and is settled (`completed`, `result_available`, no pending child runs, question or approval); and its summary holds the marker. The request and response are retained as `delegate-task.json`. The model's prose is never read. | ||
| The `dispatch` case writes a fixture sheet whose `bug-fix` role is Haiku 5.5 at `low` and whose `judgment and prose` role is `muse-spark-1.3` at `low`, plus one `marker-N.txt` per lane holding a per-run `crypto.randomUUID()` that the prompt never contains. It asserts: | ||
|
|
||
| - the transcript's `Base directory for this skill` line for `poteto-mode` is the candidate plugin path; | ||
| - exactly two `delegate_task` calls ran; | ||
| - the Claude lane's request and response name `claudeAgent`, `claude-haiku-5-5` and the option `effort` at `low`; | ||
| - the Muse lane's instance equals the pure `t3Pick` applied to the parent's own capability results, is never `codex`, and the request and response carry the option `reasoningEffort` at `low` (`instance-rule:muse`); | ||
| - each response is settled (`completed`, `result_available`, no pending child runs, question or approval), and its summary holds its lane's marker. | ||
|
|
||
| The requests and responses are retained as `delegate-task.json`. | ||
|
|
||
| The `setup` case runs `git init` in the fixture directory. It writes a fixture sheet into the snapshotted config home: the role defaults with every non-alias lane on Haiku 5.5 at `low`, `judgment and prose` on `gpt-6-luna` at `low`, the `# defaults: 3` line and `codex writer sandbox: bounded`. That makes the run a qualifying rerun, so setup asks nothing. The prompt puts probe files under `probes/` and smoke-test files under `smoke/` in the fixture directory. It asserts: | ||
|
|
||
| - the transcript's `Base directory for this skill` line for `setup-pstack` is the candidate plugin path; | ||
| - `orchestrator_capabilities` ran before both probes; | ||
| - a settled `delegate_task` probe ran on `claudeAgent` with `claude-haiku-5-5` and `{"effort":"low"}`; | ||
| - a `pstack-runner` call ran with `--parent claude --provider codex --model gpt-6-luna --effort low --mode read-only`, and its receipt under `probes/` is `complete` with `pinned-argv` evidence; | ||
| - no runner call named `--provider claude`, and no `delegate_task` call named `gpt-6-luna`; | ||
| - the first tool call that writes the sheet comes after both probes, and the sheet's mtime is at or after the runner receipt's `completedAt`; | ||
| - the sheet holds exactly the fixture's roles, the one setting line and the `# defaults: 3` line, and `CLAUDE.md` holds exactly one import line for the sheet. | ||
|
|
||
| The model's prose is never read. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.