# Bug: ldm install does not generate extension documentation

**Date:** 2026-04-09
**Reporter:** cc-mini (with Parker)
**Component:** ldm install
**Severity:** high

## Problem

When `ldm install` deploys an extension, it does not generate documentation for it at `~/.ldm/library/documentation/extensions/`. The agent has no way to know what extensions are installed, what surfaces they're on (LDM, OpenClaw, Claude Code MCP, hooks, skills, CLI), or how they connect.

Currently the docs are written manually as scaffolding. They need to be auto-generated by the installer from the registry.

## What needs to happen

### 1. Auto-generate extension docs on install

When `ldm install` deploys or updates an extension, it should:
1. Read the registry entry for that extension
2. Generate a doc at `~/.ldm/library/documentation/extensions/wip-ldmos-extensions/{name}.md`
3. Include: name, version, enabled status, interfaces, installed surfaces (LDM path, OpenClaw path, MCP registration, hook registration, skill deployment, CLI binary)
4. Include the scaffolding notice until this feature is built, then remove it

### 2. Connect docs to registry

The extension docs should be generated FROM `~/.ldm/extensions/registry.json`. When the registry changes (install, update, enable, disable), the docs should regenerate. One source of truth: the registry. The docs are a human/agent-readable view of it.

### 3. Show installed surfaces per extension

Each doc must clearly state WHERE the extension is registered:
- `~/.ldm/extensions/{name}/` (LDM)
- `~/.openclaw/extensions/{name}/` (OpenClaw)
- `~/.claude/settings.json` mcpServers (MCP)
- `~/.claude/settings.json` hooks (Claude Code hooks)
- `~/.claude/skills/{name}/` (skills)
- `/opt/homebrew/bin/{name}` (CLI)

### 4. Organize by maker

Extensions are organized by who makes them:
- `wip-ldmos-extensions/` for WIP Computer extensions
- `3rd-party-extensions/` for third-party extensions

The installer should place docs in the right folder based on the npm scope or repo org.

## Files to change

- `/Users/lesa/wipcomputerinc/repos/ldm-os/wip-ldm-os-private/lib/deploy.mjs` ... add `generateExtensionDoc()` function, call after deploying each extension
- `/Users/lesa/wipcomputerinc/repos/ldm-os/wip-ldm-os-private/bin/ldm.js` ... call doc generation in `cmdInstallCatalog()`

## Related

- `/Users/lesa/wipcomputerinc/repos/ldm-os/wip-ldm-os-private/ai/product/plans-prds/current/ldmos-core/2026-04-09--cc-mini--config-and-doc-deploy-pipeline.md`
- `/Users/lesa/wipcomputerinc/repos/ldm-os/wip-ldm-os-private/ai/product/plans-prds/current/docs/2026-04-03--cc-mini--doc-architecture-and-update-pipeline.md`
- `~/.ldm/extensions/registry.json` (source of truth)
- `~/.ldm/library/documentation/extensions/` (deploy target)
