Organize documentation across: $ARGUMENTS
$ARGUMENTS should include:
- A scope — which repos to scan (default: all repos under
~/Desktop/Dev/repos/)
- Optionally:
--inventory-only to skip consolidation and just produce a report
- Optionally:
--dry-run to show what would be moved without moving anything
- Optionally: a target directory for centralized content (default:
~/Desktop/Dev/repos/docs/)
- Optionally: specific file types to include (default:
.md and .html)
- Empty — scan everything, ask the user before taking action
Purpose
Repos accumulate documentation over time. Some of it is repo-local — tightly coupled to the codebase and must stay where it is. Some of it is content — guides, courses, articles, framework explanations, voice references — that could live in a centralized location where it's discoverable and maintainable.
This skill draws that line, produces a clear inventory, and (with the user's approval) consolidates content docs into a single hub.
Classification System
Every .md and .html file falls into one of two categories:
Category A — Repo-Local (STAYS)
These documents are coupled to the code, infrastructure, or development workflow. Moving them would break references or lose context.
Path-based signals (high confidence):
- Inside
.claude/, .agents/, .github/, .vscode/, .cursor/
- Inside
node_modules/, dist/, .next/, build/, out/, .turbo/
- Inside
_docs/platform/, _docs/design/, _docs/type/, _docs/ui/
- Inside
_docs/agents/ (agent configuration, not agent-generated content)
- Inside
_docs/architecture/ (app-architect output — implementation specs)
- Inside
_prompts/ or _bootstrap/
Filename-based signals (high confidence):
README.md, CONTRIBUTING.md, CHANGELOG.md, LICENSE.md, CODE_OF_CONDUCT.md
CLAUDE.md, AGENTS.md, any file starting with _ (convention for internal docs)
package.json-adjacent docs (e.g., MIGRATION.md, UPGRADE.md)
- Files matching:
*SCHEMA*, *API*, *VALIDATION*, *INVENTORY*, *STATUS*
- Files matching:
*IMPLEMENTATION*, *BOOTSTRAP*, *PROMPT*, *CONFIG*
Content-based signals (use when path/filename are ambiguous):
- References specific code files, functions, or imports
- Contains schema definitions, type annotations, or API endpoint documentation
- Contains checklists tied to build/deploy steps
- Contains component inventories or page route tables
- Contains environment variable documentation
- Written for developers as the primary audience
Category B — Centralizable Content (MOVES)
These documents are content assets — they teach, explain, narrate, or guide. They're valuable independent of any single codebase.
Path-based signals (high confidence):
- Inside directories named:
content/, articles/, guides/, courses/, pathways/
- Inside directories named:
voice/, writing/, corpus/, lab/, knowledge/
- Inside
_docs/ but not in platform/design/type/agents/architecture subdirectories
Filename-based signals (high confidence):
- Files matching:
*PLAYBOOK*, *GUIDE*, *COURSE*, *ARTICLE*
- Files matching:
*VOICE*, *FRAMEWORK*, *MANIFESTO*
- Files matching:
*TEACHING*, *FORMATION*, *PEDAGOGY*
- Files containing version/chapter numbers (e.g.,
week-01.md, chapter-3.md)
Content-based signals (use when path/filename are ambiguous):
- Narrative prose (paragraphs, not bullet checklists)
- Pedagogical structure (dissonance → action → reflection)
- Framework explanations (mDNA, APEST, Forgotten Ways, etc.)
- Case studies, stories, illustrations
- Written for learners, readers, or a general audience
- Contains no code references, schema definitions, or API documentation
- Could be published on a blog, in a course, or as a standalone document
Category C — Bridging Documents (FLAG FOR REVIEW)
Some files serve both purposes. Flag these for the user to decide.
Signals:
- Agent prompts that generate content (in
_prompts/ but about content strategy)
- Design consultations that contain both specs and narrative (e.g.,
COPY_CONSULTATION.html)
- Inventories that mix content assets with technical components
- Vector store source material (agent-consumed but content in nature)
Execution Process
Phase 1 — Discovery
- List all repos under the scan scope
- Glob for documentation files in each repo:
**/*.md (excluding node_modules/, dist/, .next/, build/, .turbo/)
**/*.html (excluding node_modules/, dist/, .next/, build/, .turbo/)
- Exclude known noise:
- Lock files, generated changelogs, auto-generated API docs
- Build output directories
- Dependency directories
Phase 2 — Classification
For each file:
- Apply path-based rules first (highest confidence, cheapest to evaluate)
- Apply filename-based rules (high confidence)
- If still ambiguous, read the first 50 lines and apply content-based rules
- Assign a classification:
REPO-LOCAL — stays in place
CONTENT — candidate for centralization
REVIEW — needs human decision
- Assign a content type (for CONTENT files):
guide — how-to, tutorial, walkthrough
article — blog post, essay, thought piece
course — course material, lesson, module
framework — conceptual framework documentation
voice — voice system, writing style, tone reference
research — research notes, content research, interviews
template — HTML template, design prototype (for .html files)
reference — reference material, glossary, definitions
other — doesn't fit the above
Phase 3 — Inventory Report
Generate a comprehensive inventory. Output as a markdown file at {{OUTPUT_DIR}}/DOC_INVENTORY.md:
# Documentation Inventory
**Scanned:** [date]
**Scope:** [repos scanned]
**Total files:** [count]
## Summary
| Category | Count | Percentage |
|----------|-------|------------|
| Repo-Local | [n] | [%] |
| Content (Centralizable) | [n] | [%] |
| Needs Review | [n] | [%] |
## Content Files by Type
| Type | Count | Repos Found In |
|------|-------|----------------|
| guide | [n] | [repo1, repo2] |
| article | [n] | [repo1] |
| course | [n] | [repo1, repo3] |
| ... | ... | ... |
## Content Files — Full List
### [Repo Name]
| File | Type | Confidence | Notes |
|------|------|------------|-------|
| `path/to/file.md` | guide | high | [brief note] |
| `path/to/file.md` | article | medium | [brief note] |
### [Next Repo]
...
## Needs Review
| File | Reason |
|------|--------|
| `path/to/file.md` | Bridges content and technical docs |
| `path/to/file.html` | Design consultation with narrative content |
## Repo-Local Files (Summary Only)
| Repo | Count | Key Directories |
|------|-------|-----------------|
| [repo] | [n] | `_docs/platform/`, `_docs/design/` |
Phase 4 — Consolidation Plan
If not --inventory-only, generate a consolidation plan:
- Map content files to target locations in the centralized docs repo
- Organize by content type, then by source topic/pillar:
docs/
├── articles/
│ ├── [pillar-or-topic]/
│ │ └── [article-slug].md
├── courses/
│ ├── [course-name]/
│ │ ├── week-01.md
│ │ └── ...
├── guides/
│ └── [guide-slug].md
├── frameworks/
│ └── [framework-name].md
├── voice/
│ └── [voice-system].md
├── research/
│ └── [topic]/
├── templates/
│ └── [template-name].html
└── reference/
└── [topic].md
- Preserve provenance — add a YAML frontmatter block to each moved file:
---
source_repo: [repo-name]
source_path: [original/path/in/repo]
consolidated_date: [YYYY-MM-DD]
content_type: [type]
---
- Leave a breadcrumb in the source repo — replace the original file with a pointer:
<!-- This document has been consolidated into the central docs repo -->
<!-- See: docs/[type]/[path] -->
<!-- Consolidated on: [YYYY-MM-DD] -->
Phase 5 — Execute (with confirmation)
CRITICAL: Always ask the user before moving any files.
Present the consolidation plan as a summary table:
## Consolidation Plan
Moving [n] files from [n] repos → [target repo]
| Source | Destination | Type |
|--------|-------------|------|
| alan-hirsch/_docs/PLAYBOOK.md | docs/courses/playbook.md | course |
| ... | ... | ... |
Proceed? (y/n)
If --dry-run, stop here and output the plan without executing.
If the user confirms:
- Create target directories as needed
- Copy files to target locations (copy first, don't move — safer)
- Add provenance frontmatter to copied files
- Replace originals with breadcrumb pointers
- Report results
Rules
- Never move files without explicit user confirmation — even if the classification is high-confidence
- Never touch
node_modules/, dist/, .next/, or build directories — skip them entirely during discovery
- Never modify repo-local files — the skill only reads them for classification
- Always preserve originals — copy to target, then replace with pointer (two separate steps)
- When in doubt, classify as REVIEW — false negatives (missing content) are better than false positives (moving technical docs)
- Read before classifying — if path and filename rules don't give high confidence, read the file. Don't guess.
- Respect
.gitignore — don't scan or move gitignored files
- Handle HTML carefully — many HTML files are design prototypes or build output, not content. Apply stricter classification for
.html files.
- Track what you've done — append a log entry to
{{OUTPUT_DIR}}/DOC_ORGANIZER_LOG.md after each run
Edge Cases
Skill files (my-skills/)
Skills are repo-local — they are code-adjacent tooling, not content to centralize. Always classify as REPO-LOCAL.
Vector store content
Files in _docs/agents/writing_assistant/vector_store/ are REVIEW — they contain content but are consumed by agents in the source repo. Flag for user decision.
HTML prototypes
HTML files in html/ or templates/ directories should be classified as template content type but only moved if they are standalone (not referenced by other files in the repo). Check for import/reference before classifying.
Already-centralized content
If a file already exists in the target docs repo, do not duplicate it. Instead, note it as "already centralized" in the inventory and check if the source copy is newer (potential sync issue to flag).
Monorepo docs directories
Some repos have a top-level docs/ that contains both technical docs and content. Classify each file individually — don't classify the entire directory.
Anti-Patterns
- Don't bulk-move without reading. Every file that isn't obviously classified by path/filename needs to be read.
- Don't create deep nesting. The target structure should be flat within each content type — max 2 levels deep.
- Don't rename files during consolidation. Keep original filenames unless they conflict. If they conflict, prefix with the source repo name.
- Don't consolidate actively-edited files. If a file has been modified in the last 7 days (check git log), flag it as
REVIEW regardless of classification.
- Don't ignore
.html files. Many contain valuable content (consultations, rendered guides). Classify them the same way as markdown.
- Don't treat all
_docs/ content as repo-local. The _docs/ convention is used for both technical docs and content docs — always check the subdirectory and file content.
1---2name: doc-organizer3description: Scans repositories for markdown and HTML documentation, classifies files as repo-local or centralizable content, generates an inventory report, and optionally consolidates content into a centralized docs repository.4---56Organize documentation across: $ARGUMENTS78$ARGUMENTS should include:9- A scope — which repos to scan (default: all repos under `~/Desktop/Dev/repos/`)10- Optionally: `--inventory-only` to skip consolidation and just produce a report11- Optionally: `--dry-run` to show what would be moved without moving anything12- Optionally: a target directory for centralized content (default: `~/Desktop/Dev/repos/docs/`)13- Optionally: specific file types to include (default: `.md` and `.html`)14- Empty — scan everything, ask the user before taking action1516---1718## Purpose1920Repos accumulate documentation over time. Some of it is **repo-local** — tightly coupled to the codebase and must stay where it is. Some of it is **content** — guides, courses, articles, framework explanations, voice references — that could live in a centralized location where it's discoverable and maintainable.2122This skill draws that line, produces a clear inventory, and (with the user's approval) consolidates content docs into a single hub.2324---2526## Classification System2728Every `.md` and `.html` file falls into one of two categories:2930### Category A — Repo-Local (STAYS)3132These documents are coupled to the code, infrastructure, or development workflow. Moving them would break references or lose context.3334**Path-based signals (high confidence):**35- Inside `.claude/`, `.agents/`, `.github/`, `.vscode/`, `.cursor/`36- Inside `node_modules/`, `dist/`, `.next/`, `build/`, `out/`, `.turbo/`37- Inside `_docs/platform/`, `_docs/design/`, `_docs/type/`, `_docs/ui/`38- Inside `_docs/agents/` (agent configuration, not agent-generated content)39- Inside `_docs/architecture/` (app-architect output — implementation specs)40- Inside `_prompts/` or `_bootstrap/`4142**Filename-based signals (high confidence):**43- `README.md`, `CONTRIBUTING.md`, `CHANGELOG.md`, `LICENSE.md`, `CODE_OF_CONDUCT.md`44- `CLAUDE.md`, `AGENTS.md`, any file starting with `_` (convention for internal docs)45- `package.json`-adjacent docs (e.g., `MIGRATION.md`, `UPGRADE.md`)46- Files matching: `*SCHEMA*`, `*API*`, `*VALIDATION*`, `*INVENTORY*`, `*STATUS*`47- Files matching: `*IMPLEMENTATION*`, `*BOOTSTRAP*`, `*PROMPT*`, `*CONFIG*`4849**Content-based signals (use when path/filename are ambiguous):**50- References specific code files, functions, or imports51- Contains schema definitions, type annotations, or API endpoint documentation52- Contains checklists tied to build/deploy steps53- Contains component inventories or page route tables54- Contains environment variable documentation55- Written for developers as the primary audience5657### Category B — Centralizable Content (MOVES)5859These documents are **content assets** — they teach, explain, narrate, or guide. They're valuable independent of any single codebase.6061**Path-based signals (high confidence):**62- Inside directories named: `content/`, `articles/`, `guides/`, `courses/`, `pathways/`63- Inside directories named: `voice/`, `writing/`, `corpus/`, `lab/`, `knowledge/`64- Inside `_docs/` but not in platform/design/type/agents/architecture subdirectories6566**Filename-based signals (high confidence):**67- Files matching: `*PLAYBOOK*`, `*GUIDE*`, `*COURSE*`, `*ARTICLE*`68- Files matching: `*VOICE*`, `*FRAMEWORK*`, `*MANIFESTO*`69- Files matching: `*TEACHING*`, `*FORMATION*`, `*PEDAGOGY*`70- Files containing version/chapter numbers (e.g., `week-01.md`, `chapter-3.md`)7172**Content-based signals (use when path/filename are ambiguous):**73- Narrative prose (paragraphs, not bullet checklists)74- Pedagogical structure (dissonance → action → reflection)75- Framework explanations (mDNA, APEST, Forgotten Ways, etc.)76- Case studies, stories, illustrations77- Written for learners, readers, or a general audience78- Contains no code references, schema definitions, or API documentation79- Could be published on a blog, in a course, or as a standalone document8081### Category C — Bridging Documents (FLAG FOR REVIEW)8283Some files serve both purposes. Flag these for the user to decide.8485**Signals:**86- Agent prompts that generate content (in `_prompts/` but about content strategy)87- Design consultations that contain both specs and narrative (e.g., `COPY_CONSULTATION.html`)88- Inventories that mix content assets with technical components89- Vector store source material (agent-consumed but content in nature)9091---9293## Execution Process9495### Phase 1 — Discovery96971. **List all repos** under the scan scope982. **Glob for documentation files** in each repo:99 - `**/*.md` (excluding `node_modules/`, `dist/`, `.next/`, `build/`, `.turbo/`)100 - `**/*.html` (excluding `node_modules/`, `dist/`, `.next/`, `build/`, `.turbo/`)1013. **Exclude known noise:**102 - Lock files, generated changelogs, auto-generated API docs103 - Build output directories104 - Dependency directories105106### Phase 2 — Classification107108For each file:1091101. **Apply path-based rules first** (highest confidence, cheapest to evaluate)1112. **Apply filename-based rules** (high confidence)1123. **If still ambiguous, read the first 50 lines** and apply content-based rules1134. **Assign a classification:**114 - `REPO-LOCAL` — stays in place115 - `CONTENT` — candidate for centralization116 - `REVIEW` — needs human decision1175. **Assign a content type** (for CONTENT files):118 - `guide` — how-to, tutorial, walkthrough119 - `article` — blog post, essay, thought piece120 - `course` — course material, lesson, module121 - `framework` — conceptual framework documentation122 - `voice` — voice system, writing style, tone reference123 - `research` — research notes, content research, interviews124 - `template` — HTML template, design prototype (for `.html` files)125 - `reference` — reference material, glossary, definitions126 - `other` — doesn't fit the above127128### Phase 3 — Inventory Report129130Generate a comprehensive inventory. Output as a markdown file at `{{OUTPUT_DIR}}/DOC_INVENTORY.md`:131132```markdown133# Documentation Inventory134135**Scanned:** [date]136**Scope:** [repos scanned]137**Total files:** [count]138139## Summary140141| Category | Count | Percentage |142|----------|-------|------------|143| Repo-Local | [n] | [%] |144| Content (Centralizable) | [n] | [%] |145| Needs Review | [n] | [%] |146147## Content Files by Type148149| Type | Count | Repos Found In |150|------|-------|----------------|151| guide | [n] | [repo1, repo2] |152| article | [n] | [repo1] |153| course | [n] | [repo1, repo3] |154| ... | ... | ... |155156## Content Files — Full List157158### [Repo Name]159160| File | Type | Confidence | Notes |161|------|------|------------|-------|162| `path/to/file.md` | guide | high | [brief note] |163| `path/to/file.md` | article | medium | [brief note] |164165### [Next Repo]166...167168## Needs Review169170| File | Reason |171|------|--------|172| `path/to/file.md` | Bridges content and technical docs |173| `path/to/file.html` | Design consultation with narrative content |174175## Repo-Local Files (Summary Only)176177| Repo | Count | Key Directories |178|------|-------|-----------------|179| [repo] | [n] | `_docs/platform/`, `_docs/design/` |180```181182### Phase 4 — Consolidation Plan183184If not `--inventory-only`, generate a consolidation plan:1851861. **Map content files to target locations** in the centralized docs repo1872. **Organize by content type**, then by source topic/pillar:188 ```189 docs/190 ├── articles/191 │ ├── [pillar-or-topic]/192 │ │ └── [article-slug].md193 ├── courses/194 │ ├── [course-name]/195 │ │ ├── week-01.md196 │ │ └── ...197 ├── guides/198 │ └── [guide-slug].md199 ├── frameworks/200 │ └── [framework-name].md201 ├── voice/202 │ └── [voice-system].md203 ├── research/204 │ └── [topic]/205 ├── templates/206 │ └── [template-name].html207 └── reference/208 └── [topic].md209 ```2103. **Preserve provenance** — add a YAML frontmatter block to each moved file:211 ```yaml212 ---213 source_repo: [repo-name]214 source_path: [original/path/in/repo]215 consolidated_date: [YYYY-MM-DD]216 content_type: [type]217 ---218 ```2194. **Leave a breadcrumb** in the source repo — replace the original file with a pointer:220 ```markdown221 <!-- This document has been consolidated into the central docs repo -->222 <!-- See: docs/[type]/[path] -->223 <!-- Consolidated on: [YYYY-MM-DD] -->224 ```225226### Phase 5 — Execute (with confirmation)227228**CRITICAL: Always ask the user before moving any files.**229230Present the consolidation plan as a summary table:231232```233## Consolidation Plan234235Moving [n] files from [n] repos → [target repo]236237| Source | Destination | Type |238|--------|-------------|------|239| alan-hirsch/_docs/PLAYBOOK.md | docs/courses/playbook.md | course |240| ... | ... | ... |241242Proceed? (y/n)243```244245If `--dry-run`, stop here and output the plan without executing.246247If the user confirms:2481. Create target directories as needed2492. Copy files to target locations (copy first, don't move — safer)2503. Add provenance frontmatter to copied files2514. Replace originals with breadcrumb pointers2525. Report results253254---255256## Rules257258- **Never move files without explicit user confirmation** — even if the classification is high-confidence259- **Never touch `node_modules/`, `dist/`, `.next/`, or build directories** — skip them entirely during discovery260- **Never modify repo-local files** — the skill only reads them for classification261- **Always preserve originals** — copy to target, then replace with pointer (two separate steps)262- **When in doubt, classify as REVIEW** — false negatives (missing content) are better than false positives (moving technical docs)263- **Read before classifying** — if path and filename rules don't give high confidence, read the file. Don't guess.264- **Respect `.gitignore`** — don't scan or move gitignored files265- **Handle HTML carefully** — many HTML files are design prototypes or build output, not content. Apply stricter classification for `.html` files.266- **Track what you've done** — append a log entry to `{{OUTPUT_DIR}}/DOC_ORGANIZER_LOG.md` after each run267268---269270## Edge Cases271272### Skill files (my-skills/)273Skills are **repo-local** — they are code-adjacent tooling, not content to centralize. Always classify as `REPO-LOCAL`.274275### Vector store content276Files in `_docs/agents/writing_assistant/vector_store/` are **REVIEW** — they contain content but are consumed by agents in the source repo. Flag for user decision.277278### HTML prototypes279HTML files in `html/` or `templates/` directories should be classified as `template` content type but only moved if they are standalone (not referenced by other files in the repo). Check for import/reference before classifying.280281### Already-centralized content282If a file already exists in the target docs repo, **do not duplicate it**. Instead, note it as "already centralized" in the inventory and check if the source copy is newer (potential sync issue to flag).283284### Monorepo docs directories285Some repos have a top-level `docs/` that contains both technical docs and content. Classify each file individually — don't classify the entire directory.286287---288289## Anti-Patterns290291- **Don't bulk-move without reading.** Every file that isn't obviously classified by path/filename needs to be read.292- **Don't create deep nesting.** The target structure should be flat within each content type — max 2 levels deep.293- **Don't rename files during consolidation.** Keep original filenames unless they conflict. If they conflict, prefix with the source repo name.294- **Don't consolidate actively-edited files.** If a file has been modified in the last 7 days (check git log), flag it as `REVIEW` regardless of classification.295- **Don't ignore `.html` files.** Many contain valuable content (consultations, rendered guides). Classify them the same way as markdown.296- **Don't treat all `_docs/` content as repo-local.** The `_docs/` convention is used for both technical docs and content docs — always check the subdirectory and file content.