The logical organization is Platform, Integrations, UI, Domain and Applications. The repository now
uses those five top-level folders; packages retain their public names. Separate repositories have not
been created. The main Next application is applications/main, not the orchestration root.
See the current status and handoff checklist for what is done, unfinished,
unverified and required before review or rollout.
Arrows show code dependency direction, not provider plugins loaded by the executor. Applications compile their library definitions into closed data before execution.
flowchart TD
subgraph A[Applications]
O[Operational application definitions + configuration]
S[Spell bespoke frontend]
R[Allocation Risk bespoke frontend]
H[Deployment host + operator console]
end
U[UI: configurable generic frontend]
P[Platform: SDK + executor, API, storage, headless clients]
I[Integrations: provider templates]
D[Domain: inspectable definitions]
O --> U
O --> I
O --> D
S --> P
R --> P
U --> P
H --> S
H --> R
H --> U
H --> P
I --> D
I --> P
D --> P
Platform has no dependency on the other four groups. Forms currently retains shared validation/value semantics plus some presentation helpers; a further UI split is deliberately deferred rather than creating a Platform-to-UI dependency now.
The following are internal build artifacts, not separate ownership concepts.
| Project | Responsibility |
|---|---|
@processos/contracts | Serializable definitions, public pure selectors, permissions/sharing helpers |
@processos/client | Framework/session-free HTTP client, injected transport and headers |
@processos/expressions | Closed generic compiler/interpreter and presentation scope; no native callback registry |
@processos/forms | Client-safe field/state/projection primitives |
@processos/generic-frontend | Complete configurable generic frontend; bounded skin data, whole-view exports |
@processos/applications | Headless application identity, closed skins and trusted address/mount resolution |
@processos/allocation-risk | Independent bespoke Risk frontend, workflow and app-owned renderer |
@processos/domain | Inspectable chain/payment/Prime definitions and generic structural field macros |
@processos/documents | Generic document rendering and trusted asset-loader registry |
@processos/spell-review | Spell definition, document, screens/projections, routes, session/sharing policy and frontend composition |
@processos/runtime | Execution, validation/authorization, scheduler and state/file/document ports |
@processos/integrations | Inspectable provider protocol definitions and config-only authoring shapes |
@processos/storage | Registry-free memory/filesystem/Mongo and document/file-byte factories |
@processos/browser-session | Platform-owned headless browser storage/header/identity hook; no visual controls or sharing grants |
@processos/backend | Injected HTTP/access/record/export services, Auth0 adapter and API-only executable backend |
@processos/app-authoring | Shared app graph/editor source model; never runtime execution syntax |
@processos/main | Cross-workflow operator console, source compiler and neutral deployment composition |
architecture.json is the enforced dependency graph. Each workspace has explicit
package exports, dependencies, build/typecheck/tests and inherited ownership instructions. Cross-project
source imports, private package paths, undeclared dependencies, reverse dependencies
and cycles are rejected. Consumers scan installed UI output for Tailwind, not sibling
source. Runtime object identity in the generic frontend is fixed per mount: explicitly
change the provider key to replace the environment and discard in-progress form state.
Spell and Allocation Risk own their renderers, visual session controls, complete screens and app policy. They do not depend on the generic frontend. Main's compatibility routes select whole frontends, not arbitrary page/component overrides disguised as skins. The old profile registry has been removed. Headless session/transport and field-value semantics remain shareable Platform APIs.
Each operational workflow has its own generic application identity, including newly published templates. Skins contain only palette, spacing, fixed layout and logo references. Applications are view identities, not new security tenants: existing permissions and process sharing remain authoritative. Addresses are deployment configuration, independent of frontend implementation. The operator console remains separate and legacy deep links still work. See frontend ownership.
npm run verify:spell builds spell-owned source outside this repository using packed
upstream artifacts, then runs it on its own origin against the separately running
backend and controlled worker. Upstream sources and workspace symlinks are absent.
Both this deployment and the main deployment run the same browser regression suite.
The app's API adapter accepts one configured HTTP(S) backend origin, streams request bodies, preserves authorization/status responses, does not follow upstream redirects, and maps backend-local redirects back into the frontend. It has a two-minute upstream deadline combined with request cancellation. This is a trusted deployment adapter, not an arbitrary URL proxy, authorization substitute or new security isolation boundary.
Preserve guarantees actually provided by the existing system. Previously unfulfilled claims remain explicit component roadmap work unless naturally solved by a boundary change. Do not infer immutable audit history, organization data isolation, historical reconstruction or verified retention from the passing regression suite.
Packed Platform consumers exercise validated programs, canonical aggregates, interactions, revisioned persistence and generic effects without installing Integrations, Domain or Applications. The SDK proof checks typed immutable composition and generic fields, not removed provider unions. Application registries compile libraries to data before the executor sees them.
No runtime handler registration restores the old extension mechanism. Operational grants bind immutable execution authority; presentation edits are versioned separately. The full independent application/browser lanes passed on the post-layout code; future changes must rerun them rather than inherit an older proof.
platform/backend builds without installing the spell application package. It has no shipped
workflow registry; trusted startup JSON supplies compiled registrations, capabilities and relative document
assets as data. Generic route/service factories receive explicit ports, while the main application
composition preserves its existing templates, assets and CORS default. The backend's default
CORS origin set is empty; configure it explicitly for direct cross-origin consumers.
The independent verification lane first confirms empty compiled startup, then provisions the existing definitions/assets and exercises compiled API checks plus a separately built spell frontend and controlled worker. Tests now include Edge preflight, invalid credentials, attachment-reference/access checks, audit-only exports and local OAuth error redirects. The loopback proxy mapping handles Next's localhost normalization only at the configured protocol/port. None of this verifies a real Auth0 exchange or changes deployed configuration.
Spell capability probes distinguish app-owned implementation work from generic API gaps and unresolved product policy. The independent lane now tests summary/metadata/graph authoring, Q/A, permitted cycle-date edits, denied manager-only edits and private app notes against public identity/process APIs. None enables unfinished UI.
Platform owns Contracts/SDK, Expressions, Runtime, Storage and generic client/form/document primitives; it cannot import Domain or Integrations. Integrations may compose public Domain protocol definitions, never app policy. UI owns the generic frontend product. Applications own bespoke rendering, editor metadata, graph source, concrete workflows, skin configuration and deployment bindings. Generic authoring fields remain Platform-owned; provider configuration and the app graph do not.
The generic/bespoke ownership split is now the implementation target. See deployment bindings for capability configuration rather than source ownership.