Generate AI-agent-ready documentation using Dewey. Use when asked to "set up docs", "create documentation", "make docs agent-friendly", "generate AGENTS.md", or "add llms.txt".
Dewey generates AI-agent-ready documentation for software projects. It creates AGENTS.md, llms.txt, docs.json, and install.md files that AI coding agents can consume effectively.
Activate this skill when the user asks to:
pnpm add @arach/dewey
# or
npm install @arach/dewey
| Command | Purpose |
|---|---|
dewey init |
Create docs/ folder and dewey.config.ts |
dewey audit |
Check documentation completeness |
dewey generate |
Create AGENTS.md, llms.txt, docs.json, install.md |
dewey agent |
Score agent-readiness (0-100 scale) |
# 1. Install
pnpm add @arach/dewey
# 2. Initialize
npx dewey init
# 3. Generate agent files
npx dewey generate
This creates:
docs/
āāā overview.md
āāā quickstart.md
āāā AGENTS.md # Combined agent context
āāā llms.txt # Plain text summary
dewey.config.ts # Configuration
import { defineConfig } from '@arach/dewey'
export default defineConfig({
project: {
name: 'my-project',
tagline: 'A brief description',
type: 'npm-package', // or 'cli-tool', 'macos-app', 'react-library', 'monorepo', 'generic'
},
agent: {
// Critical rules agents MUST follow
criticalContext: [
'Always use TypeScript',
'Run tests before committing',
],
// Key directories for navigation
entryPoints: {
'Source': 'src/',
'Tests': 'tests/',
'Config': 'config/',
},
// Pattern-based instructions
rules: [
{ pattern: '*.test.ts', instruction: 'Use vitest for testing' },
{ pattern: 'src/api/*', instruction: 'Follow REST conventions' },
],
// Docs to include in AGENTS.md
sections: ['overview', 'quickstart', 'api'],
},
docs: {
path: './docs',
output: './',
required: ['overview.md', 'quickstart.md'],
},
// For install.md generation (installmd.org standard)
install: {
objective: 'Set up the development environment',
doneWhen: {
command: 'npm test',
expectedOutput: 'All tests passed',
},
prerequisites: ['Node.js 18+', 'pnpm'],
steps: [
{ description: 'Install dependencies', command: 'pnpm install' },
{ description: 'Run tests', command: 'pnpm test' },
],
},
})
| Type | Best For |
|---|---|
npm-package |
Published npm packages |
cli-tool |
Command-line tools |
macos-app |
macOS applications |
react-library |
React component libraries |
monorepo |
Multi-package workspaces |
generic |
Other projects |
Combined documentation with critical context for AI agents:
Plain text summary optimized for LLM context windows:
Structured JSON for programmatic access:
LLM-executable installation instructions following installmd.org:
curl url/install.md | claudeEach doc page should have two versions:
docs/
āāā overview.md # Human-readable (prose, examples)
āāā agent/
ā āāā overview.agent.md # Agent-optimized (dense, structured)
Agent versions should be:
Dewey provides 22 components for building documentation sites:
DocsApp - Complete docs site with routingDocsLayout - Main layout (sidebar, TOC, navigation)Header - Sticky header with theme toggleSidebar - Left navigation panelTableOfContents - Right minimap with scroll-spyMarkdownContent - Renders markdown with syntax highlightingCodeBlock - Code with copy buttonCallout - Alert boxes (info, warning, tip, danger)Tabs - Tabbed contentSteps - Numbered instructionsCard, CardGrid - Content cardsFileTree - Directory visualizerApiTable - Props/params tableBadge - Status indicatorsAgentContext - Collapsible agent content blockPromptSlideout - Interactive prompt editorCopyButtons - "Copy for AI" buttonDeweyProvider - Theme and component contextimport { DeweyProvider } from '@arach/dewey'
<DeweyProvider theme="neutral">
{/* Your docs */}
</DeweyProvider>
Available themes:
neutral | ocean | emerald | purple | dusk | rose | github | warm
Dewey includes LLM prompt templates for documentation workflows:
Reviews documentation quality, catches drift from codebase:
import { docsReviewAgent } from '@arach/dewey'
const prompt = docsReviewAgent.reviewPage
.replace('{DOC_FILE}', 'docs/api.md')
.replace('{SOURCE_FILES}', 'src/types/index.ts')
.replace('{OUTPUT_FILE}', '.dewey/reviews/api.md')
Generates install.md files following installmd.org standard.
Creates interactive prompt configs for PromptSlideout components.
npx dewey initdocs/docs/agent/*.agent.md with structured contentdewey.config.tsnpx dewey generate creates AGENTS.md, llms.txt, etc.npx dewey audit checks completenessnpx dewey agent rates agent-readiness (target: 80+)Human version (docs/api.md):
# API Reference
The API provides methods for managing users...
## createUser(options)
Creates a new user with the specified options.
### Parameters
- `name` - The user's display name
- `email` - Email address (must be unique)
Agent version (docs/agent/api.agent.md):
# API Reference
## createUser
| Param | Type | Required | Default |
|-------|------|----------|---------|
| name | string | yes | - |
| email | string | yes | - |
| role | 'admin' \| 'user' | no | 'user' |
Returns: `Promise<User>`
Throws: `DuplicateEmailError` if email exists
When setting up Dewey for a project:
dewey.config.ts with appropriate project typedewey init to scaffold docs structuredewey generatedewey agent (target score: 80+)