[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6FJ6BYFSGFCAWPBAQQQQYC2":3,"skill-same:01M6FJ6BYFSGFCAWPBAQQQQYC2":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":46,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M6FJ6BYFSGFCAWPBAQQQQYC2","ln-100-documents-pipeline",null,"Creates complete project documentation system (project docs, reference, tasks, tests). Use when bootstrapping docs from scratch or regenerating all.","boisenoise\u002Fskills-collections","boisenoise","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F193180?v=4","01M6CDBDQK6BDN55ZMA6B6PKBM","01M6CDBDVSJ3JPTBYN26FZ7TZK",12,"MIT","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Flevn-ln-100-documents-pipeline\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37],"documents","pipeline","ln","ln 100 documents pipeline","tests","project docs","when","scratch","project documentation","documentation system","From Scratch","complete","docs","project","complete project","reference","use","system","tasks","documentation","2026-11-10 10:12:30",false,"---\nname: ln-100-documents-pipeline\ndescription: \"Creates complete project documentation system (project docs, reference, tasks, tests). Use when bootstrapping docs from scratch or regenerating all.\"\nlicense: MIT\n---\n\n> **Paths:** File paths (`shared\u002F`, `references\u002F`, `..\u002Fln-*`) 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\u002F` is missing, fetch files via WebFetch from `https:\u002F\u002Fraw.githubusercontent.com\u002Flevnikolaevich\u002Fclaude-code-skills\u002Fmaster\u002Fskills\u002F{path}`.\n\n**Type:** L1 Top Orchestrator\n**Category:** 1XX Documentation Pipeline\n\n# Documentation Pipeline (Orchestrator)\n\nThis skill orchestrates the creation of a complete documentation system by invoking one L2 coordinator plus 3 L2 workers. The coordinator (ln-110) delegates to 5 L3 workers for project docs; other L2 workers handle reference, tasks, and test domains. Each component validates its own output, and the orchestrator owns the final docs-quality acceptance gate.\n\n## Purpose\n\nTop-level orchestrator that creates a complete project documentation system in one invocation. Chains ln-110 coordinator + ln-120\u002F130\u002F140 workers sequentially, then runs global cleanup (deduplication, orphan reporting, cross-link validation).\n\n## Runtime Contract\n\n**MANDATORY READ:** Load `shared\u002Freferences\u002Fcoordinator_runtime_contract.md`, `shared\u002Freferences\u002Fdocs_pipeline_runtime_contract.md`, `shared\u002Freferences\u002Fdocs_generation_summary_contract.md`\n\nRuntime family: `docs-pipeline-runtime`\n\nIdentifier:\n- `docs-pipeline`\n\nPhases:\n1. `PHASE_0_CONFIG`\n2. `PHASE_1_LEGACY_SCAN`\n3. `PHASE_2_CONFIRMATION`\n4. `PHASE_3_DELEGATE`\n5. `PHASE_4_QUALITY_GATE`\n6. `PHASE_5_CLEANUP`\n7. `PHASE_6_SELF_CHECK`\n\nComponent summary contract:\n- `ln-110`, `ln-120`, `ln-130`, `ln-140` write or return `docs-generation` envelopes\n- `ln-100` consumes those summaries plus docs-quality checkpoints as orchestration SSOT\n\n## Architecture\n\n```\nln-100-documents-pipeline (L1 Top Orchestrator - this skill)\n|- ln-110-project-docs-coordinator (L2 Coordinator)\n|  |- ln-111-root-docs-creator (L3 Worker) -> 5 docs\n|  |- ln-112-project-core-creator (L3 Worker) -> 3 docs\n|  |- ln-113-backend-docs-creator (L3 Worker) -> 2 conditional\n|  |- ln-114-frontend-docs-creator (L3 Worker) -> 1 conditional\n|  `- ln-115-devops-docs-creator (L3 Worker) -> 1 always + 1 conditional\n|- ln-120-reference-docs-creator (L2 Worker)\n|- ln-130-tasks-docs-creator (L2 Worker)\n`- ln-140-test-docs-creator (L2 Worker - optional)\n```\n\n## When to Use This Skill\n\nThis skill should be used when:\n- Start a new IT project and need complete documentation system at once\n- Use automated workflow instead of manually invoking multiple workers\n- Create entire documentation structure (`AGENTS.md` canonical + `CLAUDE.md` import stub -> `docs\u002F`) in one go\n- Prefer orchestrated CREATE path over manual skill chaining\n- Need automatic global cleanup (deduplication, orphaned files, consolidation)\n\n**Alternative**: If you prefer granular control, invoke workers manually:\n1. [ln-110-project-docs-coordinator](..\u002Fln-110-project-docs-coordinator\u002FSKILL.md) - Root + Project docs (coordinates 5 L3 workers)\n2. [ln-120-reference-docs-creator](..\u002Fln-120-reference-docs-creator\u002FSKILL.md) - reference\u002F structure\n3. [ln-130-tasks-docs-creator](..\u002Fln-130-tasks-docs-creator\u002FSKILL.md) - tasks\u002FREADME.md + kanban\n4. [ln-140-test-docs-creator](..\u002Fln-140-test-docs-creator\u002FSKILL.md) - tests\u002FREADME.md (optional)\n\n**MANDATORY READ:** Load `shared\u002Freferences\u002Fdocs_quality_contract.md`.\n\n**Note**: Each worker validates its own local output in Phase 2\u002F3. The orchestrator still owns the final docs-quality manifest, verification, and repair loop before cleanup can continue.\n\n## Workflow\n\nThe skill follows a 5-phase orchestration workflow: **Legacy Migration (optional)** -> User confirmation -> Invoke coordinator + workers sequentially -> Global cleanup -> Summary.\n\n---\n\n### Phase 0: Source Documentation Cleanup (OPTIONAL)\n\n**Objective**: Detect non-canonical documentation, normalize any useful facts, and remove duplicate documentation paths before generation.\n\n**Trigger**: Runs at pipeline start when the repo already contains documentation outside the canonical layout.\n\n**Process**:\n\n**0a. Non-Canonical Source Detection**:\n- Scan project for non-standard documentation using patterns from `references\u002Flegacy_detection_patterns.md`:\n  - **Root .md files**: `ARCHITECTURE.md`, `REQUIREMENTS.md`, `STACK.md`, `API.md`, `DATABASE.md`, `DEPLOYMENT.md`\n  - **Non-canonical folders**: `documentation\u002F`, `doc\u002F`, `wiki\u002F`, or `docs\u002F` with wrong structure\n  - **README.md sections**: `## Architecture`, `## Tech Stack`, `## Requirements`, etc.\n  - **CONTRIBUTING.md sections**: `## Development`, `## Code Style`, `## Coding Standards`\n- Build `source_manifest`: list of { path, detected_type, target_doc, confidence }\n- If no non-canonical docs are found -> skip to Phase 1\n\n**0b. Fact Extraction**:\n- For each detected source file:\n  - Parse markdown structure (headers, lists, code blocks)\n  - Apply type-specific extractor (**MANDATORY READ:** Load `references\u002Flegacy_detection_patterns.md`):\n    - `architecture_extractor` -> { layers[], components[], diagrams[] }\n    - `requirements_extractor` -> { functional[], non_functional[] }\n    - `tech_stack_extractor` -> { frontend, backend, database, versions }\n    - `principles_extractor` -> { principles[], anti_patterns[] }\n    - `api_spec_extractor` -> { endpoints[], authentication }\n    - `database_schema_extractor` -> { tables[], relationships[] }\n    - `runbook_extractor` -> { prerequisites[], install_steps[], env_vars[] }\n    - `infrastructure_extractor` -> { servers[], domains[], ports[], services[], artifacts{}, cicd{} }\n  - Score content quality (0.0-1.0)\n- Store results in `source_notes`\n\n**0c. User Confirmation**:\n- Display detected non-canonical files:\n  ```\n  Non-Canonical Documentation Detected:\n\n  | File | Type | Confidence | Target |\n  |------|------|------------|--------|\n  | README.md (## Architecture) | architecture | HIGH | docs\u002Fproject\u002Farchitecture.md |\n  | docs\u002FARCHITECTURE.md | architecture | HIGH | docs\u002Fproject\u002Farchitecture.md |\n  | CONTRIBUTING.md (## Development) | principles | MEDIUM | docs\u002Fprinciples.md |\n\n  Cleanup Options:\n  1. NORMALIZE (recommended): Extract facts -> Archive -> Remove duplicate sources\n  2. ARCHIVE ONLY: Backup without extraction\n  3. SKIP: Leave non-canonical docs as-is (may cause duplication)\n\n  Choose option (1\u002F2\u002F3): _\n  ```\n- If user selects \"1\" (NORMALIZE):\n  - Optional: \"Review extracted facts before folding them into the canonical context? (yes\u002Fno)\"\n  - Confirm: \"Proceed with cleanup and archive non-canonical files?\"\n- If user selects \"2\" (ARCHIVE ONLY):\n  - Confirm: \"Archive non-canonical files to .archive\u002F? Content will NOT be normalized.\"\n- If user selects \"3\" (SKIP):\n  - Warn: \"Non-canonical files will remain. This may cause duplication issues.\"\n  - Proceed to Phase 1\n\n**0d. Backup and Archive**:\n- Create `.archive\u002Fsource-docs-{timestamp}\u002F` directory\n- Structure:\n  ```\n  .archive\u002F\n  `- source-docs-YYYY-MM-DD-HHMMSS\u002F\n      |- README_cleanup.md          # Rollback instructions\n      |- original\u002F                  # Exact copies of non-canonical files\n      |  |- README.md\n      |  |- ARCHITECTURE.md\n      |  `- documentation\u002F\n      `- extracted\u002F                 # Extracted facts (for reference)\n          |- architecture_content.md\n          `- principles_content.md\n  ```\n- Copy all detected source files to `original\u002F`\n- Save extracted facts to `extracted\u002F`\n- Generate `README_cleanup.md` with rollback instructions\n\n**0e. Context Normalization**:\n- Build `SOURCE_DOC_NOTES` from extracted facts:\n  ```json\n  {\n    \"SOURCE_DOC_NOTES\": {\n      \"architecture_notes\": { \"sections\": [...], \"diagrams\": [...] },\n      \"requirements_notes\": { \"functional\": [...] },\n      \"principles_notes\": { \"principles\": [...] },\n      \"tech_stack_notes\": { \"frontend\": \"...\", \"backend\": \"...\" },\n      \"api_notes\": { \"endpoints\": [...] },\n      \"database_notes\": { \"tables\": [...] },\n      \"runbook_notes\": { \"install_steps\": [...] },\n      \"infrastructure_notes\": { \"servers\": [...], \"domains\": [...], \"ports\": {} }\n    }\n  }\n  ```\n- Merge extracted facts into the coordinator input as supporting evidence only\n- Workers consume normalized context fields and current source facts directly; there is no legacy-only branch\n- Priority order: **Current source facts + normalized project documentation > template defaults**\n\n**0f. Cleanup (Non-Canonical Files)**:\n- For root-level files (README.md, CONTRIBUTING.md):\n  - Do NOT delete\n  - Remove duplicated sections using Edit tool\n  - Add links to new locations:\n    - `## Architecture` -> replace with link: `[Architecture](docs\u002Fproject\u002Farchitecture.md)`\n    - `## Tech Stack` -> replace with link: `[Tech Stack](docs\u002Fproject\u002Ftech_stack.md)`\n- For standalone non-canonical files (ARCHITECTURE.md, documentation\u002F):\n  - Delete files (already backed up)\n  - Log: \"Deleted: ARCHITECTURE.md (migrated to docs\u002Fproject\u002Farchitecture.md)\"\n- Clean empty non-canonical directories\n\n**Output**: `cleanup_summary` { normalized_count, archived_count, skipped_count, source_doc_notes }\n\n### Phase 1: User Confirmation\n\n**Objective**: Check existing files, explain workflow, and get user approval.\n\n**Process**:\n\n0. **Cleanup Summary** (if Phase 0 ran):\n   - Show: \"Normalized {N} non-canonical documents\"\n   - Show: \"Archived to .archive\u002Fsource-docs-{date}\u002F\"\n   - Show: \"Coordinator input enriched with normalized source notes\"\n\n1. **Pre-flight Check** (scan existing documentation):\n   - Use Glob tool to check all potential files:\n    - **Root docs**: `AGENTS.md`, `CLAUDE.md`, `docs\u002FREADME.md`, `docs\u002Fdocumentation_standards.md`, `docs\u002Fprinciples.md`\n     - **Reference structure** (5 items): `docs\u002Freference\u002FREADME.md`, `docs\u002Freference\u002Fadrs\u002F`, `docs\u002Freference\u002Fguides\u002F`, `docs\u002Freference\u002Fmanuals\u002F`, `docs\u002Freference\u002Fresearch\u002F`\n     - **Tasks docs** (2 files): `docs\u002Ftasks\u002FREADME.md`, `docs\u002Ftasks\u002Fkanban_board.md`\n     - **Project docs** (up to 8 files): `docs\u002Fproject\u002Frequirements.md`, `architecture.md`, `tech_stack.md`, `api_spec.md`, `database_schema.md`, `design_guidelines.md`, `infrastructure.md`, `runbook.md`\n     - **Test docs** (2 files): `docs\u002Freference\u002Fguides\u002Ftesting-strategy.md`, `tests\u002FREADME.md`\n   - Count existing vs missing files\n   - Show user summary:\n     ```\n     Documentation Status:\n     Found: X existing files\n     Missing: Y files\n\n     Pipeline will create ONLY missing files.\n     Existing files will be preserved (no overwrites).\n     ```\n\n2. Show user what will be created:\n   - Root + Project documentation (`AGENTS.md` canonical + `CLAUDE.md` import stub + `docs\u002FREADME.md` + `documentation_standards.md` + `principles.md` + `docs\u002Fproject\u002F` via ln-110-project-docs-coordinator)\n   - Reference structure (docs\u002Freference\u002F via ln-120-reference-docs-creator)\n   - Task management docs (docs\u002Ftasks\u002F via ln-130-tasks-docs-creator)\n   - Test documentation (tests\u002F via ln-140-test-docs-creator - optional)\n   - Estimated time: 15-20 minutes with interactive dialog\n\n3. Ask: \"Proceed with creating missing files? (yes\u002Fno)\"\n\n4. Ask: \"Include test documentation (tests\u002FREADME.md)? (yes\u002Fno)\"\n\n**Output**: File scan summary + user approval + test docs preference\n\n---\n\n### Phase 2: Invoke Coordinator + Workers Sequentially\n\n**Objective**: Create complete documentation system by invoking L2 coordinator + 4 L2 workers in order.\n\n**Process** (AUTOMATIC invocations with Skill tool):\n\n**2a. Create Root + Project Documentation**:\n- **Invocation**: `Skill(skill: \"ln-110-project-docs-coordinator\")` -> AUTOMATIC\n- **Input**: Pass normalized source notes from Phase 0 when cleanup was performed\n- **Behavior**: Coordinator gathers context ONCE, then delegates to 5 L3 workers:\n  - ln-111-root-docs-creator -> root docs (AGENTS.md canonical + CLAUDE.md stub + docs\u002FREADME.md + documentation_standards.md + principles.md)\n  - ln-112-project-core-creator -> 3 core docs\n  - ln-113-backend-docs-creator -> 2 conditional\n  - ln-114-frontend-docs-creator -> 1 conditional (if hasFrontend)\n  - ln-115-devops-docs-creator -> 2 docs: 1 always + 1 conditional\n- **Output**: Root docs (`AGENTS.md` canonical + `CLAUDE.md` `@AGENTS.md` import stub + `docs\u002FREADME.md` + `docs\u002Fdocumentation_standards.md` + `docs\u002Fprinciples.md`) + Project docs (`docs\u002Fproject\u002Frequirements.md`, `architecture.md`, `tech_stack.md`, `infrastructure.md` + conditional: `api_spec.md`, `database_schema.md`, `design_guidelines.md`, `runbook.md`)\n- **Store**: Save `context_store` from ln-110 result (contains TECH_STACK for ln-120)\n- **Validation**: Each L3 worker validates output (SCOPE, metadata markers, top sections, Maintenance)\n- **Verify**: All documents exist before continuing\n\n**2b. Create Reference Structure + Smart Documents**:\n- **Invocation**: `Skill(skill: \"ln-120-reference-docs-creator\")` -> AUTOMATIC\n- **Input**: Pass `context_store` from ln-110 (TECH_STACK enables smart document creation)\n- **Output**: `docs\u002Freference\u002FREADME.md` + `adrs\u002F`, `guides\u002F`, `manuals\u002F`, `research\u002F` directories + **justified ADRs\u002FGuides\u002FManuals**\n- **Smart Creation**: Creates documents only for nontrivial technology choices (see ln-120 justification rules)\n- **Validation**: ln-120 validates output in Phase 2\u002F3\n- **Verify**: Reference hub exists before continuing\n\n**2c. Create Task Management Docs**:\n- **Invocation**: `Skill(skill: \"ln-130-tasks-docs-creator\")` -> AUTOMATIC\n- **Output**: `docs\u002Ftasks\u002FREADME.md` + optionally `kanban_board.md` (if user provides Linear config)\n- **Validation**: ln-130 validates output in Phase 2\u002F3\n- **Verify**: Tasks README exists before continuing\n\n**2d. Create Test Documentation (Optional)**:\n- **Condition**: If user approved test docs in Phase 1\n- **Invocation**: `Skill(skill: \"ln-140-test-docs-creator\")` -> AUTOMATIC\n- **Output**: `tests\u002FREADME.md` (test documentation with Story-Level Test Task Pattern)\n- **Validation**: ln-140 validates output in Phase 2\u002F3\n- **Skip**: If \"no\" -> can run ln-140-test-docs-creator later manually\n\n**2e. Extract Skills from Documentation (Optional)**:\n- **Condition**: User approved skill extraction in Phase 1, or invoked manually later\n- **Invocation**: `Skill(skill: \"ln-160-docs-skill-extractor\")` -> AUTOMATIC\n- **Input**: All docs created by ln-110 through ln-140\n- **Output**: `.claude\u002Fcommands\u002F*.md` files extracted from procedural documentation sections\n- **Skip**: If not approved -> can run ln-160-docs-skill-extractor later manually\n\n**Output**: Complete documentation system with coordinator + 4 workers completed and validated\n\n## Worker Invocation (MANDATORY)\n\n## TodoWrite format (mandatory)\nAdd ALL invocations to todos before starting:\n```\n- Invoke ln-110-project-docs-coordinator (pending)\n- Invoke ln-120-reference-docs-creator (pending)\n- Invoke ln-130-tasks-docs-creator (pending)\n- Invoke ln-140-test-docs-creator (pending)\n- Run Global Cleanup (Phase 3) (pending)\n- Show Summary (Phase 4) (pending)\n```\nMark each as in_progress when starting, completed when worker returns success.\n\n---\n\n### Phase 3: Global Cleanup and Consolidation\n\n**Objective**: Remove duplicates, orphaned files, consolidate knowledge across ALL documentation.\n\n**Trigger**: Only after ALL workers complete Phase 2\u002F3 validation.\n\n**Process**:\n\n**3a. Build docs-quality manifest**\n\nCreate one normalized manifest from worker outputs before any cleanup:\n\n1. Collect `created_files`, `skipped_files`, and `quality_inputs` from ln-110, ln-120, ln-130, and ln-140\n2. Merge `quality_inputs.doc_paths` and `quality_inputs.owners`, deduplicate paths, and fail fast if any worker omitted the normalized return contract\n3. Write the explicit manifest with the shared verifier:\n   ```bash\n   node {skills_repo_root}\u002Fskills-catalog\u002Fshared\u002Fscripts\u002Fdocs-quality\u002Fcli.mjs manifest \\\n     --project-root . \\\n    --files \"AGENTS.md,CLAUDE.md,docs\u002FREADME.md,docs\u002Fproject\u002Frequirements.md\" \\\n     --output docs\u002Fproject\u002F.audit\u002Fln-100\u002Fdocs-quality-manifest.json\n   ```\n4. Keep the manifest as the Single Source of Truth for all Phase 3 quality decisions\n\n**3b. Run centralized docs-quality verifier**\n\nRun the shared verifier against the manifest:\n\n```bash\nnode {skills_repo_root}\u002Fskills-catalog\u002Fshared\u002Fscripts\u002Fdocs-quality\u002Fcli.mjs verify \\\n  --project-root . \\\n  --manifest docs\u002Fproject\u002F.audit\u002Fln-100\u002Fdocs-quality-manifest.json \\\n  --output docs\u002Fproject\u002F.audit\u002Fln-100\u002Fdocs-quality-report.json\n```\n\nVerifier checks come from the shared docs-quality contract\u002Frules and include:\n- SCOPE tags in required docs\n- Maintenance section + markers\n- Forbidden placeholders and leaked template metadata\n- Broken internal links\n- Disallowed code fences\n- Stale inline dates\n- Non-official stack documentation links\n\n**Gate:** No HIGH\u002FCRITICAL findings may remain before Phase 3 cleanup proceeds.\n\n**3c. Bounded repair loop**\n\nIf verifier reports HIGH\u002FCRITICAL findings:\n\n1. **Pass 1 - deterministic inline fixes**:\n   - Add missing SCOPE tags\n   - Add or complete `## Maintenance`\n   - Normalize broken internal links when target is obvious\n   - Refresh stale generated dates\n   - Remove leaked template metadata and unresolved markers\n   - Replace illegal fenced code with tables, commands, or links\n2. **Pass 2 - owner-scoped semantic repair**:\n   - Group remaining findings by `quality_inputs.owners[path]`\n   - Re-invoke only the owning worker with the scoped findings for its files\n   - Do not rerun unrelated workers\n3. Re-run the verifier after each repair pass\n4. Stop after 2 repair iterations total\n5. If any HIGH\u002FCRITICAL findings remain, fail the pipeline instead of emitting low-quality docs\n\nRecord the verifier summary and doc-registry output in the Phase 5 final output.\n\n**3d. Scan for duplicate content**\n\n1. **Read all .md files in docs\u002F**\n   - Use Glob tool: `pattern: \"docs\u002F**\u002F*.md\"`\n   - Store list of all documentation files\n\n2. **Identify duplicate sections:**\n   - For each file:\n     - Read file content\n     - Extract section headers (##, ###)\n     - Extract section content (text between headers)\n   - Compare sections across files:\n     - If 2+ sections have:\n       - Same heading (case-insensitive)\n       - >80% content similarity (simple word overlap check)\n     - Mark as duplicate\n\n3. **Determine canonical version:**\n   - Rules for canonical location:\n     - \"Development Principles\" -> principles.md (always canonical)\n     - \"Testing Strategy\" -> testing-strategy.md (always canonical)\n     - \"Linear Configuration\" -> tasks\u002Fkanban_board.md (always canonical)\n     - For other duplicates: Keep in FIRST file encountered (alphabetical order)\n\n4. **Remove duplicates:**\n   - For each duplicate section:\n     - Use Edit tool to delete from non-canonical files\n     - Use Edit tool to add link to canonical location:\n       ```markdown\n       Canonical source: [Development Principles](..\u002Fprinciples.md#development-principles)\n       ```\n   - Track count of removed duplicates\n\n5. **Log results:**\n   - \"Removed {count} duplicate sections\"\n   - List: \"{section_name} removed from {file} (canonical: {canonical_file})\"\n\n**3e. Report unexpected files (advisory)**\n\n1. **List all .md files in docs\u002F**\n   - Use Glob tool: `pattern: \"docs\u002F**\u002F*.md\"`\n\n2. **Check against expected structure** (files created by workers + user-created reference docs)\n\n3. **Report findings (DO NOT move\u002Fdelete\u002Farchive):**\n   - List unexpected files with advisory message\n   - User decides what to do with them\n   - Log: \"{count} unexpected files found (not in expected structure) -> listed for user review\"\n\n**3f. Consolidate knowledge**\n\n1. **Identify scattered information:**\n   - Known patterns:\n     - Linear config scattered: kanban_board.md + tasks\u002FREADME.md\n     - Development principles scattered: AGENTS.md + principles.md + architecture.md\n     - Testing info scattered: testing-strategy.md + tests\u002FREADME.md + architecture.md\n\n2. **For each scattered concept:**\n   - Determine Single Source of Truth (SSoT):\n     - Linear config -> kanban_board.md\n     - Development principles -> principles.md\n     - Testing strategy -> testing-strategy.md\n\n3. **Update non-SSoT files:**\n   - Use Edit tool to replace duplicate content with link:\n     ```markdown\n     Canonical source: [Linear Configuration](..\u002Ftasks\u002Fkanban_board.md#linear-configuration)\n     ```\n   - Track consolidation count\n\n4. **Log results:**\n   - \"Consolidated {count} scattered concepts\"\n   - List: \"{concept} consolidated to {SSoT_file}\"\n\n**3g. Cross-link validation**\n\n1. **Scan all .md files for internal links:**\n   - For each file:\n     - Read content\n     - Extract all markdown links: `[text](path)`\n     - Filter internal links (relative paths, not http:\u002F\u002F)\n\n2. **Verify link targets exist:**\n   - For each link:\n     - Resolve relative path\n     - Check if target file exists (Glob tool)\n     - If missing: Mark as broken\n\n3. **Fix broken links:**\n   - For each broken link:\n     - If target was archived: Update link to archive path\n     - If target never existed: Remove link (convert to plain text)\n   - Track fix count\n\n4. **Add missing critical links:**\n   - **AGENTS.md -> docs\u002FREADME.md:**\n     - Read AGENTS.md\n     - Check for link to docs\u002FREADME.md\n     - If missing: Add in \"Documentation Hub\" section\n   - **docs\u002FREADME.md -> section READMEs:**\n     - Check for links to project\u002F, reference\u002F, tasks\u002F, tests\u002F READMEs\n     - If missing: Add\n   - Track added links count\n\n5. **Log results:**\n   - \"Fixed {count} broken links\"\n   - \"Added {count} missing critical links\"\n   - List changes\n\n**3h. Final report**\n\n```\nGlobal Cleanup Complete:\n\nStructure:\n- Removed {N} duplicate sections (canonical: principles.md)\n- Found {N} unexpected files (listed for user review)\n- Consolidated {N} scattered concepts\n\nLinks:\n- Fixed {N} broken links\n- Added {N} missing critical links:\n  - list of added links\n```\n\n**Output**: All documentation cleaned up, duplicates removed, unexpected files reported, knowledge consolidated, cross-links validated\n\n---\n\n### Phase 4: Summary and Next Steps\n\n**Objective**: Provide complete overview of created system.\n\n**Process**:\n1. List all created files with sizes:\n   - `AGENTS.md` (canonical project entry point)\n   - `CLAUDE.md` (`@AGENTS.md` import stub for Claude Code)\n   - `docs\u002FREADME.md` (root documentation hub)\n   - `docs\u002Fdocumentation_standards.md` (60 universal requirements)\n   - `docs\u002Fprinciples.md` (11 development principles)\n   - `docs\u002Fproject\u002Frequirements.md`, `architecture.md`, `tech_stack.md` + conditional documents (3-7 total)\n   - `docs\u002Freference\u002FREADME.md` (reference hub with empty adrs\u002F, guides\u002F, manuals\u002F, research\u002F directories)\n   - `docs\u002Ftasks\u002FREADME.md` + optionally `kanban_board.md`\n   - `tests\u002FREADME.md` (if created)\n\n2. Show documentation system features:\n   - SCOPE tags (document boundaries defined)\n   - Maintenance sections (update triggers + verification)\n   - README hub (central navigation)\n   - DAG structure (Directed Acyclic Graph navigation)\n   - Living documentation ready\n   - Deduplicated content (canonical sources only)\n   - Validated cross-links (no broken links)\n\n3. Recommend next steps:\n   - \"Review generated documentation (AGENTS.md canonical + CLAUDE.md stub -> docs\u002F)\"\n   - \"Run ln-210-epic-coordinator to decompose scope into Epics\"\n   - \"Share documentation with technical stakeholders\"\n\n4. Summarize the docs-quality gate:\n   - `Verifier score: X\u002F10`\n   - `Repair passes used: 0-2`\n   - `Remaining warnings: list LOW\u002FMEDIUM only`\n\n**Output**: Summary message with file list, verifier status, and recommendations\n\n---\n\n## Complete Output Structure\n\n```\nproject_root\u002F\n|- AGENTS.md                         # Canonical project entry point (map-first root)\n|- CLAUDE.md                         # Derived Anthropic entrypoint\n|- docs\u002F\n|  |- README.md                     # Root documentation hub (general standards)\n|  |- documentation_standards.md    # 60 universal requirements (Claude Code + industry standards)\n|  |- principles.md                 # 11 development principles (Standards First, YAGNI, KISS, DRY, etc.)\n|  |- project\u002F\n|  |  |- requirements.md           # Functional Requirements (NO NFR per project policy)\n|  |  |- architecture.md           # arc42-based architecture with C4 Model\n|  |  |- tech_stack.md             # Technology versions, Docker config\n|  |  |- api_spec.md               # API endpoints (conditional)\n|  |  |- database_schema.md        # Database schema (conditional)\n|  |  |- design_guidelines.md      # UI\u002FUX system (conditional)\n|  |  |- infrastructure.md         # Infrastructure inventory (always)\n|  |  `- runbook.md                # Operations guide (conditional)\n|  |- reference\u002F\n|  |  |- README.md                 # Reference documentation hub (registries)\n|  |  |- adrs\u002F                     # Empty, ready for ADRs\n|  |  |- guides\u002F                   # Empty, ready for guides\n|  |  |- manuals\u002F                  # Empty, ready for manuals\n|  |  `- research\u002F                 # Empty, ready for research\n|  |- tasks\u002F\n|  |  |- README.md                 # Task management system rules\n|  |  `- kanban_board.md           # Linear integration (optional)\n`- tests\u002F\n   `- README.md                    # Test documentation (optional)\n```\n\n---\n\n## Integration with Project Workflow\n\n**Recommended workflow for new projects:**\n\n1. **ln-100-documents-pipeline** (this skill) - Create complete documentation system\n2. **ln-210-epic-coordinator** - Decompose scope into Epics (Linear Projects)\n3. **ln-220-story-coordinator** - Create User Stories for each Epic (automatic decomposition + replan)\n4. **ln-300-task-coordinator** - Break down Stories into implementation tasks (automatic decomposition + replan)\n5. **ln-310-multi-agent-validator** - Verify Stories before development\n6. **ln-400-story-executor** - Orchestrate Story implementation\n7. **Story quality gate** - Review completed Stories\n\n---\n\n## Trade-offs\n\n**Trade-offs:**\n- Less granular control (can't skip coordinator phases)\n- Longer execution time (15-20 minutes)\n- Global cleanup runs even if only one file was created\n\n**When to use manual approach instead:**\n- Need one specific ADR\u002Fguide\u002Fmanual -> use shared\u002Ftemplates\u002F + shared\u002Freferences\u002Fdocumentation_creation.md\n\n---\n\n## Documentation Standards\n\nAll documents created by this pipeline MUST follow these rules:\n\n| Rule | Description | Enforcement |\n|------|-------------|-------------|\n| **NO_CODE Rule** | Documents describe contracts, not implementations | No code blocks >5 lines; use tables\u002FASCII\u002Flinks |\n| **Stack Adaptation** | Links must match project TECH_STACK | .NET -> Microsoft docs, JS -> MDN |\n| **Format Priority** | Tables\u002FASCII > Lists (enumerations only) > Text | Tables for params, config, alternatives |\n\nThese standards are enforced by L3 workers (ln-111-115), ln-120\u002F130\u002F140, and the shared docs-quality gate.\n\n---\n\n## Error Handling\n\nIf any invoked skill fails:\n1. Notify user which skill failed\n2. Show error message from failed skill\n3. Recommend manual invocation for debugging\n4. List already completed steps (partial progress)\n\n---\n\n## Technical Implementation Notes\n\n**Skill Invocation:**\n- Uses **Skill tool** with command parameter\n- Waits for each skill to complete before proceeding\n- Verifies output files exist before moving to next phase\n\n**File Verification:**\n- Uses **Glob** tool to check docs\u002Fproject\u002F structure\n- Lists file sizes for user confirmation\n- Warns if expected files missing\n\n**Global Cleanup:**\n- Uses **Glob** tool to find all .md files\n- Uses **Read** tool to analyze content\n- Uses **Edit** tool to remove duplicates and add links\n- Reports unexpected files (advisory, no auto-archive)\n\n**Docs-Quality Gate:**\n- Uses `shared\u002Fscripts\u002Fdocs-quality\u002Fcli.mjs` to build a manifest from worker outputs\n- Uses the shared verifier before cleanup and again after repair passes\n- Fails fast on unresolved HIGH\u002FCRITICAL findings instead of emitting low-quality documentation\n\n**Standards Compliance:**\n- All output follows same standards as underlying skills\n- ISO\u002FIEC\u002FIEEE 29148:2018 (Requirements)\n- ISO\u002FIEC\u002FIEEE 42010:2022 (Architecture)\n- arc42 + C4 Model + Michael Nygard's ADR Format\n\n---\n\n## Critical Rules\n\n- **Idempotent:** Creates only missing files; existing files are preserved without overwrite\n- **Sequential invocation:** Workers must be invoked in order (ln-110 -> ln-120 -> ln-130 -> ln-140); each verified before next\n- **Docs-quality gate mandatory:** Phase 3 must build manifest -> run verifier -> execute bounded repair loop before cleanup continues\n- **Global cleanup mandatory:** Phase 3 (deduplication, orphan reporting, SSoT consolidation, cross-link validation) runs only after docs-quality gate passes\n- **User confirmation required:** Pre-flight check and explicit approval before any file creation\n- **NO_CODE Rule:** All generated documents use tables\u002FASCII\u002Flinks; no code blocks >5 lines\n\n## Phase 5: Meta-Analysis\n\n**MANDATORY READ:** Load `shared\u002Freferences\u002Fmeta_analysis_protocol.md`\n\nSkill type: `planning-coordinator`. Run after all phases complete. Output to chat using the `planning-coordinator` format.\n\n## Reference Files\n\n- Non-canonical source patterns: `references\u002Flegacy_detection_patterns.md`\n- Worker skills: `ln-110-project-docs-coordinator`, `ln-120-reference-docs-creator`, `ln-130-tasks-docs-creator`, `ln-140-test-docs-creator`\n- Shared docs-quality contract: `shared\u002Freferences\u002Fdocs_quality_contract.md`\n- Shared verifier CLI: `shared\u002Fscripts\u002Fdocs-quality\u002Fcli.mjs`\n\n## Definition of Done\n\nBefore completing work, verify ALL checkpoints:\n\n**Source Cleanup (Phase 0 - if applicable):**\n- [ ] Non-canonical documentation patterns applied (Glob + Grep)\n- [ ] Source manifest built: { path, type, confidence, target }\n- [ ] User selected cleanup option (NORMALIZE \u002F ARCHIVE \u002F SKIP)\n- [ ] If NORMALIZE: facts extracted using type-specific extractors\n- [ ] Backup created: `.archive\u002Fsource-docs-{timestamp}\u002Foriginal\u002F`\n- [ ] Extracted facts saved: `.archive\u002Fsource-docs-{timestamp}\u002Fextracted\u002F`\n- [ ] README_cleanup.md generated with rollback instructions\n- [ ] SOURCE_DOC_NOTES prepared for coordinator input\n- [ ] Non-canonical files cleaned up (sections removed from README.md, standalone files deleted)\n\n**User Confirmation (Phase 1):**\n- [ ] Migration summary shown (if Phase 0 ran)\n- [ ] Workflow explained to user (coordinator + 4 workers: ln-110 -> ln-120 -> ln-130 -> ln-140)\n- [ ] User approved: \"Proceed with complete documentation system creation? (yes\u002Fno)\"\n- [ ] Test docs preference captured: \"Include test documentation? (yes\u002Fno)\"\n\n**Coordinator + Workers Invoked Sequentially (Phase 2):**\n- [ ] ln-110-project-docs-coordinator invoked -> Output verified: Root docs (`AGENTS.md` + `CLAUDE.md` + `docs\u002FREADME.md` + `docs\u002Fdocumentation_standards.md` + `docs\u002Fprinciples.md`) + Project docs (`docs\u002Fproject\u002Frequirements.md`, `architecture.md`, `tech_stack.md` + conditional files)\n- [ ] ln-120-reference-docs-creator invoked -> Output verified: `docs\u002Freference\u002FREADME.md` + directories (adrs\u002F, guides\u002F, manuals\u002F, research\u002F) + justified ADRs\u002FGuides\u002FManuals based on TECH_STACK\n- [ ] ln-130-tasks-docs-creator invoked -> Output verified: `docs\u002Ftasks\u002FREADME.md` + optionally `kanban_board.md`\n- [ ] ln-140-test-docs-creator invoked (if enabled) -> Output verified: `tests\u002FREADME.md`\n- [ ] Each component validated its own output (SCOPE, metadata markers, top sections, Maintenance, POSIX compliance)\n- [ ] Each worker returned normalized `created_files`, `skipped_files`, `quality_inputs`, and `validation_status`\n\n**File Verification Complete:**\n- [ ] All expected files exist (Glob tool used to verify structure)\n- [ ] File sizes listed for user confirmation\n- [ ] Warning displayed if expected files missing\n\n**Global Cleanup Complete (Phase 3):**\n- [ ] 3a: Manifest built from normalized worker outputs\n- [ ] 3b: Shared verifier executed against the manifest\n- [ ] 3c: Bounded repair loop completed; no HIGH\u002FCRITICAL findings remain\n- [ ] 3d: Duplicate sections identified and removed (>80% similarity)\n- [ ] 3d: Links added to canonical locations (principles.md, testing-strategy.md, kanban_board.md)\n- [ ] 3e: Unexpected files reported (advisory, no auto-archive)\n- [ ] 3f: Scattered concepts consolidated to Single Source of Truth (SSoT)\n- [ ] 3g: Internal links validated (broken links fixed, critical links added)\n- [ ] 3h: Final report generated (quality gate summary, counts, lists, actions)\n\n**Summary Displayed (Phase 4):**\n- [ ] All created files listed with sizes\n- [ ] Documentation system features highlighted (SCOPE, metadata markers, Quick Navigation, Agent Entry, Maintenance, README hubs, DAG structure, deduplicated content, validated links)\n- [ ] Docs-quality verifier summary shown (score, repair passes, remaining LOW\u002FMEDIUM warnings)\n- [ ] Next steps recommended (ln-210-epic-coordinator)\n\n**Error Handling (if applicable):**\n- [ ] If any worker failed: User notified which worker failed, error message shown, manual invocation recommended, partial progress listed\n\n**Output:** Complete documentation system (`AGENTS.md` canonical + `CLAUDE.md` `@AGENTS.md` import stub + docs\u002F with README.md, documentation_standards.md, principles.md + optionally tests\u002F) with global cleanup (no duplicates, orphaned files reported, consolidated knowledge, validated cross-links)\n\n---\n\n**Version:** 8.1.0\n**Last Updated:** 2025-01-12\n","> **Paths:** File paths (`shared\u002F`, `references\u002F`, `..\u002Fln-*`) 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\u002F` is missing, fetch files via WebFetch from `https:\u002F\u002Fraw.githubusercontent.com\u002Flevnikolaevich\u002Fclaude-code-skills\u002Fmaster\u002Fskills\u002F{path}`.\n\n**Type:** L1 Top Orchestrator\n**Category:** 1XX Documentation Pipeline\n\n# Documentation Pipeline (Orchestrator)\n\nThis skill orchestrates the creation of a complete documentation system by invoking one L2 coordinator plus 3 L2 workers. The coordinator (ln-110) delegates to 5 L3 workers for project docs; other L2 workers handle reference, tasks, and test domains. Each component validates its own output, and the orchestrator owns the final docs-quality acceptance gate.\n\n## Purpose\n\nTop-level orchestrator that creates a complete project documentation system in one invocation. Chains ln-110 coordinator + ln-120\u002F130\u002F140 workers sequentially, then runs global cleanup (deduplication, orphan reporting, cross-link validation).\n\n## Runtime Contract\n\n**MANDATORY READ:** Load `shared\u002Freferences\u002Fcoordinator_runtime_contract.md`, `shared\u002Freferences\u002Fdocs_pipeline_runtime_contract.md`, `shared\u002Freferences\u002Fdocs_generation_summary_contract.md`\n\nRuntime family: `docs-pipeline-runtime`\n\nIdentifier:\n- `docs-pipeline`\n\nPhases:\n1. `PHASE_0_CONFIG`\n2. `PHASE_1_LEGACY_SCAN`\n3. `PHASE_2_CONFIRMATION`\n4. `PHASE_3_DELEGATE`\n5. `PHASE_4_QUALITY_GATE`\n6. `PHASE_5_CLEANUP`\n7. `PHASE_6_SELF_CHECK`\n\nComponent summary contract:\n- `ln-110`, `ln-120`, `ln-130`, `ln-140` write or return `docs-generation` envelopes\n- `ln-100` consumes those summaries plus docs-quality checkpoints as orchestration SSOT\n\n## Architecture\n\n```\nln-100-documents-pipeline (L1 Top Orchestrator - this skill)\n|- ln-110-project-docs-coordinator (L2 Coordinator)\n|  |- ln-111-root-docs-creator (L3 Worker) -> 5 docs\n|  |- ln-112-project-core-creator (L3 Worker) -> 3 docs\n|  |- ln-113-backend-docs-creator (L3 Worker) -> 2 conditional\n|  |- ln-114-frontend-docs-creator (L3 Worker) -> 1 conditional\n|  `- ln-115-devops-docs-creator (L3 Worker) -> 1 always + 1 conditional\n|- ln-120-reference-docs-creator (L2 Worker)\n|- ln-130-tasks-docs-creator (L2 Worker)\n`- ln-140-test-docs-creator (L2 Worker - optional)\n```\n\n## When to Use This Skill\n\nThis skill should be used when:\n- Start a new IT project and need complete documentation system at once\n- Use automated workflow instead of manually invoking multiple workers\n- Create entire documentation structure (`AGENTS.md` canonical + `CLAUDE.md` import stub -> `docs\u002F`) in one go\n- Prefer orchestrated CREATE path over manual skill chaining\n- Need automatic global cleanup (deduplication, orphaned files, consolidation)\n\n**Alternative**: If you prefer granular control, invoke workers manually:\n1. [ln-110-project-docs-coordinator](..\u002Fln-110-project-docs-coordinator\u002FSKILL.md) - Root + Project docs (coordinates 5 L3 workers)\n2. [ln-120-reference-docs-creator](..\u002Fln-120-reference-docs-creator\u002FSKILL.md) - reference\u002F structure\n3. [ln-130-tasks-docs-creator](..\u002Fln-130-tasks-docs-creator\u002FSKILL.md) - tasks\u002FREADME.md + kanban\n4. [ln-140-test-docs-creator](..\u002Fln-140-test-docs-creator\u002FSKILL.md) - tests\u002FREADME.md (optional)\n\n**MANDATORY READ:** Load `shared\u002Freferences\u002Fdocs_quality_contract.md`.\n\n**Note**: Each worker validates its own local output in Phase 2\u002F3. The orchestrator still owns the final docs-quality manifest, verification, and repair loop before cleanup can continue.\n\n## Workflow\n\nThe skill follows a 5-phase orchestration workflow: **Legacy Migration (optional)** -> User confirmation -> Invoke coordinator + workers sequentially -> Global cleanup -> Summary.\n\n---\n\n### Phase 0: Source Documentation Cleanup (OPTIONAL)\n\n**Objective**: Detect non-canonical documentation, normalize any useful facts, and remove duplicate documentation paths before generation.\n\n**Trigger**: Runs at pipeline start when the repo already contains documentation outside the canonical layout.\n\n**Process**:\n\n**0a. Non-Canonical Source Detection**:\n- Scan project for non-standard documentation using patterns from `references\u002Flegacy_detection_patterns.md`:\n  - **Root .md files**: `ARCHITECTURE.md`, `REQUIREMENTS.md`, `STACK.md`, `API.md`, `DATABASE.md`, `DEPLOYMENT.md`\n  - **Non-canonical folders**: `documentation\u002F`, `doc\u002F`, `wiki\u002F`, or `docs\u002F` with wrong structure\n  - **README.md sections**: `## Architecture`, `## Tech Stack`, `## Requirements`, etc.\n  - **CONTRIBUTING.md sections**: `## Development`, `## Code Style`, `## Coding Standards`\n- Build `source_manifest`: list of { path, detected_type, target_doc, confidence }\n- If no non-canonical docs are found -> skip to Phase 1\n\n**0b. Fact Extraction**:\n- For each detected source file:\n  - Parse markdown structure (headers, lists, code blocks)\n  - Apply type-specific extractor (**MANDATORY READ:** Load `references\u002Flegacy_detection_patterns.md`):\n    - `architecture_extractor` -> { layers[], components[], diagrams[] }\n    - `requirements_extractor` -> { functional[], non_functional[] }\n    - `tech_stack_extractor` -> { frontend, backend, database, versions }\n    - `principles_extractor` -> { principles[], anti_patterns[] }\n    - `api_spec_extractor` -> { endpoints[], authentication }\n    - `database_schema_extractor` -> { tables[], relationships[] }\n    - `runbook_extractor` -> { prerequisites[], install_steps[], env_vars[] }\n    - `infrastructure_extractor` -> { servers[], domains[], ports[], services[], artifacts{}, cicd{} }\n  - Score content quality (0.0-1.0)\n- Store results in `source_notes`\n\n**0c. User Confirmation**:\n- Display detected non-canonical files:\n  ```\n  Non-Canonical Documentation Detected:\n\n  | File | Type | Confidence | Target |\n  |------|------|------------|--------|\n  | README.md (## Architecture) | architecture | HIGH | docs\u002Fproject\u002Farchitecture.md |\n  | docs\u002FARCHITECTURE.md | architecture | HIGH | docs\u002Fproject\u002Farchitecture.md |\n  | CONTRIBUTING.md (## Development) | principles | MEDIUM | docs\u002Fprinciples.md |\n\n  Cleanup Options:\n  1. NORMALIZE (recommended): Extract facts -> Archive -> Remove duplicate sources\n  2. ARCHIVE ONLY: Backup without extraction\n  3. SKIP: Leave non-canonical docs as-is (may cause duplication)\n\n  Choose option (1\u002F2\u002F3): _\n  ```\n- If user selects \"1\" (NORMALIZE):\n  - Optional: \"Review extracted facts before folding them into the canonical context? (yes\u002Fno)\"\n  - Confirm: \"Proceed with cleanup and archive non-canonical files?\"\n- If user selects \"2\" (ARCHIVE ONLY):\n  - Confirm: \"Archive non-canonical files to .archive\u002F? Content will NOT be normalized.\"\n- If user selects \"3\" (SKIP):\n  - Warn: \"Non-canonical files will remain. This may cause duplication issues.\"\n  - Proceed to Phase 1\n\n**0d. Backup and Archive**:\n- Create `.archive\u002Fsource-docs-{timestamp}\u002F` directory\n- Structure:\n  ```\n  .archive\u002F\n  `- source-docs-YYYY-MM-DD-HHMMSS\u002F\n      |- README_cleanup.md          # Rollback instructions\n      |- original\u002F                  # Exact copies of non-canonical files\n      |  |- README.md\n      |  |- ARCHITECTURE.md\n      |  `- documentation\u002F\n      `- extracted\u002F                 # Extracted facts (for reference)\n          |- architecture_content.md\n          `- principles_content.md\n  ```\n- Copy all detected source files to `original\u002F`\n- Save extracted facts to `extracted\u002F`\n- Generate `README_cleanup.md` with rollback instructions\n\n**0e. Context Normalization**:\n- Build `SOURCE_DOC_NOTES` from extracted facts:\n  ```json\n  {\n    \"SOURCE_DOC_NOTES\": {\n      \"architecture_notes\": { \"sections\": [...], \"diagrams\": [...] },\n      \"requirements_notes\": { \"functional\": [...] },\n      \"principles_notes\": { \"principles\": [...] },\n      \"tech_stack_notes\": { \"frontend\": \"...\", \"backend\": \"...\" },\n      \"api_notes\": { \"endpoints\": [...] },\n      \"database_notes\": { \"tables\": [...] },\n      \"runbook_notes\": { \"install_steps\": [...] },\n      \"infrastructure_notes\": { \"servers\": [...], \"domains\": [...], \"ports\": {} }\n    }\n  }\n  ```\n- Merge extracted facts into the coordinator input as supporting evidence only\n- Workers consume normalized context fields and current source facts directly; there is no legacy-only branch\n- Priority order: **Current source facts + normalized project documentation > template defaults**\n\n**0f. Cleanup (Non-Canonical Files)**:\n- For root-level files (README.md, CONTRIBUTING.md):\n  - Do NOT delete\n  - Remove duplicated sections using Edit tool\n  - Add links to new locations:\n    - `## Architecture` -> replace with link: `[Architecture](docs\u002Fproject\u002Farchitecture.md)`\n    - `## Tech Stack` -> replace with link: `[Tech Stack](docs\u002Fproject\u002Ftech_stack.md)`\n- For standalone non-canonical files (ARCHITECTURE.md, documentation\u002F):\n  - Delete files (already backed up)\n  - Log: \"Deleted: ARCHITECTURE.md (migrated to docs\u002Fproject\u002Farchitecture.md)\"\n- Clean empty non-canonical directories\n\n**Output**: `cleanup_summary` { normalized_count, archived_count, skipped_count, source_doc_notes }\n\n### Phase 1: User Confirmation\n\n**Objective**: Check existing files, explain workflow, and get user approval.\n\n**Process**:\n\n0. **Cleanup Summary** (if Phase 0 ran):\n   - Show: \"Normalized {N} non-canonical documents\"\n   - Show: \"Archived to .archive\u002Fsource-docs-{date}\u002F\"\n   - Show: \"Coordinator input enriched with normalized source notes\"\n\n1. **Pre-flight Check** (scan existing documentation):\n   - Use Glob tool to check all potential files:\n    - **Root docs**: `AGENTS.md`, `CLAUDE.md`, `docs\u002FREADME.md`, `docs\u002Fdocumentation_standards.md`, `docs\u002Fprinciples.md`\n     - **Reference structure** (5 items): `docs\u002Freference\u002FREADME.md`, `docs\u002Freference\u002Fadrs\u002F`, `docs\u002Freference\u002Fguides\u002F`, `docs\u002Freference\u002Fmanuals\u002F`, `docs\u002Freference\u002Fresearch\u002F`\n     - **Tasks docs** (2 files): `docs\u002Ftasks\u002FREADME.md`, `docs\u002Ftasks\u002Fkanban_board.md`\n     - **Project docs** (up to 8 files): `docs\u002Fproject\u002Frequirements.md`, `architecture.md`, `tech_stack.md`, `api_spec.md`, `database_schema.md`, `design_guidelines.md`, `infrastructure.md`, `runbook.md`\n     - **Test docs** (2 files): `docs\u002Freference\u002Fguides\u002Ftesting-strategy.md`, `tests\u002FREADME.md`\n   - Count existing vs missing files\n   - Show user summary:\n     ```\n     Documentation Status:\n     Found: X existing files\n     Missing: Y files\n\n     Pipeline will create ONLY missing files.\n     Existing files will be preserved (no overwrites).\n     ```\n\n2. Show user what will be created:\n   - Root + Project documentation (`AGENTS.md` canonical + `CLAUDE.md` import stub + `docs\u002FREADME.md` + `documentation_standards.md` + `principles.md` + `docs\u002Fproject\u002F` via ln-110-project-docs-coordinator)\n   - Reference structure (docs\u002Freference\u002F via ln-120-reference-docs-creator)\n   - Task management docs (docs\u002Ftasks\u002F via ln-130-tasks-docs-creator)\n   - Test documentation (tests\u002F via ln-140-test-docs-creator - optional)\n   - Estimated time: 15-20 minutes with interactive dialog\n\n3. Ask: \"Proceed with creating missing files? (yes\u002Fno)\"\n\n4. Ask: \"Include test documentation (tests\u002FREADME.md)? (yes\u002Fno)\"\n\n**Output**: File scan summary + user approval + test docs preference\n\n---\n\n### Phase 2: Invoke Coordinator + Workers Sequentially\n\n**Objective**: Create complete documentation system by invoking L2 coordinator + 4 L2 workers in order.\n\n**Process** (AUTOMATIC invocations with Skill tool):\n\n**2a. Create Root + Project Documentation**:\n- **Invocation**: `Skill(skill: \"ln-110-project-docs-coordinator\")` -> AUTOMATIC\n- **Input**: Pass normalized source notes from Phase 0 when cleanup was performed\n- **Behavior**: Coordinator gathers context ONCE, then delegates to 5 L3 workers:\n  - ln-111-root-docs-creator -> root docs (AGENTS.md canonical + CLAUDE.md stub + docs\u002FREADME.md + documentation_standards.md + principles.md)\n  - ln-112-project-core-creator -> 3 core docs\n  - ln-113-backend-docs-creator -> 2 conditional\n  - ln-114-frontend-docs-creator -> 1 conditional (if hasFrontend)\n  - ln-115-devops-docs-creator -> 2 docs: 1 always + 1 conditional\n- **Output**: Root docs (`AGENTS.md` canonical + `CLAUDE.md` `@AGENTS.md` import stub + `docs\u002FREADME.md` + `docs\u002Fdocumentation_standards.md` + `docs\u002Fprinciples.md`) + Project docs (`docs\u002Fproject\u002Frequirements.md`, `architecture.md`, `tech_stack.md`, `infrastructure.md` + conditional: `api_spec.md`, `database_schema.md`, `design_guidelines.md`, `runbook.md`)\n- **Store**: Save `context_store` from ln-110 result (contains TECH_STACK for ln-120)\n- **Validation**: Each L3 worker validates output (SCOPE, metadata markers, top sections, Maintenance)\n- **Verify**: All documents exist before continuing\n\n**2b. Create Reference Structure + Smart Documents**:\n- **Invocation**: `Skill(skill: \"ln-120-reference-docs-creator\")` -> AUTOMATIC\n- **Input**: Pass `context_store` from ln-110 (TECH_STACK enables smart document creation)\n- **Output**: `docs\u002Freference\u002FREADME.md` + `adrs\u002F`, `guides\u002F`, `manuals\u002F`, `research\u002F` directories + **justified ADRs\u002FGuides\u002FManuals**\n- **Smart Creation**: Creates documents only for nontrivial technology choices (see ln-120 justification rules)\n- **Validation**: ln-120 validates output in Phase 2\u002F3\n- **Verify**: Reference hub exists before continuing\n\n**2c. Create Task Management Docs**:\n- **Invocation**: `Skill(skill: \"ln-130-tasks-docs-creator\")` -> AUTOMATIC\n- **Output**: `docs\u002Ftasks\u002FREADME.md` + optionally `kanban_board.md` (if user provides Linear config)\n- **Validation**: ln-130 validates output in Phase 2\u002F3\n- **Verify**: Tasks README exists before continuing\n\n**2d. Create Test Documentation (Optional)**:\n- **Condition**: If user approved test docs in Phase 1\n- **Invocation**: `Skill(skill: \"ln-140-test-docs-creator\")` -> AUTOMATIC\n- **Output**: `tests\u002FREADME.md` (test documentation with Story-Level Test Task Pattern)\n- **Validation**: ln-140 validates output in Phase 2\u002F3\n- **Skip**: If \"no\" -> can run ln-140-test-docs-creator later manually\n\n**2e. Extract Skills from Documentation (Optional)**:\n- **Condition**: User approved skill extraction in Phase 1, or invoked manually later\n- **Invocation**: `Skill(skill: \"ln-160-docs-skill-extractor\")` -> AUTOMATIC\n- **Input**: All docs created by ln-110 through ln-140\n- **Output**: `.claude\u002Fcommands\u002F*.md` files extracted from procedural documentation sections\n- **Skip**: If not approved -> can run ln-160-docs-skill-extractor later manually\n\n**Output**: Complete documentation system with coordinator + 4 workers completed and validated\n\n## Worker Invocation (MANDATORY)\n\n## TodoWrite format (mandatory)\nAdd ALL invocations to todos before starting:\n```\n- Invoke ln-110-project-docs-coordinator (pending)\n- Invoke ln-120-reference-docs-creator (pending)\n- Invoke ln-130-tasks-docs-creator (pending)\n- Invoke ln-140-test-docs-creator (pending)\n- Run Global Cleanup (Phase 3) (pending)\n- Show Summary (Phase 4) (pending)\n```\nMark each as in_progress when starting, completed when worker returns success.\n\n---\n\n### Phase 3: Global Cleanup and Consolidation\n\n**Objective**: Remove duplicates, orphaned files, consolidate knowledge across ALL documentation.\n\n**Trigger**: Only after ALL workers complete Phase 2\u002F3 validation.\n\n**Process**:\n\n**3a. Build docs-quality manifest**\n\nCreate one normalized manifest from worker outputs before any cleanup:\n\n1. Collect `created_files`, `skipped_files`, and `quality_inputs` from ln-110, ln-120, ln-130, and ln-140\n2. Merge `quality_inputs.doc_paths` and `quality_inputs.owners`, deduplicate paths, and fail fast if any worker omitted the normalized return contract\n3. Write the explicit manifest with the shared verifier:\n   ```bash\n   node {skills_repo_root}\u002Fskills-catalog\u002Fshared\u002Fscripts\u002Fdocs-quality\u002Fcli.mjs manifest \\\n     --project-root . \\\n    --files \"AGENTS.md,CLAUDE.md,docs\u002FREADME.md,docs\u002Fproject\u002Frequirements.md\" \\\n     --output docs\u002Fproject\u002F.audit\u002Fln-100\u002Fdocs-quality-manifest.json\n   ```\n4. Keep the manifest as the Single Source of Truth for all Phase 3 quality decisions\n\n**3b. Run centralized docs-quality verifier**\n\nRun the shared verifier against the manifest:\n\n```bash\nnode {skills_repo_root}\u002Fskills-catalog\u002Fshared\u002Fscripts\u002Fdocs-quality\u002Fcli.mjs verify \\\n  --project-root . \\\n  --manifest docs\u002Fproject\u002F.audit\u002Fln-100\u002Fdocs-quality-manifest.json \\\n  --output docs\u002Fproject\u002F.audit\u002Fln-100\u002Fdocs-quality-report.json\n```\n\nVerifier checks come from the shared docs-quality contract\u002Frules and include:\n- SCOPE tags in required docs\n- Maintenance section + markers\n- Forbidden placeholders and leaked template metadata\n- Broken internal links\n- Disallowed code fences\n- Stale inline dates\n- Non-official stack documentation links\n\n**Gate:** No HIGH\u002FCRITICAL findings may remain before Phase 3 cleanup proceeds.\n\n**3c. Bounded repair loop**\n\nIf verifier reports HIGH\u002FCRITICAL findings:\n\n1. **Pass 1 - deterministic inline fixes**:\n   - Add missing SCOPE tags\n   - Add or complete `## Maintenance`\n   - Normalize broken internal links when target is obvious\n   - Refresh stale generated dates\n   - Remove leaked template metadata and unresolved markers\n   - Replace illegal fenced code with tables, commands, or links\n2. **Pass 2 - owner-scoped semantic repair**:\n   - Group remaining findings by `quality_inputs.owners[path]`\n   - Re-invoke only the owning worker with the scoped findings for its files\n   - Do not rerun unrelated workers\n3. Re-run the verifier after each repair pass\n4. Stop after 2 repair iterations total\n5. If any HIGH\u002FCRITICAL findings remain, fail the pipeline instead of emitting low-quality docs\n\nRecord the verifier summary and doc-registry output in the Phase 5 final output.\n\n**3d. Scan for duplicate content**\n\n1. **Read all .md files in docs\u002F**\n   - Use Glob tool: `pattern: \"docs\u002F**\u002F*.md\"`\n   - Store list of all documentation files\n\n2. **Identify duplicate sections:**\n   - For each file:\n     - Read file content\n     - Extract section headers (##, ###)\n     - Extract section content (text between headers)\n   - Compare sections across files:\n     - If 2+ sections have:\n       - Same heading (case-insensitive)\n       - >80% content similarity (simple word overlap check)\n     - Mark as duplicate\n\n3. **Determine canonical version:**\n   - Rules for canonical location:\n     - \"Development Principles\" -> principles.md (always canonical)\n     - \"Testing Strategy\" -> testing-strategy.md (always canonical)\n     - \"Linear Configuration\" -> tasks\u002Fkanban_board.md (always canonical)\n     - For other duplicates: Keep in FIRST file encountered (alphabetical order)\n\n4. **Remove duplicates:**\n   - For each duplicate section:\n     - Use Edit tool to delete from non-canonical files\n     - Use Edit tool to add link to canonical location:\n       ```markdown\n       Canonical source: [Development Principles](..\u002Fprinciples.md#development-principles)\n       ```\n   - Track count of removed duplicates\n\n5. **Log results:**\n   - \"Removed {count} duplicate sections\"\n   - List: \"{section_name} removed from {file} (canonical: {canonical_file})\"\n\n**3e. Report unexpected files (advisory)**\n\n1. **List all .md files in docs\u002F**\n   - Use Glob tool: `pattern: \"docs\u002F**\u002F*.md\"`\n\n2. **Check against expected structure** (files created by workers + user-created reference docs)\n\n3. **Report findings (DO NOT move\u002Fdelete\u002Farchive):**\n   - List unexpected files with advisory message\n   - User decides what to do with them\n   - Log: \"{count} unexpected files found (not in expected structure) -> listed for user review\"\n\n**3f. Consolidate knowledge**\n\n1. **Identify scattered information:**\n   - Known patterns:\n     - Linear config scattered: kanban_board.md + tasks\u002FREADME.md\n     - Development principles scattered: AGENTS.md + principles.md + architecture.md\n     - Testing info scattered: testing-strategy.md + tests\u002FREADME.md + architecture.md\n\n2. **For each scattered concept:**\n   - Determine Single Source of Truth (SSoT):\n     - Linear config -> kanban_board.md\n     - Development principles -> principles.md\n     - Testing strategy -> testing-strategy.md\n\n3. **Update non-SSoT files:**\n   - Use Edit tool to replace duplicate content with link:\n     ```markdown\n     Canonical source: [Linear Configuration](..\u002Ftasks\u002Fkanban_board.md#linear-configuration)\n     ```\n   - Track consolidation count\n\n4. **Log results:**\n   - \"Consolidated {count} scattered concepts\"\n   - List: \"{concept} consolidated to {SSoT_file}\"\n\n**3g. Cross-link validation**\n\n1. **Scan all .md files for internal links:**\n   - For each file:\n     - Read content\n     - Extract all markdown links: `[text](path)`\n     - Filter internal links (relative paths, not http:\u002F\u002F)\n\n2. **Verify link targets exist:**\n   - For each link:\n     - Resolve relative path\n     - Check if target file exists (Glob tool)\n     - If missing: Mark as broken\n\n3. **Fix broken links:**\n   - For each broken link:\n     - If target was archived: Update link to archive path\n     - If target never existed: Remove link (convert to plain text)\n   - Track fix count\n\n4. **Add missing critical links:**\n   - **AGENTS.md -> docs\u002FREADME.md:**\n     - Read AGENTS.md\n     - Check for link to docs\u002FREADME.md\n     - If missing: Add in \"Documentation Hub\" section\n   - **docs\u002FREADME.md -> section READMEs:**\n     - Check for links to project\u002F, reference\u002F, tasks\u002F, tests\u002F READMEs\n     - If missing: Add\n   - Track added links count\n\n5. **Log results:**\n   - \"Fixed {count} broken links\"\n   - \"Added {count} missing critical links\"\n   - List changes\n\n**3h. Final report**\n\n```\nGlobal Cleanup Complete:\n\nStructure:\n- Removed {N} duplicate sections (canonical: principles.md)\n- Found {N} unexpected files (listed for user review)\n- Consolidated {N} scattered concepts\n\nLinks:\n- Fixed {N} broken links\n- Added {N} missing critical links:\n  - list of added links\n```\n\n**Output**: All documentation cleaned up, duplicates removed, unexpected files reported, knowledge consolidated, cross-links validated\n\n---\n\n### Phase 4: Summary and Next Steps\n\n**Objective**: Provide complete overview of created system.\n\n**Process**:\n1. List all created files with sizes:\n   - `AGENTS.md` (canonical project entry point)\n   - `CLAUDE.md` (`@AGENTS.md` import stub for Claude Code)\n   - `docs\u002FREADME.md` (root documentation hub)\n   - `docs\u002Fdocumentation_standards.md` (60 universal requirements)\n   - `docs\u002Fprinciples.md` (11 development principles)\n   - `docs\u002Fproject\u002Frequirements.md`, `architecture.md`, `tech_stack.md` + conditional documents (3-7 total)\n   - `docs\u002Freference\u002FREADME.md` (reference hub with empty adrs\u002F, guides\u002F, manuals\u002F, research\u002F directories)\n   - `docs\u002Ftasks\u002FREADME.md` + optionally `kanban_board.md`\n   - `tests\u002FREADME.md` (if created)\n\n2. Show documentation system features:\n   - SCOPE tags (document boundaries defined)\n   - Maintenance sections (update triggers + verification)\n   - README hub (central navigation)\n   - DAG structure (Directed Acyclic Graph navigation)\n   - Living documentation ready\n   - Deduplicated content (canonical sources only)\n   - Validated cross-links (no broken links)\n\n3. Recommend next steps:\n   - \"Review generated documentation (AGENTS.md canonical + CLAUDE.md stub -> docs\u002F)\"\n   - \"Run ln-210-epic-coordinator to decompose scope into Epics\"\n   - \"Share documentation with technical stakeholders\"\n\n4. Summarize the docs-quality gate:\n   - `Verifier score: X\u002F10`\n   - `Repair passes used: 0-2`\n   - `Remaining warnings: list LOW\u002FMEDIUM only`\n\n**Output**: Summary message with file list, verifier status, and recommendations\n\n---\n\n## Complete Output Structure\n\n```\nproject_root\u002F\n|- AGENTS.md                         # Canonical project entry point (map-first root)\n|- CLAUDE.md                         # Derived Anthropic entrypoint\n|- docs\u002F\n|  |- README.md                     # Root documentation hub (general standards)\n|  |- documentation_standards.md    # 60 universal requirements (Claude Code + industry standards)\n|  |- principles.md                 # 11 development principles (Standards First, YAGNI, KISS, DRY, etc.)\n|  |- project\u002F\n|  |  |- requirements.md           # Functional Requirements (NO NFR per project policy)\n|  |  |- architecture.md           # arc42-based architecture with C4 Model\n|  |  |- tech_stack.md             # Technology versions, Docker config\n|  |  |- api_spec.md               # API endpoints (conditional)\n|  |  |- database_schema.md        # Database schema (conditional)\n|  |  |- design_guidelines.md      # UI\u002FUX system (conditional)\n|  |  |- infrastructure.md         # Infrastructure inventory (always)\n|  |  `- runbook.md                # Operations guide (conditional)\n|  |- reference\u002F\n|  |  |- README.md                 # Reference documentation hub (registries)\n|  |  |- adrs\u002F                     # Empty, ready for ADRs\n|  |  |- guides\u002F                   # Empty, ready for guides\n|  |  |- manuals\u002F                  # Empty, ready for manuals\n|  |  `- research\u002F                 # Empty, ready for research\n|  |- tasks\u002F\n|  |  |- README.md                 # Task management system rules\n|  |  `- kanban_board.md           # Linear integration (optional)\n`- tests\u002F\n   `- README.md                    # Test documentation (optional)\n```\n\n---\n\n## Integration with Project Workflow\n\n**Recommended workflow for new projects:**\n\n1. **ln-100-documents-pipeline** (this skill) - Create complete documentation system\n2. **ln-210-epic-coordinator** - Decompose scope into Epics (Linear Projects)\n3. **ln-220-story-coordinator** - Create User Stories for each Epic (automatic decomposition + replan)\n4. **ln-300-task-coordinator** - Break down Stories into implementation tasks (automatic decomposition + replan)\n5. **ln-310-multi-agent-validator** - Verify Stories before development\n6. **ln-400-story-executor** - Orchestrate Story implementation\n7. **Story quality gate** - Review completed Stories\n\n---\n\n## Trade-offs\n\n**Trade-offs:**\n- Less granular control (can't skip coordinator phases)\n- Longer execution time (15-20 minutes)\n- Global cleanup runs even if only one file was created\n\n**When to use manual approach instead:**\n- Need one specific ADR\u002Fguide\u002Fmanual -> use shared\u002Ftemplates\u002F + shared\u002Freferences\u002Fdocumentation_creation.md\n\n---\n\n## Documentation Standards\n\nAll documents created by this pipeline MUST follow these rules:\n\n| Rule | Description | Enforcement |\n|------|-------------|-------------|\n| **NO_CODE Rule** | Documents describe contracts, not implementations | No code blocks >5 lines; use tables\u002FASCII\u002Flinks |\n| **Stack Adaptation** | Links must match project TECH_STACK | .NET -> Microsoft docs, JS -> MDN |\n| **Format Priority** | Tables\u002FASCII > Lists (enumerations only) > Text | Tables for params, config, alternatives |\n\nThese standards are enforced by L3 workers (ln-111-115), ln-120\u002F130\u002F140, and the shared docs-quality gate.\n\n---\n\n## Error Handling\n\nIf any invoked skill fails:\n1. Notify user which skill failed\n2. Show error message from failed skill\n3. Recommend manual invocation for debugging\n4. List already completed steps (partial progress)\n\n---\n\n## Technical Implementation Notes\n\n**Skill Invocation:**\n- Uses **Skill tool** with command parameter\n- Waits for each skill to complete before proceeding\n- Verifies output files exist before moving to next phase\n\n**File Verification:**\n- Uses **Glob** tool to check docs\u002Fproject\u002F structure\n- Lists file sizes for user confirmation\n- Warns if expected files missing\n\n**Global Cleanup:**\n- Uses **Glob** tool to find all .md files\n- Uses **Read** tool to analyze content\n- Uses **Edit** tool to remove duplicates and add links\n- Reports unexpected files (advisory, no auto-archive)\n\n**Docs-Quality Gate:**\n- Uses `shared\u002Fscripts\u002Fdocs-quality\u002Fcli.mjs` to build a manifest from worker outputs\n- Uses the shared verifier before cleanup and again after repair passes\n- Fails fast on unresolved HIGH\u002FCRITICAL findings instead of emitting low-quality documentation\n\n**Standards Compliance:**\n- All output follows same standards as underlying skills\n- ISO\u002FIEC\u002FIEEE 29148:2018 (Requirements)\n- ISO\u002FIEC\u002FIEEE 42010:2022 (Architecture)\n- arc42 + C4 Model + Michael Nygard's ADR Format\n\n---\n\n## Critical Rules\n\n- **Idempotent:** Creates only missing files; existing files are preserved without overwrite\n- **Sequential invocation:** Workers must be invoked in order (ln-110 -> ln-120 -> ln-130 -> ln-140); each verified before next\n- **Docs-quality gate mandatory:** Phase 3 must build manifest -> run verifier -> execute bounded repair loop before cleanup continues\n- **Global cleanup mandatory:** Phase 3 (deduplication, orphan reporting, SSoT consolidation, cross-link validation) runs only after docs-quality gate passes\n- **User confirmation required:** Pre-flight check and explicit approval before any file creation\n- **NO_CODE Rule:** All generated documents use tables\u002FASCII\u002Flinks; no code blocks >5 lines\n\n## Phase 5: Meta-Analysis\n\n**MANDATORY READ:** Load `shared\u002Freferences\u002Fmeta_analysis_protocol.md`\n\nSkill type: `planning-coordinator`. Run after all phases complete. Output to chat using the `planning-coordinator` format.\n\n## Reference Files\n\n- Non-canonical source patterns: `references\u002Flegacy_detection_patterns.md`\n- Worker skills: `ln-110-project-docs-coordinator`, `ln-120-reference-docs-creator`, `ln-130-tasks-docs-creator`, `ln-140-test-docs-creator`\n- Shared docs-quality contract: `shared\u002Freferences\u002Fdocs_quality_contract.md`\n- Shared verifier CLI: `shared\u002Fscripts\u002Fdocs-quality\u002Fcli.mjs`\n\n## Definition of Done\n\nBefore completing work, verify ALL checkpoints:\n\n**Source Cleanup (Phase 0 - if applicable):**\n- [ ] Non-canonical documentation patterns applied (Glob + Grep)\n- [ ] Source manifest built: { path, type, confidence, target }\n- [ ] User selected cleanup option (NORMALIZE \u002F ARCHIVE \u002F SKIP)\n- [ ] If NORMALIZE: facts extracted using type-specific extractors\n- [ ] Backup created: `.archive\u002Fsource-docs-{timestamp}\u002Foriginal\u002F`\n- [ ] Extracted facts saved: `.archive\u002Fsource-docs-{timestamp}\u002Fextracted\u002F`\n- [ ] README_cleanup.md generated with rollback instructions\n- [ ] SOURCE_DOC_NOTES prepared for coordinator input\n- [ ] Non-canonical files cleaned up (sections removed from README.md, standalone files deleted)\n\n**User Confirmation (Phase 1):**\n- [ ] Migration summary shown (if Phase 0 ran)\n- [ ] Workflow explained to user (coordinator + 4 workers: ln-110 -> ln-120 -> ln-130 -> ln-140)\n- [ ] User approved: \"Proceed with complete documentation system creation? (yes\u002Fno)\"\n- [ ] Test docs preference captured: \"Include test documentation? (yes\u002Fno)\"\n\n**Coordinator + Workers Invoked Sequentially (Phase 2):**\n- [ ] ln-110-project-docs-coordinator invoked -> Output verified: Root docs (`AGENTS.md` + `CLAUDE.md` + `docs\u002FREADME.md` + `docs\u002Fdocumentation_standards.md` + `docs\u002Fprinciples.md`) + Project docs (`docs\u002Fproject\u002Frequirements.md`, `architecture.md`, `tech_stack.md` + conditional files)\n- [ ] ln-120-reference-docs-creator invoked -> Output verified: `docs\u002Freference\u002FREADME.md` + directories (adrs\u002F, guides\u002F, manuals\u002F, research\u002F) + justified ADRs\u002FGuides\u002FManuals based on TECH_STACK\n- [ ] ln-130-tasks-docs-creator invoked -> Output verified: `docs\u002Ftasks\u002FREADME.md` + optionally `kanban_board.md`\n- [ ] ln-140-test-docs-creator invoked (if enabled) -> Output verified: `tests\u002FREADME.md`\n- [ ] Each component validated its own output (SCOPE, metadata markers, top sections, Maintenance, POSIX compliance)\n- [ ] Each worker returned normalized `created_files`, `skipped_files`, `quality_inputs`, and `validation_status`\n\n**File Verification Complete:**\n- [ ] All expected files exist (Glob tool used to verify structure)\n- [ ] File sizes listed for user confirmation\n- [ ] Warning displayed if expected files missing\n\n**Global Cleanup Complete (Phase 3):**\n- [ ] 3a: Manifest built from normalized worker outputs\n- [ ] 3b: Shared verifier executed against the manifest\n- [ ] 3c: Bounded repair loop completed; no HIGH\u002FCRITICAL findings remain\n- [ ] 3d: Duplicate sections identified and removed (>80% similarity)\n- [ ] 3d: Links added to canonical locations (principles.md, testing-strategy.md, kanban_board.md)\n- [ ] 3e: Unexpected files reported (advisory, no auto-archive)\n- [ ] 3f: Scattered concepts consolidated to Single Source of Truth (SSoT)\n- [ ] 3g: Internal links validated (broken links fixed, critical links added)\n- [ ] 3h: Final report generated (quality gate summary, counts, lists, actions)\n\n**Summary Displayed (Phase 4):**\n- [ ] All created files listed with sizes\n- [ ] Documentation system features highlighted (SCOPE, metadata markers, Quick Navigation, Agent Entry, Maintenance, README hubs, DAG structure, deduplicated content, validated links)\n- [ ] Docs-quality verifier summary shown (score, repair passes, remaining LOW\u002FMEDIUM warnings)\n- [ ] Next steps recommended (ln-210-epic-coordinator)\n\n**Error Handling (if applicable):**\n- [ ] If any worker failed: User notified which worker failed, error message shown, manual invocation recommended, partial progress listed\n\n**Output:** Complete documentation system (`AGENTS.md` canonical + `CLAUDE.md` `@AGENTS.md` import stub + docs\u002F with README.md, documentation_standards.md, principles.md + optionally tests\u002F) with global cleanup (no duplicates, orphaned files reported, consolidated knowledge, validated cross-links)\n\n---\n\n**Version:** 8.1.0\n**Last Updated:** 2025-01-12\n",{"name":5,"license":14,"description":7},"main","7bf2279c8a65758319526a721d5c4b75683aec9c","skills\u002Flevn-ln-100-documents-pipeline",3,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections","https:\u002F\u002Fgithub.com\u002Fboisenoise","2026-11-11 14:20:43",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add boisenoise\u002Fskills-collections --skill ln-100-documents-pipeline",{"tool":56,"command":57},"bunx","bunx skills add boisenoise\u002Fskills-collections --skill ln-100-documents-pipeline",{"tool":59,"command":60},"pnpm","pnpm dlx skills add boisenoise\u002Fskills-collections --skill ln-100-documents-pipeline","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Flevn-ln-100-documents-pipeline\u002FSKILL.md",true,[64],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"references\u002Flegacy_detection_patterns.md","REFERENCE","参考文档",12099,"https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Flevn-ln-100-documents-pipeline\u002Freferences\u002Flegacy_detection_patterns.md",[71,100,127,153,172,195],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":75,"licenseFileUrl":76,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":38},"01M6WNH92BHVFXHGPDZCPJ0AG0","web-access","Use Treg for public web or platform data only when existing search, browser and connected tools cannot cover the task, with explicit cost and data boundaries.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-web-access\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-web-access\u002FSKILL.md",[],[80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,24,99],"web","access","web access","official","development","browser","search","data","Tools","read","fetch","only","youtube","free tools","platform","critical","free","cover","normal","2026",{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":75,"licenseFileUrl":104,"sourceHtmlUrl":105,"categories":106,"keywords":112,"publishedAt":38},"01M6WNF9XAYAB2CZDDJBAKNM93","treg","Use the Treg CLI or MCP catalog to discover, price and call authorized external tools with team-scoped credentials and a user-approved budget.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-treg\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-treg\u002FSKILL.md",[107],{"categoryNo":108,"categoryName":109,"taxonomyType":110,"taxonomyTypeDesc":111},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[102,113,114,115,83,84,116,88,117,118,119,120,34,121,122,95,123,124,125,126,99],"MCP","cli","github","license","Budget","credentials","team","catalog","call","discover","external tools","with","scoped","blob",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":75,"licenseFileUrl":131,"sourceHtmlUrl":132,"categories":133,"keywords":139,"publishedAt":38},"01M6WN93MEAZ4E41DYAHJRPHQT","recruit","Turn a job description into an evidence-linked candidate shortlist through Treg, with job-related ranking and optional authorized business contact enrichment.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-recruit\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-recruit\u002FSKILL.md",[134],{"categoryNo":135,"categoryName":136,"taxonomyType":137,"taxonomyTypeDesc":138},"01JBSEEDCAT000000000000038","人力资源","PROFESSION","适用职业",[129,115,83,116,140,141,142,143,144,145,95,146,147,148,124,149,150,151,152,126,102,99],"https","email","enrichment","business","evidence","phone","ranking","post","job description","for","person","candidate","reason",{"skillNo":154,"name":155,"nameZh":6,"description":156,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":75,"licenseFileUrl":157,"sourceHtmlUrl":158,"categories":159,"keywords":160,"publishedAt":38},"01M6WN8R5RXSMHM9B4D9FAFX42","rea-growth","Analyze a company’s public growth and content through Treg, distinguish observations from hypotheses, and produce an evidence-linked playbook within an approved budget.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-rea-growth\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-rea-growth\u002FSKILL.md",[],[161,162,163,115,83,116,164,165,140,166,117,167,168,169,144,95,170,171,126,102,99],"growth","rea","rea growth","produce","content","playbook","marketing","analyze","public","observations","company",{"skillNo":173,"name":174,"nameZh":6,"description":175,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":75,"licenseFileUrl":176,"sourceHtmlUrl":177,"categories":178,"keywords":179,"publishedAt":38},"01M6WN2EVE3RQRGWAKBT4S7YT2","make-ugc","Create original AI UGC-style product videos through Treg: research hooks, approve a licensed presenter and voice, generate clips, add captions and report costs.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-make-ugc\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-make-ugc\u002FSKILL.md",[],[180,181,115,182,83,183,116,184,185,186,187,188,95,189,190,191,192,193,194,126],"make","make ugc","research","create","Video","Captions","ads","short","hooks","head","style","niche","trending","talking-head","approve",{"skillNo":196,"name":197,"nameZh":6,"description":198,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":75,"licenseFileUrl":199,"sourceHtmlUrl":200,"categories":201,"keywords":202,"publishedAt":38},"01M6WN10ARAA63Y8K1YNGXJ2RM","lead-signals","Find and qualify public buying signals through Treg, rank fitting business accounts and optionally enrich authorized business contact information.","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lead-signals\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fboisenoise\u002Fskills-collections\u002Fblob\u002Fmain\u002Fskills\u002Fantigravity-lead-signals\u002FSKILL.md",[],[203,204,205,115,83,116,206,207,143,208,209,95,210,211,212,213,214,215,216,126],"signals","lead","lead signals","how","find","ready","as","how to","qualify","people","information","enrich","changes","funding"]