| name | documentation-creation |
| description | Create comprehensive project documentation from scratch. Use when setting up INITIAL documentation for a new project or building a complete documentation suite. NOT for updating existing docs (use documentation-sync instead). Covers project analysis, documentation structure, templates, and verification. |
Documentation Creation Skill
Overview
This skill guides the creation of comprehensive project documentation from scratch by analyzing the project codebase and applying established VilnaCRM documentation patterns. It ensures documentation accurately reflects the actual project implementation.
Use this skill for: Initial documentation creation from scratch
Use documentation-sync for: Updating existing documentation when code changes
Context (Input)
- Need to create documentation for a project from scratch
- Want consistent style following VilnaCRM patterns
- Need to ensure documentation accuracy against actual codebase
- Project has no existing comprehensive documentation
Task (Function)
Create comprehensive, accurate project documentation by:
- Analyzing the project codebase thoroughly
- Creating documentation using established templates
- Verifying all references against actual codebase
- Ensuring consistent style and cross-linking
Success Criteria:
- All documentation files created with consistent structure
- All code references verified against actual project structure
- All directory paths and file mentions exist in codebase
- All links between documentation files work correctly
- Technology stack accurately reflected (no false claims)
Quick Start: Documentation Creation Workflow
Step 1: Analyze Project Structure
Before creating any documentation, thoroughly understand the project:
ls -la src/
cat composer.json | grep -A5 "require"
cat Dockerfile
cat docker-compose.yml
ls -la src/Core/ 2>/dev/null
ls -la src/User/ 2>/dev/null
ls -la src/Shared/ 2>/dev/null
ls -la src/Internal/ 2>/dev/null
find src -path "*/Entity/*.php"
find src -name "*Command.php" | head -20
find src -name "*Handler.php" | head -20
Key items to document:
Step 2: Create Technology Stack Summary
Document the verified technology stack:
grep -i "php:" Dockerfile
grep -i "symfony" composer.json
grep -i "mysql\|postgres\|mongo" docker-compose.yml
grep -E "^[a-zA-Z][a-zA-Z0-9_-]*:" Makefile | head -30
Create a technology summary table:
| Component | Technology | Version |
|---|
| Language | PHP | X.Y |
| Runtime | {Runtime} | - |
| Framework | Symfony | X.Y |
| Database | {Database} | X.Y |
| Web Server | {Server} | - |
Step 3: Create Documentation Files
Create each documentation file following this order:
- main.md - Project overview and design principles
- getting-started.md - Installation and quick start
- design-and-architecture.md - Architectural decisions and patterns
- developer-guide.md - Code structure and development workflow
- api-endpoints.md - REST and GraphQL API documentation
- testing.md - Testing strategy and commands
- glossary.md - Domain terminology and naming conventions
- user-guide.md - API usage examples
- advanced-configuration.md - Environment and configuration
- performance.md - Benchmarks and optimization
- security.md - Security measures and practices
- operational.md - Operational considerations
- onboarding.md - New contributor guide
- community-and-support.md - Support channels
- legal-and-licensing.md - License and dependencies
- release-notes.md - Release process
- versioning.md - Versioning policy
Add project-specific docs as needed (e.g., performance-frankenphp.md for FrankenPHP projects)
Step 4: Write Each Documentation File
For each documentation file:
-
Use the appropriate template from reference/doc-templates.md
-
Fill in project-specific content:
- Project name and description
- Entity names from codebase
- Bounded context names
- URLs and repository links
-
Verify all references:
- Directory paths exist
- Commands exist in Makefile
- Entity names match codebase
-
Add cross-links to related documentation
Step 5: Verify Accuracy
Run comprehensive verification using reference/verification-checklist.md:
-
Technology Stack Verification:
grep -i "php" Dockerfile
grep -i "symfony" composer.json
grep -i "mysql\|mongo\|postgres" docker-compose.yml
-
Directory Structure Verification:
for dir in $(ls src/); do
ls -la src/$dir/ 2>/dev/null || echo "Check: src/$dir"
done
-
Command Verification:
for cmd in "unit-tests" "integration-tests" "behat" "ci"; do
grep -q "^$cmd:" Makefile && echo "Found: $cmd" || echo "Missing: $cmd"
done
-
Link Verification:
- Check all internal markdown links resolve
- Verify external links are accurate
Documentation Templates
Overview Document (main.md)
# {Project Name}
Welcome to the **{Project Name}** documentation...
## Design Principles
{List project's core design principles}
## Technology Stack
| Component | Technology | Version |
| --------- | ---------- | ------- |
| Language | PHP | X.Y |
| Framework | Symfony | X.Y |
| Database | {Database} | X.Y |
Getting Started (getting-started.md)
# Getting Started
## Prerequisites
{List required software with versions}
## Installation
{Step-by-step installation commands}
## Verification
{Commands to verify installation}
See reference/doc-templates.md for complete templates.
Constraints
NEVER
- Include references to non-existent directories or files
- Claim features or technologies the project doesn't use
- Leave placeholder text unreplaced
- Skip verification step after creating documentation
- Document commands that don't exist in Makefile
ALWAYS
- Verify every directory path mentioned exists
- Confirm technology stack matches project reality
- Test command examples work in the project
- Update all cross-references to point to correct files
- Maintain consistent terminology throughout
- Add Table of Contents to longer documents (100+ lines)
Verification Checklist
After creating documentation:
Technology Accuracy
Structure Accuracy
Command Accuracy
Link Accuracy
Content Consistency
Common Pitfalls
Technology Mismatch
Problem: Documenting technologies the project doesn't use
Solution:
grep -i "fpm\|franken" Dockerfile
cat docker-compose.yml
Missing Directories
Problem: Documenting directories that don't exist in src/
Solution:
ls -la src/
Outdated Commands
Problem: Documenting non-existent make targets
Solution:
grep -E "^[a-zA-Z][a-zA-Z0-9_-]*:" Makefile
Missing Table of Contents
Problem: Long documents hard to navigate
Solution: Add TOC to documents over 100 lines:
## Table of Contents
- [Section 1](#section-1)
- [Section 2](#section-2)
- [Section 3](#section-3)
---
Format (Output)
Expected Documentation Structure
docs/
โโโ main.md # Project overview
โโโ getting-started.md # Installation guide
โโโ design-and-architecture.md # Architecture patterns
โโโ developer-guide.md # Development workflow
โโโ api-endpoints.md # REST/GraphQL docs
โโโ testing.md # Testing strategy
โโโ glossary.md # Domain terminology
โโโ user-guide.md # API usage examples
โโโ advanced-configuration.md # Environment config
โโโ performance.md # Benchmarks
โโโ security.md # Security measures
โโโ operational.md # Operations guide
โโโ onboarding.md # Contributor guide
โโโ community-and-support.md # Support channels
โโโ legal-and-licensing.md # License info
โโโ release-notes.md # Release process
โโโ versioning.md # Versioning policy
Expected Verification Result
All verification checks pass:
- Technology stack matches reality
- All directory paths exist
- All commands work
- All links resolve
Related Skills
Skill Relationship:
- documentation-creation (this skill): Create initial documentation from scratch
- documentation-sync: Keep existing documentation updated when code changes
Reference Documentation
Quick Commands
ls -laR src/ | head -50
find src -path "*/Entity/*.php"
find src -name "*Command.php"
grep -E "^[a-zA-Z][a-zA-Z0-9_-]*:" Makefile
grep -i "fpm\|franken" Dockerfile
grep -i "mysql\|mongo\|postgres" docker-compose.yml
grep -i "php:" Dockerfile
grep -i "symfony" composer.json