Repository navigation
feat(website): tool cards for the trios loop tri, generated from trios/bin/tri - #1282
Merged
Merged
Conversation
…s/bin/tri All 295 commands of the trios loop tri (gHashTag/BrowserOS:trios/bin/tri at 7366096) get a .t27 card under specs/tools/trios/tri/, generated by scripts/tools-from-trios-tri.mjs from the help heredoc and the top-level case arms. Witness is source-parse; the CLI was not run. 43 commands (all tc-*) are dispatched but not named by `tri help`, and the cards say so. The trios cards are written to public/tools/spec-tools-trios.json, a part named by spec-tools.json with its count and sha256, so neither file passes the 1 MB limit. readToolCatalog() joins them on disk and loadToolSpecs() joins them on the site; the QA contracts read the joined catalog. Home directory paths in dispatch lines are written as ~/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…joined catalog The tools-default row named spec-tools.json's own tools[0] (gHashTag/trinity:tri/bench), but the site joins that file with its parts (trios, trinity) before choosing the default, and opens gHashTag/BrowserOS:tri/ab. The contract failed at 768x1024, 1024x768, 1280x800 and 1920x1080 on a page that was right. It now asks readToolCatalog(), the same join the site and tools-site-contract use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
github-actions Bot
added a commit
that referenced
this pull request
Oct 3, 2026
feat(website): tool cards for the trios loop tri, generated from trios/bin/tri (#1282) * feat(website): tool cards for the trios loop tri, generated from trios/bin/tri All 295 commands of the trios loop tri (gHashTag/BrowserOS:trios/bin/tri at 7366096) get a .t27 card under specs/tools/trios/tri/, generated by scripts/tools-from-trios-tri.mjs from the help heredoc and the top-level case arms. Witness is source-parse; the CLI was not run. 43 commands (all tc-*) are dispatched but not named by `tri help`, and the cards say so. The trios cards are written to public/tools/spec-tools-trios.json, a part named by spec-tools.json with its count and sha256, so neither file passes the 1 MB limit. readToolCatalog() joins them on disk and loadToolSpecs() joins them on the site; the QA contracts read the joined catalog. Home directory paths in dispatch lines are written as ~/. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(website): viewport contract takes the default tool card from the joined catalog The tools-default row named spec-tools.json's own tools[0] (gHashTag/trinity:tri/bench), but the site joins that file with its parts (trios, trinity) before choosing the default, and opens gHashTag/BrowserOS:tri/ab. The contract failed at 768x1024, 1024x768, 1280x800 and 1920x1080 on a page that was right. It now asks readToolCatalog(), the same join the site and tools-site-contract use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
The #/tools catalog now documents every command of the third tri program, the trios loop CLI (
trios/bin/triongHashTag/BrowserOSbranchfeat/queen-supervisor). Each command is a.t27card underapps/website/public/t27/files/specs/tools/trios/tri/, generated byscripts/tools-from-trios-tri.mjsfrom the source pinned at7366096248dfb09893e9a7d1a0f1c56ced13d16e(gHashTag/BrowserOS#529, which makes the dispatcher in the repo match the live CLI).tri help, and those cards carry the help line as their description (ABOUT_SOURCE= help). The other 43, alltc-*, are dispatched but missing fromtri help, so their cards say so instead of inventing a description.source-parse. Every card names the dispatch line it was read from, pinned to the commit above. Home-directory paths in the dispatch text are rewritten to~/, so the contract's home-path rule holds.public/tools/spec-tools.jsonwas 1.51 MB. The trios cards now keep a reduced field set, and they live in a separate file,public/tools/spec-tools-trios.json(888 KB). The main file (431 KB) names that file with its card count and a sha256 of its contents.readToolCatalog()in the generator andloadToolSpecs()in the UI both check the count and the hash before merging the two files.tools-spec-contracthas a newtrios/tribranch. It checks the repo, the source path, the witness, the 40-hex pin, a dispatch line with no home path,documentedagainst the help line, and a non-emptyWHEN_TO_USE.Tests
Run locally in the worktree:
node scripts/agents-from-specs.mjs --checkandnode scripts/docs-from-specs.mjs --check: both in sync.node scripts/agents-from-specs.test.mjs: 47/47.node scripts/docs-from-specs.test.mjs: 8/8.tools-spec(387 cards),tools-site,agents-specanddocs-specpass.explorer-language-contractandqueen-language-contractpass.The Vite build and
tscare left to CI.Limitations
--checkneeds the external trios source checkout, so it is not CI-gated. CI gates the cards and the catalog, not their freshness against BrowserOS.sync-t27-specs.mjsempties its output directory, which would also delete site-authored tool cards.canonicalSpecEditUrlpoints every card at gHashTag/t27, including the cards that are only authored here.{ "version": 1, "head_sha": "5a982ba7cc6df1015722c6ca1c8653e4be425d67", "summary": "The tools catalog gains 295 generated .t27 cards documenting every command of the trios loop tri, read from trios/bin/tri at a pinned BrowserOS commit, with the trios cards split into a hash-checked part file to stay under the 1 MB limit.", "changes": [ "Added scripts/tools-from-trios-tri.mjs, which parses trios/bin/tri at a pinned commit and writes one .t27 card per dispatched command.", "Generated 295 cards under specs/tools/trios/tri: 252 carry their tri help line, 43 tc-* commands are marked as missing from tri help.", "Split the trios cards into public/tools/spec-tools-trios.json and recorded its count and sha256 in the main catalog, which keeps both files under 1 MB.", "Added readToolCatalog in the generator and a joining loadToolSpecs in the UI; both verify the part count and hash before merging.", "Extended tools-spec-contract with a trios/tri branch covering repo, source path, witness, 40-hex pin, dispatch line, documented flag and WHEN_TO_USE.", "Rewrote home-directory paths in dispatch text to ~/ so no card leaks a local user path." ], "tests": [ {"command": "node scripts/agents-from-specs.test.mjs", "result": "47 of 47 unit tests passed", "status": "passed", "evidence": "Local run in the PR worktree at the reported head commit."}, {"command": "node scripts/docs-from-specs.test.mjs", "result": "8 of 8 unit tests passed", "status": "passed", "evidence": "Local run in the PR worktree at the reported head commit."}, {"command": "node scripts/agents-from-specs.mjs --check && node scripts/docs-from-specs.mjs --check", "result": "generated catalogs match the committed files", "status": "passed", "evidence": "Both generators reported no drift for the committed JSON outputs."}, {"command": "node qa/tools-spec-contract.mjs", "result": "387 tool cards pass the contract", "status": "passed", "evidence": "Includes the new trios/tri branch for all 295 trios cards."}, {"command": "node qa/tools-site-contract.mjs && node qa/agents-spec-contract.mjs && node qa/docs-spec-contract.mjs", "result": "all three site contracts pass", "status": "passed", "evidence": "Each contract reads the catalog through readToolCatalog."}, {"command": "vite build and tsc for apps/website", "result": "left to CI, not run locally", "status": "not_run", "evidence": "Heavy builds run in CI rather than on the development laptop."} ], "limitations": [ "RU summaries for the 295 trios cards are not written yet, so the RU page shows English text for them.", "The generator check needs the external trios source checkout and is therefore not gated in CI.", "sync-t27-specs.mjs still empties its output directory, which would also delete site-authored tool cards.", "canonicalSpecEditUrl still points every card at gHashTag/t27, including cards authored only on the site." ], "tags": ["tri", "t27", "website", "docs"], "blog": { "title": "Every trios loop command now has a .t27 card", "summary": "The site catalog documents all three tri programs. The third, the trios loop CLI, contributes 295 cards generated from its own dispatcher, and 43 of them reveal commands missing from tri help.", "outline": [ "Trinity has three programs called tri: the t27 Rust compiler CLI, the Trinity Zig CLI, and the trios loop CLI used by the queen supervisor.", "The first two already had .t27 cards on the tools page; the trios loop CLI had none, even though agents call it every day.", "The new generator reads the dispatcher in trios/bin/tri at a pinned commit and writes one card per command, with the help line as its description.", "Forty-three tc-* commands are dispatched but absent from tri help, and their cards record that gap rather than guessing what they do.", "Keeping the catalog under the 1 MB file limit meant moving the trios cards into a part file whose count and hash the loader verifies." ] } }🤖 Generated with Claude Code