Skip to content

#454 Rationalize tsh — remove Workbench-superseded UI/diagnostics, reposition as automation-first CLI - #462

Merged
nockawa merged 1 commit into
mainfrom
feature/454-tsh-rationalization
Jul 4, 2026
Merged

nockawa merged 1 commit into
mainfrom
feature/454-tsh-rationalization

Conversation

@nockawa

@nockawa nockawa commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Closes #454 (Feature) and its tasks #455–#460.

Why

tsh predates the Workbench and was framed "diagnostic-first". That charter is obsolete: the Workbench's Open mode now hosts the same engine in-process with a GUI, so deep-internals viewing belongs there. This PR repositions tsh to automation-first — the scriptable, mutating, CI-facing sqlite3-analog — by removing UI/diagnostics the Workbench supersedes and keeping only what a GUI can't do (scripting, CI, mutation).

Guiding test for each command: does its output feed another program (keep) or a pair of human eyes (cut)?

What changed

Removed (superseded by shipped Workbench panels):

  • The Terminal.Gui full-screen resources TUI (ResourceExplorer.cs) and the Terminal.Gui package dependency.
  • 6 GUI-superseded diagnostics: page-dump, cache-pages, segments, segment-detail, list-archetypes, entity-info.
  • The bundled ARPG fixture generator — dropped the src → test project reference; relocated test/Typhon.ARPG.Shell → examples/Typhon.ARPG.Shell (kept as the canonical extension-command sample). The extension mechanism and Typhon.ARPG.Schema (used by the benchmark) are untouched.

Demoted to JSON/CI probes (--format json → clean, jq-parseable output; transactions carries a truncated flag):

  • db-stats, cache-stats, memory, transactions.

Kept + hardened (no Workbench equivalent — provisional, retire on parity):

  • btree, mvcc-stats gained JSON; revisions, stats-show, btree-dump kept as clean scriptable text; btree-validate, stats-rebuild unchanged.

Docs: help catalog/detail + autocomplete cleaned; tsh design docs repositioned "diagnostic-first → automation-first" with a supersession banner on the phase-2 diagnostics doc (docs land in the claude/ sub-repo branch of the same name).

Verification

  • Full solution restores 25/25; Shell / Benchmark / Engine.Tests build 0-error.
  • Live tsh smoke: the 4 demoted commands emit valid JSON under --format json; all 6 removed commands now error "Unknown command".
  • Independent multi-agent code review: 0 bugs, 0 Critical/High; its 3 findings (dead using, dead params, missing truncated flag) fixed.
  • Net −863 lines (217 added / 1080 deleted) — a rationalization is mostly subtraction.

Follow-up (not in this PR)

The JSON field names are now the CI/jq contract with nothing guarding them (a silent rename compiles clean). Recommend a Typhon.Shell.Tests project with JSON-contract snapshot tests as a separate task.

🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rationalize tsh — cut Workbench-superseded UI/diagnostics, reposition as automation-first CLI

1 participant