Your work, on your computer.
KHZ Workstation is an open-source, local-first Windows workspace for real files, Office documents, structured data, tasks, repositories, terminal workflows, search, audit history, backup/restore, and optional local AI.
The workspace is the product. AI is optional and OFF by default.
The .NET 9 WPF application currently includes:
- Workspace Composer / Files
- Documents / Sheets / Slides / PDF
- Structured Data
- Search
- Tasks
- Repositories
- Terminal
- Chat
- Activity
- Security
- Integrations
- Settings
- Backup & Restore
Files remain ordinary filesystem files. A KHZ workspace adds stable local identity and metadata under .khz/; it does not require importing the user's work into a cloud database.
KHZ can use a local GGUF model without making AI a dependency of the workstation.
The user configures:
- a local
llama-server.exe; - a local GGUF model;
- optional local LoRA adapter;
- optional chat-template file.
KHZ does not download or silently replace the model. The model runtime is launched as a child process on a dynamic 127.0.0.1 port with llama.cpp offline mode and stays resident between requests.
The UI owns the configured model label. A model claiming to be a different vendor/model is not runtime metadata. Hidden reasoning is not stored in chat history, and common visible reasoning tags are removed from the transcript compatibility path.
Bounded local tools provide directory listing, text read/search, read-only repository inspection, SHA-256-guarded exact text replacement, and PowerShell. File edits and PowerShell require explicit user confirmation; PowerShell cannot run merely because the model requested it.
See docs/AI-BOUNDARY.md.
KHZ keeps Office editing replaceable instead of rebuilding Word/Excel/PowerPoint from scratch.
The repository contains two separate evidence tracks:
- a historical LibreOffice compatibility/round-trip acceptance baseline;
- a WPF ONLYOFFICE embedded spike behind a local gateway.
The ONLYOFFICE spike is not a hardened production deployment claim. Review the Office ADRs and licensing notes before distribution.
.github/workflows/ci.yml runs an ordered, measured pipeline. Each gate either derives its exit code from measured counters or propagates the native tool exit code. Successful Windows builds emit BUILD_WARNINGS=0 and BUILD_ERRORS=0 only after -warnaserror succeeds. Runtime claims remain narrower than build claims: the user's actual model/GPU path must be exercised before local inference is called runtime-verified.
| Job | Gate | Measured line | Exit condition |
|---|---|---|---|
core |
G2 | PASSED>0 FAILED=0 |
passed>0 && failed==0 |
windows-app |
G3 | BUILD_WARNINGS=0 BUILD_ERRORS=0 / CS_PASSED>0 CS_FAILED=0 |
warnings/errors==0, tests pass |
sbom |
G4 | SBOM_ENTRIES>0 FAILED=0 SBOM_DRIFT=PASS |
failed==0 && no drift |
g1-spreadsheet |
G1 | ORACLE_PAIRS_AGGREGATE>0, ROUNDTRIP_STRUCTURE, FORMULAS_SEMANTIC_EQUIV |
aggregate>0 && formula coordinates/semantics + structural features preserved |
corpus-provenance |
G4 | GATE_PROVENANCE=PASS |
provenance complete & hash-verified |
zero-egress |
I5 | EGRESS=0 |
no unexpected non-loopback egress |
g7-nfc-bidi |
G7 | ORDER_BY_WITHOUT_COLLATE=0 |
NFC at boundary + explicit collation |
g8-ui |
G8 | BODY_BELOW_4_5=0 LARGE_BELOW_3_0=0 IS_TABSTOP_FALSE=0 GATE_G8=PASS |
WCAG contrast + keyboard + no text in images |
The core job runs the Python matrix on Windows and Ubuntu across Python 3.11/3.13. The windows-app job enforces the Release TreatWarningsAsErrors gate (0 Warning(s) / 0 Error(s)) and runs the C# null-input test suite via dotnet test.
Requirements:
- Windows 10/11 x64
- .NET 9 SDK
- Microsoft Edge WebView2 Runtime
cd windows
dotnet restore .\KHZ.Workstation.sln
dotnet build .\KHZ.Workstation.sln -c Release
dotnet test .\KHZ.Workstation.sln -c Release --no-buildwindows/KHZ.App/ primary WPF Windows application
windows/KHZ.Tools.Tests/ C# null-input tests (G3)
src/khz_workstation/ deterministic Python services / baseline host
scripts/ verification gate oracles (G1/G4/G7/G8/I5) and build utilities
tests/ core/security regression tests + gate tests
tools/office-spike/ local ONLYOFFICE integration spike
acceptance/ compatibility fixtures, corpus, provenance, reports
SBOM/ SPDX SBOM + per-file SHA-256 (drift-gated)
docs/ architecture and deployment boundaries
LICENSES/ per-component license texts
- Real files stay real files.
- The workspace remains useful without AI.
- Model output is data, not execution authority.
- Sensitive mutations require explicit, observable execution paths.
- Integrations remain replaceable.
- Claims require evidence.
KHZ Workstation source is licensed under Apache-2.0 unless a file states otherwise. Third-party components and Office engines retain their own licenses, notices, and trademarks.
KHZ Workstation is independent software and is not affiliated with Microsoft, ONLYOFFICE, LibreOffice, Ai2/AllenAI, or other referenced vendors unless an explicit agreement says otherwise.