Repository navigation
Description
Summary
tsh predates the Workbench. Its original "diagnostic-first" charter (per claude/design/Apps/TyphonShell/) is now obsolete: the Workbench's Open mode hosts the same in-process DatabaseEngine, so it has identical internal access plus a real GUI (Resource Tree, sortable schema/archetype browsers, Hilbert-curve File Map, byte-grid layouts, Storage Health, Engine Live Health, live Query Console). Every tsh command whose job is "a human stares at engine internals" is now strictly inferior to its Workbench panel.
What the Workbench cannot do — confirmed: its only data-mutating endpoint is OptionsController.PUT (its own settings) — is change data, drive transactions, run migrations, stream logs, or run headless in CI. That is tsh's durable identity.
This Feature repositions tsh from "diagnostic-first" to "automation-first" — the scriptable, mutating, CI-facing sqlite3-analog — by removing UI/diagnostics the Workbench supersedes and keeping everything only a CLI can do.
Guiding principle: exploration/visualization → Workbench; automation/assertion/mutation → tsh. The test for any command: does its output feed another program (keep) or a pair of human eyes (cut)?
Context: sibling Feature #435 (Distribution & Packaging), Epic #146 (Developer Experience & Adoption). Assessment sources: claude/design/Apps/TyphonShell/, claude/design/Apps/Workbench/views/, .../inventory/views-and-panels.md.
Decision matrix
Legend: 🔴 remove now · 🟠 cut interactive UI, keep JSON/CI probe · 🟢 keep · (🟡 "cut-after-parity" was folded into 🟢 keep — no Workbench equivalent exists, so keep behind clean scriptable output and retire only if/when the Workbench ships parity).
Interactive UI
| Item | Decision | Reason |
|---|---|---|
resources Terminal.Gui full-screen explorer + Tui/ResourceExplorer.cs |
🔴 remove | Duplicates the shipped Resource Tree panel badly; a TUI is the opposite of scriptable. |
resources --flat (plain table) |
🟢 keep (optional) | Scriptable resource dump; free once the TUI is gone. |
Spectre.Console output |
🟢 keep | Not a UI — it's result rendering (tsh's sqlite3 box-drawing). |
Test / fixture generation
| Item | Decision | Reason |
|---|---|---|
arpg-generate shipped in tsh (the test/Typhon.ARPG.Shell ProjectReference) |
🔴 remove | Shipped tool bundling a test/ fixture generator — inverted src→test dep; the Workbench gates its own fixtures #if DEBUG. Safe: tsh code uses no ARPG types. |
Extension mechanism (Typhon.Shell.Extensibility, ShellCommand, sibling discovery) |
🟢 keep | tsh-unique extensibility; arpg-generate is only its sample consumer. |
Typhon.ARPG.Schema |
🟢 keep | Used independently by Typhon.Benchmark; tsh only pulled it transitively. |
Diagnostics
| Command | Decision | Reason |
|---|---|---|
page-dump, cache-pages, segments, segment-detail |
🔴 remove | Database File Map shipped (`/dbmap/page |
list-archetypes |
🔴 remove | Archetype Browser shipped. |
entity-info |
🔴 remove | Data Browser + Detail shipped. |
db-stats, cache-stats, memory, transactions |
🟠 cut UI, keep JSON | Storage Health + Engine Live Health shipped for humans; keep pipeable numbers for CI/monitoring. |
btree, btree-dump, stats-show, revisions, mvcc-stats |
🟢 keep (retire-if-parity) | No Workbench equivalent (B+tree walker / MVCC time-travel / histograms are engine-gated or Phase 2). Keep behind clean text/JSON; retire only when the Workbench ships parity. |
btree-validate |
🟢 keep | Pass/fail assertion → CI. No equivalent. |
stats-rebuild |
🟢 keep | An action (maintenance op), not a viewer. |
Core identity — keep all (no Workbench substitute)
REPL + -c/-e/pipe/.tshrc; create/read/update/delete (Workbench can't mutate); begin/commit/rollback (no Workbench tx control); migrate/migrate-legacy (Workbench migration is a disabled stub); open/close/info, load-schema/reload-schema; set/echo/help/history/exit/log-level/pause; json/csv formatters; schema-validate/schema-diff/schema-export/schema-history (CI schema-drift); schema-list/describe/schema-fields (cheap scriptable text).
Acceptance criteria
- Terminal.Gui full-screen TUI removed;
Terminal.Guipackage dropped fromTyphon.Shell.csproj; solution builds green. -
arpg-generateno longer ships intsh(ProjectReference dropped); extension mechanism +Typhon.ARPG.Schemaintact;ARPG.Shellkeep-as-example vs delete resolved. - GUI-superseded diagnostics removed (
page-dump,cache-pages,segments,segment-detail,list-archetypes,entity-info). -
db-stats,cache-stats,memory,transactionsemit clean JSON/CI-pipeable output; Spectre tables dropped. - Retained diagnostics (
btree,btree-dump,stats-show,revisions,mvcc-stats,btree-validate,stats-rebuild) have clean scriptable text/JSON; "retire-if-parity" noted in docs. - tsh design docs +
help/README updated from "diagnostic-first" to "automation-first"; removed commands documented. - Full test suite green.
Tasks
See linked sub-issues.
Sub-issues
Collapse Sub-issuesSub-issues
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Estimate
Area
Start date
Target date
Product
Projects
- StatusShow more project fieldsDone
Activity
nockawa commentedon Jul 4, 2026
Implementation plan (accepted — autonomous execution)
Scope: the remaining work after #455 (TUI removed) and #456 (ARPG fixture reference dropped), both already code-complete on
feature/454-tsh-rationalization. Executed autonomously per owner direction; the issue's decision matrix is the agreed spec.Acceptance criteria
test/→examples/as the canonical extension-command example (owner-confirmed keep-as-example); solution builds. (finishes tsh: stop shipping the ARPG fixture generator (drop test ProjectReference) #456)page-dump,cache-pages,segments,segment-detail,list-archetypes,entity-info(dispatch + handlers + dead helpers + help). (tsh: remove GUI-superseded diagnostics (page-dump/cache-pages/segments/segment-detail/list-archetypes/entity-info) #457)db-stats,cache-stats,memory,transactionsto clean JSON/CI probes —--format jsonyields parseable output, no Spectre markup in the machine path; compact human default kept. (tsh: demote aggregate stats to JSON/CI probes (db-stats/cache-stats/memory/transactions) #458)btree,btree-dump,stats-show,revisions,mvcc-stats) with a scriptable JSON path;btree-validate/stats-rebuildunchanged; "retire-if-parity" noted in help + design doc. (tsh: keep + harden no-Workbench-equivalent diagnostics (btree, btree-dump, stats-show, revisions, mvcc-stats) #459)Note: the Shell has no dedicated test project; removals are proven by build + command-absence, JSON probes by a live
tshsmoke run. A dedicated Shell test project is noted as a follow-up, out of this Feature's scope.nockawa commentedon Jul 4, 2026
✅ Implementation complete — ready for review + commit (not yet committed)
Branch
feature/454-tsh-rationalization(main repo +claude/subrepo). Net −863 lines (217 added / 1080 deleted) — a rationalization is mostly subtraction.Acceptance criteria — all met
test/→examples/(kept as extension example)git mv(history preserved);ARPG.Schemaref re-pathed;.slnxupdated;examples/README.md; buildspage-dump/cache-pages/segments/segment-detail/list-archetypes/entity-info— dispatch + handlers + exclusive helpers + help + autocomplete/highlighting all gone; live smoke: each now errors "Unknown command"db-stats/cache-stats/memory/transactions→ JSON/CI probesjq-parseable JSON under--format json;transactionscarries atruncatedflagbtree+mvcc-statsgained JSON;btree-validate/stats-rebuildunchanged;revisions/stats-show/btree-dumpkept as clean text (deviation — see below); "retire-if-parity" in help + design docTerminal.GuiTUI + package removed; design-doc "automation-first" section + tsh-vs-Workbench division;examples/README.mdtshJSON smoke greenDeviations (flagged, not silent)
revisions/stats-show/btree-dumpkept as text, not JSON. They are per-entity/structural dumps, not monitoring probes, and are retire-slated — JSON there would gold-plate code marked for removal. The two genuine probe-shaped commands (btree,mvcc-stats) did get JSON.tshsmoke run.Review findings addressed
using System.Runtime.InteropServices;(its only user was the deletedpage-dump).ExecuteResources()— params went dead with the--flatbranch.truncatedflag to thetransactionsJSON (probe can now distinguish "50" from ">50").Recommended follow-up (needs an owner call — structural)
The reviewer's one substantive gap: the JSON field names are now the CI/jq contract but nothing guards them — a silent rename compiles clean and breaks consumers. A
Typhon.Shell.Testsproject with JSON-contract snapshot tests would close this (requires a new test project +InternalsVisibleTo, so it's out of this removal-focused Feature's scope). Suggest filing as a separate Task.Handoff per convention: not committed — ready for your commit. After merge,
/complete-task #454will close it out.#454 Rationalize tsh: remove TUI + superseded diagnostics, add JSON p…