ワンクリックで
update-docs
Generate and update architecture diagrams, living glossary, and system overview from existing project docs
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Generate and update architecture diagrams, living glossary, and system overview from existing project docs
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Step 2 — Architecture and domain design, one feature at a time
Step 1 — discover requirements through stakeholder interviews and write Gherkin acceptance criteria
Enforce code quality using ruff, pytest coverage, and static type checking
Create pull requests with conventional commits, proper formatting, and branch workflow
Flow protocol — design and operate state machine workflows with FLOW.md + WORK.md
Create releases with hybrid major.minor.calver versioning and optional custom release naming
| name | update-docs |
| description | Generate and update architecture diagrams, living glossary, and system overview from existing project docs |
| version | 3.0 |
| author | system-architect |
| audience | system-architect |
| workflow | feature-lifecycle |
This skill generates and updates living documents after a feature is accepted (Step 5) or on stakeholder request: the Context and Container sections of docs/system.md and the living glossary. Both are derived from existing project documentation — no new decisions are made.
The glossary is a secondary artifact derived from the code, the domain entities in system.md, and domain-expert conversations. The canonical sources are the completed feature files, the discovery synthesis, and the architectural decisions. The glossary is a human-readable projection of those sources — not an independent authority.
git-release skill calls this skill inline at step 5, before the version-bump commit. Do not commit separately; the release process stages all files together.| Document | Created/Updated by | Inputs read |
|---|---|---|
docs/system.md (Context + Container sections) | SA at Step 2; update-docs skill (SA) updates these sections post-acceptance | docs/discovery.md, docs/adr/ADR-*.md, docs/features/completed/ |
docs/glossary.md | PO only (Step 1, via define-scope skill) | — |
docs/discovery.md | PO only (Step 1) | — |
Never edit docs/adr/ADR-*.md or docs/discovery.md in this skill. Those files are owned by their respective agents. This skill reads them; it never writes to them.
Read in this order:
docs/discovery.md — project scope, feature list per sessiondocs/system.md — all sections: domain model entities, modules, configuration, existing Context and Container diagramsdocs/features/completed/ — all completed .feature files (full text: Rules, Examples, Constraints)docs/adr/ — all architectural decision files (containers, modules, protocols, external deps)docs/glossary.md — existing glossary if it exists (extend, never remove existing entries)docs/branding.md — if present, read Visual > Primary color and Accent color. Apply to Mermaid diagrams via %%{init: {'theme': 'base', 'themeVariables': {'primaryColor': '<primary-hex>', 'lineColor': '<accent-hex>'}}}%%. If absent or fields blank, use Mermaid defaults.Identify from the read phase:
As a <role> clauses and discovery Scope sectionsystem.md, plus any terms defined in ADR decisionsSection: ## Context in docs/system.md
The Context diagram answers: who uses the system and what external systems does it interact with?
Use Mermaid C4Context syntax. Use the template in context.md.template in this skill's directory for the diagram body.
Rules:
Person(...) per distinct actor found in completed feature filesSystem_Ext(...) per external dependency identified in ADR filesRel) use verb phrases from feature When clauses or architecture decision labelsSystem_Ext entriesSection: ## Container in docs/system.md
The Container diagram answers: what are the major runnable/deployable units and how do they communicate?
Only generate this diagram if docs/adr/ contains at least one decision identifying a distinct container boundary (e.g., a CLI entry point separate from a library, a web server, a background worker, an external service adapter). If the project is a single-container system, note this in the section and skip the diagram body.
Use Mermaid C4Container syntax. Use the template in container.md.template in this skill's directory for the diagram body.
Rules:
pyproject.toml dependencies when identifiable (e.g., "Python / fire CLI", "Python / FastAPI")File: docs/glossary.md — read-only in this skill
The glossary is owned by the PO (via define-scope skill). This skill reads it to verify that diagram labels and entity names in the Context and Container sections match the canonical domain terms.
docs/glossary.md if it existssystem.mddocs/glossary.md in this skill — if you identify a missing or incorrect glossary term, note it in the commit message or in a comment to the stakeholder and stopWhen called from the release process: skip this step — the git-release skill stages and commits all files together.
When run standalone (stakeholder on demand): commit after all sections and glossary are updated:
docs(update-docs): update context, container, and glossary after <feature-stem>
If triggered without a specific feature (general refresh):
docs(update-docs): refresh context, container, and glossary
docs/branding.md if present)system.md reflects all actors from completed feature filessystem.md reflects all external systems from ADR filessystem.md present only if multi-container architecture confirmed in ADR filessystem.mddocs/discovery.mddocs(update-docs): ... messageAll templates for diagrams written by this skill live in this skill's directory:
context.md.template — Context diagram body (inserted into ## Context section of system.md)container.md.template — Container diagram body (inserted into ## Container section of system.md)Base directory for this skill: .opencode/skills/update-docs/
Relative paths in this skill (e.g., scripts/, reference/) are relative to this base directory.
Note: file list is sampled.
<skill_files> .opencode/skills/update-docs/container.md.template .opencode/skills/update-docs/context.md.template </skill_files>