archdocs
A Claude Code plugin that writes the architecture documentation for the repository you run it
in. It combines several methods, each where it is strongest: arc42 pages
for introduction and goals, constraints, deployment and cross-cutting concepts;
C4 views for structure; MADR records for
decisions. The structure is described under Documentation layout.
Two agents, two terminal tabs. The orchestrator keeps the status of docs/ and, for the
next page, prints the command that starts the worker. You copy it into a new tab; the
worker interviews you, tracks where every fact came from, and writes its page. Then you return
to the orchestrator, which checks docs/ and moves on. Once the pages exist, a
build phase turns them into code: a planner with a proposing teammate, and
parallel coders in containers.
Requirements
In the repository you document, .claude/settings.json allow-lists the web tools so the worker
does not stall on prompts, and enables Agent Teams, which the planner uses to put its proposing
teammate in your terminal (experimental in Claude Code; a plugin cannot carry settings):
{
"env": { "CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS": "1" },
"teammateMode": "in-process",
"permissions": { "allow": ["WebSearch", "WebFetch"] }
}
Use it for one session
cd /path/to/your-repo
claude --plugin-dir /path/to/archdocs --agent archdocs:orchestrator
--plugin-dir reads this working tree as it is at session start; no install, nothing cached.
The command the orchestrator prints carries the same flag. The orchestrator's only tools are
Glob, Read and AskUserQuestion: it lists docs/, reads the containers page to find the
containers, and asks, but cannot write a file or run a command.
Install it
The repository is its own one-plugin marketplace. Nothing is published; a local path or a private
git URL is enough.
claude plugin marketplace add /path/to/archdocs # once per machine
cd /path/to/your-repo
claude # then, in the session:
/plugin install archdocs@archdocs-agents # project scope → .claude/settings.json
From then on, claude --agent archdocs:orchestrator in that repository. Installed plugins are
cached: after editing this repository run claude plugin update archdocs.
Working with the worker
The orchestrator prints a line like
cd '/path/to/your-repo' && claude --plugin-dir '/path/to/archdocs' --agent archdocs:worker 'constraints'
Copy it, open a new tab (⌘T), paste, Enter. The worker is an ordinary Claude session: answer
its questions there, approve its draft, and close it with /exit when it says
the page is written. Back in the orchestrator tab, type anything; it re-reads docs/ and offers
the next page. A worker can also be started by hand with any page slug: introduction-and-goals,
constraints, c4-context, c4-container, deployment-view, cross-cutting-concepts, or a
container document's slug and folder: components flow-runner, data-model knowledge-base, service secrets-vault.
Grill mode. With the page, the orchestrator asks Normal interview or Grill me. Grill me
appends grill to the slug ('constraints grill'): the worker then interviews in relentless
rounds of numbered questions, each with its recommended answer, until nothing is left assumed —
Matt Pocock's grilling skill (MIT), vendored in
skills/grilling/.
Documentation layout
Everything lands in docs/ of the repository you run it in:
docs/
├── introduction_and_goals.md arc42 §1 Introduction and Goals
├── constraints.md arc42 §2 Architecture Constraints
├── resources.md shared index of every linked source
├── open-questions.md shared list of open questions
├── tasks/ build plan: <area>/area.md, <area>/<epic>/epic.md, <area>/<epic>/NNN-<slug>.md
├── adrs/ architecture decision records (MADR), one file per decision
├── c4/
│ ├── context.md C4 level 1: system context
│ ├── container.md C4 level 2: containers
│ └── containers/
│ └── <folder>/ one folder per container
│ ├── components.md C4 level 3: components, for a container running own code
│ ├── data_model.md records, keys and access patterns, for a store
│ └── service.md holdings, settings, roles and limits, for a managed service
├── deployment_view.md arc42 §7 Deployment View
└── cross_cutting_concepts.md arc42 §8 Cross-cutting Concepts