create-living-documentation
Skill4 starsChanged 3 months agoMITView on GitHub
WHEN/WHERE/WHO: [Scheduling: Use when: automating specifications, extracting domain glossaries, generating PlantUML/Graphviz architecture diagrams, or creating BDD reconciliation tests. Applies to: codebase architecture, glossary generators, API schemas, and build validation scripts in the workspace] HOW: [Structural: Helps with: establishing a single source of truth, avoiding documentation drift, extracting code metadata via AST/annotations, and validating documentation via unit tests] WHY: [Scheduling: Prevents documentation drift by validating specs, glossaries, and diagrams against code.]
In this repository61 other files it gives its agents.
- activate-personalSkill
- analyze-with-tactics-questionnairesSkill
- apply-agile-testing-quadrantsSkill
- apply-architectural-tacticsSkill
- apply-attribute-driven-designSkill
- apply-fundamentals-of-data-visualizationSkill
- apply-oopsi-modelSkill
- apply-screenplay-patternSkill
- apply-specification-by-exampleSkill
- blog-topic-discoverSkill
- build-agent-memory-systemsSkill
- build-business-objectives-modelSkill
- build-data-dictionarySkill
- build-feature-treeSkill
- comment-alive-test-driven-developmentSkill
- conduct-event-stormingSkill
- create-ecosystem-mapSkill
- create-skill-from-bookSkill
- CREATING-SKILL-TEMPLATESkill
- define-architectural-driversSkill
- define-bounded-contextsSkill
- define-ubiquitous-languageSkill
- design-agentic-screenplay-modelSkill
- design-agent-perception-layersSkill
- design-agent-planningSkill
- design-agent-reward-functionsSkill
- design-agents-using-patternsSkill
- design-architecture-viewpointsSkill
- design-autonomous-ai-interfacesSkill
- design-ddd-aggregatesSkill
- design-tool-use-sandboxingSkill
- document-architectural-decisionsSkill
- document-legacy-codebaseSkill
- doc-with-usage-exampleSkill
- draft-srs-documentSkill
- elicit-requirements-modelsSkill
- evolve-skill-with-wikiSkill
- extract-business-rulesSkill
- facilitate-example-mappingSkill
- facilitate-user-story-mappingSkill
- implement-agent-observabilitySkill
- implement-agent-reflectionSkill
- improve-existing-skillSkill
- improve-user-storySkill
- managing-ai-projectsSkill
- orchestrate-multi-agent-collaborationSkill
- prioritize-requirementsSkill
- review-c4-modelSkill
- review-data-engineeringSkill
- save-as-skillSkill
- scaffold-cmake-cxx-sanitize-gtest-envSkill
- skill-commonSkill
- task-commit-triggerSkill
- test-case-with-demoSkill
- test-case-with-readmeSkill
- test-driven-developmentSkill
- UnitTesting-convert2CaTDDSkill
- update-my-resumeSkill
- update-spec-contextSkill
- validate-requirements-criteriaSkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 13 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
When this skill is activated, first load skill-common and apply the shared conventions it defines: canonical section order, frontmatter …
- Distinctive: line 23
Do not use for writing manual documents, wikis, or PDFs, or documenting legacy systems in place without first checking the …
- Distinctive: line 51
Transfer Check: Verify the workflow still works for glossary generation, diagram generation, and contract checks across multiple languages …
- Distinctive: line 52
Stop Rule: If the scope, annotations, or output directories are ambiguous, stop and ask before wiring extraction scripts.
- Distinctive: line 55
Zero Manual Copy-Paste: Never manually transcribe business properties or structural rules from code to documentation files.
- Distinctive: line 56
No Silent Extraction Failures: If an AST parsing script or custom Doclet fails to parse a code file, it must abort the build or fail the …
- Distinctive: line 57
Always Test Consistency: Every living document must be backed by a reconciliation test or contract check that alerts developers of …
- Distinctive: line 60
If target annotations, package names, or document output directories are ambiguous or undefined, stop and ask the user to specify the exact …
- Distinctive: line 76
Implement Reconciliation Tests: Write unit tests that dynamically parse both the source code and the generated documentation files to …
- Distinctive: line 78
Establish Red Flags Checks: Verify that compilation or test runs fail if any part of the extracted specs deviates from the code.
- Very specific: line 99
Verify that the skill configuration matches the create-living-documentation folder name.
- Distinctive: line 100
Verify that all relative links to checklists and code examples are valid and clickable.
- Distinctive: line 101
Verify that the generated documentation features a clearly stated generation date or build timestamp, pointing to the source repository.
- Distinctive: line 102
Verify that the reconciliation test suite fails explicitly when a documented code element is modified or removed without updating the …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Create Living Documentation
Common Contract (Load First)
When this skill is activated, first load skill-common and apply the shared conventions it defines: canonical section order, frontmatter rules, anti-pattern guidance, and the Review In Mind loop in review-in-mind. This skill adds only domain-specific rules below.
Who
Architects, system developers, or coding agents who need to automate, extract, and verify architectural diagrams, domain glossaries, and system specifications from the live codebase to eliminate documentation drift.
What
Analyze source code annotations, package structures, and tests; configure single-source extraction scripts; generate dynamic markdown glossaries and PlantUML/Graphviz system diagrams; and implement automated reconciliation/consistency tests to verify documentation accuracy.
When
- Triggered by requests like: "create a living glossary from these packages...", "automate system diagrams using PlantUML from source...", "design a reconciliation test for this specification...", "extract living specifications from BDD feature files...", or "generate architecture codex from class annotations...".
- Do not use for writing manual documents, wikis, or PDFs, or documenting legacy systems in place without first checking the document-legacy-codebase skill.
Where
Applies to source code directories (Java, Python, C#, etc.), AST parsing scripts, build workflows, and test files in the workspace.
Why
- Traditional documentation is expensive to maintain, drifts instantly from the code, and loses its credibility.
- Code structures, types, and annotations are rich sources of design intent that the compiler and IDEs understand.
- Living documentation keeps specs, glossaries, and diagrams in lock-step with implementation by verifying them through standard test runners.
Inputs
- Codebase Source Path (required): The folder containing classes, types, and annotations to be documented.
- Extraction Target (required): The type of living document to create (e.g., glossary, system diagram, decision log, or contract specifications).
- Reconciliation Checklists Reference (required): Located at reconciliation-checklists.
- Code Examples Reference (required): Located at code-examples.
- Textbook PDF: Cyrille Martraire's Living Documentation book located at Living Documentation.
Output (Logical Evidence)
- Living Glossary/Specification: Dynamically generated Markdown files documenting system terms, roles, and rules.
- Living Diagram: Generated SVG/PNG/Text diagrams (PlantUML or Graphviz DOT) rendering class topologies or package relationships.
- Reconciliation Test Suite: Automated unit tests (e.g., Python
unittestor JUnit tests) that assert the consistency of source structures with generated documentation or metadata.
Optimization Readiness
- Failure Signals: Extraction becomes manual copy-paste, documentation drifts from code, reconciliation tests do not fail on mismatches, or the output omits a buildable source-of-truth pipeline.
- Evidence To Collect: Generated docs, extraction scripts, reconciliation tests, and examples where source changes did or did not trigger the expected verification failure.
- Safe Mutation Boundaries: Refine extraction conventions, diagram-generation guidance, validation scripting, and glossary formatting without changing the core live-extraction and consistency-check workflow.
- Acceptance Criteria: Accept revisions only if the generated docs are sourced programmatically, diagrams stay tied to code, and reconciliation tests fail on divergence instead of silently passing.
- Rejected Revision Handling: Record hand-transcribed summaries, missing-failure cases, and weak extraction boundaries so they are not repeated.
- Transfer Check: Verify the workflow still works for glossary generation, diagram generation, and contract checks across multiple languages or frameworks.
- Stop Rule: If the scope, annotations, or output directories are ambiguous, stop and ask before wiring extraction scripts.
Constraints (Logical Boundaries)
- Zero Manual Copy-Paste: Never manually transcribe business properties or structural rules from code to documentation files. All structured summaries must be extracted programmatically.
- No Silent Extraction Failures: If an AST parsing script or custom Doclet fails to parse a code file, it must abort the build or fail the test, rather than generating an empty or partial output.
- Always Test Consistency: Every living document must be backed by a reconciliation test or contract check that alerts developers of mismatches.
One More Thing
If target annotations, package names, or document output directories are ambiguous or undefined, stop and ask the user to specify the exact scope before running AST parsers or creating extraction scripts.
How (Structural Workflow)
Phase 1: Curation & Curation Scoping (Chapter 5)
- Identify the Core: Determine what parts of the system represent the core domain knowledge (e.g., domain models, business policies, external API contracts). Do not waste time extracting boilerplate (e.g., getters/setters, frameworks).
- Define Conventions and Annotations: Select or create clear annotations (e.g.,
@Concept,@DomainService, or specific Python decorators) to mark authoritative knowledge in source code. Refer to reconciliation-checklists for details. - Plan Guided Tours: Map out structural entry points (sightseeing maps) to guide new developers through the codebase.
Phase 2: Automation & Documentation Generation (Chapter 6)
- Build a Single-Source Publisher: Set up code extraction scripts using Python's
astmodule or Java's custom Doclet/annotation processors. - Generate Living Glossaries: Extract terms, descriptions, and types from docstrings and custom annotations. Format the output as a readable Markdown table or document.
- Generate Living Diagrams: Parse dependency paths, classes, and packages to output PlantUML (
.puml) or Graphviz (.dot) diagrams. Integrate these generations into the build or pre-commit workflow. Refer to templates in code-examples.
Phase 3: Reconciliation & Continuous Verification (Chapter 3)
- Implement Reconciliation Tests: Write unit tests that dynamically parse both the source code and the generated documentation files to assert that every marked entity is documented, and that no outdated entries exist.
- Write Published Contract Checks: For external APIs or database schemas, write verification tests comparing code-declared DTOs/models against the active specification schema. Refer to templates in code-examples.
- Establish Red Flags Checks: Verify that compilation or test runs fail if any part of the extracted specs deviates from the code.
Resources
- reconciliation-checklists - Checklists for glossaries, BDD specifications, and diagrams.
- code-examples - Parse code scripts, PlantUML templates, and reconciliation test samples.
- Living Documentation - Original textbook.
Review In Mind (ReviewInMindGenie)
Execute the common review loop in review-in-mind before delivering.
Review lens for this skill:
- Does each generated artifact trace to real source code or tests rather than assumptions?
- Are extraction scripts and reconciliation tests reproducible and committed with the docs?
- Would stale-documentation drift be detected by the automated checks?
Validation
- Verify that the skill configuration matches the
create-living-documentationfolder name. - Verify that all relative links to checklists and code examples are valid and clickable.
- Verify that the generated documentation features a clearly stated generation date or build timestamp, pointing to the source repository.
- Verify that the reconciliation test suite fails explicitly when a documented code element is modified or removed without updating the corresponding spec rules.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

