Read this file FIRST. Follow phases in order. Do NOT skip phases. Each phase builds on the previous one.
You are installing an Obsidian-compatible documentation system into this repository. You will:
- Analyze the repo (do NOT assume anything)
- Design a doc tree tailored to this specific codebase
- Implement docs, hub, stable rules, and decisions log
- Optimize links in
CLAUDE.mdanddocs/for graph cleanliness and token efficiency - Clean up installer artifacts and obsolete files (optional, user-approved)
Execute all work with this model:
- Installer core (required): keep phase order, approval gates, stable rules separation, migration safety, and validation checklists
- Inspired layer (recommended): create small focused docs, preserve meaningful cross-links, keep docs as living knowledge, and write context/rationale first
Do not treat the inspired layer as a replacement for installer core requirements.
- Do NOT create empty placeholder files — every doc must have real content
- Do NOT duplicate information — link to existing docs instead of copying
- Do NOT hardcode assumptions — analyze the repo to discover its structure
- Do NOT skip human approval — present your design before implementing
- Do NOT overwrite existing docs unless the human explicitly approves
- Do NOT mix stable rules into CLAUDE.md — keep stable rules in
./.claude/rules/ - Do NOT create low-signal doc sprawl — every new doc must have clear value and maintenance intent
- Do NOT replace rationale with file summaries — capture why/tradeoffs, not only where code lives
Choose one mode before Phase 2 and include it in the design proposal.
- Create the standard category structure from [[README]]:
project,architecture,features,integrations,build,testing,reference - Create at least one real-content doc in each category, or explicitly link existing docs that satisfy the category
- Use this mode when the human expects the full standardized structure
- Keep the current behavior from [[PRINCIPLES]]: create only categories justified by the repo analysis
- Skip non-applicable categories
- Use this mode when minimal, structure-following documentation is preferred
If the human does not specify a mode, default to strict.
| Phase | File | Description |
|---|---|---|
| 1: ANALYZE | [[PHASES/01-analyze]] | Explore repo structure, identify key folders, subsystems, entry points |
| 2: DESIGN | [[PHASES/02-design]] | Propose doc tree, CLAUDE.md outline, migration plan |
| 3: IMPLEMENT | [[PHASES/03-implement]] | Create docs, write content, add links, set up hub, stable rules, and decisions log |
| 4: OPTIMIZE LINKS | [[PHASES/04-optimize-links]] | Final link-quality pass: remove duplicate/valueless links, keep graph clean |
| 5: CLEANUP | [[PHASES/05-cleanup]] | Remove installer artifacts and obsolete files (after human approval) |
- Read [[PRINCIPLES]] to understand the design philosophy
- Read [[PHASES/01-analyze]] and execute it fully
- Present your analysis to the human, wait for acknowledgment
- Read [[PHASES/02-design]] and execute it fully
- Present your proposed doc tree to the human, wait for approval
- Read [[PHASES/03-implement]] and execute it fully
- Ensure
decisions.mdis updated with notable design choices from Phase 3 - Present the result for final review
- Read [[PHASES/04-optimize-links]] and run the link optimization pass
- Read [[PHASES/05-cleanup]] and execute it after human approves the review
Before moving to the next phase, verify:
- Systematic: required phase outputs and checks are complete
- Flexible: chosen docs reflect repo reality, not template pressure
- Signal over volume: no unnecessary doc proliferation
- Rationale present: important docs include context/decision reasoning
Use files in [[TEMPLATES/]] as structure guides. Each template defines:
- What sections a doc type should have
- What questions it should answer
- How it should link to other docs
| Template | Purpose |
|---|---|
| [[TEMPLATES/architecture-doc]] | Structural patterns and subsystem design |
| [[TEMPLATES/build-doc]] | Build process, packaging, release |
| [[TEMPLATES/feature-doc]] | User-facing feature workflows |
| [[TEMPLATES/hub-claude-md]] | CLAUDE.md hub structure |
| [[TEMPLATES/index-doc]] | Documentation navigation hub |
| [[TEMPLATES/integration-doc]] | External tools and libraries |
| [[TEMPLATES/migration-map]] | Section-by-section migration mapping (AGENTS.md and other docs) |
| [[TEMPLATES/project-doc]] | Project-level knowledge |
| [[TEMPLATES/reference-doc]] | Config, constants, conventions |
| [[TEMPLATES/testing-doc]] | Testing strategy and conventions |
Templates are NOT pre-filled content. You must fill them with real information from the repo.
High-level verification — see [[PHASES/03-implement]] for the full detailed checklist.
- All approved docs created with real content
- CLAUDE.md and docs/_index.md created as hubs
- Stable rules created/updated in
./.claude/rules/ -
decisions.mdcreated/updated with key design decisions - Mode requirements satisfied (
strictfull standard categories ORadaptivejustified subset) - Wiki links connect related docs
- AGENTS.md migration coverage is 100% (if AGENTS.md exists)
- No critical information from AGENTS.md is lost
- No empty placeholder files or hardcoded assumptions
- Link optimization completed for
CLAUDE.md+docs/(duplicate/valueless links removed) - Cleanup completed (installer and obsolete files removed or preserved per user choice)
- Hybrid practicality gate passed at each phase (systematic + flexible + high-signal + rationale-first)
Installation is complete only when all of the following are true:
CLAUDE.mdexists and is usable as the project hubdocs/_index.mdexists and links to the full documentation set- Stable rules exist in
./.claude/rules/and are referenced byCLAUDE.md decisions.mdexists for persistent design rationale- Core docs exist per selected mode:
strict: all standard categories from [[README]] are representedadaptive: only analysis-justified categories are present (with rationale in Phase 2 output)
- If
AGENTS.mdexists, all meaningful sections are mapped and migrated with evidence - Final link optimization pass completed on
CLAUDE.md+docs/ - Cleanup completed (installer and obsolete files removed or preserved per user choice)
- Post-install validation checklist is complete with no unresolved critical failures
- Hybrid model is respected: installer core preserved and inspired layer applied without drift
updating-docsskill installed at./.claude/skills/updating-docs/SKILL.mdand referenced byCLAUDE.mdRead First
Run this checklist before closing the installation:
-
CLAUDE.mdexists and links to[[docs/_index]] -
CLAUDE.mdincludes an authoritative directory tree -
docs/_index.mdlinks to every created doc - Every created doc has real content (no placeholders)
- Every created doc has at least 2 useful related links
- No broken wiki links to missing files
- Selected mode validation passed (
strictoradaptive) - Stable rules are placed in
./.claude/rules/(not mixed into CLAUDE.md) -
updating-docsskill installed at./.claude/skills/updating-docs/SKILL.md -
updating-docsskill referenced byCLAUDE.mdRead First section -
decisions.mdrecords key design choices - Verification command for affected stack passed (
tsc --noEmitfor TypeScript repos) - Work was committed in issue-scoped chunks
-
CLAUDE.mdwas updated at end of session - AGENTS.md migration coverage report included (if AGENTS.md exists)
- Duplicate/valueless wiki links were removed from
CLAUDE.mdanddocs/ - Cleanup decisions were human-approved item by item
- Link graph remains navigable and hub docs are still connected
- No low-signal doc sprawl or duplicate-topic docs were introduced
- Key docs include context/rationale where code alone is insufficient
If the repo is a single-file project or lacks identifiable directories:
- Create a minimal doc tree:
CLAUDE.md+docs/_index.md+docs/project/overview.md - Skip categories that don't apply (no architecture doc if there's no architecture)
- Read the existing CLAUDE.md first
- Preserve its content — merge with the new structure rather than overwriting
- Add the Documentation Map and Doc Workflow sections if missing
- Present the merge plan to the human for approval
- Report what you could and could not determine
- Mark uncertain findings explicitly
- Proceed with what you know — the human can fill gaps during the approval step
- Identify entry points based on the framework's conventions
- Note the unfamiliar stack in your analysis
- Use the generic [[PRINCIPLES]] guidelines — they apply to any stack
- Never delete existing docs without human approval
- Link existing docs from the new navigation hub
- Propose a migration plan in Phase 2
- Do NOT proceed to Phase 3 until every meaningful AGENTS.md section is mapped to a destination
- Use [[TEMPLATES/migration-map]] to track section-level coverage
- Mark unknown or risky mappings explicitly and escalate to the human
- [[README]] — Project overview and usage guide
- [[PRINCIPLES]] — Design philosophy that governs all decisions
- [[CONTRIBUTING]] — How to contribute changes
- [[CHANGELOG]] — Version history
- [[.claude/skills/updating-docs]] — Generic doc-update skill shipped with this installer
Start by reading [[PRINCIPLES]], then [[PHASES/01-analyze]].