ResearchShared TUI Extraction
Shared TUI Extraction Research Brief
Shared TUI Extraction Research Brief
How to run this file:
/goal Follow shared-tui-extraction/prompt.mdx. Re-audit the donor and the in-treejackin❯consumer surfaces before changing ownership or public APIs.
Mission
Design and execute a path-history-preserving extraction of crates/jackin-tui, the neutral crates/jackin-tui-lookbook harness/CLI, and the generic component catalog into the independent public Apache-2.0 tailrocks/termrock repository. The initial packages are termrock and termrock-lookbook. Migrate jackin❯ without behavior changes. Do not touch or validate another product repository.
The research must answer:
- Which donor modules are neutral, which need parameterization, and which remain
jackin❯-specific? - How is the current dependency on
jackin-coreremoved without duplicating helpers? - Which terminal runtime, component, theme, input, layout, and testing contracts form the public API?
- How are lookbook stories divided between neutral components and consumer compositions?
- How are history, licensing, attribution, render fixtures, and compatibility preserved?
- Which product-neutral contracts let future consumers adopt the library later without moving domain state into it?
- How can one
jackin❯implementation PR coordinate direct TermRockmaincheckpoints and exact revision pins without cross-repository deadlock or visible regressions? - How do consumers iterate against trusted branches or forks while pinning full commit revisions for durable builds?
- How does the standalone Fumadocs site remain synchronized with lookbook stories and CLI-generated SVG previews?
- How should the public API separate
ratatui-corewidgets, logical input, state/update contracts, Crossterm terminal ownership, and consumer effects? - Which current signatures must change before publication to support borrowed data, stable IDs, Unicode, semantic themes, and forward-compatible semver?
- Which CI, caching, dependency, provenance, docs, package, release, and cross-platform gates make the new repository independently maintainable?
- How should every donor component apply Ratatui's TEA, component, widget, Builder Lite, and testing guidance without making one application architecture mandatory?
Fixed boundaries
In scope:
- the approved
tailrocks/termrockrepository,termrockcore crate, andtermrock-lookbookpackage/CLI naming; - semantic themes and a default Tailrocks phosphor preset;
- Ratatui as the only rendering framework, with no framework-neutral renderer layer;
ratatui-coreas the base widget dependency, optional Crossterm integration, and no Tokio dependency;- an additive
crosstermfeature that adds event/backend/session convenience without gating or changing any component; - display-width-aware text/layout, key input, focus, hover, scroll, modal, terminal ownership, and restoration primitives;
- neutral panels, tabs, action strips, dialogs, lists, inputs, hints, status, toasts, and diff components;
- component-local logical actions, pure interaction-state updates, and typed outcomes that work inside consumer-owned TEA or component-oriented applications;
- compile-checked direct, TEA, component-oriented, Flux, buffer-only, manual Crossterm, and managed Crossterm examples using the same public components without a required TermRock runtime;
- interactive lookbook CLI, deterministic render artifacts, and terminal-size conformance;
- a same-repository Fumadocs component catalog backed by generated SVG states and a coverage manifest;
- one future
jackin❯implementation branch/PR for the complete roadmap, inherited donor history kept as original provenance, every new TermRock bootstrap commit DCO-signed/buildable, the first neutral standalone head and later checkpoints pushed directly tomain, and exact revision pins for every consumer checkpoint; - post-bootstrap Git branch/fork iteration with exact revision pins for durable consumer builds; crates.io publication is optional;
- complete
jackin❯donor migration as the only consumer adoption in this roadmap; - public API documentation, semver, MSRV, Ratatui/Crossterm compatibility, CI, and releases.
Out of scope:
- agent, role, workspace, container, Capsule, database, job, trace, or credential models;
- OnePassword, file browser, mount/role/scope picker, or product command execution;
- a universal Tailrocks application runtime, IPC protocol, persistence layer, telemetry client, or secrets crate;
- alternative TUI rendering frameworks or a cross-renderer abstraction;
- checking out, changing, building, validating, migrating, or releasing Holla, Velnor, Parallax, TableRock, or any other consumer project;
- feature research or native application planning for consuming products.
Deliverables
| File | Purpose |
|---|---|
index.mdx | Decisions and chapter map |
00-executive-summary.mdx | Recommendation, boundaries, and sequence |
01-tailrocks-consumers.mdx | Product ownership and concrete consumer needs |
02-donor-audit.mdx | Current coupling and extract/parameterize/remain classification |
03-target-repository.mdx | Naming inputs, repository, crates, Git consumption, API, theme, lookbook CLI, Fumadocs, testing, governance |
04-extraction-migration-plan.mdx | Ordered single-PR/direct-main cross-repository checkpoints and acceptance gates |
05-decision-record.mdx | Closed decision record |
06-public-api-and-refactoring.mdx | Dependency layers, module/component contracts, feature policy, terminal ownership, and refactoring ledger |
07-repository-engineering.mdx | Repository structure, CI/CD, caching, docs, provenance, supply chain, and release model |
08-migration-evidence-and-gates.mdx | Generated inventory, history plan, migration slices, parity matrix, performance, and completion gates |
09-component-redesign-catalog.mdx | Ratatui architecture decisions plus file-by-file donor dispositions and replacement contracts |