Create comprehensive project documentation from scratch. Use when setting up INITIAL documentation for a new project or building a complete documentation suite...
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
Create comprehensive, accurate project documentation by:
Success Criteria:
Before creating any documentation, thoroughly understand the project:
# Check project structure
ls -la src/
# Identify technology stack
cat composer.json | grep -A5 "require"
cat Dockerfile
cat docker-compose.yml
# Identify bounded contexts
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
# Check for entities
find src -path "*/Entity/*.php"
# Check for commands and handlers
find src -name "*Command.php" | head -20
find src -name "*Handler.php" | head -20
Key items to document:
Document the verified technology stack:
# PHP version
grep -i "php:" Dockerfile
# Framework
grep -i "symfony" composer.json
# Database
grep -i "mysql\|postgres\|mongo" docker-compose.yml
# Available make commands
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} | - |
Create each documentation file following this order:
Add project-specific docs as needed (e.g.,
performance-frankenphp.mdfor FrankenPHP projects)
For each documentation file:
Use the appropriate template from reference/doc-templates.md
Fill in project-specific content:
Verify all references:
Add cross-links to related documentation
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:
# Verify all mentioned src directories exist
for dir in $(ls src/); do
ls -la src/$dir/ 2>/dev/null || echo "Check: src/$dir"
done
Command Verification:
# Verify mentioned make commands exist
for cmd in "unit-tests" "integration-tests" "behat" "ci"; do
grep -q "^$cmd:" Makefile && echo "Found: $cmd" || echo "Missing: $cmd"
done
Link Verification:
# {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
## 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.
After creating documentation:
src/ directories existmake commands exist in MakefileProblem: Documenting technologies the project doesn't use
Solution:
# Verify before documenting
grep -i "fpm\|franken" Dockerfile
cat docker-compose.yml
# Only document what actually exists
Problem: Documenting directories that don't exist in src/
Solution:
# Verify before documenting
ls -la src/
# Update to match actual structure
Problem: Documenting non-existent make targets
Solution:
# Check actual Makefile
grep -E "^[a-zA-Z][a-zA-Z0-9_-]*:" Makefile
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)
---
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
All verification checks pass:
Skill Relationship:
# Check project structure
ls -laR src/ | head -50
# Find entities
find src -path "*/Entity/*.php"
# Find commands
find src -name "*Command.php"
# Check make commands
grep -E "^[a-zA-Z][a-zA-Z0-9_-]*:" Makefile
# Verify runtime
grep -i "fpm\|franken" Dockerfile
# Check database
grep -i "mysql\|mongo\|postgres" docker-compose.yml
# Verify technology stack
grep -i "php:" Dockerfile
grep -i "symfony" composer.json