Aller au contenu principal

Open Manuscript Studio 1.0 Target Architecture

Status: proposed 1.0 target architecture, prepared for architecture-freeze decisions
Audit date: 2026-09-19
Primary implementation baseline: open-manuscript-studio/main @ eca2cf45762116e1c00a89b3397840ed89109511
Related baselines: omi @ e2f421707f1154c0ed30cb7750e0689a837e9b0a; omi-ojs-plugin @ 6c0842fc1ce6c4a1ea75f7b27660af8011be303b; omi-omp-plugin @ 4f7a2c0a2f29f68e3ad05ac73ca7652bc6410ac7

This is an implementation-architecture document. Normative OMI specifications remain authoritative for interoperable OMI semantics. Where implementation and specification differ, this document records the gap rather than silently treating either side as equivalent.

1. Executive decision

Open Manuscript Studio 1.0 should be created by stabilizing the existing working product behind explicit contracts, not by designing a replacement application.

The following implementation assets should remain central to 1.0:

  • the Tiptap-based editor and semantic extensions;
  • study-level continuous editing and progressive mounting;
  • the current immutable revision/revert semantics;
  • the secure OMI container reader;
  • publication build, artifact hashing, and provenance;
  • DOCX, JATS, HTML, PDF, and related format processing;
  • cloud-storage adapters and existing SSRF controls;
  • the Tauri shell and mobile platform work;
  • server-side PKP authorization and signed launch handling in the OJS/OMP integrations.

The deepest changes are required at boundaries where the current implementation has accumulated multiple responsibilities:

  1. OMI-SPEC-320 must become a runtime-enforced interoperable format contract.
  2. Tiptap/ProseMirror representation must move behind an editor adapter instead of behaving as portable manuscript data.
  3. application use cases must move out of React/Zustand state management;
  4. identity, review, integration, and external-writeback authority must be explicit;
  5. 1.0 release evidence must be generated on one exact RC commit without path-filter omissions.

2. Evidence model

The audit applies three evidence classes:

  • implementation is the primary evidence of current operational behaviour;
  • tests and CI are evidence that a behaviour is currently verified;
  • OMI specifications define the intended interoperable contract and the target for conformance.

A working implementation is not automatically wrong when it differs from an unfinished specification. Conversely, existing behaviour is not automatically a stable contract. Differences must be made explicit and then resolved deliberately.

Key audited areas include:

  • src/types/omi.ts, src/document/createBlankManuscript.ts, and src/services/exportOmi.ts;
  • src/components/BlockEditor.tsx, src/editor/continuousManuscriptDocument.ts, progressiveStudyMounting.ts, and focus lifecycle code;
  • src/app/useStudioStore.ts, action modules, and session persistence;
  • versioning, working-state, and integrity models;
  • OMI container and ZIP handling;
  • publication profiles, renderers, manifests, and artifacts;
  • backend routes, services, both Prisma schemas, and integration services;
  • OJS/OMP Studio adapters and both PKP plugins;
  • OMI-SPEC-320 schema, fixtures, and file-format tests;
  • Studio and OMI CI/release workflows.

3. Target dependency architecture

flowchart TB
UI["UI: React + Zustand projections"]
Platform["Platform adapters: Web / Tauri / Mobile"]
Connectors["Integration and delivery adapters"]
Editor["Editor adapter: Tiptap runtime"]
App["Application core: commands, queries, policies"]
Domain["OMI domain + portable format contracts"]
Infra["Persistence, renderers, server repositories"]

UI --> App
UI --> Editor
Platform --> App
Connectors --> App
Editor --> App
Infra --> App
App --> Domain
Editor --> Domain

Arrows describe dependency direction. Core layers define ports; adapters implement them.

The domain layer must not import React, Tiptap, Zustand, Tauri APIs, Prisma clients, OJS/OMP transport DTOs, or network clients.

3.1 Target module boundaries

The project does not need to become a multi-package monorepo merely for architectural cleanliness. The required boundaries can first be enforced inside the existing repository:

src/
core/
omi/
format/
manuscript/
identity/
annotations/
references/
assets/
history/
proofing/
review/
application/
documents/
editing/
history/
import/
export/
publishing/
review/
references/
identity/
ports/
editor-tiptap/
codec/
runtime/
extensions/
mounting/
adapters/
persistence/
platform/
renderers/
importers/
connectors/
api/
ui/
state/
components/
server/
api/v1/
application/
domain/
adapters/

These paths describe a target shape, not a request for one mechanical move PR. Existing imports should survive temporarily through compatibility re-exports while call sites move.

3.2 Dependency rules

LayerMay depend onMust not depend on
core/omistandard TypeScript utilities, pure validation primitivesReact, Tiptap, Zustand, Tauri, fetch, Prisma, OJS/OMP
core/reviewminimal public OMI core typesconnector DTOs, UI, Prisma
applicationcore and application-owned portsReact components, concrete platform/storage/provider implementations
editor-tiptapcore plus application command/query APIZustand internals, persistence adapters
adaptersapplication ports plus wire contractsunrelated concrete adapters except at composition roots
uiapplication facade, editor facade, UI/session statePrisma, parsers, renderer internals
server/apiserver application facade plus transport schemasdirect Prisma business mutations

These rules should be executable through lint/import-boundary tests rather than remaining prose only.

4. OMI Core

4.1 Ownership

OMI Core owns portable manuscript meaning and interoperable representation:

  • envelope and document kind;
  • volume, study, section, block structure, stable identifiers, and ordering;
  • scholarly agents and contributions;
  • descriptive and local scholarly metadata;
  • annotations, notes, citations, bibliography, anchors, and cross-references;
  • asset identity, checksum, media type, and semantic role;
  • revision/history semantics and publication corrections;
  • portable proofing/tracked-change semantics;
  • namespaced extension data and declared profiles/capabilities.

It does not own editor instances, selection, focus, viewport, undo stacks, local paths, browser file handles, cloud object identifiers, login sessions, OAuth tokens, OJS/OMP workflow state, publication CSS, installed font locations, or Prisma rows.

4.2 Current-to-target placement

Current area1.0 ownershipDirection
src/types/omi.tsmultiple core/omi modulesSPLIT
identity/contributor modelscore/omi/identityKEEP/HARDEN
citation/reference modelscore references plus renderer adapter for renderingSPLIT
notes/anchors/xrefscore/omi/annotationsHARDEN
assets + asset repositoryasset domain plus persistence adapterSPLIT
versioning/working statehistory semantics plus application historyKEEP/HARDEN
proofingcore/omi/proofingREFACTOR anchors/payloads
publication profile/style modelapplication publishing / renderer contractMOVE from manuscript domain
empty placeholder domain modulesno independent entry pointREMOVE after re-export migration

5. File-format contract and version policy

Studio 1.0 must distinguish separate version axes:

Version axisCarrierMeaning
OMI file-format versionomi.versionenvelope and required wire vocabulary
exact schema identitytop-level schema URIexact JSON Schema document
container versioncontainer manifestpackage, paths, checksums, entry rules
generator/application versionprovenancesoftware that produced the artifact
manuscript revisionhistory/revision IDintellectual/content state, not wire-format version

No additional schemaVersion field should be introduced. The schema URI and omi.version already express schema identity and format generation. Adding a third equivalent field would create another drift source.

5.1 Source of truth

The released JSON Schema in the omi repository is the normative machine-executable wire contract. Studio should:

  1. vendor an immutable released schema pinned by checksum;
  2. generate or derive wire types/codecs from it;
  3. keep richer domain types separately;
  4. check URI, version, and checksum consistency in CI;
  5. execute the same conformance fixtures as the OMI repository.

Schema validation is necessary but not sufficient. The complete gate is:

schema validation + semantic/domain invariants + referential integrity.

5.2 Validation lifecycle

flowchart LR
Bytes["Untrusted bytes"] --> Envelope["Envelope + version gate"]
Envelope --> Schema["JSON Schema"]
Schema --> Invariants["Domain invariants"]
Invariants --> Draft["Editable aggregate"]
Draft --> SaveGate["Pre-save validation"]
SaveGate --> Artifact["Atomic write / export"]

Validation occurs:

  • before open/import: quotas, safe parsing, envelope/version classification;
  • before editable state: exact schema, invariants, references, asset manifest;
  • after commands: cheap local invariants where useful;
  • before checkpoint/save/export/submission: complete validation;
  • during container restore: package integrity first, manuscript validation second;
  • at server boundaries: transport validation and authorization before domain mapping.

Invalid state must never silently overwrite the source file.

5.3 Compatibility policy

InputOpenEditOverwritePolicy
supported frozen stable generationyesyesafter validationnormal
later minor in same major with explicit forward policyyespolicy-dependentonly after proven preservationcapability/extension check
later minor without policyquarantine/read-onlynonoraw export or controlled Save As
later majorquarantine/read-onlynonono silent downgrade
earlier stable version with explicit migrationyesafter migrationas target versionaudited from -> to migration
pre-stable experimental Studio formatbest-effort import or rejectonly after successful importwrite a new stable artifactno permanent legacy guarantee
invalid/unknown envelopenononodiagnostics and raw recovery

Compatibility obligations begin with the first frozen stable format. Pre-stable experimental formats do not require an indefinite migration framework.

5.4 Unknown extensions

A standard namespaced extensions map should preserve vendor extension payloads even when Studio cannot interpret them.

Known extension codecs may validate and interpret their payloads, but the raw semantic payload must remain preservable. A failed extension decode must not imply silent deletion.

Forward-minor files are editable only if policy and tests prove unknown data can survive the round trip. Export diagnostics distinguish at least: unchanged, normalized, downgraded, externalized, and dropped.

6. Editor Engine

6.1 Tiptap remains the editor runtime

Tiptap is retained for 1.0. The audited implementation already demonstrates rich editing, semantic marks, citation/note/xref nodes, continuous editing, and study lifecycle.

Tiptap is an adapter, not the portable manuscript wire model:

Portable OMI content tree
⇅ versioned ContentCodec
ProseMirror document / Tiptap extensions
⇅ EditorSession
React view + runtime-only state

The first codec implementation may still read the existing serialized Tiptap JSON representation. That allows incremental migration. Every consumer should move behind the codec before the stable portable representation is changed.

6.2 Portable versus runtime-only

PortableRuntime-only
stable document/study/section/block IDsTiptap Editor instance
semantic block type and content treeProseMirror transaction/plugin state
semantic inline marksselection/head/anchor positions
citation/note/xref/asset IDsfocus registry and toolbar state
list/table/equation structureviewport and mounted-editor set
portable tracked changes and attribution referenceslocal undo/redo stack
stable domain annotation anchorsdecorations/search highlights

6.3 Large-document lifecycle

Study-level ProseMirror documents and progressive mounting should remain.

Hardening requirements include:

  • bounded active editor count and memory budgets at 500k synthetic words;
  • selection preservation through mount/unmount and tab restore;
  • atomic cross-study cut/paste commands;
  • virtualized outline and search results;
  • cache invalidation keyed by document revision and codec version;
  • worker/background execution for expensive import/render work with cancellation and progress.

6.4 Undo versus revision history

Editor undo/redo is session-local runtime behaviour.

Working changes are application-level semantic mutations.

A revision is a durable, identified, validated commit with actor/time/message/provenance.

A publication correction is an auditable event linked to published evidence.

Undo state is not serialized as portable history. Reverting a durable revision creates a new revision rather than deleting history.

7. Application Core

The application layer owns user-facing use cases independently of React:

ContextRepresentative use cases
Documentscreate, open, validate, save, Save As, close, recover, import study
Editingadd/move/delete study, volume, section, block; semantic edits
Historycheckpoint, commit revision, revert, integrity verify
Importprobe, import, inspect diagnostics/fidelity, commit draft
Exportselect renderer, construct context, render, validate, deliver
Publishingresolve profile, reproducible build, sign/hash, submit
Reviewcreate anonymous projection, workspace, form/attachment, recommendation, writeback
Referenceslookup, import, synchronize providers, reconcile
Identitylink verified account evidence to scholarly agents
Integrationauthorize scoped execution, minimize payload, execute, audit, apply suggestion

A lightweight command/query facade is sufficient. A large CQRS framework is not required.

Commands carry expected revision/preconditions where concurrency matters and return structured diagnostics. Domain events can drive checkpoint scheduling, UI projections, and outbox work without making UI state authoritative.

8. State ownership

Zustand remains useful for view and session projections but should cease to be the universal application/domain service.

StateAuthorityExamples
portable manuscriptdocument/application aggregatestructure, metadata, scholarly objects
editor runtimeeditor sessionselection, mounted editors, local undo
UI stateZustandpanel visibility, active tab, zoom
account/sessionauth session serviceactor and role projection, not raw secret
persistence sessionDocumentSessionlocation, dirty state, last saved digest, recovery
cachecache servicesparsed documents, search index, thumbnails

The existing automatic checkpoint timer should be consolidated into one scheduler service rather than allowing component/action-level timer chains.

The legacy alpha workspace model should not be merged into 1.0 core without usage evidence. It should either be removed after verification or isolated as post-1.0 experimentation.

9. Persistence and authority

9.1 Authority matrix

DataAuthorityProjection/cache
portable manuscript current stateopen working OMI document and saved OMI artifactIndexedDB recovery, UI projection
revision historydocument-scoped RevisionRepositorymemory index/container optional entries
native working locationplatform-owned DocumentLocationsession metadata
container manifest/assetscontainer artifactextraction cache
server workflow manuscript snapshotexplicit server workflow snapshotclient session
account/authidentity databaseStudioPrincipal projection and client session
scholarly agent/contributionportable manuscriptverified account-agent evidence
institution/membership/adminidentity databaseauthorization claims
integration credentialsencrypted credential repositoryshort-lived token cache
review workflowStudio review DB or external PKP system according to originassignment-scoped workspace
OJS/OMP publication workflowOJS/OMPconnector receipt/status
publication profileversioned profile/build inputUI draft

A cloud provider is a byte store, not a manuscript semantic authority.

9.2 Persistence ports

The application layer should depend on ports such as:

  • ManuscriptRepository;
  • RevisionRepository;
  • AssetRepository;
  • RecoveryRepository;
  • DocumentLocation and platform file operations.

Save should be atomic where the platform permits it and should use digest/version preconditions to detect concurrent or external modification.

10. Import and export

10.1 Importer contract

All importers should expose common behaviour:

  • probe is side-effect free;
  • descriptors declare MIME types, extensions/signatures, random-access/streaming needs, platform requirements, limits, and output profile;
  • import returns a draft plus imported assets, diagnostics, fidelity report, and provenance;
  • imported content becomes current document state only after an explicit application-level commit.

10.2 Renderer/export contract

A renderer receives a versioned render request/context and returns:

  • byte artifacts;
  • diagnostics;
  • fidelity/loss report;
  • validation results;
  • render provenance.

The renderer does not open a save picker and does not directly call download APIs. Artifact delivery is a separate port implemented by browser download, native Save As, Android SAF, Apple Files, cloud stores, or connectors.

10.3 Diagnostics and fidelity

Diagnostics require stable codes, severity, phase, source object/location, recoverability, localized message key, and structured details.

Manuscript text and local paths are not logged by default.

Fidelity outcomes should at least distinguish preserved, normalized, approximated, externalized, dropped, and blocked.

10.4 1.0 format classification

Format1.0 architecture status
OMI JSON/containerstable contract after schema/container freeze and conformance
DOCX import/exportstrong stable candidate; requires fidelity contract
PDF importbest-effort with explicit loss report
HTML import/clipboardstabilizable sanitized subset
spreadsheet/table/image importstabilizable importers with asset limits
MusicXMLpreview-to-stable according to semantic fixture evidence
MIDIimplementation exists but routing defect must be fixed before support claim
RIS/BibTeX/CSL-JSONstabilizable reference interchange
JATS and semantic HTML exportstrongest stable export candidates
print PDFstable candidate with pinned renderer/font and visual regression evidence
interactive PDFseparate capability/profile
EPUB/LaTeXpreview until fidelity corpus is sufficient
IDML/XPress/MIF/Scribuspreview or deferred stable guarantee

Large-file interfaces should support streams or spooling where practical. Random-access requirements and limits must be declared. Long operations need cancellation, progress, resource budgets, and deterministic cleanup.

11. Publication architecture

flowchart LR
OMI["Validated committed OMI"] --> Context["Rendering context"]
Context --> Profile["Versioned profile + resources"]
Profile --> Renderer["Pinned renderer"]
Renderer --> Validator["Target validators"]
Validator --> Artifact["Artifact set"]
Artifact --> Evidence["Manifest, hash, signature"]

Only a validated committed revision may produce a release artifact. A working-state render must be explicitly a draft artifact.

Validation is required both before rendering and after artifact generation.

A rendering context contains immutable manuscript projection, locale, cross-reference map, bibliography view, asset resolver, font/resource manifest, and source revision digest. It must not expose raw editor-runtime state.

Publication profiles are versioned build inputs rather than implicit manuscript mutations. Renderer and validator versions, font/resource digests, source revision, artifact hashes, and target profile become reproducibility evidence.

12. Publishing System Connector API

OJS and OMP should implement a shared connector vocabulary rather than separate application semantics.

The common contract covers:

  • launch/handshake and signed context;
  • actor and capability/scopes;
  • submission/project identity;
  • metadata projection;
  • file list and content retrieval;
  • review assignment and projection;
  • writeback operations;
  • idempotency and receipts;
  • supported protocol/profile versions.

Journal and monograph differences remain profile-specific.

External writeback is distributed work. The Studio transaction commits local intent and a durable outbox record; external execution occurs with idempotency and produces a receipt/status. Retriable failure does not require pretending that two databases share one transaction.

13. Peer review

Peer review is a publishing-system-neutral application/domain context, not an OJS DTO model.

It owns concepts such as assignment, round, projection, workspace, attachment, form, recommendation, visibility, and writeback.

Double-anonymous handling is a server-side security boundary. The server constructs a projection from a committed source revision. The client never receives a complete manuscript and then hides identifying fields.

Anonymity review must cover:

  • contributor metadata;
  • filenames;
  • asset metadata and EXIF;
  • SVG/XML embedded metadata;
  • provenance and identifiers;
  • comments/track-change authorship where relevant;
  • cache keys, logs, and error messages.

Review IDs are assignment scoped where disclosure risk exists. Confidential integration access requires a server-issued grant bound to the assignment.

14. Identity architecture

Six concepts remain distinct:

  1. account;
  2. authentication/provider identity;
  3. scholarly agent;
  4. institution/membership;
  5. contribution;
  6. publication evidence.

The identity database is authoritative for account, authentication, institutional membership, and administration. The main database may maintain a StudioPrincipal projection required for workflow foreign keys.

The scholarly agent and contribution remain portable manuscript concepts. Matching an email address or typed ORCID must not automatically merge an account and scholarly agent. The link is explicit and evidence-bearing.

Cross-database coordination uses idempotent ensure/reconciliation or outbox behaviour rather than a fictional cross-database transaction.

Browser sessions may continue using secure HttpOnly/SameSite cookie patterns. Native bearer tokens move from localStorage to a SecureStorage platform adapter backed by OS credential facilities.

15. Integration architecture

Core integration vocabulary:

  • Connector — provider/protocol adapter;
  • Credential — secret, rotatable, account/install/provider-scoped data;
  • Capability — allowed operation such as reference.read or review.write;
  • ExecutionGrant — actor + connector + document/revision + purpose + data scope + capability + confidentiality + expiry/idempotency;
  • Execution — bounded provider call with limits, cancellation, and minimized payload;
  • AuditEvent — actor, provider, scope, digests, outcome, and correlation data without manuscript content.

The policy is default deny. A connector receives the minimum data required for one purpose.

AI and translation output defaults to suggestion semantics. Applying a suggestion is an application command. Direct provider mutation is not required as a stable 1.0 capability.

Zotero/Mendeley operate on reference scopes; ORCID provides identity evidence; storage providers operate on encrypted or controlled byte objects.

The current extension registry is not an arbitrary executable plugin sandbox. Stable 1.0 should support reviewed built-in connectors and explicitly defer a general third-party executable runtime.

16. Storage and cross-platform ports

DocumentLocation is an opaque platform handle, not a domain string path.

Adapters include:

  • browser file APIs/download fallback;
  • native filesystem with atomic replacement;
  • Android Storage Access Framework;
  • Apple Files/security-scoped URLs/bookmarks;
  • synchronized local folders;
  • remote object stores such as WebDAV/Nextcloud, Dropbox, OneDrive/SharePoint, Google Drive;
  • OMI container repository.

After download, content always passes through the same schema/container validation path. Cloud storage never edits manuscript semantics. Conflicts use provider version/ETag preconditions instead of last-write-wins.

Common platform ports cover open/save, secure storage, auth handoff, updater/distribution, font discovery, share/open-with, and notifications.

The existing Tauri allowlist, updater, Android installation work, and delivery code form useful adapter implementations. Module-global current native paths should move to session-owned DocumentLocation.

17. Backend/API 1.0

The stable first-party transport begins at additive /api/v1/....

Migration:

  1. define shared Zod/OpenAPI request/response schemas and an error envelope;
  2. point /api/v1 and legacy facades at the same application handlers;
  3. mark legacy routes with deprecation policy/telemetry;
  4. migrate clients;
  5. remove legacy routes only under the published compatibility policy.

The PKP signed integration protocol may retain installed route shapes where necessary, but payload protocol/profile version is explicit.

The server request flow is:

HTTP route
-> transport validation
-> authentication
-> authorization policy
-> application use case / transaction
-> repository and connector ports
-> response mapping and audit

Route handlers do not perform direct Prisma business mutations.

Create/submit/upload operations use idempotency keys. Updates use optimistic versions/preconditions.

Standard transport errors include validation, unauthenticated, forbidden, conflict, rate-limited, external-unavailable, and integrity-failed classes.

Secrets use versioned envelope encryption and external key authority. Refresh-token rotation/revocation and provider scopes are explicit. Audit events are append-only and content-free.

Application shutdown closes both Prisma clients and long-running workers/render processes deterministically.

18. Security trust boundaries

flowchart TB
Untrusted["Untrusted: JSON, ZIP, DOCX, XML, HTML, assets"] --> Parse["Quota + safe parsers"]
Parse --> Validated["Validated OMI domain"]
Validated --> Sensitive["Review / identity / credentials"]
Validated --> Build["Render sandbox + validators"]
Sensitive --> External["Scoped connectors"]
Build --> Artifact["Hashed and signed artifacts"]
Boundary1.0 control
OMI JSONquota/depth protection, version gate, schema + invariants, quarantine
OMI containerkeep existing traversal/size/integrity controls; add fuzz and semantic validation
Office/XML/HTMLshared safe ZIP/XML policy, no XXE, no unintended remote fetch, path/relationship limits
binary assetsmagic/MIME decode, checksum, decompression limits, SVG sanitation, metadata policy
JATS/XMLexact schema/profile pinning, safe parser corpus/fuzz
HTML artifactsforbid active script/form/event-handler/remote-content behaviour according to profile
OAuth/OIDCPKCE/state/nonce, exact redirects, short state TTL, token redaction/rotation
connector endpointssigned scoped grants, replay protection, redirect-aware SSRF control, timeout/idempotency
review dataserver projection, assignment-scoped identifiers, leak tests
AI/translationminimized payload, purpose/retention policy, confidential grant
plugins/extensionsno stable arbitrary-code claim; reviewed allowlist until sandbox exists
publication artifactsexact-byte hashes, provenance, validation before transfer, key-rotation evidence
logs/CIsynthetic/public fixtures, redaction, no manuscript content/path leakage

19. Test architecture and release gates

19.1 Test layers

The 1.0 test architecture includes:

  • domain unit/property tests;
  • OMI schema and conformance fixtures;
  • explicit stable-version migration fixtures;
  • importer/exporter golden fixtures;
  • OMI and editor semantic round trips;
  • application integration tests for save/recovery/concurrency/outbox;
  • server transport/authz/database tests;
  • connector contract tests shared by OJS/OMP;
  • Playwright and PKP integration E2E;
  • platform build/run/open/save/update smoke tests;
  • security SAST/dependency/SBOM/secret scan and hostile-input corpora;
  • accessibility automation plus keyboard/screen-reader smoke;
  • 10k/120k/500k-word performance and resource budgets;
  • crash/save corruption/recovery/outbox retry/update rollback tests.

19.2 Required release gates

  1. Format: frozen schema/container, checksum pin, shared conformance fixtures, future-version and extension tests.
  2. Data integrity: open/save/container/assets/history round trip plus atomic-save fault injection.
  3. Import: all stable importers with fidelity and hostile-input evidence.
  4. Publication: JATS schema/profile, HTML security/a11y, pinned PDF renderer/font and visual evidence, artifact manifest/hash/signature.
  5. Review: role/visibility transitions and anonymity leak corpus.
  6. Connector: common OJS/OMP contract, supported real-version E2E, replay/scope/retry/idempotency/writeback receipt.
  7. Identity/API: /api/v1 compatibility, database migrations, identity reconciliation, authn/authz, secure native token storage.
  8. Platform: stable platform install/open/edit/save/reopen/update.
  9. Security: SAST, dependencies, licenses/SBOM, secret scan, hostile parser corpus, privacy/log checks.
  10. Accessibility: critical journeys against WCAG 2.2 AA targets with manual smoke evidence.
  11. Performance: agreed budgets including a 500k-word synthetic document and bundle-size regression control.
  12. RC evidence: all required gates execute on the same exact RC commit without path filters and produce an evidence manifest.

20. Stable 1.0 contracts

The architecture freeze should cover:

  • the required portable OMI-SPEC-100 content grammar;
  • OMI-SPEC-320 envelope/schema/compatibility rules;
  • OMI-SPEC-330 manifest/path/checksum/security profile;
  • the portable OMI-SPEC-160 history boundary;
  • the required OMI-SPEC-150 agent/contribution subset;
  • diagnostics, fidelity, validation, and provenance contracts for import/render;
  • publication profile/build manifest/renderer descriptors;
  • the common Publishing System Connector schema;
  • review projection/visibility/writeback semantics;
  • public /api/v1 transport and error/idempotency policy;
  • platform and persistence ports visible to core/application layers.

The full aspirational OMI-SPEC-310 API, arbitrary executable plugin runtime, CRDT/branching history, and stable fidelity for every DTP target do not need to freeze for base 1.0.

Architecture freeze is complete when

  • every ADR is Accepted or explicitly Deferred;
  • schema/container/protocol candidates are available by immutable digest;
  • dependency-boundary checks are active;
  • new use cases access adapters only through stable ports;
  • compatibility and deprecation policies are documented;
  • every user-visible capability is classified stable, preview, or deferred;
  • no open P0 data-loss, anonymity, credential, or integrity blocker remains.

21. Documentation/implementation drift recorded by the audit

AreaDocumentation/specificationAudited implementationRequired convergence
OMI formatOMI-SPEC-320 0.2.0 schema/envelopeStudio 0.1 identifiers; empty 0.2 vendored schemareleased schema pin + codec + explicit pre-stable import/reject
containergovernance/status text partly behind realitysecure ZIP manifest/checksum/history/profile/output code existsderive normative profile and cross-repo fixtures
contentsemantic portable model intendedserialized Tiptap JSON/legacy text in block contentfreeze OMI content grammar + codec migration
identitydocumentation partially describes future stateidentity DB, OIDC/ORCID/admin operational; local password policy differsdocument actual authority and freeze hash/version policy
APIOMI-SPEC-310 is high-levelmany working but mixed unversioned routesadditive /api/v1, not mass rename
reviewstatus material trails implementationserver projection, visibility serializer, PKP writeback existderive review contract/tests and harden anonymity
release scopestable/preview direction existsworkflows partly path-filteredexact-RC aggregate evidence

22. Audited verification baseline

At the audit baseline:

  • Studio unit/pretest suite: 441/441 passed;
  • frontend lint and production build passed;
  • server Prisma generation, typecheck, and build passed;
  • publication release tests 16/16, direct submission 15/15, publication artifact 13/13;
  • local readiness 6/6;
  • OMI file-format fixtures 8/8 and OMI Docusaurus build passed;
  • general Studio CI, CodeQL, desktop/Tauri, Android, and promotion workflows were green on the audited commit;
  • OJS and OMP plugin CI were green on their audited commits.

Limitation: not every readiness/PKP/iOS workflow ran on the exact Studio commit because of path filters, and the OMI website build did not itself execute the file-format conformance suite. Those limitations are why exact-RC evidence is a target requirement rather than an already proven property.

23. Pinned sources

24. Summary

The target architecture places stable boundaries around a valuable working implementation.

The correct strategy is:

contract first → prove current behaviour → migrate consumers → remove obsolete paths last.

The architecture does not justify replacing Tiptap, revision semantics, the secure ZIP parser, publication build, cloud provider layer, Tauri shell, or PKP integrations. Deeper refactoring is justified only where current coupling creates concrete format, data-loss, security, portability, or release-evidence risk.