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. If shared/ is missing, fetch files via WebFetch from https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/{path}.
Root Documentation Creator
L3 Worker that creates 5 root documentation files using templates and Context Store from coordinator.
Purpose & Scope
- Creates 5 root documentation files (entry points for AI agents + tool configuration)
- 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 (5)
| 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 |
| docs/tools_config.md |
Task Management, Research, File Editing, External Agents, Git |
Auto-detected |
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 2b: Create Tools Config
MANDATORY READ: Load shared/references/mcp_tool_preferences.md
For docs/tools_config.md:
- Check if file exists (idempotent — respect existing config, may have been auto-bootstrapped)
- If exists: skip with log
- If not exists:
- Copy template from
references/templates/tools_config_template.md
- Detect available tools (replace placeholders with actual values):
- Task Management: call
list_teams() via mcp__linear-server → set Provider/Status/Team ID
- Research: call
ref_search_documentation(query="test") → if active, set Provider=ref. Then call resolve-library-id(libraryName="react") for Context7 → set Fallback chain
- File Editing: run detection sequence (loaded above)
- External Agents: run
codex --version, gemini --version → set Status/Comment
- Git: run
git worktree list → set Worktree/Strategy
- Write file with detected values
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
Reference Files
- Templates:
references/templates/claude_md_template.md, docs_root_readme_template.md, documentation_standards_template.md, principles_template.md, tools_config_template.md
- Questions:
references/questions_root.md (Q1-Q22)
- Tools config guide:
shared/references/tools_config_guide.md (detection and bootstrap pattern)
Version: 2.1.0
Last Updated: 2025-01-12
1---2name: ln-111-root-docs-creator-73description: "Creates root documentation files (CLAUDE.md, docs/README.md, standards, principles, tools config). Use for initial project doc setup."4license: MIT5metadata:6 source: https://skillmd.com/skills/majiayu000/ln-111-root-docs-creator-77---89> **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. If `shared/` is missing, fetch files via WebFetch from `https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/{path}`.1011# Root Documentation Creator1213L3 Worker that creates 5 root documentation files using templates and Context Store from coordinator.1415## Purpose & Scope16- Creates 5 root documentation files (entry points for AI agents + tool configuration)17- Receives Context Store from ln-110-project-docs-coordinator18- Replaces placeholders with project-specific data19- Self-validates structure and content (22 questions)20- Never gathers context itself; uses coordinator input2122## Invocation (who/when)23- **ln-110-project-docs-coordinator:** ALWAYS invoked as first worker24- Never called directly by users2526## Inputs27From coordinator:28- `contextStore`: Key-value pairs with all placeholders29 - PROJECT_NAME, PROJECT_DESCRIPTION30 - TECH_STACK_SUMMARY31 - DEV_COMMANDS (from package.json scripts)32 - DATE (current date)33 - **LEGACY_CONTENT** (optional, from ln-100 Phase 0 migration):34 - `legacy_principles`: { principles[], anti_patterns[], conventions[] }35- `targetDir`: Project root directory3637**LEGACY_CONTENT** is used as base content when creating principles.md. Priority: **Legacy > Template defaults**.3839## Documents Created (5)4041| File | Target Sections | Questions |42|------|-----------------|-----------|43| CLAUDE.md | Critical Rules, Documentation Navigation, Development Commands, Maintenance | Q1-Q6 |44| docs/README.md | Overview, Standards, Writing Guidelines, Quick Navigation, Maintenance | Q7-Q13 |45| docs/documentation_standards.md | Quick Reference (60+ requirements), 12 main sections, Maintenance | Q14-Q16 |46| docs/principles.md | Core Principles (8), Decision Framework, Anti-Patterns, Verification, Maintenance | Q17-Q22 |47| docs/tools_config.md | Task Management, Research, File Editing, External Agents, Git | Auto-detected |4849## Workflow5051### Phase 1: Receive Context521. Parse Context Store from coordinator532. Validate required keys present (PROJECT_NAME, PROJECT_DESCRIPTION)543. Set defaults for missing optional keys5556### Phase 2: Create Documents57For each document (CLAUDE.md, docs/README.md, documentation_standards.md, principles.md):581. Check if file exists (idempotent)592. If exists: skip with log603. If not exists:61 - Copy template from `references/templates/`62 - **Check LEGACY_CONTENT for this document type:**63 - For `principles.md`: If `LEGACY_CONTENT.legacy_principles` exists:64 - Use `legacy_principles.principles[]` as base for "## Core Principles" section65 - Use `legacy_principles.anti_patterns[]` for "## Anti-Patterns" section66 - Use `legacy_principles.conventions[]` for code style rules67 - Augment with template structure (add missing sections)68 - Mark: `<!-- Migrated from legacy documentation -->` at top of relevant sections69 - For other documents: Use template as-is (no legacy content applicable)70 - Replace `{{PLACEHOLDER}}` with Context Store values71 - Mark `[TBD: X]` for missing data (never leave empty placeholders)72 - Write file7374### Phase 2b: Create Tools Config7576**MANDATORY READ:** Load `shared/references/mcp_tool_preferences.md`7778For `docs/tools_config.md`:791. Check if file exists (idempotent — respect existing config, may have been auto-bootstrapped)802. If exists: skip with log813. If not exists:82 - Copy template from `references/templates/tools_config_template.md`83 - **Detect available tools** (replace placeholders with actual values):84 - Task Management: call `list_teams()` via mcp__linear-server → set Provider/Status/Team ID85 - Research: call `ref_search_documentation(query="test")` → if active, set Provider=ref. Then call `resolve-library-id(libraryName="react")` for Context7 → set Fallback chain86 - File Editing: run detection sequence (loaded above)87 - External Agents: run `codex --version`, `gemini --version` → set Status/Comment88 - Git: run `git worktree list` → set Worktree/Strategy89 - Write file with detected values9091### Phase 3: Self-Validate92For each created document:931. Check SCOPE tag in first 10 lines942. Check required sections (from questions_root.md)953. Check Maintenance section (Update Triggers, Verification, Last Updated)964. Check POSIX endings (single newline at end)975. Auto-fix issues where possible9899### Phase 4: Return Status100Return to coordinator:101```json102{103 "created": ["CLAUDE.md", "docs/README.md", ...],104 "skipped": [],105 "tbd_count": 3,106 "validation": "OK"107}108```109110## Critical Notes111112### Core Rules113- **Idempotent:** Never overwrite existing files; skip and log114- **No context gathering:** All data comes from coordinator's Context Store115- **TBD markers:** Use `[TBD: placeholder_name]` for missing data, never `{{PLACEHOLDER}}`116- **Language:** All root docs in English (universal standards)117- **SCOPE tags:** Required in first 10 lines of each file118119### NO_CODE_EXAMPLES Rule (MANDATORY)120Root documents define **navigation and standards**, NOT implementations:121- **FORBIDDEN:** Code blocks, implementation snippets122- **ALLOWED:** Tables, links, command examples (1 line)123- **TEMPLATE RULE:** All templates include `<!-- NO_CODE_EXAMPLES: ... -->` tag - FOLLOW IT124125### Stack Adaptation Rule (MANDATORY)126- All external links must match project stack (detected in Context Store)127- .NET project → Microsoft docs; Node.js → MDN, npm docs; Python → Python docs128- Never mix stack references (no Python examples in .NET project)129130### Format Priority (MANDATORY)131Tables/ASCII > Lists (enumerations only) > Text (last resort)132133## Definition of Done134- [ ] Context Store received and validated135- [ ] 5 root documents created (or skipped if exist)136- [ ] All placeholders replaced (or marked TBD); tools_config.md uses detected values137- [ ] Self-validation passed (SCOPE, sections, Maintenance, POSIX)138- [ ] **Actuality verified:** all document facts match current code (paths, functions, APIs, configs exist and are accurate)139- [ ] Status returned to coordinator140141## Reference Files142- Templates: `references/templates/claude_md_template.md`, `docs_root_readme_template.md`, `documentation_standards_template.md`, `principles_template.md`, `tools_config_template.md`143- Questions: `references/questions_root.md` (Q1-Q22)144- **Tools config guide:** `shared/references/tools_config_guide.md` (detection and bootstrap pattern)145146---147**Version:** 2.1.0148**Last Updated:** 2025-01-12