Workspace
One inspectable directory separates authored packages, editable Markdown, and Host-owned runtime state.
The workspace is the unit a person, an AI, and Lamarck core can all inspect. Its paths are part of the extension contract.
Directory layout
workspace/
├── apps/
│ └── <app-id>/ # one App package; normally its own Git repo
│ ├── .git/
│ ├── manifest.json
│ ├── package.json
│ └── … application code
├── connectors/
│ └── <connector-id>/ # one Connector package
│ ├── connector.yaml
│ └── index.mjs
├── pages/
│ └── **/*.md # bidirectional D1 Markdown working tree
└── .lamarck/ # private Host-managed runtime state
├── data.db
├── system.db
├── settings.json
├── blobs/
└── archived-apps/
Package identity comes from its directory name. An App at apps/sleep-review/ must declare "id": "sleep-review"; the same rule applies to Connector package identity.
Who owns each path
| Path | Owner | Intended interaction |
|---|---|---|
apps/ | App authors | Edit, inspect, version, and restore ordinary source code. |
connectors/ | Connector authors | Install trusted protocol extensions; package hash is part of trust approval. |
pages/ | People, AI, Apps, and Lamarck | Edit Markdown in either direction through a normal filesystem. |
.lamarck/ | Lamarck Host | Back up as system state; do not treat files inside as extension APIs. |
The folder containing code is not the code's authority. An App manifest declares a permission ceiling, but the Host derives the active runtime identity and enforces every durable operation.
Markdown working tree
D1 Document IDs are extensionless, stable paths. Lamarck materializes the ID research/weekly-review as:
pages/research/weekly-review.md
Changes are bidirectional. A System API write updates the file; a file edit from Obsidian, VS Code, Git, or another editor is detected and written back to D1. Only .md is recognized in the current contract.
The Document prefix apps/sleep-review/ materializes under pages/apps/sleep-review/. It is not the App source directory at apps/sleep-review/.
Private runtime state
.lamarck/ is deliberately separated from authored packages and the editable Markdown interface.
| Entry | Contains |
|---|---|
data.db | Personal D0 Events, D1 Documents, and D2 Tables. Guard is the sole connection owner. |
system.db | Connector integrations, schedules, run history, trust approvals, and credential references. |
blobs/ | Content-addressed large payloads referenced by durable records. |
archived-apps/ | Retired App folders, including Git history, kept recoverable outside the active registry. |
Apps and Connectors never open these databases directly. See Database boundary for the split.