CareerVector Native TUI Client
Outcome
Turn an understood job and an existing CareerVector profile into a fitted CV and five-paragraph cover letter quickly, with visible deterministic layout constraints and user-controlled assistant edits. The TUI complements the web market matrix; it does not reimplement radar, qualification, ranking, enrichment, or JobCache ingestion.
As-built client boundary
- A keyboard-first General → CV → Cover Letter → Review → Export workflow in Rust/ratatui.
- Ordinary multiline editing, immediate validation/persistence, exactly five highlights, and deterministic completion state.
- Managed ChatGPT/Codex, Gemini, and Copilot connectors behind one provider-neutral interface, with in-product login, checksum-pinned installation, atomic activation, and rollback.
- Bounded application context, revision-checked field replacement, cancellation, and undo; no assistant filesystem or terminal capability.
- Native in-process Typst measurement, rendering, PDF export, and Sixel display through the controlled cterm contract.
- A current local
application.jsonadapter chosen for alpha portability and inspectability.
Integration seam inventory
The imported subtree is a donor implementation inside the monorepo, not a second CareerVector product or source of truth. Its seams divide as follows:
| Seam | As-built evidence | Canonical counterpart | Disposition |
|---|---|---|---|
| terminal shell and workflow | careervector-tui/careervector-tui/src/app.rs, ui.rs, editor.rs, settings.rs |
browser routes/components under ui/; Tauri loads that browser UI |
Reuse in the TUI. Preserve the focused General → CV → Cover Letter → Review → Export interaction. Share contracts and outcomes, not UI code. |
| local application shape | model.rs (Application, FieldId, flat CV summary and five-paragraph/five-highlight CL) |
recursive Node trees and workspace job attributes in @cv/schemas |
Adapt as a bounded projection. Map stable CareerVector meanings and the TUI's stricter five-highlight presentation onto canonical nodes. Never make the flat Rust struct a second canonical schema. |
| application persistence | storage.rs and <job>/application.json |
D1/Yjs sub-documents, clocks, op log, workspace links, and read models in @cv/server |
Retire as product truth after attachment. Keep JSON samples as fixtures/import material only. Device preferences, caches, connector artifacts, and unsent drafts may remain local. |
| local assistant tools | workspace.rs (get_application_context, revision-checked field replacement, local undo) |
four-tool boundary in @cv/assistant-tools; typed @cv/mutations operations, receipts, clocks, and compensating undo |
Migrate the intent, retire the filesystem implementation. The production adapter must emit canonical operations and durable receipts; it must not write application.json, Yjs, or D1 directly. |
| provider conversation | assistant.rs (Codex App Server plus ACP sessions, stream, cancel, revision guard) |
normalized connector/event boundary in @cv/agent-gateway and the persistent chat contract |
Reuse the native interaction and protocol evidence. Align normalized events and tool results by contract. Provider thread IDs remain provider/connector scope, never CareerVector identity. |
| managed connectors | runtime.rs and runtime/managed-connectors.json |
Management-reviewed connector policy, provenance, release evidence, and client-specific host adapters | Reuse for the native TUI. Preserve private runtime storage, checksum verification, atomic activation, and rollback. Do not merge it with Tauri's JobCache adapter router merely because both are Rust. |
| native document projection | pdf.rs, render/application.typ, embedded fonts |
canonical job/profile/document state and browser Typst-WASM projection in @cv/domain |
Reuse the native renderer, adapt its input. A deterministic projector supplies the TUI template from canonical state; Typst output never becomes storage authority. |
| exact line ruler | ruler.rs, careervector-tui/ruler/, ruler-contract/v1/ |
TypeScript ruler and conformance implementation in @cv/domain |
Reuse and keep conformance-based. The versioned behavior vectors, not identical implementation language, define parity. |
| terminal graphics and delivery | pdf.rs, launcher/, release manifest, cterm contract |
CareerVector release evidence and Management recovery | Reuse as a distinct native release tree. It does not replace the browser deployment or the Tauri updater. |
| standalone application samples | careervector-tui/applications/ and crate-local test applications |
synthetic workspace fixtures and explicit import tooling | Keep only as non-canonical fixtures. The separately maintained manual application-folder repository is outside this runtime boundary. |
Exact canonical crossings
The production TUI must cross product boundaries only at these named contracts:
- Access: accept or create a private workspace link, resolve it at a trusted host boundary, and retain a workspace identifier. No registration, membership, owner record, or CareerVector account is introduced.
- Read: request only the job, profile, CV/CL, document, constraint, transcript, and receipt projection needed by the active terminal surface. Unknown canonical fields are preserved by omission, not round-tripped through the flat TUI model.
- Human write: translate a field edit into the existing typed operation catalogue with a stable device actor, operation ID, expected sub-document clock, and normal server receipt.
- Assistant write: bind the device-authorized connector and provider thread to the active link-authorized workspace capability; invoke the shared assistant tools; commit through the same operation path; render the resulting receipt and compensating Undo.
- Realtime: consume only committed workspace updates and clocks through the existing relay contract. Realtime is notification/fan-out, never a native shadow database.
- Documents: project canonical Node/job state into the native Typst template and versioned ruler input; return PDF/fit evidence without treating rendered bytes as editable truth.
- JobCache: use CareerVector's existing public-search/snapshot seams. The TUI neither runs ingestion nor sends workspace identity or private document state to JobCache Core.
- Management: publish content-free version, conformance, install, connector, and failure-class evidence. Workspace links, documents, prompts, transcripts, and provider credentials do not cross by default.
The browser already implements canonical HTTP, optimistic operation, D1/Yjs, offline queue, and
realtime behavior through @cv/workspace-client and @cv/server. The TUI must conform to that
wire and state contract; importing the TypeScript client into Rust is not presumed. Tauri remains
the network-loaded browser client plus allowlisted native capabilities; embedding the terminal
workflow inside Tauri or moving connector execution into Tauri is not implied by this inventory.
Canonical integration target
On startup the production TUI attaches to an existing CareerVector workspace link or creates a workspace when none exists. It reads only the bounded job/profile/document projection it needs, preserves unknown fields, writes an explicit document-production allowlist through the shared operation contract, and participates in the normal realtime path.
Local application JSON then ceases to be product truth. Device-private settings, connector artifacts, credentials, renderer caches, and unsent drafts may remain local. Canonical career, job, application, document, transcript, and receipt state does not fork from D1/Yjs.
The following choices still require product authority and are deliberately not made here:
- which user-visible TUI attachment slice ships first;
- whether the native client consumes Yjs update bytes directly or a narrower versioned projection;
- where browser/Tauri provider connector processes execute;
- how a provider conversation is selected or resumed across client trees; and
- whether any local draft/cache survives after canonical acknowledgement, and for how long.
Management boundary
Management owns signed release/connector manifests, compatibility policy, conformance evidence, and content-free aggregate release health. The TUI owns local execution. Support evidence is generated and supplied explicitly by the participant; Management cannot inventory application directories, read credentials/transcripts, or issue ambient device commands.
Permanent exclusions
The TUI does not perform job qualification, ranking, scoring, automatic extraction/research, background enrichment, hidden agent teams, or JobCache ingestion. Those remain broader CareerVector/JobCache responsibilities exposed through canonical state or deliberate links.
Completion evidence
Ship signed cterm-plus-CareerVector artifacts for the supported native targets; pass keyboard, resize, Sixel, connector, authentication, cancellation, update/rollback, renderer/ruler, and license/provenance gates; attach to a real link-access workspace; prove browser/TUI mutation and realtime convergence; and prove removal of the local canonical-state adapter without losing the focused workflow.