[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7EREGWH7JW073MWRB3F1PYS":3,"skill-same:01M7EREGWH7JW073MWRB3F1PYS":90},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M7EREGWH7JW073MWRB3F1PYS","verify-jstack",null,"Drive jstack's commands (jbus, jmerge, jgauge, install.sh) the way a user does, inside a throwaway sandbox with stand-ins for T3 Code and GitHub, and keep the evidence. Use to prove a change to jstack works in the real commands and not only in its tests, before a pull request claims it does.","JoshuaHayesWasHere\u002Fjstack","JoshuaHayesWasHere","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F78288453?v=4","01M7EQPZP0GDYN3SYY9SZZHFJE","Joshua Hayes","01M7EQPZPQKJDZR99NG512A8X2",1,"MIT","https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: verify-jstack\ndescription: Drive jstack's commands (jbus, jmerge, jgauge, install.sh) the way a user does, inside a throwaway sandbox with stand-ins for T3 Code and GitHub, and keep the evidence. Use to prove a change to jstack works in the real commands and not only in its tests, before a pull request claims it does.\n---\n\n# verify-jstack\n\njstack has no server and no screen.\nA user touches it in two ways: the commands `jbus`, `jmerge`, `jgauge`, `jbriefs` and `install.sh`, and the skills an agent loads.\nThis skill drives the commands.\nEach drive runs in a sandbox that `launch.sh` makes: its own HOME, its own jbus config and state, a demo repo, and local stand-ins for T3 Code, `gh` and `notify-send`.\n\nThe live jstack on this machine is one shared instance: the queue in `~\u002F.local\u002Fstate\u002Fjbus`, the briefs in `~\u002F.local\u002Fstate\u002Fhome`, the systemd timer and the real T3 threads.\nNever drive it.\nIn a shell that has not sourced a sandbox's `env.sh`, `jbus` and `jmerge` are the live ones and act on live state: run Doctor first, every time.\n\nWhat this skill cannot drive, so do not report it as verified: a real T3 thread (`jbus t3 login`, `jbus t3 launch-test`), a real merge (the stand-in `gh` refuses `gh pr merge`, so `jmerge` is driven with `--check` only), the systemd units, and what a skill makes an agent do inside a thread.\nThe tests cover the merge against a temporary origin (`features\u002Fhome\u002Ftests\u002Ftest_home_merge.py`).\n\nRun every command below from the root of this checkout unless it says otherwise.\nRead [`features\u002Fverify-jstack\u002Fproject-skill\u002Fmap.md`](..\u002F..\u002F..\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002Fmap.md) before a drive, then the file of the feature you are proving: its `features\u002F\u003Cname>\u002Fverify.md`, or its page in `testing\u002Fverify\u002F`.\n\n## Set up by a stand-in\n\nA sandbox is a stand-in for the machine jstack runs on. Each line below is a setup step that `launch.sh` or a stand-in did, and that the real machine does another way. A drive proves what the commands do after these steps, never the steps. They stay unverified until a run on the real machine covers them.\n\n- `fake-gh` answers `gh pr list` from `gh\u002F*.json`, which Launch writes and a drive edits, and gives fixed answers to the rest: `main` for `repo view`, `sandbox-owner` as the repo's owner, no comment or review on a pull request, no pull request for `pr list --base`, nothing for `api --paginate`, a commit's check runs from `gh\u002Fchecks.json` (none until a drive writes some) and a job's log from `gh\u002Flogs\u002F\u003Cjob id>`.\n  The real machine asks GitHub through a signed-in `gh`, gets GitHub's own JSON, and can merge.\n- `fake-gh` gives a list of open pull requests a page at a time, as gh and GitHub do: `gh pr list` gives at most its `--limit` (30 untold), and `gh api ...\u002Fpulls?state=open` one page of `per_page` (30 untold, at most 100) at `page`, so a drive with more open pull requests than a command's cap sees the cap.\n  The real machine asks GitHub, which gives its lists the same way.\n- `fake-gh` answers `gh pr edit \u003Cnumber> --base \u003Cbranch>` by changing that pull request's `baseRefName` in `gh\u002Fopen.json`.\n  The real machine asks GitHub, which also reruns the pull request's checks against the new base.\n- `fake-gh` answers `gh api repos\u002F{owner}\u002F{repo}\u002Fcompare\u002F\u003Cbase>...\u003Chead>` with GitHub's `status` alone (`identical`, `ahead`, `behind` or `diverged`), read with git from the sandbox's `origin.git`, and a commit the origin lacks is not found.\n  So a drive that wants a compare answered pushes real commits there, and `gh pr view` of a pull request gives it from `gh\u002Fopen.json` as `OPEN`, or else from `gh\u002Fmerged.json` as `MERGED`.\n  The real machine asks GitHub, whose compare also gives the commits and the files between the two.\n- `fake-gh` answers `gh pr revert \u003Caddress>` of a pull request in `gh\u002Fmerged.json` by reverting its `mergeCommit` onto its base in `origin.git`, on the branch `revert-\u003Cnumber>-\u003Cits branch>`, adding that branch's pull request to `gh\u002Fopen.json` with the next number and no check yet, and printing its address.\n  It refuses a merge whose revert changes nothing, and a branch already open.\n  The real machine asks GitHub, which makes the revert and its pull request itself, and runs the pull request's checks.\n- `fake_t3.py` is the T3 Code server and takes a token Launch made up and wrote to `config\u002Ft3.json`. The real machine signs in with `jbus t3 login`, approved in T3 Code.\n- `fake_t3.py` answers `t3_thread_launch` with a thread id, and makes no worktree and starts no agent. On the real machine T3 Code does both.\n- `fake_t3.py` answers `t3_thread_configure` with what it keeps for the thread: the selection the launch or the last move gave it, or a made-up one, and it moves no run and has no limits of its own.\n  On the real machine T3 Code keeps the selection, and a usage limit ends a run because the provider says so.\n- `fake_t3.py` answers `orchestrator_capabilities` with each instance of `t3\u002Fcapabilities.json` and its constraints, none until a drive writes some, and `t3_thread_read` with the `recentRuns` a drive keeps on the thread in `t3\u002Fthreads.json`.\n  On the real machine T3 Code lists each instance it has, and gives one `Provider is not authenticated.` when its provider's sign-in lapsed.\n- `fake_t3.py` answers `t3_project_list` with the projects of `t3\u002Fprojects.json`, none until a drive writes some, and `t3_project_update` by setting or clearing that project's `archivedAt` there.\n  On the real machine T3 Code lists every project it has, and an archived one leaves its sidebar.\n- `fake_t3.py` takes each wake jbus sends the home thread, `mcp:sandbox-home`, and writes the lines of its items to `t3\u002Fwake.jsonl`.\n  On the real machine the wake queues in the project's home thread, which T3 Code can refuse.\n- `notify-send` is a script that appends to `notify.log`. The real machine shows a notification on a desktop session.\n- `fake-systemctl` is `systemctl`. It says the manager reads the sandbox's HOME, makes and removes the links systemd makes on `enable` and `disable` of a linked unit, writes each call to `systemctl.log`, and starts no unit. On the real machine systemd loads the units and the timer runs the pass.\n- `fake-launchctl` is `launchctl`, for a run on macOS.\n  It loads and boots out agents in the gui domain as launchd does, answers `print` and `list` with launchd's words and exit codes, writes each call to `launchctl.log`, and runs no agent.\n- `uv tool install` is the real one, with `UV_TOOL_DIR` in the sandbox and the host's cache and Pythons. On the real machine uv keeps its tools under the user's HOME.\n- A release is a wheel `make dist` built from this checkout, served by a local web server named in `JSTACK_RELEASE_URL`, and the uv installer `install.sh` fetches when uv is missing is a stand-in named in `JSTACK_UV_INSTALLER`. On the real machine both come from GitHub's release and astral.sh, over the network.\n- `PROC` and `LIMITS` name files Launch wrote: an idle machine and a plan at 10% of its limits. The real machine reads `\u002Fproc` and the plan's own limits.\n- `config\u002Fconfig.toml` is written by Launch: one project, `dispatch = true`, `max_running = 1`, and `home_thread = \"mcp:sandbox-home\"`, so wakes go to that thread of the stand-in.\n  On the real machine the user writes `~\u002F.config\u002Fjbus\u002Fconfig.toml`.\n- The demo repo's origin is a bare directory beside it, and HOME is new and empty. On the real machine the origin is GitHub and HOME is the user's.\n- The commands come from this checkout's `.venv\u002Fbin` after `uv sync`, and `jbus poll` is typed. The real machine has them from `uv tool install --editable`, and a systemd timer runs the pass.\n\nName these as unverified wherever a drive is reported: in the evidence, in a pull request, in a Result. `record` writes this list at the top of every `record` file, from this section, so add a step here when a stand-in gains one.\n\n## Launch\n\nThere is nothing to keep alive but the stand-in for T3 Code. Launch installs this checkout's commands with `uv sync`, makes the sandbox from nothing (the demo repo, the config, the seed files a drive edits), starts the stand-in, and prints one line when it is ready: `ready: . \u003Csandbox>\u002Fenv.sh`.\n\nReady means a drive can run, not that the stand-in answers. Before that line, Launch runs two real commands the way a drive does, with `env.sh` sourced: `jbus --project demo queue show` must succeed, and `jmerge --check` must succeed in the demo checkout and ask the stand-in `gh`. When either fails there is no `ready:` line: Launch prints `launch.sh: not ready: `\u003Cthe command>` failed in the sandbox` with what the command said, tears down what it made, and exits 1. It removes the `gh` call its own probe made, so a drive starts with no `gh\u002Fcalls.log`.\n\n```sh\nready=$(features\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Flaunch.sh) && echo \"$ready\"\n. \"${ready#ready: . }\"\n```\n\nSource that `env.sh` again in every new shell: an agent's shell does not keep variables from one call to the next. It sets HOME, `JBUS_CONFIG_DIR`, `JBUS_STATE_DIR`, `JBUS_HOME_DIR`, `PROC`, `LIMITS` and PATH, defines `record`, and changes to the demo repo's main checkout, `$VERIFY_JSTACK_SANDBOX\u002Fdemo`. Each launch has its own directory and its own port, so sandboxes run side by side: use a new one for each feature. Launch from a shell that has sourced no `env.sh`: inside a sandbox `launch.sh` prints `launch.sh: this shell is in the sandbox \u003Cpath>: launch from a new shell` and exits 1.\n\nTeardown is Cleanup, below.\n\n## Doctor\n\nOne read-only check. Run it first, and again whenever anything looks off. Drive only when its last line is `doctor: ok`.\n\n```sh\n\"$VERIFY_JSTACK_SCRIPTS\u002Fdoctor.sh\"\n```\n\nIt prints one `ok` or `bad` line for each thing a drive leans on: HOME and jbus's three directories are in the sandbox, `gh`, `notify-send` and `systemctl` are the stand-ins, `jbus`, `jmerge`, `jgauge` and `jbriefs` are this checkout's build, the stand-in for T3 Code is the process this sandbox started and answers for it, jbus reads the sandbox's config, and the evidence directory is outside the sandbox. Its `build` line is the commit under test and how many files are uncommitted.\n\nIt also checks the seed, feature by feature. Each file in `features\u002F` has a `Needs:` line that lists the seed its journey relies on, and Doctor prints `ok   \u003Cfeature>: seed has \u003Cthe list>`, or `bad  \u003Cfeature>: seed lacks \u003Cx>` for each one this sandbox does not have. A `seed lacks` line makes the last line `doctor: not ok`, as every `bad` line does, so nothing is driven in that sandbox. The feature the line names is also reported as failed, with that line as the reason, and the reason is written in the feature's Gotchas. A feature whose own line is `ok` has not failed: clean up, and drive it in a new sandbox. That helps only when a drive removed the seed. Launch makes every seed, so a new sandbox with a `seed lacks` line is a fault in `launch.sh` or in the feature file's `Needs:` line, and nothing is driven until it is fixed. The check is of what Launch made and every recipe keeps (the file is there, a JSON file is still a list), so it holds at the end of a drive that edited the seed. Never weaken the journey to make it pass: do not drop the step that needs the seed, do not write the seed by hand to get past Doctor, and do not report the rest of the recipe as the feature.\n\n## Drive\n\nThe harness is the shell. Type the commands a user types, with `record` in front of each one that is part of the proof. `record \u003Cname> \u003Ccommand>` runs the command, prints what it printed, and appends the command, its output and its exit code to `$VERIFY_JSTACK_EVIDENCE\u002F\u003Cname>.txt`. A command that reads stdin gets it through `record`.\n\nOne feature, start to finish: a row of the jbus queue from `add` to a launched thread.\nThe other features are in each `features\u002F\u003Cname>\u002Fverify.md`, and the shared test tooling's in [`testing\u002Fverify\u002F`](..\u002F..\u002F..\u002Ftesting\u002Fverify\u002F).\n\n```sh\nprintf '# alpha: a demo task\\nTask: alpha, a demo task\\nWhy: the sandbox needs a row the queue takes\\nDone when:\\n- the demo works\\nProves it: the demo test\\nSize: S\\nWhere: `src\u002Falpha\u002F`\\nDesign: none, a demo\\nReview: none\\nPlaybook: feature\\nSkills: tdd\\nPull request: none\\nHome: uncategorized\\n' | record queue-row jbus queue add alpha --priority 1\nprintf '{\"mcp:sandbox-chat\": [{\"itemId\": \"turn-item:message:m1\", \"messageId\": \"m1\", \"text\": \"go\", \"type\": \"user_message\", \"createdBy\": \"user\", \"updatedAt\": \"%s\"}]}\\n' \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" > \"$VERIFY_JSTACK_SANDBOX\u002Ft3\u002Fmessages.json\"\nword=$(record queue-row jbus word --to demo --message mcp:sandbox-chat\u002Fm1 | awk '{print $NF}')\nrecord queue-row jbus queue approve alpha --word \"$word\"\nrecord queue-row jbus poll\nrecord queue-row jbus queue show\nrecord queue-row jbus status\n```\n\n`jbus poll` prints `launched alpha: mcp:sandbox-thread-1`, and the row's `status` and `thread` columns then say so.\n\nTo stop that thread on a usage limit, give the crew's role a pool of two instances before the launch, launch the row as above, then fail its run between passes.\nEach block below is whole, from a new sandbox, so it carries the launch again.\nThe next `jbus poll` prints `failover alpha: five_hour limit until ...`, and `t3\u002Fcalls.jsonl` has the `t3_thread_configure` that moved it and the queued carry-on.\nThe open pull request makes the pass ask GitHub who owns the repo, and it prints no line that GitHub did not say.\n\n```sh\nmkdir -p \"$VERIFY_JSTACK_SANDBOX\u002Fhome\u002F.config\u002Fjstack\"\necho 'crew: claudeAgent claude-sonnet-5-5 claudeAgent,claudeAgent_sandbox' > \"$VERIFY_JSTACK_SANDBOX\u002Fhome\u002F.config\u002Fjstack\u002Froles\"\nprintf '# alpha: a demo task\\nTask: alpha, a demo task\\nWhy: the sandbox needs a row the queue takes\\nDone when:\\n- the demo works\\nProves it: the demo test\\nSize: S\\nWhere: `src\u002Falpha\u002F`\\nDesign: none, a demo\\nReview: none\\nPlaybook: feature\\nSkills: tdd\\nPull request: none\\nHome: uncategorized\\n' | record usage-limit jbus queue add alpha --priority 1\nprintf '{\"mcp:sandbox-chat\": [{\"itemId\": \"turn-item:message:m1\", \"messageId\": \"m1\", \"text\": \"go\", \"type\": \"user_message\", \"createdBy\": \"user\", \"updatedAt\": \"%s\"}]}\\n' \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" > \"$VERIFY_JSTACK_SANDBOX\u002Ft3\u002Fmessages.json\"\nword=$(record usage-limit jbus word --to demo --message mcp:sandbox-chat\u002Fm1 | awk '{print $NF}')\nrecord usage-limit jbus queue approve alpha --word \"$word\"\nrecord usage-limit jbus poll\nT=\"$VERIFY_JSTACK_SANDBOX\u002Ft3\"\nnotice=\"run-1:usage-limit:five_hour:$(($(date +%s) + 3600))\"\njq --arg id \"$notice\" '.\"mcp:sandbox-thread-1\" = [{runId: \"run-1\", itemId: $id, type: \"system_notice\", text: \"\"}]' \"$T\u002Fmessages.json\" > \"$T\u002Fm\" && mv \"$T\u002Fm\" \"$T\u002Fmessages.json\"\njq 'map(.status = \"failed\" | .latestRunId = \"run-1\")' \"$T\u002Fthreads.json\" > \"$T\u002Ft\" && mv \"$T\u002Ft\" \"$T\u002Fthreads.json\"\n\"$VERIFY_JSTACK_SCRIPTS\u002Fopen-pull.sh\" alpha src\u002Falpha\u002Fa.py\nrecord usage-limit jbus poll\n```\n\nTo stop that thread on a login lapse instead, launch the row with no roles file, then sign its instance out and fail its run with the provider's words.\nThe run ends ten minutes before the pass, since a pass counts an instance a run failed to sign in on less than five minutes ago (`failover.HOLD`) as signed out whatever T3 Code says, and so only the constraint holds the thread here.\nEach `jbus poll` while the constraint is there sends the thread nothing, and the first prints `signed out: claudeAgent cannot sign in, ...` once.\nOnce the drive clears the constraint, the next pass prints `failover alpha: claudeAgent could not sign in, carry-on on claudeAgent, ...`, and `t3\u002Fcalls.jsonl` has its one `t3_thread_send` keyed `lapse|mcp:sandbox-thread-1|run-1`.\nA pass after it sends nothing more.\nLeave the pull request out of this drive: a pass tells the crew of a green one, and that send is not the carry-on.\n\n```sh\nprintf '# alpha: a demo task\\nTask: alpha, a demo task\\nWhy: the sandbox needs a row the queue takes\\nDone when:\\n- the demo works\\nProves it: the demo test\\nSize: S\\nWhere: `src\u002Falpha\u002F`\\nDesign: none, a demo\\nReview: none\\nPlaybook: feature\\nSkills: tdd\\nPull request: none\\nHome: uncategorized\\n' | record login-lapse jbus queue add alpha --priority 1\nprintf '{\"mcp:sandbox-chat\": [{\"itemId\": \"turn-item:message:m1\", \"messageId\": \"m1\", \"text\": \"go\", \"type\": \"user_message\", \"createdBy\": \"user\", \"updatedAt\": \"%s\"}]}\\n' \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" > \"$VERIFY_JSTACK_SANDBOX\u002Ft3\u002Fmessages.json\"\nword=$(record login-lapse jbus word --to demo --message mcp:sandbox-chat\u002Fm1 | awk '{print $NF}')\nrecord login-lapse jbus queue approve alpha --word \"$word\"\nrecord login-lapse jbus poll\nT=\"$VERIFY_JSTACK_SANDBOX\u002Ft3\"\nended=$(perl -MPOSIX -e 'print strftime(\"%Y-%m-%dT%H:%M:%SZ\", gmtime(time - 600))')\njq --arg at \"$ended\" '.\"mcp:sandbox-thread-1\" = [{runId: \"run-1\", itemId: \"run-1:error\", type: \"error\", text: \"Not logged in · Please run \u002Flogin\", updatedAt: $at}]' \"$T\u002Fmessages.json\" > \"$T\u002Fm\" && mv \"$T\u002Fm\" \"$T\u002Fmessages.json\"\njq --arg at \"$ended\" 'map(.status = \"failed\" | .latestRunId = \"run-1\" | .recentRuns = [{runId: \"run-1\", ordinal: 1, status: \"failed\", providerInstanceId: \"claudeAgent\", model: \"claude-sandbox\", requestedAt: $at, startedAt: $at, completedAt: $at}])' \"$T\u002Fthreads.json\" > \"$T\u002Ft\" && mv \"$T\u002Ft\" \"$T\u002Fthreads.json\"\njq '.claudeAgent = [\"Provider is not authenticated.\"]' \"$T\u002Fcapabilities.json\" > \"$T\u002Fc\" && mv \"$T\u002Fc\" \"$T\u002Fcapabilities.json\"\nrecord login-lapse jbus poll\nrecord login-lapse jbus poll\njq '.claudeAgent = []' \"$T\u002Fcapabilities.json\" > \"$T\u002Fc\" && mv \"$T\u002Fc\" \"$T\u002Fcapabilities.json\"\nrecord login-lapse jbus poll\nrecord login-lapse jbus poll\njq -c 'select(.tool == \"t3_thread_send\") | .arguments.clientRequestId' \"$T\u002Fcalls.jsonl\"\n```\n\nWhat a drive sets up and reads, all under `$VERIFY_JSTACK_SANDBOX`:\n\n| Path | What it is | A drive |\n|---|---|---|\n| `gh\u002Fopen.json`, `gh\u002Fmerged.json`, `gh\u002Fcommits.json`, `gh\u002Fchecks.json`, `gh\u002Flogs\u002F` | what GitHub would answer | edits them (`open-pull.sh` writes `open.json`) |\n| `gh\u002Fcalls.log` | every `gh` call jbus and jmerge made | reads it |\n| `t3\u002Fthreads.json` | the threads T3 Code has, each with its `modelSelection` and its `recentRuns` | edits a thread's `status`, `latestRunId`, `recentRuns` or `settled` between passes |\n| `t3\u002Fcapabilities.json` | each provider instance T3 Code lists, by its id, with its constraints | gives an instance `Provider is not authenticated.` to sign it out, and clears it to sign it in |\n| `t3\u002Fmessages.json` | a thread's items, by thread id: the user's messages that `jbus word --message \u003Cthread>\u002F\u003Cmessage>` reads, and the items of a run a pass reads for a usage limit | writes one before a drive keeps the user's word or stops a thread on a limit |\n| `t3\u002Fcalls.jsonl` | every tool call jbus made, with its arguments | reads it |\n| `t3\u002Fwake.jsonl` | every wake sent to a home thread, with the thread and the lines it carried | reads it |\n| `machine\u002Fproc\u002Floadavg`, `machine\u002Flimits` | the load and the plan limits `jgauge room` reads | edits them |\n| `home\u002F.local\u002Fstate\u002Fhome\u002Fdemo\u002Ftasks\u002F` | the demo repo's briefs | writes briefs, reads the `Thread:` line jbus adds |\n| `state\u002F` | jbus's queue, outbox, launch records and `status.json` | reads it, never writes it by hand |\n| `notify.log` | what `notify-send` was asked to show | reads it |\n\nReach state through the command a user has for it (`jbus queue add`, not an edit of `queue.json`). The files above marked \"edits\" are the outside world, which the user does not control with a jstack command.\n\n## Evidence\n\nEvidence goes to `$VERIFY_JSTACK_EVIDENCE`, which is `\u002Ftmp\u002Fverify-jstack-evidence\u002F\u003Cthe sandbox's name>` (under `$TMPDIR` when that is set). It is outside the sandbox and Cleanup keeps it. `\u002Ftmp` is emptied on a reboot: copy the directory elsewhere if the proof must outlive one.\n\n`record` keeps the action. Keep the resulting state too, by copying what the commands changed:\n\n```sh\ncp \"$VERIFY_JSTACK_SANDBOX\u002Ft3\u002Fcalls.jsonl\" \"$VERIFY_JSTACK_SANDBOX\u002Ft3\u002Fwake.jsonl\" \"$VERIFY_JSTACK_SANDBOX\u002Fgh\u002Fcalls.log\" \"$VERIFY_JSTACK_EVIDENCE\u002F\"\ncp \"$HOME\u002F.local\u002Fstate\u002Fhome\u002Fdemo\u002Ftasks\u002Falpha.md\" \"$VERIFY_JSTACK_EVIDENCE\u002Fbrief-alpha.md\"\ncp \"$JBUS_STATE_DIR\u002Fdemo\u002Fqueue.json\" \"$VERIFY_JSTACK_EVIDENCE\u002F\"\n\"$VERIFY_JSTACK_SCRIPTS\u002Fdoctor.sh\" > \"$VERIFY_JSTACK_EVIDENCE\u002Fdoctor.txt\"\n```\n\nThe standards a proof is held to:\n\n- Drive the real command, as built from this checkout (`doctor.txt` names the commit). Do not call a Python function, and do not write jbus's state files by hand.\n- Keep the action and the state it left: the `record` file, and a second view of the result (`jbus queue show` after `jbus poll`, the brief's `Thread:` line, `status.json`).\n- Verify the side effects, not only the printout. A launch is a `t3_thread_launch` line in `t3\u002Fcalls.jsonl`. A wake is a line in `t3\u002Fwake.jsonl`. A message to the desk is a line in `notify.log`.\n- The stand-ins are the only mocks, and each sits where jstack already ends: T3 Code's MCP endpoint, `gh`, `notify-send`, and the machine readings `jgauge room` takes from `PROC` and `LIMITS`.\n- Do not trust `jmerge --check` by its name. `gh\u002Fcalls.log` shows what it asked GitHub, and has no `pr merge` line.\n- Name the feature file and the entry point with each artifact. An entry point that was not driven is reported as not driven, with the reason.\n- Every `record` file starts with the list from \"Set up by a stand-in\". Leave it there, and say the same beside any claim the evidence backs: those steps are not verified.\n\nKeep the config out of the evidence: `config\u002Fconfig.toml` and `config\u002Ft3.json` hold the sandbox's made-up key and token, which open nothing, and still do not belong in a pull request.\n\n## Cleanup\n\n```sh\n\"$VERIFY_JSTACK_SCRIPTS\u002Fcleanup.sh\"\n```\n\nIt stops the stand-in for T3 Code by the pid Launch wrote down, and only while that pid is still this sandbox's stand-in.\nThen it removes the sandbox directory, and prints the evidence directory and its files, which it keeps.\nWith no `env.sh` sourced, name the sandbox: `features\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Fcleanup.sh \u002Ftmp\u002Fverify-jstack.\u003Cits six characters>`.\nIt refuses a directory that does not hold the marker file Launch writes first, `.verify-jstack-sandbox`.\nIt refuses a path that does not start with `\u002F`, too.\nNever stop a process by its name: another agent's sandbox may be running beside this one.\n\nRun it after a failed drive too. Then confirm the evidence is still there:\n\n```sh\nls -l \"${TMPDIR:-\u002Ftmp}\u002Fverify-jstack-evidence\u002F\"\n```\n\n## Helpers\n\nAll in `features\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002F`, which `$VERIFY_JSTACK_SCRIPTS` names once `env.sh` is sourced.\n\n| Script | Run it as | What it does |\n|---|---|---|\n| `launch.sh` | `features\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Flaunch.sh` | makes a sandbox, starts the stand-in, runs `jbus` and `jmerge` in it, prints `ready: . \u003Csandbox>\u002Fenv.sh` |\n| `doctor.sh` | `\"$VERIFY_JSTACK_SCRIPTS\u002Fdoctor.sh\"` | the read-only check, each feature's seed included, `doctor: ok` or exit 1 |\n| `record.sh` | `record \u003Cname> \u003Ccommand>` (the function `env.sh` defines) | runs a command and keeps it in `$VERIFY_JSTACK_EVIDENCE\u002F\u003Cname>.txt`, under the list of what a stand-in set up |\n| `open-pull.sh` | `\"$VERIFY_JSTACK_SCRIPTS\u002Fopen-pull.sh\" beta src\u002Fbeta\u002Fa.py` | gives the sandbox's GitHub one open pull request, number 7, and prints its head commit |\n| `cleanup.sh` | `\"$VERIFY_JSTACK_SCRIPTS\u002Fcleanup.sh\"` | stops the stand-in, removes the sandbox, keeps the evidence |\n| `fake_t3.py` | started by `launch.sh`, never by hand | the stand-in for T3 Code's MCP endpoint (`$VERIFY_JSTACK_URL\u002Fmcp`), which keeps each wake in `t3\u002Fwake.jsonl` |\n| `fake-gh` | linked as `gh` on the sandbox's PATH, never run by hand | the stand-in for `gh`: answers from `gh\u002F*.json`, exits 64 on `pr merge` |\n| `fake-systemctl` | linked as `systemctl` on the sandbox's PATH, never run by hand | the stand-in for `systemctl --user`: answers for the sandbox's HOME, links and unlinks as systemd does, starts nothing |\n| `fake-launchctl` | linked as `launchctl` on the sandbox's PATH, never run by hand | the stand-in for `launchctl` on macOS: loads and boots out agents as launchd does, starts nothing |\n\nAfter a change to these scripts, run the two deterministic end-to-end scripts in [`features\u002Fverify-jstack\u002Fe2e\u002F`](..\u002F..\u002F..\u002Ffeatures\u002Fverify-jstack\u002Fe2e\u002FREADME.md), each with `bash \u003Cscript>` from a shell in no sandbox.\nEach ends `e2e: ok` and prints the same lines on a rerun.\n\nWhen jstack changes, the feature files are what go stale first.\n`\u002Fmaintain-verification-skill` finds this skill through `skills.json`, where `projectSkills` names it, but it reads a feature map only from the skill's own `features\u002F` folder, which this skill does not have: on jstack it stops at `no feature map`.\n\nEach feature file also has a `Paths:` list, the paths it owns, and a `Tests:` list, the tests that read it in a way no import shows, and the map a `Cross-cutting:` list, each one entry per line: `scripts\u002Fselect_tests.py \u003Cbase> \u003Chead>` reads them, with the imports of the tree, to name the tests a diff needs, and `testing\u002Ftests\u002Ftest_select_tests_rules.py` fails on a path the map leaves out.\n","# verify-jstack\n\njstack has no server and no screen.\nA user touches it in two ways: the commands `jbus`, `jmerge`, `jgauge`, `jbriefs` and `install.sh`, and the skills an agent loads.\nThis skill drives the commands.\nEach drive runs in a sandbox that `launch.sh` makes: its own HOME, its own jbus config and state, a demo repo, and local stand-ins for T3 Code, `gh` and `notify-send`.\n\nThe live jstack on this machine is one shared instance: the queue in `~\u002F.local\u002Fstate\u002Fjbus`, the briefs in `~\u002F.local\u002Fstate\u002Fhome`, the systemd timer and the real T3 threads.\nNever drive it.\nIn a shell that has not sourced a sandbox's `env.sh`, `jbus` and `jmerge` are the live ones and act on live state: run Doctor first, every time.\n\nWhat this skill cannot drive, so do not report it as verified: a real T3 thread (`jbus t3 login`, `jbus t3 launch-test`), a real merge (the stand-in `gh` refuses `gh pr merge`, so `jmerge` is driven with `--check` only), the systemd units, and what a skill makes an agent do inside a thread.\nThe tests cover the merge against a temporary origin (`features\u002Fhome\u002Ftests\u002Ftest_home_merge.py`).\n\nRun every command below from the root of this checkout unless it says otherwise.\nRead [`features\u002Fverify-jstack\u002Fproject-skill\u002Fmap.md`](..\u002F..\u002F..\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002Fmap.md) before a drive, then the file of the feature you are proving: its `features\u002F\u003Cname>\u002Fverify.md`, or its page in `testing\u002Fverify\u002F`.\n\n## Set up by a stand-in\n\nA sandbox is a stand-in for the machine jstack runs on. Each line below is a setup step that `launch.sh` or a stand-in did, and that the real machine does another way. A drive proves what the commands do after these steps, never the steps. They stay unverified until a run on the real machine covers them.\n\n- `fake-gh` answers `gh pr list` from `gh\u002F*.json`, which Launch writes and a drive edits, and gives fixed answers to the rest: `main` for `repo view`, `sandbox-owner` as the repo's owner, no comment or review on a pull request, no pull request for `pr list --base`, nothing for `api --paginate`, a commit's check runs from `gh\u002Fchecks.json` (none until a drive writes some) and a job's log from `gh\u002Flogs\u002F\u003Cjob id>`.\n  The real machine asks GitHub through a signed-in `gh`, gets GitHub's own JSON, and can merge.\n- `fake-gh` gives a list of open pull requests a page at a time, as gh and GitHub do: `gh pr list` gives at most its `--limit` (30 untold), and `gh api ...\u002Fpulls?state=open` one page of `per_page` (30 untold, at most 100) at `page`, so a drive with more open pull requests than a command's cap sees the cap.\n  The real machine asks GitHub, which gives its lists the same way.\n- `fake-gh` answers `gh pr edit \u003Cnumber> --base \u003Cbranch>` by changing that pull request's `baseRefName` in `gh\u002Fopen.json`.\n  The real machine asks GitHub, which also reruns the pull request's checks against the new base.\n- `fake-gh` answers `gh api repos\u002F{owner}\u002F{repo}\u002Fcompare\u002F\u003Cbase>...\u003Chead>` with GitHub's `status` alone (`identical`, `ahead`, `behind` or `diverged`), read with git from the sandbox's `origin.git`, and a commit the origin lacks is not found.\n  So a drive that wants a compare answered pushes real commits there, and `gh pr view` of a pull request gives it from `gh\u002Fopen.json` as `OPEN`, or else from `gh\u002Fmerged.json` as `MERGED`.\n  The real machine asks GitHub, whose compare also gives the commits and the files between the two.\n- `fake-gh` answers `gh pr revert \u003Caddress>` of a pull request in `gh\u002Fmerged.json` by reverting its `mergeCommit` onto its base in `origin.git`, on the branch `revert-\u003Cnumber>-\u003Cits branch>`, adding that branch's pull request to `gh\u002Fopen.json` with the next number and no check yet, and printing its address.\n  It refuses a merge whose revert changes nothing, and a branch already open.\n  The real machine asks GitHub, which makes the revert and its pull request itself, and runs the pull request's checks.\n- `fake_t3.py` is the T3 Code server and takes a token Launch made up and wrote to `config\u002Ft3.json`. The real machine signs in with `jbus t3 login`, approved in T3 Code.\n- `fake_t3.py` answers `t3_thread_launch` with a thread id, and makes no worktree and starts no agent. On the real machine T3 Code does both.\n- `fake_t3.py` answers `t3_thread_configure` with what it keeps for the thread: the selection the launch or the last move gave it, or a made-up one, and it moves no run and has no limits of its own.\n  On the real machine T3 Code keeps the selection, and a usage limit ends a run because the provider says so.\n- `fake_t3.py` answers `orchestrator_capabilities` with each instance of `t3\u002Fcapabilities.json` and its constraints, none until a drive writes some, and `t3_thread_read` with the `recentRuns` a drive keeps on the thread in `t3\u002Fthreads.json`.\n  On the real machine T3 Code lists each instance it has, and gives one `Provider is not authenticated.` when its provider's sign-in lapsed.\n- `fake_t3.py` answers `t3_project_list` with the projects of `t3\u002Fprojects.json`, none until a drive writes some, and `t3_project_update` by setting or clearing that project's `archivedAt` there.\n  On the real machine T3 Code lists every project it has, and an archived one leaves its sidebar.\n- `fake_t3.py` takes each wake jbus sends the home thread, `mcp:sandbox-home`, and writes the lines of its items to `t3\u002Fwake.jsonl`.\n  On the real machine the wake queues in the project's home thread, which T3 Code can refuse.\n- `notify-send` is a script that appends to `notify.log`. The real machine shows a notification on a desktop session.\n- `fake-systemctl` is `systemctl`. It says the manager reads the sandbox's HOME, makes and removes the links systemd makes on `enable` and `disable` of a linked unit, writes each call to `systemctl.log`, and starts no unit. On the real machine systemd loads the units and the timer runs the pass.\n- `fake-launchctl` is `launchctl`, for a run on macOS.\n  It loads and boots out agents in the gui domain as launchd does, answers `print` and `list` with launchd's words and exit codes, writes each call to `launchctl.log`, and runs no agent.\n- `uv tool install` is the real one, with `UV_TOOL_DIR` in the sandbox and the host's cache and Pythons. On the real machine uv keeps its tools under the user's HOME.\n- A release is a wheel `make dist` built from this checkout, served by a local web server named in `JSTACK_RELEASE_URL`, and the uv installer `install.sh` fetches when uv is missing is a stand-in named in `JSTACK_UV_INSTALLER`. On the real machine both come from GitHub's release and astral.sh, over the network.\n- `PROC` and `LIMITS` name files Launch wrote: an idle machine and a plan at 10% of its limits. The real machine reads `\u002Fproc` and the plan's own limits.\n- `config\u002Fconfig.toml` is written by Launch: one project, `dispatch = true`, `max_running = 1`, and `home_thread = \"mcp:sandbox-home\"`, so wakes go to that thread of the stand-in.\n  On the real machine the user writes `~\u002F.config\u002Fjbus\u002Fconfig.toml`.\n- The demo repo's origin is a bare directory beside it, and HOME is new and empty. On the real machine the origin is GitHub and HOME is the user's.\n- The commands come from this checkout's `.venv\u002Fbin` after `uv sync`, and `jbus poll` is typed. The real machine has them from `uv tool install --editable`, and a systemd timer runs the pass.\n\nName these as unverified wherever a drive is reported: in the evidence, in a pull request, in a Result. `record` writes this list at the top of every `record` file, from this section, so add a step here when a stand-in gains one.\n\n## Launch\n\nThere is nothing to keep alive but the stand-in for T3 Code. Launch installs this checkout's commands with `uv sync`, makes the sandbox from nothing (the demo repo, the config, the seed files a drive edits), starts the stand-in, and prints one line when it is ready: `ready: . \u003Csandbox>\u002Fenv.sh`.\n\nReady means a drive can run, not that the stand-in answers. Before that line, Launch runs two real commands the way a drive does, with `env.sh` sourced: `jbus --project demo queue show` must succeed, and `jmerge --check` must succeed in the demo checkout and ask the stand-in `gh`. When either fails there is no `ready:` line: Launch prints `launch.sh: not ready: `\u003Cthe command>` failed in the sandbox` with what the command said, tears down what it made, and exits 1. It removes the `gh` call its own probe made, so a drive starts with no `gh\u002Fcalls.log`.\n\n```sh\nready=$(features\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Flaunch.sh) && echo \"$ready\"\n. \"${ready#ready: . }\"\n```\n\nSource that `env.sh` again in every new shell: an agent's shell does not keep variables from one call to the next. It sets HOME, `JBUS_CONFIG_DIR`, `JBUS_STATE_DIR`, `JBUS_HOME_DIR`, `PROC`, `LIMITS` and PATH, defines `record`, and changes to the demo repo's main checkout, `$VERIFY_JSTACK_SANDBOX\u002Fdemo`. Each launch has its own directory and its own port, so sandboxes run side by side: use a new one for each feature. Launch from a shell that has sourced no `env.sh`: inside a sandbox `launch.sh` prints `launch.sh: this shell is in the sandbox \u003Cpath>: launch from a new shell` and exits 1.\n\nTeardown is Cleanup, below.\n\n## Doctor\n\nOne read-only check. Run it first, and again whenever anything looks off. Drive only when its last line is `doctor: ok`.\n\n```sh\n\"$VERIFY_JSTACK_SCRIPTS\u002Fdoctor.sh\"\n```\n\nIt prints one `ok` or `bad` line for each thing a drive leans on: HOME and jbus's three directories are in the sandbox, `gh`, `notify-send` and `systemctl` are the stand-ins, `jbus`, `jmerge`, `jgauge` and `jbriefs` are this checkout's build, the stand-in for T3 Code is the process this sandbox started and answers for it, jbus reads the sandbox's config, and the evidence directory is outside the sandbox. Its `build` line is the commit under test and how many files are uncommitted.\n\nIt also checks the seed, feature by feature. Each file in `features\u002F` has a `Needs:` line that lists the seed its journey relies on, and Doctor prints `ok   \u003Cfeature>: seed has \u003Cthe list>`, or `bad  \u003Cfeature>: seed lacks \u003Cx>` for each one this sandbox does not have. A `seed lacks` line makes the last line `doctor: not ok`, as every `bad` line does, so nothing is driven in that sandbox. The feature the line names is also reported as failed, with that line as the reason, and the reason is written in the feature's Gotchas. A feature whose own line is `ok` has not failed: clean up, and drive it in a new sandbox. That helps only when a drive removed the seed. Launch makes every seed, so a new sandbox with a `seed lacks` line is a fault in `launch.sh` or in the feature file's `Needs:` line, and nothing is driven until it is fixed. The check is of what Launch made and every recipe keeps (the file is there, a JSON file is still a list), so it holds at the end of a drive that edited the seed. Never weaken the journey to make it pass: do not drop the step that needs the seed, do not write the seed by hand to get past Doctor, and do not report the rest of the recipe as the feature.\n\n## Drive\n\nThe harness is the shell. Type the commands a user types, with `record` in front of each one that is part of the proof. `record \u003Cname> \u003Ccommand>` runs the command, prints what it printed, and appends the command, its output and its exit code to `$VERIFY_JSTACK_EVIDENCE\u002F\u003Cname>.txt`. A command that reads stdin gets it through `record`.\n\nOne feature, start to finish: a row of the jbus queue from `add` to a launched thread.\nThe other features are in each `features\u002F\u003Cname>\u002Fverify.md`, and the shared test tooling's in [`testing\u002Fverify\u002F`](..\u002F..\u002F..\u002Ftesting\u002Fverify\u002F).\n\n```sh\nprintf '# alpha: a demo task\\nTask: alpha, a demo task\\nWhy: the sandbox needs a row the queue takes\\nDone when:\\n- the demo works\\nProves it: the demo test\\nSize: S\\nWhere: `src\u002Falpha\u002F`\\nDesign: none, a demo\\nReview: none\\nPlaybook: feature\\nSkills: tdd\\nPull request: none\\nHome: uncategorized\\n' | record queue-row jbus queue add alpha --priority 1\nprintf '{\"mcp:sandbox-chat\": [{\"itemId\": \"turn-item:message:m1\", \"messageId\": \"m1\", \"text\": \"go\", \"type\": \"user_message\", \"createdBy\": \"user\", \"updatedAt\": \"%s\"}]}\\n' \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" > \"$VERIFY_JSTACK_SANDBOX\u002Ft3\u002Fmessages.json\"\nword=$(record queue-row jbus word --to demo --message mcp:sandbox-chat\u002Fm1 | awk '{print $NF}')\nrecord queue-row jbus queue approve alpha --word \"$word\"\nrecord queue-row jbus poll\nrecord queue-row jbus queue show\nrecord queue-row jbus status\n```\n\n`jbus poll` prints `launched alpha: mcp:sandbox-thread-1`, and the row's `status` and `thread` columns then say so.\n\nTo stop that thread on a usage limit, give the crew's role a pool of two instances before the launch, launch the row as above, then fail its run between passes.\nEach block below is whole, from a new sandbox, so it carries the launch again.\nThe next `jbus poll` prints `failover alpha: five_hour limit until ...`, and `t3\u002Fcalls.jsonl` has the `t3_thread_configure` that moved it and the queued carry-on.\nThe open pull request makes the pass ask GitHub who owns the repo, and it prints no line that GitHub did not say.\n\n```sh\nmkdir -p \"$VERIFY_JSTACK_SANDBOX\u002Fhome\u002F.config\u002Fjstack\"\necho 'crew: claudeAgent claude-sonnet-5-5 claudeAgent,claudeAgent_sandbox' > \"$VERIFY_JSTACK_SANDBOX\u002Fhome\u002F.config\u002Fjstack\u002Froles\"\nprintf '# alpha: a demo task\\nTask: alpha, a demo task\\nWhy: the sandbox needs a row the queue takes\\nDone when:\\n- the demo works\\nProves it: the demo test\\nSize: S\\nWhere: `src\u002Falpha\u002F`\\nDesign: none, a demo\\nReview: none\\nPlaybook: feature\\nSkills: tdd\\nPull request: none\\nHome: uncategorized\\n' | record usage-limit jbus queue add alpha --priority 1\nprintf '{\"mcp:sandbox-chat\": [{\"itemId\": \"turn-item:message:m1\", \"messageId\": \"m1\", \"text\": \"go\", \"type\": \"user_message\", \"createdBy\": \"user\", \"updatedAt\": \"%s\"}]}\\n' \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" > \"$VERIFY_JSTACK_SANDBOX\u002Ft3\u002Fmessages.json\"\nword=$(record usage-limit jbus word --to demo --message mcp:sandbox-chat\u002Fm1 | awk '{print $NF}')\nrecord usage-limit jbus queue approve alpha --word \"$word\"\nrecord usage-limit jbus poll\nT=\"$VERIFY_JSTACK_SANDBOX\u002Ft3\"\nnotice=\"run-1:usage-limit:five_hour:$(($(date +%s) + 3600))\"\njq --arg id \"$notice\" '.\"mcp:sandbox-thread-1\" = [{runId: \"run-1\", itemId: $id, type: \"system_notice\", text: \"\"}]' \"$T\u002Fmessages.json\" > \"$T\u002Fm\" && mv \"$T\u002Fm\" \"$T\u002Fmessages.json\"\njq 'map(.status = \"failed\" | .latestRunId = \"run-1\")' \"$T\u002Fthreads.json\" > \"$T\u002Ft\" && mv \"$T\u002Ft\" \"$T\u002Fthreads.json\"\n\"$VERIFY_JSTACK_SCRIPTS\u002Fopen-pull.sh\" alpha src\u002Falpha\u002Fa.py\nrecord usage-limit jbus poll\n```\n\nTo stop that thread on a login lapse instead, launch the row with no roles file, then sign its instance out and fail its run with the provider's words.\nThe run ends ten minutes before the pass, since a pass counts an instance a run failed to sign in on less than five minutes ago (`failover.HOLD`) as signed out whatever T3 Code says, and so only the constraint holds the thread here.\nEach `jbus poll` while the constraint is there sends the thread nothing, and the first prints `signed out: claudeAgent cannot sign in, ...` once.\nOnce the drive clears the constraint, the next pass prints `failover alpha: claudeAgent could not sign in, carry-on on claudeAgent, ...`, and `t3\u002Fcalls.jsonl` has its one `t3_thread_send` keyed `lapse|mcp:sandbox-thread-1|run-1`.\nA pass after it sends nothing more.\nLeave the pull request out of this drive: a pass tells the crew of a green one, and that send is not the carry-on.\n\n```sh\nprintf '# alpha: a demo task\\nTask: alpha, a demo task\\nWhy: the sandbox needs a row the queue takes\\nDone when:\\n- the demo works\\nProves it: the demo test\\nSize: S\\nWhere: `src\u002Falpha\u002F`\\nDesign: none, a demo\\nReview: none\\nPlaybook: feature\\nSkills: tdd\\nPull request: none\\nHome: uncategorized\\n' | record login-lapse jbus queue add alpha --priority 1\nprintf '{\"mcp:sandbox-chat\": [{\"itemId\": \"turn-item:message:m1\", \"messageId\": \"m1\", \"text\": \"go\", \"type\": \"user_message\", \"createdBy\": \"user\", \"updatedAt\": \"%s\"}]}\\n' \"$(date -u +%Y-%m-%dT%H:%M:%SZ)\" > \"$VERIFY_JSTACK_SANDBOX\u002Ft3\u002Fmessages.json\"\nword=$(record login-lapse jbus word --to demo --message mcp:sandbox-chat\u002Fm1 | awk '{print $NF}')\nrecord login-lapse jbus queue approve alpha --word \"$word\"\nrecord login-lapse jbus poll\nT=\"$VERIFY_JSTACK_SANDBOX\u002Ft3\"\nended=$(perl -MPOSIX -e 'print strftime(\"%Y-%m-%dT%H:%M:%SZ\", gmtime(time - 600))')\njq --arg at \"$ended\" '.\"mcp:sandbox-thread-1\" = [{runId: \"run-1\", itemId: \"run-1:error\", type: \"error\", text: \"Not logged in · Please run \u002Flogin\", updatedAt: $at}]' \"$T\u002Fmessages.json\" > \"$T\u002Fm\" && mv \"$T\u002Fm\" \"$T\u002Fmessages.json\"\njq --arg at \"$ended\" 'map(.status = \"failed\" | .latestRunId = \"run-1\" | .recentRuns = [{runId: \"run-1\", ordinal: 1, status: \"failed\", providerInstanceId: \"claudeAgent\", model: \"claude-sandbox\", requestedAt: $at, startedAt: $at, completedAt: $at}])' \"$T\u002Fthreads.json\" > \"$T\u002Ft\" && mv \"$T\u002Ft\" \"$T\u002Fthreads.json\"\njq '.claudeAgent = [\"Provider is not authenticated.\"]' \"$T\u002Fcapabilities.json\" > \"$T\u002Fc\" && mv \"$T\u002Fc\" \"$T\u002Fcapabilities.json\"\nrecord login-lapse jbus poll\nrecord login-lapse jbus poll\njq '.claudeAgent = []' \"$T\u002Fcapabilities.json\" > \"$T\u002Fc\" && mv \"$T\u002Fc\" \"$T\u002Fcapabilities.json\"\nrecord login-lapse jbus poll\nrecord login-lapse jbus poll\njq -c 'select(.tool == \"t3_thread_send\") | .arguments.clientRequestId' \"$T\u002Fcalls.jsonl\"\n```\n\nWhat a drive sets up and reads, all under `$VERIFY_JSTACK_SANDBOX`:\n\n| Path | What it is | A drive |\n|---|---|---|\n| `gh\u002Fopen.json`, `gh\u002Fmerged.json`, `gh\u002Fcommits.json`, `gh\u002Fchecks.json`, `gh\u002Flogs\u002F` | what GitHub would answer | edits them (`open-pull.sh` writes `open.json`) |\n| `gh\u002Fcalls.log` | every `gh` call jbus and jmerge made | reads it |\n| `t3\u002Fthreads.json` | the threads T3 Code has, each with its `modelSelection` and its `recentRuns` | edits a thread's `status`, `latestRunId`, `recentRuns` or `settled` between passes |\n| `t3\u002Fcapabilities.json` | each provider instance T3 Code lists, by its id, with its constraints | gives an instance `Provider is not authenticated.` to sign it out, and clears it to sign it in |\n| `t3\u002Fmessages.json` | a thread's items, by thread id: the user's messages that `jbus word --message \u003Cthread>\u002F\u003Cmessage>` reads, and the items of a run a pass reads for a usage limit | writes one before a drive keeps the user's word or stops a thread on a limit |\n| `t3\u002Fcalls.jsonl` | every tool call jbus made, with its arguments | reads it |\n| `t3\u002Fwake.jsonl` | every wake sent to a home thread, with the thread and the lines it carried | reads it |\n| `machine\u002Fproc\u002Floadavg`, `machine\u002Flimits` | the load and the plan limits `jgauge room` reads | edits them |\n| `home\u002F.local\u002Fstate\u002Fhome\u002Fdemo\u002Ftasks\u002F` | the demo repo's briefs | writes briefs, reads the `Thread:` line jbus adds |\n| `state\u002F` | jbus's queue, outbox, launch records and `status.json` | reads it, never writes it by hand |\n| `notify.log` | what `notify-send` was asked to show | reads it |\n\nReach state through the command a user has for it (`jbus queue add`, not an edit of `queue.json`). The files above marked \"edits\" are the outside world, which the user does not control with a jstack command.\n\n## Evidence\n\nEvidence goes to `$VERIFY_JSTACK_EVIDENCE`, which is `\u002Ftmp\u002Fverify-jstack-evidence\u002F\u003Cthe sandbox's name>` (under `$TMPDIR` when that is set). It is outside the sandbox and Cleanup keeps it. `\u002Ftmp` is emptied on a reboot: copy the directory elsewhere if the proof must outlive one.\n\n`record` keeps the action. Keep the resulting state too, by copying what the commands changed:\n\n```sh\ncp \"$VERIFY_JSTACK_SANDBOX\u002Ft3\u002Fcalls.jsonl\" \"$VERIFY_JSTACK_SANDBOX\u002Ft3\u002Fwake.jsonl\" \"$VERIFY_JSTACK_SANDBOX\u002Fgh\u002Fcalls.log\" \"$VERIFY_JSTACK_EVIDENCE\u002F\"\ncp \"$HOME\u002F.local\u002Fstate\u002Fhome\u002Fdemo\u002Ftasks\u002Falpha.md\" \"$VERIFY_JSTACK_EVIDENCE\u002Fbrief-alpha.md\"\ncp \"$JBUS_STATE_DIR\u002Fdemo\u002Fqueue.json\" \"$VERIFY_JSTACK_EVIDENCE\u002F\"\n\"$VERIFY_JSTACK_SCRIPTS\u002Fdoctor.sh\" > \"$VERIFY_JSTACK_EVIDENCE\u002Fdoctor.txt\"\n```\n\nThe standards a proof is held to:\n\n- Drive the real command, as built from this checkout (`doctor.txt` names the commit). Do not call a Python function, and do not write jbus's state files by hand.\n- Keep the action and the state it left: the `record` file, and a second view of the result (`jbus queue show` after `jbus poll`, the brief's `Thread:` line, `status.json`).\n- Verify the side effects, not only the printout. A launch is a `t3_thread_launch` line in `t3\u002Fcalls.jsonl`. A wake is a line in `t3\u002Fwake.jsonl`. A message to the desk is a line in `notify.log`.\n- The stand-ins are the only mocks, and each sits where jstack already ends: T3 Code's MCP endpoint, `gh`, `notify-send`, and the machine readings `jgauge room` takes from `PROC` and `LIMITS`.\n- Do not trust `jmerge --check` by its name. `gh\u002Fcalls.log` shows what it asked GitHub, and has no `pr merge` line.\n- Name the feature file and the entry point with each artifact. An entry point that was not driven is reported as not driven, with the reason.\n- Every `record` file starts with the list from \"Set up by a stand-in\". Leave it there, and say the same beside any claim the evidence backs: those steps are not verified.\n\nKeep the config out of the evidence: `config\u002Fconfig.toml` and `config\u002Ft3.json` hold the sandbox's made-up key and token, which open nothing, and still do not belong in a pull request.\n\n## Cleanup\n\n```sh\n\"$VERIFY_JSTACK_SCRIPTS\u002Fcleanup.sh\"\n```\n\nIt stops the stand-in for T3 Code by the pid Launch wrote down, and only while that pid is still this sandbox's stand-in.\nThen it removes the sandbox directory, and prints the evidence directory and its files, which it keeps.\nWith no `env.sh` sourced, name the sandbox: `features\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Fcleanup.sh \u002Ftmp\u002Fverify-jstack.\u003Cits six characters>`.\nIt refuses a directory that does not hold the marker file Launch writes first, `.verify-jstack-sandbox`.\nIt refuses a path that does not start with `\u002F`, too.\nNever stop a process by its name: another agent's sandbox may be running beside this one.\n\nRun it after a failed drive too. Then confirm the evidence is still there:\n\n```sh\nls -l \"${TMPDIR:-\u002Ftmp}\u002Fverify-jstack-evidence\u002F\"\n```\n\n## Helpers\n\nAll in `features\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002F`, which `$VERIFY_JSTACK_SCRIPTS` names once `env.sh` is sourced.\n\n| Script | Run it as | What it does |\n|---|---|---|\n| `launch.sh` | `features\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Flaunch.sh` | makes a sandbox, starts the stand-in, runs `jbus` and `jmerge` in it, prints `ready: . \u003Csandbox>\u002Fenv.sh` |\n| `doctor.sh` | `\"$VERIFY_JSTACK_SCRIPTS\u002Fdoctor.sh\"` | the read-only check, each feature's seed included, `doctor: ok` or exit 1 |\n| `record.sh` | `record \u003Cname> \u003Ccommand>` (the function `env.sh` defines) | runs a command and keeps it in `$VERIFY_JSTACK_EVIDENCE\u002F\u003Cname>.txt`, under the list of what a stand-in set up |\n| `open-pull.sh` | `\"$VERIFY_JSTACK_SCRIPTS\u002Fopen-pull.sh\" beta src\u002Fbeta\u002Fa.py` | gives the sandbox's GitHub one open pull request, number 7, and prints its head commit |\n| `cleanup.sh` | `\"$VERIFY_JSTACK_SCRIPTS\u002Fcleanup.sh\"` | stops the stand-in, removes the sandbox, keeps the evidence |\n| `fake_t3.py` | started by `launch.sh`, never by hand | the stand-in for T3 Code's MCP endpoint (`$VERIFY_JSTACK_URL\u002Fmcp`), which keeps each wake in `t3\u002Fwake.jsonl` |\n| `fake-gh` | linked as `gh` on the sandbox's PATH, never run by hand | the stand-in for `gh`: answers from `gh\u002F*.json`, exits 64 on `pr merge` |\n| `fake-systemctl` | linked as `systemctl` on the sandbox's PATH, never run by hand | the stand-in for `systemctl --user`: answers for the sandbox's HOME, links and unlinks as systemd does, starts nothing |\n| `fake-launchctl` | linked as `launchctl` on the sandbox's PATH, never run by hand | the stand-in for `launchctl` on macOS: loads and boots out agents as launchd does, starts nothing |\n\nAfter a change to these scripts, run the two deterministic end-to-end scripts in [`features\u002Fverify-jstack\u002Fe2e\u002F`](..\u002F..\u002F..\u002Ffeatures\u002Fverify-jstack\u002Fe2e\u002FREADME.md), each with `bash \u003Cscript>` from a shell in no sandbox.\nEach ends `e2e: ok` and prints the same lines on a rerun.\n\nWhen jstack changes, the feature files are what go stale first.\n`\u002Fmaintain-verification-skill` finds this skill through `skills.json`, where `projectSkills` names it, but it reads a feature map only from the skill's own `features\u002F` folder, which this skill does not have: on jstack it stops at `no feature map`.\n\nEach feature file also has a `Paths:` list, the paths it owns, and a `Tests:` list, the tests that read it in a way no import shows, and the map a `Cross-cutting:` list, each one entry per line: `scripts\u002Fselect_tests.py \u003Cbase> \u003Chead>` reads them, with the imports of the tree, to name the tests a diff needs, and `testing\u002Ftests\u002Ftest_select_tests_rules.py` fails on a path the map leaves out.\n",{"name":5,"description":7},"main","daff051d2674b46e2eb8a333bbd3f3e40f8d1cea","features\u002Fverify-jstack\u002Fproject-skill",0,"https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack","https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere","Software Engineer @ Markel\r\n","2026-11-15 11:25:06",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add JoshuaHayesWasHere\u002Fjstack --skill verify-jstack",{"tool":38,"command":39},"bunx","bunx skills add JoshuaHayesWasHere\u002Fjstack --skill verify-jstack",{"tool":41,"command":42},"pnpm","pnpm dlx skills add JoshuaHayesWasHere\u002Fjstack --skill verify-jstack","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002FSKILL.md",true,[46,52,58,62,66,70,74,78,82,86],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"map.md","REFERENCE","参考文档",11560,"https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002Fmap.md",{"path":53,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":56,"sourceHtmlUrl":57},"scripts\u002Fcleanup.sh","SCRIPT","脚本",1381,"https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Fcleanup.sh",{"path":59,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":60,"sourceHtmlUrl":61},"scripts\u002Fdoctor.sh",4737,"https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Fdoctor.sh",{"path":63,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":64,"sourceHtmlUrl":65},"scripts\u002Ffake_t3.py",13012,"https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Ffake_t3.py",{"path":67,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":68,"sourceHtmlUrl":69},"scripts\u002Ffake-gh",9733,"https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Ffake-gh",{"path":71,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":72,"sourceHtmlUrl":73},"scripts\u002Ffake-launchctl",1766,"https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Ffake-launchctl",{"path":75,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":76,"sourceHtmlUrl":77},"scripts\u002Ffake-systemctl",1476,"https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Ffake-systemctl",{"path":79,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":80,"sourceHtmlUrl":81},"scripts\u002Flaunch.sh",6778,"https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Flaunch.sh",{"path":83,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":84,"sourceHtmlUrl":85},"scripts\u002Fopen-pull.sh",1295,"https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Fopen-pull.sh",{"path":87,"resourceType":54,"resourceTypeDesc":55,"sizeBytes":88,"sourceHtmlUrl":89},"scripts\u002Frecord.sh",1059,"https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fverify-jstack\u002Fproject-skill\u002Fscripts\u002Frecord.sh",[91,98,105,112,119,126],{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":97,"publishedAt":19},"01M7ERF9GXMY62V7QTVAR6G8DG","no-key","A skill its skills.json lists as hidden that a model may still call by itself, kept broken so the lint is seen to catch it.","https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ftesting\u002Ftests\u002Ffixtures\u002Fskills\u002Fno-key\u002FSKILL.md",[],[],{"skillNo":99,"name":100,"nameZh":6,"description":101,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":19},"01M7ERF83ZG3XKJ2SB8MJHCZ8H","fake-skill","A FAKE skill in a FAKE tree, named for its folder until the test renames the folder.","https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ftesting\u002Ftests\u002Ffixtures\u002Fskills\u002Fnamed-tree\u002Fskills\u002Ffake-skill\u002FSKILL.md",[],[],{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7ERF698RV4VF8QCDF8H8DA4","extra-key","A skill its skills.json does not list as hidden that a model still cannot call, kept broken so the lint is seen to catch it.","https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ftesting\u002Ftests\u002Ffixtures\u002Fskills\u002Fextra-key\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":19},"01M7ERF2V8N73X9T0Y9PJ4SFV6","unslop","Cut AI tells from writing. Use when the user says text reads like AI, asks to unslop it, or before prose ships to people.","https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fwriting\u002Fskills\u002Funslop\u002FSKILL.md",[],[],{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":125,"publishedAt":19},"01M7EREWM67WX934XKABM4XCSZ","technical-writing","Write or review docs, READMEs, RFCs, PR descriptions and commit messages to a layered standard: Diataxis structure, Google developer style, STE rules and Global English.","https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fwriting\u002Fskills\u002Ftechnical-writing\u002FSKILL.md",[],[],{"skillNo":127,"name":128,"nameZh":6,"description":129,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":130,"categories":131,"keywords":132,"publishedAt":19},"01M7EREMHJS9JY10AM5EKVX3GP","why","Find why code is the way it is, from its history and every evidence source this session can query, with citations. Use for 'why does X work this way', 'why did we pick Y', regressions and postmortems. Use how for runtime behavior.","https:\u002F\u002Fgithub.com\u002FJoshuaHayesWasHere\u002Fjstack\u002Fblob\u002Fmain\u002Ffeatures\u002Fwhy\u002FSKILL.md",[],[]]