Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

stikk

stikk is a history browser and workbench for the prikk version control system — a terminal (TUI) front-end, with a graphical (GUI) one planned, over one shared operation layer. The name is Norwegian for to set a course, to take a bearing.

Its founding property, from which the whole design follows: stikk owns no repository authority and no secrets. Every repository fact is re-derived from prikk, and prikk — never stikk — reads signing key material. Its stance mirrors prikk’s own: where prikk refuses, stikk explains.

Reading paths

Status

0.21.x is readable on light and dark terminals, works with text made much bigger, and lists what you can do where you are. It undoes a block, as a new change that puts back what it changed, chooses whose keys a repository trusts, gets an earlier version of your files back — or a whole earlier block, the guide shows how — and installs in two plain steps on every platform, prikk’s then stikk’s, against prikk 0.58.0. A confirmation that asks you to type a key id back never cuts that id off, however long it is. It is on the AUR as stikk and stikk-bin: Install says which to pick. Each program installs itself: one line installs stikk, and it prints prikk’s own install command rather than installing prikk; t lists the maintainer keys this repository trusts, where Enter adopts a key or removes this key — each confirmed by typing the key id, and a removal says first what it can cost your own history at Verify; Enter on a file in Block detail saves this file, or saves every file at this block, outside the repository and never over anything already there; a bundle card says which adopted key each recorded sealer names; Exchange opens a bundle file (o) and shows prikk’s verification and what importing would change, imports this bundle as a received branch and exports a branch to a bundle file, both from Enter; Merge brings one branch into another where prikk’s own plan proves the two sides confluent; Verify (v) shows prikk’s verdict on whether the repository is sound; and Compare reaches any two points, including any two refs. Every repository string is still shown as it is. The security-critical layers (shared model, prikk seam, state layer), the interactive TUI (shell + Orientation, built on ratatui — RFC 001), History + Block detail (RFC 006), the refusal-explanation and glossary surfaces (RFC 007), worktree Changes (RFC 008) and the Queue view (RFC 028) are all implemented and tested; every seam read runs off the UI thread (RFC 010), and config/state resolve per platform on Linux, macOS, and Windows (RFC 012). stikk can commit a worktree capture into prikk’s active queue (RFC 014) and seal that queue into permanent, MAINTAINER-signed history (RFC 016) — both behind preview-first, tiered-confirmation machinery that makes skipping a step a compile error, not a review finding (RFC 013). At prikk ≥ 0.39 commit is unavailable, with prikk’s reasons, when prikk says it would refuse (RFC 027), and the seal confirmation names the patches it freezes (RFC 028); a confirmed commit authors only the worktree its preview showed (RFC 030). stikk notices a change made outside it — a commit, seal or branch switch in another terminal — when the terminal regains focus or within five seconds while idle, refreshes what is on screen, says “repository changed outside stikk — refreshed”, and makes an open confirmation stale at once; r refreshes in place, and every refresh re-reads the ref its own screen shows (RFC 031). The Changes view and commit’s confirmation say what a commit will author: a prikk mv whose two halves prikk lists is shown as one declared rename and counted, a declaration prikk will not author as a rename is named instead, and a ref with no published history is named as one rather than shown against a baseline it does not have (RFC 032). A declaration’s fate is prikk’s own verdict at prikk ≥ 0.44 rather than stikk’s inference, one prikk would refuse makes commit unavailable, a checkout that stopped part-way is shown, and a ref with no published history reads again on prikk 0.45 and 0.46, where prikk refused it by name (RFC 034). Piped/CI invocation keeps the one-shot orientation. stikk targets prikk ≥ 0.28, validated through 0.58.0, and on prikk 0.42 opens on prikk’s current branch (RFC 029). Patch detail (FR-030) is built at prikk ≥ 0.39 (RFC 035): Block detail lists a block’s patches and the Queue lists the queued ones, and either opens one patch’s operations — 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 the key that asserted it — with f showing prikk’s own fields, and content shown byte for byte: quoted, with everything that does not show as itself escaped. Every string stikk did not write is now rendered so that what you read is what prikk reported (RFC 036): a bidirectional override, a zero-width character or a look-alike space in a path, message, ref name or key id is written as its escape, in every view and in the one-shot printout, and two different names never look alike. Block detail lists the files at any block, with their modes, and the ref picker offers the branch you are on before its first seal (RFC 037, prikk ≥ 0.46 and ≥ 0.47). Compare (FR-033, delivered in full) is built at prikk ≥ 0.46 (RFCs 038 and 041): m and d in History, d in Block detail and in Changes, and m and d in the ref picker for any two branches, tags or received refs — showing what changed between two points in prikk’s own diff hunks, quoted line by line, with stikk computing no difference of its own. Verify (v, FR-100 in part) shows prikk’s verdict on whether the repository is sound, its failing conditions and its stages, at prikk ≥ 0.39 (RFC 040), and names what prikk’s JSON leaves out. stikk manages branches and tags, not only browses them: from the ref picker, Enter offers new branch at its tip, new tag at its tip (or at any block, from History), close this branch and switch to this branch — each previewed before it runs, a switch as the exact files it will write and delete, with the branch you are standing on never offered for closing and a branch the queue holds work for never offered for switching (RFCs 044 and 045, prikk ≥ 0.42 and ≥ 0.46). stikk reopens each repository where you left it (FR-122, RFC 046): the focused ref, the top-level view and the untracked filter, re-checked against prikk before any of it is shown and stored outside every repository — STIKK_PRIVATE=1 for a launch that remembers nothing, and deleting the records is always safe. stikk merges one branch into another (RFC 047, prikk ≥ 0.42): mark the branch to merge from in the ref picker, select the one it goes into, merge plan shows prikk’s own plan for the pair against a baseline stikk names only where it can prove it, and Enter on the plan runs the merge where it proves the two sides confluent — previewed with every guard re-read at the moment you confirm, never into the branch you are on, and writing nothing to your worktree. stikk shares work as a bundle file (RFC 050, prikk ≥ 0.53): o opens one and shows prikk’s own verification and what prikk says importing it would change against your branch of that name, import this bundle brings it in as remotes/<name> — read-only history beside your own, declined where it would change nothing or move that branch back — and export it to a bundle file writes a branch out outside the repository, never over one that is already there. stikk gets an earlier version of your files back (RFC 053, prikk ≥ 0.54): in Block detail, Enter on a file saves it as it was at that block, or saves every file at it into a new folder — always outside the repository and never over an existing path, both refused in stikk’s own words before prikk is asked, with nothing in the repository or the worktree changed. stikk shows which keys a repository trusts (RFC 054, prikk ≥ 0.54): t lists the adopted maintainer keys with your own marked, and a bundle card says which of them, if any, each recorded sealer’s id names — a name, not a signature, which Verify checks after the import. stikk chooses them, too (RFC 056, prikk ≥ 0.54): Enter adopts a key, or removes the selected one, each previewed and confirmed by typing the key id — stikk’s first typed confirmations, and neither needs a key of your own. The remove card says that removing a key which sealed this history makes Verify fail it until the same key is adopted again under the same id, and says so again for your own key; an id already trusted under a different key is shown as the security event it is, with both public keys and nothing to confirm. Sync, and checkout of a block or a path, remain unbuilt; adopting a received tag and author keys, and a doctor/lock-inspector view, are named gaps too.

Install

stikk needs two programs: prikk (the version control system itself) and stikk (this program, which shows you what is in a prikk repository). Neither needs a compiler — both ship as ready-to-run files, and each one installs itself: prikk’s installer installs prikk, stikk’s installs stikk.

Two commands, in order. If you have never used a terminal, start here.

Opening a terminal

A terminal is a window where you type commands instead of clicking. Every command on this page is typed there, one line at a time, each followed by Enter.

  • macOS — press ⌘ Space, type Terminal, press Enter.
  • Windows — press the Start button, type PowerShell, and open Windows PowerShell.
  • Linux — open your Terminal application (on GNOME: press the Super/Windows key and type Terminal).

Step 1 — install prikk

prikk is the version control system; stikk reads the repositories it makes. prikk publishes its own installer, and prikk’s install guide is the authority on it.

Linux and macOS:

curl -fsSL https://github.com/prikk-vcs/prikk/releases/latest/download/install.sh | sh

Windows, in PowerShell:

irm https://github.com/prikk-vcs/prikk/releases/latest/download/install.ps1 | iex

Check it worked:

prikk --version

stikk works with prikk 0.28 and above. With an older prikk it opens your repository read-only and says so, rather than changing anything it has not been checked against. A prikk newer than the one this stikk was tested against works normally; stikk just tells you its output has not been checked rather than assuming it has.

Step 2 — install stikk

Linux and macOS:

curl -fsSL https://github.com/prikk-vcs/stikk/releases/latest/download/install.sh | sh

Windows, in PowerShell:

irm https://github.com/prikk-vcs/stikk/releases/latest/download/install.ps1 | iex

It downloads stikk, checks it against the checksum published beside it, installs nothing if that check fails, and puts stikk somewhere your terminal can find it. It installs only stikk — it checks whether prikk is there and new enough, and tells you prikk’s own command if it is not.

What you should see

stikk-install: downloading stikk-0.21.0-x86_64-unknown-linux-musl.tar.gz (0.21.0, x86_64-unknown-linux-musl)
stikk-install: checking the download
stikk-install: extracting
stikk-install: installed to ~/.local/bin/stikk
stikk-install: added ~/.local/bin to PATH in ~/.bashrc
stikk-install: open a new terminal, or run: . ~/.bashrc
stikk-install: prikk is already installed: prikk 0.58.0
stikk-install: that is inside the range this stikk was tested against (0.28 through 0.58)

stikk-install: done. Next:
stikk-install:   1. open a new terminal (PATH changed)
stikk-install:   2. make a repository:  prikk init
stikk-install:   3. open it:            stikk

The exact versions will differ. If it says PATH changed, open a new terminal before carrying on: your terminal looks for programs in a fixed list of folders, and it reads that list when it starts. On Windows there is no such step — stikk works in the same window straight away.

Then make a repository and open it:

prikk init
stikk

Press ? inside stikk for help, and q to leave.

Arch Linux

On Arch Linux and its derivatives, stikk is on the AUR as two packages. Pick one:

  • stikk-bin — the prebuilt binary from the release, the same file Step 2 installs. Nothing is compiled.
  • stikk — built from source on your machine, from the crate published on crates.io.

They install the same program and cannot both be installed at once. Either one brings in prikk’s own AUR package as a dependency, so you get both programs.

With makepkg, which needs nothing else installed:

git clone https://aur.archlinux.org/stikk-bin.git
cd stikk-bin
makepkg -si

An AUR helper does the same in one line — stikk needs none in particular, and names none as required.

Updating is the route you installed by: makepkg -si again in a fresh clone, or your helper’s upgrade. Removing is pacman -R stikk-bin (or stikk), which leaves prikk and your repositories alone.

Updating

Run each program’s install line again. Both installers overwrite what is there, so running them twice is safe.

Removing

Each program removes itself, the same way it installed itself:

curl -fsSL https://github.com/prikk-vcs/stikk/releases/latest/download/uninstall.sh | sh
irm https://github.com/prikk-vcs/stikk/releases/latest/download/uninstall.ps1 | iex

That removes stikk and the PATH entry it added, and nothing else — not your repositories, which stikk never writes to. To remove prikk, use prikk’s own uninstaller.

If Windows says Smart App Control blocked stikk or prikk

Smart App Control is a Windows 11 feature that blocks programs it cannot confidently recognise. Neither stikk nor prikk is signed with a paid code-signing certificate, so on a machine where Smart App Control is switched on, either of them may be refused.

There is no per-program exception for it. Microsoft’s own page explains what the feature does and what your options are: What is Smart App Control? That decision is yours and Microsoft’s; this guide does not advise turning a security feature off.

By hand (advanced)

You do not need this section if the commands above worked.

A file you download in a browser is marked by macOS and by Windows, which will then warn about it or refuse to run it, because stikk is not signed. The one-line commands above do not leave that mark, which is why they are the easy path. If you download by hand anyway, the two notes below clear it.

The archives are on the latest release. Each has a second file beside it ending in .sha256 — a checksum, a short fingerprint you can use to tell the file arrived exactly as published.

Your computerFile
Linux, Intel/AMDstikk-<version>-x86_64-unknown-linux-gnu.tar.gz
Linux, Intel/AMD (older systems, or Alpine)stikk-<version>-x86_64-unknown-linux-musl.tar.gz
Linux, ARMstikk-<version>-aarch64-unknown-linux-musl.tar.gz
Linux, ARM (glibc 2.39 or newer)stikk-<version>-aarch64-unknown-linux-gnu.tar.gz
Mac, Apple Silicon (M1 and later)stikk-<version>-aarch64-apple-darwin.tar.gz
Mac, Intelstikk-<version>-x86_64-apple-darwin.tar.gz
Windowsstikk-<version>-x86_64-pc-windows-msvc.zip

Replace <version> with the version on that release page, and <file> below with the name from the table.

The musl files are statically linked: they carry everything they need and run on any system of that architecture. The gnu ones are smaller but need a system at least as new as the one they were built on — on ARM that means glibc 2.39, which Debian 12, Raspberry Pi OS bookworm and Ubuntu 22.04 do not have. The one-line installer takes the musl file on both architectures for that reason; pick a gnu file only if you know your system is new enough.

Linux and macOS. Download both files, check the one against the other, unpack, and install:

curl -fLO https://github.com/prikk-vcs/stikk/releases/latest/download/<file>
curl -fLO https://github.com/prikk-vcs/stikk/releases/latest/download/<file>.sha256
sha256sum -c <file>.sha256

On macOS that last command is shasum -a 256 -c <file>.sha256 instead. Either prints <file>: OK. If it says FAILED, stop and download again — do not run the file. Then:

tar -xzf <file>
mkdir -p ~/.local/bin
install -m755 stikk-<version>-<target>/stikk ~/.local/bin/stikk

If ~/.local/bin is not already on your PATH, add export PATH="$HOME/.local/bin:$PATH" to your shell’s startup file and open a new terminal.

macOS, if you downloaded in a browser. macOS marks browser downloads and refuses to run an unsigned program that carries the mark. Either open System Settings → Privacy & Security and press Open Anyway after the first refusal, or clear the mark yourself:

xattr -d com.apple.quarantine ~/.local/bin/stikk

Windows, in PowerShell. There is no sha256sum here, so you compare the fingerprint yourself:

Invoke-WebRequest -Uri https://github.com/prikk-vcs/stikk/releases/latest/download/<file> -OutFile stikk.zip
Invoke-WebRequest -Uri https://github.com/prikk-vcs/stikk/releases/latest/download/<file>.sha256 -OutFile stikk.zip.sha256
if ((Get-FileHash stikk.zip -Algorithm SHA256).Hash -eq (((Get-Content stikk.zip.sha256 -Raw).Trim() -split '\s+')[0])) { "OK" } else { "FAILED - do not use this file" }
Expand-Archive stikk.zip -DestinationPath .

Move the stikk.exe that leaves behind into a folder on your PATH.

Windows, if you downloaded the zip in a browser: unblock it before extracting. The mark travels from the zip onto stikk.exe when Explorer extracts it, and then Windows warns every time you start the program. Right-click the zip → Properties → tick Unblock → OK, or:

Unblock-File stikk.zip

Start stikk from PowerShell rather than by double-clicking it: it is a terminal program and has nothing to show in a window of its own.

Do not download install.ps1 and run it as a file. A downloaded script is marked too, and PowerShell’s execution policy then refuses to run it. The irm … | iex line above is not a file and is not refused.

Optional: check who built it

The checksum proves the file was not altered on the way to you. It does not prove who built it. If you want that too, and you have GitHub CLI:

gh attestation verify <file> -R prikk-vcs/stikk

It exits successfully when the file really was built by this project’s release workflow, and fails otherwise.

If you already use Rust

cargo install stikk

This compiles stikk from source, so it takes a few minutes and needs a Rust toolchain (2024 edition, MSRV 1.88). To download the same prebuilt binary the installer uses, without compiling:

cargo binstall stikk

The one-line installers above need neither.

Next

Getting started opens a repository and walks through what stikk shows you.

Getting started

stikk is a front-end for the prikk version control system. It does not replace prikk’s own command line — VCS verbs stay prikk’s — it helps you read and work with prikk history.

Install

Install has the one-per-platform steps for getting a working stikk and prikk without a compiler. In short: run prikk’s installer, download stikk’s archive for your platform, check it against the published checksum, and put it on your PATH. Rust users can cargo install stikk instead.

This page assumes both are installed and starts from there.

Point stikk at prikk

stikk drives the prikk binary. If prikk is on your PATH, nothing is needed. Otherwise, point at a specific build:

export STIKK_PRIKK_BIN=/path/to/prikk

stikk requires prikk ≥ 0.28 and is validated through 0.58.0. A prikk below the floor degrades to read-only where it can; a prikk above the validated ceiling still runs, but Orientation says its output shapes have not actually been checked against it, rather than silently assuming they have.

One known upstream limitation at the floor, on Windows only: prikk 0.28 cannot commit a file that lives in a subdirectory when running on Windows — its worktree scan builds the repository path with the platform separator and its own path validator then refuses the backslash (invalid name: backslashes are not allowed in repository paths). This is prikk’s, not stikk’s, and prikk fixed it in 0.29.0; on Windows, use prikk ≥ 0.29. Every other supported version is unaffected, and so is 0.28 on Linux and macOS. stikk’s real-binary suite covers this combination explicitly rather than skipping it quietly.

Open a repository

stikk /path/to/repo

On a terminal this launches the interactive TUI: an Orientation view — the prikk version and whether stikk supports it, the queue depth, your signing readiness, and the capability that readiness gives you — inside a shell with a status bar and a Help overlay. Run it inside a repository with no argument and stikk discovers the repository root by walking upward for a .prikk directory, the same way prikk does.

A checkout that stopped part-way — prikk’s own term for a materialization it did not finish — is named in Orientation in prikk’s words, on prikk ≥ 0.43. While it stands, commit’s preview is blocked; History and Changes keep working.

Where stikk opens. On prikk ≥ 0.42, stikk opens focused on prikk’s current branch, and when you choose another ref the status bar shows prikk’s default beside it. Below 0.42, or when prikk reports its current branch unresolved, stikk opens on heads/main if that is published, and otherwise with no ref focused and the ref picker open. Choosing a ref in stikk never moves prikk’s current branch and never touches the worktree. c commits to prikk’s current branch, because that is where your folder’s files belong; to commit to another branch, switch to it first: b, then the branch, then Enter and Switch to this branch.

Key reference

A letter means one action, in either case — Caps Lock on is the same keyboard. Every action stikk has is in one catalog, and these are the ones with a key of their own; the rest are found by name.

KeyWhat it does
Enterwhat can be done here: the actions for the selected row, then the screen’s
→open the selected row — the first of those actions, at once
Esc, qback; at the root, quit
←back, and never quit — at the root it does nothing
↑ ↓, k jmove the selection; in a card, read on
?the glossary and this key list
:every action, by name
bbranches and tags
wchanges in the worktree
ppatches waiting to be sealed
vverify the repository
tkeys this repository trusts
oopen a bundle file
ccommit worktree changes
sseal the active WAL
rrefresh — re-read from prikk
dcompare
mmark it, to compare
fprikk’s own fields
ushow untracked files
Spaceacknowledge, inside the card that asks

Everything else is found by name. Press Enter on a row for what can be done with it — switch to this branch, new branch at its tip, new tag, close this branch, export it to a bundle file, import this bundle, adopt a key, remove this key, undo this block, save this file, save every file at this block — or : for the whole list, including Recent refusals and Background operations. An action you cannot run now is still listed, dimmed, with the reason.

Where each key applies. d, m, f and u belong to a screen or a row, and the key line above the status bar lists the keys you have wherever you are: it names them so that you never have to remember which. r refreshes Orientation and the screen you are on — History, the Queue, Changes, the tip’s Block detail, a Patch detail opened from the Queue, or Verify (which re-runs it) — in place, each view staying visible while its read runs, and re-reading the ref that screen shows, which need not be the ref you have focused.

Is the repository sound? v runs prikk’s own verification and shows what prikk said: the verdict, every condition prikk is currently failing in prikk’s own words, and every stage prikk ran with its status. f shows prikk’s own JSON report and r re-runs it — a verdict is about the moment it was taken, so stikk never shows you a cached one. Verify changes nothing: it repairs nothing, clears no lock, and never runs on its own, because it scans the whole repository.

prikk’s JSON report does not say which objects or refs failed, or how many signatures could not be verified — those live only in prikk’s prose output. Verify says so on every report, sound or not, and names the command to run for them. stikk does not parse that prose. Below prikk 0.39 stikk has no report to read, and says that rather than reporting a repository it never checked as sound.

When another terminal changes the repository. stikk checks for a commit, seal or branch switch made outside it — when your terminal reports that you have come back to it, and every few seconds while stikk is idle. When it finds one it refreshes what is on screen and says “repository changed outside stikk — refreshed”, and a commit or seal confirmation that is open becomes stale at once, so nothing armed survives a change it was not built for. The check is silent otherwise: it never appears among background operations. Its limit: editing a file in your worktree is not a repository change, so it is not caught this way — r, opening Changes, or pressing Enter on a confirmation catches that.

Two things the Changes view says that prikk’s own report does not. A file moved with prikk mv is listed by prikk as one missing path and one untracked path; stikk marks them as the two halves of one declared rename and counts renames N, because that is the single operation a commit will author. On prikk ≥ 0.44 that verdict is prikk’s own — prikk states for each declaration whether it will be authored as a rename, as a deletion, or refused, and stikk shows what prikk said rather than inferring it from which halves are listed; below 0.44 stikk still infers. A declaration prikk says it would refuse makes commit unavailable, with prikk’s refusal in prikk’s words, even on a worktree prikk otherwise calls clean. And when the ref has no published history — nothing sealed on it yet — stikk says so in place of “against baseline”, since there is no baseline to compare against: a commit would be the ref’s first, or, once patches are queued for it, those queued patches are its baseline.

Run stikk piped or in CI (no terminal) and you get the same orientation as a one-shot print instead. To see the TUI with no repository at all: cargo run -p stikk-tui --example orientation_demo (also see history_demo, explanation_demo, and changes_demo for the other views, all scripted — no prikk binary or repository needed).

Patch detail is built, at prikk ≥ 0.39. Open a block from History and its patches are listed: Enter on one shows what it changed — 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 the key that asserted it. f switches to prikk’s own fields. The Queue opens a queued patch the same way.

File content is shown quoted, one row per line, with the line’s own newline inside the quotes: " let x = 1;\n". That is deliberate — a span edit is very often a whitespace edit, and a renderer that tidied the spacing would show a re-indent, a tab turned into spaces or a removed trailing newline as no change at all. Inside the quotes the spelling is prikk’s own JSON, and it covers every character that does not show as itself: a tab is \t, a line ending \n, and anything invisible or direction-changing — a zero-width character, a non-breaking space, a bidirectional override — is written as \uXXXX. Visible text stays as itself. Two lines that differ in any byte never look alike, which is the whole point of showing content this way; the Glossary (?) names the notation. A binary file’s create or delete shows its blob id and byte count, never its bytes.

Three more things it says rather than guesses: content past stikk’s display bound is cut with the withheld byte count stated; where prikk resolves no path for an operation it says so and names prikk’s node id — which also happens for a sealed patch inside a block of several, where prikk resolves paths at the block’s end, so a path there is labelled as at the end of this block; and if the patch list itself cannot be read, the rest of the block is still shown with the reason in its place.

Compare: what changed between two points

d opens Compare (prikk ≥ 0.46), which shows what changed between two points in prikk’s own diff hunks. What it compares depends on where you press it:

  • In History, m marks the selected block — the row shows a ● and the title says a mark is set — and d then compares the marked block with the selected one, older first whichever you marked first. m on the marked block again clears the mark.
  • In History or Block detail with nothing marked, d compares the block with the previous block in this ref’s history: the next older row in the lineage you have loaded. On the oldest row loaded, stikk says there is no previous block in view rather than fetching more.
  • In Changes, d compares the worktree with what commit would author against — the sealed tip plus anything queued, and the heading says how many queued commits that is.

Each differing path gets a section under prikk’s own status word (added, deleted, modified, renamed, mode, binary), with the path as a name. Every line of a hunk is quoted, with the line’s own ending inside the quotes, so a trailing space, a CRLF and a missing final newline are all visible — two lines that differ in any byte never look the same. prikk’s @@ header and its \ No newline at end of file note are prikk’s words and are not quoted. A rename names both paths, a mode entry shows both modes, and a binary entry shows both sizes and content ids — never bytes. ↑/↓ move between entries and f shows prikk’s own fields for the selected one.

stikk computes no part of a comparison: it does not renumber, re-hunk or infer a rename. Where prikk says its hunks are not the shortest edit script, stikk says so too. Below prikk 0.46, Compare says that stikk compares from 0.46 on and asks prikk nothing.

To compare two refs, open the ref picker with b, put the cursor on one ref and press m to mark it, then move to the other and press d. The marked ref is the left side and the selected one is the right, and the heading says which is which — two refs have no lineage order, so stikk states the one you chose rather than inventing one. Beside each ref the heading names the block prikk resolved it to, because a ref can move and a block cannot; r re-runs the comparison against wherever the refs point then, and those block ids change with it.

A second m on the marked row clears the mark, and the picker’s title says when one is set. The mark survives closing and reopening the picker — that is where you choose both halves of a pair — and is forgotten the moment you focus a different ref, because a stale pair is worse than none.

Every ref the picker lists can be a side: branches, tags, and received refs (remotes/…), which prikk compares without adopting them. The branch you are on before its first seal cannot: it has no block for prikk to compare, so m and d there say so and point you at w then d, which compares your worktree with what commit would author against.

Getting an earlier version back

You broke a file and want the version from before. Open its block in History, and stikk writes it out for you — outside your repository, so nothing you have now is touched. Needs prikk 0.54 or newer.

Open History with Enter, put the cursor on the block you want and press Enter again: that block’s detail lists its patches and then its files. ↓ walks down through both.

  • Enter on a file, then Save this file, as it was here, saves that file as it was at that block.
  • Enter, then Save every file at this block, saves all of them into a new folder.

Either way stikk suggests a destination beside your repository — a-f687c8ff7394.txt for a file, <your repository>-f687c8ff7394 for a folder — and you can type another. The card then names the block, what is being saved, how big it is, and exactly where it goes. Nothing is written until you press Enter.

stikk will not write inside your repository, because the copy would sit in your worktree as untracked files and your next commit would capture them; and it will not write over anything that is already there. Both are refused before prikk is asked, with a sentence saying what to do instead.

Two things the card tells you when they apply. Saving one file keeps its bytes but not its execute permission, so a script comes back needing chmod +x — saving all of them keeps it. And where prikk has no trusted checkpoint in reach it replays the files from the start of history and says so: the copy matches that history, but nothing has checked the history itself. v does that.

Nothing in your repository or your worktree changes. To actually use what came back, copy what you want into your worktree yourself and commit it — which is also the honest answer while stikk cannot take a change back for you.

Going back to an earlier block

The last section is for looking at or copying an old version: saving a file, or all of them, writes outside your repository and changes nothing. This one is for working from an earlier block — having its files in your worktree and carrying on from there.

prikk writes no block id into a worktree: a checkout needs a branch, and a branch cannot be created straight from a block id. The route that works is three steps, each one a key stikk already has:

  1. Enter on the block — in History, or in its detail — then New tag at this block. Give the tag a name you can live with (see below).
  2. Enter in the ref picker (b), with that tag selected, then New branch at its tip.
  3. Enter in the ref picker, with that branch selected, then Switch to this branch.

What each step writes. The tag and the branch are published names: they are part of the repository and anyone you share it with will see them. The switch is the step that touches your files — its card lists every file it will write and every file it will delete before anything happens, so read that list rather than the branch name. Afterwards your worktree is that block’s, and stikk says which branch you are on now.

The switch refuses while you have uncommitted changes, or queued work for another branch, and the card says which. Commit or seal first, or switch somewhere else.

What it leaves behind: the tag. stikk offers no way to remove a tag, and prikk’s own deletion of one does not exist — so the name you choose is the name that stays. Something like tags/before-the-rewrite is kinder to read later than tags/tmp.

Going forward again is the same third step: select your original branch in the ref picker, press Enter and choose Switch to this branch.

If what you want is to take a change back, see Undoing a block below. That one records the reversal as a new change instead of moving you to an older one.

Undoing a block

You sealed something and it was a mistake. Undoing a block puts back what it changed, as a new change on top of it. Needs prikk 0.54 or newer.

Open History, put the cursor on the block you regret, press Enter and choose Undo this block. It works from the block’s detail screen too.

  1. The message. stikk fills in Undo: <the block's own message>; edit it if you like. This is what prikk log will show for the undo.
  2. The card. It lists every file, one line each, with what will happen to it: put back, remove, rename back, put back the permissions. Read that list — it is the whole of what will change. Enter does it; Esc walks away and changes nothing.
  3. Seal it. The undo is an ordinary commit, so press s when you are ready for it to become part of the history.

Nothing is erased. The block you undid is still there, and so is the undo — History shows both. That is the difference from going back to an earlier block, which moves your worktree to an older block and records nothing at all.

When stikk will not do it, each with a sentence saying what is in the way:

  • your worktree is not clean — commit or remove your changes first. Two reasons, not one: the undo must not overwrite what you are working on, and a new file lying around would be recorded as part of the undo, because a commit here captures the whole worktree. So an untracked file anywhere stops it, not only one in the way;
  • work is waiting to be sealed — seal it, so the undo is recorded after it;
  • a later block changed one of the same files — undoing this one would throw that later change away, so stikk names the file and stops;
  • the block is a merge, or the first block on the branch — there is nothing single to go back to;
  • something is already where the undo would put a file back — stikk names it rather than replacing something it did not put there. This looks at your folder itself, so it sees a file even where .prikkignore hides it;
  • a file the undo would put back is named in .prikkignore — the commit would not record it, so the undo would not be complete. Remove that line first;
  • the block changed .prikkignore itself, and would put files back as well — undo that block on its own first, so the rules are settled before the files;
  • the block changed no file at all — there is nothing to put back;
  • you are looking at another branch’s history — undo works on the branch you are on; switch to it first.

If something fails part-way — prikk refuses the commit, or a file cannot be written — stikk stops at once, commits nothing, and tells you exactly which files it had already changed. w shows them, and you decide what to do next. It never tries again by itself.

Sharing work

Two people share prikk history by bundle files. One exports a branch to a file, sends it any way they like — prikk moves no bytes over a network — and the other checks it, sees what it would change, and imports it. Needs prikk 0.53 or newer.

To export, open the ref picker with b, put the cursor on one of your own open branches, press Enter and choose Export it to a bundle file. stikk suggests a name beside the repository (<branch>-<short tip>.bundle), which you can edit. stikk will not write inside the repository — the bundle would sit in your worktree as an untracked file, and your next commit would capture it — and will not write over a file that is already there. Tags, received refs, closed branches and a branch with nothing published are each declined, with the reason, before anything runs.

To open a bundle someone sent you, press o anywhere a repository is open and give the path. stikk shows two things:

  • prikk’s verification, word for word, including prikk’s own caveat that it checks structure only — a verified bundle is not yet a trusted one;
  • what importing would change, against your branch of the bundle’s own name: new here, nothing in common with yours, already held, would bring yours forward, or both sides have moved on — applying cleanly, conflicting (with prikk’s reason), or undetermined. The files that would change are listed, and so are the key ids recorded in the file with prikk’s note that recording a key is not trusting one.

Nothing is written by opening a bundle. If prikk will not read the file, you get prikk’s reason and nothing else.

To import it, press Enter on that view, choose Import this bundle, and confirm. The bundle is stored as a received branch — remotes/<name>, read-only history beside your own. No branch of yours is created or moved, nothing is written to your worktree, and nobody’s signing key is trusted by it. Afterwards stikk takes you to that branch’s history, which is where what arrived can be read.

stikk declines two imports prikk allows. If the bundle is one you already received, importing changes nothing and stikk says so. If it is older than what you received — a stale file in a downloads folder is the ordinary way to get one — prikk would quietly move the received branch back to the older block and report an ordinary import; stikk declines instead and tells you why. Where your received branch is longer than stikk reads, it says it cannot tell rather than guess, and names prikk bundle import for doing it anyway.

Taking received work into a branch of yours is not in stikk yet. A received ref cannot seed a branch, and adopting one is a merge: prikk merge --from remotes/<name> does it today.

Whose key sealed it, and what that is worth

A bundle records the key ids that sealed what is inside. Beneath each one stikk says which adopted key, if any, that id names — names a key this repository trusts, names your key, or not trusted by this repository — with prikk’s own note still beneath them: recording a key is not trusting one. Needs prikk 0.54 or newer; below that you get prikk’s ids and note alone.

A name is not a signature, and the card says so. A bundle records the id its sealer chose and nothing to check it against, so anyone can seal under an id you trust and the preview will still read clean. Import it, then press v: verifying is where prikk checks each signature against the key trusted here, and a seal that does not verify fails the check.

None of this stops an import. An untrusted sealer is a fact about what you are looking at, not a refusal — received branches exist precisely so history you have not vouched for can sit beside your own, where v can check it.

t shows the keys this repository trusts, anywhere a repository is open: each key’s id and public key, with your own marked. Adopting a key means prikk accepts that key’s signatures on what it signed; it never lets the key move one of your branches. Where nothing is adopted, the view says so and gives prikk’s own command — and the one caution worth repeating: get the public key from its owner, not from a bundle they sent.

Adopting and removing keys

From the Trust view, Enter offers Adopt a key and Remove this key for the one you have selected. Each is previewed and confirmed by typing the key id, which is stikk’s most deliberate confirmation: nothing here happens by a stray Enter. Neither needs a signing key of your own. Needs prikk 0.54 or newer.

Adopting asks for the public key first, then for the id it signs under — prefilled with the id prikk would give that key, which you can change if its owner signs under another. Get the public key from its owner, not from a bundle they sent: a bundle names a sealer and proves nothing, which is the whole reason this page says so twice.

If the id you give is already trusted under a different key, stikk stops and shows you both. Two keys cannot share an id, because an id travels in every signature. If its owner really has a new key, they must sign under a new id and you adopt it under that one. If they did not tell you they changed keys, treat the key you were given as someone else’s.

Removing is the one to read slowly. If the key you remove sealed blocks in this repository, Verify will fail them until the same key is adopted again under the same id — stikk cannot say how many blocks that is, because prikk does not report which key sealed each one, so the card says if. Nothing is lost: adopt the key again, under the same id, and Verify passes again. And removing your own key means you cannot seal here until it is adopted back. prikk keeps at least one trusted key, so the last one cannot be removed at all.

After either, stikk shows prikk’s own words and the list as it now stands. After a removal, press v to see what Verify says.

Capability and signing

What you can do is derived from which signing keys are ready in your environment, not from any account stikk keeps:

Where stikk gets the answer depends on your prikk, because prikk changed how signing keys are configured at 0.40:

your prikkstikk asks
≥ 0.41prikk itself, with prikk key status — including whether the key matches what this repository already records
0.40 exactlynothing it can trust. 0.40 moved keys to a key directory and shipped no way to ask about them, so stikk reports signing readiness as unknown, says why, and points at 0.41
≤ 0.39the environment, as presence only: PRIKK_<ROLE>_KEY_ID and PRIKK_<ROLE>_SEED both set

What that readiness grants is the same on every version:

  • No keys → Viewer (every read surface).
  • AUTHOR ready → Author (can queue commits and rollback drafts).
  • MAINTAINER ready → Maintainer (can seal, merge, publish refs and tags).
  • STIKK_READ_ONLY=1 forces Viewer regardless of keys.

On prikk ≥ 0.40, a PRIKK_*_SEED you exported previously is no longer what signs — 0.40 refuses it and 0.41 ignores it in favour of the key directory. stikk says so when it sees one still set, because it is easy to believe otherwise.

stikk reads only the presence of these variables. It never reads a seed’s value — prikk reads seeds itself when it signs. Your keys never enter stikk.

What stikk remembers

stikk reopens each repository where you left it: the ref you had focused, which of Orientation, History, Changes and the Queue was open, and whether the untracked filter was on. Nothing else — no file contents, no object ids, no messages. Names and flags.

Everything remembered is re-checked against prikk before you see it. If the branch you were on has been closed or is no longer listed, stikk opens where it would have opened anyway and says so in one line, rather than showing you a branch that is not there. Verify never reopens by itself: it scans the whole repository, and that is not something a launch should start on your behalf.

The records live beside stikk’s other files — stikk config path prints where — in a sessions/ directory, one small file per repository, never inside a repository. Deleting sessions/ is always safe: you lose your place and nothing else.

To leave no trace of a launch, set STIKK_PRIVATE=1: stikk reads no record and writes none for that run. (STIKK_READ_ONLY=1 is a different thing — it forbids repository changes, and still remembers where you were.)

Colours

stikk writes body text in your terminal’s own text colour, and adds a few colours of its own for labels, headings and warnings. Every colour it adds is readable: at least 7 : 1 against the common terminal backgrounds, light and dark, and against the one your terminal reports.

Set theme in stikk’s config file (stikk config path prints where it is):

theme = system
themeWhat it does
systemThe default. Asks your terminal whether its background is light or dark, once, at startup, and uses plain if it does not answer.
lightThe light palette, with no question asked.
darkThe dark palette, with no question asked.
high-contraststikk paints its own pair over the whole frame — black on white, or white on black where your terminal said it is dark. 21 : 1, whatever your terminal’s own scheme is.
plainNo colour of stikk’s own: everything is your terminal’s text colour. Emphasis stays.

Nothing is ever said by colour alone — every status also carries words or a shape — so plain loses no information.

NO_COLOR. If NO_COLOR is set to anything other than an empty string, system behaves as plain and no question is asked of the terminal. A theme you set in the config wins over it: it is your choice, made later and more specifically.

What stikk is doing, in its own words. The Orientation view has a colours row:

colours     dark background, detected · 256 colours

It says why this palette (detected, from COLORFGBG, from the config, from NO_COLOR, or no answer at all), at which depth stikk is drawing, and — if any — how many of its colours fell back to your terminal’s own because they could not reach 7 : 1 on the background your terminal reported. If the colours look wrong, that row is the line to read out.

Making the text bigger

Most terminals make their own text bigger and smaller, and stikk follows: it works in a window as small as 60 columns by 15 rows, which on a laptop screen is room for text about twice the usual size, or more. If the window is smaller than that, stikk says so and says what to do.

Each terminal’s own documentation is linked, because the keys differ and this page should not be the place you find out that they changed.

TerminalBiggerSmallerWhere the font size is set
AlacrittyCtrl and = (or +) — on macOS, Command and =Ctrl and - — on macOS, Command and -size in the [font] table of alacritty.toml
GNOME Terminal (and the other VTE terminals)Ctrl and +Ctrl and -Preferences → Profiles → Text → Custom font
KonsoleView → Enlarge Font (Ctrl and +)View → Shrink Font (Ctrl and -)Settings → Manage Profiles → the profile’s own appearance
kittyCtrl, Shift and = — on macOS, Command and +Ctrl, Shift and - — on macOS, Command and -font_size in kitty.conf
WezTermCtrl and =Ctrl and -font_size in its config
Windows TerminalCtrl and +Ctrl and -the profile’s font → size
The older Windows console (conhost)see its settings — no key is documentedsee its settingssee its settings
macOS TerminalCommand and + (“Make fonts bigger”)Command and - (“Make fonts smaller”)Terminal → Settings → Profiles → Text → Font: Change
iTerm2View → Make Text Bigger — no key is documentedView → Make Text SmallerSettings → Profiles → Text

Most of these terminals also reset the size, usually with Ctrl (or Command) and 0.

Where a key is not listed above, that terminal’s documentation does not give one — not that it cannot be done. Open its settings and set the font size there.

When the window is still too small

Below 60 × 15, stikk shows this instead of a view:

This window is too small for stikk: it needs 60 columns and 15 rows, and has 48 × 12.
Make the window bigger, or the text a little smaller (often Ctrl and −; on a Mac, ⌘ and −).
Help: https://prikk-vcs.github.io/stikk/ → "Making the text bigger"

It names the size it needs and the size it has, so you know how much is missing. Making the window bigger comes first, because if you made the text bigger you did it for a reason. In a very small window the last sentences are dropped so the first still fits.

At 60 × 15 some of stikk’s cards are taller than the window. Those scroll with ↑ and ↓ — the keys every list in stikk uses — and say so: the title reads “lines 3–14 of 22”, and one line at the foot says “↓ more below”. A card that asks you to confirm something only offers the confirmation once you have read to the end of it, so nothing is ever agreed to while its consequences are out of sight. Until then the card says “↓ read to the end to confirm”.

Launcher utilities

stikk --version           # print the stikk version
stikk config path         # where stikk's config and state live (never inside a repository)
stikk config check [file] # validate the config file; exits non-zero on a notice, for CI

stikk’s own files live in user scope (following the XDG convention: ~/.config/stikk, ~/.local/state/stikk), never inside a repository — so a repository stays byte-identical whether or not stikk ever opened it.

stikk — Requirements Specification

Documentstikk Requirements Specification (business-function level)
Versionv0.2 (draft for review) — v0.1 + project-rules alignment: added NFR-U (progressive disclosure, per “Less is more”), NFR-S07 (threat-model maintenance), CON-6/CON-7 (development workflow, project structure), ASM-4 (rules adoption). No existing IDs changed meaning
Date2026-08-31
Basisprikk 0.27.1 @ 3eb3101, as established by the 2026-08-31 audit (audit-2026-08-31-task-{1a,1b,2,3,4}.md); project rules in .git-exclude/rules/ (RFC lifecycle policy; general/Rust/GUI project instructions)
AuthorityThis document defines WHAT stikk does. Technology, architecture, and UI layout belong to the External Design (task 02) and later documents. Where stikk’s needs exceed prikk 0.27.1, the gap is a numbered Upstream Dependency (UD-xxx), never a silent assumption
ID schemeUC- use case · OS- out of scope · FR- functional req · NFR- non-functional req · CON- constraint · ASM- assumption · UD- upstream dependency. Priorities: Must / Should / Could (for v1)

stikk (Norwegian: to set a course, to take a bearing) is the user-facing tool of the prikk ecosystem: a terminal UI (TUI) and a graphical UI (GUI) over one shared operation layer, for navigating, inspecting, and operating on prikk repositories. Its founding stance mirrors prikk’s own: where prikk refuses, stikk explains. Evidence, witnesses, and refusal reasons are first-class content, not error noise.

0. Terminology: arriving from Git

Readers will bring Git mental models. The mapping below is normative for this document’s vocabulary.

Git conceptprikk / stikk reality
commitpatch (signed atomic change, carries its preimages) queued in the active WAL; commit appends to the queue
push to publishseal — a MAINTAINER-signed block freezes the queue into immutable history
commit hashpatch id / block id (SHA-256 object ids)
author name/email/dateAUTHOR key id + signature. No names, no emails, no dates anywhere (no-clock design, permanent). Messages persist on prikk ≥ 0.32 and were validated-then-discarded below it (UD-01, retired — RFC 015 F2); still no author display name
branchref heads/<name>: a signed RefState chain. Created, listed, closed (never deleted)
HEAD / checkout a branchno HEAD. Below prikk 0.42 there is no current-branch pointer; checkout materializes an explicit ref’s state into the worktree. From prikk 0.42 a .prikk/current-branch file names a default for --ref, moved by prikk branch switch — prikk calls it “a default, never an authority”, and it is not a HEAD. stikk keeps a client-side focused ref either way. From 0.42 stikk opens focused on prikk’s current branch; below 0.42, or with an unresolved pointer, on heads/main only if it is published, and otherwise with no ref focused. Switching stikk’s focus never moves prikk’s (RFC 029)
staging area / indexdoes not exist. Whole-worktree commit; the queue (WAL) is the pre-publication holding area
diffa patch is the diff: typed operations (create/delete/edit-text-span/replace-binary/change-perm) with preimages
mergeevidence → plan → execute, only when proven confluent; otherwise a refusal with typed conflict witnesses. No conflict markers, ever
revertrollback flow: preview → inverse draft → verify → seal (preimage-exact)
rebase, cherry-pick, amend, squashdo not exist; sealed history is immutable (see OS-1)
remote / fetch / pushno network. File artifacts: bundles (whole verifiable subsets) and the 9-step sync negotiation loop; received history lands read-only under remotes/
fsckverify — 14 stages; author-signature outcome is Sound or Unverifiable (both values; Unverifiable is non-blocking and must never read as a pass), or a blocking failure (an error, not a value) — see FR-035
reflogsigned RefState/RefUpdate chain per ref (stronger; append-only)
gc / prunedo not exist (append-only, no-GC store)

1. Stakeholders & Use Cases

1.1 Personas

  • P-1 — Solo developer / evaluator (“Astrid”). Tries prikk on a real side project. Needs the daily loop (change → commit → seal → history) to be legible without memorizing CLI flags, and needs refusals explained in plain language.
  • P-2 — Patch-theory reviewer (“Kenji”). Studies commutation, confluence, and merge evidence. Needs deep, faithful rendering of patches, witnesses, state roots, and lineage — the tool as a microscope, not a simplifier.
  • P-3 — Small-team maintainer (“Marta”). Coordinates 2–8 authors exchanging history over files (shared drive, mail, USB). Owns the MAINTAINER key, the trust policy, sealing, tag adoption, and the sync loop. Release-engineer analog.
  • P-4 — Auditor / security reviewer (“Sam”). Reviews someone else’s repository or bundle. Cares about verify outcomes, signature continuity (TOFU), trust-policy state, and whether received history is safe to adopt. Often works read-only.

1.2 Primary use cases

IDNameNarrative (condensed)
UC-01Open & orientUser opens a local repository; stikk shows at a glance: health (verify summary), refs (local / received / closed), queue depth, worktree state, signing readiness
UC-02Browse historyUser walks a ref’s lineage: blocks in sequence order, patches within blocks, the unsealed queue on top; filters narrow the view
UC-03Inspect a patchUser opens one patch and reads it as a diff: operations, preimages, touched paths, author key, signature status
UC-04Compare two blocksUser selects two blocks (any refs) and sees the state-level difference between their trees
UC-05Review & commit worktree changesUser reviews worktree-vs-baseline changes, then commits the whole worktree into the queue with an AUTHOR signature
UC-06Review queue & sealUser reviews queued patches, then performs the seal ceremony (MAINTAINER key; explicit no-audit acknowledgement)
UC-07Materialize a checkoutUser plans a checkout of a ref (dry-run first), reviews the plan incl. any refusals, then materializes; separately plans/executes deletions
UC-08Manage branchesCreate a branch from a ref; close a branch; set the client-side focused ref
UC-09Manage tagsCreate a tag (with persisted message) targeting a ref or block; list tags
UC-10Roll back sealed historyUser previews a rollback, appends the inverse draft, verifies it, and seals — guided end-to-end
UC-11Merge with evidenceUser picks baseline + two sides, reads the evidence/plan, and executes when confluent
UC-12Understand a refusalAny refused operation opens an explanation: the witness(es), what they mean, what the user can and cannot do next
UC-13Exchange via bundleExport a ref to a bundle; verify a bundle offline; import one and see what arrived (received ref, objects, author keys)
UC-14Run the sync loopstikk walks both sides of summary → compare → have → build → accept → pending → seal, telling the user at each step which file to hand to whom
UC-15Review received history & adoptInspect remotes/ refs and received tags; adopt a maintainer key into trust (TOFU conflicts surfaced); adopt tags; merge received work
UC-16Verify & auditRun verify; browse the 14 stages, per-item findings, and three-valued signature outcomes; export the machine-readable report
UC-17RecoverSurface doctor findings; run the safe WAL-tail repair; inspect held locks with liveness info and clear one after explicit confirmation
UC-18Signing readinessSee which roles (AUTHOR / MAINTAINER) are usable in this session, which key ids are active, and whether the trust policy knows the maintainer key — without stikk ever storing a seed
UC-19Resume a sessionReopen stikk and land where they left off: repository, focused ref, view, filters
UC-20Inspect an artifact offlineOpen a bundle file with no repository present and browse what it claims to contain, with verify-level caveats displayed
UC-21Undo one blockUser picks a sealed block, sees file by file what putting it back would do, confirms once, and the reversal is recorded as a new change — history keeps both

1.3 Explicitly out of scope (v1)

IDExcludedRationale (prikk reality)
OS-1rebase, cherry-pick, amend, squash, reorder, any history rewritingSealed blocks are immutable; no core operations exist; contradicts prikk’s model rather than merely missing
OS-2In-tool conflict resolution, “mark resolved”, conflict-marker editingCore non-goal: merges refuse with evidence; resolution is a future core increment, not a UI feature
OS-3Hunk- or file-level stagingNo staging area exists; commit is whole-worktree (partial commit is UD-06, a core change)
OS-4Remote URIs, network transport, hosting/forge featuresprikk moves no bytes; exchange is file-artifact based by design
OS-5Git interoperability (import/export, .git reading)Not provided by core (history import is a proposed RFC 113 track)
OS-6GC / prune surfacesAppend-only no-GC store; nothing to expose beyond compact (which stikk surfaces under recovery, FR-105)
OS-7Displaying wall-clock times for historyprikk history carries no time. stikk must not fabricate chronology from file mtimes or import times as if it were history metadata
OS-8Direct .prikk/ reading/writing, repairs beyond doctor’s safe surfaceThe store’s layout is prikk’s authority; bypassing it voids every core guarantee
OS-9Multiple worktrees per repositoryOne worktree per repository in core
OS-10Telemetry / usage analyticsTrust-sensitive audience; see NFR-S05

2. Functional Requirements

Notation: each requirement is “stikk shall …”. [M/S/C] = v1 priority. (→ UD-x) marks a dependency on a prikk-core change; the FR text states the shipped degraded behaviour until it lands.

2.1 Repository discovery & opening (FR-001 …)

  • FR-001 [M] Open a prikk repository from a local filesystem path (explicit path, or upward discovery of .prikk/ from the current directory). No remote URIs exist to support.
  • FR-002 [M] On open, present an orientation summary: format acceptance, ref counts (local / received / closed), queue depth per active session, worktree dirty marker, last verify status if known, signing readiness (FR-104). (Read from prikk’s JSON since 2026-10-30, RFC 057, at prikk ≥ 0.43: Orientation is built from status-report-v1, which has carried every field it reads since that version; the prose parser stays for the floor’s band, 0.28–0.42. Nothing a user sees changed but three lines’ wording — the active-patch warning and an interrupted checkout are data in the JSON, with no sentence to show, so stikk words them and carries prikk’s numbers and commands exactly, and current_branch: null becomes stikk’s own “unresolved — prikk doctor can say why”. An equivalence suite leg reads each of five measured states both ways and compares every field.)
  • FR-003 [M] Refuse-and-explain unopenable targets: retired repository formats — prikk’s own migration message is surfaced verbatim and classified Environment, grounded on the stable no longer supports clause (RFC 017 §5, captured live: a real format-2 repository built with prikk 0.19.0, read by 0.33.0; prikk’s message says migration is not supported — there is no prikk migrate, and the classifier’s prior string agreed with itself, never with prikk); missing/foreign directories (classified Environment — confirmed via capture that the no such file arm catches this, not the differently-worded arm originally written for it, which no prikk path ever emits — correct by accident until RFC 017); and version skew between stikk and the prikk core in use (ASM-2).
  • FR-004 [S] Open a bundle file as a first-class read-only object with no repository present: show its declared ref, tip, object/author-key counts, and offline-verify result, always displaying prikk’s caveat that offline verification proves structure, not trust (UC-20).
  • FR-005 [S] Maintain a recent-repositories list (stored outside any repository; CON-4).
  • FR-006 [C] Open multiple repositories side by side (required by the sync loop’s two-sided narrative UC-14; degraded alternative: guided single-side mode).

2.2 History browsing (FR-010 …)

  • FR-010 [M] List a ref’s history in lineage order (block sequence via the RefState chain; patches in sealed order within each block), with the unsealed queue rendered as a visually distinct “not yet history” tier above the tip. Ordering is topological/sequential only (OS-7).

  • FR-011 [M] Present, per block row: block id (abbreviated, expandable), kind (Root/Normal/Merge/Repair/Import), patch count, sealing maintainer key id, update-seq; per patch row: patch id, author key id, purpose (normal/rollback-draft), operation summary (counts by type, touched paths).

  • FR-012 [M] Filter the history view by: ref; author key id; block kind; patch purpose; path touched (exact or prefix). (UD-01 retired at prikk 0.32 — RFC 015 F2) Message filtering is now possible for a repository whose patches carry one, but is not built by RFC 015: it is its own increment (RFC 015 decision 7), scoped against messages that may be absent for any pre-0.32 patch.

  • FR-013 [M] Free-text find over what exists: object ids (prefix), path names, tag names and tag messages, ref names. Content search inside blob bytes is [C] and must be labelled by cost (walks blob data). Amended 2026-11-21 (RFC 061 decision 6): not built. TU-05 claimed a / find key for it; no find exists, and the claim is withdrawn rather than carried as a key that does nothing. It gets its own RFC when wanted.

  • FR-014 [M] Show received refs (remotes/…) in the same browser, visually distinct, read-only, with their trust standing (blocks signed by adopted keys or not) summarized at the ref level. *(Measured 2026-09-13, RFC 026 — the ref picker merges branch list --all and tag list, and stikk_core::history::list_refs de-duplicates the two by name, keeping the tag entry. That guard was written defensively in 2026 against undocumented behaviour, and re-verification found it was doing more than avoiding a duplicate row. At prikk 0.28 the same tag appears in both reads with two different ids — branch list --all reports tags/v1 with its RefState id, tag list reports it with the block id a tag actually points at:

    branch list --all   tags/v1 2c83e0e4437efd08d9b1882bb92f126dcaeb0e22f7d3a3c64e5a48b68dd479ae
    tag list            tags/v1 5a1903a2ccb300cf683cd97dd41aa31ab4d9bc15fe8a36997beaf2af51873fee
    

    Keeping the tag entry is therefore what kept the right id on a row that would have looked correct either way. prikk stopped listing tag refs under branch list at 0.39, so the de-duplication is dead code above that — and it stays, because the floor is 0.28. The real-binary suite asserts the leak in both directions rather than only its absence, so the ≤ 0.38 path is exercised rather than assumed.)*

  • FR-015 [S] Show closed branches on demand (default hidden), rendered as closed, with the closure RefState visible in the chain.

  • FR-016 [S] From any block, show its ref-chain context: the RefState/RefUpdate entries that published it (the reflog-equivalent), including recovery-relevant fields (previous state id, update seq, publishing key id).

  • FR-017 [C] Graph view across refs sharing lineage (merge blocks connect two parents; mainline parent distinguished from adopted parent).

2.3 Inspection (FR-030 …)

  • FR-030 [M] Patch detail: every operation rendered as a human-readable diff — text-span edits shown as before/after with surrounding context (the preimage travels in the patch, so no worktree is needed); creates/deletes with content summary; binary replacements as old/new blob identity + size; permission changes as old/new mode. Raw operation view (exact fields, hashes, anchors) available for P-2/P-4. (Unblocked at prikk 0.36 — RFC 021 F1: prikk show <block-id|patch-id> --format json (show-report-v1) renders a patch’s operations, paths, and content, which is the surface this requirement has waited on since 0.1.0 under UD-09. The view itself is not built by RFC 021 (Decision 5: its own increment). One constraint that increment inherits, from RFC 021 F2: prikk’s edits are content-anchored spans, not line ranges — old_span_text/replacement_text, either of which may be empty. Rendering them as line diffs would be invention, and T-T4 forbids it; the span is what prikk knows.) Delivered 2026-10-13 (RFC 035), at prikk ≥ 0.39 — stikk’s JSON floor, not show-report-v1’s own 0.36, since stikk reads no JSON from prikk between 0.36 and 0.38 and the project owner ruled that band unoccupied. Patch detail opens from two places, each one read: Block detail, which now lists the block’s patches from its own show <block-id> report and opens one of them with no second read; and the Queue, which gained a selection and opens a queued patch with one show <patch-id>. Every operation is rendered under prikk’s own kind word with prikk’s own fields — spans labelled as spans, never line numbers or context; a create’s content and mode; a delete’s preimage; a binary replacement’s blob ids and sizes and never its bytes; both modes of a permission change, as octal beside prikk’s integers in the raw view; and a rename’s two paths with the AUTHOR key that asserted it. f toggles the raw view — prikk’s fields exactly as prikk gave them, which is also the only honest place an unresolved_node_id is legible. Content is rendered byte-faithfully: every content row is quoted and escaped, one row per source line with the line’s own terminator inside the quotes, and wrapped by hard-splitting rather than on whitespace — because a span edit is usually a whitespace edit, and a renderer that collapsed runs of spaces showed a re-indent, a tab turned into spaces or a removed trailing newline as no change at all (T-T4; review v1 §2.1 caught it). Two spans that differ in any byte never render identically — including bytes that do not show as themselves (review v2 §2): a bidirectional override (“Trojan Source”, CVE-2021-42574), a zero-width or default-ignorable character and any whitespace other than an ordinary space are written as \uXXXX, as a surrogate pair above U+FFFF, by one escape table in stikk-prikk that the rendered rows and the raw view share so the two spellings cannot drift. char::is_control() alone is Unicode category Cc and let every one of them through. Ordinary visible non-ASCII stays as itself, and the Glossary names the notation, because it is stikk’s own. The same Cc-only rule still applies to inert, which every other repository string passes through — paths, messages, ref names — and widening that is its own increment. A binary file’s create or delete shows its blob id and byte count and never its bytes, the same as replace-binary (review v1 §2.4: prikk’s content kinds are text, binary and unavailable, the last being a blob the object store does not hold — by design — whose id is still named). Content is bounded before it is rendered (one constant in stikk-core), cut at a char boundary, with the withheld UTF-8 byte count said out loud — never a silent truncation. A failed patch read costs only the patch list: the block’s own fields and the tip’s state files do not start depending on it. An unresolved path gets one sentence and no reason (prikk names no path for this operation, with the node id inert): stikk cannot know which of three causes applies. And where a block holds more than one patch, a node-addressed path is labelled as at the end of this block — because prikk resolves a sealed patch’s edit-text, replace-binary and change-perm against the state after all of the block’s patches, so patch 1 can be reported under a name a later patch gave the file, and a later delete can remove the path prikk had already given (A1 F7, measured at 0.46.0 and 0.51.0). stikk renders prikk’s value and labels it; it never corrects the name from a later patch’s rename. prikk fixed the resolution point in 0.52.0 (A2), which RFC 043 validated on 2026-10-15: at 0.52 and above show <block-id> resolves each patch’s path at that patch, so the label is banded below 0.52, where it is still true, rather than deleted.
  • FR-031 [M] Block detail: parents (mainline vs adopted for merge blocks), baseline claim for merges, state Merkle root, patch list, seal signature(s) and their verification standing.
  • FR-032 [M] File tree at a block: browse the replayed state (paths, kinds, modes, blob identities); open file content at that state. (Partly delivered 2026-10-14 (RFC 037 Handoff A), at prikk ≥ 0.46. Block detail lists the files present at any block — not only the ref tip — from prikk tree --ref <block-id> --format json (tree-listing-v1), with each file’s path and mode, and the total bytes as the sum of the entries’ sizes. stikk asks with the block’s own id, never the ref name, so the answer is about the block the reader opened rather than wherever the ref has since moved, and the reader refuses a report whose target_block_id is not the id it asked for — prikk answers target_block_id: null with entries: [] and exit 0 for an unpublished current branch, which a lax reader would have shown as a block with no files (T-T4). Below 0.46 nothing changes: checkout --patch-plan replays to a tip and nowhere else, so an older block’s files are not reported there — never an empty list — and the per-file mode is None, never 0. What is still not built: kind is carried verbatim but prikk emits only file (it refuses to author a symlink at 0.51, measured); blob identities are reported and not shown (content_id, on a binary entry only), as is encoding; and opening a file’s content at that state is not built, though prikk serves it (cat --path <p> --ref <block id>, the measurement that retired UD-10).)
  • FR-033 [M] Compare two blocks (same or different refs): state-level difference (added / removed / content-changed / mode-changed paths), each entry expandable to content diff. This is the range-diff equivalent. (Amended 2026-09-12, RFC 021 Q1 as amended 2026-09-09 — this is the one requirement the 0.34–0.38 window both widens and narrows, because prikk answered the content question and refused the comparison one. prikk diff is not coming: prikk states comparing two arbitrary points as a refusal, not a deferral — a materially more expensive question they have declined to answer (RFC 021 F3). So stikk composes what it can, and says which case it is in: (a) branch-tip comparison, in full — --content-path at each tip yields two contents prikk handed over, and comparing those is not invention; (b) same-ref range comparison, as state-level difference folded from the operations each block reports, plus each block’s own spans — honestly labelled as composed from reported operations, never presented as a byte-level diff stikk did not compute; (c) arbitrary block-to-block comparison stays blocked, on the new UD-10: --ref resolves a published branch only, so a block id is not addressable as a content root. The --content-path seam method is not added by RFC 021 — that is Compare’s own increment, which needs this design work rather than a re-baseline.) (Delivered 2026-10-14 (RFC 038), at prikk ≥ 0.46, for the three comparisons decision 3 names: History’s m-marked block against the selected one (ordered older → newer by prikk’s update_seq, whichever was marked first), History and Block detail‘s block against the previous block in this ref’s history — the next older row in the loaded lineage, named as exactly that and never as “the parent”, since a merge block has two parents and neither need be the row above it (measured at 0.51) — and Changes’ worktree against what commit would author against, which is the bare prikk diff. This RFC’s premise is that the 2026-09-12 amendment above is superseded: prikk diff compares any two points, including bare block ids, so neither the composed state-level fold nor UD-10 is needed. stikk computes no part of a comparison — no renumbering, no re-hunking, no rename inference: prikk’s unified hunks are shown as prikk wrote them, each body line as its marker plus its content quoted with RFC 035 A3’s notation and the terminator inside the quotes, so a CRLF change, a trailing-space edit and a missing final newline are each visible and no two lines differing in any byte render alike. prikk’s @@ header and its \ No newline at end of file are prikk’s words and are not quoted. Each entry is bounded by CONTENT_DISPLAY_BYTES with the withheld byte count said out loud (one measured hunk is 457 KB), minimal: false carries prikk’s note, a binary entry shows both sizes and content ids and never bytes, and unsupported_paths carry commit‘s refusal verbatim. Below 0.46, stikk says it compares from 0.46 on and spawns nothing.) (Delivered in full 2026-10-15 (RFC 041), at prikk ≥ 0.46. The fourth comparison — two refs — is chosen in the ref picker: m marks a ref, d compares the marked one with the selected one. No seam change: Comparison::Points already carried it, and measurement at 0.51 confirmed prikk takes ref names on both sides, swaps the entries when the pair is reversed, and accepts a tag and a received ref (remotes/…, read and not adopted) as ordinary sides. Two refs have no lineage order, so stikk states the one the reader chose — marked → selected — rather than inventing one, and names the block each ref resolved to beside it, because a ref can move and a block cannot; r re-asks by name and the block ids follow. The unpublished current branch cannot be a side: it has no block, and measured at 0.51 prikk answers its name with exit 1, “ref heads/main does not exist in this repository” — false and alarming for a branch the reader is standing on — so stikk refuses the pair in its own words and points at Changes’ d. So FR-033 now has all four comparisons: two blocks in one lineage, a block against the previous one, the worktree against what commit would author, and two refs.)
  • FR-034 [M] Worktree-vs-baseline view for the focused ref: changed / missing / untracked / unsupported paths with per-file diffs. (→ UD-03, resolved; → UD-09 for the per-file diffs) Core’s worktree-status was broken on ordinary repositories at 0.27.x and is verified fixed at prikk 0.28 (RFC 008), so stikk uses it directly, version-gated at ≥ 0.28 and explaining rather than running it below that. The imagined replay/plan workaround is superseded: it was never feasible (it needs per-file baseline content prikk does not expose, and would require stikk to read worktree bytes directly, against CON-1). The view is path-level; per-file content diffs waited on UD-09’s content half, which retires at prikk 0.36 (RFC 021 F1 — show --format json carries operation content). The view stays path-level until its own increment: RFC 021 raised the ceiling and captured the evidence, and deliberately built no view (Decision 5). When prikk reports that the active WAL holds queued patches for a different ref, stikk must carry prikk’s own warning verbatim — paths listed “untracked” there may be committed-but-unsealed work (RFC 009 F4). (prikk 0.38 additionally prints live rename declarations: N unconditionally, with indented <old> -> <new> lines under it when N > 0. Those are declarations, not change entries — stikk read them as entries and fabricated a change for a file that does not exist until RFC 021 F0 scoped the entry scan to its section.. Re-verified at 0.41.0 (RFC 026): unchanged, and one line is new — refused paths: N now sits beside unsupported paths:, and prikk’s own source says why they are separate: “an unrepresentable name and an unauthorable entry are different facts, and a path can be one without the other.” Individual entries carry a [refused: <reason>] suffix. stikk’s parser is unaffected — prikk kept the entry line’s first word as the change kind deliberately, “so a consumer splitting on it reads exactly what it read before” — but the count is unparsed and the suffix is shown only as part of the entry’s verbatim detail Amended 2026-09-13 (RFC 027, accepted): the parser was not unaffected in one respect this note missed — prikk has always named an unrepresentable path unsupported-path, stikk matched unsupported and discarded the line, so since 0.1.0 the Changes view has counted unsupported paths and listed none (RFC 027 F0). At prikk ≥ 0.39 the view reads worktree-status --format json, marks an entry commit would refuse as refused with prikk’s reason verbatim, and counts refusals; below 0.39 it says the verdict is unreported, never zero.) Built 2026-09-16 (RFC 032): the Changes view marks a declared rename (prikk mv) only when prikk lists both halves — a missing entry at the source and an untracked entry at the destination — annotating prikk’s two rows as one rename, counting renames N at prikk ≥ 0.38, and saying once that prikk does not report whether a renamed file’s content also changed — withheld while prikk reports that commit would refuse an entry, since prikk would then author nothing (amendment A7); below prikk 0.39 the verdict is unreported, never a zero, and the sentence stays. A declaration prikk will not author as a rename is named, never counted: its destination is not a file in the worktree (prikk records a deletion), or its source is present again (prikk refuses to commit; where the destination is gone too, prikk mv {new} {old} drops it, as measured at 0.42.0). The untracked filter never hides a paired destination. A ref with no published history — absent from prikk’s refs() — is named in place of “against baseline”, with words chosen from prikk’s queue for that ref. Until prikk 0.43.0 reports each declaration’s resolution, this is inference from the report, stated as such. Superseded 2026-09-22 (RFC 034 decision 4): at prikk ≥ 0.44 the analysis is prikk’s own resolution, not stikk’s inference — a destination that is gone or is a directory (deletion), one that is ignored (deletion-ignored), a source that was never tracked (never-tracked), a rename, or one prikk will refuse — each with its own sentence, because prikk now says why. A resolved rename also carries what prikk reports it does to content and mode, and says nothing where prikk reports null, since unknown is not “unchanged”. 0.43 is skipped deliberately: its classifier resolved a directory destination as rename while commit recorded a deletion (measured). Below 0.44 the inference stands, with one correction: where the report does not list the destination, stikk says only that — an ignored destination is in the worktree, and the report cannot tell the two apart. A checkout or branch switch that stopped part-way (prikk ≥ 0.43) is shown on Orientation in prikk’s own words, which name both ways out; reads are unaffected. (The per-file diff this entry waited on is delivered 2026-10-14 (RFC 038), beside this view rather than inside it: the Changes view stays path-level, and d opens Compare on the worktree against what commit would author against — the bare prikk diff, with prikk’s own hunks. Its foot row said per-file content diff awaits prikk support (UD-09), which prikk diff made false at prikk 0.46 (F4, C-T2b); it now names the key, or, below the band, says in stikk’s own voice that stikk compares from 0.46 on.)
  • FR-035 [S] Signature inspector on any signed object: role, key id, algorithm, and the outcome with a plain-language explanation of what it means and does not mean (TOFU continuity, not identity). The outcome has three user-facing states that stikk must keep distinct: Sound (verifies against recorded key material), Unverifiable (no key material recorded — non-blocking; verify still passes; must never be shown as a pass/green state — prikk’s AuthorSignatureVerification::Unverifiable), and a verification failure (blocking — surfaced by prikk as an error/refusal, not a value). stikk must not collapse Unverifiable into either of the other two.
  • FR-036 [C] Blob detail: kind (text/binary/snapshot), size, referencing patches/blocks (“where is this content used?”).

2.4 Working cycle: commit, queue, seal, checkout (FR-050 …)

  • FR-050 [M] Commit: review the whole-worktree change set (FR-034), require a message input (see UD-01 for its fate), require AUTHOR signing readiness, then queue the patch. Surface prikk’s own result summary (patch id, operation counts, threshold warnings) faithfully. (Carried 2026-09-12, RFC 021 §6 — open question for RFC 014’s own follow-up, deliberately not settled here. Verified at prikk 0.38.0: a symlink in the worktree is reported untracked while unsupported paths: 0, and its presence then blocks every commit — error: integrity error: worktree authoring: unsupported symlink authoring: <path>: worktree symlink authoring is out of scope. So worktree-status did not mark the path that commit would refuse over, and a user saw a normal-looking untracked file and an unexplained blocked commit. Re-verified at prikk 0.41.0 (RFC 026), and prikk has answered it: the same symlink is still untracked with unsupported paths: 0, but the report now carries refused paths: 1 and marks the entry itself — untracked link.txt — worktree file is not in the baseline [refused: precondition not met: link.txt: worktree symlink authoring is out of scope]. The information stikk needed is now in the report it already reads; what stikk does with it is not yet built — the count is unparsed and the [refused: …] suffix reaches the Changes view only as trailing text inside the entry’s verbatim detail. stikk’s current behaviour is honest — the refusal degrades to a verbatim Refusal, prikk’s own words, pinned by a captured test in classify/tests.rs — but whether commit’s preview should prevent this the way it prevents cross-ref and clean-worktree (RFC 014 decision 1) depends on what prikk decides to do with its own report; letter 006 §4 filed it. Prevention on a shape prikk may be about to change would be stikk guessing, so this stays reported-not-prevented until prikk answers. Decided 2026-09-13 (RFC 027, accepted, Q1 ruled (b)): at prikk ≥ 0.39, where worktree-status reports commit’s own authoring verdict per entry, commit is unavailable with a reason whenever an entry is refused — the reason lists each refused path with prikk’s words verbatim, and its next steps are the measured ones: remove or replace the path, or list it in .prikkignore, which is then part of the commit. Below 0.39 commit is offered as before and prikk’s refusal is shown verbatim. unsupported-path entries, which prikk marks authored while commit refuses them, are not prevented on stikk’s inference; prikk has been asked. Amended 2026-09-15 (RFC 030): a confirmed commit authors what its preview showed only as far as stikk can check. Immediately before prikk commit, the confirmation re-reads what prikk reports about the worktree for the previewed ref — which paths are listed, their status, prikk’s verdict on each, and prikk’s rename declarations — and a difference makes the confirmation stale with nothing committed; a change to prikk’s current branch at ≥ 0.42 makes it stale through the change token. The limits, stated rather than implied away: prikk’s report is path-level, so a further edit to a file already listed as modified is not detected; and a window remains between that re-check and prikk commit itself, in which prikk authors whatever the worktree then holds.) Built 2026-09-16 (RFC 032): commit’s confirmation counts renames N over paired declared renames only, says once that each is also counted as one missing and one untracked path, names each declaration prikk will not author as a rename, and names a target with no published history under the targets (“this would be its first commit”, or that it adds to the ref’s queued patches). A clean worktree whose declaration’s source is back is blocked as clean with that notice, because prikk would refuse the commit. Superseded 2026-09-22 (RFC 034 decision 4): at prikk ≥ 0.44 a declaration prikk itself would refuse makes commit unavailable, carrying prikk’s verbatim refusal, which already names prikk’s ways out — RFC 027’s rule (prevention only on prikk’s own verdict) applied to declarations, which RFC 032 could only warn about. It is checked before the clean-worktree block, because the row that provokes it reports clean: true and exits 0. refused_declaration_count and refused_count are different facts and neither implies the other. A checkout that stopped part-way also makes the preview unavailable, in prikk’s own sentence.
  • FR-051 [M] Queue review: show the queue’s depth and the ref it targets, the active-patch warn/limit thresholds as they apply, and make “queued, not yet history” status unmistakable. Amended 2026-09-06: this clause previously required listing queued patches with full patch detail (FR-030), which is not satisfiable — prikk reports the active WAL only as queued patches: N targeting <ref> and exposes no queued-patch ids (verified at 0.32.0; RFC 013 F2 recorded the same ceiling for the seal ceremony, and RFC 015’s log enumeration covers sealed patches only, never the WAL). FR-030 itself also remains blocked on UD-09’s content half. The knowable half is delivered, distributed rather than in a dedicated view: the depth and target ref in Orientation (RFC 009 F1), the “not yet history” tier in History (RFC 006), and prikk’s own threshold warning transported into the commit preview (RFC 014). A dedicated Queue view (TU-01) becomes worth building when prikk grows queued-patch enumeration — the upstream ask filed by RFC 013 — and not before, since it would list nothing. Re-amended 2026-09-12 (RFC 021 §5): the condition above was met — prikk 0.35 shipped status --format json (status-report-v1), which enumerates the queue (patches[] with patch_id and per-operation kind/paths) and carries threshold_status/warn_threshold/hard_limit as data rather than leaving stikk to re-derive thresholds from environment variables. The original clause is therefore satisfiable in full, and the amendment above is kept rather than deleted because the history is the point: it records what was asked upstream, and 0.35 is the release that answered it. The Queue view is still not built — RFC 021 raised the ceiling and captured the evidence only (Decision 5); a capture of the awkward unresolved_node_id case is committed in parse/tests.rs for that increment to start from. The floor is 0.28, so the view must be version-conditional: below 0.35 the queue is still only a count and a target ref. Delivered 2026-09-15 (RFC 028 Handoff A): the Queue view is built, at prikk ≥ 0.39. It reads status --format json and lists each queued patch’s id and operations (the kind verbatim, paths, a rename as from → to with its asserting key id, an unresolved node named as one), the depth, the target ref or prikk’s missing/malformed metadata status, and the thresholds in stikk’s words with prikk’s numbers. At ≥ 0.42 it shows each patch’s message; at 0.39–0.41 it says once that prikk does not report a queued patch’s message or content. What it does not show inline: a queued patch’s content — Enter now opens it in Patch detail (FR-030, RFC 035, which also gave this view a selection to open it from); and below 0.39 — including 0.35–0.38, a band stikk does not read — it shows the depth and target and says prikk does not list queued patches, never an empty list. History’s queue tier now says whose queue it is.
  • FR-052 [M] Seal ceremony: an explicit, multi-step confirmation that (a) shows how many patches will seal into one block, which ref they target, and the block that results — amended 2026-09-05 (RFC 013 F2): this clause previously required showing “exactly which patches”, which is not satisfiable. prikk exposes the queued count and its target ref (status: queued patches: N targeting <ref>) and nothing that enumerates queued patch ids; sync pending lists accepted (received) patches, a different thing. The ceremony states what it knows and says plainly that it cannot enumerate them, rather than under-delivering against a requirement quietly. An enumeration surface is filed upstream, ranked below UD-09’s content surface — re-amended 2026-09-12 (RFC 021 §5): the enumeration arrived at prikk 0.35 (status --format json lists each queued patch’s id and operations), so “exactly which patches” is satisfiable again and the ceremony may name them. The amendment above is kept rather than deleted: it records what the ceremony honestly said when it could not, and which release changed the answer. The ceremony as shipped by RFC 016 still says it cannot enumerate; updating it is the seal ceremony’s own follow-up, not RFC 021’s, and it must stay version-conditional — below 0.35, and down to the 0.28 floor, the count and target ref remain all prikk reports. Delivered 2026-09-15 (RFC 028 Handoff B): at prikk ≥ 0.39 the confirmation names each patch it will freeze — its short id, and at ≥ 0.42 its message — from the same queue read as the count, directly under the count. When the card cannot hold every row, it shows as many as fit and a remainder line saying how many more there are and where to see them (the Queue view); the consequence, its trust-refusal warning and the affordances never give up room to it. At 0.39–0.41 it says prikk does not report a queued patch’s message; below 0.39 it says prikk does not list queued patches — (b) requires MAINTAINER signing readiness, (c) requires an explicit no-audit acknowledgement while core requires --allow-no-audit, presented as informed consent, not a pre-ticked box.
  • FR-053 [M] Checkout, plan-first: every materialization is previewed (files to write, conflicts that will refuse, snapshot-vs-patch route) before any write; the user confirms the plan, not the idea. Refused overwrites are explained per file (UC-12). (Delivered for branch switch 2026-10-17, RFC 045: at prikk ≥ 0.46, Switch to this branch in the ref picker previews the exact files the switch will write and delete, from stikk’s own Compare read inside the preview, and the user confirms that plan. A plan that is not whole — an unmeasured status word, or any unsupported path — blocks rather than hiding what it cannot place. prikk’s refusals are verbatim and every one of them writes nothing. Checkout of a block or a path is not delivered; branch switch takes a branch.) (Its non-destructive half delivered 2026-10-29, RFC 053, at prikk ≥ 0.54: from Block detail, Save this file, as it was here saves one file as it was at that block and Save every file at this block saves every file at it into a new folder — each previewed at Tier Two with no key, outside the repository and never over an existing path, both rules stikk’s own and decided before prikk is asked anything. Nothing in the repository or the worktree changes. Materializing into the worktree is still not delivered: that is this requirement’s destructive half, and FR-054’s.)
  • FR-054 [M] Deletion flow mirrors core’s separation: a distinct deletion plan (with per-path safety verdicts) and a distinct confirmed execution; unsafe candidates are shown and never auto-resolved.
  • FR-055 [S] Focused-ref model: stikk maintains a per-repository client-side focused ref (baseline for FR-034, default target for commit/seal/checkout). Switching focus never touches the worktree by itself; the UI must never imply a HEAD moved (no such thing exists). (Amended 2026-09-13, RFC 029 decision 5: true below prikk 0.42. From 0.42 prikk has a current-branch pointer — a default for --ref, not a HEAD and not an authority. Switching stikk’s focus still never touches the worktree, and the UI still never implies a HEAD moved.) (Amended 2026-09-15, RFC 029 Q1 ruled (b): at prikk ≥ 0.42 stikk opens focused on prikk’s current branch, read from status, and shows prikk’s beside its focus as prikk's default: <branch> when the two differ. Below 0.42, or when prikk’s pointer is unresolved, stikk opens on heads/main only if it is published, and otherwise with no ref focused and the ref picker open. Focus is resolved once, on the first successful read, and a later read never moves it. Switching stikk’s focus never moves prikk’s current branch, and never touches the worktree. Commit and seal confirmations name both refs when they differ.) (Amended 2026-10-17, RFC 045 decision 8: a successful branch switch moves stikk’s focus to the branch switched to. That is not a read moving focus — it is the user’s own action, and leaving History and Changes on the branch they left would describe a worktree that is no longer its files.)
  • FR-056 [C] Partial-scope commit (pathspec). (→ UD-06) Absent core support, out of v1 (OS-3); the commit view must make “commits are whole-worktree” explicit.

2.5 Refs: branches & tags (FR-070 …)

  • FR-070 [M] Branch create (name validation feedback incl. case-collision refusals surfaced with prikk’s reason; --from any ref), branch list (FR-014/015 presentation), branch close with an explanation of closure semantics (pointer retained, history retained, reopenable only by a future core verb — none exists today). (Delivered 2026-10-17, RFC 044: create and close delivered at prikk ≥ 0.42, preview-first at Publication’s tier, with prikk’s refusals verbatim; stikk adds no naming rules of its own, and the branch the repository is on is never offered for closing (F3). Switching is RFC 045.)
  • FR-071 [M] Tag create targeting a ref or block, with message (persisted by core); tag list. Tag deletion does not exist and must not be offered. (Delivered 2026-10-17, RFC 044: tag create delivered at prikk ≥ 0.42, targeting a ref or a block id, with an optional message — an empty one sends no -m.)
  • FR-072 [S] Received-tag review and adoption flow (sync tags / adopt-tag): show the sender’s signature standing, require MAINTAINER confirmation, explain that adoption re-signs under the local key.

2.6 Merge & rollback (FR-080 …)

  • FR-080 [M] Merge evidence browser: for baseline + left + right (blocks or refs, incl. received refs), render the evidence report — outcome, per-pair classifications, and every conflict witness with kind, side/op identification, and a plain-language gloss per witness kind (12 kinds; the glossary is a stikk asset). (Partly delivered 2026-10-19, RFC 047: at prikk ≥ 0.42, m marks a branch in the ref picker and Merge plan on another opens the Merge plan view: prikk’s own plan for merging the marked branch into the selected one, shown verbatim and inert. The evidence report is prose only — --format json is a usage error (F1) — so stikk reads one line of it, evidence outcome:, and parses nothing else; a missing, repeated or unknown word is refused rather than guessed (UD-02). The per-witness glosses are not delivered: prikk’s witness lines are shown as prikk wrote them, with no stikk glossary over them. The baseline is stikk’s own, under FR-084.)
  • FR-081 [M] Merge plan view: what would seal (adopted patches, resulting block shape) when confluent. (Delivered 2026-10-19, RFC 047: the Merge plan view shows prikk’s plan for the pair — whichever of the eight outcomes it carries, not only Confluent — with the two branch names and the baseline stikk found. Executing the merge is not in this increment: nothing on the view acts, and the view says nothing about a key that does nothing.)
  • FR-082 [M] Merge execution: allowed only from a currently-confluent evidence state; requires MAINTAINER readiness + explicit confirmation; on core refusal (e.g., ref advanced meanwhile), re-run evidence and re-present rather than retrying silently. (Delivered 2026-10-19, RFC 047: Enter on the Merge plan view, at prikk ≥ 0.42, preview-first at Publication’s tier with MAINTAINER readiness checked before prikk runs. The preview re-reads everything — every guard, the baseline and prikk’s plan — so a plan that stopped being Confluent, a baseline that moved, or a branch that became the current one all block rather than reaching prikk. The card labels its rows from, into, baseline and from’s tip, opens its sentence with prikk’s verdict in stikk’s words, and keeps prikk’s plan verbatim beneath. No automatic re-run: a refusal is shown and the reader decides, which is NFR-S04’s rule and is why this does not re-present by itself. After success prikk’s lines are shown verbatim and stikk adds one line — the worktree is unchanged, and Switch to this branch goes to the merged branch.)
  • FR-083 [M] Rollback, guided end-to-end (UC-10): preview (what the inverse will do) → append draft (AUTHOR-signed, purpose-tagged) → draft verification result → seal ceremony. Each stage shows core’s own artifacts (inverse operation summary, draft patch id); undoing a single block is FR-085, which is a different operation and not a rollback.
  • FR-084 [S] Merge-base assistance: since core requires an explicit baseline block, stikk computes and proposes common-ancestor candidates from lineage, clearly labelled as proposals the user confirms (core re-derives and checks the claim at verify time). (Delivered, narrowly, 2026-10-19, RFC 047: stikk names one baseline and only where it is provably the merge base — the latest block both mainline lineages list, with no Merge block above it on either side. prikk’s log reports kind and parent_count but no parent ids (F2), so there is nothing to follow past a merge; rather than label a guess a proposal, stikk declines and says why. A wrong baseline is not a weaker answer but a wrong one: measured, a baseline older than the true merge base turned a confluent pair into a Conflict. A list of candidates, and a baseline the user picks, are not delivered.)
  • FR-085 [S] Undo one block (UC-21): preview what goes back, confirm once, and record the undo as an ordinary commit. History is never rewritten (CON-3). It sits beside FR-083, which stays prikk’s whole-branch rollback; stikk never calls this a rollback. (Delivered 2026-10-31, RFC 058: Undo this block, on the selected block in History or in its detail, at prikk ≥ 0.54, on the branch the repository is on. stikk inverts prikk’s own diff --from <parent> --to <block> in the worktree — cat --output for the earlier bytes, prikk mv for a rename back, the diff entry’s own from.mode for the mode — and then commits. Measured at 0.54.1 and 0.55.0: the inverse of a block that did every status prikk reports gives a tip identical to its parent, every path, mode and byte, with verify passing. Tier Three with AUTHOR readiness, previewed file by file, and eight guards that each write nothing: a worktree that is not clean (new files included — a commit here records the whole worktree, measured), queued work, a merge, the first block on the branch, a later block that changed the same paths, something already where a file would go back (asked of the filesystem, since .prikkignore hides a path from worktree-status), a path .prikkignore would keep out of the undo’s own commit, and an entry stikk cannot invert exactly (Windows’s two rows among them, F5). The first operation that writes worktree files itself (C-T4f): every earlier file is fetched outside the repository before the worktree is touched, and a failure after that commits nothing and names the paths it changed. Not delivered: undoing a merge, several blocks at once, a block on another branch, or sealing automatically.)

2.7 Exchange: bundles & sync (FR-090 …)

  • FR-090 [M] Bundle export (ref → file) with destination-collision and durability semantics delegated to core; show the export report (objects, author keys). (Delivered 2026-10-21, RFC 050 Handoff B: Export it to a bundle file, in the ref picker, on your own open published branch, at prikk ≥ 0.53. Preview-first at Exchange’s tier — Tier Two, and no key, because an export signs nothing. The prompt is prefilled with the repository’s parent, the branch’s last segment and the short tip. Two destination rules are stikk’s own: never inside the repository (C-E2’s resolved check — the bundle would sit in the worktree as an untracked file the next commit captures) and never over an existing file (prikk refuses it too without --force, which stikk never passes; stikk says it first and names what to do). Destination collision is therefore not delegated to core as the line above says: stikk answers it, and prikk’s refusal is the fallback. A missing directory is prikk’s refusal, verbatim. Tags, received refs, closed branches and the unpublished row are declined in stikk’s words, in the picker and again inside the preview. The report is prikk’s lines verbatim.)
  • FR-091 [M] Bundle verify (offline) and import, rendering core’s reports and its trust caveats verbatim; after import, land the user on the received ref’s history (FR-014). (Partly delivered 2026-10-21, RFC 050 Handoff A: the verify half, and prikk’s preview of what importing would change. o, wherever a repository is open, asks for a path and opens the Bundle view at prikk ≥ 0.53: prikk’s verification verbatim — its caveat that “a verified bundle is not yet a trusted one” included — or prikk’s refusal verbatim and nothing else, since a file prikk will not read has nothing to preview. Beside it, prikk’s bundle preview against the local branch of the bundle’s own name, restated as one sentence of stikk’s per connectivity and conflict, with prikk’s replay error quoted beneath where there is one, the effects path by path, and the recorded key ids with prikk’s continuity note — never as a trust claim. Nothing is written: import is Handoff B, and with it the landing on the received ref’s history.) (Completed 2026-10-21, RFC 050 Handoff B: Import this bundle, on the Bundle view, at Tier Two and with no key, offered only where prikk’s verification carried a readable tip block: line. prikk’s report is rendered verbatim — its “no local ref was created or advanced, and no MAINTAINER key was trusted” note included — and focus moves to the received branch with its History open, as this line asks. stikk adds two guards prikk has not got (F2, F3): a bundle already received changes nothing, and a bundle older than what was received would move remotes/… back to an older block and hide newer work — prikk does it silently and reports an ordinary import. Both decline without spawning bundle import. Not delivered: adopting a received branch (a merge), trusting its sealer, and sync.)
  • FR-092 [M] Sync loop guidance (UC-14): a stateful checklist walking the user through the full negotiation as the sender or receiver, generating/consuming the right artifact files in the right order, and stating at each hand-off which file goes to the other side. Artifact size/count limits surfaced before building.
  • FR-093 [M] Pending-claims view (sync pending): accepted-but-unsealed patches with their claims; seal-from-claim flow with the same ceremony rigor as FR-052; batch behaviour (stops at first failure) explained before execution.
  • FR-094 [S] Exchange dashboard per peer-ref: what we have vs. what the last summary/have-list said, so Marta can see divergence at a glance without decoding files by hand.

2.8 Integrity, trust & recovery (FR-100 …)

  • FR-100 [M] Verify runner & report browser: every stage prikk reports, with status; per-item findings grouped by object/ref; warnings vs errors distinguished exactly as core does; three-valued author-signature outcomes explained (FR-035). Machine-readable export passes through core’s verify --format json. Amended 2026-10-15 (RFC 040 F4): partly delivered. The stage count above said “all 14 stages”, written when prikk had 14; prikk 0.51 reports 17 and prikk 0.39 reports 14 (both measured), so the text now says what it should always have said — every stage prikk reports, with no count or name written down anywhere in stikk.

    ClauseStateWhy
    Every stage with its statusmet (RFC 040)verify-report-v1 carries one entry per stage, in prikk’s order
    Per-item findings grouped by object and refnot availableprikk’s emitter puts item-level findings deliberately outside verify-report-v1 (RFC 040 F3). The item-failure condition says “see item outcomes above”, and in JSON there is no “above” — they exist only in the prose report
    Warnings distinguished from errorsnot availablethe JSON has no warnings at all; the prose does
    Three-valued author-signature outcomesnot availablethe “unverifiable author signatures: N” count is prose-only (F3)
    Machine-readable exportmet (RFC 040)the raw view (f) is prikk’s own report, bounded and unaltered

    stikk does not parse prose to close these. It never has for a new surface, and prikk’s own integrity reference calls the prose “current CLI vocabulary, not a stable machine-readable schema”. Instead Verify always shows a standing sentence naming where those answers really are (RFC 040 decision 3), so prikk’s dead pointer becomes a live one. The question of whether item outcomes could fit verify-report-v1 additively is held for the next necessary letter to prikk (RFC 040 decision 6).

  • FR-101 [M] Doctor view: findings with core’s codes and recommendations; the one safe repair (WAL-tail truncation) executable after confirmation showing exactly what will be truncated and which patch ids survive.

  • FR-102 [M] Lock inspector: held locks with kind, recorded PID, and advisory liveness exactly as core reports it (positive = reliable refusal, negative = not authorization); clearing a lock requires typed confirmation and shows core’s warning; stikk never auto-clears (NFR-S04).

  • FR-103 [M] Trust management: adopted maintainer keys list; add/remove with TOFU semantics surfaced — a changed key under a known id is refused by core and stikk must present this as the security event it is, not a generic error. Amended 2026-09-06 (RFC 016 F3): the list half is not satisfiable on prikk 0.28–0.33 — prikk trust maintainer offers only add/remove, no way to enumerate adopted keys, and verify’s sealed-block <id>: <key_id> output is historical signer attribution, not current policy (a revoked key still prints), and does not exist before a repository’s first seal — exactly when the question matters. The upstream ask is filed, accepted and ruled (prikk RFC 138: both prikk trust maintainer list and a check --key-id fallback, with --format json, and check exits 0 for a negative answer) but unreleased; stikk designs against released tags only (RFC 009’s own lesson). Even once it ships, stikk’s support floor (ASM-2, prikk ≥ 0.28) keeps the unknown state permanently reachable for every session on a version below it — this is version-conditional, not a gap awaiting closure. Until then, stikk represents adoption as a three-valued MaintainerReadiness (ready / not ready / unknown, RFC 016 §3) rather than claiming a list it cannot produce; the add/remove/TOFU half of this requirement is unaffected and ships as written. Re-amended 2026-09-12 (RFC 021 §5): prikk RFC 138 shipped in 0.34.0 — prikk trust maintainer list and check --key-id both exist, both take --format json, and check exits 0 whichever way the answer comes out (so a negative answer is data, not a failure). The list half is satisfiable at ≥ 0.34, and MaintainerReadiness::Ready is constructible there for the first time. The paragraph above stands unchanged as the record of what was true at 0.28–0.33 and why the three-valued type exists — and that type does not now collapse to two: stikk’s floor is 0.28 (ASM-2), so Unknown stays permanently reachable for every session on 0.28–0.33, exactly as that paragraph predicted. This is the version-conditional case it described arriving, not the gap closing. RFC 021 builds none of it (Decision 5): no seam method for trust maintainer list is added, and the badge still reads ? on every version until the increment that reads it lands. Re-amended 2026-09-13 (RFC 026 B, shipped in 0.6.0): MaintainerReadiness is removed and replaced by RoleReadiness, one per role, mirroring prikk ≥ 0.41’s key status binding vocabulary — not-adopted is now a named, withholding state, and Unknown survives as the ≤ 0.39 band’s answer exactly as the paragraphs above predicted. (Its read half delivered 2026-10-29, RFC 054, at prikk ≥ 0.54, where trust maintainer list --format json finally answers: a Trust view on t lists the adopted maintainer keys in prikk’s order with yours marked — id and public key both matching key status’s maintainer role — and the bundle cards say beside each sealer which adopted key, if any, its id names. Read-only: no key material beyond ids and public keys is shown, key status’s path field is not displayed, and an untrusted sealer declines nothing. Add, remove and the TOFU security event are delivered 2026-10-29 (RFC 056), at prikk ≥ 0.54: Adopt a key in the Trust view adopts a maintainer key and Remove this key removes the selected one, each previewed and confirmed by typing the key id — stikk’s first Tier Three Typed operations, and neither needs a key of your own. stikk checks the public key’s shape and the id’s before prikk is asked; an id already adopted under a different key is shown as the security event it is, with both public keys and no confirmation offered at all; the remove card says that removing a key which sealed this history makes Verify fail it until the same key is adopted again under the same id, and says so for your own key too. A refused adopt is prikk’s own words under stikk’s heading, parsed by nothing. Still undelivered: adopting a received tag (FR-072), author keys, and counting the blocks a removal affects — log-report-v1 does not say which key sealed each block, so stikk says if rather than a number. A card says what the id names and no more, because a bundle records only a name: sealed_by is the key_id string out of the signature envelope, checked against nothing, so a sender can seal under an id the receiver trusts and both preview and import run clean (measured at 0.55.0). Beneath the rows the card says so, and says where it is checked — Verify after import is where prikk tests each signature against the key trusted here, and fails it (publication-trust).) (Delivered 2026-11-19, RFC 063, at prikk ≥ 0.56: prikk now checks each of a bundle’s seals itself, against the keys this repository trusts, and says so in the preview — so the card shows prikk’s answer per seal (the signature checks out / no key is trusted under this id, so it cannot be checked here / a key is trusted under this id, and this signature is not that key’s) rather than stikk’s match on a name, and the sentence above is shown only below 0.56. At ≥ 0.58 the preview also says what an import would be refused for, so stikk withholds Import and lists prikk’s reasons verbatim; at 0.56–0.57 an invalid seal withholds it on its own, since prikk’s refusal list is partial there. A seal that fails against a trusted key, and a removed id offered a different key, are both shown as the security event they are, in the same Two keys, one id card — one renderer, three callers. The two sentences before this paragraph stay true of 0.55: there, that import ran clean and only verify caught it. From 0.56 prikk refuses it (measured, measure063-0.58.txt §D1). Still undelivered: adopting a received tag (FR-072), author keys, and counting the blocks a removal affects.)

  • FR-104 [M] Signing readiness (UC-18): per-role status (key id present? seed material available to the session? maintainer key adopted in trust policy?) with guidance drawn from the security-setup doc; stikk reads key state from the environment/session and never persists or displays seed material (NFR-S03). Example/tutorial seeds are recognized and flagged as unsafe for real use.

  • FR-105 [S] Compaction surface: show compactable containers with plan-only preview; execute per target after confirmation.

  • FR-106 [S] Concurrent-change awareness: stikk detects external repository changes (another CLI/process) and refreshes views rather than acting on stale state; lock conflicts from core are presented as “another writer is active”, never as corruption. Built 2026-09-15 (RFC 031): stikk stamps a change token with every Orientation read, and checks it silently when the terminal reports focus returning and every 5 seconds while idle — never while a request of its own is running or an Orientation read is pending, so its own commit or seal is never taken for an outside change. On a difference it refreshes Orientation and the top screen in place and shows OP-04’s notice; an open commit or seal confirmation becomes stale at once. r refreshes History, the Queue, Changes and the tip’s Block detail. Limit: the token does not include the worktree, so an edit to a file is not noticed this way — it is caught at Enter (RFC 030), or by r.

2.9 Refusal explanation (FR-110 …)

  • FR-110 [M] Every core refusal reaching the user carries: (a) prikk’s original message verbatim (support-grade fidelity, NFR-I03), (b) a plain-language explanation, (c) next-step options that actually exist (e.g., for a non-confluent merge: inspect evidence, choose a different baseline, wait for the other side — never “resolve conflicts”, which does not exist).
  • FR-111 [M] A witness glossary: every conflict-witness kind and verify finding code has a maintained explanation page reachable from wherever it appears.
  • FR-112 [S] Refusal history for the session, so a user can revisit an explanation after closing it.

2.10 Session & cross-cutting UX (FR-120 …)

  • FR-120 [M] Preview-first: every mutating operation offers a dry-run view before execution wherever core provides one (checkout plans, deletion plans, merge plan, rollback preview, compaction plan) — and stikk must not add mutating operations that bypass an available preview.
  • FR-121 [M] Confirmation tiers: read operations free; queue-affecting operations confirmed; history-publishing (seal, merge, rollback-seal, tag/branch publication, trust changes, lock clearing) confirmed with operation-specific summaries. A global read-only mode locks tier 2–3 out entirely (NFR-S01).
  • FR-122 [M] Session persistence: per-repository focused ref, last view, filters, and layout persist across restarts; stored outside the repository (CON-4); absence of stored state degrades to defaults without error. (Delivered 2026-10-18, RFC 046: the focused ref, the last top-level view of four (Orientation, History, Changes, Queue) and the untracked filter are stored outside the repository and re-validated against prikk before any of them is shown; a remembered ref prikk no longer lists falls back with a note. STIKK_PRIVATE=1 reads and writes nothing. Deep restore is not delivered — Block detail, Patch detail and Compare reopen their parent, Verify never reopens (NFR-P05), and DM-04’s scroll and selection anchors are a later increment.)
  • FR-123 [M] TUI/GUI parity: both frontends expose the same operation set via the shared operation layer (CON-2); any operation shipped in one and not the other is a defect, not a variant.
  • FR-124 [S] Everything addressable: ids, paths, and report lines copyable; deep-link identity (repo + object id / ref) shareable between stikk sessions as text. Amended 2026-11-21 (RFC 061 decision 6): not built. TU-05 claimed a y copy key for it, and nothing copies anything; the requirement stands and the key does not. A terminal’s own selection is how a reader copies today, which is why this has not been urgent.
  • FR-125 [C] Command palette exposing every operation by name with its keybinding (external design will specify bindings; the requirement is discoverability parity with menus/keys). Amended 2026-11-23 (RFC 061 decision 2): every key this document names elsewhere was rewritten to the one catalog’s own. Where the catalog still binds a letter it is named — c commit, s seal, p the Queue, v Verify, t Trust, o open a bundle file, f prikk’s own fields, b, w, d, m, r, u — and where RFC 061 withdrew the letter the action is named instead, as Enter’s list names it: Switch to this branch, Merge plan, Undo this block, Export it to a bundle file, Import this bundle, Adopt a key, Remove this key, Save this file, as it was here, Save every file at this block. The letters withdrawn here were C, S, Q, V, T, U, E, I, i, M, F, A, a, x and v as the raw view.

3. Non-Functional Requirements

3.1 Performance & responsiveness (NFR-P…)

  • NFR-P01 [M] The UI never blocks input: any operation that can exceed 100 ms runs asynchronously with visible progress.
  • NFR-P02 [M] Long-running core operations (verify, deep history walks, bundle build/import, sync accept) are cancellable from the UI; cancellation never leaves stikk’s own state inconsistent (core operations are themselves crash-safe; stikk simply re-reads).
  • NFR-P03 [M] Capacity tiers, aligned with prikk’s measured envelope rather than aspirational Git-scale numbers (core verify cost is linear in history; core benchmarks exist to ~160-block / 10k-file scale):
    • Tier 1 (comfort), must: ≤ 2,500 blocks and ≤ 25k tracked files — navigation interactions < 100 ms after initial load; open-to-oriented < 2 s excluding a full verify.
    • Tier 2 (supported), should: ≤ 25k blocks / ≤ 250k files — progressive loading; interactions < 500 ms; verify runs in background with staged results.
    • Beyond tier 2: functional with honest degradation (no hangs, no unbounded memory), no latency promises.
  • NFR-P04 [S] Expensive views (block-state trees, comparisons) are computed lazily and cached per session; cache invalidation keys off repository change detection (FR-106), never off wall-clock. (Recorded 2026-09-12, RFC 021 §6 — prikk’s own published cost curves, carried here so a design sees them before a user does: sealing rises quadratically with history depth, and checkout/merge-evidence at roughly depth^1.45. Both track depth, not repository size — a small repository with deep history is the expensive case, which is the opposite of the intuition most tools train. Compare over a deep range is exactly the shape that pays this (FR-033, UC-04), so its increment must decide what it does on a deep range before it renders one: lazily-and-cached is necessary here but may not be sufficient. Not acted on by RFC 021, which builds no views.)
  • NFR-P05 [M] Verify is never run implicitly on open beyond what orientation needs; full verify is user-initiated or explicitly scheduled (its linear cost belongs to the user’s decision).

3.2 Accessibility (NFR-A…)

  • NFR-A01 [M] TUI: fully keyboard-operable; every view reachable and operable without a pointer.
  • NFR-A02 [M] GUI: exposes platform accessibility APIs (names, roles, focus order, keyboard operability for every action).
  • NFR-A03 [M] Status and severity are never encoded by color alone (shape/label always present); every colour stikk chooses meets 7 : 1 (WCAG AAA) on every reference background of its theme, and on the background the terminal reports. Amended 2026-11-21 (RFC 059 decision 12): was “palettes meet WCAG AA contrast in both light and dark presentation”. AA was the wrong bar for the one requirement that exists for low vision, and the old wording was met by no row of RFC 059 F1’s table: on a light terminal the default theme’s body text measured 1.4 : 1. The bar is now checked by arithmetic on the palette and on every rendered screen, not asserted in a comment.
  • NFR-A04 [S] Reduced-motion preference respected; no information conveyed solely by animation.

3.3 Internationalization (NFR-I…)

  • NFR-I01 [M] All stikk-authored UI strings externalized; initial locales en, ja, nb; locale switch without restart [S].
  • NFR-I02 [M] Ids, paths, ref names, and key ids are never translated or reshaped.
  • NFR-I03 [M] prikk’s own diagnostics are English and are the support-grade ground truth: stikk may add localized explanation (FR-110) but always preserves and can show the original message.

3.4 Security & safety (NFR-S…)

  • NFR-S01 [M] Read-only by default posture: a fresh session performs no mutation until the user acts; a global read-only mode exists (FR-121) and is the default when signing readiness is absent.
  • NFR-S02 [M] stikk writes nothing inside .prikk/ and never modifies repository content except through prikk operations (CON-1). stikk’s own files (session state, config) live in user-scope locations.
  • NFR-S03 [M] Key hygiene: seed material is read from the session environment for the duration of an operation, never persisted, logged, or displayed; UI shows key ids only. Recognized example/tutorial seeds trigger a persistent warning (FR-104).
  • NFR-S04 [M] stikk never auto-clears locks, never bypasses a core refusal, and never retries a refused mutation without user action.
  • NFR-S05 [M] No telemetry, no network calls of any kind (the tool of a no-network VCS is itself no-network).
  • NFR-S06 [S] Untrusted-content discipline: bundle/received content is rendered inert (no execution, no link-following, no format-string interpretation of history content).
  • NFR-S07 [M] stikk maintains a threat model as a first-class document (stikk-03-threat-model). Per project rules, every release whose changes involve new data flows, external integrations, or auth/signing logic updates the threat model; other releases verify existing controls remain valid. (Grounding: .git-exclude/rules/project-instructions-general-common.md §Release Deliverables.)

3.7 Usability & progressive disclosure (NFR-U…)

Grounding: project rule “Less is more — sophisticated UI/UX comes from limited information and considered workflows; users start immature; advanced views can be added for matured users.”

  • NFR-U01 [M] Default views present the minimum information the current task needs; deep or expert detail (raw operation fields, ref-chain internals, per-item verify findings, exchange internals) is opt-in via explicit expanders or an advanced mode, never shown by default.
  • NFR-U02 [M] The primary workflow (open → review changes → commit → seal → history) must be completable end-to-end using only default-view information plus the confirmations of FR-121; nothing on that path may require advanced mode, the glossary, or prior prikk expertise beyond the §0 mapping.
  • NFR-U03 [S] Advanced mode is a persistent per-user preference (CF), switchable at runtime; switching it never changes semantics, only depth of display.

3.5 Portability (NFR-T…)

  • NFR-T01 [M] Mutating stikk runs where mutating prikk runs: Linux, macOS, Windows. Read-only stikk degrades gracefully on read-only prikk platforms, with mutation affordances visibly disabled and explained.
  • NFR-T02 [M] TUI: standard terminal environments on the three platforms (POSIX terminals; Windows Terminal-class on Windows), degrading legibly on limited color/Unicode support.
  • NFR-T03 [S] GUI: cross-platform desktop on the same three platforms, native-conventional (menus, shortcuts, file dialogs) per platform.

3.6 Robustness (NFR-R…)

  • NFR-R01 [M] stikk must be safe to kill at any moment: repository safety is core’s (crash-safe by design); stikk’s own state files are written atomically and tolerate absence/corruption by resetting to defaults.
  • NFR-R02 [M] stikk holds no repository lock across user think-time; every core operation is bracketed (acquire-act-release semantics live in core’s own operations).
  • NFR-R03 [M] Version honesty: stikk states which prikk version range it was validated against (ASM-2) and refuses gracefully (read-only where possible) outside it, rather than misrendering unknown formats. The range has two ends and they behave differently: below the floor stikk degrades or refuses; above the validated ceiling stikk still runs but says the range is unvalidated, because refusing every prikk newer than the last stikk release would break users on the day prikk ships a minor. An unbounded upper range is not honesty — it silently asserts knowledge stikk does not have, and is how a shape change goes unnoticed (RFC 009 decisions 6–7).

4. Constraints & Assumptions

  • CON-1 [M] stikk drives prikk exclusively through prikk’s public surfaces and never reads or writes .prikk/ content directly. The current public surface is: the prikk CLI (stable-ish command set; machine-readable output only on verify; 0/1 exit codes) and pre-1.0 library crates whose APIs may change without notice. The External Design must choose the integration seam; this document constrains the choice by requiring: no direct storage access; behaviour identical to what the CLI would do; and the UD-list below as the honest gap record for whichever seam is chosen.
  • CON-2 [M] One shared operation layer beneath both frontends; TUI and GUI differ only in presentation (FR-123).
  • CON-3 [M] Reversibility is expressed in prikk’s model, not a mutable undo log: sealed history is never rewritten; compensation is the rollback flow (FR-083); the signed ref chain is the audit trail (FR-016); and every mutating operation is preview-first (FR-120) so “undo” pressure is minimized at the source. stikk must not present an “undo” affordance for published history.
  • CON-4 [M] All stikk-owned persistent state (config, sessions, caches) lives outside every repository, in user-scope app locations; a repository must remain byte-identical whether or not stikk ever opened it (except through explicit prikk operations).
  • CON-5 [S] stikk is versioned and released independently of prikk; compatibility is declared per release (NFR-R03).
  • CON-6 [M] Development follows the project workflow: Requirements → External Design → Internal Design → Program Design → Implementation → Testing, with design specifications as the source of truth for test design — test cases validate the specs, not merely the written code. (Grounding: rules §Feature Development.)
  • CON-7 [M] stikk’s own project structure follows the rules: English throughout; concise README in the rules’ six-section shape; full documentation under docs/src (mdBook-compatible) organized by the three documentation personas; Apache-2.0 with LICENSE/NOTICE, author nabbisen; development plans and change tracking via the stikk repository’s own rfcs/ (five-folder variant of the RFC lifecycle policy, adopted to keep “accepted for implementation” a distinct event from “shipped”) and CHANGELOG.md.
  • ASM-1 prikk-core evolution continues along its RFC process; stikk requirements name dependencies (UD-xxx) rather than forking core semantics.
  • ASM-2 v1 targets prikk ≥ 0.28, validated through 0.58.0 (owner ruling 2026-09-04, RFC 009 decision 6; ceiling raised to 0.31.0 by RFC 012 F-e, 2026-09-05, to 0.32.0 by RFC 015, then to 0.33.0 by RFC 017, both 2026-09-06, to 0.38.0 by RFC 021, 2026-09-12, to 0.41.0 by RFC 026, 2026-09-13, then to 0.42.0 by RFC 029, 2026-09-13, to 0.46.0 by RFC 034, 2026-09-22, to 0.51.0 by RFC 035, 2026-10-13, to 0.52.0 by RFC 043, 2026-10-15, to 0.53.0 by RFC 049, 2026-10-19: 0.53’s one output change is to checkout‘s refusals, which stikk calls only below 0.46, so the suite was green at 0.28.0 and 0.53.0 with only the constant moved and no leg changed, and to 0.54.1 by RFC 052, 2026-10-27: 0.54 fixes a read stikk shows — show <block-id> no longer refuses after consecutive text edits of one file, so Block and Patch detail open where 0.53 showed prikk’s refusal verbatim — and adds a verify count line and an extract command stikk does not call, so the suite was green at 0.28.0 and 0.54.1 with only the constant moved and no leg changed. The patch is named because prikk withdrew 0.54.0, whose Windows installer refused some ordinary x64 machines; stikk pins no prikk version, so nothing of stikk’s can hand anyone the withdrawn one), and to 0.55.0 by RFC 055, 2026-10-29: the two things 0.55 changed that come near stikk cost nothing — extract refuses a destination inside the repository, which stikk does not call, and a damaged bundle’s refusal is worded differently, which stikk shows verbatim and parses none of — so the suite was green at 0.28.0 and 0.55.0 with only the constant moved and no leg changed, and to 0.58.0 by RFC 063, 2026-11-19: the first re-baseline whose fixtures and legs had to change for a prikk security fix. With only the constant moved, 8 of the suite’s 97 cases failed — not from output drift, but because 0.56 made the worktree follow the current branch, as stikk’s own letter 023 asked. A merge into the current branch now writes the worktree and refuses on a dirty one, so stikk’s refusal of that merge is lifted from 0.56 and prikk’s own refusal reaches the reader (F2). A commit to a ref whose files differ from the worktree’s is refused, so stikk commits only to prikk’s current branch and names the switch for any other (F4) — before 0.56 that commit succeeded and silently mixed two branches’ work. And an import is refused when a bundle is sealed under an adopted key id by a different key (F5): every fixture had shared the id maintainer, which broke four cases and hid the one that wants the clash, so each fixture now has its own ids — each only on an empirical re-verification, never trusted from prikk’s own changelog. RFC 035’s raise is the first made in order to build on the new version’s report rather than to absorb its drift, and it cost nothing on its own: the suite passed 37 of 37 at 0.28.0 and 0.51.0 with only the constant moved. What 0.47–0.51 changed is read deliberately, not absorbed silently — 0.47 began reporting a path where a queued patch’s show had reported none (prikk files that as ### Changed, which is why no reader keys on a field’s absence), and at 0.51 show <block-id> still resolves a sealed patch’s node-addressed path at the block’s end rather than at that patch, so a two-patch block can name a path the first patch never saw (RFC 035 A1 F7; prikk confirmed it and fixed it in 0.52.0, published 2026-10-15 and validated the same day by RFC 043: show <block-id> now resolves each patch’s path at that patch, so the case that reported z.txt reports a.txt and the case that reported no path reports d.txt. Patch detail’s as at the end of this block label is therefore banded below 0.52, where it is still true, rather than deleted). RFC 026’s raise is the first that had to rebuild the test harness before it could measure anything: prikk 0.40 moved signing seeds out of the environment and into a key directory, so the suite’s own fixture builder had stopped configuring the binary it was testing). 0.27.x is dropped: its worktree-status is the UD-03 defect, which stikk already refuses to run, so carrying 0.27 in the range promised what stikk could not serve. Format changes before stikk v1 are absorbed by re-validation, not by stikk reading old formats itself (core refuses retired formats with migration guidance — FR-003 surfaces it). Re-validation is a standing obligation, not a release chore: prikk is pre-1.0 and changed its output shapes twice between 0.28 and 0.30 (RFC 009), its on-disk schema with no CLI shape change at 0.31 (RFC 012 F-e), both its on-disk schema and a CLI output shape (log gained a per-patch line, RFC 015 F1) at 0.32, and its error-class prefixes plus a new key/setup surface at 0.33 (RFC 017) — each re-baseline caught only by re-running the fixtures, or in 0.33’s case the classifier’s provenance, against the real binary. 0.34–0.38 was the fifth re-baseline and the widest (RFC 021, five releases at once): a trust-enumeration surface at 0.34, status --format json and six error-class reclassifications at 0.35, show --format json retiring UD-09’s content half at 0.36, and an unconditional live rename declarations: section in worktree-status at 0.38 — the last of which made stikk report a file that does not exist until F0 fixed it. It was also the first re-baseline run by a machine rather than performed by hand (RFC 019’s real-binary suite, TS-07), which is what makes “re-validation is a standing obligation” enforceable rather than aspirational.
  • ASM-3 Users hold their own key material and channel for artifact exchange; stikk manages neither.
  • ASM-4 The project rules in .git-exclude/rules/ (RFC lifecycle policy 000-rfc-lifecycle-policy.md; general, Rust, and GUI project instructions) apply to stikk as written. Language and edition are therefore fixed upstream of internal design (Rust, 2024 edition — a fact the internal design consumes; this business document still specifies no technology itself).

5. Upstream Dependencies on prikk (UD-…)

Each names the core gap, the stikk requirements it blocks or degrades, and the shipped behaviour until it lands. These should be filed against prikk as issues/RFC input; several already appear in the 2026-08-31 audit.

IDprikk gap (audit ref)Blocks / degradesstikk behaviour until landed
UD-01Patch messages validated then discarded (audit 1A-High-2) — RETIRED at prikk 0.32: messages are stored (schema 4, tag 6) and log now enumerates a patch id and message for every patch that carries one — verified against a real prikk 0.32.0 binary (RFC 015 F1/F2). No author display name either wayFR-012 (message filter), FR-030/011 (message display), UC-02/03 richnessstikk supports prikk on both sides of the boundary: the commit-message prompt’s copy is version-conditional (checked against the session’s own handshake — neither a blanket “not persisted” nor a blanket “persisted” claim is true), and Block detail shows the id/message list a messaged patch carries, always beside the block’s patch count so a pre-0.32 patch’s absence from the list is never mistaken for its absence from history (RFC 015 F4)
UD-02Machine-readable output exists only on verify (audit CLI findings); library API pre-1.0Nearly all read FRs if the CLI seam is chosen; report exports (FR-100, FR-124)External Design must pick: parse human output (fragile — rejected), drive libraries behind a pinned version (CON-5 discipline), or await --format json on log/status/branch/tag/merge-evidence. Requirement: stikk never screen-scrapes prose it can’t pin
UD-03worktree-status broken on normally-created repositories (audit 1A-High-1) — RESOLVED at prikk 0.28, verified against the live binary (RFC 008)FR-034, UC-05stikk uses worktree-status directly, version-gated at ≥ 0.28; below it stikk explains rather than running the pre-fix command
UD-04CLI panics on EPIPE (audit 1B-Medium)Any CLI-seam integration that closes pipes earlystikk drains subprocess output fully; upstream fix filed
UD-05REVISED at prikk 0.28: exit codes are no longer 0/1 but 0 success / 1 operational failure / 2 usage error. The 1-vs-semantics coarseness remains (a refusal, a dirty worktree and an integrity failure all exit 1); the usage case is now distinguishableScripted error classification behind FR-110’s explanationsstikk classifies exit 1 by message + context, degrading to a generic explanation on unknown messages and always showing the original (NFR-I03). Exit 2 means stikk built a bad argument list — a stikk bug — and is surfaced as stikk-internal, never as prikk’s refusal (RFC 009 F6)
UD-06No pathspec/partial commit; whole-worktree onlyFR-056 (C-priority), OS-3Whole-worktree commit presented honestly; no staging metaphor anywhere in UI copy
UD-07Merge-base discovery is manual in core (README known limit)FR-084 qualitystikk computes candidate ancestors client-side from lineage it reads through the public seam; labelled as proposals
UD-08No ignore mechanism (audit 1A-Medium) — RETIRED at prikk 0.29: .prikkignore at the repository root excludes matching paths from commit’s worktree walk and worktree-status’s untracked scan (verified against the live binary, RFC 009 F5). It binds at discovery only, so it never changes what sealed history means; a malformed file fails closedFR-034/FR-050 signal-to-noise on real projectsprikk filters ignored paths before reporting, so they never reach stikk. stikk still offers its view-level untracked filter, marked display-only, for the paths that are reported — and must not claim there is no way to exclude files, nor report a count of ignored paths, which prikk does not expose
UD-09Per-patch content inspection. Content half RETIRED at prikk 0.36 (RFC 021 F1): prikk show <block-id|patch-id> [--format json] (show-report-v1) renders a patch’s operations, paths and content — edit-text carries old_span_text/replacement_text, create-file carries {"kind":"text","text":…} plus mode. The id half was already narrowed at 0.32 (RFC 015 F3). What remains is not the same gap: (a) no arbitrary-point comparison — prikk diff is refused, not deferred: prikk states comparing two arbitrary points is a materially more expensive question they have declined to answer (RFC 021 F3), so this will not arrive by waiting; (b) no --format json on log/branch/tag — asked in letter 006 §1, and prikk offered to schedule it on our say-so, which we gave, so this one is pending rather than refused; (c) block-addressable content is its own dependency now — see UD-10FR-030 (Patch detail — unblocked at 0.36, view not built: RFC 021 Decision 5), FR-032/033 content diffs, FR-034’s per-file diffs, FR-100/124 machine-readable exportsBlock detail lists a messaged patch’s id and message (RFC 015 decision 2), always beside the block’s patch count. Patch detail as a rendered view is delivered (RFC 035, 2026-10-13 — see FR-030): at prikk ≥ 0.39, from Block detail’s patch list and from the Queue, with prikk’s spans rendered as spans (RFC 021 F2 — rendering them as line diffs would be invention) and a raw view of prikk’s own fields. What is still open under this entry is (a) above: no arbitrary-point comparison, which prikk has refused rather than deferred
UD-10Block-addressable content. RETIRED at prikk 0.46 (RFC 038 F3, measured at 0.46.0 and 0.51.0): prikk cat --path <p> --ref <bare block id> returns the file’s bytes at that block (exit 0), and --format json gives path-content-v1 metadata. The claim was that --ref resolved a published branch only, so a block id was not addressable as a content root — verified three ways in RFC 021 and filed upstream as letter 006 §5.FR-033’s range case, which it blockedNothing depends on it any more. FR-033 is delivered from prikk diff, whose hunks carry the content, so Compare never needed cat at a block; the requirement is unblocked either way.

6. Traceability Matrix (use cases → functional requirements)

Use casePrimary FRsSupporting FRs / NFRs
UC-01 Open & orientFR-001, FR-002, FR-003FR-005, FR-104, NFR-P03, NFR-R03
UC-02 Browse historyFR-010, FR-011, FR-012, FR-013FR-014, FR-015, FR-016, FR-017, UD-01
UC-03 Inspect a patchFR-030FR-035, FR-036, UD-01
UC-04 Compare blocksFR-033FR-032, NFR-P04
UC-05 Review & commitFR-034, FR-050FR-055, UD-03, UD-06, UD-08
UC-06 Queue & sealFR-051, FR-052FR-121, FR-104
UC-07 CheckoutFR-053, FR-054FR-120, FR-110
UC-08 BranchesFR-070, FR-055FR-015, FR-110
UC-09 TagsFR-071FR-072
UC-10 RollbackFR-083FR-120, FR-121, FR-052
UC-11 MergeFR-080, FR-081, FR-082FR-084, FR-110, UD-07
UC-12 RefusalsFR-110, FR-111FR-112, NFR-I03
UC-13 BundlesFR-090, FR-091FR-004, FR-014
UC-14 Sync loopFR-092, FR-093FR-094, FR-006, FR-121
UC-15 Received & adoptFR-014, FR-072, FR-103FR-082, FR-091
UC-16 Verify & auditFR-100FR-035, FR-111, NFR-P05, UD-02
UC-17 RecoverFR-101, FR-102FR-105, FR-106, NFR-S04
UC-18 Signing readinessFR-104NFR-S01, NFR-S03
UC-19 ResumeFR-122FR-005, CON-4, NFR-R01
UC-20 Offline artifactFR-004FR-091, NFR-S06
UC-21 Undo one blockFR-085FR-120, FR-121, FR-050, CON-3, C-T4f

Persona coverage check: P-1 lives in UC-01–08, 12, 19; P-2 in UC-02–04, 11–12, 16, 20; P-3 in UC-06, 08–11, 13–15, 17–18; P-4 in UC-15–16, 20 with NFR-S posture. Every FR traces to at least one UC; UD items trace to the FRs they unblock.

Rules-derived items (v0.2): NFR-U01–U03 cross-cut every UC’s default views (P-1 is the calibration persona; P-2/P-4 are the advanced-mode audience); NFR-S07 and CON-6/CON-7/ASM-4 are process/structure constraints realized by the threat model (stikk-03), the internal design (stikk-04), and the stikk repository skeleton rather than by individual use cases.


End of Requirements Specification v0.1. Next document: External Design (task 02) — note that its current draft also assumes Git semantics (rebase flows, staging views, drag-to-cherry-pick, HEAD in the status bar) and should be revised against this document’s OS-1…OS-10 and the terminology mapping before drafting begins.

stikk — External Design Specification

Documentstikk External Design Specification (black-box view)
Versionv0.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
Date2026-08-31
InputsRequirements 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/
AuthorityDefines 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 schemeBD- 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.

IDActorDerived fromMay do (via stikk)
AC-01Viewerno signing readiness, or read-only mode onEvery read surface: browse, inspect, compare, verify, evidence, exchange inspection (FR-121 tier 1)
AC-02AuthorAUTHOR readiness presentViewer + queue-affecting: commit (FR-050), rollback draft (FR-083 steps 1–3) (tier 2)
AC-03MaintainerMAINTAINER readiness presentAuthor + history-publishing: seal, merge execution, branch/tag publication, trust changes, tag adoption, sync build/seal (tier 3)
AC-04Operatorany human at the machine, explicit confirmationsRecovery 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 at path (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): 0 launched/utility ok · 2 usage error · 3 config invalid (config check failure) · 4 environment unsuitable (e.g., TUI without a TTY, unsupported terminal). The TUI/GUI session itself always exits 0 once 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 to prikk <verb> and exit 2 — 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):
ViewPurposeGrounding
Orientation (root)health, refs summary, queue depth, worktree marker, signing readinessUC-01, FR-002
Historylineage of the focused/selected ref; queue tier on top; filtersUC-02, FR-010–017
Patch Detailone patch as a diff + raw operation viewUC-03, FR-030
Block Detail & State Treeblock metadata, signatures, file tree at block, file content at stateFR-031/032
Comparetwo-block state difference, expandable to content diffsUC-04, FR-033
Changesworktree-vs-baseline for the focused ref, per-file diffsUC-05, FR-034
Queuethe 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
Refsbranches (open/closed/received) and tags; create/close/tag actionsUC-08/09, FR-070/071
Merge Evidencebaseline/left/right slots; evidence report; plan; execute entryUC-11, FR-080–082
Exchangebundle export/verify/import; sync-loop checklist; pending claims; peer dashboardUC-13/14, FR-090–094
Trust & Keysadopted maintainer keys; add/remove; signing readiness detailUC-15/18, FR-103/104
Verify Reportstage list, per-item findings, signature outcomes, exportUC-16, FR-100
Recoverydoctor findings + safe repair; lock inspector; compactionUC-17, FR-101/102/105
Refusal Explanation (overlay)verbatim message, gloss, next steps, glossary links, session historyUC-12, FR-110/112
Glossary / Help (overlay)witness kinds, verify codes, terminology mapping, key referenceFR-111
Command Palette (overlay)fuzzy access to every operation/view/ref/recent objectFR-125
Background Operations (overlay)running/finished long operations, progress, cancelNFR-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), or no ref focused when 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 it fit’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 to prikk's default: …; (4) drop that segment. The focus (or no ref focused), (loading)/(error), ●n queued, every badge and ⟳ n are 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, as r’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:
FromUser actionTo
anypalette selection / deep linknamed view (stack reset to Orientation + target)
Orientationchoose refHistory
Historyopen patch / open blockPatch Detail / Block Detail
History / Refssend block to Compare slotCompare (armed when both slots filled)
History / Refssend ref-or-block to Merge slotMerge Evidence
Changescommit actionCommit confirmation → Queue
History (queue tier)pQueue (RFC 028: the tier names whose queue it is, and points here)
anyseal actionSeal ceremony → History (on success) (the Queue view has no seal action; sealing happens in the ceremony — RFC 028)
Merge Evidenceexecute (confluent only)Confirmation → History
Merge Evidenceoutcome is a refusalRefusal Explanation overlay
any refused operationautomaticRefusal Explanation overlay (FR-110)
Exchange (sync step)step completenext checklist step (FL-12)
Recoveryclear lock / repairtyped 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’s actions holds 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, and keys.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 which b named the wrong action, and Tab/Shift-Tab pane cycle, / find within a view (FR-013) and y copy the focused id or path (FR-124) were never built — they are recorded as not built rather than claimed, and FR-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. Enter opens 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; ←, Esc and q go back, and of the three only Esc and q quit 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 ? help and q back never 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’s Title). 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 to plain when it does not answer; light and dark send no query; high-contrast paints stikk’s own black-and-white pair over the whole frame; plain adds no colour of stikk’s own. high-contrast is one of the themes rather than a separate option beside them, because in a terminal it is a palette and nothing else. NO_COLOR applies to system, 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 path prints 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 = value entries; 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 to stikk 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 catalog TU-05 describes. 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):
VariableOwnerEffect
STIKK_CONFIGstikkAbsolute path of the config file to use
STIKK_STATE_DIRstikkOverride state directory
STIKK_READ_ONLY=1stikkForces read-only mode for the session (NFR-S01); cannot be overridden from inside the UI
STIKK_LOCALEstikkLocale override (NFR-I01)
NO_COLORconventionDisables color in TUI and headless output (CL-06)
TERM, platform a11y/motion settingsOSRespected as found (TU-10, NFR-A04)
PRIKK_AUTHOR_KEY_ID / PRIKK_AUTHOR_SEED / PRIKK_MAINTAINER_KEY_ID / PRIKK_MAINTAINER_SEED and other PRIKK_*prikkPass-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:
InputFormNotes
Repositorylocal filesystem pathFR-001; no URI schemes exist (OS-4)
Bundle filefile 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 assistantFR-092/093; opaque to stikk
stikk config fileCF-01/CF-02validated by CL-04
stikk session stateCF-01 state dirstikk-owned; safe to delete
EnvironmentCF-04 cataloguePRIKK_* 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 json passed through byte-verbatim, labelled as prikk’s verify-report-v1 schema (FR-100); (b) stikk-authored exports of evidence/report/refusal views as plain text and as JSON under a versioned stikk-export-v1 label (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):
CategoryCovers (examples)MutatesCancellableLock behaviourSurfaced error classes
read-historyref lists, lineage, patch/block reads, ref chainsnoyesnone held by stikkintegrity-finding, environment
read-statestate trees, content at block, comparisonsnoyesnoneintegrity-finding, environment
worktree-analysischanges vs baseline (UD-03 route)noyesnoneenvironment
queue-mutationcommit, rollback draftyesbetween prikk calls onlyprikk-internal, per callrefusal, lock-conflict, not-ready
publicationseal, merge execute, branch/tag publishyesbefore execution onlyprikk-internal, per callrefusal, lock-conflict, not-ready, integrity-finding
exchangebundle export/verify/import, sync build/accept/sealimport/build/seal yesbefore execution; long imports abortable per core semanticsprikk-internalrefusal, limits, integrity-finding
integrityverify, doctor (read)noyesnoneintegrity-finding
trustkey add/remove, tag adoption, readiness probeyesbefore executionprikk-internalrefusal (TOFU), not-ready
recoverydoctor repair, lock clear, compactionyesbefore executionprikk-internal / explicitrefusal, 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 -9 at 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 itemsRealize
BD-01…05CON-1/2/4, NFR-S02/S05, NFR-R02, FR-106, ASM-3
AC-01…04FR-104, FR-121, NFR-S01, FR-101/102/105
CL-01/02FR-001, FR-005, UC-01
CL-03FR-055, FR-124
CL-04(no direct FR — flagged; supports CF-02, OP-01, NFR-R03)
CL-05/06/07CON-1, UD-02, UD-05 (non-conflation), NFR-A03
TU-01UC-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/03FR-002, FR-055, FR-104, NFR-S01, NFR-A03, NFR-P01
TU-04FR-120 (armed previews), FR-110 (auto-overlay), UC navigation
TU-05/06/07/13NFR-A01, FR-125, FR-121; FR-013 and FR-124 not built (RFC 061 decision 6)
TU-08FR-110/111/112, NFR-I03
TU-09FR-121, FR-052, FR-102/103, NFR-S04
TU-10/11NFR-A03/A04, NFR-T02, FR-124, NFR-P01
TU-12 / GU-09NFR-U01/U02/U03, FR-123, CF-03
GU-01FR-014/015, FR-035/036, FR-122, FR-123
GU-02/03/04FR surface parity (FR-123); FR-004, FR-053, FR-070–072, FR-090–094, FR-100–105; NFR-S01
GU-05FR-033, FR-080, FR-004/091, FR-053, FR-120; OS-1/OS-3 (deliberate absences)
GU-06/07/08FR-123, NFR-A02/A03/A04, CF-03
CF-01CON-4, NFR-R01, CL-04
CF-02OP-01, NFR-R01
CF-03FR-121 (tighten-only), FR-015, FR-005, NFR-A03/A04, NFR-I01; OS-2 (absence)
CF-04NFR-S01/S03, NFR-I01, CL-06
CF-05NFR-I01
FL-01UC-01; FR-001/002/003/055/104
FL-02UC-02; FR-010/012/013/122; UD-01
FL-03UC-03; FR-030/035
FL-04UC-04; FR-033/124
FL-05UC-05; FR-034/050/051/121; UD-01/03/08
FL-06UC-06; FR-052/104/110
FL-07UC-07; FR-053/054/120
FL-08UC-11; FR-080/081/082/084; UD-07
FL-09UC-12; FR-080/110/111/112; OS-2
FL-10UC-10; FR-083/120/121; UD-01
FL-11UC-13/20; FR-004/090/091/014
FL-12UC-14; FR-092/093/094/122
FL-13UC-15/18; FR-072/103/104; NFR-S04
FL-14UC-16; FR-100/035/111; NFR-P02/P05
FL-15UC-17; FR-102; NFR-S04
FL-16UC-19; FR-122/106; NFR-R01
CT-01FR-001/004/091/092; OS-4; CF-01/04
CT-02FR-100/124; CON-1; NFR-S02; NFR-R01
CT-03CON-1; UD-02 (seam deferred); FR-106/110; NFR-S04; NFR-P02
CT-04FR-110/100/101/104/092; NFR-R03
CT-05FR-106/120; NFR-S04
OP-01NFR-P03/P05; CF-02; FR-001/002/005; OS-7
OP-02NFR-P01/P02; TU-11
OP-03FR-110/102/104/100/101; NFR-I03; CT-04
OP-04FR-106; NFR-R02; CT-05
OP-05NFR-R01/R02
OP-06NFR-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.

stikk — Internal Design Specification

Documentstikk Internal Design (detailed design; white-box)
Versionv0.1 (draft for review)
Date2026-08-31
InputsRequirements v0.2, External Design v0.2, Data Model & Lifecycle v0.1 (stikk-05), Threat Model v0.1 (stikk-03), prikk 0.27.1 reality, project rules (.git-exclude/rules/)
ScopeHOW stikk is built: crate/module decomposition, the operation layer, the prikk integration seam, the frontends, concurrency, error taxonomy, and testing strategy. Cites design-item IDs (BD/AC/CL/TU/GU/CF/FL/CT/OP), requirement IDs, and data IDs (DM/LC/INV).
ID schemeAR- architecture · MOD- module/crate · SEAM- prikk integration · OPL- operation-layer · FE- frontend · CC- concurrency · ER- error handling · TS- testing

Governing rules (project-instructions-*.md): Rust, 2024 edition, 2018+ module style (foo.rs + foo/ subdir, no mod.rs); tests in sibling tests.rs/tests/ modules, never #[test] inline in the implementation file; English only; design specs are the source of truth for tests (CON-6). Data-structure rule: long-term safety, maintainability, simplicity, balanced generality (INV-1…9 already encode this).


1. Architecture (AR-…)

AR-01 — The layer cake

stikk is one workspace of five layers; dependencies point strictly downward (no cycles), mirroring the discipline stikk’s own audit praised in prikk.

┌───────────────────────────────────────────────────────────┐
│  FRONTENDS         stikk-tui   │   stikk-gui                │  presentation only
├───────────────────────────────────────────────────────────┤
│  OPERATION LAYER   stikk-core  (the one shared operation    │  FR-123, CON-2
│                    set both frontends call; owns no I/O)    │
├───────────────────────────────────────────────────────────┤
│  DERIVATION &      (view-models, diff/tree render,          │  VW-*, DM-08
│  STATE              change-token, DerivedViewCache)         │
│                    — folded into stikk-core, see MOD-04     │
│                    stikk-state (config, sessions, exports)  │  DM-01..10, LC-*
├───────────────────────────────────────────────────────────┤
│  PRIKK SEAM        stikk-prikk (the ONLY code that talks to │  CON-1, SEAM-*
│                    prikk; hides the transport entirely)     │
├───────────────────────────────────────────────────────────┤
│  SHARED            stikk-model (id/ref/error types, the     │  ER-*, CT-04
│                    request/response category vocabulary)    │
└───────────────────────────────────────────────────────────┘
  • AR-02 — The seam is the only door to prikk. Nothing above stikk-prikk knows how prikk is reached (subprocess vs. linked library — SEAM-01). This is the load-bearing decision of the whole design: it localizes CON-1, UD-02, UD-04, and the version-skew handling (NFR-R03) to one crate, and makes the two candidate transports swappable without touching the operation layer or frontends.
  • AR-03 — The operation layer owns no I/O and no widgets. stikk-core is a pure orchestration layer: it turns a user intent into a sequence of seam requests + state reads/writes + view-model productions, applying the confirmation tiers (FR-121), preview-first rule (FR-120), and capability gating (AC-01…04). Both frontends drive the same stikk-core API — this is the mechanical guarantee behind TUI/GUI parity (FR-123); an operation present in one frontend only is impossible because neither frontend defines operations.
  • AR-04 — Frontends are thin. stikk-tui and stikk-gui translate input events into stikk-core calls and render the view-models stikk-core returns. They hold no repository logic; they may hold widget state (scroll position, focus) that is never authority (INV-8).

AR-05 — Why this shape (rule: balance, not over-abstraction)

The temptation is a generic “backend abstraction” mirroring prikk’s object model. Rejected (DM-N2): mirroring prikk would invite treating stikk types as authority. Instead the seam exposes prikk’s operations (verbs), not prikk’s storage (nouns), so stikk can never accumulate a shadow object store. The one deliberate generality is the request/response category vocabulary (CT-03), shared by the seam and the operation layer, so a new prikk operation slots into an existing category with known idempotency/cancellability/lock semantics rather than inventing its own.


2. Crate & module decomposition (MOD-…)

Workspace members (Rust 2024, 2018+ module style throughout):

MOD-01 — stikk-model (shared kernel, no I/O)

  • id.rs — newtypes over prikk object ids/ref names (parse/validate/abbreviate; never fabricate).
  • error.rs — StikkError enum with the CT-04 classes (Refusal, LockConflict, NotReady, IntegrityFinding, Limits, Environment, StikkInternal), each preserving prikk’s verbatim message (NFR-I03, FR-110); implements source() and is #[non_exhaustive] (a lesson taken straight from stikk’s audit of prikk’s own PrikkError).
  • category.rs — the RequestCategory enum (CT-03 ten categories, since RFC 045 added Materialization) with each variant’s declared mutates/cancellable/lock metadata as const data, so the operation layer reads policy off the type.
  • capability.rs — Capability (Viewer/Author/Maintainer/Operator, AC-01…04) and the readiness → capability mapping.

MOD-02 — stikk-prikk (the seam — SEAM-*)

  • lib.rs — the Prikk trait (SEAM-02): one method per request category, taking typed requests, returning typed responses or StikkError. This trait is the entire prikk contract; everything above depends on the trait, not the implementation.
  • cli_backend.rs + cli_backend/ — the CLI-driving implementation (SEAM-03): spawns prikk, supplies args, drains stdout/stderr fully before inspecting exit (UD-04 EPIPE guard), classifies the 0/1 exit + message text into StikkError (UD-05), and parses output. Parsing is confined here and per-command: verify --format json is parsed as prikk’s verify-report-v1; other commands’ human output is parsed by pinned, version-gated readers that refuse rather than guess on an unrecognized shape (UD-02 discipline: never screen-scrape unpinned prose).
  • version.rs — probes prikk’s version at handshake (SEAM-05), gates the validated range (NFR-R03), and selects the parser generation.
  • env.rs — reads PRIKK_* presence (LC-13, DM-N1). Since RFC 026 that presence answers readiness only on prikk ≤ 0.39; above it, readiness comes from prikk’s own key status through Prikk::readiness, and env.rs’s second job is detecting a stale PRIKK_*_SEED that a ≥ 0.40 prikk no longer reads. It is the only module allowed to look at those variables, and it never reads a *_SEED value, only whether it is set. Threat-model anchor (A-KEY).
  • null_backend.rs (test only, sibling cli_backend/tests.rs style) — a scripted Prikk impl for deterministic operation-layer tests without a real repository (TS-02).
  • Deferred, not designed here: a lib_backend.rs linking prikk crates directly. The trait (SEAM-02) exists precisely so this can be added later without disturbing callers; the choice is left to a follow-up RFC because prikk’s libraries are pre-1.0 (UD-02, ASM-1).

MOD-03 — stikk-state (stikk-owned durable data — DM-, LC-)

  • config.rs (+ config/) — DM-01 load/validate/atomic-write, unknown-key preservation (INV-4, LC-1/2).
  • session.rs — DM-04 SessionState, id-only anchors, focused-ref reconciliation (LC-6), private-mode gate (LC-8).
  • recents.rs — DM-03.
  • handle.rs — DM-02 RepositoryHandle: repository discovery and the canonical path that keys session state. (The fingerprint derivation this line described was deferred — RFC 003, LC-9; there is no fingerprint to derive.) It calls the seam only, never reading .prikk/ (INV-1).
  • sync_progress.rs — DM-05 (artifact paths only).
  • refusal_log.rs — DM-06.
  • export.rs — DM-10 ReportExport writer: temp-then-atomic-rename (LC-12), verbatim passthrough vs. stamped stikk-export-v1 (INV-7). Applies the redaction rule stikk inherits from prikk (threat model C-I3, trust-threat-model.md:210-211): a stikk-authored export never contains blob bytes, raw span/replacement text, absolute host paths, or .prikk private paths; the same rule gates any diagnostic log stikk writes.
  • paths.rs — resolves the CF-01 user-scope locations per platform; the one module that knows where stikk’s files live, and it refuses any path inside a repository (INV-2 enforced in code).

MOD-04 — derivation & rendering (VW-*, DM-08) — folded into stikk-core

Design change, recorded 2026-09-04 (was made implicitly during implementation and is documented here retroactively — see the note at the end of this section). stikk-view was specified as a separate crate; it does not exist. Its responsibilities live in stikk-core beside the operations that produce them, and the shipped workspace is six crates (stikk-model, stikk-prikk, stikk-state, stikk-core, stikk-tui, stikk), not seven. The module names below are therefore stikk-core modules; those marked (not yet built) are still ahead.

Why this is the right shape: the derivation layer is a set of pure functions over seam responses with exactly one consumer — the operation layer that calls them — and no independent dependency direction of its own. A separate crate would add a compilation boundary and a public API surface without separating any concern, against the project’s balance, not over-abstraction rule (AR-05). The layering property that matters (AR-01: frontends depend only on stikk-core and stikk-model; nothing above the seam touches prikk) is unchanged, because it never depended on view-models living in their own crate.

What is not excused by this: the decision was taken during implementation rather than recorded first, which §2.3 of the development workflow prohibits. This note is the correction, not a ratification of the route.

  • history.rs, changes.rs, orient.rs — the view-models per VW-01…11, produced from seam responses.
  • diff_render.rs (not yet built — blocked on UD-09) — renders a prikk patch’s operations as a human diff (FR-030).
  • tree_render.rs (not yet built) — state-tree rendering (FR-032).
  • change_token.rs (not yet built — RFC 003) — LC-4 token acquisition + comparison; the shared staleness primitive (AR-05).
  • cache.rs (not yet built) — DM-08 DerivedViewCache with the LC-10 validity rule and LRU bound; correctness never depends on it (INV-6).
  • glossary.rs — DM-09 product-asset content, keyed by prikk codes with the missing-code degradation (NFR-I03). Built.
  • size_guard.rs (not yet built) — TU-11 oversized-renderable summary-then-expand (threat T-DO1).

MOD-05 — stikk-core (operation layer — OPL-*)

  • op.rs (+ op/) — one module per operation family (history, inspect, compare, work, refs, merge, rollback, exchange, trust, integrity, recovery), each a function taking typed intent + a &dyn Prikk + &mut state, returning a view-model or a staged preview.
  • confirm.rs — the FR-121 tier machine and FR-120 preview-first enforcement (a mutating op cannot be executed without a matching confirmed preview token).
  • capability_gate.rs — AC gating; every mutating op checks capability and re-checks readiness at the seam before executing (defense in depth with the seam).
  • refresh.rs — the FR-106/LC-4 external-change reconciliation invoked around every operation.

MOD-06 — stikk-tui (FE-) and MOD-07 — stikk-gui (FE-)

Frontends. Each: an input→intent mapper, a renderer per view (TU-01 / GU-01 inventories), the overlay layer (refusal TU-08, confirm TU-09, palette TU-07, glossary, background-ops), and i18n string binding (NFR-I01). They share nothing but stikk-core and stikk-model — no code path lets one frontend reach the seam or state except through stikk-core (AR-03).

MOD-08 — stikk (the binary / launcher — CL-*)

Arg parsing for the launcher contract only (CL-01…07), the config check/config path/--version utilities, TTY detection (CL-06), and dispatch to the chosen frontend. Deliberately tiny; holds no operations.


3. The prikk seam in detail (SEAM-…)

SEAM-01 — The transport question, isolated

Two candidate transports exist; the design commits to the trait, not the transport, and ships the CLI backend first:

CLI backend (v1)Library backend (deferred)
Talks tothe prikk binaryprikk crates linked in
Honours CON-1yes (public CLI)yes (public crate APIs)
Machine outputonly verify --format json (UD-02)typed returns
StabilityCLI command set (stable-ish)pre-1.0, “may change without notice”
Riskoutput parsing fragility (UD-02), EPIPE (UD-04), process overheadchurn against unstable APIs
Decisionv1 default — parse-surface confined + version-gatedfollow-up RFC once prikk libs stabilize
  • SEAM-02 — The Prikk trait is the contract: nine methods matching CT-03’s categories, plus handshake() (version + capability probe) and change_token(). Every method returns Result<Response, StikkError>; long/cancellable ones take a cancellation signal and report progress (OP-02). The trait is Send + Sync-bounded so the frontends can call it off the UI thread (CC-01).
  • SEAM-03a — Newtypes are validators at the parse boundary, not carriers above it. stikk-model’s ObjectId and RefName exist to reject shapes prikk would never emit — a non-hex id, an empty or control-character-bearing ref name. They are applied inside cli_backend/parse, which refuses (StikkError::Environment, UD-02) on a bad value; the parsed structs then carry plain String fields. This is deliberate and uniform: RFC 009 F2 chose it for ObjectId, RFC 012 F-d chose it for RefName after measuring the alternative. Carrying the newtypes upward would add a wide mechanical ripple — 17 files, including the four runnable examples whose readability is a deliverable — for a guarantee already established at the only point untrusted values enter. Inert rendering (C-T2a) remains independent and complementary: validation is not a reason to drop an inert() call.
  • SEAM-03 — Output-parsing containment. All parsing lives in cli_backend/parse/ with one module per prikk command and a golden-fixture test per parser generation (TS-03). A parser that meets an unrecognized shape returns StikkError::Environment naming the mismatch and the prikk version — it never fabricates a partial result (UD-02). When prikk grows --format json on more commands, a new parser generation is added beside the old; the old is retired only when the supported version floor rises.
  • SEAM-04 — Mutation calls are single-shot and pre-checked. The seam never retries a mutating call (NFR-S04, INV via CT-05); the operation layer re-runs preconditions and lets the user decide. The seam surfaces LockConflict distinctly (FR-106) so the operation layer can present “another writer is active”, not corruption.
  • SEAM-05 — Version gate. handshake() records prikk’s version; outside the validated range the seam still permits read-category calls where safe and refuses mutation categories, feeding OP-06’s disabled-with-reason presentation.
  • SEAM-06 — No key material crosses the seam. stikk passes prikk no seeds; prikk reads its own environment. The seam’s env.rs reads only presence (LC-13). This is asserted by a test that greps the seam for any read of a *_SEED value (TS-04).

4. Operation-layer mechanics (OPL-…)

  • OPL-01 — Intent → plan → (preview) → confirm → execute → reconcile. Every operation runs this pipeline: build a typed intent; ask the seam for a plan/preview where prikk offers one (checkout, deletion, merge, rollback, compaction — FR-120); render the preview and obtain the tiered confirmation (FR-121); execute the single seam mutation; reconcile affected view-models from fresh reads (FR-106). Read operations skip preview/confirm.
  • OPL-02 — Preview tokens bind preview to execution. A confirmed preview yields a token stamped with the change-token (LC-4) it was computed under; execution refuses if the current change-token differs (CT-05) — the user re-previews. This is the mechanism that makes “another writer moved the ref between your preview and your click” safe (FL-08 step 6).
  • OPL-03 — The ceremonies are explicit state machines. Seal (FL-06), rollback (FL-10), and the sync assistant (FL-12) are multi-step machines with persisted progress where the requirement says resumable (DM-05 for sync); each step is its own confirmed seam call; cancelling stops before the next call and reports completed steps (OP-02).
  • OPL-04 — Capability is checked twice. Once in capability_gate for UI affordance (disable + reason), once at the seam boundary before the mutating call (readiness can lapse between render and click). Both derive from the same readiness → capability map (MOD-01).
  • OPL-05 — Errors never bypass the taxonomy. Every fallible path returns StikkError; the operation layer maps class → presentation per OP-03 and never converts a refusal into a retry (NFR-S04).

5. Frontends (FE-…)

  • FE-01 — Shared view-model contract. stikk-core returns view-models (its own types — see MOD-04); each frontend has a renderer per view-model type. Adding a view = one view-model + two renderers; the operation is defined once (AR-03).
  • FE-02 — TUI (stikk-tui): a main loop with an immediate-mode or retained renderer (choice deferred to program design; either satisfies TU-01…12); the overlay stack (TU-02) is a view-model list rendered above the active view; keybindings resolve through the config’s action-id map (CF-03); TTY-only (CL-06); degrades per TU-10.
  • FE-03 — GUI (stikk-gui): a desktop toolkit (choice deferred to program design; must expose platform accessibility APIs — NFR-A02, and support i18n — GUI rule) rendering the same view-models into the GU-01 pane structure; drag-and-drop is constrained to the GU-05 legal targets by making drop handlers accept only the typed ids those targets expect (an illegal drag has no handler, so cherry-pick/stage gestures are structurally impossible, not merely hidden).
  • FE-04 — i18n. All user-facing strings resolve through a locale catalog (en/ja/nb — NFR-I01); ids/paths/key-ids are never passed through translation (NFR-I02); prikk’s verbatim messages are shown as-is with an optional localized gloss beside them (NFR-I03). Catalogs are data, hot-swappable at runtime (CF-05).
  • FE-05 — Progressive disclosure (TU-12/GU-09) is a render-time depth parameter threaded from config/advanced-mode into each renderer; it changes what fields render, never which operations exist (NFR-U03).

6. Concurrency (CC-…)

  • CC-01 — One UI thread, seam off-thread. Frontends keep the UI responsive (NFR-P01) by running seam calls on a worker; results post back to the UI thread. The Prikk trait is Send + Sync; view-models are owned values handed across the boundary (no shared mutable repository state exists to race — stikk holds none).
  • CC-02 — One mutating operation per repository in flight (CT-05): the operation layer holds a per-repository mutation gate (an async lock in stikk’s process); reads may run concurrently. This is stikk-side serialization for UX coherence; prikk’s own locks remain the real guard (BD-04). The gate matters most for bundle import, whose object writes prikk performs before taking any lock (audit / concurrency-locking.md:186-198, “Known and accepted, not fixed here”): stikk’s own gate ensures it never launches an import concurrently with another stikk mutation, and stikk never presents concurrent import as safe (threat model ASSUME-2).
  • CC-03 — No repository lock held across think-time (NFR-R02): a seam mutation acquires and releases prikk’s lock entirely within one call; stikk never opens a preview with a lock held. Cancellation between ceremony steps therefore never strands a lock.
  • CC-04 — Cache access (DM-08) is single-writer/multi-reader within the process; a stale token discards rather than blocks (LC-10), so cache contention can never deadlock a render.
  • CC-05 — Kill-safety (NFR-R01): all stikk-state writes are temp-then-atomic-rename; a crash mid-write leaves the previous file intact; a crash mid-operation leaves the repository to prikk’s crash-safety and stikk re-reads on next launch.

7. Error handling (ER-…)

  • ER-01 — One error type, seven classes. StikkError (MOD-01) carries the CT-04 class + prikk’s verbatim message + structured context (path, object id, prikk version where relevant). #[non_exhaustive], source() implemented — stikk applies to itself the fix its audit recommended for prikk’s PrikkError.
  • ER-02 — Verbatim preservation is mandatory (NFR-I03, FR-110): the seam captures prikk’s message unmodified into the error; no layer above rewrites it; the refusal overlay shows it and adds the localized gloss separately (never in place of it).
  • ER-03 — Class → presentation is centralized (OP-03): a single mapping in stikk-core decides overlay vs. banner vs. inline vs. routed-into-view, so presentation is consistent across frontends and testable in isolation (TS-05).
  • ER-04 — stikk-internal faults are contained (OP-03): a panic/bug in stikk surfaces a fault screen stating the repository was untouched (true by INV-1), preserves session state (already flushed, LC-5), and offers read-only continuation. No stikk fault can express itself as a repository write, because only the seam writes and the seam only writes on an explicit confirmed mutation.

8. Testing strategy (TS-…)

Rule: design specs are the source of truth for tests (CON-6); test modules are siblings, never inline (project-instructions-rust.md).

  • TS-01 — Spec-traced unit tests. Each stikk-core operation has tests asserting the FR/FL it realizes: preview-first (FR-120) — a mutating op with no confirmed preview token is rejected; tier enforcement (FR-121); capability gating (AC); verbatim-error preservation (ER-02).
  • TS-02 — Operation tests use the null backend (MOD-02): a scripted Prikk returns canned responses/errors, so every FL branch (including refusals, FL-09) is exercised deterministically with no repository.
  • TS-03 — Golden-fixture parser tests (SEAM-03): real prikk CLI outputs captured per command per version generation; a parser change that would misread a fixture fails. The verify-report-v1 passthrough is byte-compared (INV-7/CT-02).
  • TS-04 — Security invariants as tests: no seam read of a *_SEED value (LC-13/DM-N1, C-I1); stikk-state::paths refuses any repository-internal path (INV-2, C-E2 — primary control since prikk has no foreign-file backstop); an export/log carries no redaction-listed content (C-I3) and is always stamped or byte-verbatim (INV-7); Unverifiable never maps to a pass state (FR-035, C-T2c′). These encode the threat model’s key controls (stikk-03) as gates, echoing prikk’s own boundary-gate discipline.
  • TS-05 — Error-presentation tests (ER-03): class → presentation mapping asserted per class.
  • TS-06 — Round-trip state tests (LC-*): SessionState with a now-missing focused ref degrades to default (INV-5); a derived cache is discarded when its stamped change token is no longer current (LC-4/LC-10) (this line previously described a moved-repository fingerprint; deferred — RFC 003); a corrupt state file resets to defaults (NFR-R01).
  • TS-07 — Integration (real prikk). A small suite drives the real prikk binary through the CLI backend against a fixture repository (init→commit→seal→verify), mirroring prikk’s own conformance approach; gated to the mutation platforms (NFR-T01). GUI testing uses the rules’ niri msg/screenshot workflow (project-instructions-gui-common.md) at 1280×720.
  • TS-08 — Frontend parity test (FR-123): a shared table of operations asserted present in both frontends’ intent maps — a build-time check that neither frontend omits or invents an operation.

9. Traceability (design areas → requirements/design/data)

AreaRealizes
AR-01…05CON-1/2, FR-123, BD-01…05, DM-N2, INV-1
MOD-01…08the full requirement surface via the layers; project-instructions-rust.md module/test style
SEAM-01…06CON-1, UD-02/04/05, NFR-R03, NFR-S03, FR-106, CT-03, LC-13
OPL-01…05FR-120/121, FR-106, AC-01…04, NFR-S04, CT-05, FL-06/08/10/12
FE-01…05FR-123, TU-01…12, GU-01…09, NFR-A02, NFR-I01…I03, NFR-U01…U03, OS-1/OS-3 (structural absence in FE-03)
CC-01…05NFR-P01, NFR-R01/R02, CT-05, BD-04
ER-01…04CT-04, FR-110, NFR-I03, OP-03, INV-1
TS-01…08CON-6, every FR/FL under test; NFR-T01; GUI rule; threat-model controls (stikk-03)

Deferred to program design (next document): TUI renderer style (immediate vs retained), GUI toolkit selection, the exact stikk-export-v1 schema (promised by CT-02), the action-id catalog behind CF-03/TU-05, and the concrete change-token signal set (LC-4/LC-9) within the seam. All are bounded here; none reopen a requirement.

End of Internal Design v0.1. Companion data document: stikk-05 (Data Model & Lifecycle). Security document: stikk-03 (Threat Model).

stikk — Data Model & Lifecycle Specification

Documentstikk Data Model & Lifecycle (design-level; feeds Internal Design and Threat Model)
Versionv0.1 (draft for review)
Date2026-08-31
InputsRequirements v0.2, External Design v0.2, prikk 0.27.1 reality, project rules (.git-exclude/rules/)
ScopeThe data stikk itself owns and its lifecycle. prikk’s repository objects (patches, blocks, refs, tags, trust policy, WAL) are not stikk’s data — stikk reads them through prikk and never persists copies as authority. This document is deliberately explicit about that line because it is the project’s central safety property (CON-1, NFR-S02).
ID schemeDM- data entity · LC- lifecycle rule · VW- view-model (ephemeral) · INV- invariant

Design stance from the rules: design data structures for long-term safety, maintainability, and simplicity; balance feature-fit against general flexibility; avoid both rigid feature-coupling and vague over-abstraction (project-instructions-general-common.md).


1. The two-world model

INV-1 — stikk owns no repository truth. Every durable datum stikk writes is a convenience — a pointer, a preference, a cache, or an export snapshot — that can be deleted with no effect on any repository (CON-4, NFR-R01). Nothing stikk stores is ever read back as authority about repository state; on every use, repository facts are re-derived from prikk. This single rule is what makes stikk safe to run against a repository another tool is also using (BD-04, FR-106).

Two data worlds, never mixed:

WorldOwnerAuthorityWhere it livesstikk’s relationship
Repository worldprikkprikk.prikk/ + worktreereads via prikk; never writes; never caches as truth
stikk worldstikkstikkuser-scope config + state dirs (CF-01)full read/write, atomic, deletable

INV-2 — Nothing stikk-owned lives inside a repository. No .prikk/, no worktree dotfile, no sidecar next to repository files (CON-4). stikk’s state is keyed by repository identity but stored away from it. This is stikk’s own responsibility, not something prikk will catch: prikk’s .prikk/ has a design invariant — “No name under .prikk/ is created after init” (repository-layout.md:77-79) — but there is no general foreign-file scan; verify inspects only refs/tmp/ and a retired object tree, so a stikk file written into containers/, active/, trust/, cache/, or .prikk/ root would go undetected (and a stray worktree file would additionally risk being captured by the next commit: .prikkignore, prikk 0.29+, can exclude a matching path, but only if a rule already covers it — UD-08 retired, RFC 009 F5 — so stikk cannot rely on it as a backstop for its own state). The control is therefore in stikk-state: the path resolver refuses any repository-internal target before every write, enforced by test (threat model C-E2, internal design MOD-03 paths.rs).


2. Entities stikk owns (DM-…)

All stikk-owned data is small, human-comprehensible, and non-secret (INV-3, below). Grouped by store.

2.1 Configuration store (one file, user-authored — CF-01/CF-02)

  • DM-01 — Config. The single declarative config file. Fields (from CF-03): keybindings (per stable action id), theme, locale, advanced-mode default, confirmation strictness (default|strict, tighten-only), external-editor command template, diff context, show-closed-branches default, accessibility flags (reduced-motion/high-contrast/ascii-only), recents length, and a per-repository override section. Human-owned: stikk reads it, validates it (CL-04), and may write it only through an explicit in-app settings action that the user confirms; stikk never silently rewrites the user’s config file.
    • INV-4 Unknown keys are preserved on any stikk-initiated rewrite, never dropped (a user’s newer key must survive an older stikk writing the file back).

2.2 State store (stikk-managed, user-scope — CF-01)

  • DM-02 — RepositoryHandle. The identity stikk uses to recognize a repository across sessions and to key everything below. Fields: a canonical absolute path (the key, for now — see LC-9); a display name; last-opened marker. No repository content — a handle names a repository, it does not describe it.
  • DM-03 — RecentRepositories. An ordered, bounded (CF-03 length) list of RepositoryHandles (FR-005). Pure convenience; losing it costs nothing.
  • DM-04 — SessionState (per repository). What UC-19/FR-122 resumes: focused ref name (a string, re-validated against prikk on load — LC-6), last active view id, active History filters (FR-012 predicate values only: ref/author-key/kind/purpose/path — all re-applied against fresh data), pane layout / advanced-mode override, and scroll/selection anchors expressed as stable object ids, not indices. INV-5: every stored reference into repository content is an id or a name that stikk re-resolves on load; a resolution miss degrades to a default, never an error (FR-122, NFR-R01).
  • DM-05 — SyncAssistantProgress (per repository, per peer-exchange). The resumable checklist state for FL-12: role (sender/receiver), current step, and the paths of the artifact files produced/consumed so far — never their contents (the bytes are prikk’s/the peer’s; stikk holds only where they are). A missing/moved artifact path invalidates the step with a re-pick prompt, never a crash.
  • DM-06 — RefusalHistory (per session, optionally persisted). The session’s refusal explanations (FR-112): the verbatim prikk message, the classified error class (CT-04), the operation attempted, and timestamps. Persisted only if the user has not enabled a private/ephemeral session (LC-8). Content is diagnostic text, not repository authority.
  • DM-07 — UIPreferencesRuntime. Ephemeral-but-persisted-on-change runtime toggles that aren’t “settings” proper: last window size/position (GUI), last-used export directory, advanced-mode current value. Flushed atomically on change (OP-05).

2.3 Cache store (derived, disposable — CF-01 state dir)

  • DM-08 — DerivedViewCache (per repository). Memoized results of expensive read-only derivations (block-state trees, comparisons, evidence reports) keyed by (canonical repository path, prikk version, input object ids, derivation kind) — the repository component follows DM-02’s own key; the fingerprint originally proposed here was deferred (LC-9) — and stamped with the repository-change token current when computed (LC-4). Never a source of truth: a cache hit is used only after the change token is confirmed still current; any mismatch discards it and re-derives (FR-106, NFR-P04). INV-6: deleting the entire cache store is always safe and only costs recomputation.
  • DM-09 — GlossaryContent. The witness-kind and verify-finding explanations (FR-111) plus the Git→prikk mapping. Ships with stikk (a product asset, versioned with the release), not user data; listed here because views bind to it. It is keyed by prikk finding/witness codes, so a prikk version introducing a new code that the glossary lacks must degrade to “no gloss yet — showing prikk’s message only” (NFR-I03), never hide the message.

2.4 Export outputs (stikk-authored, user-directed — CT-02)

  • DM-10 — ReportExport. Two shapes, both written only on explicit user action to a user-chosen path: (a) prikk’s verify --format json passed through byte-verbatim under prikk’s own verify-report-v1 label; (b) stikk-authored stikk-export-v1 (evidence/report/refusal snapshots) as text and versioned JSON. INV-7: a stikk-authored export is a labelled snapshot — it carries the repository’s canonical path, prikk version, and capture time, and states in-band that it is a point-in-time view, so it can never be mistaken for live repository authority when read back later or elsewhere.

2.5 What stikk deliberately does NOT store (the negative model)

  • DM-N1 — No key material, ever (INV-3, NFR-S03). Not the seed, not a derived key, not a hash of a seed. stikk reads PRIKK_*_SEED presence from the environment for readiness display and holds nothing. Key ids (public identifiers) may appear in views and logs; secret material may not exist in any stikk-owned datum, in memory beyond the moment of use, or in any log.
  • DM-N2 — No repository object copies as authority. Rendered content (a diff, a tree) may sit in a view-model for the moment it is displayed and in DerivedViewCache under the change-token guard; it is never persisted as a durable record of what the repository contains.
  • DM-N3 — No shadow trust store. stikk never records its own notion of which keys are trusted; trust is prikk’s MaintainerTrustPolicy alone, read live every time it matters (FR-103, FR-104).
  • DM-N4 — No shadow ref/branch state. The focused ref (DM-04) is a client-side pointer preference, not a HEAD; it stores a name, and prikk remains the authority on whether that ref exists and where it points (FR-055).

3. View-models (ephemeral — VW-…)

View-models exist only while a view is open; none are persisted (except as the id-only anchors in DM-04). They are listed so the internal design has a stable vocabulary and so the “nothing persisted here” property is explicit.

IDView-modelSourced live from prikk each open/refreshNotes
VW-01OrientationSummaryref counts, queue depth, worktree marker, readiness, last-verify statusFR-002; readiness from env presence + prikk trust read
VW-02HistoryListref lineage + queue tierFR-010; paged/progressive at Tier-2 scale (NFR-P03)
VW-03PatchView / BlockViewone patch/block detail + rendered diff/treeFR-030/031/032
VW-04CompareResulttwo-block state diffFR-033; cacheable (DM-08)
VW-05ChangesViewworktree-vs-baselineFR-034 via UD-03 route
VW-06QueueViewqueued patches + thresholdsFR-051
VW-07EvidenceReportmerge outcome + witnessesFR-080; cacheable
VW-08VerifyReportViewevery stage prikk reports (14 at prikk 0.39, 17 at 0.51 — measured, never written down) + items + signature outcomesFR-100; passthrough export source. Built 2026-10-15 (RFC 040), for the verdict, the failing conditions and the stages; items and signature outcomes are not in prikk’s JSON (RFC 040 F3)
VW-09TrustView / ReadinessViewadopted keys + per-role readinessFR-103/104; no secrets
VW-10ExchangeViewbundle reports, sync checklist, pending claimsFR-090–094
VW-11RecoveryViewdoctor findings, lock inspector rowsFR-101/102

INV-8 — View-models are write-through-nothing. A view-model may trigger a prikk mutation (via the operation layer), but the view-model itself is never the record of that mutation’s result; on completion the affected view-models are re-sourced from prikk (OP-02, FR-106).


4. Lifecycles (LC-…)

4.1 Config lifecycle

  • LC-1 — Load. At launch: read DM-01 → validate → on syntax error, fall back to full defaults with a visible notice and a pointer to stikk config check (OP-01, CF-02). Unknown keys warn (named) and are ignored, never block launch, never dropped (INV-4).
  • LC-2 — Change. Theme/locale/advanced-mode apply immediately; other changes apply on restart, stated in the settings surface (CF-05). A stikk-initiated write of DM-01 is atomic and preserves unknown keys and comments where the format allows.

4.2 Session lifecycle

  • LC-3 — Open repository → SessionState. Resolve DM-02 (canonical path); locate DM-04 for that path; re-validate every stored reference against prikk (focused ref exists? filter targets resolvable?) — misses degrade to defaults (INV-5). Compute VW-01 within the NFR-P03 budget with no implicit full verify (NFR-P05).
  • LC-4 — Repository-change token. On open, and on each refresh, stikk obtains a cheap change indicator from prikk’s observable state (e.g., ref-pointer/index/WAL extents — the internal design binds the exact signals within CON-1) and stamps it as the current token. Any view or cache computed under an older token is stale: reads refresh passively with a notice (OP-04); armed mutation previews invalidate and their execute action disables until regenerated (CT-05, FR-120).
  • LC-5 — Flush. SessionState and UIPreferencesRuntime flush atomically on every meaningful transition (view change, focus change, filter change), not only at exit, so kill -9 loses at most the last transition and never repository state (OP-05, NFR-R01).
  • LC-6 — Focused-ref reconciliation. The stored focused ref (DM-04) is re-checked against prikk on every load and after every external-change refresh; if the ref was closed or removed, stikk falls back to a present ref and notes it — it never acts on a focused ref prikk no longer has (FR-055, INV-5).
  • LC-7 — Close. No locks are held between operations, so close holds none (NFR-R02); final flush (LC-5); running operations prompt once (OP-05).
  • LC-8 — Private/ephemeral session. A user may open a repository in a mode that persists no SessionState, RefusalHistory, or Recents entry for that session (rules’ GUI-notes “private mode not to store at current session”). Caches under this mode are memory-only and dropped on close. This is a lifecycle mode, not a separate entity.

4.3 Identity & cache lifecycle

  • LC-9 — Repository fingerprint: deferred (RFC 003 decision 4). DM-02 keys session state by canonical path for now, not a content-derived fingerprint. Three reasons, checked against prikk rather than assumed: prikk deliberately has no repository identity — “repositories are anonymous… that is a security property this design has, not a gap in it” (trust-threat-model.md) — so deriving one would work against prikk’s own design intent, not merely be extra effort; the cheapest honest derivation (the genesis/root block) requires walking the entire sealed history, since prikk log has no oldest-first or “give me the root” query; and it would be None for exactly the repositories a user is most likely to be creating — one with no sealed blocks has no root block at all. It is not load-bearing either way: the “same path, different repository” risk it was meant to catch is already covered by INV-5 (every stored reference is re-resolved against prikk on load; a miss degrades to a default) — a fingerprint would have been defence in depth behind a control that already exists, not the control itself. Revisit only if a future need cannot be met by path-keying plus INV-5.
  • LC-10 — Cache validity. A DerivedViewCache entry (DM-08) is usable only if its key matches and its stamped change token equals the current token (LC-4) and the prikk version is unchanged; otherwise discard and re-derive (INV-6). Caches are size-bounded with LRU eviction; eviction never affects correctness.
  • LC-11 — Version skew. On open, stikk records prikk’s version; outside the validated range it enters read-only degradation (NFR-R03, OP-06) and invalidates all caches (their derivations may no longer match).

4.4 Export lifecycle

  • LC-12 — Export. Explicit user action → derive live (never from a stale cache without a fresh token) → write to a temp path → atomically rename to the user’s chosen final path on completion (OP-05). A stikk-authored export is stamped per INV-7. prikk’s JSON is passed byte-verbatim (no stikk reserialization) so it remains valid against prikk’s own verify-report-v1 schema (CT-02).

4.5 Secret-material lifecycle (the critical one)

  • LC-13 — Key material never enters stikk’s lifecycle. stikk observes PRIKK_*_SEED presence — which answers readiness on prikk ≤ 0.39 and, above it, only flags a stale variable (RFC 026) — and then forgets it; it never copies, derives from, persists, logs, or displays seed bytes (DM-N1, NFR-S03). When a mutation needs signing, prikk reads the environment itself — stikk hands prikk no key material because it holds none. Recognized example/tutorial seeds are flagged unsafe by pattern of the public inputs, never by storing the seed (FR-104). This is a threat-model anchor (see stikk-03, asset A-KEY).

5. Entity relationships

Config (DM-01, one, user-authored)
  └─ defaults & overrides consulted by every session

RepositoryHandle (DM-02) ──1:N── SessionState (DM-04)          [keyed by canonical path — LC-9]
        │                          ├─ focused ref name (re-resolved: LC-6)
        │                          ├─ filters (re-applied)
        │                          └─ id-only anchors (re-resolved: INV-5)
        ├──1:N── SyncAssistantProgress (DM-05)  [artifact PATHS only]
        ├──1:N── DerivedViewCache (DM-08)       [token-guarded: LC-10]
        └──1:N── RefusalHistory (DM-06)         [unless private: LC-8]

RecentRepositories (DM-03) ──N:1── RepositoryHandle

ReportExport (DM-10)  ── produced from ── a live VW-08/VW-07/refusal   [stamped: INV-7]

GlossaryContent (DM-09, product asset) ── bound by ── VW-07/VW-08/refusal overlays

[prikk world — NOT stikk entities, shown for the boundary]
  Repository objects: Patch, Block, RefState/RefUpdate, Tag, Blob,
  MaintainerTrustPolicy, WAL queue    ── read live via prikk; never persisted by stikk

INV-9 — Every stikk→repository edge is a re-resolvable reference (id or name), never an embedded copy. Cutting every stikk-owned store leaves every repository byte-identical and every future session correct after re-derivation. This is the machine-checkable statement of CON-1/CON-4/NFR-S02.


6. Design-rule conformance (self-check)

  • Long-term safety: the two-world split (INV-1) and the negative model (DM-N1…N4) mean stikk cannot corrupt a repository or leak a secret through its own data, structurally.
  • Maintainability: ten owned entities, each single-purpose; view-models named once; one identity key (canonical path — the fingerprint originally proposed here was deferred, LC-9) threads sessions, caches, and exports.
  • Simplicity vs flexibility (the rules’ explicit balance): the model is not over-abstracted (no generic “object store” mirroring prikk — that would invite treating stikk data as authority) and not rigidly feature-coupled (SessionState carries predicate values, not view-specific widget state, so a new view reuses it). The one deliberate generality is the change-token guard (LC-4), which every derived/cached datum shares rather than each inventing its own staleness rule.

End of Data Model & Lifecycle v0.1. Consumed by the Threat Model (stikk-03, asset inventory) and the Internal Design (stikk-04, store components and the operation layer that re-derives from prikk).

stikk — Threat Model

Documentstikk Threat Model (security)
Versionv0.1 (draft for review)
Date2026-08-31
InputsRequirements v0.2 (NFR-S01…S07), External Design v0.2, Data Model & Lifecycle v0.1, prikk 0.27.1 security posture (audit audit-2026-08-31-task-1b, prikk’s own docs/src/reference/trust-threat-model.md, path-safety.md, concurrency-locking.md, security-setup.md), project rules
MethodSTRIDE-per-asset, scoped to what a front-end can affect. Trust boundaries first, then assets, then threats with controls, then a residual-risk register.
ID schemeTB- trust boundary · A- asset · T- threat · C- control · RR- residual risk. Threats tagged with STRIDE: Spoofing Tampering Repudiation Info-disclosure DoS Elevation.
MaintenancePer NFR-S07 / rules §Release Deliverables: any release introducing new data flows, external integrations, or auth/signing logic updates this document; other releases verify these controls still hold.

Framing. stikk is a front-end. It holds no repository authority and no secrets (Data Model INV-1, DM-N1). The largest security fact about stikk is therefore a negative: most classic VCS-tool threats (corrupting history, forging signatures, leaking keys through the tool) are out of reach by construction, because stikk cannot write repository bytes (only prikk can — CON-1) and never possesses key material (prikk reads the environment itself — LC-13). This document’s job is to prove those negatives hold and to cover what remains: the seam to prikk, untrusted repository/bundle content rendered as UI, stikk’s own state files, and the ways a front-end can mislead a user into an unsafe prikk action.


1. Trust boundaries (TB-…)

        ┌──────────── the user (trusted operator) ────────────┐
        │                                                      │
   [TB-1 UI surface]                                     [TB-4 environment]
        │  keystrokes, clicks, drops                     PRIKK_* vars, config file,
        ▼                                                OS locale/theme
  ┌───────────── stikk process ─────────────┐
  │  frontends │ operation layer │ view      │
  │  ──────────────────────────────────────  │
  │  stikk-state files   [TB-3 state store]   │◀── user-scope disk (attacker-of-account)
  │           │                               │
  │      [TB-2 the prikk seam]                │
  └───────────┼───────────────────────────────┘
              ▼
        prikk core  ──────────────  .prikk/ + worktree   [prikk's own trust boundary]
              ▲
        [TB-5 untrusted content]  bundles, received refs, artifact files
              (authored by other parties, arriving as files)
IDBoundaryWhat crossesTrust change
TB-1User → stikk UIintents, file selections, drag payloadstrusted input, but the targets it names may be untrusted content (TB-5)
TB-2stikk → prikk (the seam)typed requests / responses; verbatim messagesstikk trusts prikk as the authority; prikk does not trust stikk with keys or storage
TB-3stikk ↔ its own state filesconfig, sessions, caches, exportssame-user disk; an attacker with the user’s account already owns everything (see assumptions)
TB-4Environment → stikkPRIKK_* presence, config, OS settingsPRIKK_*_SEED values are secrets stikk must never read/store (LC-13)
TB-5Other parties → repositorybundles, received refs, sync artifactsuntrusted; prikk keeps them read-only until adopted; stikk must render them as inert data

Assumptions (inherited from prikk’s threat model and stated for stikk).

  • ASSUME-1 — Local same-user trust. The user’s account is the trust base (trust-threat-model.md:123-148: “Repositories are anonymous. Identity lives in signer keys and in patch ids — never in a repository.”). An attacker who already has the user’s local privileges can read the environment, the config, and the worktree directly; defending stikk against that attacker is out of scope, exactly as it is for prikk and for Git. stikk’s job is not to add exposure beyond what the user already has.
  • ASSUME-2 — prikk is correct within its stated posture — including where that posture has stated gaps. stikk relies on prikk’s audited guarantees (TOFU continuity, fail-closed decoders with input ceilings, verify_strict signatures, crash-safe mutation, no lock auto-steal) but must not present them as stronger than prikk itself claims. Three prikk-stated limits stikk must not paper over:
    • Worktree containment is check-then-write, not race-free. prikk’s own path-safety.md:37-38,117-120: “not an openat/O_NOFOLLOW design, not a canonical realpath proof… A concurrent process that mutates the worktree between checks and writes is outside the current guarantee.” (stikk’s lower-level fsutil primitives are openat-anchored, but the materialization containment check is lexical — the weaker claim is the one stikk must honour.)
    • import_bundle object writes are not lock-protected (concurrency-locking.md:186-198: “Known and accepted, not fixed here.”). A front-end must not run a bundle import concurrently with other mutation and imply it is safe.
    • The gated-operation set is not provably complete (trust-threat-model.md:89-94: “no enumeration of gated operations can catch an operation that is absent from it… a standing, unenumerable risk”). stikk must not assert “this operation is trust-gated” beyond what prikk actually gates → RR-7.
  • ASSUME-3 — The exchange channel is the user’s responsibility. prikk moves no bytes and does not encrypt them (sync.md:56-62: a sync build file “contains repository content in the clear… never secrecy. The channel that moves the file is the operator’s choice and the operator’s responsibility.”). stikk neither adds nor can add transport security (NFR-S05).

2. Assets (A-…)

IDAssetOwnerWhy it mattersWorst case if harmed
A-KEYAUTHOR/MAINTAINER seed material (PRIKK_*_SEED)user’s environmentsigning authority for all historyforged patches/seals under the user’s identity
A-HISTRepository history integrity (patches, blocks, refs)prikkthe product’s whole valuecorrupted/rewritten history, false lineage
A-TRUSTThe local maintainer trust policy (TOFU)prikkdecides whose sealed history is “Sound”trusting an attacker’s key → laundering hostile history as sound
A-UNDThe user’s understanding of repository statethe user, mediated by stikkevery safe action depends on a correct mental modeluser authorizes a destructive/wrong prikk action believing it is safe
A-STATEstikk’s own state (sessions, recents, refusal log)stikkconvenience + a small privacy surface (what/where you work)disclosure of activity; misdirection if trusted as authority
A-AVAILstikk’s availability/responsivenessstikka hung tool blocks work and can mask real statedenial of the tool; user acts blind

A-UND is the asset unique to a front-end. stikk cannot forge a signature or corrupt a block — but it can render prikk’s truth misleadingly and thereby induce the user to take a real, prikk-executed action they would not have chosen. Much of this model is about protecting A-UND.


3. Threats & controls (T-…, C-…)

3.1 The seam (TB-2)

  • T-S1 (Spoofing/Tampering) — a wrong or hostile prikk binary. If stikk invokes a prikk on PATH that is not the real one, every response is attacker-controlled.
    • C-S1a The seam records the resolved prikk path and version at handshake (SEAM-05) and surfaces them in Orientation/About; a version outside the validated range degrades to read-only (NFR-R03, OP-06).
    • C-S1b stikk does not elevate this risk beyond the user’s own shell: it invokes prikk the same way the user would. Pinning a specific binary path is offered via config (CF) for users who want it. Residual → RR-1.
  • T-T1 (Tampering) — output-parsing confusion. A malformed or unexpected prikk output shape causes stikk to misrender state (feeds A-UND).
    • C-T1a Parsing is confined to cli_backend/parse/, version-gated, golden-fixture-tested (SEAM-03, TS-03); an unrecognized shape returns StikkError::Environment and refuses to fabricate a partial result (UD-02).
    • C-T1b verify --format json is consumed as prikk’s own schema and passed through byte-verbatim on export (INV-7), never reserialized.
  • T-D1 (DoS) — EPIPE / hung child. prikk’s audited EPIPE panic (UD-04) or a stuck child could hang or crash stikk.
    • C-D1 The seam drains child stdout/stderr fully before inspecting exit (UD-04 guard) and runs the child off the UI thread with cancellation (CC-01, OP-02); a child that exceeds a bound is cancellable by the user.
  • T-E1 (Elevation) — stikk auto-retrying or bypassing a refusal. A front-end that “helpfully” retries a refused mutation, or clears a lock to proceed, would defeat prikk’s safety.
    • C-E1 Structural: the seam never retries a mutating call (SEAM-04); the operation layer never converts a refusal into a retry (OPL-05, NFR-S04); lock clearing is Operator-only, typed-confirmed, and never auto-invoked (FR-102).

3.2 Key material (TB-4, A-KEY) — the highest-value asset

  • T-I1 (Info-disclosure) — leaking a seed. The catastrophic front-end failure would be a seed reaching a config file, a session file, a cache, a log, an export, a crash dump, or the screen.

    • C-I1a stikk never reads a *_SEED value (the exact secret vars: PRIKK_AUTHOR_SEED, PRIKK_MAINTAINER_SEED, security-setup.md:41-52): stikk-prikk/env.rs is the only module touching those variables and reads presence only (LC-13, DM-N1). prikk, not stikk, reads seeds when signing (SEAM-06); prikk “does not provide local secret storage, key generation, or public-key derivation” (trust-threat-model.md:150-157), and stikk adds none.
    • C-I1b No stikk-owned datum has a field capable of holding key material (Data Model §2.5); the UI shows key ids (public) only (NFR-S03).
    • C-I1c Enforced by test: a build-time check greps the seam for any *_SEED value read (TS-04); an export is proven stamped-or-verbatim, never carrying environment (INV-7).
    • C-I1d Crash containment: stikk-internal fault screens and logs never dump the environment (ER-04); the process does not write core dumps of secrets because it holds none.
    • C-I1e (RFC 017 §7; narrowed by RFC 026 §2, 2026-09-13) stikk never invokes prikk key generate or prikk key public (at 0.33 spelled --seed-env, at 0.40+ --seed-file/--role), never invokes prikk setup, and never offers “generate a key for me” — the first creates key material, the second reads a seed, and C-I1a’s presence-only discipline forbids both regardless of how the seed is subsequently displayed. This is a rule with a reason, not a style preference: prikk’s own setup command warns that at least one seed lands in terminal scrollback, and key management is not a history browser’s job. stikk points users at prikk setup verbatim instead of wrapping it. prikk key status is permitted, and it is the only prikk key subcommand that is (RFC 026). The rule’s reason was never the word key: C-I1e forbids creating key material and reading a seed, and key status does neither — prikk’s own help calls it “reads only, signs nothing”, and prikk built it for exactly this consumer after stikk asked. stikk reads it to answer a question it was previously answering wrong in both directions (RFC 026 F1). The source-level guard in cli_backend/tests.rs was narrowed in step and still refuses everything else, including a subcommand prikk has not shipped yet: it fires on key generate, on key public, and on any key <other>, proven by probe in that increment’s review. For the same reason, stikk never parses or quotes setup’s policy: required=1 line — prikk prints it as a hard-coded literal in the voice of a query, and repeating it elsewhere would make stikk a third, independent source of a number that is not real policy.
  • T-I3 (Info-disclosure) — leaking sensitive content through diagnostics/exports/logs. prikk states a redaction rule for its own diagnostics (trust-threat-model.md:210-211): avoid “raw text spans, replacement text, blob bytes, absolute host paths, .prikk private paths, signer secrets, key material, and arbitrary object debug dumps.” A front-end that logs or exports freely could re-leak exactly this.

    • C-I3 stikk inherits the redaction rule (NFR-S03 extended): its own logs and stikk-authored exports (stikk-export-v1) never contain blob bytes, raw span/replacement text beyond what the user is actively viewing, absolute host paths, or .prikk private paths; where such content is shown in a view it is inert (C-T2a) and is not copied into a durable log. prikk’s verify --format json passthrough is the operator’s explicit act to a chosen path (CT-02), not a background log.
  • T-S2 (Spoofing) — inducing use of an unsafe key. Rendering the public example/tutorial seeds as if they were real signing keys would invite users to “sign” with a publicly-known key.

    • C-S2 (implemented 2026-09-13, RFC 026 §6 — previously marked NOT IMPLEMENTED here since RFC 023 F4 found it listed as in force when it never was.) stikk recognizes the documented example public inputs and flags them as unsafe persistently (FR-104), by pattern of the public value — never by storing the secret. The comparison values are public keys, so this is literal rather than argued, and C-I1a–e is untouched.
      • How it works: prikk ≥ 0.41’s key status reports the public_key that would sign; stikk compares it against stikk_model::example_keys::PUBLISHED_EXAMPLE_KEYS and, on a match, warns on every confirmation that would use it. Persistent, not a one-time notice: recomputed per confirmation from the key actually in effect, so dismissing it and carrying on does not clear it.
      • What it covers, and what it cannot. prikk’s rule reads “Any seed or key values published in Prikk’s README, quick start, docs, tests, review packages, or issue comments … are compromised by publication.” stikk flags the ones it can enumerate — the keys published in prikk’s user-facing documentation, which is where a person following a guide copies one from, and so is the path T-S2 describes. A fixture added to prikk’s tests tomorrow is a published example by that rule and stikk will not know. That limit is stated here rather than left for a reader to discover, because the whole point of RFC 023 F4 was a coverage claim wider than its implementation.
      • Provenance, and the drift that remains. Each value records its prikk file and line, read at 0.41.0, and is re-checked at each re-baseline like any captured fixture. RFC 023 Q1’s plan was to derive these from prikk’s published seeds using key public, so nothing would be transcribed; at 0.41 there are no published seeds left in the user-facing docs (PRIKK_*_SEED retired at 0.40, those pages rewritten), and what prikk publishes now is public keys directly — which removes the derivation but also removes that drift guard. If prikk publishes a new example key, nothing here notices; the upstream letter asking prikk to name its own published values is still the fix, and is still non-blocking.
  • T-T2 (Tampering/Spoofing of the display) — malicious content in a bundle/received ref/patch. A hostile party crafts patch paths, tag messages, ref names, or blob content containing terminal control sequences, spoofed UI framing, homoglyph ref names, or misleading structure, aiming to corrupt the terminal, forge stikk’s own chrome, or mislead the user about what they are about to adopt/merge (A-UND).

    • C-T2a All repository/bundle content is rendered inert (NFR-S06): control characters are escaped/stripped before display in the TUI (no raw passthrough of patch/tag/ref bytes to the terminal), and the GUI renders them as text, never as markup or links.
    • C-T2b stikk chrome is visually distinct from rendered content (a content pane cannot forge a confirmation dialog or a capability badge); confirmations restate the operation and target ids (TU-09), which are prikk-authoritative values, not attacker-supplied display strings.
    • C-T2c Received/untrusted refs are always labelled as such (FR-014) and are read-only until an explicit Operator adoption (TB-5); prikk guarantees import “never touches refs/by-id/, never advances a local ref, and never adopts a MAINTAINER key” (bundle.rs:4-8,382-388) and that offline verify checks structure only — “no signature is cryptographically checked… A verified bundle is not yet a trusted one” (bundle.rs:482-490). stikk shows the sender’s signature standing and prikk’s caveats verbatim (FL-13, FL-11), so the named adversary — “an attacker who re-signs a Patch with their own key and ships that key in the bundle produces a bundle that verifies perfectly” (trust-threat-model.md:69-71) — cannot have their bundle mis-presented as trusted. Adoption is the receiver’s own signed act, and “does not verify who the sender is” (trust-threat-model.md:111-115); stikk’s adopt confirmation states exactly that.
    • C-T2c′ The three-valued author-signature outcome is rendered precisely (FR-035): Sound = verifies against recorded key material; Unverifiable = no key material recorded — non-blocking, must never render as a pass/green state (verify.rs:361-369: “Not a failure: verify still passes, but this must be visible, not silent”); a genuine verification failure blocks and is surfaced as a refusal (it is a propagated Err, not a value — verify.rs:350-355). stikk must not collapse Unverifiable into either Sound or failure, and must state TOFU’s meaning at the point it matters: “the same key_id has always signed under this name here — not that this author’s claimed identity is genuine” (trust-threat-model.md:57-64).
    • C-T2d Homoglyph/case-collision ref names: stikk relies on prikk’s own case-collision refusal at creation (audit: DC-72) and additionally surfaces the raw bytes of any ref/key id on focus (TU-11), so a visually-confusing name can be inspected.
  • T-D2 (DoS) — resource exhaustion via oversized content. A bundle or history with a pathological diff, a huge tree, or a deep structure could hang or OOM the front-end even though prikk’s own ceilings bound what prikk will process.

    • C-D2a stikk knows and surfaces prikk’s input ceilings before an operation runs and never asks prikk to exceed them silently (FR-092). The concrete defaults it displays (all CLI-boundary-only, never persisted, fail-closed on a malformed override): bundle 100,000 objects / 256 MiB (PRIKK_BUNDLE_MAX_OBJECTS/_MAX_BYTES); exchange 100,000 each of five counts / 256 MiB (PRIKK_EXCHANGE_MAX_OBJECTS/_MAX_BYTES); sync summary 100,000 refs / 16 MiB (PRIKK_SYNC_SUMMARY_MAX_REFS/_MAX_BYTES); active-patch warn 800 / hard limit 1000 (PRIKK_ACTIVE_PATCH_WARN/_LIMIT). stikk surfaces the limit it is about to hit, not just the failure after.
    • C-D2b Oversized renderables get a size summary with an explicit “show anyway” (size_guard, TU-11) rather than an unbounded render; expensive derivations run off-thread, cancellable, and are cache-bounded (LC-10) — the front-end never blocks input (NFR-P01).
  • T-R1 (Repudiation) — misattributed history. prikk has no clocks and, below 0.32, discarded commit messages rather than persisting them (audit UD-01, retired at prikk 0.32 — RFC 015 F2); a front-end could paper over either gap by fabricating times/authors, or by asserting a message’s fate that this session’s own prikk does not match, creating false attribution.

    • C-R1 stikk never fabricates time or author name (OS-7 — permanent; prikk has no clock either way). For a message, stikk states this session’s actual, handshake-verified status rather than a blanket claim: not persisted below prikk 0.32, stored and shown verbatim (log’s own patch <id>: <message> line, RFC 015 F1) at or above it — never asserting persistence a running prikk does not have, and never asserting discardal once it does. Refusal history and exports are stamped with the repository’s canonical path + prikk version + capture time as stikk’s record, clearly not repository authority (INV-7). (Corrected 2026-09-05: said “repository fingerprint”; see C-T3a — no fingerprint exists, and DM-02 keys by canonical path. Corrected again 2026-09-06, RFC 015: UD-01 retired at prikk 0.32 — the message half of this control is now version-conditional, not a standing “never persisted” fact.)

3.4 stikk’s own state (TB-3, A-STATE)

  • T-I2 (Info-disclosure) — activity leakage. Sessions, recents, and refusal logs reveal which repositories the user works in and what failed. On a shared or backed-up machine this is a minor privacy surface.
    • C-I2a State lives in user-scope locations with the platform’s default user-only permissions (paths.rs); stikk stores no secrets there (DM-N1) and no repository content as authority (DM-N2).
    • C-I2b A private/ephemeral session (LC-8, from the rules’ GUI notes) persists no session/recents/refusal state — the user’s control for sensitive work.
  • T-T3 (Tampering) — poisoned state file. An attacker (or a corruption) alters a stikk state file to point the user at a wrong repository or replay stale filters.
    • C-T3a State is never authority (INV-1): every stored reference is re-resolved against prikk on load (INV-5); a focused ref prikk no longer has is discarded (LC-6); and a derived cache is used only while the repository change token it was computed under is still current (LC-4/LC-10). (Corrected 2026-09-05: this control previously also claimed “a fingerprint mismatch discards stale session/cache for a moved-or-different repository”. There is no fingerprint — RFC 003 deferred it, because prikk deliberately has no repository identity, deriving one would mean walking the entire sealed history, and it would not exist at all for a repository with no sealed blocks. The control is not weakened by its removal: INV-5 and LC-6 were always the clauses doing the work, which is why the fingerprint was assessed as defence in depth behind a control that already exists.) A poisoned state file thus cannot make stikk act on a false repository fact — at worst it opens the wrong path, which the user sees.
    • C-T3b A corrupt state file resets to defaults with a notice (NFR-R01), never a crash.
  • T-E2 (Elevation) — writing into a repository via state paths. A bug or crafted config that resolved a stikk state path inside .prikk/ or the worktree would violate the boundary. prikk would not catch it: there is no general foreign-file scan of .prikk/ — verify inspects only refs/tmp/ (a non-blocking debris finding) and the retired loose-object tree; a stikk file written into containers/, active/, trust/, cache/, or .prikk/ root would go undetected by verify (agent-confirmed against refs/verify.rs, verify/objects.rs). The “never write foreign files there” rule therefore rests on prikk’s design invariant — “No name under .prikk/ is created after init” (repository-layout.md:77-79) — and on stikk’s own control, not on detection.
    • C-E2 stikk-state::paths refuses any repository-internal path — checked before every state/cache/export write (INV-2), enforced by test (TS-04); the config’s per-repository override cannot relocate state into a repository or worktree. Because prikk provides no backstop here, this control is primary, not defence-in-depth: it is the only thing preventing the boundary violation. A stray foreign file in the worktree would additionally risk being captured by the next commit: .prikkignore (prikk 0.29+, UD-08 retired, RFC 009 F5) can exclude a matching path, but only if a rule already covers it, so stikk cannot rely on user configuration as a backstop for its own state — a second reason the refusal must hold.

3.5 Misleading the user into an unsafe prikk action (A-UND, cross-cutting)

  • T-T4 — the front-end’s signature risk: a confident-but-wrong picture. Every mutating prikk action stikk offers is gated on the user’s understanding. If stikk shows a merge as confluent when prikk would refuse, a checkout as safe when it will overwrite, or a received ref as trusted when it is not, the user authorizes real harm through a correct tool.
    • C-T4a Preview-first, always (FR-120, OPL-01): stikk never offers a mutation without prikk’s own plan/preview where one exists; the user confirms prikk’s plan, not stikk’s summary of it.
    • C-T4b Preview↔execute binding (OPL-02): a preview computed under an old change-token cannot be executed after external change; the user re-previews (defeats “the world moved under the preview”).
    • C-T4c Verbatim truth (ER-02, NFR-I03): prikk’s refusal/warning text is shown unmodified; stikk’s gloss is additive, never a replacement, so stikk cannot soften a refusal into an apparent success.
    • C-T4d Capability honesty (OP-06): unavailable actions are disabled-with-reason, never hidden and never silently no-op — the user always knows why they cannot do a thing.
    • C-T4e Confirmation restates authoritative values (TU-09): ids and counts come from prikk, so attacker-supplied display content cannot dress up a different operation than the one that will run.
    • C-T4f Worktree writes are prikk’s own paths (RFC 058 decision 7): stikk writes worktree files only to undo a block, at paths prikk names, after a clean-worktree check. It fetches every earlier file outside the repository before touching the worktree, writes only bytes prikk’s cat gave it, writes nothing under .prikk/ and no state file, and refuses any path that is not relative and inside the worktree. C-E2 concerns stikk’s own state files and is unchanged.

4. STRIDE coverage matrix

Asset ↓ / STRIDE →STRIDE
A-KEYT-S2 / C-S2— (stikk can’t tamper keys)—T-I1 / C-I1a–d——
A-HISTC-E1 (no bypass)prikk-owned; C-E1/C-T4T-R1 / C-R1——T-E1 / C-E1
A-TRUSTT-T2c (adoption clarity)C-T2c———C-E1 (no auto-adopt)
A-UNDT-T4aT-T2 / C-T2, T-T4 / C-T4T-R1 / C-R1—T-D2 / C-D2—
A-STATE—T-T3 / C-T3—T-I2 / C-I2—T-E2 / C-E2
A-AVAIL————T-D1 / C-D1, T-D2 / C-D2—
SeamT-S1 / C-S1T-T1 / C-T1——T-D1 / C-D1T-E1 / C-E1

Cells that are blank or “prikk-owned” are threats a front-end structurally cannot realize (it holds no keys, writes no history) or that belong to prikk’s own threat model (which stikk assumes, ASSUME-2). The concentration is exactly where a front-end’s real surface is: A-UND (misleading the user) and A-KEY info-disclosure.


5. Residual risks (RR-…)

IDResidual riskWhy it remainsDisposition
RR-1A hostile prikk on PATHstikk deliberately invokes prikk as the user’s shell would; pinning is opt-inAccepted (ASSUME-1); surfaced via version/path display + optional pinning (C-S1)
RR-2Local same-user attacker reads env/config/worktreestikk cannot exceed the OS trust modelAccepted (ASSUME-1); stikk adds no exposure (DM-N1, C-I2)
RR-3Exchange-channel confidentiality/authenticityprikk moves no bytes; the channel is the user’sAccepted (ASSUME-3); stikk shows the “structure ≠ trust” caveat (C-T2c)
RR-4prikk-core defects stikk inherits (e.g. the audited worktree-status break, exit-code coarseness)stikk depends on prikk’s correctnessMitigated by the seam’s version gate + degraded routes (UD-03/05); tracked as upstream dependencies
RR-5A brand-new prikk finding/witness code with no glossary entryglossary is a product asset lagging prikk releasesMitigated: degrade to prikk’s verbatim message, never hide it (C-T1/NFR-I03); glossary updated per release (NFR-S07)
RR-6User fatigue defeating confirmationstiered confirmations can be click-throughMitigated by tiering (only tier-3 uses typed confirmation) and progressive disclosure keeping the common path simple (NFR-U02); not fully eliminable
RR-7An operation that should be trust-gated but is not (prikk’s unenumerable gating gap, trust-threat-model.md:89-94)prikk cannot prove its gated set complete; tag create shipped ungated for monthsInherited from prikk (ASSUME-2); stikk never claims an operation is gated beyond what prikk enforces, and shows the maintainer key id that actually sealed each object (FR-035) so a user can judge provenance directly rather than trusting a “gated” label
RR-8Repo-path case-collision surfaces at seal, not at commit (path-safety.md:28-32); NFC/NFD ref-name collisions are un-rejectedprikk’s stated timing/validation gapstikk surfaces the seal-time refusal with its FL-06/TU-08 explanation and, where it can, warns at commit time that a colliding path was queued; ref-name NFC/NFD collisions are shown by raw-byte inspection on focus (C-T2d)
RR-9The fixture-fidelity discipline is enforced in form, not substance. every_fixture_constant_carries_a_provenance_comment (RFC 009 §0) checks that a fixture constant has a provenance comment naming a prikk version — it does not, and cannot, check that the fixture text was actually captured from a real run. A fabricated fixture with a plausible-looking comment still passesCI has no prikk binary, so nothing mechanically re-validates a fixture against a real one; the discipline currently rests on the implementer’s diligence — precisely what it rested on before RFC 009’s F1 (an invented fixture with no false comment, which was the easier case to have caught)Accepted for now. TS-07 (docs/src/reference/internal-design.md) already describes a real-prikk integration suite as future work; that suite, once built, is this risk’s actual closure — a mechanical guard on comment shape is a floor, not a substitute for it

5.1 Closed violations (history)

Confirmed-and-closed findings are recorded here rather than in the residual-risk table above, so that table reflects only what the project still carries (NFR-S07 requires this document not to imply a control held throughout a release when it did not — that is satisfied by recording the closure prominently, not by leaving it in the residual-risk register once it no longer is one).

  • C-T4c/T-T4 had a live violation in shipped 0.1.0, not a theoretical gap: the Changes view silently dropped prikk’s worktree-status warning that queued-elsewhere paths may be committed-but-unsealed work, then rendered its own contradicting “a commit still captures them” claim — the confident-but-wrong picture this document names as the project’s worst failure, found by running shipped stikk against a real repository rather than by review (RFC 009 F4, 2026-09-04). Root cause: a golden fixture for worktree-status was captured from a scratch repository that never had queued work on another ref, so the warning line was never exercised by a test; the parser silently discarded any flush-left line it did not anchor on. Closed, not merely mitigated, in the same release that found it: the seam now captures the warning verbatim into WorktreeStatus::queued_elsewhere (never paraphrased, ER-02); the Changes view renders it as a distinct inert band above the entries; and the UD-08 filter’s contradicting claim is suppressed whenever the warning is present (RFC 009 decision 3). Regression-tested (carries_the_queued_elsewhere_warning_through_unmodified, queued_elsewhere_suppresses_the_contradicting_ud08_claim).

6. Control-to-requirement traceability

Control themeControlsBacking
No key material in stikkC-I1a–d, C-S2, SEAM-06NFR-S03, LC-13, DM-N1, TS-04
Diagnostic/export redactionC-I3NFR-S03, trust-threat-model.md:210-211
No repository authority in stikkC-T3a, C-E2, INV-1/2/5CON-1, CON-4, NFR-S02
No bypass of prikk safetyC-E1, C-T4a–eNFR-S04, FR-120/121, OPL-01/02/05
Untrusted content inertC-T2a–d, C-D2bNFR-S06, FR-014, TU-11, size_guard
Verbatim truth to the userC-T1b, C-T4c, C-R1NFR-I03, FR-110, OS-7, INV-7
Availability under hostile inputC-D1, C-D2a/bNFR-P01/P02, FR-092
Privacy of activityC-I2a/bLC-8, CF-01
Threat-model upkeepthis documentNFR-S07, rules §Release Deliverables

7. prikk-side source citations

Ground-truth anchors for the facts this model rests on (prikk 0.27.1 working tree; cross-checked against the 2026-08-31 audit):

  • Trust boundaries / actors / non-goals: docs/src/reference/trust-threat-model.md — anonymity of repositories :123-148; local-store sole authority :140-141,159-164; threat boundaries + diagnostic redaction rule :205-211; explicitly-not-defended :213-223; AUTHOR key pinning permanence :19-22; unenumerable gating gap :89-94; named bundle adversary :69-71; TOFU-is-continuity-not-identity :57-64.
  • Path/worktree safety: docs/src/reference/path-safety.md — accepted/rejected shapes :49-79; the .prikk-first-component-only limit :85; check-then-write, not race-free :37-38,117-120; case-collision surfaces at seal :28-32.
  • Locks: docs/src/reference/concurrency-locking.md — no auto-steal + rationale :22-24,207-212; asymmetric liveness :213-223; LockConflict ≠ CAS mismatch :109-120,229-230; unlocked bundle-import object writes :175-204.
  • Key supply: docs/src/guide/security-setup.md — env var names :41-52; public-example-seeds-are-compromised + never-commit warnings :106-114; deferred key management :134-141. (Note: this page is stale on AUTHOR trust policy vs. trust-threat-model.md:52-54 + verify.rs — cite the trust-threat-model, not this page, for AUTHOR trust.)
  • Signature outcomes: crates/prikk-store/src/verify.rs:350-369 (Sound/Unverifiable values, failure is Err); non-gating siblings tag_travel.rs:37-57, recognition_claim.rs:113-136.
  • Bundle/received/sync: crates/prikk-store/src/bundle.rs:4-10,382-388 (import never advances a ref/trusts a key), :482-501 (offline verify = structure not trust); docs/src/guide/sync.md:56-93 (in-the-clear, untrusted-input, receiver-signs-under-own-key); docs/src/reference/data-model.md:138-152, data-model-lifecycle.md:161-171 (received refs read-only).
  • Ceilings: bundle.rs:105,111; patch_exchange/artifact.rs:58,63; sync_negotiation/summary.rs:33,36; worktree_patch.rs:79; crates/prikk-cli/src/main.rs:355.
  • Layout / no foreign-file scan: docs/src/reference/repository-layout.md:45-79 (tree + “no name created after init”); confirmed absence of a general foreign-file scan via refs/verify.rs:277-304 and verify/objects.rs:346-353.

End of Threat Model v0.1. This document is a release deliverable per NFR-S07: revisit whenever the prikk seam, a data flow, or the signing/trust surface changes. Companion documents: stikk-04 (Internal Design — where these controls are implemented), stikk-05 (Data Model — the asset/negative-model source).

Development

See CONTRIBUTING.md at the repository root for the full contribution guide. In brief:

Workflow

Design before implementation:

Requirements → External Design → Internal Design → Program Design → Implementation → Testing

The design documents in the reference section are the source of truth for tests — a test validates a design item, not merely the code. Cite the design item id (e.g. FR-050, SEAM-03, C-I1) when you add or change behavior.

Architecture in one paragraph

stikk is a five-layer workspace: stikk-model (shared kernel, no I/O) ← stikk-prikk (the seam — the only code that talks to prikk) and stikk-state (user-scope config/session) ← stikk-core (the one operation layer both frontends drive) ← the frontends and the stikk launcher. Dependencies point strictly downward. The seam is the only door to prikk; the operation layer owns no I/O and no widgets.

Gates

cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --locked

All three must pass.

Two security invariants enforced by test

  1. The seam reads no signing-key value — only presence (crates/stikk-prikk/src/env).
  2. stikk never writes inside a repository (stikk-state::paths::ensure_outside_repository).

Rust conventions

Rust 2024, MSRV 1.88. 2018+ module style (foo.rs + foo/, no mod.rs). Tests are siblings: src/foo/tests.rs with #[cfg(test)] mod tests; in foo.rs, never #[test] inline in the implementation file. No unsafe. No panics on fallible input.

Releasing

stikk ships from two GitHub Actions workflows, both driven by a version tag or a push to main:

  • .github/workflows/docs.yml — builds the mdBook (this site) and the rustdoc API reference and publishes both to GitHub Pages (the book at the root, the API under /api). Runs on every push to main that touches docs or code.
  • .github/workflows/release.yml — on a version tag: gates on the full CI suite, creates the GitHub Release (notes from CHANGELOG.md), publishes every crate to crates.io via Trusted Publishing, and attaches a checksummed, provenance-attested stikk binary for each supported target.

Conventions

  • Tags are the bare Cargo version — no v prefix (Rust convention): 0.1.0, 0.2.0-rc.1. The release workflow refuses a tag that does not equal the [workspace.package] version in Cargo.toml.
  • A tag containing - (e.g. 0.2.0-rc.1) is published as a pre-release.
  • crates.io publishing is idempotent: a crate/version already on crates.io is skipped, so a re-run (or a tag cut after a manual first publish) is safe.

One-time setup (maintainer, in the hosting UIs)

These cannot be done from CI; do them once.

GitHub Pages

Repository Settings → Pages → Build and deployment → Source: GitHub Actions. The next push to main (or a manual run of the Docs workflow) publishes the site.

crates.io Trusted Publishing

Trusted Publishing mints a short-lived token over OIDC, so no crates.io token is ever stored in the repo. crates.io requires a crate to exist before a trusted publisher can be attached, so the first 0.1.0 publish of each new crate name is done once, by hand; every release after that is CI.

  1. First manual publish, from a clean checkout of the tagged commit, in dependency order (each command waits for the index before the next resolves):

    cargo login            # a personal token, used only for this first publish
    cargo publish -p stikk-model --locked
    cargo publish -p stikk-prikk --locked
    cargo publish -p stikk-state --locked
    cargo publish -p stikk-core  --locked
    cargo publish -p stikk-tui   --locked
    cargo publish -p stikk       --locked
    

    (crates.io rate-limits brand-new crate names; if it pauses you mid-list, wait and re-run — the CI job and these commands both skip what is already published.)

  2. Attach a trusted publisher to each of the six crates: crate Settings → Trusted Publishing → Add, GitHub, with

    • Owner / repository: prikk-vcs/stikk
    • Workflow filename: release.yml
    • Environment: release
  3. (Recommended) Add a manual approval gate: repository Settings → Environments → release → Required reviewers. The crates job then waits for a click before any publish.

Cutting a release

  1. Move the ## Unreleased section of CHANGELOG.md under a ## <version> — <date> heading (em dash, no brackets — match the file’s own released sections) and set [workspace.package] version in Cargo.toml to the same <version>.

  2. Land that on main (green CI), then tag and push:

    git tag 0.1.0
    git push origin 0.1.0
    
  3. The Release workflow runs: guard → verify → create the GitHub Release → (approve the release environment, if gated) publish to crates.io → build and attest the binaries. The Docs workflow refreshes the site from main.

Verifying a binary

Each archive ships a .sha256 and a signed build-provenance attestation:

sha256sum -c stikk-<version>-<target>.tar.gz.sha256
gh attestation verify stikk-<version>-<target>.tar.gz --repo prikk-vcs/stikk

What a v0.21.x release is (and is not)

v0.21.x is readable on light and dark terminals, works with text made much bigger, and lists what you can do where you are rather than asking you to remember a letter. It reads orientation, history, block detail — including the files at any block, with their modes, at prikk ≥ 0.46 — worktree changes, the Queue view, Patch detail (what one patch changed, from prikk’s own show report, with content shown byte for byte), Compare (what changed between two points, from prikk’s own diff hunks, at prikk ≥ 0.46 — two blocks, a block and the one before it, any two refs, or the worktree), Verify (prikk’s verdict on whether the repository is sound, with its failing conditions and every stage it ran, at prikk ≥ 0.39), a bundle file (prikk’s own verification of it and what prikk says importing it would change, at prikk ≥ 0.53), the maintainer keys this repository trusts (t, at prikk ≥ 0.54, with your own marked and each recorded sealer judged against the list) and the refusal/glossary surfaces, and performs fourteen mutations — commit (author a worktree capture), seal (freeze the queue into signed history), create a branch, create a tag, close a branch and merge one branch into another (at prikk ≥ 0.42), switch branch (at prikk ≥ 0.46), import a bundle as a received branch and export a branch to a bundle file (at prikk ≥ 0.53), save one file or save a block’s files as they were at a block, undo one block (putting back what it changed as a new commit, which history keeps beside the block itself), and — from the Trust view — adopt a maintainer key or remove one (all at prikk ≥ 0.54) — every one of them preview-first with tiered confirmation, naming the key that will sign where one signs at all. A confirmed commit authors only the worktree its preview showed, the seal confirmation names the patches it freezes, a switch’s confirmation names the exact files it will write and delete, and a merge runs only where prikk’s own plan proves the two sides confluent — never into the branch you are on, and writing nothing to your worktree. An import creates and moves no branch of yours and is declined where it would change nothing or move the received branch back; an export writes outside the repository, never over an existing file, and changes nothing inside it. The two saves write outside the repository too, never over an existing path — both refused in stikk’s own words before prikk is asked — and change nothing in the repository or the worktree. The two trust writes are confirmed by typing the key id, stikk’s first typed confirmations, and neither needs a signing key; a removal says first that it can make blocks the key sealed fail Verify until the key is adopted again. It also notices a change made outside it and refreshes what is on screen, and its commit preview shows a declared rename as prikk’s own verdict resolves it, makes commit unavailable where prikk would refuse a declaration, and names a ref with no published history. Every string it did not write is rendered so that what you read is what prikk reported. Signing readiness is read from prikk itself on prikk ≥ 0.41. It reopens each repository where you left it — the focused ref, the top-level view and the untracked filter, re-checked against prikk before any of it is shown and stored outside every repository; STIKK_PRIVATE=1 remembers nothing. Sync, and checkout of a block or a path, remain unbuilt, and so are adopting a received tag and author keys — the Trust view adopts and removes maintainer keys, and nothing else — and a doctor or lock-inspector view (doctor has no JSON): the Prikk seam has thirty-three methods — handshake, readiness, orientation, history, block_state, refs, tags, worktree_status, queue, show, diff, verify, change_token, commit, seal, create_branch, create_tag, close_branch, switch_branch, merge_plan, merge, bundle_verify, bundle_preview, bundle_import, bundle_export, file_meta, save_file, extract_plan, extract, trusted_keys, trust_add, trust_remove and rename_path — and none for any of them. A release also publishes the four installer scripts (install.sh, uninstall.sh, install.ps1, uninstall.ps1), each with its own .sha256, filled with that release’s version. It drives the external prikk binary at runtime (not a Cargo dependency), validated against prikk >= 0.28, through 0.58.0 — so the release notes must state which prikk version it was validated against and how to install it — a cargo install stikk with no prikk on PATH will open and then explain that prikk is missing, by design.