architecture-knowledge-base
Skill5 starsChanged 11 days agoMITView on GitHub
Creates source-backed architecture documentation shaped around the codebase and its readers. Use when asked to document a system, explain project architecture, map important flows, or turn an implementation into a navigable knowledge base.
In this repository23 other files it gives its agents.
- AGENTS.mdAGENTS.md
- audio-transcribeSkill
- better-uiSkill
- brainstormingSkill
- broSkill
- chatgpt-imagegenSkill
- coding-standardsSkill
- decision-roomSkill
- deslopifySkill
- domain-modelingSkill
- frontend-designSkill
- gemini-ttsSkill
- goalSkill
- readbackSkill
- rephraseSkill
- reply-broSkill
- setup-goalSkill
- skill-cleanerSkill
- strunk-writing-qualitySkill
- technical-writingSkill
- tech-specSkill
- tool-installSkill
- type-breakdownSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
19 rules. About 0 are common, 16 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈16
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 29
Read the repository instructions, existing docs, source, tests, configuration, and relevant history.
- Distinctive: line 31
Document the system as it exists.
- Distinctive: line 33
Ask the user only when a missing product or architecture decision would force speculation.
- Very specific: line 37
Read any existing ai-artifacts/CONTEXT.md or ai-artifacts/CONTEXT-MAP.md before naming concepts.
- Very specific: line 47
Keep agent-authored project knowledge under ai-artifacts/ unless the user or repository requires another location.
- Distinctive: line 74
Do not give every module equal coverage.
- Distinctive: line 80
Use explicit evidence labels when a document mixes different confidence levels:
- Distinctive: line 89
Do not force these markers into prose when the distinction is already clear.
- Distinctive: line 93
Add Mermaid or ASCII diagrams when a relationship, sequence, state model, boundary, or data flow is easier to understand visually.
- Distinctive: line 95
Keep each visual close to the prose it supports.
- Distinctive: line 99
Create an ADR when a decision is hard to reverse, surprising without context, and based on a real trade-off.
- Distinctive: line 101
If the repository proves what was implemented but not why it was chosen, document the implementation elsewhere or mark the rationale …
- Distinctive: line 105
When the work produces multiple documents, connect them with normal GitHub-compatible relative Markdown links.
- Very specific: line 107
Add concise YAML description frontmatter when the repository or knowledge-base convention uses it.
- Distinctive: line 109
Consider adding a short link from the main README.md when the new documentation is useful to the README's audience.
- Distinctive: line 113
Use plain, precise technical English.
- Distinctive: line 123
Do the glossary, architecture prose, and conceptual diagrams use the same resolved domain terms?
- Distinctive: line 125
Do links, paths, symbols, and diagrams work?
- Distinctive: line 129
Run the narrowest relevant formatting, documentation, lint, type, or test checks.
≈ “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
Architecture Knowledge Base
Build the documentation that best explains this codebase. Do not reproduce a standard architecture pack by default. Let the system's real boundaries, risks, and reader needs determine the result.
Use supporting skills as lenses
Load relevant skills when they are available. Useful options include:
domain-modelingto resolve domain terms and maintain the shared glossary as described belowtype-breakdownfor types, execution, effects, and errorsadrfor durable decisionstechnical-writingfor structure and plain languagemermaid-diagramsfor visual explanationscoding-standardsfor boundaries, dependencies, and failuresdeslopifyorunslopfor editing- a knowledge-base skill for navigation and progressive disclosure
These skills offer methods, not mandatory deliverables. Use only what helps. Do not install missing skills or block the work because one is unavailable.
Start with the codebase
Read the repository instructions, existing docs, source, tests, configuration, and relevant history. Find the questions a new maintainer would struggle to answer. Trace important behavior from real entry points to real effects.
Document the system as it exists. Use exact names from the repository. Distinguish confirmed behavior from inference, recommendation, and uncertainty whenever readers could confuse them.
Ask the user only when a missing product or architecture decision would force speculation. Answer repository questions by inspecting the repository.
Build shared domain language
Read any existing ai-artifacts/CONTEXT.md or ai-artifacts/CONTEXT-MAP.md before naming concepts. When terms are overloaded or distinctions matter to understanding the system, load domain-modeling if available and use it during the source trace, not only as a final writing check.
Test the terms against concrete edge cases. Can a candidate exist without a selection? Can a target lie outside the search root? Use scenarios from the codebase to distinguish concepts that sound interchangeable. Check the answers against source and tests. Surface contradictions with existing definitions; ask only when resolving them requires a product decision.
Record resolved terms as you go in the relevant context glossary. For a single context, create ai-artifacts/CONTEXT.md when the first useful distinction is resolved. Keep definitions short, choose canonical names, and identify misleading alternatives. Follow domain-modeling's CONTEXT-FORMAT.md when available. Keep runtime details in the architecture explanation, not the glossary.
Link the glossary from the architecture explanation and use its terms consistently in prose and conceptual diagrams. A small embedded domain diagram can clarify relationships without repeating the implementation flow. Create a context map only for genuinely separate contexts. Do not force a glossary, context map, or ADR when none adds useful knowledge.
Choose the right shape
Keep agent-authored project knowledge under ai-artifacts/ unless the user or repository requires another location.
Choose the smallest structure that explains the system well. A compact project may need one document. A larger system may benefit from separate domain context, architecture explanations, flow references, decision records, or an index. Create a navigation page only when there is enough material to navigate.
Possible artifacts include:
- a map of the system and its boundaries
- a glossary of terms that are easy to confuse
- an explanation of an important runtime flow
- a reference for types, states, effects, and failures
- a record of a durable architectural decision
- a guide that routes readers to existing documentation
This list is a menu, not a checklist. Combine, split, rename, or omit artifacts according to the codebase. Do not create empty sections, speculative prose, or documents whose only purpose is to satisfy a template.
Follow the important ideas
Spend detail where the system earns it. Look for:
- boundaries where data, control, trust, or ownership changes
- entry points and effects that define the product's behavior
- state transitions, concurrency, retries, cancellation, or recovery
- types and validation that protect important invariants
- failure paths that operators or callers need to understand
- dependencies that constrain future changes
- decisions whose rationale is not obvious from the code
Do not give every module equal coverage. Explain the architecture, not the directory tree.
Make evidence visible
Ground claims in source, tests, configuration, or repository history. Link to files or name symbols when that helps readers verify a statement.
Use explicit evidence labels when a document mixes different confidence levels:
[existing] Confirmed in the repository
[inferred] Implied by the implementation
[proposed] A recommendation, not current behavior
[?] UnresolvedDo not force these markers into prose when the distinction is already clear. Never invent rationale, alternatives, line numbers, or behavior.
Use visuals when they clarify
Add Mermaid or ASCII diagrams when a relationship, sequence, state model, boundary, or data flow is easier to understand visually. Choose the diagram from the explanation. Do not start with a required diagram inventory.
Keep each visual close to the prose it supports. Use domain language for conceptual views and implementation names for technical views. Prefer a small diagram that answers one question over a complete diagram nobody can read. Validate Mermaid that you add.
Record decisions only when the evidence supports them
Create an ADR when a decision is hard to reverse, surprising without context, and based on a real trade-off. Keep one decision per record and connect it to related documentation.
If the repository proves what was implemented but not why it was chosen, document the implementation elsewhere or mark the rationale unresolved. Do not manufacture alternatives to complete an ADR template.
Build useful navigation
When the work produces multiple documents, connect them with normal GitHub-compatible relative Markdown links. Put links in sentences that explain what the reader will find and why it matters. Use progressive disclosure so an entry page routes readers without repeating the detailed documents.
Add concise YAML description frontmatter when the repository or knowledge-base convention uses it. Keep terminology and claims consistent across the set.
Consider adding a short link from the main README.md when the new documentation is useful to the README's audience. Do not rewrite unrelated README content or expose secrets, credentials, private setup details, internal release procedures, or sensitive operations.
Write for maintainers
Use plain, precise technical English. Prefer real symbols and concrete behavior over generic architecture language. Use active voice, focused paragraphs, and headings that help readers answer questions. Explain important limitations and failures directly.
The documentation should help someone reason about a change. It should not merely prove that documentation exists.
Review the result
Review the work against its purpose rather than a fixed inventory:
- Does the structure fit this codebase and its likely readers?
- Are the important boundaries and flows easier to understand?
- Do the glossary, architecture prose, and conceptual diagrams use the same resolved domain terms?
- Can readers tell evidence from inference or advice?
- Do links, paths, symbols, and diagrams work?
- Does each artifact earn its place?
- Did the work preserve existing documentation and user changes?
Run the narrowest relevant formatting, documentation, lint, type, or test checks. Fix failures caused by the documentation change. Report unrelated or pre-existing failures without changing unrelated code.
Finish with a short account of what you created, what it helps readers understand, what you verified, and what remains uncertain. Do not commit or push unless the user explicitly asks.
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.

