00001 — Workspace Topology
This is the architecture chosen in ADR-AI-001 to ADR-AI-004. Requirement IDs refer to SR-AI-001. This page is the map. Two flows have their own pages:
- 00002 — Tool Call Flow: every check a prompt and a tool call pass through, in order.
- 00003 — Container Build: how a dev container is built and locked.
The dev container’s two users and secret release on the host are described in full in Architecture — Secure Infrastructure Workspace, and only summarised here.

1. Three zones
| Zone | Holds | Trust |
|---|---|---|
| Host machine | The developer’s editor, the password manager, and the host script that starts infrastructure runs | Holds every secret. No assistant runs here |
| Dev container | Claude Code and its tools, running as vscode with no sudo. The root-owned managed policy. The workspace and project repositories |
No secret in the shell. The assistant cannot change anything root installed (SR-F-10) |
| External services | The Claude model API, GitHub, and the cloud provider the infrastructure targets | Reached over HTTPS. A push to GitHub asks the person first |
2. Components
| Component | Where it lives | Responsibility |
|---|---|---|
| Developer [VS Code] | Host | Opens the container and types claude or uses the extension |
claude shell function |
Container, /etc/claude-code/claude-root.sh |
Starts Claude Code at the workspace root from any folder (SR-F-02) |
| Claude Code | Container, as vscode |
The assistant. Sends prompts to the model, proposes tool calls |
| CLAUDE.md, rules, skills | Workspace repository | Instruction layers, loaded when a session starts at the root (SR-F-03 to SR-F-05) |
| Managed policy | Container, /etc/claude-code/, root-owned |
The full copy of .claude/settings.json: start-guard, deny list, env-guard, scope-guard and graphify hook-guard, plus locks that ignore every other source of hooks and rules (SR-F-02, SR-F-06 to SR-F-09) |
| Workspace repository | Container | The reviewed source of the policy, rules and skills. Copied into the managed policy only when the container is built |
| Project repositories | Container, gitignored subfolders of the workspace | Each project’s own code, history and deployment (SR-F-01) |
graphify CLI and graphify-out |
Container, /usr/local/bin/graphify, gitignored graph |
The knowledge graph the assistant queries before broad reads (SR-F-12) |
| pre-commit [gitleaks] | Container, /usr/local/share/git-hooks/ |
Scans every commit in every repository for secrets (SR-F-16) |
| 1Password | Host | Holds every secret. Releases values for one command after Touch ID (SR-F-11) |
tofu-in-container.sh |
Host | Runs the infrastructure engine in the container, passing variable names only |
| tofu-guard [deployer user] | Container, root-owned | Checks the code, then runs the engine as a separate user the assistant cannot read |
| Claude model, GitHub, cloud provider | External | The model API, the code host with push protection, and the infrastructure target |
3. The four paths
Each colour in the diagram is one path. The legend names them.
Blue — prompts and tool calls
- The developer types
claude. The shell function starts Claude Code at the workspace root. - Each prompt goes to the start-guard first, which refuses it if the session was started anywhere else.
- Each tool call goes through the deny list, then env-guard, then scope-guard, then graphify hook-guard, all from the managed policy.
- The tool runs against the repositories, and the result returns to Claude Code.
Every step, refusal and question is in 00002 — Tool Call Flow.
Black — supporting connections
- Loaded at root:
CLAUDE.md, rules and skill descriptions load when the session starts at the root. Path-scoped rules and skill bodies join only when the work needs them (SR-F-04, SR-F-05). - HTTPS: Claude Code sends prompts to the Claude model and receives replies.
- query / update: Claude Code asks graphify before searching. graphify keeps
graphify-outcurrent from the code, with no API calls. - git commit / clean scan: every commit runs gitleaks first. Only a clean scan reaches the repository.
Red — a secret released for one command
- A person on the host runs
tofu-in-container.sh. 1Password releases the values after Touch ID (op run). - The script starts tofu-guard in the container as the
deployeruser, passing variable names only. - tofu-guard checks the code, then runs
planorapplyagainst the cloud provider.
The assistant never sees a value, and cannot read the deployer user’s processes. Details: ADR-INFRA-013.
Pink, dashed — asks the person first
When a command would reach outside the workspace, for example a push to GitHub, scope-guard returns “ask”. The command runs only if the person approves (SR-F-08).
Purple, dashed — installed at container build
The managed policy is copied from the workspace repository once, when the container is built, and is root-owned from then on. Editing the workspace’s settings in a running container changes nothing. How the build works: 00003 — Container Build.
4. From feature to documentation
- The feature is built in its project repository, guided by the instruction layers.
- The assistant reads the implemented code and writes, in order, the BRD, SR, ADR and architecture docs in
<site-repo>/src/content/appDocs/app-articles-<project>/, and records any gap in the project’s private register (SR-F-13). - Code and docs are committed in their own repositories, each scanned by gitleaks, and each pull request links to the other.
graphify update .refreshes the graph (SR-F-12).