Conversation
Fifteen inaccuracies found auditing `dor-cli.md`, `dor-browser.md`, and `dor-tool.md` against what ships, plus a condensation pass that moves mechanism to the code comments that already carry it. Corrections: `dor list --workspaces` takes `--window` as well as `--json` (the generated help said otherwise too); a browser leaf persists every param, only its document is lost on restart; the iframe shim intercepts every anchor target but `_self`, not just `_blank`; `msysToWindowsCwd` backs five commands and `--workspace` reaches `tool` and `open`; the select-all/copy/cut chords go through the host edit channel on every platform, not only macOS; a host with no state directory keeps Tool grants in memory; two `prespawn_dedupe` rejections were unstated; replace-in-place also requires a helper-less caller; the Display modal is not the sole render-mode GUI and the tab strip needs two tabs; the `abDebugLogs` flag is read lazily, not at module load; `dor-browser.md` cited a `## Future` phase that does not exist and `dor-tool.md`'s D2 bullet was garbled; `--has terminal`/`--has browser` is a missing filter, not a missing field. Condensation keeps every invariant and drops duplication: the Agent Workflows table is `dor/skill.md`'s Recipes, the control-socket rules are `security-local.md`'s, the standalone routing rules are `standalone.md`'s, and the spawn, dev-server, screenshot-loop, pop-out, and iframe mechanisms are stated where they are implemented. `dor-cli.md` 6205 -> 5532 words, `dor-browser.md` 4651 -> 4518, `dor-tool.md` 4026 -> 4013; budgets ratcheted. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…e dead handles Tool configuration warnings were generated and thrown away on the path users hit first. `lookupTool`'s `untrusted` answer carried no `warnings` at all and `resolveOpenTool` hardcoded an empty list for the built-in viewer, so a lint about an unknown field or a `$PROJECT_ROOT`-less key reached the caller only on a later already-trusted invocation. Every lookup outcome that parsed a configuration file now carries that file's warnings, and the renderer reports them with the `pending` answer — the only answer the first run of an unapproved Tool ever receives. Also: - `dor tool` reported the caller's directory for a reused match, while the restart it had just performed ran in the match's own directory. - The Workspace-move refusal named its iframe Surfaces by internal pane id; `iframeSurfaceIds` becomes `iframeSurfaceRefs` so the message quotes the `surface:N` a caller can act on, like every other message. - `parseToolAnnounce` ignored `v`, leaving a future `serve` v2 no rejection path. An omitted `v` is still v1 — the shipped shape — but any other value is refused whole. - `contextPortKey` is persisted on browser surfaces and was declared nowhere; it joins `BrowserPanelParams` and the spec's canonical list. - `parseWorkspaceRef`'s `position` is renamed `number`: on a registry host it is not a position at all, and the positional reading moves behind `workspaceByNumber`, which names the VS Code condition it exists for. - Deleted: the `--id-format uuids` alias (undocumented, used nowhere, pinned only by its own test) and `agentBrowserBringToFront` (two call sites, a gated button, and no host implementing it). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Deploying mouseterm with
|
| Latest commit: |
27a6b9c
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://fd746bf2.mouseterm.pages.dev |
| Branch Preview URL: | https://specs-dor-audit.mouseterm.pages.dev |
dormouse-bot
left a comment
There was a problem hiding this comment.
Feedback on work in progress — not a merge verdict. Mark ready for review when you want the full pass.
I checked the corrected spec claims against the code they describe (--workspaces flag set, the five callerWorkingDirectory callers, the a.target && a.target !== '_self' interception, the location-not-relayed split, parseToolState's v === 1, the two new prespawn_dedupe rejections, and that the compressed control-socket and routing rules do land in security-local.md -> "The dor control socket" and standalone.md -> Routing). Those hold. Three things:
The new ToolLookupResult doc comment claims more than the type delivers. "Every outcome that parsed a configuration file carries that file's warnings" — but unknown-tool also parsed the file (it reports that file's path and its names) and has no warnings field. A reader adding a fourth outcome takes the comment as the rule and either adds a field nothing reads or concludes one is missing. Inline suggestion narrows it to the two arms that do carry it.
The delivery invariant the fix establishes isn't in the spec. docs/specs/dor-tool.md's only warning rule is "unknown ordinary fields produce warnings" under Declaring tools — it says nothing about which lookup outcome delivers them, which is exactly what the bug was and what tool-trust.test.ts and tool-open.test.ts now pin. Per AGENTS.md -> Specs, "When code covered by a spec changes, change the spec", and the rule is the load-bearing kind: delete it and the next refactor can drop warnings from the untrusted arm again with the tests reading as incidental. Something like, appended to that bullet: Must carry the file's warnings on the untrusted answer and on a built-in open, the paths a tool's first run actually takes. Worth noting the budget is tight — dor-tool.md counts 4048 against a 4050 budget, so a sentence needs node scripts/spec-lint.mjs --ratchet docs/specs/dor-tool.md in the same commit.
One stale comment outside the diff. With agentBrowserBringToFront gone, the section header in agent-browser-surface-controller.ts reading // --- relaunch: pop-out / pop-in / bring-to-front + auto-revert --- is the only remaining mention of the capability in the repo. Happy to push that one-word fix if you'd rather not touch the branch.
# Conflicts: # docs/specs/layout.md
The fix that made an untrusted lookup and a built-in open carry the parsed file's warnings left the invariant only in the tests. `dor-tool.md` said unknown fields produce warnings but nothing about which answer delivers them, which is the bug that was fixed — so a later refactor could drop `warnings` from the `untrusted` arm again and read the tests as incidental. The rule joins Declaring tools, and the two tests that pin it join that section's pointers. `ToolLookupResult`'s comment claimed every outcome that parsed a configuration file carries its warnings; `unknown-tool` parses the same file and carries none, and giving it a field no caller reads would be the wrong repair — the `unknown-tool` answer is an error string, with nowhere to put a lint. The comment now names the two arms that do carry warnings. Also: the agent-browser relaunch section header still advertised bring-to-front, the capability this branch deleted. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Spec audit, group 5 (dor-cli / dor-browser / dor-tool). Stacked on #712 (the spec-audit PRs merge in order #708 → #715); independent of the alert series.
Commit 1 — docs and generated help. Corrections:
dor list --workspacesalso takes--window(spec, help prose, regenerated snapshot); browser leaves persist far more thanurl;open-windowintercepts every non-_selftarget; a Future item cited a phase that does not exist;msysToWindowsCwdbacks five commands; the edit chords go through the host channel on every platform; the memory trust store whenDORMOUSE_STATE_DIRis unset; two unstated parse rejections; the helper-less condition on in-place replacement; and more. Condensed ≈800 words: the Agent Workflows table (already indor/skill.md→ Recipes), the QC log in the tool rationale, two-stage-paint / pop-out / dev-server-chip / spawn mechanics → the modules that already carry them, the control-socket rules already audited insecurity-local.md, the routing rules now owned bystandalone.mdalone.Commit 2 — code.
$PROJECT_ROOT/$TARGET, ignoredopenrules) were generated and thrown away on the normal first-run path (untrusted → approve) and on the built-in viewer path.ToolLookupnow carrieswarningson every outcome; tests added.dor toolreported the caller's cwd for a reused match; it now reports the match's own.contextPortKeydeclared inBrowserPanelParams(it was persisted but undeclared).surface:N.parseToolAnnouncerefuses a presentv≠ 1 (an omittedvstill reads as 1 so shipped emitters keep working).--id-format uuidsalias,agentBrowserBringToFront(declared, called, implemented by no host).parseWorkspaceRef.position→number, with the VS Code positional fallback behind a named helper.Budgets: dor-cli 6250→5550, dor-browser 4700→4550.
Deferred: the two meanings of
--surface(a breaking CLI change).🤖 Generated with Claude Code