Claude-code-skills ln-111-root-docs-creator
Creates root documentation files (AGENTS.md, CLAUDE.md, GEMINI.md, ANTIGRAVITY.md, docs/README.md, standards, principles). Use for initial project doc setup.
git clone https://github.com/levnikolaevich/claude-code-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/levnikolaevich/claude-code-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills-catalog/ln-111-root-docs-creator" ~/.claude/skills/levnikolaevich-claude-code-skills-ln-111-root-docs-creator && rm -rf "$T"
skills-catalog/ln-111-root-docs-creator/SKILL.mdPaths: File paths (
,shared/,references/) 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../ln-*is missing, fetch files via WebFetch fromshared/.https://raw.githubusercontent.com/levnikolaevich/claude-code-skills/master/skills/{path}
Root Documentation Creator
Type: L3 Worker
L3 Worker that creates 7 root documentation files using templates and Context Store from coordinator.
Purpose & Scope
- Creates 7 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
Inputs
From coordinator:
: Key-value pairs with all placeholderscontextStore- PROJECT_NAME, PROJECT_DESCRIPTION
- TECH_STACK_SUMMARY
- DEV_COMMANDS (from package.json scripts)
- DATE (current date)
(optional boolean; defaultENABLE_WORKFLOW_PRINCIPLES
) — whenfalse
, expands thetrue
placeholder in AGENTS.md with the content of{{WORKFLOW_PRINCIPLES_BLOCK}}references/templates/agents_md_workflow_principles.md
: Project root directorytargetDir
MANDATORY READ: Load
shared/references/docs_quality_contract.md, shared/references/docs_quality_rules.json, and shared/references/agent_instructions_writing_guide.md (the canonical writing guide for AGENTS.md / CLAUDE.md / GEMINI.md / ANTIGRAVITY.md).
Documents Created (7)
| File | Target Sections | Questions |
|---|---|---|
| AGENTS.md | Quick Navigation, Agent Entry, Critical Rules, (optional) Workflow Principles, Development Commands, Maintenance | Q1-Q6 |
| CLAUDE.md | import + delta (≤20 lines total) | Q1-Q6 |
| GEMINI.md | import + delta (≤20 lines total) | Q1-Q6 |
| ANTIGRAVITY.md | import + delta (≤20 lines total) | Q1-Q6 |
| docs/README.md | Quick Navigation, Agent Entry, Documentation Map, 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 (
defaults toENABLE_WORKFLOW_PRINCIPLES
)false
Phase 2: Create Documents
For each document (
AGENTS.md, CLAUDE.md, GEMINI.md, ANTIGRAVITY.md, docs/README.md, docs/documentation_standards.md, docs/principles.md):
- Check if file exists (idempotent)
- If exists: skip with log
- If not exists:
- Copy template from
references/templates/ - For AGENTS.md: enforce the shared header contract (
,SCOPE
,DOC_KIND
,DOC_ROLE: canonical
,READ_WHEN
,SKIP_WHEN
) and the top-section contract (PRIMARY_SOURCES
,## Quick Navigation
,## Agent Entry
,## Critical Rules
)## Maintenance - For AGENTS.md: if
, replace theENABLE_WORKFLOW_PRINCIPLES=true
placeholder with the full content of{{WORKFLOW_PRINCIPLES_BLOCK}}
; otherwise strip the placeholder line and its leading commentreferences/templates/agents_md_workflow_principles.md - For CLAUDE.md, GEMINI.md, and ANTIGRAVITY.md: use the import-stub templates (
,claude_md_template.md
,gemini_md_template.md
). They containantigravity_md_template.md
, a singleDOC_ROLE: derived
line, and a bounded harness-specific delta. Do not inline any AGENTS.md content@AGENTS.md - For
: prefer normalized principle inputs already present in Context Storedocs/principles.md - If project-specific principles are absent, keep the template structure and fill only facts supported by current project sources
- Replace
tokens with Context Store values{{PLACEHOLDER}} - Never leave template markers in published root docs
- If data is missing: omit the claim or use a concise neutral fallback, but do NOT emit
[TBD: ...] - Write file
- Copy template from
Root entrypoint rule (canonical model):
is the single canonical source of content. It holds the Critical Rules table, MCP Tool Preferences, Navigation, Development Commands, and optional Workflow Principles.AGENTS.md
is a Claude Code-specific stub that containsCLAUDE.md
plus a@AGENTS.md
delta with harness-specific rules (≤20 lines total, ≤50 absolute max). Do not duplicate AGENTS.md content.## Claude Code
is the Gemini CLI analog withGEMINI.md
plus a@AGENTS.md
delta.## Gemini CLI
is the Google Antigravity IDE analog withANTIGRAVITY.md
plus a@AGENTS.md
delta (skills root hints, workspace-scoped## Google Antigravity
layout)..agents/- Claude Code, Gemini CLI, and Antigravity all natively expand
imports into the session context at launch (5-hop recursion), so the imported AGENTS.md is available to each harness automatically.@path - Harness delta content: command terminology (
,/compact
), storage pointers (/memory show
), and features that only exist in one harness (~/.claude/projects/<project>/memory/
with.claude/rules/
frontmatter, nested on-demand loading).paths:
Phase 3: Self-Validate
For each created document:
- Check SCOPE tag in first 12 lines
- Check metadata markers (
,DOC_KIND
,DOC_ROLE
,READ_WHEN
,SKIP_WHEN
)PRIMARY_SOURCES - For AGENTS.md: check
,Quick Navigation
,Agent Entry
,Critical RulesMaintenance - For CLAUDE.md / GEMINI.md / ANTIGRAVITY.md: check
import line is present and the file is ≤50 lines@AGENTS.md - Check required sections (from questions_root.md)
- Check docs-quality contract compliance (no forbidden placeholders, no leaked template metadata)
- Check POSIX endings (single newline at end)
- Auto-fix issues where possible
Phase 4: Return Status
Return to coordinator:
{ "created_files": ["AGENTS.md", "CLAUDE.md", "GEMINI.md", "ANTIGRAVITY.md", "docs/README.md", "docs/documentation_standards.md", "docs/principles.md"], "skipped_files": [], "quality_inputs": { "doc_paths": ["AGENTS.md", "CLAUDE.md", "GEMINI.md", "ANTIGRAVITY.md", "docs/README.md", "docs/documentation_standards.md", "docs/principles.md"], "owners": { "AGENTS.md": "ln-111-root-docs-creator", "CLAUDE.md": "ln-111-root-docs-creator", "GEMINI.md": "ln-111-root-docs-creator", "ANTIGRAVITY.md": "ln-111-root-docs-creator", "docs/README.md": "ln-111-root-docs-creator", "docs/documentation_standards.md": "ln-111-root-docs-creator", "docs/principles.md": "ln-111-root-docs-creator" } }, "validation_status": "passed" }
Critical Notes
Core Rules
- Idempotent: Never overwrite existing files; skip and log
- No context gathering: All data comes from coordinator's Context Store
- Publishable output: Root docs must not contain
,[TBD: ...]
, or leaked template metadataTODO - Language: All root docs in English (universal standards)
- SCOPE tags: Required in first 10 lines of each file (HTML comments are stripped from Claude Code's injected context but stay visible to maintainers and auditors)
- Canonical-stub root model:
is the single source;AGENTS.md
,CLAUDE.md
, andGEMINI.md
areANTIGRAVITY.md
imports plus bounded harness deltas. See@AGENTS.md
for rationale and anti-patterns.shared/references/agent_instructions_writing_guide.md
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
tag - FOLLOW IT<!-- NO_CODE_EXAMPLES: ... -->
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)
Runtime Summary Artifact
MANDATORY READ: Load
shared/references/docs_generation_summary_contract.md
Accept optional
summaryArtifactPath.
Summary kind:
docs-generation
Required payload semantics:
worker = "ln-111"statuscreated_filesskipped_filesquality_inputsvalidation_statuswarnings
Write the summary to the provided artifact path or return the same envelope in structured output.
Definition of Done
- Context Store received and validated
- 7 root documents created (or skipped if exist)
- All placeholders replaced; no
markers or template metadata remain in root docs[TBD: ...] -
,CLAUDE.md
, andGEMINI.md
each contain exactly oneANTIGRAVITY.md
line and a bounded harness delta (≤50 lines total)@AGENTS.md - If
: the workflow principles shard is expanded in AGENTS.md; ifENABLE_WORKFLOW_PRINCIPLES=true
: the placeholder line is strippedfalse - Self-validation passed (SCOPE, metadata markers, top sections, Maintenance, POSIX)
- Actuality verified: all document facts match current code (paths, functions, APIs, configs exist and are accurate)
- Status returned
Reference Files
- Templates:
,references/templates/agents_md_template.md
,references/templates/claude_md_template.md
,references/templates/gemini_md_template.md
,references/templates/agents_md_workflow_principles.md
,references/templates/docs_root_readme_template.md
,references/templates/documentation_standards_template.mdreferences/templates/principles_template.md - Questions:
(Q1-Q22)references/questions_root.md - Writing guide:
(canonical rationale for theshared/references/agent_instructions_writing_guide.md
import pattern, size budgets, anti-patterns)@AGENTS.md - Environment state:
(detection and bootstrap pattern)shared/references/environment_state_contract.md
Version: 2.1.0 Last Updated: 2025-01-12