Skip to content

Workspace and Projects

A Workspace is the whole architecture landscape, kept in one git repository. Archidocs reads it from a folder in that repo, archidocs/ by default, which holds one workspace.yaml and a folder per Project.

archidocs/
├── workspace.yaml # Teams and Environments, for every Project
├── payments/
│ ├── project.yaml # id, name and owner Team
│ ├── model.yaml # Elements and Relationships
│ ├── deployments.yaml # Deployment Targets and Deployments
│ ├── views.yaml # Saved Views
│ └── adr/ # architecture decision records
└── core/
└── ...

workspace.yaml defines what every Project shares: the Teams that own things and the Environments that Services run in. Each is defined once, so prod means the same thing in every Project. This is Big Bank’s:

workspace.yaml
# Big Bank plc: a fictional bank, after the C4 model's internet banking example.
teams:
digital-banking:
name: Digital Banking
description: Web, mobile and the internet banking API.
core-banking:
name: Core Banking
description: The mainframe and the systems that sit on it.
platform:
name: Platform
description: Cloud platform, messaging and e-mail.
identity:
name: Identity
description: Customer sign-in and the user directory.
payments:
name: Payments
description: Payments, card network and fraud.
environments:
staging:
name: Staging
prod:
name: Production

Nothing else goes in it: Elements, Deployments and Views always belong to a Project. Every field is in the workspace.yaml reference.

A Project is one Team’s slice of the Workspace, kept in a folder of its own. A project.yaml marks the folder, gives the Project its id, and names the Team that owns what is declared in it:

payments/project.yaml
id: payments
name: Payments
owner: payments

Every other .yaml file in the folder is part of the Project’s Model, whatever its name. model.yaml, deployments.yaml and views.yaml are a convention: Big Bank’s Platform Project keeps its Services in services.yaml and its Deployment Targets in targets.yaml. Projects don’t nest, and a .yaml file outside any Project is an error (file-outside-project).

Because each Team edits only its own folder, a CODEOWNERS file can route every change to the Team that owns it.

Everything in a Project has an id: a lowercase slug such as payments-service, unique across the Project’s Elements and Deployment Targets. Inside its own Project an id is written bare. To name something in another Project, write its Qualified id, project:id. Here the Payments Service depends on the mainframe that the Core Banking Team declares in its core Project:

payments/model.yaml
payments-service:
name: Payments Service
description: Validates, posts and settles customer payments.
technology: Java, Spring Boot
relationships:
- to: payments-db
description: Stores payment state in
technology: JDBC
- to: core:mainframe
description: Posts payments to the ledger in
technology: XML/HTTPS
- to: card-gateway
description: Settles card payments through
technology: ISO 8583

payments-db and card-gateway are in the same Project, so they are bare. Writing a Project’s own prefix is an error, so that every id has one spelling:

shop/model.yaml · fails check: own-project-prefix
services:
web:
name: Web
relationships:
- to: shop:api
description: Places orders through
api:
name: API

archidocs check reports it as own-project-prefix: write to: api instead. Teams and Environments belong to the Workspace, so their ids are always bare.

archidocs check and every other command read all the Projects together as one Model, checking every reference across them. The viewer and the MCP server never see Projects as separate diagrams: they show and answer questions about the whole Workspace, with each Element marked with the Team that owns it.