# northland-studio/northland-pressroom architecture

> Architecture diagram of the GitHub repository northland-studio/northland-pressroom, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-06). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/northland-studio/northland-pressroom
- Repository: https://github.com/northland-studio/northland-pressroom

## Overview

Northland Pressroom is a human–AI collaborative publishing workbench: people can observe, pause, take over, and edit while an agent works on a structured publication project. The documented workflow is agent work on project content, with human intervention and review, followed by rendering or saving the editable .xpress project. This checkout contains the domain packages but not the documented desktop application, so its UI entry points and concrete runtime wiring are not shown; links based on README-described capabilities cite the README.

Main entry points: [`packages/publication-schema/src/project.ts`](https://github.com/northland-studio/northland-pressroom/blob/main/packages/publication-schema/src/project.ts) (Project lifecycle), [`packages/agent-core/src/state-machine.ts`](https://github.com/northland-studio/northland-pressroom/blob/main/packages/agent-core/src/state-machine.ts) (Agent state machine), [`packages/render-engine/src/types.ts`](https://github.com/northland-studio/northland-pressroom/blob/main/packages/render-engine/src/types.ts) (Page rendering), [`packages/model-provider/src/provider.ts`](https://github.com/northland-studio/northland-pressroom/blob/main/packages/model-provider/src/provider.ts) (Model provider)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_publication["Publication model"]
  node_project["Project lifecycle<br/>[project.ts]"]
  node_project_schema["Project schema<br/>[schema.ts]"]
  node_project_types["Publication model<br/>[types.ts]"]
  node_xpress[".xpress project"]
  node_shared["Shared utilities<br/>[index.ts]"]
end

subgraph group_agent["Agent workflow"]
  node_agent_state["Agent state machine<br/>[state-machine.ts]"]
  node_agent_run["Run records and budget<br/>[run.ts]"]
end

subgraph group_layout["Layout and render"]
  node_geometry["Layout geometry<br/>[geometry.ts]"]
  node_render["Page rendering<br/>[types.ts]"]
  node_output["PNG / PDF"]
end

subgraph group_integration["Model and tools"]
  node_agent_tools["Agent tool registry<br/>[registry.ts]"]
  node_provider["Model provider<br/>[provider.ts]"]
end

node_human(("Editor"))
node_model_service{{"Model service"}}

node_human -->|"observes / controls"| node_agent_state
node_human -->|"edits project"| node_project
node_agent_state -->|"works on"| node_project
node_agent_state -.->|"records runs"| node_agent_run
node_agent_tools -.->|"offers project tools"| node_project
node_project -->|"validates / parses"| node_project_schema
node_project -->|"uses utilities"| node_shared
node_project -->|"serializes / parses"| node_xpress
node_project -.->|"supports layout checks"| node_geometry
node_project -->|"renders pages"| node_render
node_render -->|"exports"| node_output
node_provider -.->|"requests generation"| node_model_service
node_agent_state -.->|"uses model"| node_provider

click node_project "https://github.com/northland-studio/northland-pressroom/blob/main/packages/publication-schema/src/project.ts"
click node_project_schema "https://github.com/northland-studio/northland-pressroom/blob/main/packages/publication-schema/src/schema.ts"
click node_project_types "https://github.com/northland-studio/northland-pressroom/blob/main/packages/publication-schema/src/types.ts"
click node_agent_state "https://github.com/northland-studio/northland-pressroom/blob/main/packages/agent-core/src/state-machine.ts"
click node_agent_run "https://github.com/northland-studio/northland-pressroom/blob/main/packages/agent-core/src/run.ts"
click node_agent_tools "https://github.com/northland-studio/northland-pressroom/blob/main/packages/agent-tools/src/registry.ts"
click node_geometry "https://github.com/northland-studio/northland-pressroom/blob/main/packages/layout-engine/src/geometry.ts"
click node_render "https://github.com/northland-studio/northland-pressroom/blob/main/packages/render-engine/src/types.ts"
click node_provider "https://github.com/northland-studio/northland-pressroom/blob/main/packages/model-provider/src/provider.ts"
click node_shared "https://github.com/northland-studio/northland-pressroom/blob/main/packages/shared/src/index.ts"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_project,node_project_schema,node_project_types,node_xpress,node_shared toneBlue
class node_agent_state,node_agent_run toneAmber
class node_geometry,node_render,node_output toneMint
class node_agent_tools,node_provider toneRose
class node_human,node_model_service toneIndigo
```

## Components

### Publication model

- [Project lifecycle](https://github.com/northland-studio/northland-pressroom/blob/main/packages/publication-schema/src/project.ts): `packages/publication-schema/src/project.ts`
- [Project schema](https://github.com/northland-studio/northland-pressroom/blob/main/packages/publication-schema/src/schema.ts): `packages/publication-schema/src/schema.ts`
- [Publication model](https://github.com/northland-studio/northland-pressroom/blob/main/packages/publication-schema/src/types.ts): `packages/publication-schema/src/types.ts`
- **.xpress project**
- [Shared utilities](https://github.com/northland-studio/northland-pressroom/blob/main/packages/shared/src/index.ts): `packages/shared/src/index.ts`

### Agent workflow

- [Agent state machine](https://github.com/northland-studio/northland-pressroom/blob/main/packages/agent-core/src/state-machine.ts): `packages/agent-core/src/state-machine.ts`
- [Run records and budget](https://github.com/northland-studio/northland-pressroom/blob/main/packages/agent-core/src/run.ts): `packages/agent-core/src/run.ts`

### Layout and render

- [Layout geometry](https://github.com/northland-studio/northland-pressroom/blob/main/packages/layout-engine/src/geometry.ts): `packages/layout-engine/src/geometry.ts`
- [Page rendering](https://github.com/northland-studio/northland-pressroom/blob/main/packages/render-engine/src/types.ts): `packages/render-engine/src/types.ts`
- **PNG / PDF**

### Model and tools

- [Agent tool registry](https://github.com/northland-studio/northland-pressroom/blob/main/packages/agent-tools/src/registry.ts): `packages/agent-tools/src/registry.ts`
- [Model provider](https://github.com/northland-studio/northland-pressroom/blob/main/packages/model-provider/src/provider.ts): `packages/model-provider/src/provider.ts`

### Other components

- **Editor**
- **Model service**

## Connections

- Editor → Agent state machine: observes / controls (evidence: `README.md`)
- Editor → Project lifecycle: edits project (evidence: `README.md`)
- Agent state machine → Project lifecycle: works on (evidence: `README.md`)
- Agent state machine → Run records and budget: records runs
- Agent tool registry → Project lifecycle: offers project tools
- Project lifecycle → Project schema: validates / parses (evidence: `packages/publication-schema/src/project.ts`)
- Project lifecycle → Shared utilities: uses utilities (evidence: `packages/publication-schema/src/project.ts`)
- Project lifecycle → .xpress project: serializes / parses (evidence: `packages/publication-schema/src/project.ts`)
- Project lifecycle → Layout geometry: supports layout checks
- Project lifecycle → Page rendering: renders pages (evidence: `README.md`)
- Page rendering → PNG / PDF: exports (evidence: `README.md`)
- Model provider → Model service: requests generation
- Agent state machine → Model provider: uses model
