architecture-docs ยท diff
git:20260716.c3bf1e2 to git:20261001.f1e72be
21 added, 30 removed. Audit A to A.
---
name: architecture-docs
- description: Create and maintain concise project architecture and agent guidance docs and root README files based on real repository evidence.
- argument-hint: Project path, architecture-docs goal, or docs to sync.
+ description: Write or synchronize architecture and agent guidance using verified repository evidence. Use when the user asks to write, update, audit, or consolidate architecture docs, README.md, AGENTS.md, SKILL.md, or .agents guidance, or when an authorized change requires documentation updates. Documentation only; do not edit runtime code.
+ argument-hint: Documentation request, instruction-file revision, or accepted change with affected docs.
---
- Documentation-only: create or refresh `.agents/` guidance, architecture docs, and root `README.md`. Do not edit runtime code, tests, configs, Docker, or dependencies. Report code issues as follow-ups.
-
- ## Workflow
+ # Architecture docs
- 1. Read project instruction entrypoints and only the docs in scope.
- 2. Audit those docs for stale paths, symbols, env vars, commands, and contradictory claims.
- 3. Verify each claim against repo evidence using the shared tool rules in `~/.claude/skills/AGENTS.md`; run `--help` or tests when command behavior matters.
- 4. Update the smallest set of docs that restores consistency. Avoid copying the same fact into multiple files.
+ ## Outcome and boundary
- ## Default `.agents/` layout
+ Produce concise, consistent guidance that describes accepted decisions and verified reality.
- - `README.md` - index, read order, critical boundaries.
- - `PROJECT_CONTEXT.md` - runtime modes, architecture boundaries, key env vars.
- - `AGENT_RULES.md` - safety, workflow, style, verified gotchas.
- - `TESTING_GUIDE.md` - test layout, commands, service dependencies.
+ Edit only documents authorized by the request or directly affected by an authorized implementation. Shared agent rules and skill files are valid targets when explicitly requested. Do not edit runtime code, tests, configuration, dependencies, or unrelated documents to make the documentation true. Do not bootstrap a documentation tree merely because another skill is being used.
- Add subfolders only for a recurring need:
+ ## Ground and synchronize
- - `plans/` - implementation plans with lifecycle status.
- - `decisions/` - accepted architectural decisions.
- - `runbooks/` - repeated operational procedures.
+ - Read applicable instruction entrypoints, the current request, accepted decisions, and documents in scope. Verify paths, symbols, commands, and behavior against current repository evidence.
+ - Distinguish current implementation, approved but unimplemented design, and proposals. Label these states rather than merging them into a claim that a feature works.
+ - Choose the existing authoritative document or instruction file. Update the smallest set needed for consistency; link to a source of truth instead of duplicating it.
+ - For instruction suites, check the entry conditions, permissions, outputs, and handoffs together. A downstream skill must not grant itself authority denied by the common rules or the current request.
+ - Describe the outcome and constraints. Include exact procedures only where order matters for correctness, safety, or reproducibility; avoid prescribing tools and ceremony for ordinary work.
+ - Keep durable conventions and non-obvious constraints. Remove stale paths, conflicting rules, redundant generic advice, arbitrary size limits, unsupported claims, and speculative scaffolding. Preserve security and data-loss warnings in full.
+ - Match the language and structure requested for the artifact. Shared agent instructions and skills stay in English. Preserve exact identifiers and commands.
- Threshold: at least three files of the same shape, or a scheduled repeated operation. Never pre-create empty folders.
+ ## Structure and verification
- ## Content boundary
+ Use the repository's current layout. When a new document is authorized and no convention exists, select a minimal path for its actual purpose; do not generate README, context, rules, testing, plans, or runbooks as a mandatory bundle.
- Document exact commands and paths, ownership boundaries, security constraints, useful env vars, test guidance, and non-obvious decisions. Skip symbol inventories, exhaustive trees, call graphs, speculative architecture, marketing copy, TODO/TBD placeholders, and duplicated explanations.
+ A root README should contain only the supported material needed by its audience: purpose, prerequisites, usage, verification, and important boundaries. Use diagrams only when they clarify a verified architecture; do not fill a word quota.
- ## Root README
+ Before finishing, check referenced files, links, commands, terminology, version labels, and contradictions across the affected documents. Run safe checks when needed to substantiate behavior; do not claim a proposed flow was tested. For a shared instruction rewrite, check representative task scenarios for consistent permissions and handoffs, and obtain independent review when warranted.
- - Match the requested language; otherwise use the repo's dominant documentation language.
- - Preserve identifiers, commands, env vars, and paths exactly.
- - Target 500-700 words; hard max 1000 unless the user asks for more.
- - Include only sections supported by repo evidence: purpose, key features, architecture overview, prerequisites, quick start, configuration, development/testing, troubleshooting.
- - Use Mermaid only when the confirmed architecture is clearer with it.
- - Do not invent features, commands, or support promises.
+ ## Handoff and output
- ## Output
+ Report documents changed, decisive consistency checks, and unresolved questions. Send a discovered runtime defect to `debug-investigator`, an unresolved architectural decision to `implementation-planner`, or an authorized implementation correction to `thoughtful-coder`; do not perform those changes as part of documentation-only work.
- Report docs changed, decisive evidence, contradictions fixed, and remaining gaps.
+ A documentation request does not authorize changing plan approvals or implementation status. Update a plan only when the requested documentation scope includes it or when recording verified progress from the authorized implementation.