Paths: File paths (shared/, references/, ../ln-*) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
Root Documentation Creator
L3 Worker that creates 4 root documentation files using templates and Context Store from coordinator.
Purpose & Scope
- Creates 4 root documentation files (entry points for AI agents)
- Receives Context Store from ln-110-project-docs-coordinator
- Replaces placeholders with project-specific data
- Self-validates structure and content (22 questions)
- Never gathers context itself; uses coordinator input
Invocation (who/when)
- ln-110-project-docs-coordinator: ALWAYS invoked as first worker
- Never called directly by users
Inputs
From coordinator:
contextStore: Key-value pairs with all placeholders
- PROJECT_NAME, PROJECT_DESCRIPTION
- TECH_STACK_SUMMARY
- DEV_COMMANDS (from package.json scripts)
- DATE (current date)
- LEGACY_CONTENT (optional, from ln-100 Phase 0 migration):
legacy_principles: { principles[], anti_patterns[], conventions[] }
targetDir: Project root directory
LEGACY_CONTENT is used as base content when creating principles.md. Priority: Legacy > Template defaults.
Documents Created (4)
| File |
Target Sections |
Questions |
| CLAUDE.md |
Critical Rules, Documentation Navigation, Development Commands, Maintenance |
Q1-Q6 |
| docs/README.md |
Overview, Standards, Writing Guidelines, Quick Navigation, Maintenance |
Q7-Q13 |
| docs/documentation_standards.md |
Quick Reference (60+ requirements), 12 main sections, Maintenance |
Q14-Q16 |
| docs/principles.md |
Core Principles (8), Decision Framework, Anti-Patterns, Verification, Maintenance |
Q17-Q22 |
Workflow
Phase 1: Receive Context
- Parse Context Store from coordinator
- Validate required keys present (PROJECT_NAME, PROJECT_DESCRIPTION)
- Set defaults for missing optional keys
Phase 2: Create Documents
For each document (CLAUDE.md, docs/README.md, documentation_standards.md, principles.md):
- Check if file exists (idempotent)
- If exists: skip with log
- If not exists:
- Copy template from
references/templates/
- Check LEGACY_CONTENT for this document type:
- For
principles.md: If LEGACY_CONTENT.legacy_principles exists:
- Use
legacy_principles.principles[] as base for "## Core Principles" section
- Use
legacy_principles.anti_patterns[] for "## Anti-Patterns" section
- Use
legacy_principles.conventions[] for code style rules
- Augment with template structure (add missing sections)
- Mark:
<!-- Migrated from legacy documentation --> at top of relevant sections
- For other documents: Use template as-is (no legacy content applicable)
- Replace
{{PLACEHOLDER}} with Context Store values
- Mark
[TBD: X] for missing data (never leave empty placeholders)
- Write file
Phase 3: Self-Validate
For each created document:
- Check SCOPE tag in first 10 lines
- Check required sections (from questions_root.md)
- Check Maintenance section (Update Triggers, Verification, Last Updated)
- Check POSIX endings (single newline at end)
- Auto-fix issues where possible
Phase 4: Return Status
Return to coordinator:
{
"created": ["CLAUDE.md", "docs/README.md", ...],
"skipped": [],
"tbd_count": 3,
"validation": "OK"
}
Critical Notes
Core Rules
- Idempotent: Never overwrite existing files; skip and log
- No context gathering: All data comes from coordinator's Context Store
- TBD markers: Use
[TBD: placeholder_name] for missing data, never {{PLACEHOLDER}}
- Language: All root docs in English (universal standards)
- SCOPE tags: Required in first 10 lines of each file
NO_CODE_EXAMPLES Rule (MANDATORY)
Root documents define navigation and standards, NOT implementations:
- FORBIDDEN: Code blocks, implementation snippets
- ALLOWED: Tables, links, command examples (1 line)
- TEMPLATE RULE: All templates include
<!-- NO_CODE_EXAMPLES: ... --> tag - FOLLOW IT
Stack Adaptation Rule (MANDATORY)
- All external links must match project stack (detected in Context Store)
- .NET project → Microsoft docs; Node.js → MDN, npm docs; Python → Python docs
- Never mix stack references (no Python examples in .NET project)
Format Priority (MANDATORY)
Tables/ASCII > Lists (enumerations only) > Text (last resort)
Definition of Done
- Context Store received and validated
- 4 root documents created (or skipped if exist)
- All placeholders replaced (or marked TBD)
- Self-validation passed (SCOPE, sections, Maintenance, POSIX)
- Actuality verified: all document facts match current code (paths, functions, APIs, configs exist and are accurate)
- Status returned to coordinator
Reference Files
- Templates:
references/templates/claude_md_template.md, docs_root_readme_template.md, documentation_standards_template.md, principles_template.md
- Questions:
references/questions_root.md (Q1-Q22)
Version: 2.1.0
Last Updated: 2025-01-12
1---2name: ln-111-root-docs-creator-63description: Creates 4 root documentation files (CLAUDE.md, docs/README.md, documentation_standards.md, principles.md). L3 Worker invoked by ln-110-project-docs-coordinator.4---56> **Paths:** File paths (`shared/`, `references/`, `../ln-*`) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.78# Root Documentation Creator910L3 Worker that creates 4 root documentation files using templates and Context Store from coordinator.1112## Purpose & Scope13- Creates 4 root documentation files (entry points for AI agents)14- Receives Context Store from ln-110-project-docs-coordinator15- Replaces placeholders with project-specific data16- Self-validates structure and content (22 questions)17- Never gathers context itself; uses coordinator input1819## Invocation (who/when)20- **ln-110-project-docs-coordinator:** ALWAYS invoked as first worker21- Never called directly by users2223## Inputs24From coordinator:25- `contextStore`: Key-value pairs with all placeholders26 - PROJECT_NAME, PROJECT_DESCRIPTION27 - TECH_STACK_SUMMARY28 - DEV_COMMANDS (from package.json scripts)29 - DATE (current date)30 - **LEGACY_CONTENT** (optional, from ln-100 Phase 0 migration):31 - `legacy_principles`: { principles[], anti_patterns[], conventions[] }32- `targetDir`: Project root directory3334**LEGACY_CONTENT** is used as base content when creating principles.md. Priority: **Legacy > Template defaults**.3536## Documents Created (4)3738| File | Target Sections | Questions |39|------|-----------------|-----------|40| CLAUDE.md | Critical Rules, Documentation Navigation, Development Commands, Maintenance | Q1-Q6 |41| docs/README.md | Overview, Standards, Writing Guidelines, Quick Navigation, Maintenance | Q7-Q13 |42| docs/documentation_standards.md | Quick Reference (60+ requirements), 12 main sections, Maintenance | Q14-Q16 |43| docs/principles.md | Core Principles (8), Decision Framework, Anti-Patterns, Verification, Maintenance | Q17-Q22 |4445## Workflow4647### Phase 1: Receive Context481. Parse Context Store from coordinator492. Validate required keys present (PROJECT_NAME, PROJECT_DESCRIPTION)503. Set defaults for missing optional keys5152### Phase 2: Create Documents53For each document (CLAUDE.md, docs/README.md, documentation_standards.md, principles.md):541. Check if file exists (idempotent)552. If exists: skip with log563. If not exists:57 - Copy template from `references/templates/`58 - **Check LEGACY_CONTENT for this document type:**59 - For `principles.md`: If `LEGACY_CONTENT.legacy_principles` exists:60 - Use `legacy_principles.principles[]` as base for "## Core Principles" section61 - Use `legacy_principles.anti_patterns[]` for "## Anti-Patterns" section62 - Use `legacy_principles.conventions[]` for code style rules63 - Augment with template structure (add missing sections)64 - Mark: `<!-- Migrated from legacy documentation -->` at top of relevant sections65 - For other documents: Use template as-is (no legacy content applicable)66 - Replace `{{PLACEHOLDER}}` with Context Store values67 - Mark `[TBD: X]` for missing data (never leave empty placeholders)68 - Write file6970### Phase 3: Self-Validate71For each created document:721. Check SCOPE tag in first 10 lines732. Check required sections (from questions_root.md)743. Check Maintenance section (Update Triggers, Verification, Last Updated)754. Check POSIX endings (single newline at end)765. Auto-fix issues where possible7778### Phase 4: Return Status79Return to coordinator:80```json81{82 "created": ["CLAUDE.md", "docs/README.md", ...],83 "skipped": [],84 "tbd_count": 3,85 "validation": "OK"86}87```8889## Critical Notes9091### Core Rules92- **Idempotent:** Never overwrite existing files; skip and log93- **No context gathering:** All data comes from coordinator's Context Store94- **TBD markers:** Use `[TBD: placeholder_name]` for missing data, never `{{PLACEHOLDER}}`95- **Language:** All root docs in English (universal standards)96- **SCOPE tags:** Required in first 10 lines of each file9798### NO_CODE_EXAMPLES Rule (MANDATORY)99Root documents define **navigation and standards**, NOT implementations:100- **FORBIDDEN:** Code blocks, implementation snippets101- **ALLOWED:** Tables, links, command examples (1 line)102- **TEMPLATE RULE:** All templates include `<!-- NO_CODE_EXAMPLES: ... -->` tag - FOLLOW IT103104### Stack Adaptation Rule (MANDATORY)105- All external links must match project stack (detected in Context Store)106- .NET project → Microsoft docs; Node.js → MDN, npm docs; Python → Python docs107- Never mix stack references (no Python examples in .NET project)108109### Format Priority (MANDATORY)110Tables/ASCII > Lists (enumerations only) > Text (last resort)111112## Definition of Done113- Context Store received and validated114- 4 root documents created (or skipped if exist)115- All placeholders replaced (or marked TBD)116- Self-validation passed (SCOPE, sections, Maintenance, POSIX)117- **Actuality verified:** all document facts match current code (paths, functions, APIs, configs exist and are accurate)118- Status returned to coordinator119120## Reference Files121- Templates: `references/templates/claude_md_template.md`, `docs_root_readme_template.md`, `documentation_standards_template.md`, `principles_template.md`122- Questions: `references/questions_root.md` (Q1-Q22)123124---125**Version:** 2.1.0126**Last Updated:** 2025-01-12