Przejdź do głównej zawartości

Current → 1.0 Gap Analysis

Baseline: Studio eca2cf45762116e1c00a89b3397840ed89109511; OMI e2f421707f1154c0ed30cb7750e0689a837e9b0a; OJS plugin 6c0842fc1ce6c4a1ea75f7b27660af8011be303b; OMP plugin 4f7a2c0a2f29f68e3ad05ac73ca7652bc6410ac7
Date: 2026-09-19

This is an implementation gap analysis. KEEP/HARDEN/REFACTOR classifications describe the migration strategy for the audited codebase; they do not change the lifecycle or conformance status of an OMI specification.

1. Classification key

StatusMeaning
KEEPResponsibility and implementation are fundamentally correct; normal maintenance is sufficient.
HARDENGood 1.0 foundation, but conformance, error handling, security, performance, or fixture coverage must improve.
REFACTORBehaviour should remain, but module ownership or dependency direction must change.
SPLITOne current unit mixes multiple owners, lifecycles, or responsibilities.
MERGEOne concept/contract is implemented in unnecessarily parallel forms.
REPLACEA narrow implementation choice cannot become the 1.0 contract. This does not imply rewriting the whole subsystem.
REMOVEEmpty, unused, or misleading code has no 1.0 role.
DEFERCode may remain experimental/preview but is outside the base stable 1.0 guarantee.

2. Aggregate assessment

The estimate is based on files, call paths, tests, and contracts rather than a formal LOC measurement.

  • approximately 75–85% of working implementation and behaviour can remain;
  • approximately 45–55% is KEEP/HARDEN without major structural change;
  • approximately 25–35% remains after wrapping, relocation, or ownership separation;
  • genuine REPLACE/REMOVE work is approximately 5–10%.

Refactoring effort will be larger than the replacement percentage because many consumers currently know the serialized Tiptap content representation or mutate application state through the Zustand store.

3. OMI format and domain

Current componentStatusMain gap1.0 target
OMI omi-manuscript-0.2.schema.json and fixturesHARDENexecutable schema/fixtures exist but are not a mandatory website/release gateimmutable released schema with checksum and conformance CI
Studio vendored 0.2 schemaREPLACEaudited artifact is emptyexact released schema vendored from OMI and checksum-pinned
Studio OMI envelopeREFACTORcreates/exports 0.1 identifiers while OMI draft is 0.2.0generated wire codec with explicit envelope/version classification
src/types/omi.ts aggregateSPLITstructure, identity, notes, references, assets, history, and app concerns share one unitacyclic core/omi/* modules
empty domain placeholdersREMOVEfiles imply ownership without implementationreal canonical modules or no files
OmiBlock.content: stringREFACTORserialized Tiptap JSON/legacy text acts as portable domain dataversioned OMI content AST behind a Tiptap codec
inline semanticsHARDENgood semantics but partly tied to PM node/mark vocabularycore semantic vocabulary plus adapter mapping
section/study/front-matter helpersKEEPpure and testedmove only when useful, preserve behaviour
identity/contributor modelsHARDENscholarly semantics usable; account/evidence link not consistently explicitaccount-independent agent/contribution domain
metadata/localized text/keywordsKEEPpure domain logiccore metadata module
citations/clustersHARDENgood model, but content lookup depends on editor representationeditor-neutral references and anchors
CSL renderingREFACTORoutput policy mixed with citation domainrenderer/application service
notes/note citations/rich textHARDENinherits portable-content codec problemportable note content through common codec
named anchors/xrefsHARDENstable IDs exist; editor positions must not become authoritystable semantic targets and deletion/tombstone rules
assetsHARDEN/SPLITasset metadata can be domain data; byte/path/storage concerns appear in import codeasset identity/role/digest in core; byte store port
tombstonesKEEPsuitable deletion/history primitivehistory and anchor integrity
proofingREFACTORfull before/after strings and UTF-16 offsets are fragile under structural editssemantic operations plus stable anchors
publication correctionREFACTORimplicit across proofing/history/buildexplicit correction event linked to revision/artifact
unknown extensionsREPLACEno demonstrated lossless forward policynamespaced raw extension bag plus quarantine rules

Required migration pattern

The format/content migration must happen in this order:

  1. establish the codec and validation facade around current data;
  2. migrate readers/consumers behind the facade;
  3. add shadow validation and future-version classification;
  4. only then change the stable writer to the frozen OMI representation;
  5. preserve or explicitly report unknown/unsupported data.

4. Editor engine and application core

Current componentStatusMain gap1.0 target
BlockEditor.tsxSPLITeditor config, serialization, dispatch, and React UI are mixedTiptap session/codec plus thin React host
OMI Tiptap extensionsHARDENrich semantic implementation; mapping is not a frozen contractadapter extensions with documented mapping fixtures
continuous manuscript projectionHARDENgood study projection but knows current content encodingcodec-injected OMI↔PM projection
progressive study mountingKEEPcorrect large-document direction with testsruntime service with performance budget
focus registryKEEPclear runtime ownershipeditor-session service
selection helpersHARDENuseful cross-section behaviour; sensitive to remount/browser/IMEruntime selection with stable OMI projection
clipboard/pasteHARDENsanitizer/structured copy useful; content contract coupledimporter-like adapter with diagnostics
useStudioStore.tsSPLITportable domain, revision, selection, UI, timers, persistence, and use cases coexistUI/session projection only
app action modulesREFACTORdirect Zustand state mutations and type escapesplatform-independent command handlers
multiple checkpoint timersMERGEpossible parallel scheduling/lifecycle racesone CheckpointScheduler per document session
alpha workspace stateREMOVE/DEFERactive production use not demonstratedisolate post-1.0 experiment or remove after usage proof

Create/open/save should migrate first because they define the format and persistence safety boundary.

5. History and persistence

Current componentStatusMain gap1.0 target
versioning modelHARDENstrong immutable linear revision semantics; storage assumptions leak incore history semantics behind repository port
working stateKEEPuseful distinction from durable revisionapplication history session
revision integrity/digestHARDENneeds canonical serialization and algorithm/version metadatacross-runtime reproducible digests
full snapshot per revisionREFACTORO(revisions × document size), duplicated history storesRevisionRepository, with future content-addressed/delta optimization
last-session IndexedDB persistenceREFACTORmanuscript/history/UI/session authority mixedversioned recovery cache validated by canonical gate
native manuscript file serviceREPLACEmodule-global path and parse/cast without schema/version gatesession-owned opaque location, validated open, atomic save
OMI export serializerREFACTORspread/stringify without canonical validation; localStorage signature injectioncanonical serializer and separate evidence bundle
asset repositoryHARDENuseful IndexedDB/memory seedquota/integrity-aware byte-store port
secure OMI container readerKEEPstrong ZIP size/path/CRC/SHA/symlink/encryption/ambiguity controlspreserve parser; separate semantic decoding and add fuzz
container writerREFACTORuseful package exists but contract is pre-stable and mixes concernsOMI-SPEC-330 versioned writer
publication signature in localStorageREPLACEnot a safe evidence authoritysecure evidence repository bound to manifest/artifact digests

6. Import, export, and publication

AreaStatusDirection
importer actions overallMERGEcommon Importer registry, diagnostics, fidelity, provenance
DOCX importHARDENwrap the existing substantial implementation; add synthetic corpus, cancellation, memory/loss fixtures
DOCX app actionsREFACTORimporter returns draft; application command commits it
PDF importHARDENkeep as explicit best-effort/loss-reporting importer
Office/HTML/table/image importHARDENretain parser/sanitizer; unify quotas, externalize assets, add hostile corpus
MusicXML/MIDIREFACTORfix outer routing defect for MIDI, then place both behind capability probe
RIS/BibTeX/CSL-JSONHARDENpreserve reference interchange, add conflict/encoding/provenance coverage
Zotero/MendeleyHARDENprovider clients become scoped ReferenceManagerConnector adapters
export services overallMERGEcommon renderer result; delivery separated
file deliveryKEEPbecomes ArtifactDeliveryPort
JATS renderer/validatorsHARDENstrong candidate; pin validator/profile receipts and canonical XML fixtures
HTML rendererHARDENexplicit active-content/remote-resource policy, CSP/a11y, deterministic package
DOCX rendererHARDENwrap existing logic and test structural XML
print PDF/VivliostyleHARDENpin renderer/font/resource environment; visual regression and timeout/sandbox
EPUB/LaTeXDEFERpreview until fidelity evidence is sufficient
IDML/XPress/MIF/ScribusDEFERpreview; do not block base 1.0
publication profile module augmentationREFACTORmove presentation policy out of manuscript domain
paragraph/publisher stylesHARDENpreserve rich system behind renderer-neutral intent/mapping
publication build/manifests/hashesKEEPstrong 1.0 evidence pipeline seed
signature verificationHARDENclarify evidence placement, key versioning/rotation, cross-runtime fixtures

The key principle is wrap, do not rewrite. Stable support is earned by fixture, fidelity, security, and acceptance evidence.

7. OJS, OMP, and peer review

Current componentStatusDirection
parallel OJS/OMP clients/routesMERGEone Publishing System Connector contract plus profiles
Studio OJS integrationHARDENpreserve signed launch/scope/review/writeback implementation
Studio OMP integrationHARDENpreserve chapter confinement/native context; map to common contract
OJS PKP pluginHARDENshared fixtures plus supported-version Docker E2E
OMP PKP pluginHARDENsame common contract plus monograph-specific extensions
direct submission/writebackREFACTORtransactional outbox, idempotency, durable receipts, explicit failure UI
peer-review serviceSPLITdomain transitions, persistence, projection/visibility separated
anonymous manuscript projectionHARDENretain server allowlist; extend to asset metadata/SVG/provenance leak corpus
reviewer/author visibilityHARDENone common policy and negative-access matrix
review forms/attachments/recommendationsHARDENassignment-scoped identifiers and auditable transitions
PKP workflow authorityKEEPOJS/OMP remain authoritative for their own external workflow state

Anonymous/restricted views are server-generated projections. The client must never receive confidential data and then hide it.

8. Identity, backend, and API

Current componentStatusDirection
identity Prisma schemaHARDENformalize as account/auth/institution authority
duplicate main-DB user/session/identity conceptsSPLITreduce to StudioPrincipal projection/workflow references
principal bridgeHARDENadd idempotent reconcile/outbox/repair evidence
local password authHARDENversioned password-hash policy and rehash-on-login; document actual implementation
ORCID/Google/Microsoft/OIDCHARDENcommon provider state/nonce/PKCE/redirect/linking policy
institution/adminHARDENpolicy service backed by identity authority and versioned API
author/publication signatureREFACTORseparate evidence from portable manuscript/account state
duplicated provider credential locationsMERGEone encrypted CredentialRepository with provider metadata
native bearer token in localStorageREPLACEOS-backed SecureStorage; browser uses HttpOnly session
mixed /api and /integrations routesREFACTORadditive versioned /api/v1, legacy facades during migration
direct route→Prisma business mutationsSPLITroute → auth/policy → application use case → repository
Zod request validationHARDENmake Zod/OpenAPI schemas one transport contract source
shutdown lifecycleHARDENclose both DB clients, workers, and renderers deterministically

9. Integrations, storage, and platforms

Current componentStatusDirection
client integration contracts/registryHARDENone shared capability schema; eliminate naming drift
server integration executionREFACTORserver-issued scoped ExecutionGrant, minimized payload
DeepL/AIHARDENexplicit purpose, retention, consent/audit; suggestion by default
arbitrary extension runtimeDEFERstable 1.0 supports reviewed built-in connectors, not a general executable sandbox
cloud-storage provider abstractionKEEPremote object-storage port
WebDAV/NextcloudHARDENredirect-aware SSRF, ETag conflict, recovery corpus
Google Drive/OneDrive/DropboxHARDENcommon receipts, scope inventory, refresh/revoke/retry
SharePoint-specific providerDEFERnot a base 1.0 blocker
synchronized local cloud folderKEEPSyncFolderAdapter with atomic/conflict semantics
device/platform detectionHARDENcapability-driven composition instead of scattered detection
Tauri capabilities/configKEEPdesktop adapter; add secure-storage/share/open-with ports
Android SAF/update/distributionHARDENpersisted URI permission, process death, save/reopen/update evidence
iOS/iPadOSDEFERshared core with Apple adapters; stable only after evidence
system font discoveryREFACTORplatform resolver produces versioned resource manifest for renderer

10. CI, testing, and documentation

Current evidenceStatus1.0 action
Studio unit/pretest suiteKEEPpreserve as fast characterization gate; add boundary tests
frontend lint/buildHARDENadd bundle/performance budget and real lazy loading
server typecheck/buildKEEPadd both-schema migration checks
publication release suitesKEEPmake exact tool/artifact versions part of evidence
Playwright E2EHARDENexpand runtime critical journeys, recovery, accessibility
PKP Docker workflowHARDENreusable exact OJS/OMP matrix; no RC path filtering
desktop/Android workflowsHARDENsigned artifact install/open/save/update smoke
iOS workflowDEFERpreview evidence; security/privacy/data-loss remain blocking defect classes
1.0 readiness workflowHARDENone exact-commit aggregate release-candidate workflow
OMI website CIREFACTORmake file-format conformance mandatory where schema/spec changes
parser security testsHARDENshared hostile-input corpus and fuzz budget
accessibilityREFACTORrelease-blocking critical WCAG 2.2 AA journeys
recoveryREFACTORkill-during-save, corrupt file, recovery, outbox retry, updater rollback
governance/status pagesHARDENevidence-linked status to prevent prose drifting behind implementation
private manuscript policyKEEPonly synthetic/public/test data in Git/CI; content-free logs

11. Important documented mismatches

  1. OMI-SPEC-320 0.2 vs Studio 0.1. The specification expresses the intended interoperable direction and Studio expresses current behaviour. Missing 0.2 integration is a blocker; neither side should be silently treated as already converged.
  2. Container status. Some governance/status prose trails the working Studio container implementation. Derive and test the stable contract from proven behaviour rather than inventing another container.
  3. Identity documentation. Some prose describes future or different identity/password assumptions while the audited code already has a two-database identity system. The actual authority and hash policy must be formalized.
  4. Review status. Server-side anonymous projection, visibility serialization, and PKP writeback are ahead of some status documents. The remaining gap is common contracts and adversarial/leak evidence, not a missing subsystem.
  5. Meaning of green CI. Normal green CI is useful health evidence but not full 1.0 release evidence because of path filters and incomplete conformance aggregation.

12. Explicit non-rewrite list

Do not rewrite:

  • Tiptap and the current semantic editor extensions;
  • linear immutable revision semantics;
  • the secure OMI container ZIP parser;
  • DOCX/JATS/HTML processors;
  • publication-build manifest/hash foundations;
  • cloud provider and SSRF helpers;
  • Tauri/Android shells and release workflows;
  • OJS/OMP authorization and object-scope controls.

Place these behind stable boundaries and strengthen their evidence.

13. P0/P1 gaps before architecture freeze

PriorityGapFreeze condition
P0empty Studio schema plus 0.1/0.2 mismatchcanonical schema pinned; open/save validation and quarantine operate
P0Tiptap JSON is the portable content contractOMI-SPEC-100 content grammar plus codec migration plan/fixtures accepted
P0container contract not aligned with OMI-SPEC-330manifest/path/security/version profile frozen
P0review/AI confidential scope partly client-controlledserver-issued grants plus leak/negative tests
P0native token in localStoragesecure-storage migration complete on stable native platforms
P1Zustand/application ownership mixedapplication facade and create/open/save use cases active
P1apparent dual identity authorityidentity DB authority plus StudioPrincipal projection/reconciliation established
P1parallel OJS/OMP contracts/writebackcommon connector DTO plus outbox/idempotency implemented
P1path-filtered release evidenceexact-RC aggregate workflow available

These gaps define the minimum architecture work that should precede a stable schema/API freeze.