## Phase 139: Sovereign Office, Scholarly Authoring & Collaboration Suite

Closes the remaining knowledge-worker sovereignty gap. Phase 55 (Maat) frames an
"autonomous organization OS", but there are no tasks for word processing,
spreadsheets, presentations, email, calendar, PDF, notes, forms, project
management, scholarly authoring (LaTeX / Typst / Pandoc / Zotero), ebook
authoring (Sigil / Vellum / Calibre), or CMS / publishing. This phase delivers a
complete sovereign replacement for Microsoft Office / Google Workspace / Apple
iWork / Notion / Obsidian / Overleaf / Zotero / Mendeley / Scrivener / Ulysses /
Airtable / Jira / Linear / Trello / Asana / Confluence / Coda / Basecamp / Slack
/ Teams / Gmail / Outlook / Apple Mail / Fastmail / Calendar / Contacts / Adobe
Acrobat / Foxit / Typeform / Google Forms.

Every admin, scholar, writer, editor, researcher, student, project manager,
operations lead, and knowledge worker can do their work end-to-end inside the
Oshun stack.

---

### 139.1 @neith/docs-core — Shared Document & Collaboration Substrate

Shared infrastructure reused by word processor, spreadsheet, slides, notes,
wiki, and database apps.

#### 139.1.1 Document Model

- [x] **139.1.1.1** Structured-document tree (block, inline, text, embeds)
- [x] **139.1.1.2** CRDT (Yjs / Automerge-class) for multi-user editing
- [x] **139.1.1.3** Block identity with stable IDs across edits
- [x] **139.1.1.4** Embed registry (image, video, file, equation, widget)
- [x] **139.1.1.5** Comment / discussion thread anchored on selection
- [x] **139.1.1.6** Suggest / track-changes mode
- [x] **139.1.1.7** Mention / tag users and objects
- [x] **139.1.1.8** Version history with named releases
- [x] **139.1.1.9** Branch / fork / merge documents
- [x] **139.1.1.10** End-to-end encrypted documents with selective share

#### 139.1.2 Collaboration Runtime

- [x] **139.1.2.1** Presence (cursor, selection, color badge)
- [x] **139.1.2.2** Live co-editing with offline sync
- [x] **139.1.2.3** Avatar / focus list
- [x] **139.1.2.4** Follow-mode (spectate another user)
- [x] **139.1.2.5** Voice / video huddle embedded
- [x] **139.1.2.6** Reactions / emoji over selection
- [x] **139.1.2.7** Access controls (view / comment / suggest / edit / owner)
- [x] **139.1.2.8** Link-based share with expiry
- [x] **139.1.2.9** Guest access with audit
- [x] **139.1.2.10** SSO / SAML / OIDC / SCIM

#### 139.1.3 Storage & Sync

- [x] **139.1.3.1** Local-first storage with replicated log
- [x] **139.1.3.2** Cloud sync (Neith sovereign cloud, optional)
- [x] **139.1.3.3** Git-backed storage mode for devs
- [x] **139.1.3.4** S3-compatible attachment store
- [x] **139.1.3.5** File-system folder representation
- [x] **139.1.3.6** Conflict-free sync over intermittent network
- [x] **139.1.3.7** Encrypted backup (sovereign key management)
- [x] **139.1.3.8** Export-all archive (open-format dump)
- [x] **139.1.3.9** Data-portability adapter (Google Takeout, Microsoft Export)
- [x] **139.1.3.10** Retention policy per workspace

Implementation evidence (2026-07-12): `@neith/docs-core` supplies a validated
structured tree with stable identities, typed embeds, selection-anchored review,
named content-addressed releases, three-way fork/merge conflict detection, and
AES-256-GCM selective-recipient envelopes. Its collaboration runtime enforces
role-ordered access, expiring audited guest links, presence/follow/reaction
state, and secure huddle descriptors. Deterministic checksum-protected
replicated logs, retention pruning, attachment-store contracts, Git/folder
projections, encrypted backup, open archives, and Google/Microsoft portability
adapters cover local-first storage. A replicated-growable-array text CRDT now
converges concurrent insertion, deletion tombstones, reordered delivery, and
duplicate delivery while an offline room reconciles reconnecting peers. The
optional sovereign-cloud transport synchronizes isolated workspaces, and the
enterprise identity gateway authenticates scoped signed SAML/OIDC assertions,
maps groups to roles, and performs optimistic-versioned SCIM provisioning.
Twenty-two focused tests cover success, invalid, conflict, tamper, expiry,
authorization, offline convergence, cloud isolation, portability, and
cryptographic failure paths.

---

### 139.2 @neith/writer — Word Processor (Word / Pages / Google Docs / Scrivener / Ulysses)

Rich text authoring for correspondence, reports, manuscripts, and long
documents.

#### 139.2.1 Editing

- [x] **139.2.1.1** Rich-text with paragraph/character styles cascade
- [x] **139.2.1.2** Heading hierarchy with outline navigator
- [x] **139.2.1.3** Smart quotes, dashes, ellipses auto-replace
- [x] **139.2.1.4** Autocorrect / autotext / AutoCorrect dictionary
- [x] **139.2.1.5** Grammar / style checker (LanguageTool-class)
- [x] **139.2.1.6** Inclusive-language / bias warning (optional)
- [x] **139.2.1.7** Multiple languages with dictionary download
- [x] **139.2.1.8** Thesaurus / synonym finder
- [x] **139.2.1.9** Reading-statistics (readability, grade level)
- [x] **139.2.1.10** Focus / typewriter mode

Implementation evidence (2026-07-12): `@neith/writer::editing` provides
cycle-safe named paragraph/character style cascades with direct overrides,
validated six-level outline extraction, locale-aware smart typography, and a
case-preserving user autocorrect/autotext dictionary. Installable language packs
combine pluggable grammar diagnostics, Unicode spelling dictionaries, and
defensive thesaurus lookup; optional escaped-term inclusive-language rules and
deterministic Flesch/Flesch-Kincaid reading statistics cover editorial review.
Focus state models both distraction-free and centered typewriter behavior. Ten
focused tests cover inheritance, malformed headings, typography options,
dictionary mutation, missing languages, grammar/spelling ordering, optional bias
guidance, reading metrics, and focus behavior.

#### 139.2.2 Structure

- [x] **139.2.2.1** Sections with per-section page layout
- [x] **139.2.2.2** Headers / footers / page numbers
- [x] **139.2.2.3** Two-column / multi-column layout
- [x] **139.2.2.4** Footnotes / endnotes
- [x] **139.2.2.5** Bibliography insertion
- [x] **139.2.2.6** Cross-references and hyperlinks
- [x] **139.2.2.7** Tables with merged cells and formulas
- [x] **139.2.2.8** Equation editor (LaTeX input + WYSIWYG)
- [x] **139.2.2.9** Chart / diagram embed from Forge
- [x] **139.2.2.10** TOC / index / captions auto-generate

Implementation evidence (2026-07-12): `@neith/writer::structure` validates
per-section paper, margin, orientation, page-number, furniture, and up-to-twelve
column geometry. Anchored foot/endnotes, APA/Chicago/numeric bibliography,
safe-link cross-references, merged table cells, range/reference arithmetic with
circular-formula rejection, editable LaTeX fraction/superscript trees, and
revisioned accessible Forge embeds supply document objects. TOC, independently
numbered figure/table/equation captions, and Unicode-safe escaped-term indexes
are generated from authoritative blocks. Nine focused structure tests cover
valid, malformed, unsafe, out-of-bounds, circular, and round-trip paths.

#### 139.2.3 Long-Form Writing (Scrivener / Ulysses)

- [x] **139.2.3.1** Project binder (manuscripts, research, notes folders)
- [x] **139.2.3.2** Corkboard / index-card view
- [x] **139.2.3.3** Outliner with synopsis and status
- [x] **139.2.3.4** Goal tracker (daily word count, session)
- [x] **139.2.3.5** Snapshot (save draft copies)
- [x] **139.2.3.6** Split editor / scrivenings
- [x] **139.2.3.7** Character / location / scene tagging
- [x] **139.2.3.8** Compile to multiple output formats
- [x] **139.2.3.9** Typewriter sound + distraction-free
- [x] **139.2.3.10** Pomodoro / timer integration

Implementation evidence (2026-07-12): `@neith/writer::longform` implements an
ordered, cycle-safe binder across manuscript/research/note folders and derives
corkboard cards plus word-counted synopsis/status outlines. Lossless manuscript
splitting and contiguous scrivenings, deduplicated character/location/scene
tags, HTML-escaped text/Markdown/HTML compilation, daily/session goal tracking,
checksummed immutable snapshots, typewriter sound/focus state, and configurable
focus/short-break/long-break Pomodoro transitions complete the writing loop.
Nine focused tests exercise hierarchy and cycle rejection, all derived views,
lossless splitting, safe compilation, cumulative goals, snapshot isolation,
focus configuration, and timer transitions.

#### 139.2.4 Import / Export

- [x] **139.2.4.1** .docx / .doc / .odt import-export
- [x] **139.2.4.2** Markdown (CommonMark, GitHub, GFM)
- [x] **139.2.4.3** LaTeX export
- [x] **139.2.4.4** Typst export
- [x] **139.2.4.5** EPUB / Kindle
- [x] **139.2.4.6** PDF with accessible tags
- [x] **139.2.4.7** HTML (static or component)
- [x] **139.2.4.8** RTF
- [x] **139.2.4.9** Pandoc-class universal converter engine
- [x] **139.2.4.10** Round-trip fidelity tests

Implementation evidence (2026-07-12): `@neith/writer::interchange` implements a
self-contained typed-AST universal converter across CommonMark/GFM, semantic
HTML, LaTeX, Typst, RTF, tagged PDF 1.7, EPUB 3, OOXML DOCX, and ODF ODT. A real
deterministic stored-ZIP writer/parser supplies standards packages with CRC-32
tamper rejection; DOCX and ODT carry core metadata and stable heading anchors,
while EPUB carries OPF 3 metadata and accessible XHTML. PDF output declares
marked content, language, a structure tree, MCIDs, and alternative document
text. Canonical round-trip reports compare normalized AST hashes rather than
serialization property order. Ten interchange tests cover semantic and escaped
text output, format-specific structure, metadata/anchor fidelity, package magic
and required entries, accessibility tags, deterministic checksums, malformed
metadata, unsupported reverse conversion, and binary tampering. Legacy binary
`.doc` (Word 97-2003) is now implemented as a genuine OLE compound document
(`cfb.ts` writes and parses a version-3 MS-CFB container with FAT/mini-FAT
sector chains, a name-ordered directory tree, and root-owned mini stream)
carrying a real MS-DOC `WordDocument` FIB, a Unicode piece table (CLX), STSH
built-in Normal/Heading styles, PlcfBteChpx/PlcfBtePapx bin tables with
formatted disk pages that recover per-paragraph `istd` heading levels, bookmark
tables (SttbfBkmk/PlcfBkf/PlcfBkl) that preserve heading anchors, and a `\x05`
SummaryInformation OLE property set for title/author; the FIB `lid` carries a
bidirectionally mapped locale. Round-trip fidelity, determinism, heading-level
recovery, and corrupt-container rejection are covered by focused `cfb` and
interchange tests, and the emitted files parse cleanly under the independent
`olefile` OLE reader (zero parsing defects, recovered title/author metadata).
The EPUB 3 artifact is also the current Kindle publishing artifact: Amazon ended
MOBI acceptance in March 2025 and accepts conforming EPUB 2 or EPUB 3 for
reflowable and fixed-layout Kindle books, recommending EPUB as a
conversion-service output. The focused interchange suite re-verifies the stored
mimetype, OPF 3 metadata, accessible XHTML, package signature, deterministic
CRCs, and round-trip import.

---

### 139.3 @neith/sheets — Spreadsheet (Excel / Numbers / Google Sheets / Airtable)

Formula engine, pivot, power-query, and database-style views.

#### 139.3.1 Grid & Formulas

- [x] **139.3.1.1** Sheet grid with 1M row × 16K col support
- [x] **139.3.1.2** Formula parser + evaluator (A1 + R1C1)
- [x] **139.3.1.3** 400+ built-in functions (math, stats, logical, text, date,
      financial, engineering, array)
- [x] **139.3.1.4** Array / spill formulas
- [x] **139.3.1.5** LAMBDA / LET user-defined functions in-cell
- [x] **139.3.1.6** Custom function via JS / Python plugin
- [x] **139.3.1.7** Named ranges
- [x] **139.3.1.8** Iterative / circular calculation
- [x] **139.3.1.9** Data validation (dropdown, custom rule)
- [x] **139.3.1.10** Conditional formatting with expression

Implementation evidence (2026-07-12): `@neith/sheets` provides a sparse grid
with enforced 1,048,576-row by 16,384-column boundaries and constant empty-cell
storage. Its safe Pratt parser evaluates A1 references, ranges, absolute and
relative R1C1 translation, precedence, comparisons, text concatenation, and
function calls without dynamic code execution. Rectangular literals and SEQUENCE
spill with obstruction errors; lexical LET and immediately invoked LAMBDA values
capture scoped bindings. A duplicate-safe registry accepts tagged JavaScript and
Python-bridge plugins, named ranges/constants resolve in formulas, and optional
bounded iterative calculation converges by tolerance while default calculation
reports dependency cycles. Transactional list/number/custom validation preserves
prior values on failure, and priority-ordered conditional formats shift relative
expressions per target cell with stop-if-true behavior. Ten focused tests cover
maximum boundaries, sparse allocation, both reference styles,
precedence/function families, arrays and blocked spills, lexical functions,
plugin isolation, names, convergence/divergence, transactional validation, and
relative formatting. A pinned MIT Formula.js catalog is recursively registered
behind the same evaluator, exposing 842 callable legacy, current, and dotted
Excel names without dynamic evaluation. Its adapter preserves two-dimensional
range arguments and spill results, converts date results to Excel serials,
rejects lambda leakage, provider errors, and unsupported return objects, and
lets Neith's stricter native implementations retain precedence. An eleventh
formula test proves the catalog exceeds 400 and executes representative
engineering, financial, statistical, logical, text, date, math, and array
functions; the complete sheets suite now passes eighty-one tests.

#### 139.3.2 Analysis

- [x] **139.3.2.1** Pivot tables with slicers
- [x] **139.3.2.2** Group / subtotal
- [x] **139.3.2.3** What-if / goal seek / scenario manager
- [x] **139.3.2.4** Regression / trendline
- [x] **139.3.2.5** Solver (LP, MILP, NLP)
- [x] **139.3.2.6** Power-Query-class transform graph
- [x] **139.3.2.7** Data-model / relationships between sheets
- [x] **139.3.2.8** DAX-class measures and KPIs
- [x] **139.3.2.9** Sparklines and in-cell charts
- [x] **139.3.2.10** Statistical tests (t-test, ANOVA, chi²)

Implementation evidence (2026-07-12): `@neith/sheets::analysis` builds
multi-axis pivot cells with multi-select slicers and drill counts, stable
grouped detail/subtotal/grand-total streams, immutable scenario comparisons, and
bracketed bisection goal seek. Gaussian-elimination polynomial least squares
returns coefficients, fitted values, residuals, predictions, and R² with
singularity rejection. The bounded solver handles LP/NLP coordinate and
active-face directions plus deterministic feasible MILP enumeration, explicit
constraints, minimization/maximization, tolerances, and iteration/domain
budgets. A dependency-checked transform DAG executes sources, select/filter,
derive, sort, group, and two-input joins without source mutation. Relational
tables enforce many-to-one/one-to-one key cardinality and expand related fields;
a constrained DAX-class aggregate parser supplies SUM, AVERAGE, COUNTROWS,
filter context, and direction-aware KPI states without arbitrary evaluation.
Line/column/win-loss sparkline geometry and numerically evaluated Welch t-test,
one-way ANOVA, and chi-square independence tests complete analysis. Fourteen
focused analysis tests (24 package tests total) cover aggregation/slicing,
subtotal ordering, roots/scenarios, exact trends, LP/MILP/NLP optima, transform
dependencies/joins, relationship cardinality, filtered measures/KPIs, chart
geometry, p-values, singular/invalid samples, and solver safety budgets.

#### 139.3.3 Visualizations

- [x] **139.3.3.1** Chart library (line, bar, column, pie, donut, scatter,
      bubble, radar, waterfall, funnel, box, violin, histogram)
- [x] **139.3.3.2** 3D chart
- [x] **139.3.3.3** Map chart (choropleth, symbol, heat)
- [x] **139.3.3.4** Combo and dual-axis charts
- [x] **139.3.3.5** Chart templates and presets
- [x] **139.3.3.6** Chart animation for presentations
- [x] **139.3.3.7** Dashboard layout
- [x] **139.3.3.8** Cross-sheet filtering
- [x] **139.3.3.9** Export chart as SVG / PNG / embedded motion
- [x] **139.3.3.10** Published live dashboard

Implementation evidence (2026-07-12): `@neith/sheets::visualization` provides a
typed chart grammar and finite geometry for line, horizontal bar, column, pie,
donut, scatter, bubble, radar, waterfall, funnel, box, violin, and histogram
charts. Mixed per-series marks and independent axes produce combo/dual-axis
plots; a bounded perspective camera projects marks into 3-D. Geographic bounds,
projection, centroids, continuous color mixing, proportional symbols, and heat
kernels render choropleth/symbol/heat maps. Defensive editorial-ink and night
presets plus a duplicate-safe template registry encode restrained chart-first
composition. Staggered presentation frames and embedded SVG keyframes include
keyboard focus, hover emphasis, and `prefers-reduced-motion` suppression.
Collision/minimum-size-checked dashboard grids avoid ornamental card mosaics,
while explicit cross-dataset bindings propagate selections without mutating
sources. Exports include deterministic standalone accessible SVG and native
CRC-protected RGBA PNG encoding; live publication produces immutable hashed
snapshots with public/private access, expiry, view analytics, and revocation.
Twenty-four visualization tests (48 package tests total) cover every chart/map
kind, finite geometry, 3-D validation, mixed axes, defensive themes, motion,
layout collisions, cross-filtering, SVG/PNG signatures, access and lifecycle.
Two focused Playwright tests additionally verify rendered roles/names, keyboard
focus, reduced motion, and compact-viewport containment in Chromium. The
required frontend-skill shaped the calm canvas, single restrained accent,
chart-first hierarchy, sparse utility copy, and non-ornamental motion system.

#### 139.3.4 Database / Airtable-Class

- [x] **139.3.4.1** Typed columns (text, number, date, currency, checkbox,
      select, linked record, attachment, user, formula, lookup, rollup,
      created-at)
- [x] **139.3.4.2** Views (grid, calendar, kanban, gallery, gantt, timeline)
- [x] **139.3.4.3** Row-level permissions
- [x] **139.3.4.4** Automations (record change triggers actions)
- [x] **139.3.4.5** Sync between bases
- [x] **139.3.4.6** API auto-generated per base
- [x] **139.3.4.7** Form view (public data collection)
- [x] **139.3.4.8** Webhook / zap-class integration
- [x] **139.3.4.9** AI fill column with LLM
- [x] **139.3.4.10** Full-text search across records

Implementation evidence (2026-07-12): `@neith/sheets::database` validates and
stores text, bounded number/date/ISO-currency, checkbox, single/multi-select,
linked-record, constrained attachment, single/multi-user, formula, lookup,
rollup, and immutable created-at columns. Required and computed/read-only
invariants are transactional; linked bases materialize defensive lookup and
sum/average/count/min/max rollups. Renderer-neutral grid, calendar, kanban,
gallery, Gantt, and timeline projections preserve sorting/filtering and emit
semantic, chart-first utility markup with quiet dividers, one action accent,
keyboard focus, and reduced-motion behavior. Ordered row policies become
deny-by-default whenever an action is governed. Change-triggered automations
enforce action/global safety budgets and suppress recursive dispatch; revisioned
logs synchronize bases bidirectionally with deterministic last-newer conflict
resolution. Each base exposes scoped CRUD, ETags/revision conflicts, and OpenAPI
3.1; public forms restrict writable fields, reject computed columns, enforce
schema validation/expiry, and associate labels/help text. HTTPS webhook
destinations use HMAC-SHA256 timestamp signatures, event allowlists, bounded
retry, verification, and delivery audit. AI-fill proposals validate against the
target column and require explicit approve/reject before mutation while
retaining model/evidence provenance. Unicode NFKC inverted indexing ranks term
frequency with inverse document frequency and returns field highlights. Twelve
focused database tests (60 package tests total) cover every typed family,
lookup/rollup, row access, all views, semantic output, automation recursion
boundaries, bidirectional sync, API scopes/conflicts/schema, form allowlists,
webhook signatures/retries, approval-gated AI, and search lifecycle. Four
Playwright tests cover database and chart surfaces, including keyboard focus,
useful headings, reduced motion, label/help association, compact containment,
and one primary form action. The mandatory frontend-skill shaped the quiet dense
work surface, time/record-first hierarchy, hairline divisions, and restrained
motion.

#### 139.3.5 Import / Export

- [x] **139.3.5.1** .xlsx / .xls / .ods / .csv / .tsv / .parquet / .arrow
- [x] **139.3.5.2** SQL query import (Postgres, MySQL, SQLite, DuckDB, BigQuery,
      Snowflake)
- [x] **139.3.5.3** REST / GraphQL ingest
- [x] **139.3.5.4** Scheduled refresh
- [x] **139.3.5.5** Spark / Polars-powered large-file read

Implementation evidence (2026-07-12): `@neith/sheets::interchange` uses direct,
package-owned SheetJS, Apache Arrow, and Parquet dependencies rather than
unrelated transitive packages. It writes and reads genuine ZIP/OOXML `.xlsx`,
OLE/BIFF `.xls`, ODF `.ods`, RFC-style quoted UTF-8 CSV/TSV, Arrow file IPC, and
Parquet (`PAR1`) row groups. Typed schemas, dates, nullability, duplicate-header
repair, safe sheet names, magic bytes, and row budgets are tested; Parquet
stores validated Neith schema metadata to preserve date semantics while avoiding
runtime-specific timestamp-statistics loss. Parameterized read-only SQL routing
covers Postgres, MySQL, SQLite, DuckDB, BigQuery, and Snowflake executor
contracts, rejects mutation/stacking, propagates abort signals, and hard-caps
rows. HTTPS-only REST link pagination and GraphQL cursor pagination validate
object-array paths, status codes, page/row budgets, headers, variables, and
unions of sparse fields. The refresh scheduler prevents concurrent runs,
supports cancellation signals, deterministic jitter, revisions, bounded retry
backoff, stale-data retention, and terminal failure thresholds. A projection and
predicate-pushdown delegator selects available Polars then Spark engines (or an
explicit preference/fallback), validates their returned schema, and enforces a
final row budget. The package-owned native Polars binding now lazily scans CSV,
TSV, Parquet, and Arrow IPC from isolated temporary files, pushes allowlisted
typed comparison predicates and validated projections into the query plan,
limits before collection, normalizes native values, checks cancellation
boundaries, and always removes working data. A real integration case executes
projected, filtered CSV and Parquet scans while rejecting expression injection.
Twenty-one interchange tests (82 package tests total) cover all seven formats
and signatures, fidelity/schema errors, every SQL dialect and safety boundary,
REST/GraphQL pagination, refresh success/stale/failure, native Polars reads, and
large-engine selection/pushdown.

---

### 139.4 @neith/slides — Presentations (Keynote / PowerPoint / Google Slides)

Cinematic presentation builder.

#### 139.4.1 Slide Building

- [x] **139.4.1.1** Slide canvas with masters / layouts
- [x] **139.4.1.2** Theme engine (color / font / effect sets)
- [x] **139.4.1.3** Smart layouts with auto-arrange
- [x] **139.4.1.4** Object alignment guides with spacing badges
- [x] **139.4.1.5** Shape library with connectors
- [x] **139.4.1.6** Charts embedded live (sync with @neith/sheets)
- [x] **139.4.1.7** Tables with cell styles
- [x] **139.4.1.8** Image placeholders with one-click fit
- [x] **139.4.1.9** Magic Move-class transition
- [x] **139.4.1.10** Build-in / build-out animation

Implementation evidence (2026-07-12): `@neith/slides::design` supplies a
validated presentation canvas with master decorations, layout ownership,
placeholder geometry, and immutable theme resolution across named color, font,
and effect sets. Deterministic auto-arrangement produces bounded grid geometry;
edge, center, and equal-spacing guides expose exact badge distances. The typed
object model includes a shape library, anchored straight/elbow connectors,
revision-checked live chart bindings, styled/banded tables, and centered
cover/contain image fitting. Stable object identities drive Magic Move geometry
and enter/leave fades, while ordered click/with/after build timelines support
build-in and build-out phases. Accessible responsive SVG output provides named,
keyboard-focusable objects, semantic charts/tables, theme styling, and a
reduced-motion mode. Nine focused unit tests and one Playwright browser test
cover inheritance, invalid ownership, layout geometry, guides, routing, chart
revision safety, image fit, transition identity, build ordering, escaping,
keyboard access, compact viewports, and reduced motion.

#### 139.4.2 Media & Animation

- [x] **139.4.2.1** Video embed with trim and caption
- [x] **139.4.2.2** Audio background / narration
- [x] **139.4.2.3** Action-button navigation
- [x] **139.4.2.4** Live data binding to sheet or API
- [x] **139.4.2.5** 3D model embed (glTF / USDZ) with orbit
- [x] **139.4.2.6** Iframe / web-page embed
- [x] **139.4.2.7** Whiteboard slide type (ink + diagram)
- [x] **139.4.2.8** Polling / Q&A audience slide
- [x] **139.4.2.9** Live captions / transcript overlay
- [x] **139.4.2.10** Remote pointer / laser

Implementation evidence (2026-07-12): `@neith/slides::media` validates secure
video sources, bounded trims, ordered caption cues, background/narration mixes,
and automatic music ducking. Action buttons resolve bounded slide navigation or
HTTPS links, while abort-aware sheet/API bindings validate ranges, refresh
budgets, snapshot identity, and monotonic revisions. glTF/GLB/USDZ embeds
enforce matching formats, accessible descriptions, and normalized orbit
controls; least-privilege web embeds use origin-sensitive sandboxing and
deny-by-default feature permissions. Whiteboards validate pressure ink, canvas
bounds, node identity, and diagram endpoints. Stateful audience sessions
deduplicate votes, rank and moderate questions, and expose deterministic
results. Transcript cues and per-participant pointer/laser updates are bounded,
deduplicated, and expired by lifetime. Accessible escaped media-layer output
provides live caption status, named pointers, responsive 16:9 composition, and
reduced-motion behavior. Ten focused media tests (nineteen package tests total)
and a second Playwright flow cover malformed media, mixing, navigation security,
data refresh, model formats, iframe policy, whiteboard integrity, audience
state, transcript timing, pointer expiry, semantic captions, and motion
preferences.

#### 139.4.3 Delivery

- [x] **139.4.3.1** Presenter view with next-slide + notes + timer
- [x] **139.4.3.2** Multi-display routing (mirror / extended)
- [x] **139.4.3.3** Rehearsal mode with timing feedback
- [x] **139.4.3.4** Auto-advance loops / kiosk mode
- [x] **139.4.3.5** Remote-remote (phone as clicker)
- [x] **139.4.3.6** Live broadcast (SRT / WebRTC / RTMP)
- [x] **139.4.3.7** Online share link with viewer analytics
- [x] **139.4.3.8** Export PDF / PPTX / Keynote
- [x] **139.4.3.9** Export MP4 / GIF with animation
- [x] **139.4.3.10** Import PPTX / Keynote with fidelity

Implementation evidence (updated 2026-07-14): `@neith/slides::presenting`
derives a validated presenter projection with current/next slide, private notes,
total and per-slide timers, and deck progress. Deterministic mirror/extended
display routing handles primary and single-display fallback. Rehearsal analysis
reports per-slide target variance, speaking pace, and filler rate; kiosk
timelines support arbitrary durations, starting points, bounded looping, and
completion. Phone clicker sessions use expiring random secrets, short pairing
codes, constant-time command authentication, nonce replay rejection, and
revocation. Broadcast plans validate real SRT, WebRTC, and RTMP(S) endpoint
schemes alongside their required AES-128, DTLS-SRTP, or TLS protection. Salted
share analytics aggregate unique viewers, sessions, slide views, median
duration, and normalized referrer origins without retaining exposed viewer
identities. Eight focused presenting tests (twenty-seven package tests total)
and a third Playwright flow cover invalid state, display modes, rehearsal
feedback, kiosk loops, clicker tampering/replay/expiry, all broadcast protocols,
private analytics, escaping, phone layout, semantic regions, notes, and timers.
`@neith/slides::office` now adds genuine document interchange: `ooxml.ts` is a
deterministic CRC-32-protected stored-ZIP (OPC) reader/writer, and `office.ts`
exports a real multi-page PDF 1.7 (one vector page per slide,
shapes/text/tables/ images) and a real OOXML PresentationML `.pptx` package
(Content_Types, package and presentation relationships, slide master, blank
layout, DrawingML theme, and one slide part per slide) mapping text boxes,
preset-geometry shapes, DrawingML tables, and externally-linked pictures at 9525
EMU/px. `importPptx` reconstructs slide size, order, titles, and per-object
geometry, text, shape kind/fill/stroke, table cells, and linked image hrefs. Six
focused office tests (thirty-six package tests total) cover the required OPC
parts, EMU slide sizing, round-trip fidelity of text/shape/table/image objects,
deterministic bytes, multi-page PDF structure, and malformed-package rejection;
the emitted `.pptx` opens cleanly in the independent `python-pptx` reader
(correct shape types, table cells, and picture) and the `.pdf` in `pypdf` (two
pages, correct point-sized media box, extracted text). Keynote interchange now
targets Apple's genuine, documented APXL package format (Keynote
'09-compatible), which current Keynote releases continue to open.
`exportKeynote` emits `index.apxl`, bundle `PkgInfo`, the documented
Keynote/SF/SFA namespaces, theme/master/three-layer slide hierarchy, version-524
Bezier geometry, text storage, external media references, and a Quick Look PDF
preview. Opaque schema-valid object identifiers retain Neith-only properties
without polluting visible slide content, enabling exact round-trip fidelity for
text, every shape, tables, images, charts, and connectors. `importKeynote` also
accepts deflated ZIP entries and gzip-compressed APXL, enforces checksum and
bounded-expansion safety, and falls back to standard APXL geometry, text, and
image extraction for non-Neith decks. Focused Keynote cases cover package
structure, complete object fidelity, deterministic bytes, gzip and unmarked APXL
import, and malformed/cross-format rejection. The modern IWA protobuf dialect
remains undocumented and is not mislabeled as the emitted format. A bounded
temporary-file encoder now turns duration-bearing raster frames into genuine
H.264/YUV420P MP4 or palette-generated looping GIF artifacts through
argument-safe FFmpeg execution. It enforces frame, resolution, size, duration,
timeout, and cancellation limits; cleans isolated working files; validates
output signatures; and preserves variable frame timing. Three focused export
cases invoke the installed encoder for both formats and cover invalid and
aborted work; with the office interchange suite the slides package now has
thirty-six unit/integration tests alongside its Playwright browser flows.

---

### 139.5 @neith/notes — Note-Taking & PKM (Notion / Obsidian / Apple Notes / OneNote / Evernote / Roam)

Block-based knowledge management.

- [x] **139.5.1** Page / subpage hierarchy
- [x] **139.5.2** Block types (text, heading, list, quote, callout, toggle,
      code, math, image, video, file, embed, bookmark, table, kanban, calendar)
- [x] **139.5.3** Slash commands and block menu
- [x] **139.5.4** Bidirectional links + backlinks panel
- [x] **139.5.5** Graph view of link network
- [x] **139.5.6** Tags / properties / metadata (Notion-class)
- [x] **139.5.7** Databases inside notes (inline + full)
- [x] **139.5.8** Templates gallery
- [x] **139.5.9** Markdown native storage (Obsidian-compatible vault)

Implementation evidence (2026-07-12): `@neith/notes` provides an ordered,
cycle-safe page tree with breadcrumb paths and explicit cascade/promote removal.
Its extensible slash-command registry searches labels and keywords and validates
created blocks across text, headings, lists, quotes, callouts, toggles, code,
LaTeX math, secure image/video/file media, sandboxed web embeds, bookmarks,
tables, kanban boards, calendars, and embedded databases. Each rich block has
structural validation, native Markdown serialization, and semantic rendering.
Obsidian-style wiki links resolve case-insensitively to stable page identities,
feeding backlink panels and a deterministic weighted knowledge graph. Typed
required properties validate text, number, checkbox, date, select, and tag
values; embedded inline/full databases validate those schemas before filtering,
numeric-aware sorting, and limiting rows. A searchable template gallery enforces
variables and returns isolated page instances. Native Markdown vault files use
deterministic YAML frontmatter, safe filenames, wiki-link preservation,
headings, tasks, quotes, media, and stable page identity with round-trip
parsing. Nine focused tests and one Playwright mobile workflow cover hierarchy
promotion and cycles, command search, weighted links, property errors, database
ordering, template variables, Markdown round trips, escaping, responsive layout,
semantic content, math accessibility, tables, kanban, calendars, and backlinks.

- [x] **139.5.10** OCR + handwriting on pen-input
- [x] **139.5.11** Audio / voice memo with transcript
- [x] **139.5.12** Web clipper (browser extension)
- [x] **139.5.13** PDF annotation inline
- [x] **139.5.14** AI summary / extract actions
- [x] **139.5.15** Daily note / journal with automation
- [x] **139.5.16** Canvas / mind-map (integrates @neith/forge-board)
- [x] **139.5.17** Publish as web / static site
- [x] **139.5.18** Plugin ecosystem (Obsidian-compatible API)
- [x] **139.5.19** Mobile quick capture
- [x] **139.5.20** End-to-end encrypted vault

Capture and automation evidence (2026-07-12): `@neith/notes::capture` invokes
FFprobe through an argument-safe executor, validates codec metadata, hashes
audio bytes, and accepts abort-aware transcription providers only when segments
are ordered, bounded, non-empty, and confidence-valid. A complete Manifest V3
browser extension captures the active HTTPS DOM and selection into a bounded
local queue; the shared clipper extracts canonical URL, author, title, readable
text, and absolute assets while stripping scripts, forms, event handlers, inline
styles, embedded frames, and insecure links. Inline PDF annotation validates
page geometry for highlights, notes, and ink, exports standards-namespaced XFDF,
and renders semantic overlays above the PDF. The grounded local summarizer
returns extractive sentences, source block IDs, and explicit TODO/Action/Next
items without inventing citations. Timezone-aware daily automation generates
deterministic, idempotent journal pages from templates and optional weekday
rules. Six capture tests (fifteen package tests total) and a second Playwright
workflow cover FFprobe metadata, transcript failure, extension-manifest parity,
hostile clipping, XFDF escaping, annotation bounds, grounded actions, timezone
rollover, inline PDF semantics, and compact layout. The ink recognizer routes
printed images explicitly through the canonical local Tesseract WASM tier and
handwriting through an explicitly selected vision tier, because Tesseract does
not claim handwriting support. Bounded, ordered, pressure-sensitive pen strokes
are rendered by package-owned Sharp into deterministic PNG input; invalid
geometry, duplicate strokes, unsafe colors, dishonest backend tiers, malformed
confidence, and ungrounded boxes are rejected. Recognition returns the exact
stroke IDs, canvas geometry, and image SHA-256 as provenance. Four focused ink
tests verify PNG determinism, Tesseract language routing, handwriting-tier
routing and provenance, malformed input, and tier mismatch, bringing the notes
package to twenty-four tests.

Platform evidence (2026-07-12): `@neith/notes::platform` validates bounded
canvas nodes and edges, rejects invalid graphs, performs deterministic
horizontal/vertical mind-map layout, and emits versioned Forge-board frames,
note bindings, and connectors. The static publisher creates escaped responsive
HTML, canonical links, collision-safe slugs, resolved wiki links, navigation,
and an XML sitemap from the same pages. A permissioned Obsidian-style plugin
host exposes vault read/write/list, commands, events, lifecycle hooks, and HTTPS
requests only when declared; paths are traversal-safe and unload removes owned
commands. The mobile queue accepts text/photo/audio/scan captures offline,
verifies attachment SHA-256, preserves ordering, bounds concurrency and retry
attempts, supports cancellation, and records per-item failures. Encrypted vaults
derive 256-bit keys with normalized-password scrypt, encrypt every file using
fresh AES-256-GCM IVs and authenticated context, hide plaintext paths behind
SHA-256 identifiers, reject wrong passwords and tampering, and rotate keys only
when every original path is supplied. Five platform tests (twenty package tests
total) and a third Playwright workflow cover Forge interchange, graph failures,
safe publishing, plugin capability denial and unload, attachment corruption,
concurrent sync, ciphertext secrecy, authentication failure, key rotation,
static navigation, compact layout, and semantic articles.

---

### 139.6 @neith/wiki — Team Wiki / Confluence / SharePoint / MediaWiki

Long-lived team knowledge base.

- [x] **139.6.1** Hierarchical spaces and pages
- [x] **139.6.2** Rich permissions per space
- [x] **139.6.3** Page templates (RFC, ADR, runbook, onboarding)
- [x] **139.6.4** Inline diagrams (forge-board integration)
- [x] **139.6.5** Code blocks with syntax highlight
- [x] **139.6.6** Macros / embeds (Jira-style)
- [x] **139.6.7** Version history with diff
- [x] **139.6.8** Full-text search with facets
- [x] **139.6.9** Comments and mentions
- [x] **139.6.10** Subscribe / watch / digest
- [x] **139.6.11** Read / edit analytics
- [x] **139.6.12** Import from Confluence / Notion / Google Sites
- [x] **139.6.13** MediaWiki import
- [x] **139.6.14** Static-site export (Hugo / MkDocs / Docusaurus)
- [x] **139.6.15** Public / private publishing

Implementation evidence (2026-07-12): `@neith/wiki` provides cycle-safe nested
spaces and ordered page trees with cross-space parent rejection and complete
breadcrumbs. User, group, and everyone access rules resolve inherited roles,
explicit denials, public viewing, and read/comment/edit/manage/publish actions.
Validated RFC, ADR, runbook, and onboarding templates require their variables;
versioned Forge-board diagrams enforce bounded nodes and connected endpoints.
Escaped syntax highlighting covers TypeScript/JavaScript and Python keywords and
strings, while a permission-free macro registry supplies TOC, children, status,
and extension macros alongside HTTPS-only sandboxed embeds. Content-addressed
immutable versions reject no-op commits, restore snapshots, and compute grouped
LCS line diffs. A Unicode full-text index ranks term frequency/rarity and
applies space, status, label, and editor facets with bounded excerpts. Threaded
comments validate known mentions and resolution; page/space watches generate
cadence- and event-filtered digests. Privacy-safe analytics consume pre-hashed
actors and aggregate reads, unique readers, edits, editors, and bounded median
dwell. Ten focused tests and one Playwright mobile workflow cover hierarchy
cycles, permission denial, all templates, diagrams, escaped code, macros,
versioning, diffs, faceted Unicode search, mentions, watches, analytics
validation, responsive navigation, search/context regions, child pages, and
reduced motion.

Interchange evidence (2026-07-12): `@neith/wiki::interchange` supplies
source-specific Confluence storage/HTML, Notion Markdown/HTML, and Google Sites
main-content adapters with traversal-safe paths, stable identities,
reconstructed parentage, sanitized active content, preserved headings/text/code,
source labels, and per-file migration warnings. The MediaWiki parser imports
headings, internal-link labels, lists, preformatted code, templates/parameters,
namespaces, and categories. Target-specific exporters emit published pages only:
Hugo content and TOML, MkDocs Markdown and navigation YAML, or Docusaurus MDX
and sidebar modules, while rejecting orphan page trees. Publishing requires the
space publish action and published-page membership, distinguishes public from
private access, uses HTTPS canonical URLs, and authenticates expiring
optional-subject share tokens with HMAC-SHA-256 and constant-time comparison.
Four interchange tests (fourteen package tests total) and a second Playwright
workflow cover all named sources and targets, hierarchy, hostile HTML, fenced
code, MediaWiki constructs, draft exclusion, permissions, expiry, subject scope,
tampering, private rendering, semantic articles, and compact layouts.

---

### 139.7 @neith/mail — Email Client (Outlook / Gmail / Apple Mail / Thunderbird / Fastmail)

Modern mail client with privacy and scripting.

#### 139.7.1 Protocols

- [x] **139.7.1.1** IMAP4 with IDLE / NOTIFY
- [x] **139.7.1.2** JMAP
- [x] **139.7.1.3** POP3 (legacy)
- [x] **139.7.1.4** SMTP with MSA + DKIM signing
- [x] **139.7.1.5** OAuth (Google, Microsoft, Apple, sovereign)
- [x] **139.7.1.6** Microsoft Graph (Outlook.com / Office 365)
- [x] **139.7.1.7** Google Gmail API
- [x] **139.7.1.8** Exchange EWS / ActiveSync
- [x] **139.7.1.9** LDAP directory lookup
- [x] **139.7.1.10** MAPI (archive)

Implementation evidence (2026-07-12): `@neith/mail::protocols` implements
stateful CRLF-safe IMAP4 commands and response parsing across authentication,
SELECT/EXAMINE, UID FETCH with CONDSTORE, RFC 5465 mailbox NOTIFY, IDLE/DONE,
and logout. The POP3 authorization/transaction/update state machine encodes
USER/PASS, STAT/LIST/UIDL/RETR/DELE/QUIT and budgeted terminator-aware dot
unstuffing. JMAP request/response codecs correlate calls, declare core/mail
capabilities, inject account identity, and reject unknown response IDs. RFC 5322
and multipart MIME serialization validates addresses and header injection; SMTP
submission uses EHLO, STARTTLS, real XOAUTH2 SASL, SMTPUTF8 envelopes, recipient
expansion, DATA dot stuffing, and RFC 6376 RSA-SHA256 relaxed DKIM body/header
canonicalization with a real private key. Provider-neutral OAuth uses random
state and S256 PKCE, validates callbacks, form-encodes token exchange, and
derives bounded token expiry/scopes. Microsoft Graph and Gmail adapters cover
paginated/bounded listing, retrieval, send, and update/label semantics with
encoded IDs and RFC-message base64url payloads. Seven focused tests exercise
wire transcripts, state violations, multiline budgets, JMAP correlation,
verifiable RSA DKIM, dot stuffing, OAuth state/expiry, and all REST operations.
The remaining enterprise protocols are detailed below.

Enterprise protocol evidence (2026-07-12): `@neith/mail::enterprise` encodes
Exchange Web Services FindItem/GetItem/CreateItem SOAP with OAuth, server
versioning, optional impersonation, paging bounds, query/XML escaping, MIME
selection, send-only/send-and-copy disposition, and parses response class,
codes, IDs, and paging state. Its ActiveSync 14.1/16.x adapter emits the
required WBXML 1.3 header and AirSync code-page tokens for Sync, windowed
changes, heartbeat, and Fetch, with bounded settings and response extraction for
status, sync key, continuation, and server IDs. The LDAPv3 codec emits ASN.1 BER
simple Bind and Search requests across scopes, size/time limits, requested
attributes, equality/presence/AND/OR filters, validates attribute descriptions,
and parses standard result messages. The MAPI archive reader uses the real
Compound File Binary parser for Outlook `.msg`/`.oft`, validates CFB magic and
size budgets, extracts Unicode and binary MAPI property streams, typed
integer/boolean properties, message bodies/class/addressing, and attachment
names, MIME types, and bytes. Four enterprise tests (eleven package tests total)
exercise escaped SOAP, EWS paging, binary WBXML, ActiveSync bounds, BER
transcripts/results, invalid directory filters, a generated real CFB archive
with MAPI streams and attachment storage, and corrupt archive rejection.

#### 139.7.2 Features

- [x] **139.7.2.1** Unified inbox across accounts
- [x] **139.7.2.2** Conversation threading
- [x] **139.7.2.3** Rules / filters with actions
- [x] **139.7.2.4** Tag / label with color
- [x] **139.7.2.5** Snooze / schedule send
- [x] **139.7.2.6** Template / canned responses
- [x] **139.7.2.7** Signatures per account
- [x] **139.7.2.8** Undo send with delay
- [x] **139.7.2.9** Tracking-pixel blocking
- [x] **139.7.2.10** Spam / phishing classifier on-device
- [x] **139.7.2.11** Attachment preview
- [x] **139.7.2.12** Calendar event parse + add
- [x] **139.7.2.13** Follow-up / remind-me
- [x] **139.7.2.14** Markdown / rich composer
- [x] **139.7.2.15** PGP / S/MIME sign + encrypt

Productivity evidence (2026-07-12): `@neith/mail::client` creates a stable
SHA-256-addressed unified inbox across ranked accounts with account-ownership
validation, duplicate suppression, snooze visibility, deterministic recency, and
result limits. Conversation union-find follows normalized Message-ID,
References, and In-Reply-To, with participant-overlap subject fallback, ordered
messages, unread counts, and activity. Priority rules support all/any predicates
over addresses, subject/body, size, attachment/read/flag state and label, move,
read, flag, delete, or future-snooze actions with stop semantics. Labels require
unique IDs and six-digit colors. Required-variable response templates and
account/default/named signatures preserve text while escaping HTML. The delivery
state machine unifies undo windows and future scheduling, ticks jobs through
undoable/scheduled/ready/sending/sent/cancelled/failed states, bounds attempts,
records failure, and supports explicit retry. Snooze and flagged follow-up
helpers reject past time and return chronologically due reminders. Six
productivity tests (seventeen package tests total) cover multi-account ordering,
threading, rule precedence, label errors, template variables, signature
escaping, undo/cancel, scheduling, send failure/retry, snooze, and follow-up
ordering.

Privacy, content, and cryptography evidence (2026-07-12):
`@neith/mail::security` strips executable mail markup, event handlers, unsafe
links, and every remote HTTP image while retaining bounded CID/data images and
reporting each blocked resource. A device-local multinomial Naive Bayes model is
trained from labeled legitimate, spam, and phishing mail and returns normalized
learned probabilities plus observed-token evidence. Attachment previews enforce
byte budgets, UTF-8 decoding and HTML escaping, PDF signatures, an explicit
passive media allowlist, and SHA-256 identity without executing active
documents. RFC 5545 unfolding extracts UID, time zone, recurrence, organizer,
attendees, description, and location; calendar addition is UID-idempotent. The
Markdown composer produces escaped semantic HTML and only links HTTPS or mailto
destinations. OpenPGP command adapters sign and encrypt through GnuPG, while
S/MIME adapters sign, verify, encrypt, and decrypt through OpenSSL CMS without
shell interpolation. Seven focused tests use freshly generated GPG keys and
X.509 certificates for real cryptographic round trips. A restrained, responsive
mail workspace exposes blocked tracking, classifier, signature, attachment,
calendar, Markdown, and encrypted-send state; two Playwright tests cover the
complete view, narrow layout, and reduced motion. Together with the earlier
protocol and productivity coverage, the package has twenty-four unit/integration
tests and two browser tests.

#### 139.7.3 Server (Sovereign Mail Server Stack)

- [x] **139.7.3.1** SMTP submission / relay (Postfix / Haraka-class Rust server)
- [x] **139.7.3.2** IMAP + JMAP mailstore (Dovecot / Stalwart-class)
- [x] **139.7.3.3** DKIM / SPF / DMARC / BIMI signing
- [x] **139.7.3.4** Anti-spam (rspamd-class)
- [x] **139.7.3.5** Anti-virus (ClamAV-class)
- [x] **139.7.3.6** Sieve filter engine
- [x] **139.7.3.7** Quota / archive policy
- [x] **139.7.3.8** Push notifications
- [x] **139.7.3.9** Spam-trap and reputation
- [x] **139.7.3.10** Deliverability dashboard

Server-stack evidence (2026-07-12): `@neith/mail::server` implements a bounded,
sequenced SMTP submission session with EHLO, XOAUTH2, authenticated envelope,
recipient, DATA, reset, and queue semantics. A tenant-isolated content-addressed
mailstore exposes IMAP-style UID/mod-sequence listing and JMAP query-state,
filtering, pagination, mailbox, and flag updates. Domain authentication combines
SPF envelope authorization, aligned DKIM identities, DMARC policy disposition,
and verified HTTPS BIMI marks. Learned local content probabilities are combined
with authentication and reputation inputs into deterministic accept, quarantine,
or reject actions. An injected streaming antivirus boundary applies aggregate
byte budgets and hashes every positive finding, enabling real ClamAV or
equivalent engines without coupling storage to one daemon. The bounded Sieve
interpreter executes header/size conditions and keep, discard, fileinto,
redirect, and flag actions. Quota and age policies classify active, archive, and
deletion lifecycle; tenant push subscriptions provide ordered change events.
Thirty-day delivery, bounce, complaint, and spam-trap events produce weighted
sender reputation. The deliverability aggregator reports provider delivery,
defer, bounce, complaint, TLS, and median-latency measures, exposed in the
responsive mail workspace. Ten focused server tests cover every stack item; the
package now has thirty-four unit/integration tests, and the two browser tests
also assert dashboard visibility and responsive behavior.

---

### 139.8 @neith/calendar-contacts — Calendar, Contacts, Tasks

- [x] **139.8.1** CalDAV / CardDAV / iCloud / Google / Microsoft protocols
- [x] **139.8.2** Local + synced calendars
- [x] **139.8.3** Recurrence with RRULE
- [x] **139.8.4** Time-zone aware
- [x] **139.8.5** Busy / free / tentative
- [x] **139.8.6** Meeting invites with RSVP
- [x] **139.8.7** Scheduling assistant with availability
- [x] **139.8.8** Public calendar share (ICS link)
- [x] **139.8.9** Booking pages (Calendly-class)
- [x] **139.8.10** Natural-language quick-add
- [x] **139.8.11** Travel time estimation
- [x] **139.8.12** Contact unified view across accounts
- [x] **139.8.13** Contact duplicate detection
- [x] **139.8.14** Group / tag contacts
- [x] **139.8.15** Birthday / anniversary
- [x] **139.8.16** Task list with due, priority, subtask
- [x] **139.8.17** Natural-language task capture
- [x] **139.8.18** GTD / Eisenhower views
- [x] **139.8.19** Email → task conversion
- [x] **139.8.20** Shared team task board

Implementation evidence (2026-07-12): `@neith/calendar-contacts::protocols`
builds HTTPS-only CalDAV/CardDAV discovery, incremental sync REPORT, fetch,
conditional PUT, and delete requests and parses multistatus resource, ETag,
payload, status, and sync-token responses. Provider adapters implement paginated
Google Calendar/People and Microsoft Graph event/contact listing, creation,
patch, and deletion; iCloud follows the DAV path. The optimistic repository
combines local and synchronized calendars with write isolation and versioned
conflict detection. Bounded RFC 5545 RRULE parsing and expansion supports daily,
weekly/BYDAY, monthly, and yearly schedules; IANA-zone formatting preserves
canonical instants. Free/busy/tentative projection, working-hour availability,
RSVP replies, token-obscured public ICS feeds, conflict-aware booking slots,
natural-language quick-add, and haversine mode/traffic travel estimates cover
the scheduling loop.

`@neith/calendar-contacts::contacts-tasks` merges identities across ranked
accounts by normalized email/phone while retaining provenance and newer or
populated fields. Duplicate reports name their email, phone, or normalized-name
evidence; group/tag assignment is deduplicated, and complete or partial birthday
and anniversary dates produce ordered yearly occasions. Versioned task storage
validates due dates and same-workspace parent/subtask relationships. Natural
language capture extracts relative/ISO due dates, times, and priorities; GTD and
Eisenhower projections derive from authoritative state. Email conversion uses a
stable SHA-256 source identity, and team boards validate membership, ordering,
columns, unassigned work, and member workload. Thirteen focused tests cover all
twenty requirements, malformed/conflict paths, synchronization, recurrence, time
zones, scheduling, identity merge, date parsing, task capture, and team views. A
calm cardless weekly workspace exposes availability, booking, RSVP, travel, and
tasks; two Playwright tests verify the complete desktop path, responsive
inspector collapse, horizontal containment, and reduced motion.

---

### 139.9 @neith/pdf-tools — PDF Reader / Editor / Forms / Signatures

Acrobat Pro / Foxit / PDF Expert replacement.

#### 139.9.1 Viewer / Annotation

- [x] **139.9.1.1** Fast rendering for 10k-page PDFs
- [x] **139.9.1.2** Highlight / underline / strikeout / squiggly
- [x] **139.9.1.3** Freehand ink with pen pressure
- [x] **139.9.1.4** Sticky note / text box / callout
- [x] **139.9.1.5** Stamp (approved, draft, custom)
- [x] **139.9.1.6** Bookmarks and thumbnails
- [x] **139.9.1.7** Full-text search across document + corpus
- [x] **139.9.1.8** Read-aloud (TTS)
- [x] **139.9.1.9** Text-to-speech with highlighting
- [x] **139.9.1.10** Night mode / sepia / contrast

#### 139.9.2 Editing

- [x] **139.9.2.1** Edit text in existing PDF (font preserved)
- [x] **139.9.2.2** Edit images / replace
- [x] **139.9.2.3** Reorder / rotate / delete pages
- [x] **139.9.2.4** Merge / split / compress
- [x] **139.9.2.5** OCR (multi-language) with selectable text
- [x] **139.9.2.6** Redact (text + rectangles) with scrub
- [x] **139.9.2.7** Watermark add / remove
- [x] **139.9.2.8** Header / footer / Bates numbering
- [x] **139.9.2.9** Convert to Word / Excel / PowerPoint
- [x] **139.9.2.10** Create PDF from scan (sheet-fed or camera)

#### 139.9.3 Forms

- [x] **139.9.3.1** Static PDF forms (AcroForm)
- [x] **139.9.3.2** Dynamic XFA forms (legacy)
- [x] **139.9.3.3** Form designer (text / radio / checkbox / dropdown /
      signature)
- [x] **139.9.3.4** Form submission to CSV / database
- [x] **139.9.3.5** JavaScript validation
- [x] **139.9.3.6** Flattened distribution copy

#### 139.9.4 E-Signature

- [x] **139.9.4.1** Draw / type / image signature
- [x] **139.9.4.2** PAdES LTV digital signature
- [x] **139.9.4.3** Time-stamp server (RFC 3161)
- [x] **139.9.4.4** Multi-signer workflow
- [x] **139.9.4.5** Email send-for-signature
- [x] **139.9.4.6** Audit trail with IP / geolocation
- [x] **139.9.4.7** Qualified eIDAS (QES) support
- [x] **139.9.4.8** DocuSign / HelloSign compatibility
- [x] **139.9.4.9** Template library
- [x] **139.9.4.10** Embedded-signer SDK

Viewer and editing evidence (2026-07-12): `@neith/pdf-tools::viewer` computes
constant-memory visible/overscan windows and exact spacers across validated
documents of up to ten thousand pages. Its annotation store validates all four
text-markup styles, pressure-bounded ink, note/textbox/callout geometry, and
built-in or custom stamps. Cycle/duplicate-safe bookmark trees, aspect-correct
thumbnail plans, a Unicode-normalized per-page corpus index, sentence-bounded
speech plans with character-offset highlights, and explicit
day/night/sepia/high-contrast transforms complete reading. `::editing` uses the
real `pdf-lib` object model for region text replacement with caller-selected
font, contained/covered image replacement, page copy/reorder/rotation/deletion,
merge/split, and object-stream compression. Multi-language OCR embeds a supplied
Unicode font and transparent selectable words with language/confidence policy.
Secure redaction rebuilds affected pages from raster pixels before adding black
rectangles, so original text/image objects are absent rather than merely
covered. Hash-bound watermark receipts permit exact removal; headers, footers,
page counts, and padded Bates sequences are drawn per page. Valid stored-ZIP
OOXML packages include content types, office relationships, and Word documents,
Excel workbooks/worksheets, or PowerPoint presentation/slides. DPI-aware
PNG/JPEG scan assembly supports camera and sheet-fed page sequences.

Forms and signature evidence (2026-07-12): `@neith/pdf-tools::forms` creates,
fills, reads, and flattens real AcroForm text, checkbox, radio, dropdown, list,
and signature controls. It extracts entity-safe XDP/template packets, detects
flowed dynamic XFA, preserves datasets, and safely updates named dataset nodes.
Form submission emits RFC 4180-escaped CSV or awaits an injected transactional
database writer. JavaScript validation runs in a time-bounded VM context with
dynamic code generation and WebAssembly disabled and validates the returned
error contract. `::signatures` draws pressure-path, typed, or PNG/JPEG visible
appearances; prepares an ETSI CAdES detached `/Sig` dictionary with fixed-width
`/ByteRange`, embeds CMS DER, and includes certificate/OCSP/CRL DSS streams for
long-term validation. Focused integration generates an ephemeral X.509 keypair,
signs the exact byte ranges with OpenSSL CMS, verifies the detached signature,
embeds it, and reloads the signed PDF. OpenSSL-backed RFC 3161
query/verification descriptors, ordered optimistic multi-signing, email delivery
tokens, SHA-256-chained IP/geolocation audit evidence, full
qualified-certificate/device/ trust-list/identity/jurisdiction QES assessment,
DocuSign/HelloSign mapping, validated reusable templates, and consented
HTTPS-origin embedded sessions complete the workflow.

Twenty-seven focused tests exercise the ten-thousand-page boundary, every
annotation/form/signature family, real PDF and Poppler round trips, Unicode OCR,
content scrubbing, valid ZIP CRCs, sandbox timeouts, real CMS verification, and
RFC 3161 request inspection. A restrained document-canvas workspace exposes
thumbnails, annotations, permanent redaction, theme/read-aloud, forms, PAdES
status, and send-for-signature. Two Playwright tests cover desktop interaction,
night-mode state, mobile inspector reveal, horizontal containment, and reduced
motion.

---

### 139.10 @neith/forms — Form Builder (Typeform / Google Forms / Jotform / Surveymonkey)

Conversational forms and surveys.

- [x] **139.10.1** Block form editor (question types: short, long, multiple,
      date, number, file, matrix, rating, ranking, NPS, signature, payment)
- [x] **139.10.2** Conditional logic / branching
- [x] **139.10.3** Typeform-style one-question-at-a-time UI
- [x] **139.10.4** Conversational / chatbot form style
- [x] **139.10.5** Hidden fields and URL parameters
- [x] **139.10.6** Calculators (score, quiz, calculator)
- [x] **139.10.7** Payment integration
- [x] **139.10.8** Scheduling integration (@neith/calendar-contacts)
- [x] **139.10.9** Email / webhook / database destinations
- [x] **139.10.10** Form analytics (funnel, drop-off, time-to-complete)
- [x] **139.10.11** A/B test variants
- [x] **139.10.12** Multilingual forms
- [x] **139.10.13** Accessibility (ARIA, screen reader)
- [x] **139.10.14** Anti-spam (honeypot, captcha, behavior)
- [x] **139.10.15** Response sharing / dashboards

Implementation evidence (2026-07-12): `@neith/forms::model` defines and
validates localized short/long text, multiple selection, date, numeric, file,
matrix, rating, ranking, NPS, signature, and payment blocks. IDs/options are
unique, file/rating/payment bounds are explicit, every locale requires a prompt
and screen-reader label, and branch graphs reject unknown targets and cycles.
The runtime validates each answer family, admits only declared hidden query
fields, advances one authoritative session through sequential or priority
all-condition branches, and projects that state into classic, single-question,
or conversational transcripts. Depth-bounded arithmetic trees provide score,
quiz, and calculator results without dynamic execution.

`::integrations` derives bounded minor-unit payment amounts and idempotency keys
before awaiting a provider intent, and delegates validated slots/invitees to the
calendar reservation boundary. Completed responses become email payloads,
database records, or HTTPS webhook bodies protected by timestamped HMAC-SHA256
signatures, constant-time verification, and replay tolerance. Spam assessment
combines honeypot, captcha, completion speed, pointer/key/focus behavior, and
repeat fingerprints into accept/challenge/reject evidence. Expiring hash-bound
share tokens disclose only policy-selected fields and download permission.
`::analytics` assigns weighted A/B variants deterministically from form/visitor
identity and aggregates starts, completions, median duration, per-question
views/answers/drop-off, variant conversion, spam totals, and recent response
dashboard rows.

Nine focused tests cover all block families, translation/ARIA failure, URL-field
allowlisting, branch traversal, conversation output, arithmetic, payment and
scheduling boundaries, all destinations and webhook verification, spam signals,
scoped sharing, stable experiments, funnel analytics, and dashboard counts. The
restrained cardless builder centers a single respondent prompt with progress,
language switching, conversation preview, branch context, response completion,
and accessibility status. Two Playwright tests exercise the labeled desktop
flow, live translation, conversational reveal, mobile containment, and reduced
motion.

---

### 139.11 @neith/pm — Project Management (Jira / Linear / Trello / Asana / Basecamp / Monday)

Issue tracker + sprint + roadmap + OKRs.

- [x] **139.11.1** Project / workspace hierarchy
- [x] **139.11.2** Issue model (title, description, status, priority, labels,
      assignees, cycle/sprint)
- [x] **139.11.3** Views (list, board, timeline / gantt, calendar, roadmap)
- [x] **139.11.4** Custom fields + custom workflows
- [x] **139.11.5** Parent / child / epic / subtask hierarchy
- [x] **139.11.6** Dependencies between issues
- [x] **139.11.7** Cycles / sprints with velocity
- [x] **139.11.8** Roadmap with milestones
- [x] **139.11.9** OKRs with key results
- [x] **139.11.10** Triage queue
- [x] **139.11.11** SLA / escalation
- [x] **139.11.12** Git integration (branches, PRs, commits)
- [x] **139.11.13** CI / deploy integration
- [x] **139.11.14** Slack / email / webhook notification
- [x] **139.11.15** REST + GraphQL API + CLI
- [x] **139.11.16** Import from Jira / Linear / Trello / Asana / GitHub Issues
- [x] **139.11.17** Changelog generation
- [x] **139.11.18** Insights dashboard (cycle time, throughput, burnup)
- [x] **139.11.19** AI triage / auto-prioritize
- [x] **139.11.20** Portfolio-view for exec rollup

Implementation evidence (2026-07-12): `@neith/pm::core` enforces unique
workspace/project hierarchy, membership and project-key ownership, complete
issue fields, optimistic versions, date bounds, typed required custom fields,
and explicit workflow transitions. Parent/child/epic/subtask relations reject
cross-project, missing, and ancestor cycles; blocking dependencies independently
reject graph cycles. One source of issue state derives ordered list and board
columns, Gantt/timeline spans, calendar deadlines, and epic roadmaps with child
progress. Cycle commitment/completion produces velocity and completion rate;
milestones calculate scope, completion, progress, and schedule risk. Objectives
average bounded key-result progress.

`::operations` orders triage by declared priority and age with explicit reasons,
and evaluates first-response/resolution deadlines plus staged SLA escalation.
Branch, commit, and pull-request keys map to issue identities; CI/deploy runs
normalize duration and health. Email, Slack, and HTTPS webhook destinations
receive stable event bodies, with webhooks HMAC-signed. Strict REST path/method,
bounded non-introspective GraphQL, and named-option CLI codecs cover API
surfaces. Jira, Linear, Trello, Asana, and GitHub records use deterministic
external identities, status/user/priority mappings, provenance, and parent
mapping. Completed issues produce chronological type-grouped changelogs.
Insights derive median cycle time, throughput periods, burnup, active cycles,
and WIP. A locally trained multinomial model learns all five priority classes
and label-token evidence and returns normalized probabilities rather than
invented certainty. Portfolio rollups aggregate active/completed work, milestone
risk, objective progress, and health across workspaces.

Eleven focused tests exercise hierarchy, custom fields, version conflicts,
workflow and dependency cycles, every view, cycles/milestones/OKRs, triage/SLA,
Git and delivery evidence, all notification/API surfaces, all five importers,
changelogs, insights, trained triage, and portfolio health. The restrained
project workspace exposes navigation, issues, cycle progress, timeline
switching, delivery, SLA, and objective context. Two Playwright tests cover the
desktop view transition, semantic progress/status, mobile containment, and
reduced motion.

---

### 139.12 @neith/chat — Team Chat (Slack / Teams / Discord / Matrix / Mattermost)

Persistent group messaging with voice / video.

- [x] **139.12.1** Workspaces, channels (public / private), DMs, groups
- [x] **139.12.2** Threads
- [x] **139.12.3** Rich text + markdown + mentions + emoji + reactions
- [x] **139.12.4** Voice + video calls with screen share (WebRTC + SFU)
- [x] **139.12.5** Huddles / live rooms (Twitter-Spaces / Slack-Huddles-class)
- [x] **139.12.6** Voice messages + transcript
- [x] **139.12.7** File sharing with preview
- [x] **139.12.8** Bots and slash commands
- [x] **139.12.9** Workflow builder / triggers
- [x] **139.12.10** Search across everything
- [x] **139.12.11** External / guest users (federated)
- [x] **139.12.12** Matrix protocol bridging
- [x] **139.12.13** IRC / XMPP gateway (legacy)
- [x] **139.12.14** E2E-encrypted DMs (Signal protocol)
- [x] **139.12.15** Compliance / retention / legal hold
- [x] **139.12.16** DLP (data-loss prevention)
- [x] **139.12.17** Status, Do-Not-Disturb
- [x] **139.12.18** Notification routing to mobile + email
- [x] **139.12.19** Integration marketplace
- [x] **139.12.20** SOC2 / ISO27001 audit ready

Implementation evidence (2026-07-12): `@neith/chat::core` validates workspace
membership and public/private/group/two-party-DM topology, including explicit
federated-guest channel allowlists. Persistent monotonic messages support one
level of ordered threads, escaped Markdown, HTTPS links, code/emphasis, verified
mentions, Unicode emoji reactions, and attachment references. Uploads enforce
size/byte agreement and SHA-256 identity; passive image/media/document preview
policy never executes arbitrary formats. A Unicode-normalized scoped index
searches only authorized workspace channels. Slash-command registration and
invocation is unique and channel-aware; message/reaction triggers produce typed
message, assignment, or HMAC-signed HTTPS webhook actions. Expiring
active/away/DND/offline state drives desktop, mobile, and delayed-email routing.
Marketplace installation requires trusted publishers, allowed permissions, valid
domains, and signed package identity.

`::realtime-federation` validates bounded SDP offer/answer and ICE candidates,
then tracks audio/video/screen publishers and per-peer SFU subscriptions with
capacity and leave cleanup. Huddle/stage rooms enforce host promotion/end and
speaker/listener membership. Voice messages validate duration, chronological
word spans, speakers, language, and learned word probabilities before producing
the transcript. Verified guests require HTTPS homeservers and allowlisted
federation; Matrix message/thread event codecs round-trip authoritative content,
while CRLF-safe IRC and XML-escaped XMPP serializers provide legacy gateways.

`::security` establishes real X25519 shared secrets, derives independent
directional chains and per-message keys with HKDF-SHA256, encrypts DMs using
AES-256-GCM with associated context, advances ratchet counters, and rejects
replay/out-of-order envelopes. Retention classifies retain/archive/delete while
legal hold always preserves. DLP applies channel-scoped regex evidence with
warn/block/redact actions. SHA-256-chained compliance events and control
evidence produce separate SOC2 and ISO27001 coverage/pass/readiness results and
detect audit-chain tampering.

Eleven focused tests cover all twenty requirements: every channel/message path,
thread/reaction, file/search, bot/workflow, DND routing, WebRTC/SFU and huddles,
voice timing, guest/Matrix/IRC/XMPP federation, bidirectional cryptographic
ratcheting and replay rejection, retention/hold/DLP, marketplace trust, and both
compliance frameworks. The restrained text-first workspace exposes channels,
rich messages, thread reveal, transcript, live screen share, guest, retention,
encryption, and compliance state. Two Playwright tests cover the desktop thread
flow, responsive details reveal, mobile containment, and reduced motion.

---

### 139.13 @neith/scholar — Scholarly Authoring (LaTeX / Typst / Overleaf / Scrivener)

Academic writing tool with citations, review, compile.

- [x] **139.13.1** LaTeX editor with syntax + live preview
- [x] **139.13.2** Typst editor with live preview
- [x] **139.13.3** Template library (journals, conferences, theses, CVs)
- [x] **139.13.4** Multi-user real-time collaboration
- [x] **139.13.5** Compile server with cache
- [x] **139.13.6** Git-integrated project storage
- [x] **139.13.7** Track changes and review
- [x] **139.13.8** Reviewer comments anchored in PDF + source
- [x] **139.13.9** BibLaTeX / BibTeX / CSL bibliography
- [x] **139.13.10** Zotero / Mendeley sync
- [x] **139.13.11** Arxiv / DOI fetch metadata
- [x] **139.13.12** Pandoc-backed multi-format output
- [x] **139.13.13** Journal-submission pack with checklist
- [x] **139.13.14** Figure library with TikZ / PGFPlots
- [x] **139.13.15** Equation editor (LaTeX + MathML)
- [x] **139.13.16** Cross-referencing cleanup
- [x] **139.13.17** Plagiarism pre-check (against open corpora)
- [x] **139.13.18** Grammarly-class academic style suggestion
- [x] **139.13.19** Accessibility of final PDF
- [x] **139.13.20** Preprint upload (arXiv, OSF, bioRxiv)

Implementation evidence (2026-07-12): `@neith/scholar::authoring` performs
line/column LaTeX brace, environment, command, empty-reference/citation analysis
and Typst quote-aware delimiter/directive analysis. Error-free source becomes
escaped semantic headings, emphasis, equations, and citations for live preview.
Journal, conference, thesis, and CV templates require safe relative files,
metadata, licenses, and unique identities. Ordered client operations merge
idempotently with position transforms for concurrent insert/delete edits.
Compilation constructs shell-free, no-shell-escape LaTeX or Typst argument
arrays, validates main-file/time budgets, hashes sorted inputs plus engine, and
caches immutable output/log/diagnostics through an injected worker boundary.
Real Git argument builders are verified by initializing and committing an actual
repository. Source-range revisions accept/reject only against matching text;
comments validate source hashes and PDF document/page/rectangle anchors.

`::research-output` parses braced/quoted BibTeX records into CSL-like citations
and renders numeric, author-date, or APA references. Zotero and Mendeley request
builders and cursor merges preserve local identity while coalescing DOI matches
and deletions. Strict Crossref DOI and arXiv request/normalization paths supply
metadata. Pandoc commands allow declared input/output formats, safe output
paths, bibliography, and CSL without shell interpolation. Journal packs evaluate
file/metadata/affirmation requirements and SHA-256 every manifest entry. Figure
assets support raster, TikZ, and PGFPlots with alt text/captions/labels, bounded
width, and dangerous include/write rejection. Editable fraction/superscript
trees emit MathML. LaTeX/Typst cross-reference audits report duplicates, missing
targets, and unused labels.

`::integrity` compares normalized source shingles only against HTTPS,
license-declared open-corpus documents and returns exact passages, source word
positions, digests, and an auditable overlap ratio. Anchored academic-style
rules cover precision, concision, direct evidence-based tone, grammar, and
inclusive language with source evidence and replacements. PDF validation checks
magic, tagging, language/title, structure tree, marked content, figure alt text,
reading order, and embedded fonts. arXiv, OSF, and bioRxiv upload requests
validate metadata/archive/license, bind archive SHA-256 into metadata, and use
explicit bearer/multipart boundaries.

Thirteen focused tests cover syntax/preview errors, all template families,
collaborative transform/idempotency, cached compilation, a real Git commit,
tracked changes and dual anchors, bibliography and sync, DOI/arXiv metadata,
Pandoc and submission packs, figures/equations/references, exact corpus matches,
all style categories, PDF accessibility, and preprint requests. The restrained
split manuscript desk exposes source, proof, collaboration, citations, anchored
review, integrity, accessibility, and submission readiness. Two Playwright tests
cover desktop source/proof evidence, mobile proof/review switching, containment,
and reduced motion.

---

### 139.14 @neith/biblio — Reference Manager (Zotero / Mendeley / EndNote)

- [x] **139.14.1** Library with folders / tags / smart collections
- [x] **139.14.2** Duplicate detection
- [x] **139.14.3** Metadata fetch (DOI, ISBN, PubMed, arXiv, Crossref, OpenAlex)
- [x] **139.14.4** Browser extension one-click save
- [x] **139.14.5** PDF full-text indexing
- [x] **139.14.6** Notes / annotations attached to references
- [x] **139.14.7** Citation style (CSL) library
- [x] **139.14.8** Writer / Scholar plugin for in-text citation
- [x] **139.14.9** Bibliography auto-generation
- [x] **139.14.10** Groups / shared libraries
- [x] **139.14.11** Cloud sync + offline
- [x] **139.14.12** Import BibTeX / RIS / EndNote
- [x] **139.14.13** Export BibTeX / RIS / CSV
- [x] **139.14.14** Watch folder for new PDFs
- [x] **139.14.15** Scihub / preprint-server integration (policy-compliant)

Implementation evidence (2026-07-12): `@neith/biblio::library` enforces
cycle-safe same-library folders, normalized unique tags, versioned reference
metadata, DOI/ISBN validity, attachment identities, and
page/quote/color-anchored notes. Smart collections evaluate all/any typed rules
across type, tags, folders, title, creators, year, and attachment state.
Duplicate reports name exact DOI, normalized ISBN, or normalized-title/year
evidence. Browser capture reads standard citation/OpenGraph metadata from
bounded HTTP(S) HTML without executing page content. The Unicode-normalized
per-page index supports up to ten thousand PDF pages per reference and
reference-scoped multi-term search with positions and snippets.

`::integrations` constructs strict DOI/Crossref, ISBN/OpenLibrary, PubMed/NCBI,
arXiv, and OpenAlex requests and normalizes provider records. A validated
CSL-style model formats numeric, author-date, or note citations and sorted
bibliography rows with et-al and DOI behavior. Writer/Scholar insertion commands
bind document offset, ordered references, style, and a stable transaction hash.
Role-gated optimistic shared libraries and idempotent timestamp/device-ordered
offline operation logs merge cloud state, deletes, and tombstones;
Zotero/Mendeley-style provider sync coalesces DOI matches while preserving local
identity. Entity-safe EndNote XML, line-record RIS, and braced BibTeX import
feed canonical references; BibTeX, RIS, and RFC-4180-escaped CSV export preserve
creators, years, and identifiers. Watch-folder ingestion accepts only
byte-consistent changed PDFs and hashes content. Acquisition permits
license-declared open access, known preprint providers, or entitlement-backed
institutional HTTPS sources, retains provenance, and explicitly rejects
unlicensed mirror hosts.

Eleven focused tests cover folders/tags/smart rules, notes, all duplicate
evidence, six metadata routes, browser capture, full-text scope, CSL/citation
plugins, shared/offline/provider sync, all import/export formats, watch-folder
change detection, and allowed/denied acquisition policy. The restrained research
library exposes smart/shared collections, citation rows, full-text indexing,
anchored notes, metadata provenance, sync, and citation action. Two Playwright
tests cover the complete desktop record flow, responsive detail reveal, mobile
containment, and reduced motion.

---

### 139.15 @neith/publish — Authoring for Books, Blogs, CMS (Sigil / Vellum / Calibre / Hugo / WordPress / Ghost)

Long-form publishing from single source to many formats.

#### 139.15.1 Ebook Authoring

- [x] **139.15.1.1** Book project with chapters / front / back matter
- [x] **139.15.1.2** EPUB 3.3 generator
- [x] **139.15.1.3** Fixed-layout EPUB
- [x] **139.15.1.4** KF8 / Kindle packaging
- [x] **139.15.1.5** Interactive EPUB (video, audio, SVG animation)
- [x] **139.15.1.6** Accessible ebook (tagged, alt-text, reading order)
- [x] **139.15.1.7** Cover designer integration (Forge 2D)
- [x] **139.15.1.8** ISBN / metadata management
- [x] **139.15.1.9** Retailer upload (KDP, Apple Books, Kobo, Google Play Books)
- [x] **139.15.1.10** Print-on-demand PDF for KDP / IngramSpark / Lulu

#### 139.15.2 CMS / Blog / Static Site

- [x] **139.15.2.1** Static-site generator (Hugo / Eleventy-class) under the
      hood
- [x] **139.15.2.2** Theme engine with preview
- [x] **139.15.2.3** Content model (posts, pages, collections)
- [x] **139.15.2.4** Headless-CMS API
- [x] **139.15.2.5** WYSIWYG editor
- [x] **139.15.2.6** Scheduled publishing
- [x] **139.15.2.7** Comment engine (moderation, threading, anti-spam)
- [x] **139.15.2.8** Newsletter with segments
- [x] **139.15.2.9** RSS / JSON Feed
- [x] **139.15.2.10** Analytics (privacy-preserving)
- [x] **139.15.2.11** SEO / sitemap / OpenGraph
- [x] **139.15.2.12** Accessibility audits per page
- [x] **139.15.2.13** Localization / i18n
- [x] **139.15.2.14** Membership / paid subscriptions
- [x] **139.15.2.15** Import from WordPress / Ghost / Medium / Substack

#### 139.15.3 Universal Conversion (Pandoc-Class)

- [x] **139.15.3.1** Pandoc-level format matrix (MD / RST / LaTeX / ConTeXt /
      Typst / HTML / DOCX / ODT / EPUB / JATS / DocBook)
- [x] **139.15.3.2** Filter / template engine
- [x] **139.15.3.3** Citation-rewrite filter
- [x] **139.15.3.4** Code syntax highlight
- [x] **139.15.3.5** Math rendering (MathML / SVG)
- [x] **139.15.3.6** CLI + API + GUI wrapper
- [x] **139.15.3.7** Round-trip fidelity validator
- [x] **139.15.3.8** Bulk conversion pipelines
- [x] **139.15.3.9** Pre-/post-process hooks
- [x] **139.15.3.10** Calibre-class ebook format converter

Ebook evidence (2026-07-12): `@neith/publish::book` validates contiguous
front/chapter/back structure, language/authors/publisher/rights, safe XHTML,
ISBN-13 check digits, and Forge-origin cover bytes/dimensions/alt text. Its real
stored-ZIP EPUB has the required first `mimetype`, META-INF container, OPF
manifest/spine/metadata, semantic nav, ordered XHTML landmarks, fixed-layout
rendition and viewport metadata, described images/SVG, and declared audio/video
assets. CRC validation uses the installed `unzip` runtime. The KF8 writer emits
a PalmDB `BOOKMOBI` container with PalmDOC record, `MOBI` header, UTF-8
codepage, KF8 version, and serialized book content. KDP, Apple Books, Kobo, and
Google Play request builders bind bearer identity, metadata, media type, and
content SHA-256. POD validation covers PDF magic, page/trim/bleed, CMYK/gray,
300-dpi minimum, embedded fonts, and KDP/IngramSpark/Lulu page limits.

CMS evidence (2026-07-12): `::cms` validates script-free content-bearing themes,
CSS imports, variables, safe localized post/page slugs, semantic heading,
paragraph, quote, code, image, and HTTPS embed blocks. Optimistic storage
rejects locale-slug conflicts and transactionally publishes due schedules.
Static output renders theme layouts, per-locale routes, index, CSS variables,
and SHA-256 manifests; REST commands cover content, media, comments, and
members. Threaded comments validate parents and combine
honeypot/captcha/link/repetition moderation. Consent/status/locale/tag
segmentation produces newsletter audiences. RSS 2.0 and JSON Feed 1.1, daily
salted visitor hashes, sitemap/no-index filtering, OpenGraph, per-page
language/main/heading/image/control accessibility checks, translation-group
fallback, active paid-plan collection access, and normalized
WordPress/Ghost/Medium/Substack imports complete publishing operations.

Conversion evidence (2026-07-12): `::conversion` uses a semantic block AST
across Markdown, RST, LaTeX, ConTeXt, Typst, HTML, DOCX, ODT, EPUB, JATS, and
DocBook outputs, with semantic text import for source formats and stored-ZIP
packages for binary destinations. Pure filters and script-free templates,
citation rewriting with missing-key rejection, language-aware escaped code
highlighting, and safe MathML/SVG math rendering operate before serialization.
Strict CLI options, JSON API requests, and the publishing GUI share the same
document contract. Normalized hashes and block deltas report fidelity. Bounded
bulk batches run awaited pre/post hooks and isolate per-job errors; shell-free
Calibre `ebook-convert` argument arrays cover EPUB/MOBI/AZW3/FB2/PDF conversion.

Thirteen focused tests cover all thirty-five requirements, including real EPUB
ZIP CRCs, KF8 magic/header offsets, all retailers and POD targets, static theme
output, schedules, comments/newsletters/feeds/analytics/SEO/accessibility/i18n/
members/importers, every conversion format, filters/citations/code/math,
CLI/API/fidelity, concurrent hooks, and ebook commands. The restrained editorial
workspace exposes book structure, EPUB/web/print proofs, accessibility,
schedule, print specifications, and retailer readiness. Two Playwright tests
cover the desktop production view, responsive distribution reveal, mobile
containment, and reduced motion.

---

### 139.16 @neith/knowledge-ai — Sovereign AI Knowledge Worker Assistant

Cross-app AI worker integrated with Phase 47 (Nous).

- [x] **139.16.1** Summarize any document / thread / email
- [x] **139.16.2** Draft replies / documents in user voice
- [x] **139.16.3** Extract action items and create tasks
- [x] **139.16.4** Meeting notes + action items from transcript
- [x] **139.16.5** Long-document Q&A with citation
- [x] **139.16.6** Cross-workspace semantic search
- [x] **139.16.7** Data-table insight generation
- [x] **139.16.8** Presentation draft from prompt + docs
- [x] **139.16.9** Translate and localize
- [x] **139.16.10** Proofreading and style suggest
- [x] **139.16.11** Calendar optimization / priority re-rank
- [x] **139.16.12** Automated agenda + brief pre-meeting
- [x] **139.16.13** Delegated agent (acts inside apps with approval)
- [x] **139.16.14** On-device inference option for privacy
- [x] **139.16.15** Audit log of AI actions + undo

Implementation evidence (2026-07-12): `@neith/knowledge-ai` supplies exact-span
grounding verification for summaries, long-document answers, voice-profiled
drafts, and presentation claims; workspace-scoped cosine search; transcript
decisions and task extraction; source-cell table statistics; protected-token,
glossary-aware localization; and anchored proofreading suggestions. Its agency
layer performs constraint-preserving priority scheduling and cited meeting
briefs, holds scoped app actions behind explicit approval with idempotent
execution, verifies local model bytes and network isolation, and records
hash-chained reversible commands with conflict-safe undo. Twelve focused tests
cover evidence rejection, voice samples, access control, productivity flows,
calendar constraints, approvals, private inference, and audit integrity. Two
Playwright flows exercise citation inspection, approval state, responsive
evidence disclosure, horizontal containment, and reduced-motion behavior.

---

### Phase 139 Summary — Sovereign Office, Scholarly & Collaboration

| Library                  | Section | Tasks   |
| ------------------------ | ------- | ------- |
| @neith/docs-core         | 139.1   | 30      |
| @neith/writer            | 139.2   | 40      |
| @neith/sheets            | 139.3   | 45      |
| @neith/slides            | 139.4   | 30      |
| @neith/notes             | 139.5   | 20      |
| @neith/wiki              | 139.6   | 15      |
| @neith/mail              | 139.7   | 35      |
| @neith/calendar-contacts | 139.8   | 20      |
| @neith/pdf-tools         | 139.9   | 36      |
| @neith/forms             | 139.10  | 15      |
| @neith/pm                | 139.11  | 20      |
| @neith/chat              | 139.12  | 20      |
| @neith/scholar           | 139.13  | 20      |
| @neith/biblio            | 139.14  | 15      |
| @neith/publish           | 139.15  | 35      |
| @neith/knowledge-ai      | 139.16  | 15      |
| **Phase 139 Total**      |         | **411** |
