Skip to content

Conversation

@nicknisi
Copy link
Member

@nicknisi nicknisi commented Jan 21, 2026

Summary

  • Adds scripts/generate-docs.ts to generate machine-readable documentation for AI coding agents
  • Generates artifacts in dist/docs/ during build via postbuild hook

Output Structure

dist/docs/
├── SKILL.md           # Entry point with YAML frontmatter
├── README.md          # Navigation overview
├── SOURCE_MAP.json    # Export → file → line number mapping (29 exports, 14 interfaces)
└── topics/
    ├── 01-getting-started.md
    ├── 02-setup.md
    ├── 03-middleware.md
    ├── 04-client-components.md
    ├── 05-session-management.md
    └── 06-api-reference.md

Notes

This follows the embedded docs pattern from Mastra. The docs are generated but discovery requires either:

  • An MCP server that knows to look for dist/docs/
  • Manual reference in consumer projects
  • Future tooling adoption of this convention
  • A custom skill that knows where to look

Generate machine-readable docs in dist/docs/ during build:
- SKILL.md: Entry point with YAML frontmatter
- SOURCE_MAP.json: Export → type → implementation mapping with line numbers
- topics/: Documentation extracted from README.md

Adds postbuild hook to run generation automatically.
@nicknisi nicknisi requested a review from a team as a code owner January 21, 2026 12:27
@nicknisi nicknisi requested a review from faroceann January 21, 2026 12:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants