ADR-AI-001 — One Shared Workspace Repository for Assistant Configuration
Status: Accepted Date: 2026-11-29 Authors: Engineering Team
Context
The workspace has several independent projects: an ecommerce microservice platform, this documentation site, and the Cloudflare account layers. Each is its own git repository with its own deployment. All of them are developed with Claude Code, and they share most of what the assistant must know: the secrets rules, the op:// reference pattern, the comment and over-engineering rules, the infrastructure naming and OpenTofu conventions, and the guard hooks.
Claude Code reads its project configuration (CLAUDE.md, .claude/settings.json, .claude/rules/, .claude/skills/, .claude/hooks/) from the folder it is started in. A decision was needed on where that shared configuration lives.
Decision Drivers (FRs & NFRs)
- BRD-AI-001 BR-1.1 — one shared approach, changed once.
- BR-1.4 — safeguards that are reviewed, not edited locally.
- SR-AI-001 SR-F-01, SR-F-02, SR-NF-05.
Decision — Where does the shared assistant configuration live?
Option 1 — Copy the configuration into each project repository
Pros:
- A session started inside any project gets the configuration.
- Each project can be cloned and used alone.
Cons:
- Every rule change has to be made in every repository, and the copies drift.
- A security fix to a hook has to be shipped several times. A repository that misses it stays exposed.
Option 2 — Keep it in each developer’s user settings (~/.claude/)
Pros:
- Nothing to commit. It applies to every folder on that machine.
Cons:
- Not reviewed and not versioned. Every developer and every dev container has a different copy.
- Cannot be installed as a locked managed policy from a reviewed source.
Option 3 — One workspace repository that holds only configuration, with projects cloned inside (CHOSEN)
Pros:
- One reviewed source for every rule, skill and hook. A change is made once.
- Projects keep their own history and deployment. The workspace
.gitignorelists them, so it never tracks their files. - The dev container clones the workspace, then the projects it needs, and installs the managed policy from the workspace’s reviewed
.claude/settings.json. - A cross-project concern, such as feature documentation in
<site-repo>, is reached from one session.
Cons:
- Claude Code reads its project configuration from the folder it starts in, so sessions have to run from the workspace root. The dev container enforces this: a
claudeshell function always starts at the root, and a locked start-guard hook refuses prompts in any session started elsewhere (SR-AI-001 SR-F-02). - Git commands need
git -C <project>, and code and docs for one feature land as separate commits in separate repositories.
Final Decision
The configuration lives in one workspace repository with no application code. Projects are cloned as gitignored subfolders. Copying it into each project was rejected because of drift. Per-user settings were rejected because they are not reviewed and cannot become a locked policy. The cost accepted is a start guard and wrapper to keep sessions at the root, and the two-repository commit for code and docs.