Layers

Status: draft

Proposals by Claude – not binding until Daniel approves them.

Core layers: cli and server on top, engine in the middle, adapters and store below, model at the bottom cliclick commands, --json server (0.2)deciwa serve, JSON API sphinx (0.3)tags rendered HTML engine resolve selectors · fingerprints · states · todo storefind .deciwa/, read, write adaptersmd · rst (+ Sphinx-Needs) · text → elements model – Annotation, Selector, Element, State (plain dataclasses, no I/O)
Arrows point to what a layer may use. Nothing points up.
Proposal: The core is split into layers with a strict dependency direction PROP_LAYERS
status: draft

Inside deciwa.core:

Module

Contains

May use

deciwa.core.model

annotations, ids, fingerprints, schema version

–

deciwa.core.adapters (0.1)

one module per format; text in, elements out

model

deciwa.core.store

finding .deciwa/, reading and writing annotation files, config

model

deciwa.core.engine

resolving selectors, states, review rules, todo lists, export/import

model, adapters, store

Every other package is a front end and uses only deciwa.core.Project (never the store or the files directly), so the hosted service can later replace store without changing them.

The packages themselves: Technical overview.