# PatentForge Lite — User Manual

Applies to the **0.2.2 public stable Windows x64, Apple Silicon and Linux x64 release**.
The archives and their bundled docs are immutable: the Windows installer and macOS bundle
carry their documentation from `55a9f00`, and the Linux archive pins its 52 user resources
at `f1d74e5`. Those bundled copies and the
[tagged snapshot](https://github.com/scottconverse/patent-forge-lite/blob/v0.2.2/docs/USER-MANUAL.md)
predate this publication flip: they still call 0.2.2 a release candidate and describe v0.2.1.
This [current online manual](https://github.com/scottconverse/patent-forge-lite/blob/main/docs/USER-MANUAL.md)
supersedes their download/setup status, not their measured proof. No archive, signature,
tagged snapshot or offline figure is rewritten, rebuilt or recertified by updating this page.
See the [release manifest](https://github.com/scottconverse/patent-forge-lite/blob/main/docs/RELEASE-MANIFEST.md)
for exact bytes and verification limits; it is a maintainer record, not an installed file.

> **Privacy warning for an installed v0.2.1:** Ollama can offer cloud-backed
> models through `localhost`. The 0.2.1 Local label does not prove local
> execution, and an older fallback receipt may name the first configured rung,
> not the provider that answered. Do not use either as proof that confidential
> invention text stayed on-machine. Version 0.2.2 adds the fail-closed metadata
> check and per-call attribution described below; downloading it is a separate
> upgrade and does not rewrite old runs or replace an installed copy by itself.
> See the current status under "Shipped model-picker and locality repair" in the
> repository status notes.

Start with [the ten-minute path](#0-new-here-the-ten-minute-path). Beginners can use synthetic
replay without a model; day-to-day desktop users should read §§4–12; technical users should read
§§13–16. Patent professionals must verify the output: this is research assistance, not legal advice,
and drafts are **not for filing**.

The six figures are local SVG files in `figures/`; they need no JavaScript or internet connection.
Each has an alt description, a text summary and a direct link. Expand “Diagram source” only if
you want the Mermaid text. Keep `figures/` beside this manual when copying it.

---

## Contents

0. [New here? The ten-minute path](#0-new-here-the-ten-minute-path)
1. [What this application is](#1-what-this-application-is)
2. [Set-up: install and what "ready" means](#2-set-up-install-and-what-ready-means)
3. [The first launch](#3-the-first-launch)
4. [Projects and invention intake](#4-projects-and-invention-intake)
5. [Choosing how analysis runs](#5-choosing-how-analysis-runs)
6. [Running an analysis](#6-running-an-analysis)
7. [Reading, keeping and exporting reports](#7-reading-keeping-and-exporting-reports)
8. [Editing, revisions and regeneration](#8-editing-revisions-and-regeneration)
9. [History and versions](#9-history-and-versions)
10. [Keyboard shortcuts](#10-keyboard-shortcuts)
11. [Your data: backup, reset, uninstall](#11-your-data-backup-reset-uninstall)
12. [Troubleshooting](#12-troubleshooting)
13. [For technical users: command line and API](#13-for-technical-users-command-line-and-api)
14. [Privacy and safety](#14-privacy-and-safety)
15. [Known limits](#15-known-limits)
16. [Architecture, for technical readers](#16-architecture-for-technical-readers)

---

## 0. New here? The ten-minute path

You need no account, no key and no model to watch the product work end to end. Recorded replay is a
canned provider: the four analyses run for real, against stored responses, and nothing leaves the
machine when research is off and you do not invoke provider discovery/configuration probes.

![Install, create a synthetic project, run feasibility, then read or export its report.](figures/manual-01.svg)

[Open figure 1](figures/manual-01.svg). Replay needs no model; real invention analysis needs an
authorized on-machine model. Feasibility comes before the other analyses.

<details>
<summary>Diagram source: first analysis</summary>

```mermaid
flowchart LR
    A[Install<br/>§2] --> B[First launch<br/>workspace created]
    B --> C[Create a project<br/>and fill the intake<br/>§4]
    C --> D[Choose Recorded replay<br/>§5]
    D --> E[Start the feasibility analysis<br/>§6]
    E --> F[Read, keep, export the report<br/>§7]
    F --> G{Want real output?}
    G -->|yes| H[Point it at a local model<br/>§5, LM Studio or Ollama]
    G -->|no| I[Try claims, compliance<br/>and the application]
```

</details>

1. **Choose the right v0.2.2 delivery** — §2. Windows x64 uses the EXE, Apple Silicon the
   `.app` ZIP (not a DMG), Linux x64 the portable tarball and its actual versioned directory.
   Verify each matching checksum and read the different trust/acceptance limits.
2. **Launch it once.** The first launch creates your workspace and tells you where it is.
3. **Create a project** and fill in the intake — title, description, technical field. The optional
   context fields make the output better but are not required.
4. **Choose Recorded replay** in Execution mode, then mark the data as synthetic. Replay refuses
   real-invention data on purpose.
5. **Start the analysis** and watch the six stages. Cancel any time; an interrupted run can be
   resumed from its last saved stage.
6. **Read the report** in the reader, switch to Source if you want the raw Markdown, and export it
   as Markdown, HTML or Word.

If something refuses and the reason is not obvious, §12 covers common refusal messages. Keep the
exact status message when reporting a problem.

---

## 1. What this application is

PatentForge Lite is a desktop workspace that runs four patent analyses over an invention you
describe, then produces reports you can export.

**It is not legal advice.** It is a research and drafting assistant. Every analysis is a model's
opinion about text you supplied; models invent citations, misstate law and are confidently wrong.
Anything you file must be reviewed by a registered patent attorney.

**No analysis starts merely by opening a project.** Generation needs an explicit start/resume.
Models → **Refresh** probes local servers and CLI sign-in status and may start an installed,
stopped Ollama server; it does not pull, load or unload a model. Paid APIs need per-run approval.
Replay generation is local, but separately enabling prior-art research can send a synthetic
project's title or technical field to PatentsView even when the generation provider is replay.

### The four analyses

They run in a dependency order. You can run any analysis whose prerequisites have completed.

```
Feasibility  ──►  Claims drafting  ──►  Compliance review
      │                   │
      └───────────────────┴──────────►  Application drafting
```

| Analysis | Stages | Use it to |
| --- | --- | --- |
| Feasibility | 6 | Understand what you have, what exists in the field, and whether it looks patentable |
| Claims drafting | 4 | Get a claim set: strategy, up to 20 claims, examiner critique, revised claims |
| Compliance review | 4 | Check the claim set against the **feasibility analysis** for written description, definiteness, formalities and eligibility. It does **not** review a drafted specification — that arrives with application revisions. |
| Application drafting | 5 | Assemble a draft application: abstract, background, summary, description, drawings |

Each run is immutable. Its inputs, provider, prompt version and upstream text are snapshotted
when it starts, so a later edit never quietly changes a saved result.

---

## 2. Set-up: install and what "ready" means

![Replay needs no model; local needs a loopback model; Cloud needs a session key and approval.](figures/manual-02.svg)

[Open figure 2](figures/manual-02.svg). Save an intake and declare its data before starting.
Off-machine providers and research accept synthetic material only in this version.

<details>
<summary>Diagram source: setup readiness</summary>

```mermaid
flowchart TD
    S[Installer or archive] --> W[Workspace directory<br/>created on first launch]
    W --> D[SQLite database<br/>one file per workspace]
    D --> R{What will you run?}
    R -->|Recorded replay| OK[Ready: no model needed]
    R -->|Local model| L[Loaded loopback model<br/>LM Studio, Ollama or llama.cpp]
    R -->|Cloud API| K[Session key and model<br/>paid approval, synthetic only]
    L --> T[Pick the endpoint and model<br/>in Execution setup]
    K --> T
    T --> OK
```

</details>

You are ready when all four of these are true:

- [ ] the application launches and shows the workspace path in Setup;
- [ ] a project opens and its intake saves;
- [ ] the mode you intend to use is selected, and its prerequisite is satisfied — nothing for
      replay, a reachable loopback model for local, a session key/model and paid approval for Cloud;
- [ ] the data declaration (synthetic or real) is set, because every start refuses without it.

The rest of this section is the platform-specific install detail.

### Windows (x64)

1. Download [patent-forge-lite-0.2.2-x64.exe](https://github.com/scottconverse/patent-forge-lite/releases/download/v0.2.2/patent-forge-lite-0.2.2-x64.exe)
   and its [.sha256](https://github.com/scottconverse/patent-forge-lite/releases/download/v0.2.2/patent-forge-lite-0.2.2-x64.exe.sha256).
   Verify the checksum and the signatures on the
   [v0.2.2 release](https://github.com/scottconverse/patent-forge-lite/releases/tag/v0.2.2)
   before execution. The original private 47-file ZIP is not this public 53-file installer.
2. Run it. It installs **for you only** — no administrator prompt — into
   `%LOCALAPPDATA%\Programs\PatentForge Lite`.
3. Launch from the Start menu or the desktop shortcut.

For a distributed Windows build, verify **both** the installer and installed `pfl-desktop.exe`
have a valid Authenticode signature with publisher **Scott Converse**. Do not bypass an invalid,
missing or unexpected publisher. SmartScreen may still warn about a correctly signed file while
its reputation develops; signing does not guarantee that the warning disappears.
The 0.2.2 app and installer are signed separately; the installer is 7,846,968 bytes and the
embedded app is 22,625,040 bytes. Nonexecuting extraction found the expected 53-file payload.

After publication the signed installer was run over an existing v0.2.1 installation on
Windows 11. The installed `pfl-desktop.exe` matched SHA-256
`6402c6a88ea64e42805a83ea0523a7d4629b6b72904bc42548c5097b2254a759` with Authenticode `Valid`;
the HKCU registration read 0.2.2, and both the Start-menu and desktop shortcuts were correct.
Rollback, uninstall, other Windows versions, a clean guest and interactive input/GPU passes
remain untested. Back up the existing installation and its data before upgrading. The earlier
v0.2.1 silent setup/removal result (exit `0`/`0`, no app launch, user-data folder presence only)
belongs to those older bytes and does not transfer.
Online manual/API publication corrections do not change the bundled copies inside the signed installer.
The historical `patent-forge-lite-0.1.0-x64.exe` remains on
[v0.1.0](https://github.com/scottconverse/patent-forge-lite/releases/tag/v0.1.0).

### macOS and Linux

These are public stable **v0.2.2** downloads with different trust and proof limits,
not equally validated desktop support. The v0.2.1 archives remain published and unchanged;
historical v0.1.0 archives remain unchanged on
their [older release page](https://github.com/scottconverse/patent-forge-lite/releases/tag/v0.1.0).

**Apple Silicon (arm64):** download the
[macOS ZIP](https://github.com/scottconverse/patent-forge-lite/releases/download/v0.2.2/patent-forge-lite-0.2.2-macos-arm64.zip)
and [checksum](https://github.com/scottconverse/patent-forge-lite/releases/download/v0.2.2/patent-forge-lite-0.2.2-macos-arm64.zip.sha256).
The ZIP contains `Patent Forge Lite.app`, **not a DMG**, and is not Intel/universal.

```sh
shasum -a 256 -c patent-forge-lite-0.2.2-macos-arm64.zip.sha256
unzip patent-forge-lite-0.2.2-macos-arm64.zip
open "Patent Forge Lite.app"
```

The seal is **ad-hoc**, **not Developer ID signed or notarized**. Gatekeeper can block it;
local signature integrity does not establish Apple trust or a successful first launch.
Verify provenance before using an OS-provided approval path, and do not disable Gatekeeper
or assume that an “is damaged” error is just quarantine.

After publication the ZIP was verified on macOS 27.2.1 (26B131) arm64 and carried a
browser-form quarantine attribute on all 68 entries. `open` launched the app under App
Translocation; it ran 26 seconds and quit cleanly. `spctl` rejects the bundle and no
notarization ticket is stapled, so Gatekeeper acceptance is not claimed. A Finder
double-click and a real browser download were not tested.
The plist and Mach-O encode a **13.0** minimum as metadata, **not validated runtime support**.
The launch above is not an installed or interactive acceptance pass.

**Linux x86_64:** download the
[Linux tarball](https://github.com/scottconverse/patent-forge-lite/releases/download/v0.2.2/patent-forge-lite-0.2.2-linux-x64.tar.gz)
and [checksum](https://github.com/scottconverse/patent-forge-lite/releases/download/v0.2.2/patent-forge-lite-0.2.2-linux-x64.tar.gz.sha256).
The archive is a deterministic restage of the exact-tag CI ELF and Git-blob resources,
not a recompile. Its member directory is `patent-forge-lite-0.2.2-linux-x64/`.

```sh
sha256sum --check patent-forge-lite-0.2.2-linux-x64.tar.gz.sha256
tar xzf patent-forge-lite-0.2.2-linux-x64.tar.gz
cd patent-forge-lite-0.2.2-linux-x64
./pfl-desktop
```

This is a dynamically linked portable directory, with **no package signature**, not an
AppImage, Flatpak or distro package. It requires **glibc 2.39** — Ubuntu 24.04-class or newer;
nothing older, so Ubuntu 22.04 and Debian 12 are too old for these bytes. A working display/driver,
X11/Wayland, font and graphics libraries are also needed; there is no validated minimal
apt recipe or supported graphics matrix. Do not replace the system glibc to work around
an ABI error. See the [platform runbook](https://github.com/scottconverse/patent-forge-lite/blob/main/docs/PLATFORM-RUNBOOK.md).

After publication the archive was downloaded anonymously, checksum-verified, extracted and
executed on Linux Mint 22.3 x86_64 (kernel 7.0.0-44-generic). With an isolated data directory it
started headless, created its workspace and stayed alive 90 seconds. No virtual display was
available on that host, so no window was rendered or interacted with. The exact-tag CI test
kept the **identical ELF** alive ten seconds under Xvfb/Mesa and observed a fresh profile.
**No fresh clean-desktop test** ran. Extracting it does not install PATH, icon or menu
integration. The supplied
desktop template has `Exec=pfl-desktop` and `Icon=patent-forge-lite`; simply copying it does
not resolve those names. The bundled Linux README has optional per-user copy/menu directions
using absolute paths. Those commands were not installed or tested as part of this release.

### Requirements

- **Analysis needs an inference runtime, unless you use replay.** See
  [Choosing how analysis runs](#5-choosing-how-analysis-runs).
- Local inference needs an **already-installed loopback server** (Ollama, LM Studio or an
  OpenAI-compatible server) and a usable model. Discovery distinguishes loaded models from files
  merely on disk where the server exposes that state. Lite never pulls, loads or unloads models.
- Public v0.2.2 packages were exercised after publication on Windows 11 (installed over v0.2.1),
  macOS 27.2.1 arm64 (launched under App Translocation) and Linux Mint 22.3 x86_64 (headless, no
  window rendered), within the limits above. Interactive input/GPU, rollback/uninstall, a clean
  guest, a macOS Finder double-click or browser download, and Linux desktop/GPU behavior remain
  unverified. Historical Mac launches and older platform proofs remain separate, dated evidence.

---

## 3. The first launch

The window opens on **Projects**. It does not start an analysis. Explicit configuration/model
listing can probe endpoints; Models → Refresh can also start an installed Ollama server.

Three regions matter:

- **The rail on the left** — Projects, Intake, Analysis, History, Report, Models, Setup, Quit.
- **The top bar** — the product name, configured execution mode and recorded
  provider/model details. Configuration is not an actual-route receipt; older
  fallback snapshots may name the wrong rung. Read the history warning in §9.
- **The status bar** — the single most useful line in the application. When something is refused
  or fails, the reason appears here. Read it before assuming the app is broken.

### First run creates your workspace

On first launch Lite creates one SQLite database for you and locks it:

| Platform | Location |
| --- | --- |
| Windows | `%LOCALAPPDATA%\patent-forge-lite\projects.sqlite3` |
| macOS | `~/Library/Application Support/patent-forge-lite/projects.sqlite3` |
| Linux | `${XDG_DATA_HOME:-~/.local/share}/patent-forge-lite/projects.sqlite3` |

Only one copy of Lite can use that workspace at a time (there is a `.lock` file beside the
database). A second launch refuses rather than corrupting anything.

---

## 4. Projects and invention intake

### Creating a project

**Projects → New project.** You get an empty intake form.

### The intake form

| Field | Notes |
| --- | --- |
| **Title** | Short name for the invention |
| **Technical field** | e.g. "Wearable sensors" |
| **Description** | **At least 50 words.** The counter under the box turns green when you meet it; starting an analysis below 50 is refused with an explicit message |

Write the description as you would explain the invention to a colleague: what problem it solves,
what it is, how it works, what makes it different. More detail produces better analysis; there is
no upper limit.

### Optional invention context (nine fields)

Press **Edit optional fields** to open the legacy context fields:

problem solved · how it works · AI components · 3D-print components · what is novel ·
current alternatives · what is built · what to protect · additional notes

All nine are fed to **every** stage of **every** analysis, in their original order, and blank
fields are simply omitted. They are optional but they materially improve output — "what is novel"
and "current alternatives" especially.

**Save intake** (`Ctrl+S`) stores the project. You can keep editing afterwards; unsaved edits are
detected and Lite warns before you navigate away or quit.

### Switching projects

Click any project card on **Projects**. If you have unsaved edits, Lite asks before discarding
them.

---

## 5. Choosing how analysis runs

Open **Setup** to choose a mode and data declaration. Configuration and model-list actions can
probe a server; they do not generate analysis. Models → Refresh also checks availability and
may start an installed Ollama server. Do not equate “no generation” with “no network traffic.”

### Execution mode

| Mode | What it does | Network | Cost |
| --- | --- | --- | --- |
| **Recorded replay** | Plays bundled synthetic model output for every stage | None | Free |
| **Local** | Calls an Ollama or OpenAI-compatible endpoint intended for on-machine use | First hop is loopback, not a locality guarantee | A local address alone does not establish billing or execution location |
| **Cloud** | Anthropic API — selectable on the Setup page, below the local runtime card | Yes | Paid, per run, approved each time |

Start with replay. It is instant, deterministic and free, and it lets you learn the interface
without a model.

> **Cloud is wired in, with a session-only key.** Execution setup offers **Cloud (Anthropic)**: enter a
> model and an API key, click **Configure Cloud with this key**, and approve the paid request per run.
> The key is held in memory for the session only — it is never written to the profile, a run, an
> export or a log. The cost line states that the cost is *unknown until the run reports usage*, with
> the rates that will apply; no figure is invented in advance.

To configure local inference:

1. Enter the **endpoint**, normally `http://127.0.0.1:11434`.
2. Enter the **model name exactly as Ollama reports it** — for example `phi4-mini:latest`. Check
   with `ollama list`.
3. Click **Configure existing local runtime**.

Loopback (`127.0.0.1`, `::1` or `localhost`) identifies the first server, not where
its model executes. In particular, Ollama can list Cloud models at that address.
Version 0.2.2 requires positive local GGUF metadata without remote or
ambiguous markers before every Ollama generation and refuses Cloud/Unverified
models without silently trying a fallback. A model name or loaded flag is not enough.
Older/incomplete Ollama metadata and non-GGUF formats are intentionally blocked as
Unverified. See "The rules that are enforced, and where" in the provider
documentation.
Distinct trusted generic loopback adapters use a different adapter/address policy,
not Ollama GGUF verification. A generic local proxy can still forward traffic or
misreport metadata.
The Ollama adapter refuses remote hosts. A remote OpenAI-compatible gateway is classified as
Cloud, not Local, and requires paid approval plus synthetic data. A remote server is never a
way to send a real invention through the Local declaration.

### Models, assignments and fallback

Open a project, then **Models → Refresh**. The catalogue shows local servers, subscription
programs (Claude, Codex, Gemini), hosted-provider availability and unavailable reasons.
Subscription programs use the operator's own sign-in and can send prompts off-machine; they
are **not local inference**, even though their executable runs here.

- **Use for every workflow** saves the provider at rank 0 for each of the project's four workflows.
- **As fallback** saves rank 1 for those workflows. The configured ladder can try the next
  constructible provider on quota, unavailability, lapsed sign-in, timeout, empty or unreadable
  output. A content refusal, cancellation or unrecognized failure stops it.
- **Next run only** consumes a one-shot override instead of changing project assignments.
- **Report only** assigns feasibility's final-report stage. The CLI/store support finer stage
  assignments; the window is not a full nineteen-stage picker.
- **Automatic for every workflow** clears workflow assignments; it does not start a search for
  a model, generate anything, or clear separate stage assignments. With no constructible workflow
  assignment the configured execution mode remains the baseline.

Configure a baseline mode in Setup even when using assignments. Review the saved provider/model
and data declaration before starting. Fallback is configured behavior, not permission to bypass
local-data or paid-call gates. Live assignment/fallback journeys remain beta verification work.

The Models page can **Save connection** with a name/base URL and list saved endpoints. It is not
a complete credential or connection picker: using `conn-<id>` assignments with a model requires
the technical tools; an OS-store key reference is not resolved by this run path. Do not paste a
key into the URL. No model is downloaded or loaded for you.

### Authorization

A data declaration plus one authorization gates every run:

- **Synthetic test data** — the text is authored test material. Required for Recorded replay,
  which only produces synthetic output.
- **Real invention data (local-only required)** — the 0.2.2 label.
  The text is a real invention and you permit local processing only. Valid only
  with Local mode; replay refuses it outright.
- **Authorize local inference** — required when the mode is Local.

Published v0.2.1 instead labels that declaration **Real invention data (stays on
this machine)**. That wording is not verified network-path evidence; 0.2.2
states the required restriction, not a promise of attested execution.

The declaration is recorded in the run itself, so a saved run always states which kind of data it
contained. A run with neither declaration is refused before any provider call.

### Setup profile

| Profile | Meaning | Usable today? |
| --- | --- | --- |
| **Lean** | Cloud-only. A local runtime is refused outright. | Yes, for Cloud and replay |
| **Full** | Local and Cloud both available. | Yes, for Local, Cloud and replay |

Cloud calls additionally require explicit **paid** authorization for each run; without it, the run
is refused before generation. A single configured provider has no automatic fallback; an explicit
assignment ladder can try its configured alternatives as described above.

### Optional prior-art research

In Setup, enter a session-only PatentsView key and choose **Configure PatentsView research**,
then select **Use PatentsView research for this run** for a synthetic feasibility start.
The service checks consent/prerequisites and duplicate requests before querying. Research runs
**before run creation**, not once per model stage. It records returned references for downstream
workflows and the IDS. A failed query is an error, not proof that no prior art exists.

Research opt-in is separate from the generation provider: replay plus research can send the
synthetic title/technical field to USPTO PatentsView. Turn research off for a fully offline
replay journey. Real-invention research is refused. No live query of the original beta has
been verified; validate every reference and do not infer patentability from a successful HTTP call.

---

## 6. Running an analysis

Open **Analysis**. The workflow tabs show the four analyses; the one you select becomes the
target of **Start new version**.

### Prerequisites are enforced

- **Feasibility** — no prerequisites.
- **Claims** — needs a completed Feasibility run.
- **Compliance** — needs Feasibility and Claims.
- **Application** — needs Feasibility and Claims.

If you start one too early, Lite refuses and names what is missing. It never substitutes some
other run's output.

### During a run

The summary card shows outcome, checkpoints (for example `3/6`), version, provider, event cursor
and attempt count. Below it, the stage ledger shows each stage as done, running, or pending, with
character counts for completed stages. Stage text streams into the output panel as it arrives.

**You can navigate away.** Opening another page, another project, or History does not stop a run
and does not restart it. Come back and the same run is still there.

### Cancel

**Cancel run** asks the runner to stop. Completed checkpoints and usage are preserved; the run
ends in a cancelled terminal state. Cancelling twice is harmless.

### Interruption and resume

If the application is killed, the machine loses power, or you quit mid-run, the run is left
*mapped but unfinished*. On next launch Lite recovers it:

- The Analysis page offers **Resume this run**.
- Resuming continues from the last completed checkpoint. **Completed stages are not repeated**
  and are not re-billed.

Resume requires the same provider, endpoint, model and prompt version as the original run. If
those are no longer available, Lite refuses and tells you why; the correct action is to start a
new version instead of silently changing the inputs.

### Starting a new version

**Start new version** creates a new, immutable version of the same analysis on the same project.
The original run and its report are untouched. Versions accumulate in History.

---

## 7. Reading, keeping and exporting reports

Open **Report**. You will see the saved report for the currently selected version.

### Rendered vs source

- **Rendered** (default) — headings, emphasised labels, tables and code blocks, laid out as a
  document on a paper surface.
- **View source** — the exact markdown that will be exported, as selectable, copyable text.

Both show the same saved text; only the presentation differs. Toggle back with **Rendered view**.

### Export

| Button | Produces |
| --- | --- |
| **Markdown** | `.md` with the report body plus a JSON snapshot appendix recording the exact inputs, provider and prompt version |
| **HTML** | Self-contained single file, safe to open in any browser |
| **Export Word** | `.docx` you can open in Word or LibreOffice and edit |

Each export opens the native save dialog and **never overwrites an existing file** — if the name
exists, the export is refused rather than clobbering it. Exports always describe the *saved* run
identity: the version, run id and input snapshot inside the file match what you selected.

Word exports keep heading structure. If Word offers to "repair" a file, report it as a bug with
a synthetic reproduction if possible. Do not send a real invention or confidential report.

---

## 8. Editing, revisions and regeneration

A completed run is immutable. What you edit is a **document revision**: a numbered, stored
copy derived from a completed run of that document kind.

### Edit and save a revision

1. Open **Analysis** and select the stage whose text you want to change.
2. The editing field holds the run's text; use **Load run text** to reload it.
3. Edit, write a short note, and choose **Save revision**. The new revision is numbered in
   that document's series and anchored to the run it came from.
4. **List revisions** shows the series in order, each row naming its version and base run.

An empty revision is refused: a stored revision always has text.

### Compare revisions

Every revision row offers **Compare vN with v(N-1)**. The comparison is a deterministic line
diff — the same two texts always produce the same output — and the notice reports how many
lines were added and removed. A comparison too large for an exact diff says so rather than
stalling.

### Choose what compliance reviews

On the compliance panel, pick a specific claims or application revision. The run records the
revision it examined, and the report names it. A package only carries compliance findings that
match the revisions it exports, so a review of an older draft never travels with a newer one.

### Regenerate from here onward

**Regenerate from vN** re-runs the chosen stage and every later stage of that workflow, carrying
the earlier stages unchanged from the base run. It is **suffix only**: the interface never
offers a single-stage regenerate. The new run is the next version, and the base run is never
modified. On Cloud, a regeneration asks for paid approval again rather than reusing the
approval given to the original run.

### Export a package

**Export package** writes Markdown, HTML, Word and CSV files plus `manifest.json` into the
directory you name. The manifest records each revision's identity, the reference count, a
SHA-256 for every file, and the compliance run whose findings are included. The directory must
be empty: an export never overwrites an existing package.

### Pick a local model

**Published v0.2.1** has the earlier model-list control and the privacy warning at the
start of this manual. The following describes the **shipped 0.2.2 repair**, verified by
source tests and in-memory layout tests, not by an observed native-window pass:

1. In Setup, enter the endpoint and click **List installed models**. Listing sends no
   inference prompt. Empty, unreachable, waiting and no-search-match states are distinct.
2. The single **Local model** field is both the pending name and a case-insensitive
   substring search. Clear it to browse the list. An exact listed name restores the
   list, so choosing a model does not strand you in a one-row result.
3. Scroll the bounded result area, or Tab to it and use arrows, Page Up/Down,
   Home/End and Enter. Click or Enter only puts a selectable name in the field.
   Escape clears it. Very large inventories show a render-cap count; type to narrow.
4. Read the textual Local/Cloud/Unverified status separately from loaded/downloaded
   state. Cloud and Unverified entries cannot be picked for Local mode. A manually
   typed, unlisted name is not preverified; the backend remains the authority.
5. Click **Configure existing local runtime** to apply. Typing, searching, scrolling
   and picking do not configure or generate. **Applied baseline** and **Not applied**
   compare both endpoint and model, and distinguish Replay/Cloud baselines.

A list belongs to the endpoint it was requested from. Editing the endpoint makes that
list stale, not evidence about the new server. Configure and every Ollama generation
must still pass the locality check even after a successful listing. Saved assignments
or a next-run override can replace the baseline; the run's plan and recorded successful
stage provider are separate facts.

---

## 9. History and versions

**History** lists every saved run for the selected project, newest first: version, analysis,
checkpoints, provider, timestamp and outcome.

Click any row to select that version and open it in **Report**. Selecting a historical version
changes nothing about newer runs; you can export an older version while a newer one is still
running.

Each row is a durable run: its inputs, provider, prompt version and any upstream text it consumed
are stored with it.

The configured baseline, a selected override, the allowed provider plan and a
successful stage's answering provider are different records. Older fallback runs
may contain first-rung attribution, which cannot be repaired from that snapshot.
An unknown stored provider kind can also decode as Replay for safe compatibility;
that does not prove the historical execution used fixtures or made no live call.
Current explicitly configured Replay is a separate no-model-inference choice.
Even correct Local output after fallback does not prove an earlier Cloud request
sent nothing. Treat these records as configuration/result metadata, not a complete
network-attempt audit or a guarantee that an entire mixed-provider run was local.

---

## 10. Keyboard shortcuts

| Keys | Action |
| --- | --- |
| `Ctrl+1` … `Ctrl+6` | Projects, Intake, Analysis, History, Report, Setup |
| `Ctrl+S` | Save intake |
| `Ctrl+Q` | Quit (with warnings) |
| `Tab` / `Shift+Tab` | Move between fields and controls |
| `Enter` / `Space` | Activate the focused control |

Buttons implement keyboard focus and Enter/Space activation; text fields support focus traversal.
These controls still need exact-candidate native keyboard/accessibility acceptance. On macOS use
the platform's primary modifier (`Cmd`) where supported.

---

## 11. Your data: backup, reset, uninstall

**Back up:** close the application, then copy the whole `patent-forge-lite` directory (database,
lock file, and any WAL sidecars). That directory is the entirety of your workspace.

**Move to another machine:** copy that directory into the same per-user location on the new
machine. Keep the application version the same or newer.

**Reset to a clean workspace:** close the application and delete the `patent-forge-lite`
directory. Everything is gone; there is no cloud copy and no undo.

**Uninstall:** use the normal OS uninstaller. It removes the application **and leaves your
workspace untouched**, so reinstalling later keeps your projects. Delete the directory yourself if
you also want the data gone.

---

## 12. Troubleshooting

| Symptom | Cause | Fix |
| --- | --- | --- |
| Nothing happens when you launch; exits instantly | You are running the non-native stub build | Use the installed application or `cargo build -p pfl-desktop --features native` |
| "PatentForge Lite is already using this data location" | Another copy already owns the workspace | Close the other window, or wait for the process to exit |
| "Choose recorded replay or configure local inference first" | No execution mode selected | Setup → select a mode |
| "declare the run's data first…" | Neither declaration ticked | Setup → tick *Synthetic test data* or *Real invention data* (the repair adds *local-only required*) |
| "recorded replay produces synthetic output…" | Real data declared while replay is the mode | Use a trusted Local configuration, or tick synthetic instead |
| "invention title and description of at least 50 words required" | Description too short | Extend the description; the counter turns green at 50 |
| "… must complete a … run before this workflow can start" | Prerequisite analysis missing | Run the named analysis first |
| "Lean setup is Cloud-only…" | Profile is Lean, mode is Local | Setup → choose **Full** |
| "Finish or cancel active work before changing execution mode" | A run is live | Wait, or cancel it, then change mode |
| "cloud/paid providers require explicit paid-provider authorization" | Cloud run without consent | A Cloud run is refused by design; authorize paid use or use local |
| A stage fails with `Ollama HTTP 5xx` | Provider rejected the call | Check the endpoint/model and runtime log; one configured provider is not retried automatically. Only an explicitly configured ladder can attempt an eligible fallback |
| Cloud mode is missing | The Cloud card is below the fold in Execution setup | Scroll the page; enter a model and key, then configure |
| Application fails at launch on macOS/Linux: "could not open display" / Vulkan error | No usable GPU/display in that session | Run inside a real desktop session, not a headless one |
| Word shows a repair prompt | Genuine bug in `.docx` writing | Report a synthetic reproduction; do not send confidential invention text |
| macOS blocks an unsigned app | Quarantine or another integrity/provenance issue | Verify the archive before changing quarantine; see §2. Do not bypass an untrusted download |
| Windows SmartScreen warning | Reputation can be limited even for a signed file | Verify the exact download hash and valid Scott Converse signature; do not bypass an unknown or invalid publisher |

If the status bar shows a message you do not understand, that exact text is the most useful thing
you can report.

---

## 13. For technical users: command line and API

![CLI replay and inspection tools and HTTP commands use the same service, runner, storage and exporters.](figures/manual-03.svg)

[Open figure 3](figures/manual-03.svg). Shared core does not mean identical CLI, API and desktop
features; HTTP actions shown are not invented CLI subcommands.

<details>
<summary>Diagram source: CLI and API boundaries</summary>

```mermaid
flowchart LR
    subgraph CLI[pfl-cli]
      C1[models / settings]
      C2[replay / pipeline / live / resume]
      C3[inspect / revisions / package]
    end
    subgraph API[HTTP, opt-in]
      A1[GET reads]
      A2[POST start / resume / cancel]
      A3[export / download tokens]
    end
    CLI --> SVC[Application service]
    API --> SVC
    SVC --> WF[Workflow runner]
    WF --> DB[(SQLite workspace)]
    SVC --> EXP[Markdown / HTML / Word]
```

</details>

The CLI shares the core but is **not desktop feature parity**: it is a synthetic replay/local
inference harness plus inspection/settings/document tools. There are no `run`, `cancel` or
`export` CLI commands. The HTTP API separately exposes start/resume/cancel and export; the shipped
`serve` host is replay-only. A query-string token authorises **reads only**, and a mutating request
with a foreign `Origin` is refused.

`pfl-cli` **is not included in the Windows installer** — build it from source:

```bash
cargo build -p pfl-cli --release
```

The examples assume the built binary (`target/release/pfl-cli.exe` on Windows,
`target/release/pfl-cli` elsewhere) is on your `PATH`. Use a new, empty directory for each new
synthetic workspace. `serve` needs the marker/database created by replay or pipeline first:

```bash
pfl-cli pipeline --workspace ./synthetic-api    # initializes marker/database and runs all workflows
pfl-cli inspect --database ./synthetic-api/patent-forge-lite.sqlite
pfl-cli serve --workspace ./synthetic-api --addr 127.0.0.1:4330
```

In separate, new workspaces (not prerequisites for the API example):

```bash
pfl-cli replay --workspace ./synthetic-one      # one synthetic feasibility run
# The next command makes real LOCAL model calls with synthetic input only:
pfl-cli live --workspace ./synthetic-local --endpoint http://127.0.0.1:11434 --model phi4-mini:latest
```

Other commands: `import-replay`, `pause-fixture`, `resume`, `models`, `usage`, `revisions`,
`diff`, `save-revision`, `package`, `validate-claims`, `legacy-fixture`, `legacy-preview`,
`migrate` and `settings`. Run `pfl-cli` with no command to print the full list; boolean flags
such as `--mark-chosen` may appear anywhere in the argument list.

`serve` exposes the compatibility HTTP API (health, projects, runs, events, report, export) over
**recorded replay only** — it cannot reach a live provider. Configure `PFL_API_TOKEN` and send it as
`Authorization: Bearer <token>`. Authenticated GETs also accept the configured token in the query,
but do not expose a long-lived token in links; prefer scoped, single-use, run/format-bound export
tokens. Tokenless mode is a separate loopback Host-check policy. See [API.md](API.md) for the exact
endpoints, authentication forms and binding restrictions.

`live` performs **real inference**. It requires an endpoint and model you name, uses synthetic input
only, and never downloads a model.

### Manual references and opt-in research

Both `pipeline` and `live` accept:

```
--references refs.json          # manual prior-art records
--research-endpoint http://127.0.0.1:4331/search  # loopback verification service only
```

`refs.json` is a JSON array of records; any parse error is refused rather than becoming an empty
set:

```json
[{ "reference": "US-2023-0312345-B2", "title": "Container with integrated temperature indicator",
   "assignee": "Example Sensors Inc.", "filing_date": "2023-03-14", "grant_date": "2024-01-09",
   "cpc": "G01K 1/02", "relevance": "Temperature sensing container", "verified": true }]
```

The set is recorded in the feasibility run and inherited by every downstream workflow; the
Information Disclosure Statement is assembled from those records only. `--research-endpoint` points
at a **loopback-only** service implementing `GET {endpoint}?q=&limit=` returning that same JSON
array. Remote hosts are refused. This is not a way to configure arbitrary live search:
the desktop's live adapter is PatentsView with a session-only key and separate opt-in.
A failed search is an error, never an empty result.

---

## 14. Privacy and safety

- **Replay generation is local.** For a fully offline journey, leave research disabled and do not
  invoke provider discovery/configuration probes. Replay plus opted-in research is not offline.
- **Loopback alone does not establish local inference.** Ollama Cloud models can
  be served through a local address; an installed 0.2.1 app has the warning at the
  start of this manual. The 0.2.2 guard checks local GGUF metadata without
  remote/ambiguous markers before each Ollama request. Generic local proxies
  remain a trust limit. A remote OpenAI-compatible endpoint is Cloud-classified.
- **Off-machine providers** include Anthropic/hosted APIs and subscription CLIs. This beta refuses
  real-invention data for all of them. Metered APIs additionally require approval for each run.
- **Research is opt-in.** USPTO PatentsView is available with a session-only key and a per-run opt-in;
  results are recorded as source-verified references and flow into the IDS (not legal validation).
  Even a replay provider can be combined with research on synthetic data. A query that fails is an error,
  never an empty result. Without opt-in, no query is made. Supplied references are used verbatim, and
  the model is told it may not invent citations. It sometimes does anyway. Verify.
- **Secrets** are never written into reports, events or the database. Do not paste credentials into
  the invention fields.
- The application holds an OS-level lock on its workspace, so two instances cannot interleave writes.

---

## 15. Known limits

- Windows distribution requires the app and installer to be signed and verified separately. Local diagnostic builds are unsigned and are not for publication. macOS and Linux artifacts do not have Windows Authenticode signatures; macOS is not Developer ID signed or notarised.
- The public v0.2.2 platforms are not equally verified support. After publication the signed
  Windows installer installed over v0.2.1 on Windows 11 with a matching app hash, valid
  signature and correct HKCU registration and shortcuts; Linux Mint 22.3 ran the archive
  headless with no window rendered; macOS 27.2.1 launched the bundle under App Translocation
  with `spctl` still rejecting it. Interactive input/GPU, rollback/uninstall, a clean guest,
  a macOS Finder double-click or browser download, Gatekeeper acceptance, Linux desktop/GPU
  behavior and a validated macOS runtime minimum remain unverified.
- Cloud execution is **available in the desktop** with a session-only key and per-run paid approval; `pfl-cli serve` remains **replay-only**.
- `pfl-cli` is **not bundled** in any desktop download.
- Real-invention runs are intended to be **Local-only**: replay, Cloud kinds and
  prior-art search refuse them. The 0.2.2 Ollama check is a fail-closed metadata gate,
  not proof of on-machine execution through an arbitrary proxy. Do not put confidential
  invention data into a Cloud or Unverified model or rely on an old Local label as a
  privacy guarantee.
- A provider stream that ends before its terminal frame is recorded as **Truncated**, never as
  Completed; the partial text is not committed as a result.
- Hosted Cloud inference has mock coverage; exact-release paid live-provider acceptance remains
  unverified. Historical provider records are not proof for the exact three-platform release bytes.
- Live research is USPTO PatentsView with a session-only key and per-run opt-in; the generic HTTP
  contract and the fixture source remain for local use. No live query has been verified from this
  build yet, so treat retrieval as unproven until one is.
- There is no tray-resident background mode: closing the window closes the application, and a second launch is refused (exit code 3) because only one instance may write to the workspace.
- Real PatentForge data migration is **not enabled**: the importer is proven on a synthetic fixture only, and importing a real database needs explicit authorization. The preview, credential redaction and re-runnability are implemented and tested.
- A single user profile per machine; there is no multi-user or team mode.

---

## 16. Architecture, for technical readers

The application is a Rust workspace: a domain crate that both the desktop and the CLI link, a
workflow runner that owns jobs, storage over SQLite, provider adapters, and a GPUI desktop.

![Desktop, CLI and API use the service; research is conditional before launch; the runner uses providers and SQLite.](figures/manual-04.svg)

[Open figure 4](figures/manual-04.svg). The view does not own execution. Research, when configured
and authorized for feasibility, happens in the service before creating the run.

<details>
<summary>Diagram source: application components</summary>

```mermaid
flowchart TB
    subgraph Surfaces
      UI[GPUI desktop<br/>pfl-desktop]
      CLI[pfl-cli]
      HTTP[pfl-api]
    end
    subgraph Core
      SVC[Application service<br/>commands, events, authorization]
      WF[Workflow runner<br/>jobs, checkpoints, resume]
      PROV[Provider adapters<br/>replay, local, subscription CLIs, HTTP]
      RES[Research adapters<br/>opt-in prior art]
    end
    subgraph Data
      DB[(SQLite workspace)]
      EXP[Exporters<br/>Markdown, HTML, Word]
    end
    UI --> SVC
    CLI --> SVC
    HTTP --> SVC
    SVC --> WF
    WF --> PROV
    SVC -.opt-in, before launch.-> RES
    WF --> DB
    SVC --> EXP
    DB --> EXP
```

</details>

A run is an immutable input plus a sequence of checkpoints. The runner writes a checkpoint per
stage, so an interruption costs the unfinished stage and not the run. Counts are **6 / 4 / 4 / 5**
for feasibility / claims / compliance / application.

![Authorize, optionally research before creation, then generate and checkpoint each workflow stage and persist its outcome.](figures/manual-05.svg)

[Open figure 5](figures/manual-05.svg). A duplicate start reuses its run without another query.
Research is optional, pre-launch and feasibility-only, not a mandatory per-stage operation.

<details>
<summary>Diagram source: run lifecycle</summary>

```mermaid
sequenceDiagram
    participant U as Operator
    participant S as Application service
    participant R as Runner
    participant P as Provider
    participant Q as Prior-art source
    participant D as SQLite
    U->>S: Start (project, workflow, authorization)
    S->>S: authorize, prerequisites, duplicate check
    opt configured and opted-in synthetic feasibility start
        S->>Q: query before run creation
        Q-->>S: references or error
    end
    S->>D: create run with immutable input
    S->>R: launch owned attempt
    loop each workflow stage (6 / 4 / 4 / 5)
        R->>P: generate (stage, upstream)
        P-->>R: text + usage
        R->>D: checkpoint (text, provider, sequence)
    end
    R->>D: terminal outcome, report only if complete
    S-->>U: sequenced events and snapshots
```

</details>

Storage keeps `runs` five columns wide so a build from before the provider work can still read and
insert rows; the event counter lives in `run_sequences` beside it. Event sequences are per run,
not globally unique: `(run_id, sequence)` is the composite key. Revision lineage to its base run
is stored in the revision payload; that logical edge below is not a separate SQL FK column.

![Projects own runs and intake revisions; events have a composite run ID and sequence key; each run has a sequence counter.](figures/manual-06.svg)

[Open figure 6](figures/manual-06.svg). This is a selected schema/lineage view, not every settings,
provider or migration table.

<details>
<summary>Diagram source: selected storage relationships</summary>

```mermaid
erDiagram
    projects ||--o{ runs : "has"
    runs ||--o{ events : "appends"
    runs ||--|| run_sequences : "counter"
    runs ||--o{ document_revisions : "base run in payload"
    projects ||--o{ intake_revisions : "edits"
    runs {
      text id PK
      text project_id FK
      int version
      text idempotency_key
      text payload
    }
    run_sequences {
      text run_id PK,FK
      int last_sequence
    }
    events {
      text run_id PK,FK
      int sequence PK
      text payload
    }
```

</details>

Nothing in the GPUI view layer executes a provider: the desktop's session actor owns a long-lived
Tokio runtime and the real service/runner, while views send requests and render replies. That separation is
why the headless tests can cover the run path without a window.
