Skill: Documentation Sync
Match Case:
Mismatch Case:
- You MUST read the file
.github/agents/{required_agent}.agent.md.
- You MUST ADOPT the persona defined in that file for the duration of this skill.
- Proceed with the skill acting as the {required_agent}.
You are supporting the @Librarian. Your goal is to generate and maintain comprehensive project documentation that enables AI agents to efficiently understand the codebase.
📋 Task Initialization
IMMEDIATELY use the #todo tool to register the following tasks to track your progress:
- Context Analysis: Gather information from README, dependencies, and structure.
- Tech Stack Detection: Identify languages, frameworks, and tools.
- Documentation Generation: Generate/Update all 8 required documentation files.
- Quality Check: Verify accuracy, completeness, and formatting.
- Final Check: Review the "Final Check" section.
🎯 Objective
Analyze the current workspace and generate/update documentation files in the docs/ directory. This documentation serves as a "Knowledge Map" for other AI agents (@Architect, @Developer, @QualityGuard) to understand the project without reading every single file.
📁 Output Files
Generate the following 8 documentation files:
| File |
Purpose |
Key Sections |
architecture/overview.md |
System overview and design rationale |
Components, Diagrams, Design Decisions |
architecture/directory-structure.md |
File organization guide |
Tree structure, Responsibilities, Dependencies |
rules/coding-conventions.md |
Code style and standards |
Naming, Formatting, Patterns |
architecture/key-flows.md |
Main workflows and entry points |
User Journeys, Data Flow, API Endpoints |
architecture/tech-stack.md |
Technology choices and dependencies |
Languages, Frameworks, External Services |
rules/testing.md |
Test strategy and patterns |
Test Types, Coverage Goals, Running Tests |
architecture/constraints.md |
Known limitations and pitfalls |
Technical Debt, Platform Constraints, Common Issues |
glossary.md |
Ubiquitous Language & Definitions |
Key Terms, Domain Concepts, Acronyms |
🛠️ Generation Process
1. Context Analysis
Gather information from:
README.md - Project overview and quick start
package.json / pom.xml / requirements.txt - Dependencies
- Source file structure - Architecture patterns
- Existing documentation -
docs/, DEVELOPMENT_CONTEXT.md
- Configuration files - Build, lint, test configs
2. Tech Stack Detection
Identify the following for the Tech Stack:
- Language(s): TypeScript, Python, Java, Go, etc.
- Framework(s): React, Next.js, Django, Spring Boot, etc.
- Database(s): PostgreSQL, MongoDB, Redis, etc.
- Build Tools: npm, gradle, poetry, etc.
- Testing: Jest, pytest, JUnit, etc.
3. Documentation Generation
For each file, follow this structure:
<!-- This document is generated and updated by .github/prompts/doc-sync.prompt.md -->
# [Document Title]
## [Section 1]
[Content with specific details from the analyzed project]
## [Section 2]
[Include Mermaid diagrams where helpful]
...
📤 Output Format
Output each file with its path and full content:
File: docs/architecture/overview.md
<!-- This document is generated and updated by .github/prompts/doc-sync.prompt.md -->
# Architecture Overview
## System Overview
[Analyzed project description]
## Main Components
[Component breakdown with responsibilities]
## Architecture Diagrams
[Mermaid diagrams showing structure]
## Design Rationale
[Key design decisions and their reasoning]
📋 Quality Checklist
Before outputting, verify each document:
🔄 Update Mode
When updating existing documentation:
- Preserve Structure: Keep existing section organization
- Detect Changes: Compare with current codebase state
- Minimal Diff: Only update sections that need changes
⚠️ Important Notes
- Language: Output documentation in English (unless explicitly requested otherwise)
- Specificity: Use actual file paths, class names, and function names from the project
- Mermaid Syntax: Ensure all diagrams use valid Mermaid syntax
- DRY Principle: Adhere to the DRY (Don't Repeat Yourself) principle.
- Use Links: Use file links for code details and detailed descriptions where appropriate, instead of embedding full content.
✅ Final Check
Before finishing, confirm:
Converted and distributed by TomeVault — claim your Tome and manage your conversions.
1---2name: doc-sync-53description: Generate or update project documentation in docs/ directory. Use when this capability is needed.4---56# Skill: Documentation Sync78<role_gate>9<required_agent>Librarian</required_agent>10<instruction>11Before proceeding with any instructions, you MUST strictly check that your `ACTIVE_AGENT_ID` matches the `required_agent` above.1213Match Case:1415- Proceed normally.1617Mismatch Case:1819- You MUST read the file `.github/agents/{required_agent}.agent.md`.20- You MUST ADOPT the persona defined in that file for the duration of this skill.21- Proceed with the skill acting as the {required_agent}.2223</instruction>24</role_gate>2526You are supporting the **@Librarian**. Your goal is to generate and maintain comprehensive project documentation that enables AI agents to efficiently understand the codebase.2728## 📋 Task Initialization2930**IMMEDIATELY** use the `#todo` tool to register the following tasks to track your progress:31321. **Context Analysis**: Gather information from README, dependencies, and structure.332. **Tech Stack Detection**: Identify languages, frameworks, and tools.343. **Documentation Generation**: Generate/Update all 8 required documentation files.354. **Quality Check**: Verify accuracy, completeness, and formatting.365. **Final Check**: Review the "Final Check" section.3738## 🎯 Objective3940Analyze the current workspace and generate/update documentation files in the `docs/` directory. This documentation serves as a "Knowledge Map" for other AI agents (`@Architect`, `@Developer`, `@QualityGuard`) to understand the project without reading every single file.4142## 📁 Output Files4344Generate the following 8 documentation files:4546| File | Purpose | Key Sections |47| ------------------------------------- | ------------------------------------ | --------------------------------------------------- |48| `architecture/overview.md` | System overview and design rationale | Components, Diagrams, Design Decisions |49| `architecture/directory-structure.md` | File organization guide | Tree structure, Responsibilities, Dependencies |50| `rules/coding-conventions.md` | Code style and standards | Naming, Formatting, Patterns |51| `architecture/key-flows.md` | Main workflows and entry points | User Journeys, Data Flow, API Endpoints |52| `architecture/tech-stack.md` | Technology choices and dependencies | Languages, Frameworks, External Services |53| `rules/testing.md` | Test strategy and patterns | Test Types, Coverage Goals, Running Tests |54| `architecture/constraints.md` | Known limitations and pitfalls | Technical Debt, Platform Constraints, Common Issues |55| `glossary.md` | Ubiquitous Language & Definitions | Key Terms, Domain Concepts, Acronyms |5657## 🛠️ Generation Process5859### 1. Context Analysis6061Gather information from:6263- `README.md` - Project overview and quick start64- `package.json` / `pom.xml` / `requirements.txt` - Dependencies65- Source file structure - Architecture patterns66- Existing documentation - `docs/`, `DEVELOPMENT_CONTEXT.md`67- Configuration files - Build, lint, test configs6869### 2. Tech Stack Detection7071Identify the following for the [Tech Stack](../../docs/architecture/tech-stack.md):7273- **Language(s)**: TypeScript, Python, Java, Go, etc.74- **Framework(s)**: React, Next.js, Django, Spring Boot, etc.75- **Database(s)**: PostgreSQL, MongoDB, Redis, etc.76- **Build Tools**: npm, gradle, poetry, etc.77- **Testing**: Jest, pytest, JUnit, etc.7879### 3. Documentation Generation8081For each file, follow this structure:8283```markdown84<!-- This document is generated and updated by .github/prompts/doc-sync.prompt.md -->8586# [Document Title]8788## [Section 1]8990[Content with specific details from the analyzed project]9192## [Section 2]9394[Include Mermaid diagrams where helpful]9596...97```9899## 📤 Output Format100101Output each file with its path and full content:102103**File: `docs/architecture/overview.md`**104105```markdown106<!-- This document is generated and updated by .github/prompts/doc-sync.prompt.md -->107108# Architecture Overview109110## System Overview111112[Analyzed project description]113114## Main Components115116[Component breakdown with responsibilities]117118## Architecture Diagrams119120[Mermaid diagrams showing structure]121122## Design Rationale123124[Key design decisions and their reasoning]125```126127## 📋 Quality Checklist128129Before outputting, verify each document:130131- [ ] **Accuracy**: Information matches actual codebase132- [ ] **Completeness**: All key aspects covered133- [ ] **Clarity**: Understandable without deep context134- [ ] **Actionability**: Developers can use this to navigate code135- [ ] **Diagrams**: Mermaid diagrams for complex relationships136- [ ] **Examples**: Code snippets where helpful137138## 🔄 Update Mode139140When updating existing documentation:1411421. **Preserve Structure**: Keep existing section organization1432. **Detect Changes**: Compare with current codebase state1443. **Minimal Diff**: Only update sections that need changes145146## ⚠️ Important Notes147148- **Language**: Output documentation in **English** (unless explicitly requested otherwise)149- **Specificity**: Use actual file paths, class names, and function names from the project150- **Mermaid Syntax**: Ensure all diagrams use valid Mermaid syntax151- **DRY Principle**: Adhere to the DRY (Don't Repeat Yourself) principle.152- **Use Links**: Use file links for code details and detailed descriptions where appropriate, instead of embedding full content.153154## ✅ Final Check155156**Before finishing, confirm:**157158- [ ] All todo are marked as completed.159- [ ] All 8 documentation files are generated/updated.160- [ ] No placeholders remain (all replaced with actual tech stack info).161- [ ] All diagrams use valid Mermaid syntax.162163---164> Converted and distributed by [TomeVault](https://tomevault.io/claim/longbowxxx) — claim your Tome and manage your conversions.165<!-- tomevault:4.0:skill_md:2026-04-14 -->