stikk — External Design Specification
| Document | stikk External Design Specification (black-box view) |
| Version | v0.2 (draft for review) — v0.1 + project-rules alignment: added TU-12/GU-09 (progressive disclosure per NFR-U01–U03), advanced-mode entry in CF-03, size-guarded rendering note in TU-11. No existing IDs changed meaning |
| Date | 2026-08-31 |
| Inputs | Requirements Specification v0.2 (stikk-01-requirements-spec-v0.1.md) — cited as UC/FR/NFR/CON/ASM/UD; prikk 0.27.1 reality per the 2026-08-31 audit; project rules in .git-exclude/rules/ |
| Authority | Defines WHAT the user sees and does at every stikk boundary. Internal architecture, module decomposition, libraries, languages, and serialization are out of scope (internal design). |
| ID scheme | BD- boundary · AC- actor · CL- launcher contract · TU- TUI · GU- GUI · CF- configuration · FL- flow · CT- external data contract · OP- operational behaviour. (DC- deliberately avoided — it collides with prikk’s RFC numbering.) |
Design stance carried from requirements: where prikk refuses, stikk explains (FR-110/111); preview-first (FR-120); tiered confirmation (FR-121); TUI/GUI parity through one operation set (FR-123, CON-2). No UI exists for operations prikk does not have (OS-1…OS-10); Git-shaped expectations are redirected in copy (“revert” → rollback flow, “switch branch” → focused ref + checkout plan).
1. System Boundary & Actors
1.1 Boundary
- BD-01 — Inside stikk: the TUI frontend, the GUI frontend, the shared operation layer they both call (CON-2), the explanation content (refusal glosses, witness/finding glossary — FR-111), and stikk’s own state store (config, sessions, caches — CON-4).
- BD-02 — Outside stikk: prikk core (the only path to any repository byte — CON-1); the repository (
.prikk/and the worktree); bundle and sync artifact files; the operating system (terminal, desktop shell, accessibility APIs, user-scope config locations); the user’s exchange channel (ASM-3); the human actors. - BD-03 — The single write rule: repository and worktree mutation happens only by asking prikk (NFR-S02). stikk itself writes only BD-01 state files, in user scope, atomically (NFR-R01). A repository remains byte-identical whether or not stikk ever opened it, except through explicit prikk operations (CON-4).
- BD-04 — One client among many: stikk assumes concurrent prikk CLI use and other stikk instances. It detects external repository change and refreshes rather than acting on stale state (FR-106); it never holds a repository lock across user think-time (NFR-R02).
- BD-05 — No network boundary exists. stikk makes no network calls of any kind (NFR-S05). File dialogs and paths are the only way content enters or leaves.
1.2 Actors
stikk has no accounts. Capability is derived per session from prikk-side facts — signing readiness (FR-104) and the read-only mode (NFR-S01) — and is displayed, never stored.
| ID | Actor | Derived from | May do (via stikk) |
|---|---|---|---|
| AC-01 | Viewer | no signing readiness, or read-only mode on | Every read surface: browse, inspect, compare, verify, evidence, exchange inspection (FR-121 tier 1) |
| AC-02 | Author | AUTHOR readiness present | Viewer + queue-affecting: commit (FR-050), rollback draft (FR-083 steps 1–3) (tier 2) |
| AC-03 | Maintainer | MAINTAINER readiness present | Author + history-publishing: seal, merge execution, branch/tag publication, trust changes, tag adoption, sync build/seal (tier 3) |
| AC-04 | Operator | any human at the machine, explicit confirmations | Recovery surfaces: doctor’s safe repair, lock clearing, compaction (FR-101/102/105, NFR-S04). Orthogonal to the mutating axis (AC-02/03) — no signing readiness is required — but not an exemption from the global read-only mode: FR-121 locks tier 2–3, lock clearing included, out entirely when read-only is on (RFC 012 F-a; corrected 2026-09-05 — this row previously said “always tier 3”, which contradicted FR-121) |
Persona mapping (informative): P-1 ≈ Author, P-2/P-4 ≈ Viewer, P-3 ≈ Maintainer + Operator.
2. External Interfaces
2.1 Launcher command-line contract (CL-…)
stikk is not a second prikk CLI (revised task ruling; CON-1, UD-02). VCS verbs on a command line belong to prikk. stikk’s command line only launches and aims the frontends, plus launcher-scope utilities.
- CL-01 — Launch TUI:
stikk [path]opens the TUI on the repository atpath(default: upward.prikk/discovery from the current directory — FR-001; if none, the recents/picker screen — FR-005). - CL-02 — Launch GUI:
stikk --gui [path](and the desktop launcher) opens the GUI identically. All other options below apply to both frontends. - CL-03 — Aiming (deep links):
--ref <name>sets the focused ref (FR-055) and opens History;--object <id>opens the matching detail view (patch/block/tag) (FR-124);--view <orientation|history|changes|queue|refs|evidence|exchange|trust|verify|recovery>opens a named view. Invalid aims degrade to Orientation with a notice, never an error exit. - CL-04 — Headless utilities (no UI):
stikk --version;stikk config check [file](validates CF-02, prints findings);stikk config path(prints CF-01 locations). Requirement backing: none direct — justified as CF-02/OP-01 support; flagged per task rule. - CL-05 — Launcher exit codes (distinct from prikk’s; scripts must not conflate):
0launched/utility ok ·2usage error ·3config invalid (config checkfailure) ·4environment unsuitable (e.g., TUI without a TTY, unsupported terminal). The TUI/GUI session itself always exits0once interactive; operation outcomes are never encoded in the process exit code. - CL-06 — Terminal discipline: the TUI owns the terminal only while attached to a TTY; otherwise it refuses with guidance (exit 4) rather than emit control sequences into a pipe. Headless utilities write plain text to stdout, diagnostics to stderr, and honour
NO_COLOR(CF-04). - CL-07 — No VCS verbs, stated in-product:
stikk log,stikk commit, etc. print one line redirecting toprikk <verb>and exit2— the vocabulary stays prikk’s.
2.2 Terminal UI layout model (TU-…)
- TU-01 — View inventory (each maps to requirements; all reachable from the palette TU-07 and listed in §6):
| View | Purpose | Grounding |
|---|---|---|
| Orientation (root) | health, refs summary, queue depth, worktree marker, signing readiness | UC-01, FR-002 |
| History | lineage of the focused/selected ref; queue tier on top; filters | UC-02, FR-010–017 |
| Patch Detail | one patch as a diff + raw operation view | UC-03, FR-030 |
| Block Detail & State Tree | block metadata, signatures, file tree at block, file content at state | FR-031/032 |
| Compare | two-block state difference, expandable to content diffs | UC-04, FR-033 |
| Changes | worktree-vs-baseline for the focused ref, per-file diffs | UC-05, FR-034 |
| Queue | the active queue, repository-wide: depth and target ref (or prikk’s missing/malformed metadata), thresholds, and each queued patch’s id, operations and — at prikk ≥ 0.42 — message; p or the palette; no focused ref needed. At prikk 0.39–0.41 it says once that prikk does not report a queued patch’s message or content; below 0.39 it shows the depth and target and says prikk does not list queued patches. Built by RFC 028 Handoff A (2026-09-15); was “not built” while prikk exposed no queued-patch ids (FR-051 as amended 2026-09-06). Amended 2026-11-23 (RFC 061 decision 2): the key is p — patches waiting to be sealed; it was Q. | UC-06, FR-051 |
| Refs | branches (open/closed/received) and tags; create/close/tag actions | UC-08/09, FR-070/071 |
| Merge Evidence | baseline/left/right slots; evidence report; plan; execute entry | UC-11, FR-080–082 |
| Exchange | bundle export/verify/import; sync-loop checklist; pending claims; peer dashboard | UC-13/14, FR-090–094 |
| Trust & Keys | adopted maintainer keys; add/remove; signing readiness detail | UC-15/18, FR-103/104 |
| Verify Report | stage list, per-item findings, signature outcomes, export | UC-16, FR-100 |
| Recovery | doctor findings + safe repair; lock inspector; compaction | UC-17, FR-101/102/105 |
| Refusal Explanation (overlay) | verbatim message, gloss, next steps, glossary links, session history | UC-12, FR-110/112 |
| Glossary / Help (overlay) | witness kinds, verify codes, terminology mapping, key reference | FR-111 |
| Command Palette (overlay) | fuzzy access to every operation/view/ref/recent object | FR-125 |
| Background Operations (overlay) | running/finished long operations, progress, cancel | NFR-P01/P02 |
- TU-02 — Shell layout: a fixed header line (repository name · focused ref), the active view, a one-line status bar, and a transient overlay layer (explanations, confirmations, palette, glossary, background ops). Overlays never destroy view state underneath.
- TU-03 — Status bar contents (FR-002/055; deliberately no “HEAD” — none exists; from prikk 0.42 prikk keeps a current-branch default, which is still not a HEAD — RFC 029): repository short name · focused ref, followed by
prikk's default: <branch>when prikk’s current branch differs from it (or is unresolved), orno ref focusedwhen none is (RFC 029 Handoff B; refreshed on each Orientation read, not live; the Orientation view shows prikk’s current branch whole) · queue depth (●n queued, hidden at 0) · worktree marker (clean/dirty/unknown) · capability badges[RO][AUT ✓/–][MNT ✓/–/?](NFR-S01, FR-104) · background-operation indicator (⟳ n). Amended 2026-11-21 (RFC 061 decision 5): the palette hint is gone, and with itfit’s first step — the keys are named on the key line (TU-13), one row above, which is the one place that names them. The shedding order below is now (1) the repository name, (2) prikk’s default shortened, (3) that segment dropped, (4) the focused ref. Amended 2026-09-06 (RFC 016 §3/§4):[MNT]is three-valued, not two —✓(adopted),–(no key material),?(key material present, adoption unverifiable on any supported prikk).?must never render as✓(C-T2c′). Amended 2026-09-15 (RFC 029 Handoff B): the line sheds by priority when it is wider than the terminal, each step only if it still does not fit — (1) drop the palette hint; (2) shorten the repository name from its end, marked…, down to one character (the header already shows it); (3) shorten prikk’s default from its end, marked…, down toprikk's default: …; (4) drop that segment. The focus (orno ref focused),(loading)/(error),●n queued, every badge and⟳ nare never shortened; past step 4 the line clips at the right edge. Widths are terminal cells. Amended 2026-09-15 (RFC 031): a change check is not counted in⟳ n, and never enters the Background Operations list; only a refresh it causes does, asr’s would. Every badge has a text form (NFR-A03) and is focusable for its explanation. - TU-04 — Navigation model: a view stack. Drill-in pushes (History → Patch Detail → Block Detail…), back pops; Orientation is the stack root. Slots-based views (Compare, Merge Evidence) accept picks initiated elsewhere (“send to Compare A/B”, “send to Merge left/…”) and become the top view when armed. State transitions:
| From | User action | To |
|---|---|---|
| any | palette selection / deep link | named view (stack reset to Orientation + target) |
| Orientation | choose ref | History |
| History | open patch / open block | Patch Detail / Block Detail |
| History / Refs | send block to Compare slot | Compare (armed when both slots filled) |
| History / Refs | send ref-or-block to Merge slot | Merge Evidence |
| Changes | commit action | Commit confirmation → Queue |
| History (queue tier) | p | Queue (RFC 028: the tier names whose queue it is, and points here) |
| any | seal action | Seal ceremony → History (on success) (the Queue view has no seal action; sealing happens in the ceremony — RFC 028) |
| Merge Evidence | execute (confluent only) | Confirmation → History |
| Merge Evidence | outcome is a refusal | Refusal Explanation overlay |
| any refused operation | automatic | Refusal Explanation overlay (FR-110) |
| Exchange (sync step) | step complete | next checklist step (FL-12) |
| Recovery | clear lock / repair | typed confirmation → Recovery (refreshed) |
- TU-05 — One catalog of every action (
FR-125; RFC 061 decision 1, delivering RFC 002’s rules 1–4):stikk-core’sactionsholds one entry per user action — a stable id (ref.switch), the name a reader reads, its key or none, where it applies (everywhere, a screen, a kind of selected row), its request category, whether it needs a focused ref, and its rank in the key line. Every consumer reads it and none keeps a list of its own: the command palette (TU-07), the action list (TU-06), the key line (TU-13), the Glossary’s Keys, andkeys.rs’s map from key to action. A key therefore exists only where the catalog binds one. The guide’s key reference is prose and cannot be generated; a test asserts it names exactly the keys the catalog binds. Amended 2026-11-21 (RFC 061 decision 1): this item was a list of nine keys, of whichbnamed the wrong action, andTab/Shift-Tabpane cycle,/find within a view (FR-013) andycopy the focused id or path (FR-124) were never built — they are recorded as not built rather than claimed, andFR-124’s copy is carried to whichever RFC builds it. - TU-06 — One letter, one action, in either case (RFC 061 decision 2): outside a text prompt a letter is matched without regard to case, so Caps Lock on is the same keyboard, and no letter has two meanings.
Enteropens the selected row’s action list — what can be done with it, from the catalog, the row’s own actions and then the screen’s, each with its key where it has one and each unavailable one dimmed with its reason (RFC 061 decision 3).→runs the first of them, which is the row’s open action;←,Escandqgo back, and of the three onlyEscandqquit at the root — an arrow key is pressed constantly while moving around, so one press too many must not end the session (RFC 061 review v1 C2). The keys themselves are not listed here: the Glossary lists them from the catalog, and the guide’s key reference is checked against it. Amended 2026-11-21 (RFC 061 decisions 2 and 3): this item listed context keys for views that do not exist, and the design rule “mutating actions are uppercase” is withdrawn — the confirmation card is what makes a write deliberate (FR-121), and Caps Lock made the case meaningless. Nine letters used to mean one thing in lower case and another in upper; fourteen actions gave up their letter and are found by name. - TU-07 — Command palette: matches the catalog’s names (case-insensitive substring) and lists every action in it — that is
FR-125. Each entry shows its key where the catalog binds one; entries the session cannot perform stay visible but disabled with the reason (“commit needs AUTHOR signing readiness”), and the action list shows the same entries with the same reasons from the same catalog method, so the two cannot disagree (FR-104,FR-125). Amended 2026-11-21 (RFC 061 decision 1): the palette listed 13 of 37 actions and named one key —g o— that nothing bound. Fuzzy matching over refs and recent object ids is not built. - TU-08 — Refusal overlay pattern (uniform for every refusal — FR-110): ① prikk’s message verbatim (copyable) ② plain-language explanation ③ next steps that exist, as actionable entries (e.g., “Inspect evidence”, “Choose another baseline”, “Open Trust & Keys”) ④ glossary links for every witness/code named ⑤ kept in session refusal history (FR-112).
- TU-09 — Confirmation overlay pattern (FR-121): shows exactly-what (operation, target ids, counts — e.g., “Seal 3 patches → new block on heads/main”), the capability consumed, and the consequence class. Tier-2 = explicit yes. Tier-3 (seal, merge execute, rollback-seal, ref publication, trust change, lock clear, tag adoption) = restate + explicit yes; lock clearing and trust changes additionally require typing the target name (NFR-S04, FR-102/103). The seal ceremony’s no-audit acknowledgement is its own unchecked-by-default step (FR-052).
- TU-10 — Degraded terminals: minimum 60×15 (below: a screen that says what to do); no italic; bold for headings and the selection only, and the selected row in reverse video across its whole width, padded to the panel’s edge, with
▶kept for a terminal that cannot show it (RFC 061 decision 4; SGR 7, which every terminal in RFC 059’s survey supports); an overlay that does not fit scrolls with ↑ ↓ — every one of them, through one mechanism, which is what RFC 060 Handoff B’s defect was about: the help overlay kept a scroll of its own that↓never reached, so it named a key that did nothing — and offers its confirmation only once its text has been seen; monochrome fallback renders every status by text/shape (NFR-A03); ASCII-only mode when Unicode is unavailable (CF-03); reduced-motion disables spinners in favour of counters (NFR-A04). Amended 2026-11-21 (RFC 060 decision 10): the minimum was 80×24, which locked a 1366×768 laptop out at 1.6 times the default font — by one row (F1). 60×15 fits text 2.3 times the default on every screen measured. The clauses added beside it are what a window that small needs to stay readable: an overlay used to wrap for a wider panel than the one drawn and cut words in the middle (F3), and a card taller than the window could offer a confirmation whose consequences were scrolled out of sight. - TU-13 — The key line (RFC 061 decision 5): one row, above the status bar, on every screen at every size from 60 × 15, listing the keys this screen has from the catalog — “Enter actions · ↑↓ move · b branches · w changes · c commit · s seal · ? help · q back”. Entries are separated by
·, the key is in the body colour and its word is dim. When the line does not fit, whole entries drop, lowest rank first — never a cut word; what belongs to this screen or this row outranks what every screen carries, and? helpandq backnever drop, with “Enter actions” dropped last of the rest. It is the one place keys are named: the status bar has no key hint, and a view’s title is a name and a position (RFC 060’sTitle). An overlay keeps its own foot line, which names the one key that reads on where a card covers this row. - TU-11 — Long-content discipline: wide content (diffs, trees, reports) scrolls within its pane, never breaks the shell — and a view with more rows than its pane says so, with RFC 024 §4’s position in its title, whether the window follows a cursor or a scroll (RFC 060 Handoff C): a row below the pane and a row that does not exist look identical on screen, so the check is structural and runs over every view and overlay at 60 × 15 and 72 × 20; digits align in tables; ids abbreviate with expand-on-focus and full-copy (FR-124). Very large renderables (oversized diffs, huge trees) render a size summary with an explicit “show anyway” expander instead of freezing the pane (NFR-P01; threat model T-DO1).
- TU-12 — Progressive disclosure (NFR-U01–U03): every view has a default depth showing only what its task needs, and an advanced depth behind explicit expanders or the global advanced mode: History default hides update-seq/state-root columns; Patch Detail default is the rendered diff (raw operation fields are the expander); Block Detail default hides the ref-chain internals (FR-016 content is advanced); Verify default shows stage statuses and counts (per-item findings expand); Exchange default shows the current checklist step only. The primary loop — open → Changes → commit → seal → History — is fully operable at default depth (NFR-U02). Advanced mode is a persistent preference (CF-03), toggled at runtime, changing display depth only, never semantics.
2.3 Graphical UI layout model (GU-…)
- GU-01 — Window structure: left sidebar (repository switcher + view list mirroring TU-01 + refs tree with open/closed/received groups — FR-014/015), main pane (active view), right inspector pane (detail of current selection: signature inspector FR-035, blob detail FR-036), bottom status strip mirroring TU-03. Panes collapsible; layout persists per repository (FR-122).
- GU-02 — Menu bar inventory: App/File Open Repository… · Open Recent ▸ · Open Bundle… (FR-004) · Read-only Mode ✓ · Quit. Repository Verify · Doctor · Locks… · Compact… · Refresh. History Focus Ref… · Filters… · Compare… · Find. Work Commit… · Seal… · Checkout Plan… · Deletion Plan… · Rollback… Exchange Export Bundle… · Verify Bundle… · Import Bundle… · Sync Assistant… · Pending Claims. Trust Adopted Keys · Add Maintainer Key… · Signing Readiness. View Theme ▸ (System/Light/Dark) · Font… · Panes ▸ · Locale ▸. Help Glossary · Terminology (Git → prikk) · prikk Documentation · About.
- GU-03 — Toolbar: Open · focused-ref selector (never labelled “branch switcher”; tooltip explains FR-055) · Commit · Seal · Verify · Sync Assistant · Read-only toggle (turning read-only on is always allowed; turning off requires signing readiness — NFR-S01) · Palette.
- GU-04 — Context menus (per view, notable): History block row — Inspect · Send to Compare A/B · Use as Merge baseline/left/right · Tag this block… · Copy id. History patch row — Inspect · Copy id. Changes row — Open diff · Open in editor · Copy path. Refs: branch — Focus · History · Close… ; received ref — History · Merge from… · Copy; tag — Inspect target · Copy. Received tag — Adopt… (FR-072). Verify finding — Explain · Copy · Go to object. Lock row — Explain liveness · Clear… (typed, FR-102).
- GU-05 — Drag-and-drop inventory (prikk-legal only): drag a block → Compare slot A/B (FR-033); drag a block or ref → Merge baseline/left/right slot (FR-080); drag a bundle file from the OS onto the window → Inspect/Import chooser (FR-004/091); drag a ref onto the Changes pane → opens the checkout plan for it — never an immediate write (FR-053, FR-120). Deliberately absent: dragging a commit onto a branch (cherry-pick/rebase gestures — OS-1); dragging files into a “stage” (OS-3). Drop targets appear only while a legal drag is in progress; every drop lands in a preview or chooser, never directly in a mutation.
- GU-06 — Dialog parity: refusal, confirmation, and the three ceremonies (seal, rollback, sync assistant) are the same patterns as TU-08/09 rendered as dialogs/wizards; every dialog action is also palette-reachable and keyboard-operable (FR-123, NFR-A02).
- GU-07 — Theming & fonts: theme System/Light/Dark/High-contrast/Plain; UI font and monospace content font (family + size); reduced motion follows the OS setting with a manual override (NFR-A03/A04, CF-03). Amended 2026-11-21 (RFC 059 decision 1): the five themes are config values —
system(the default) asks the terminal whether its background is light or dark and falls back toplainwhen it does not answer;lightanddarksend no query;high-contrastpaints stikk’s own black-and-white pair over the whole frame;plainadds no colour of stikk’s own.high-contrastis one of the themes rather than a separate option beside them, because in a terminal it is a palette and nothing else.NO_COLORapplies tosystem, and an explicit theme in the config wins over it. - GU-08 — Accessibility: full keyboard operability with visible focus; accessibility tree exposes names/roles/values for every control; status-strip badges readable by screen readers as text (NFR-A02/A03).
- GU-09 — Progressive disclosure in the GUI (NFR-U01–U03): TU-12’s default/advanced depths apply identically; the inspector pane is the natural home of advanced detail (collapsed sections by default); advanced mode lives in the View menu and is the same persisted preference as the TUI’s (CF-03) — one setting, both frontends (FR-123).
2.4 Configuration interface (CF-…)
- CF-01 — Locations (user scope, per platform convention; never inside a repository — CON-4): a config file at the platform user-config directory under
stikk/, and a state directory (sessions, caches, refusal history) under the platform user-state/data directory.stikk config pathprints both (CL-04). Deleting the state directory is always safe (NFR-R01: defaults restored). - CF-02 — Format: one human-editable, line-oriented declarative text file with sections and
key = valueentries; documented and versioned with the product; unknown keys warn (named in the notice) and are ignored — they never block launch; syntactic errors fall back to full defaults with a visible notice (OP-01) and a pointer tostikk config check. - CF-03 — Configurable items: key bindings (per stable action id, TUI and GUI) — not built (RFC 061 decision 1): nothing reads a
[keybindings]table, and the ids such a table would bind now exist, in the catalogTU-05describes. RFC 002’s rule 5 is where it would be designed, and it gets its own RFC when a user needs it; theme; locale (en/ja/nb— NFR-I01); advanced mode (default off — TU-12/GU-09, NFR-U03); confirmation strictness (default|strict— may only tighten over FR-121, never below it); external editor command template for opening worktree files (Changes view; the only external program stikk ever launches, and only on explicit user action); diff context lines; show-closed-branches default (FR-015); accessibility:reduced-motion,high-contrast,ascii-only; recents length (FR-005); per-repository override section (e.g., opt out of focused-ref memory). No merge-tool integration exists to configure (OS-2). - CF-04 — Environment variable catalogue (precedence: environment > config file > default):
| Variable | Owner | Effect |
|---|---|---|
STIKK_CONFIG | stikk | Absolute path of the config file to use |
STIKK_STATE_DIR | stikk | Override state directory |
STIKK_READ_ONLY=1 | stikk | Forces read-only mode for the session (NFR-S01); cannot be overridden from inside the UI |
STIKK_LOCALE | stikk | Locale override (NFR-I01) |
NO_COLOR | convention | Disables color in TUI and headless output (CL-06) |
TERM, platform a11y/motion settings | OS | Respected as found (TU-10, NFR-A04) |
PRIKK_AUTHOR_KEY_ID / PRIKK_AUTHOR_SEED / PRIKK_MAINTAINER_KEY_ID / PRIKK_MAINTAINER_SEED and other PRIKK_* | prikk | Pass-through, read-only. stikk reads presence (never seed values) for readiness display (FR-104); never stores, logs, or displays material (NFR-S03); never sets or modifies them |
- CF-05 — Application of changes: config is read at launch; theme and locale apply immediately when changed from the UI (NFR-I01-S); everything else applies on restart, stated in the settings surface.
3. User Interaction Flows (FL-…)
Numbered as user action → system response. Every mutation passes a TU-09 confirmation; every refusal lands in TU-08. Flows cite the requirement they realize.
FL-01 — Open & orient (UC-01). 1. User launches stikk [path]. 2. Orientation renders: format acceptance, refs summary (local/received/closed counts), queue depth, worktree marker, last known verify status, signing readiness badges (FR-002/104). 3. Unopenable target → full-screen refusal with prikk’s message verbatim (retired format guidance included) (FR-003). 4. User picks a ref → History (FR-055 sets focus).
FL-02 — Browse with filters (UC-02). 1. History shows the queue tier above the sealed lineage (FR-010). 2. User opens filters: ref, author key id, block kind, patch purpose, path (FR-012; a message filter is now possible since UD-01 retired at prikk 0.32, RFC 015, but is not built here — its own increment, RFC 015 decision 7). 3. Applying filters re-renders with an active-filters line; filters persist in the session (FR-122). 4. / finds ids/paths/tag text within the view (FR-013). Amended 2026-11-23 (RFC 061 decisions 1 and 2): steps 2–4 are not built, and neither key is bound. This step said filters opened on f, which is prikk’s own fields now; and FR-013’s / find is recorded as not built (TU-05, FR-013). The catalog is where a key exists, and it binds neither — the flow stands as a design, with no key claimed for it.
FL-03 — Inspect a patch (UC-03). 1. User opens a patch row — built 2026-10-13 (RFC 035): from Block detail’s patch list, or from the Queue. 2. Patch Detail renders each operation under prikk’s own kind word: a text edit’s spans, a create’s content and mode, a delete’s preimage, a binary replacement’s blob ids and sizes, a permission change’s two modes, and a rename with its asserting AUTHOR key (FR-030). No surrounding context, at any prikk version: prikk’s edits are content-anchored spans, not line ranges, and the preimage a patch carries is the deleted node’s, not the edited file’s — inventing context around a span would be invention (RFC 021 F2, T-T4), so this clause’s original “with context from carried preimages” is withdrawn. 3. f switches to the raw operation view (fields, hashes, anchors) — Tab as written here was never bound, and v shipped first, becoming f with RFC 061 decision 2. 4. Inspector shows the signature standing with its three-valued gloss (FR-035) — not built.
FL-04 — Compare two blocks (UC-04). 1. From any History/Refs context, user sends block → Compare A, then block → Compare B (TU-04/GU-05). 2. Compare renders the state difference: added/removed/content-changed/mode-changed (FR-033). 3. Opening an entry shows the content diff; copying ids/paths is FR-124. Amended 2026-11-23 (RFC 061 decision 6): this step claimed a y copy key. Nothing copies anything, and FR-124 is recorded as not built; the key is withdrawn rather than carried as one that does nothing.
FL-05 — Commit (UC-05). 1. User opens Changes; stikk shows worktree-vs-baseline with per-file diffs (FR-034, via UD-03 workaround). 2. Untracked noise may be view-filtered — banner states a commit still captures those files (UD-08). 3. User invokes Commit (c). 4. Message prompt (required non-empty), with a notice conditioned on this session’s own prikk version — not persisted below prikk 0.32, stored at or above it (UD-01 retired, RFC 015 F2). 5. Confirmation summarizes the whole-worktree capture (file counts) and the AUTHOR key id to be used (FR-121 tier 2). 6. On yes → prikk commit runs; result (patch id, operation counts, threshold warnings) shown verbatim; Queue badge increments (FR-050/051). 7. Refusal (e.g., lock held) → TU-08. Amended 2026-11-23 (RFC 061 decision 2): commit’s key is c; it was C, and a letter now means one action in either case.
FL-06 — Seal ceremony (UC-06). 1. User invokes Seal (s, or the palette’s op.seal) from wherever they are focused — Orientation’s queue count/target is the only preview this needs. (Corrected 2026-09-15, RFC 028 Handoff A: this step used to say there was no dedicated Queue view yet. There is now — p, listing each queued patch at prikk ≥ 0.39 — but the ceremony does not depend on it, and naming the patches in the confirmation itself is RFC 028 Handoff B.) 2. Preview prevents an empty queue or a cross-ref target client-side (C-T4d) before anything is armed. 3. Confirmation (tier 3, FR-121) restates how many patches will seal into one block and on which ref (FR-052, amended 2026-09-05: prikk exposes the queued count and target ref, never the patch ids — corrected 2026-09-15, RFC 028 Handoff B: prikk has enumerated its queue since 0.35, and at prikk ≥ 0.39 the confirmation names each patch it will freeze, by short id and, at ≥ 0.42, message, directly under the count; when the card cannot hold every row it shows as many as fit and says how many more there are and where to see them; below 0.39 it says prikk does not list queued patches), states plainly that a trust refusal is possible, and never promises success — this is the ceremony’s first act, an explicit yes. 4. The no-audit consent step: its own screen, unchecked, cannot be defaulted, tied to the ceremony’s own irreversibility rather than to prikk’s --allow-no-audit flag (RFC 016 §8 amended) — the second, distinct act. Amended 2026-09-06 (RFC 016 decision 3): seal stays untyped — no MAINTAINER key id confirmation step. Two deliberate acts, not three; a third would teach users to click through the first. Amended 2026-09-12 (RFC 023 Handoff B): the confirmation names the MAINTAINER key id that will sign, as FL-05 step 5 does for AUTHOR. This does not reopen the step above: RFC 016 removed an act — a key id the user had to type back — not the information. A ceremony that freezes patches into permanent, signed history, behind a tier-3 confirmation and a separate acknowledgement, should say which key is about to sign, and displaying it costs no extra keypress, which was decision 3’s actual concern. Absent renders as nothing; there is no placeholder, because capability_gate refuses on NotReady before a confirmation is drawn. 5. Execute → success shows the new block id and RefState verbatim; Orientation refreshes so the queue count reflects the seal. 6. Any refusal (a trust refusal naming what adoption requires and admitting stikk cannot verify it afterwards, RFC 016 §9; incomplete publication; a lock) → TU-08 with recovery pointers (FR-110). Amended 2026-11-23 (RFC 061 decision 2): seal’s key is s and the Queue view’s is p; they were S and Q.
FL-07 — Checkout, plan then materialize (UC-07). 1. User drops/aims a ref at Changes or invokes Checkout Plan. 2. Plan view: files to write, unchanged files, per-file conflicts that will refuse, route (snapshot/patch) (FR-053). 3. User confirms the plan → materialization runs; report summarizes written/unchanged. 4. Deletions are a separate flow: Deletion Plan lists candidates with per-path safety verdicts; unsafe candidates are visible and inert (FR-054); a distinct confirmation executes only the safe set.
FL-08 — Merge, confluent path (UC-11). 1. User fills Merge Evidence slots: baseline block (or accepts a proposed ancestor, labelled proposal — FR-084/UD-07), left = focused ref, right = ref/received ref. 2. Evidence renders: outcome, per-pair classifications, witnesses if any (FR-080). 3. Outcome confluent → user opens Plan (adopted patch ids, resulting block shape) (FR-081). 4. Execute (Enter on the plan) → tier-3 confirmation naming into-ref, from-ref, baseline, patch count. 5. Success → History shows the merge block (two parents, mainline marked). 6. If the ref advanced meanwhile, prikk’s refusal is shown and evidence re-runs automatically once (FR-082). (Amended 2026-10-19, RFC 047: the evidence and the plan open together as one Merge plan view, from the ref picker — mark the branch to merge from, select the branch to merge into, then Merge plan from Enter’s list. The baseline is not filled or proposed by the user: stikk names it only where it can prove it is the true merge base (RFC 047 decision 3), and otherwise says why it cannot. The merge executes from that view with Enter, re-reading the plan inside its preview; nothing re-runs automatically after a refusal, which is shown verbatim.) (Amended 2026-11-23: Merge plan and the merge itself bind no letter — both are reached from Enter’s list, where M opened the plan before (RFC 061 decision 2). Merging into the branch you are on is offered from prikk 0.56, where prikk writes the merged files into the worktree (RFC 063 decision 2); below 0.56 it stays refused, as RFC 047 F3 found.)
FL-09 — Merge, refusal path (UC-12). 1–2 as FL-08. 3. Outcome not confluent → Refusal overlay: verbatim reason, witness list; each witness expands to its glossary entry (kind, the two operations, paths/nodes involved) (FR-080/110/111). 4. Next-step entries offered: inspect the conflicting patches (→ FL-03), try a different baseline (→ FL-08 step 1), open the sync assistant if the right side is stale. 5. The explanation is retained in session refusal history (FR-112). No resolution affordance exists or is implied (OS-2).
FL-10 — Rollback (UC-10). 1. User invokes Rollback on the focused ref. 2. Step 1 Preview: what the inverse will change (FR-083, plan-first FR-120). 3. Step 2 Draft: message prompt (the same version-conditional persistence notice as FL-05 step 4, UD-01 retired at prikk 0.32 — RFC 015), AUTHOR confirmation → inverse draft appended; draft patch id shown. 4. Step 3 Verify: draft verification result rendered; failure → TU-08 and the flow halts with the draft visible in Queue. 5. Step 4 Seal: as FL-06. 6. History then shows the rollback block flagged as such.
FL-11 — Bundle exchange (UC-13, UC-20). Export: 1. Export Bundle → ref chooser + destination file dialog. 2. Confirmation; core writes; report (objects, author keys) shown (FR-090). Verify/Inspect: 3. Open/drop a bundle → offline report with the structure-not-trust caveat verbatim (FR-004/091). Import: 4. Import → tier-2 confirmation; result names the received ref; view lands on its history with the “no local ref advanced, no key trusted” notice (FR-091, FR-014).
FL-12 — Sync loop (UC-14). 1. Sync Assistant asks the role: receiver or sender. 2. The checklist renders all steps with the current one armed; each step names the artifact file to produce or consume and who it goes to (FR-092). Receiver: produce summary → hand over → consume peer’s build → accept (limits shown first) → review pending claims (FR-093) → seal-from-claim (ceremony as FL-06). Sender: consume summary → compare → consume have-list → build (MAINTAINER) → hand over. 3. Each completed step advances the checklist; the assistant is resumable across sessions (FR-122). 4. The peer dashboard summarizes local-vs-last-known divergence (FR-094).
FL-13 — Trust adoption with TOFU conflict (UC-15). 1. Trust & Keys lists adopted keys; user invokes Add (key id + public key) or Adopt from a received tag (FR-072/103). 2. Tier-3 typed confirmation explains what trusting the key means. 3. If prikk refuses because the key id is known with different material, the refusal overlay presents it as a security event: what TOFU continuity means, why this is refused, and that no override exists in stikk (FR-103, NFR-S04).
FL-14 — Verify & report (UC-16). 1. User invokes Verify (v); it runs in background with progress (NFR-P02/P05). 2. Report renders stages → per-item findings, warnings vs errors as core distinguishes them; signature outcomes grouped Sound/Unverifiable/Failed with glosses (FR-100/035). 3. Each finding links to its object view and glossary entry (FR-111). 4. Export writes core’s JSON verbatim or stikk’s versioned export (CT-02) via a file dialog. Amended 2026-11-23 (RFC 061 decision 2): Verify’s key is v; it was V, and v was the raw view, which is f now.
FL-15 — Stale-lock recovery (UC-17). 1. A lock-conflict refusal or Recovery view shows held locks: path, kind, recorded PID, advisory liveness with core’s exact asymmetry explained (positive = refuse; negative ≠ authorization) (FR-102). 2. User selects a lock → Clear. 3. Typed confirmation (lock name) with the two-writers warning. 4. Result shown; the originating operation is not auto-retried (NFR-S04).
FL-16 — Resume (UC-19). 1. User relaunches stikk. 2. The last repository opens at the persisted view/focused ref/filters (FR-122). 3. Missing/corrupt session state → defaults silently (NFR-R01); external changes since last run are reflected, not replayed (FR-106).
4. Data Contracts (External) (CT-…)
- CT-01 — Inputs stikk accepts:
| Input | Form | Notes |
|---|---|---|
| Repository | local filesystem path | FR-001; no URI schemes exist (OS-4) |
| Bundle file | file path (dialog, argument, or drop) | FR-004/091; content handed to prikk, never parsed by stikk |
| Sync artifacts (summary, have-list, exchange, claims) | file paths via the assistant | FR-092/093; opaque to stikk |
| stikk config file | CF-01/CF-02 | validated by CL-04 |
| stikk session state | CF-01 state dir | stikk-owned; safe to delete |
| Environment | CF-04 catalogue | PRIKK_* read-only pass-through |
- CT-02 — Outputs stikk produces: rendered screens; stikk-owned config/session files (atomic writes — NFR-R01); report exports on explicit user action only: (a) prikk’s
verify --format jsonpassed through byte-verbatim, labelled as prikk’sverify-report-v1schema (FR-100); (b) stikk-authored exports of evidence/report/refusal views as plain text and as JSON under a versionedstikk-export-v1label (FR-124) — schema contents are internal-design scope, the versioning and stability promise are external. Repository bytes, bundles, and sync artifacts are always written by prikk at stikk’s request (CON-1, NFR-S02). - CT-03 — Inter-process contract with prikk core, as request/response categories (serialization and transport are internal design, bounded by UD-02; behaviourally each category commits to the properties below):
| Category | Covers (examples) | Mutates | Cancellable | Lock behaviour | Surfaced error classes |
|---|---|---|---|---|---|
| read-history | ref lists, lineage, patch/block reads, ref chains | no | yes | none held by stikk | integrity-finding, environment |
| read-state | state trees, content at block, comparisons | no | yes | none | integrity-finding, environment |
| worktree-analysis | changes vs baseline (UD-03 route) | no | yes | none | environment |
| queue-mutation | commit, rollback draft | yes | between prikk calls only | prikk-internal, per call | refusal, lock-conflict, not-ready |
| publication | seal, merge execute, branch/tag publish | yes | before execution only | prikk-internal, per call | refusal, lock-conflict, not-ready, integrity-finding |
| exchange | bundle export/verify/import, sync build/accept/seal | import/build/seal yes | before execution; long imports abortable per core semantics | prikk-internal | refusal, limits, integrity-finding |
| integrity | verify, doctor (read) | no | yes | none | integrity-finding |
| trust | key add/remove, tag adoption, readiness probe | yes | before execution | prikk-internal | refusal (TOFU), not-ready |
| recovery | doctor repair, lock clear, compaction | yes | before execution | prikk-internal / explicit | refusal, environment |
Idempotency note: stikk treats every mutating category as not idempotent and never auto-retries (NFR-S04); re-invocation is always a fresh user decision with fresh preconditions (FR-106, FR-082).
- CT-04 — Error classes (the vocabulary OP-03 presents):
refusal(prikk’s semantic no — FR-110 pattern) ·lock-conflict(“another writer is active” — FR-106) ·not-ready(signing/trust prerequisites — FR-104) ·integrity-finding(verify/doctor content — FR-100/101) ·limits(artifact ceilings surfaced pre-execution — FR-092) ·environment(I/O, permissions, version skew — NFR-R03) ·stikk-internal(OP-03). - CT-05 — Concurrency contract: at most one mutating request in flight per repository from a stikk instance; reads may run concurrently; after any external-change detection, armed previews are marked stale and must be re-generated before their execute action re-enables (FR-106, FR-120).
5. Operational Behaviours (OP-…)
- OP-01 — Startup: 1. launcher parses arguments (CL-01…07); 2. config loads — invalid syntax → defaults + a visible notice naming the problem and
stikk config check(CF-02); 3. repository selection (argument → discovery → recents/picker); 4. Orientation renders within NFR-P03 budgets (< 2 s tier-1, excluding verify); 5. no implicit full verify — orientation uses cheap reads and the last known verify status with its age by repository-state, never wall-clock (NFR-P05, OS-7). - OP-02 — Long-running operations: run in background (NFR-P01) with determinate progress where core reports counts, otherwise indeterminate with an elapsed counter; cancellable where CT-03 allows (NFR-P02) — cancelling a multi-step ceremony stops before the next prikk call and reports exactly which steps completed (core calls themselves are crash-safe; stikk refreshes state after cancellation). Completed operations post results to the Background Operations overlay (TU-11) and, where relevant, refresh affected views.
- OP-03 — Error presentation by class (CT-04):
refusal→ TU-08 overlay;lock-conflict→ non-modal banner with a jump to the Lock inspector (FR-102);not-ready→ inline guidance toward Trust & Keys (FR-104);integrity-finding→ routed into the Verify/Doctor views, never a popup;limits→ shown in the pre-execution confirmation, not after failure;environment→ plain statement with the failing path and the original message (NFR-I03);stikk-internal→ a fault screen stating that the repository was not touched, session state is preserved, and where the log/state files are — the session may continue read-only. - OP-04 — External change & multi-writer behaviour: on detected repository change, a passive “repository changed outside stikk — refreshed” notice; armed plans/previews are invalidated per CT-05. stikk never blocks another writer: it holds no locks between operations (NFR-R02, BD-04). Built 2026-09-15 (RFC 031): detection is a silent change-token read — on terminal focus returning (where the terminal reports it) and every 5 seconds while idle, never while a stikk request is running or an Orientation read is pending — compared with the token stamped at the last Orientation read. On a difference, stikk re-stamps, replaces an open commit or seal confirmation (or seal’s consent step) with the stale overlay, cause Repository, refreshes Orientation and the top screen in place, and shows the notice in the words above. A failed check says nothing. A worktree-only change is not in the token; RFC 030’s re-read at Enter catches it.
- OP-05 — Shutdown & cleanup guarantees: quitting with operations running prompts once (cancel-and-quit / wait); session state is flushed atomically on every transition, not only at exit, so
kill -9at any instant loses at most the last view transition and never repository state (NFR-R01); no locks survive stikk exit because none are held (NFR-R02); temporary export files are written to their final names only on completion. - OP-06 — Read-only platforms & degraded capability: on platforms where prikk is read-only, every mutating affordance renders disabled with the platform reason (NFR-T01); the same disabled-with-reason presentation applies to missing signing readiness (FR-104) and read-only mode (NFR-S01) — capability is always visible, never silently absent.
6. Traceability (design items → requirements)
| Design items | Realize |
|---|---|
| BD-01…05 | CON-1/2/4, NFR-S02/S05, NFR-R02, FR-106, ASM-3 |
| AC-01…04 | FR-104, FR-121, NFR-S01, FR-101/102/105 |
| CL-01/02 | FR-001, FR-005, UC-01 |
| CL-03 | FR-055, FR-124 |
| CL-04 | (no direct FR — flagged; supports CF-02, OP-01, NFR-R03) |
| CL-05/06/07 | CON-1, UD-02, UD-05 (non-conflation), NFR-A03 |
| TU-01 | UC-01…20 view coverage; FR-002, 010–017, 030–036, 050–054, 070–072, 080–084, 090–094, 100–105, 110–112, 125 |
| TU-02/03 | FR-002, FR-055, FR-104, NFR-S01, NFR-A03, NFR-P01 |
| TU-04 | FR-120 (armed previews), FR-110 (auto-overlay), UC navigation |
| TU-05/06/07/13 | NFR-A01, FR-125, FR-121; FR-013 and FR-124 not built (RFC 061 decision 6) |
| TU-08 | FR-110/111/112, NFR-I03 |
| TU-09 | FR-121, FR-052, FR-102/103, NFR-S04 |
| TU-10/11 | NFR-A03/A04, NFR-T02, FR-124, NFR-P01 |
| TU-12 / GU-09 | NFR-U01/U02/U03, FR-123, CF-03 |
| GU-01 | FR-014/015, FR-035/036, FR-122, FR-123 |
| GU-02/03/04 | FR surface parity (FR-123); FR-004, FR-053, FR-070–072, FR-090–094, FR-100–105; NFR-S01 |
| GU-05 | FR-033, FR-080, FR-004/091, FR-053, FR-120; OS-1/OS-3 (deliberate absences) |
| GU-06/07/08 | FR-123, NFR-A02/A03/A04, CF-03 |
| CF-01 | CON-4, NFR-R01, CL-04 |
| CF-02 | OP-01, NFR-R01 |
| CF-03 | FR-121 (tighten-only), FR-015, FR-005, NFR-A03/A04, NFR-I01; OS-2 (absence) |
| CF-04 | NFR-S01/S03, NFR-I01, CL-06 |
| CF-05 | NFR-I01 |
| FL-01 | UC-01; FR-001/002/003/055/104 |
| FL-02 | UC-02; FR-010/012/013/122; UD-01 |
| FL-03 | UC-03; FR-030/035 |
| FL-04 | UC-04; FR-033/124 |
| FL-05 | UC-05; FR-034/050/051/121; UD-01/03/08 |
| FL-06 | UC-06; FR-052/104/110 |
| FL-07 | UC-07; FR-053/054/120 |
| FL-08 | UC-11; FR-080/081/082/084; UD-07 |
| FL-09 | UC-12; FR-080/110/111/112; OS-2 |
| FL-10 | UC-10; FR-083/120/121; UD-01 |
| FL-11 | UC-13/20; FR-004/090/091/014 |
| FL-12 | UC-14; FR-092/093/094/122 |
| FL-13 | UC-15/18; FR-072/103/104; NFR-S04 |
| FL-14 | UC-16; FR-100/035/111; NFR-P02/P05 |
| FL-15 | UC-17; FR-102; NFR-S04 |
| FL-16 | UC-19; FR-122/106; NFR-R01 |
| CT-01 | FR-001/004/091/092; OS-4; CF-01/04 |
| CT-02 | FR-100/124; CON-1; NFR-S02; NFR-R01 |
| CT-03 | CON-1; UD-02 (seam deferred); FR-106/110; NFR-S04; NFR-P02 |
| CT-04 | FR-110/100/101/104/092; NFR-R03 |
| CT-05 | FR-106/120; NFR-S04 |
| OP-01 | NFR-P03/P05; CF-02; FR-001/002/005; OS-7 |
| OP-02 | NFR-P01/P02; TU-11 |
| OP-03 | FR-110/102/104/100/101; NFR-I03; CT-04 |
| OP-04 | FR-106; NFR-R02; CT-05 |
| OP-05 | NFR-R01/R02 |
| OP-06 | NFR-T01; NFR-S01; FR-104 |
Unbacked items: CL-04 only (flagged above). Every OS-excluded capability is represented solely by deliberate absences (GU-05, CF-03) and redirecting copy (design stance), never by controls.
End of External Design v0.1. Next document (internal design) must decide the prikk integration seam within CON-1/UD-02, define the stikk-export-v1 schema promised by CT-02, and bind the action-id catalogue referenced by CF-03/TU-05.