---
name: myai-dev-docs
description: Generate documentation from code that is accurate to what the code does
---

Document a feature, API, or system.

Invoke the `myaidev-documenter` skill for the full pipeline — code analysis, parallel
writing, then validation. For a single document, invoke the `dev-documenter` agent.

## Usage

```bash
/myai-dev-docs "Document the public API"
/myai-dev-docs --type=readme
/myai-dev-docs --type=changelog --since=v1.2.0
```

## Options

| Option | Description | Default |
|--------|-------------|---------|
| `--type` | `api`, `readme`, `architecture`, `changelog`, `guide` | inferred |
| `--audience` | `consumer`, `contributor`, `operator` | `consumer` |

## What It Does

1. Reads the source for every fact it will state — signatures, defaults, error cases
2. Takes examples from tests where they exist, since those are verified to run
3. Updates existing documents in place rather than adding a parallel copy
4. Verifies every signature matches the code and every example would actually run

Where the code and an existing doc disagree, the code wins and the correction is recorded.

## Output

Updated documentation in the project's existing location and style, plus
`{session_dir}/docs/summary.md` listing what was written, what was corrected, and what
could not be documented.
