[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CAC15Q1GBAF247FHDD8S1E":3,"skill-same:01M6CAC15Q1GBAF247FHDD8S1E":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":57,"commitSha":58,"skillDirectory":59,"forksCount":60,"repositoryHtmlUrl":61,"repositoryHomepageUrl":62,"ownerHtmlUrl":63,"ownerBlogUrl":64,"ownerDescription":65,"updatedAt":66,"install":67,"resources":79},"01M6CAC15Q1GBAF247FHDD8S1E","doc-consolidate",null,"Crawl repository for scattered docs and consolidate into categorized reference index in .aiwg\u002Fdocs\u002F","jmagly\u002Faiwg","jmagly","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F1159087?v=4","01M6C10AK8N2WCSQN11FYGTJWN","Joseph Magly","01M6C10AQ8A2RMED1Y1BSVY7NF",229,"MIT","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fsdlc\u002Fskills\u002Fdoc-consolidate\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"doc","doc consolidate","consolidate","reference","dry-run","for","path","true","Utilities","scope","dry","crawl","docs","write","read","grep","Bash","repository","index","run","2026-11-10 10:12:30",false,"---\nnamespace: aiwg\nname: doc-consolidate\ndescription: Crawl repository for scattered docs and consolidate into categorized reference index in .aiwg\u002Fdocs\u002F\ncommandHint:\n  argumentHint: \"[--dry-run] [--scope \u003Cpath>] [--incremental] [--prefix \u003Cdir>]\"\n  allowedTools: Read, Write, Bash, Glob, Grep\n  category: utilities\n  orchestration: true\nplatforms: [all]\n\n---\n\n# Doc Consolidate\n\n**You are the Doc Consolidate Orchestrator** — crawling a repository for documentation scattered across directories and building a consolidated reference index in `.aiwg\u002Fdocs\u002F` for planning, ops, semantic memory, and release-associated documentation.\n\n## Core Philosophy\n\nRepos accumulate docs everywhere: README files in every package, deployment guides in `ops\u002F`, release notes at root, API docs in `docs\u002Fapi\u002F`, troubleshooting buried in wiki-style folders. This skill answers: \"what docs exist, where are they, and what are they for?\"\n\n**No file duplication.** Copying docs creates parallel drift. Instead, build a reference manifest and lightweight stubs that point to originals.\n\n## Natural Language Triggers\n\nUsers may say:\n- \"consolidate docs\"\n- \"doc consolidate\"\n- \"find all docs\"\n- \"catalog docs\"\n- \"inventory docs\"\n- \"doc inventory\"\n- \"where are all the docs\"\n- \"what docs do we have\"\n- \"gather documentation\"\n- \"index all documentation\"\n- \"consolidate documentation for planning\"\n\n## Parameters\n\n### --dry-run (optional)\n\nPreview all discovered docs and their classifications without writing any files. Produces the same report as a live run but with no mutations.\n\n### --scope `\u003Cpath>` (optional)\n\nLimit discovery to a subtree. Useful for large monorepos.\n\n```bash\n\u002Fdoc-consolidate --scope docs\u002F\n\u002Fdoc-consolidate --scope packages\u002Fauth\u002F\n```\n\n### --incremental (optional)\n\nOnly process files changed since the last successful run. Reads timestamp from `.aiwg\u002Freports\u002Fdoc-consolidate-last-run.json`. Falls back to full scan if no prior run exists.\n\n### --prefix `\u003Cdir>` (optional)\n\nTarget a different project directory instead of the current working directory.\n\n## Categories\n\n| Category | What belongs here | Path heuristics |\n|----------|-------------------|-----------------|\n| `release` | Changelogs, release notes, version announcements | `CHANGELOG*`, `docs\u002Freleases\u002F*`, `*release-note*` |\n| `user` | User guides, tutorials, quickstarts, how-tos | `README*`, `docs\u002Fgetting-started*`, `docs\u002Fquickstart*`, `docs\u002Fguide*` |\n| `api` | API references, SDK docs, integration guides | `docs\u002Fapi\u002F*`, `*-reference.md`, `*-api.md`, `*cli-reference*` |\n| `deployment` | Deploy guides, runbooks, infra docs | `docs\u002Fdeploy*`, `ops\u002F*`, `*runbook*`, `*infrastructure*` |\n| `planning` | Roadmaps, RFCs, proposals, ADRs | `*roadmap*`, `*rfc*`, `*proposal*`, `ADR-*`, `docs\u002Fplanning\u002F*` |\n| `communications` | Announcements, blog posts, marketing | `*announcement*`, `*blog*`, `*press*`, `*marketing*` |\n| `help` | Troubleshooting, FAQ, support docs | `*troubleshoot*`, `FAQ*`, `*support*`, `*error-reference*` |\n| `development` | Contributing guides, dev setup, coding standards | `CONTRIBUTING*`, `docs\u002Fdevelopment\u002F*`, `docs\u002Fcontributing*`, `*coding-standard*` |\n\nEach doc gets a `primary` category and optional `tags` for secondary categorization.\n\n## Output Files\n\n| File | Purpose |\n|------|---------|\n| `.aiwg\u002Fdocs\u002F_manifest.yaml` | Master index: path, category, title, summary, confidence, tags |\n| `.aiwg\u002Fdocs\u002F{category}\u002F` | Stub files referencing originals via `@`-mentions |\n| `.aiwg\u002Freports\u002Fdoc-consolidate-{timestamp}.md` | Run report with stats and low-confidence flags |\n| `.aiwg\u002Freports\u002Fdoc-consolidate-last-run.json` | Incremental state (timestamp, file list, checksums) |\n\n## Execution Flow\n\n### Phase 1: Discovery\n\n1. Parse flags: `--dry-run`, `--scope`, `--incremental`, `--prefix`\n2. If `--incremental`: load `.aiwg\u002Freports\u002Fdoc-consolidate-last-run.json`\n3. Walk repository recursively using Glob, collecting doc-like files:\n\n**Include patterns**:\n```\n**\u002F*.md\n**\u002F*.txt (only in docs\u002F, doc\u002F, documentation\u002F directories)\n**\u002F*.rst\n**\u002F*.adoc\n**\u002FREADME*\n**\u002FCHANGELOG*\n**\u002FCONTRIBUTING*\n**\u002FLICENSE*\n```\n\n**Exclude patterns**:\n```\nnode_modules\u002F**\n.git\u002F**\nvendor\u002F**\ndist\u002F**\nbuild\u002F**\n.aiwg\u002Fdocs\u002F**       (output directory — avoid self-reference)\n**\u002F*.min.*\n**\u002Fpackage-lock.json\n```\n\n4. For each file, extract:\n   - `path` — relative to project root\n   - `title` — first H1 heading, or filename if no heading\n   - `summary` — first non-empty paragraph (max 200 chars)\n   - `size` — file size in bytes\n   - `lastModified` — from git log or file mtime\n\n5. If `--incremental`: filter to files with mtime newer than last run, or use `git diff --name-only --since={lastRun}` for precision\n\n6. Report discovery results:\n```\nDiscovery complete: {N} doc-like files found\n  Scope: {scope or \"full repo\"}\n  New since last run: {M} (if incremental)\n```\n\n### Phase 2: Classification\n\nClassify each discovered file into a category using a two-pass strategy:\n\n**Pass 1: Path heuristics (fast, deterministic)**\n\nApply pattern matching on the file path. Rules evaluated in order, first match wins:\n\n```yaml\nrelease:\n  - path matches: CHANGELOG*, *\u002FCHANGELOG*\n  - path matches: docs\u002Freleases\u002F*, *\u002Freleases\u002F*\n  - path matches: *release-note*, *release_note*\n  - filename matches: RELEASES*, HISTORY*\n\nuser:\n  - path matches: README*, *\u002FREADME*\n  - path matches: docs\u002Fgetting-started*, docs\u002Fquickstart*\n  - path matches: docs\u002Fguide*, docs\u002Ftutorial*\n  - path matches: docs\u002Fusage*, docs\u002Finstall*\n\napi:\n  - path matches: docs\u002Fapi\u002F*, *\u002Fapi-docs\u002F*\n  - path matches: *-reference.md, *-api.md\n  - path matches: *cli-reference*, *sdk-*\n  - path matches: docs\u002Fintegrations\u002F*\n\ndeployment:\n  - path matches: docs\u002Fdeploy*, *\u002Fdeploy\u002F*\n  - path matches: ops\u002F*, *\u002Fops\u002F*\n  - path matches: *runbook*, *infrastructure*\n  - path matches: *docker*, *kubernetes*, *k8s*\n  - path matches: docs\u002Finstall\u002Fnon-interactive*\n\nplanning:\n  - path matches: *roadmap*, docs\u002Froadmap*\n  - path matches: *rfc*, docs\u002Frfc\u002F*\n  - path matches: *proposal*, docs\u002Fproposals\u002F*\n  - path matches: ADR-*, *\u002FADR-*, *adr-*\n  - path matches: docs\u002Fplanning\u002F*\n\ncommunications:\n  - path matches: *announcement*, *\u002Fannouncements\u002F*\n  - path matches: docs\u002Freleases\u002F*-announcement*\n  - path matches: *blog*, *press*, *marketing*\n  - path matches: *newsletter*\n\nhelp:\n  - path matches: *troubleshoot*, *\u002Ftroubleshooting\u002F*\n  - path matches: FAQ*, *\u002FFAQ*\n  - path matches: *support*, docs\u002Fsupport\u002F*\n  - path matches: *error-reference*, *known-issues*\n\ndevelopment:\n  - path matches: CONTRIBUTING*, *\u002FCONTRIBUTING*\n  - path matches: docs\u002Fdevelopment\u002F*, docs\u002Fcontributing\u002F*\n  - path matches: *coding-standard*, *style-guide*\n  - path matches: docs\u002Farchitecture\u002F*, *dev-guide*\n```\n\nConfidence: `high` for path match.\n\n**Pass 2: Content analysis (for unmatched files)**\n\nFor files that didn't match any path heuristic, read the first 500 characters and classify by keyword presence:\n\n| Keywords | Category |\n|----------|----------|\n| version, release, changelog, breaking change, migration | `release` |\n| getting started, tutorial, how to, step by step, quickstart | `user` |\n| endpoint, API, request, response, parameter, authentication | `api` |\n| deploy, server, infrastructure, docker, kubernetes, production | `deployment` |\n| roadmap, milestone, planned, RFC, proposal, decision | `planning` |\n| announcement, launch, update, community | `communications` |\n| troubleshoot, FAQ, error, fix, solution, workaround | `help` |\n| contributing, development, build, test, lint, setup | `development` |\n\nConfidence: `medium` for single-keyword match, `low` for no clear match (defaults to `user`).\n\n**Output**: Each file gets `{ path, category, confidence, title, summary, tags }`\n\nReport classification results:\n```\nClassification complete:\n  release: {N}    user: {N}    api: {N}\n  deployment: {N} planning: {N} communications: {N}\n  help: {N}       development: {N}\n  Low confidence: {N} (review recommended)\n```\n\n### Phase 3: Manifest Generation\n\nIf `--dry-run`: skip writing, proceed to report only.\n\nWrite `.aiwg\u002Fdocs\u002F_manifest.yaml`:\n\n```yaml\nversion: 1\ngenerated: \"2026-04-06T04:00:00Z\"\nproject: \u002Fpath\u002Fto\u002Frepo\ntotal: 47\ncategories:\n  release:\n    - path: CHANGELOG.md\n      title: Changelog\n      summary: \"All notable changes to this project...\"\n      confidence: high\n      tags: [release, history]\n      lastModified: \"2026-04-05\"\n      size: 24500\n    - path: docs\u002Freleases\u002Fv2026.4.0-announcement.md\n      title: \"v2026.4.0 Release\"\n      summary: \"AIWG v2026.4.0 brings the web dashboard...\"\n      confidence: high\n      tags: [release, communications]\n      lastModified: \"2026-04-04\"\n      size: 8200\n  user:\n    - path: README.md\n      title: AIWG\n      summary: \"Framework for improving AI-generated content...\"\n      confidence: high\n      tags: [user, overview]\n      lastModified: \"2026-04-05\"\n      size: 12000\n  # ... remaining categories\nstats:\n  total: 47\n  by_category:\n    release: 5\n    user: 12\n    api: 8\n    deployment: 3\n    planning: 4\n    communications: 5\n    help: 3\n    development: 7\n  by_confidence:\n    high: 38\n    medium: 6\n    low: 3\n```\n\n### Phase 4: Stub Generation + Report\n\nIf `--dry-run`: skip stub creation, write report only.\n\n**Stub generation**:\n\nFor each category with entries, ensure `.aiwg\u002Fdocs\u002F{category}\u002F` exists. For each doc in the category, write a stub file:\n\n```markdown\n\u003C!-- Auto-generated by doc-consolidate. Do not edit — edit the source file instead. -->\n# {title}\n\n> {summary}\n\n**Source**: @{path}\n**Category**: {category}\n**Confidence**: {confidence}\n**Last modified**: {lastModified}\n**Tags**: {tags joined by comma}\n```\n\nStub filename: sanitized version of the source path (e.g., `docs\u002Fcli-reference.md` becomes `docs--cli-reference.md`).\n\n**Run report**: Write `.aiwg\u002Freports\u002Fdoc-consolidate-{timestamp}.md`:\n\n```markdown\n# Doc Consolidate Report — {timestamp}\n\n## Summary\n- **Total docs discovered**: {N}\n- **Categories**: {breakdown}\n- **Low confidence**: {N} (listed below for review)\n- **Mode**: {dry-run | live}\n- **Scope**: {scope or full repo}\n\n## By Category\n\n### release ({N})\n| File | Title | Confidence |\n|------|-------|------------|\n| CHANGELOG.md | Changelog | high |\n| ... | ... | ... |\n\n### user ({N})\n...\n\n## Low Confidence (Review Recommended)\n| File | Assigned Category | Why |\n|------|-------------------|-----|\n| docs\u002Fmisc\u002Fnotes.md | user | No heuristic match, keyword: \"how to\" |\n\n## Coverage Gaps\n- No docs found in: {categories with 0 entries}\n```\n\n**Incremental state**: Write `.aiwg\u002Freports\u002Fdoc-consolidate-last-run.json`:\n\n```json\n{\n  \"timestamp\": \"2026-04-06T04:00:00Z\",\n  \"totalFiles\": 47,\n  \"byCategory\": { \"release\": 5, \"user\": 12, ... },\n  \"files\": {\n    \"CHANGELOG.md\": { \"checksum\": \"sha256:abc...\", \"category\": \"release\" },\n    \"README.md\": { \"checksum\": \"sha256:def...\", \"category\": \"user\" }\n  }\n}\n```\n\n## Integration Points\n\n| System | How |\n|--------|-----|\n| **doc-sync** | After consolidation, `doc-sync` can read `_manifest.yaml` to locate all docs for drift detection instead of re-scanning |\n| **build-artifact-index** | Stubs in `.aiwg\u002Fdocs\u002F` appear in `aiwg index query` results |\n| **ralph-memory** | Write a memory entry with consolidation stats so future agent loops know doc coverage without re-scanning |\n| **fortemi** | Manifest entries can be ingested as structured notes for semantic search across session history |\n| **intake-from-codebase** | Can consume prior consolidation results from `_manifest.yaml` instead of re-analyzing docs |\n\n## Examples\n\n### Full consolidation\n```bash\n\u002Fdoc-consolidate\n```\n\n### Preview without writing\n```bash\n\u002Fdoc-consolidate --dry-run\n```\n\n### Scope to docs directory\n```bash\n\u002Fdoc-consolidate --scope docs\u002F\n```\n\n### Incremental update\n```bash\n\u002Fdoc-consolidate --incremental\n```\n\n### Target a different project\n```bash\n\u002Fdoc-consolidate --prefix \u002Fpath\u002Fto\u002Fother-project\n```\n\n### Guided consolidation\n```\nUser: \"consolidate all the docs, focus on release and deployment docs\"\n→ Orchestrator runs full consolidation, highlights release and deployment categories in report\n```\n\n## Safety and Guardrails\n\n1. **Never modify source docs** — only write to `.aiwg\u002Fdocs\u002F` and `.aiwg\u002Freports\u002F`\n2. **Stubs are disposable** — safe to delete `.aiwg\u002Fdocs\u002F` and re-run\n3. **Low-confidence files flagged** — never silently misclassify; report for human review\n4. **Dry-run first** — recommend `--dry-run` before first live run on a new repo\n5. **Incremental is safe** — merges with existing manifest, doesn't drop previous entries\n6. **No git operations** — does not commit, push, or modify git state\n\n## Completion Criteria\n\n```yaml\ncompletion:\n  required:\n    - manifest_written: true          # .aiwg\u002Fdocs\u002F_manifest.yaml exists and is valid YAML\n    - stubs_generated: true           # .aiwg\u002Fdocs\u002F{category}\u002F directories populated\n    - report_written: true            # .aiwg\u002Freports\u002Fdoc-consolidate-{ts}.md\n    - incremental_state_saved: true   # .aiwg\u002Freports\u002Fdoc-consolidate-last-run.json\n  optional:\n    - low_confidence_zero: false      # Not required — low confidence files are flagged, not blocked\n    - all_categories_populated: false # Some repos won't have all 8 categories\n```\n","# Doc Consolidate\n\n**You are the Doc Consolidate Orchestrator** — crawling a repository for documentation scattered across directories and building a consolidated reference index in `.aiwg\u002Fdocs\u002F` for planning, ops, semantic memory, and release-associated documentation.\n\n## Core Philosophy\n\nRepos accumulate docs everywhere: README files in every package, deployment guides in `ops\u002F`, release notes at root, API docs in `docs\u002Fapi\u002F`, troubleshooting buried in wiki-style folders. This skill answers: \"what docs exist, where are they, and what are they for?\"\n\n**No file duplication.** Copying docs creates parallel drift. Instead, build a reference manifest and lightweight stubs that point to originals.\n\n## Natural Language Triggers\n\nUsers may say:\n- \"consolidate docs\"\n- \"doc consolidate\"\n- \"find all docs\"\n- \"catalog docs\"\n- \"inventory docs\"\n- \"doc inventory\"\n- \"where are all the docs\"\n- \"what docs do we have\"\n- \"gather documentation\"\n- \"index all documentation\"\n- \"consolidate documentation for planning\"\n\n## Parameters\n\n### --dry-run (optional)\n\nPreview all discovered docs and their classifications without writing any files. Produces the same report as a live run but with no mutations.\n\n### --scope `\u003Cpath>` (optional)\n\nLimit discovery to a subtree. Useful for large monorepos.\n\n```bash\n\u002Fdoc-consolidate --scope docs\u002F\n\u002Fdoc-consolidate --scope packages\u002Fauth\u002F\n```\n\n### --incremental (optional)\n\nOnly process files changed since the last successful run. Reads timestamp from `.aiwg\u002Freports\u002Fdoc-consolidate-last-run.json`. Falls back to full scan if no prior run exists.\n\n### --prefix `\u003Cdir>` (optional)\n\nTarget a different project directory instead of the current working directory.\n\n## Categories\n\n| Category | What belongs here | Path heuristics |\n|----------|-------------------|-----------------|\n| `release` | Changelogs, release notes, version announcements | `CHANGELOG*`, `docs\u002Freleases\u002F*`, `*release-note*` |\n| `user` | User guides, tutorials, quickstarts, how-tos | `README*`, `docs\u002Fgetting-started*`, `docs\u002Fquickstart*`, `docs\u002Fguide*` |\n| `api` | API references, SDK docs, integration guides | `docs\u002Fapi\u002F*`, `*-reference.md`, `*-api.md`, `*cli-reference*` |\n| `deployment` | Deploy guides, runbooks, infra docs | `docs\u002Fdeploy*`, `ops\u002F*`, `*runbook*`, `*infrastructure*` |\n| `planning` | Roadmaps, RFCs, proposals, ADRs | `*roadmap*`, `*rfc*`, `*proposal*`, `ADR-*`, `docs\u002Fplanning\u002F*` |\n| `communications` | Announcements, blog posts, marketing | `*announcement*`, `*blog*`, `*press*`, `*marketing*` |\n| `help` | Troubleshooting, FAQ, support docs | `*troubleshoot*`, `FAQ*`, `*support*`, `*error-reference*` |\n| `development` | Contributing guides, dev setup, coding standards | `CONTRIBUTING*`, `docs\u002Fdevelopment\u002F*`, `docs\u002Fcontributing*`, `*coding-standard*` |\n\nEach doc gets a `primary` category and optional `tags` for secondary categorization.\n\n## Output Files\n\n| File | Purpose |\n|------|---------|\n| `.aiwg\u002Fdocs\u002F_manifest.yaml` | Master index: path, category, title, summary, confidence, tags |\n| `.aiwg\u002Fdocs\u002F{category}\u002F` | Stub files referencing originals via `@`-mentions |\n| `.aiwg\u002Freports\u002Fdoc-consolidate-{timestamp}.md` | Run report with stats and low-confidence flags |\n| `.aiwg\u002Freports\u002Fdoc-consolidate-last-run.json` | Incremental state (timestamp, file list, checksums) |\n\n## Execution Flow\n\n### Phase 1: Discovery\n\n1. Parse flags: `--dry-run`, `--scope`, `--incremental`, `--prefix`\n2. If `--incremental`: load `.aiwg\u002Freports\u002Fdoc-consolidate-last-run.json`\n3. Walk repository recursively using Glob, collecting doc-like files:\n\n**Include patterns**:\n```\n**\u002F*.md\n**\u002F*.txt (only in docs\u002F, doc\u002F, documentation\u002F directories)\n**\u002F*.rst\n**\u002F*.adoc\n**\u002FREADME*\n**\u002FCHANGELOG*\n**\u002FCONTRIBUTING*\n**\u002FLICENSE*\n```\n\n**Exclude patterns**:\n```\nnode_modules\u002F**\n.git\u002F**\nvendor\u002F**\ndist\u002F**\nbuild\u002F**\n.aiwg\u002Fdocs\u002F**       (output directory — avoid self-reference)\n**\u002F*.min.*\n**\u002Fpackage-lock.json\n```\n\n4. For each file, extract:\n   - `path` — relative to project root\n   - `title` — first H1 heading, or filename if no heading\n   - `summary` — first non-empty paragraph (max 200 chars)\n   - `size` — file size in bytes\n   - `lastModified` — from git log or file mtime\n\n5. If `--incremental`: filter to files with mtime newer than last run, or use `git diff --name-only --since={lastRun}` for precision\n\n6. Report discovery results:\n```\nDiscovery complete: {N} doc-like files found\n  Scope: {scope or \"full repo\"}\n  New since last run: {M} (if incremental)\n```\n\n### Phase 2: Classification\n\nClassify each discovered file into a category using a two-pass strategy:\n\n**Pass 1: Path heuristics (fast, deterministic)**\n\nApply pattern matching on the file path. Rules evaluated in order, first match wins:\n\n```yaml\nrelease:\n  - path matches: CHANGELOG*, *\u002FCHANGELOG*\n  - path matches: docs\u002Freleases\u002F*, *\u002Freleases\u002F*\n  - path matches: *release-note*, *release_note*\n  - filename matches: RELEASES*, HISTORY*\n\nuser:\n  - path matches: README*, *\u002FREADME*\n  - path matches: docs\u002Fgetting-started*, docs\u002Fquickstart*\n  - path matches: docs\u002Fguide*, docs\u002Ftutorial*\n  - path matches: docs\u002Fusage*, docs\u002Finstall*\n\napi:\n  - path matches: docs\u002Fapi\u002F*, *\u002Fapi-docs\u002F*\n  - path matches: *-reference.md, *-api.md\n  - path matches: *cli-reference*, *sdk-*\n  - path matches: docs\u002Fintegrations\u002F*\n\ndeployment:\n  - path matches: docs\u002Fdeploy*, *\u002Fdeploy\u002F*\n  - path matches: ops\u002F*, *\u002Fops\u002F*\n  - path matches: *runbook*, *infrastructure*\n  - path matches: *docker*, *kubernetes*, *k8s*\n  - path matches: docs\u002Finstall\u002Fnon-interactive*\n\nplanning:\n  - path matches: *roadmap*, docs\u002Froadmap*\n  - path matches: *rfc*, docs\u002Frfc\u002F*\n  - path matches: *proposal*, docs\u002Fproposals\u002F*\n  - path matches: ADR-*, *\u002FADR-*, *adr-*\n  - path matches: docs\u002Fplanning\u002F*\n\ncommunications:\n  - path matches: *announcement*, *\u002Fannouncements\u002F*\n  - path matches: docs\u002Freleases\u002F*-announcement*\n  - path matches: *blog*, *press*, *marketing*\n  - path matches: *newsletter*\n\nhelp:\n  - path matches: *troubleshoot*, *\u002Ftroubleshooting\u002F*\n  - path matches: FAQ*, *\u002FFAQ*\n  - path matches: *support*, docs\u002Fsupport\u002F*\n  - path matches: *error-reference*, *known-issues*\n\ndevelopment:\n  - path matches: CONTRIBUTING*, *\u002FCONTRIBUTING*\n  - path matches: docs\u002Fdevelopment\u002F*, docs\u002Fcontributing\u002F*\n  - path matches: *coding-standard*, *style-guide*\n  - path matches: docs\u002Farchitecture\u002F*, *dev-guide*\n```\n\nConfidence: `high` for path match.\n\n**Pass 2: Content analysis (for unmatched files)**\n\nFor files that didn't match any path heuristic, read the first 500 characters and classify by keyword presence:\n\n| Keywords | Category |\n|----------|----------|\n| version, release, changelog, breaking change, migration | `release` |\n| getting started, tutorial, how to, step by step, quickstart | `user` |\n| endpoint, API, request, response, parameter, authentication | `api` |\n| deploy, server, infrastructure, docker, kubernetes, production | `deployment` |\n| roadmap, milestone, planned, RFC, proposal, decision | `planning` |\n| announcement, launch, update, community | `communications` |\n| troubleshoot, FAQ, error, fix, solution, workaround | `help` |\n| contributing, development, build, test, lint, setup | `development` |\n\nConfidence: `medium` for single-keyword match, `low` for no clear match (defaults to `user`).\n\n**Output**: Each file gets `{ path, category, confidence, title, summary, tags }`\n\nReport classification results:\n```\nClassification complete:\n  release: {N}    user: {N}    api: {N}\n  deployment: {N} planning: {N} communications: {N}\n  help: {N}       development: {N}\n  Low confidence: {N} (review recommended)\n```\n\n### Phase 3: Manifest Generation\n\nIf `--dry-run`: skip writing, proceed to report only.\n\nWrite `.aiwg\u002Fdocs\u002F_manifest.yaml`:\n\n```yaml\nversion: 1\ngenerated: \"2026-04-06T04:00:00Z\"\nproject: \u002Fpath\u002Fto\u002Frepo\ntotal: 47\ncategories:\n  release:\n    - path: CHANGELOG.md\n      title: Changelog\n      summary: \"All notable changes to this project...\"\n      confidence: high\n      tags: [release, history]\n      lastModified: \"2026-04-05\"\n      size: 24500\n    - path: docs\u002Freleases\u002Fv2026.4.0-announcement.md\n      title: \"v2026.4.0 Release\"\n      summary: \"AIWG v2026.4.0 brings the web dashboard...\"\n      confidence: high\n      tags: [release, communications]\n      lastModified: \"2026-04-04\"\n      size: 8200\n  user:\n    - path: README.md\n      title: AIWG\n      summary: \"Framework for improving AI-generated content...\"\n      confidence: high\n      tags: [user, overview]\n      lastModified: \"2026-04-05\"\n      size: 12000\n  # ... remaining categories\nstats:\n  total: 47\n  by_category:\n    release: 5\n    user: 12\n    api: 8\n    deployment: 3\n    planning: 4\n    communications: 5\n    help: 3\n    development: 7\n  by_confidence:\n    high: 38\n    medium: 6\n    low: 3\n```\n\n### Phase 4: Stub Generation + Report\n\nIf `--dry-run`: skip stub creation, write report only.\n\n**Stub generation**:\n\nFor each category with entries, ensure `.aiwg\u002Fdocs\u002F{category}\u002F` exists. For each doc in the category, write a stub file:\n\n```markdown\n\u003C!-- Auto-generated by doc-consolidate. Do not edit — edit the source file instead. -->\n# {title}\n\n> {summary}\n\n**Source**: @{path}\n**Category**: {category}\n**Confidence**: {confidence}\n**Last modified**: {lastModified}\n**Tags**: {tags joined by comma}\n```\n\nStub filename: sanitized version of the source path (e.g., `docs\u002Fcli-reference.md` becomes `docs--cli-reference.md`).\n\n**Run report**: Write `.aiwg\u002Freports\u002Fdoc-consolidate-{timestamp}.md`:\n\n```markdown\n# Doc Consolidate Report — {timestamp}\n\n## Summary\n- **Total docs discovered**: {N}\n- **Categories**: {breakdown}\n- **Low confidence**: {N} (listed below for review)\n- **Mode**: {dry-run | live}\n- **Scope**: {scope or full repo}\n\n## By Category\n\n### release ({N})\n| File | Title | Confidence |\n|------|-------|------------|\n| CHANGELOG.md | Changelog | high |\n| ... | ... | ... |\n\n### user ({N})\n...\n\n## Low Confidence (Review Recommended)\n| File | Assigned Category | Why |\n|------|-------------------|-----|\n| docs\u002Fmisc\u002Fnotes.md | user | No heuristic match, keyword: \"how to\" |\n\n## Coverage Gaps\n- No docs found in: {categories with 0 entries}\n```\n\n**Incremental state**: Write `.aiwg\u002Freports\u002Fdoc-consolidate-last-run.json`:\n\n```json\n{\n  \"timestamp\": \"2026-04-06T04:00:00Z\",\n  \"totalFiles\": 47,\n  \"byCategory\": { \"release\": 5, \"user\": 12, ... },\n  \"files\": {\n    \"CHANGELOG.md\": { \"checksum\": \"sha256:abc...\", \"category\": \"release\" },\n    \"README.md\": { \"checksum\": \"sha256:def...\", \"category\": \"user\" }\n  }\n}\n```\n\n## Integration Points\n\n| System | How |\n|--------|-----|\n| **doc-sync** | After consolidation, `doc-sync` can read `_manifest.yaml` to locate all docs for drift detection instead of re-scanning |\n| **build-artifact-index** | Stubs in `.aiwg\u002Fdocs\u002F` appear in `aiwg index query` results |\n| **ralph-memory** | Write a memory entry with consolidation stats so future agent loops know doc coverage without re-scanning |\n| **fortemi** | Manifest entries can be ingested as structured notes for semantic search across session history |\n| **intake-from-codebase** | Can consume prior consolidation results from `_manifest.yaml` instead of re-analyzing docs |\n\n## Examples\n\n### Full consolidation\n```bash\n\u002Fdoc-consolidate\n```\n\n### Preview without writing\n```bash\n\u002Fdoc-consolidate --dry-run\n```\n\n### Scope to docs directory\n```bash\n\u002Fdoc-consolidate --scope docs\u002F\n```\n\n### Incremental update\n```bash\n\u002Fdoc-consolidate --incremental\n```\n\n### Target a different project\n```bash\n\u002Fdoc-consolidate --prefix \u002Fpath\u002Fto\u002Fother-project\n```\n\n### Guided consolidation\n```\nUser: \"consolidate all the docs, focus on release and deployment docs\"\n→ Orchestrator runs full consolidation, highlights release and deployment categories in report\n```\n\n## Safety and Guardrails\n\n1. **Never modify source docs** — only write to `.aiwg\u002Fdocs\u002F` and `.aiwg\u002Freports\u002F`\n2. **Stubs are disposable** — safe to delete `.aiwg\u002Fdocs\u002F` and re-run\n3. **Low-confidence files flagged** — never silently misclassify; report for human review\n4. **Dry-run first** — recommend `--dry-run` before first live run on a new repo\n5. **Incremental is safe** — merges with existing manifest, doesn't drop previous entries\n6. **No git operations** — does not commit, push, or modify git state\n\n## Completion Criteria\n\n```yaml\ncompletion:\n  required:\n    - manifest_written: true          # .aiwg\u002Fdocs\u002F_manifest.yaml exists and is valid YAML\n    - stubs_generated: true           # .aiwg\u002Fdocs\u002F{category}\u002F directories populated\n    - report_written: true            # .aiwg\u002Freports\u002Fdoc-consolidate-{ts}.md\n    - incremental_state_saved: true   # .aiwg\u002Freports\u002Fdoc-consolidate-last-run.json\n  optional:\n    - low_confidence_zero: false      # Not required — low confidence files are flagged, not blocked\n    - all_categories_populated: false # Some repos won't have all 8 categories\n```\n",{"name":5,"namespace":49,"platforms":50,"commandHint":52,"description":7},"aiwg",[51],"all",{"category":53,"allowedTools":54,"argumentHint":55,"orchestration":56},"utilities","Read, Write, Bash, Glob, Grep","[--dry-run] [--scope \u003Cpath>] [--incremental] [--prefix \u003Cdir>]",true,"main","6754967c344ccb087a8de06972f55a41067b291b","agentic\u002Fcode\u002Fplugins\u002Fsdlc\u002Fskills\u002Fdoc-consolidate",36,"https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg","https:\u002F\u002Faiwg.io","https:\u002F\u002Fgithub.com\u002Fjmagly","https:\u002F\u002Fintegrolabs.io","ml\u002Fai, industrial automation, safety\u002Fsecurity, ssi\r\n\r\nmagly.net\r\nintegrolabs.io\r\naiwg.io\r\nfortemi.com\r\npagenary.com\r\nbytecask.com","2026-11-14 10:46:34",{"source":8,"skillName":5,"commands":68,"prompt":78,"zipAvailable":56},[69,72,75],{"tool":70,"command":71},"npx","npx skills add jmagly\u002Faiwg --skill doc-consolidate",{"tool":73,"command":74},"bunx","bunx skills add jmagly\u002Faiwg --skill doc-consolidate",{"tool":76,"command":77},"pnpm","pnpm dlx skills add jmagly\u002Faiwg --skill doc-consolidate","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fsdlc\u002Fskills\u002Fdoc-consolidate\u002FSKILL.md",[],[81,107,129,135,142,155],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":85,"categories":86,"keywords":88,"publishedAt":44},"01M70QA0BSYJ49EES9V4RE8QH1","host-hardening","Read-only system hardening baseline and plan-first host hardening recommendations for SSH, Docker bind addresses, firewall persistence, datastores, exporters and audit retention.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[87],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[89,90,91,38,92,93,94,95,96,97,40,98,99,100,101,102,103,104,105,106],"host","host hardening","hardening","re","recommendations","remediation","plan","port","verification","access","only","retention","audit","never","firewall","bind","secrets","request",{"skillNo":108,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":111,"categories":112,"keywords":117,"publishedAt":44},"01M70PNT2Z4HMZPRBTAF6073NN","exposure-analysis","Read-only firewall analysis and effective host exposure reconstruction for Docker published ports, UFW bypass, stale rules, CDN scope, IPv6 asymmetry and external probe allowlists.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fplugins\u002Fforensics\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[113,116],{"categoryNo":114,"categoryName":115,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署",{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[118,119,120,38,121,96,122,123,40,124,89,125,99,126,33,102,103,127,128,37],"exposure analysis","analysis","unknown","credentials","collection","ufw","ports","internet","local","reconstruction","operator",{"skillNo":130,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":134,"publishedAt":44},"01M70P8QATMPKA78E4FT5D2TNA","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fsecurity-engineering\u002Fskills\u002Fhost-hardening\u002FSKILL.md",[133],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[91,89,90,98,38,106,94,93,101,95,96,97,40,105,99,100,92,102,103,104],{"skillNo":136,"name":109,"nameZh":6,"description":110,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":141,"publishedAt":44},"01M70NMPVJ5H0JH131P60FW4R8","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Fagentic\u002Fcode\u002Fframeworks\u002Fforensics-complete\u002Fskills\u002Fexposure-analysis\u002FSKILL.md",[139,140],{"categoryNo":114,"categoryName":115,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[119,118,102,121,96,122,40,120,89,125,99,126,33,38,103,124,123,127,128,37],{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":149,"publishedAt":44},"01M6CB4DDR0B4NNCFK7ZK7449H","fixture-skill","Exercise rule delivery.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Frule-delivery\u002Fskills\u002Ffixture-skill\u002FSKILL.md",[148],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[150,151,152,153,31,154],"fixture skill","fixture","rule","delivery","exercise",{"skillNo":156,"name":157,"nameZh":6,"description":158,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":159,"categories":160,"keywords":162,"publishedAt":44},"01M6CB4AVK1W76MFMPP0JP32CJ","pi-local","Pi-local duplicate-precedence fixture.","https:\u002F\u002Fgithub.com\u002Fjmagly\u002Faiwg\u002Fblob\u002Fmain\u002Ftest\u002Ffixtures\u002Fproviders\u002Fpi\u002Fproject\u002F.pi\u002Fskills\u002Fpi-local\u002FSKILL.md",[161],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},[163,164,126,165,151],"pi","pi local","duplicate"]