Create comprehensive technical reference documentation with complete specifications
Generates comprehensive technical reference documentation for any system, API, CLI, or configuration.
/plugin marketplace add oskar-dragon/claude-code/plugin install documentation@claude-code[system/API to document] [--api|--config|--cli|--complete]You are in the REFERENCE phase of the Diataxis documentation workflow. Your mission is to create comprehensive, accurate, information-oriented documentation that serves as the authoritative source of technical truth.
ā ļø IMPORTANT: This command is for creating REFERENCE documentation ONLY. Focus exclusively on:
docs/reference/[topic-slug].md$ARGUMENTS
If no specific system was provided above, ask the user: "What system, API, or technical component needs reference documentation?"
Deploy concurrent documentation specialists: @docs-reference-agent @documentation-agent @code-archaeologist @test-generator
All subagents work in parallel to create comprehensive reference:
## Documentation Scope
### System Overview
- **Name**: [System/API name]
- **Version**: [Version number]
- **Type**: [API/CLI/Configuration/Library]
- **Purpose**: [One-line description]
### Coverage
- Components documented: [count]
- Parameters documented: [count]
- Examples provided: [count]
- Last updated: [date]
## Reference Structure
### Top-Level Organization
1. Overview
2. Core Concepts
3. [Component/Module A]
4. [Component/Module B]
5. Configuration
6. API Reference
7. Error Codes
8. Glossary
9. Index
### Entry Template
Each entry follows:
- Name and signature
- Description
- Parameters/Options
- Return values/Output
- Examples
- Related entries
## API Reference
### Endpoints / Functions / Commands
#### `functionName(parameters)`
**Description**: Brief description of what it does
**Signature**:
```language
returnType functionName(
param1: type,
param2: type = defaultValue,
*args,
**kwargs
)
```
Parameters:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| param1 | string | Yes | - | Description of param1 |
| param2 | number | No | 10 | Description of param2 |
Returns:
| Type | Description |
|---|---|
| object | Description of return value |
Exceptions:
| Exception | When Raised |
|---|---|
| ValueError | When input is invalid |
| KeyError | When key not found |
Example:
# Basic usage
result = functionName("value", 20)
# With optional parameters
result = functionName(
param1="value",
param2=30,
extra_option=True
)
See Also:
### Step 4: Configuration Reference
```markdown
## Configuration Reference
### Configuration File Structure
```yaml
# config.yaml
system:
setting1: value # Required
setting2: value # Optional, default: X
subsystem:
option1: value # Required
option2: [] # Optional, default: empty
system.setting1value1: Descriptionvalue2: Descriptionsystem.setting1: value1system.subsystem.option1system.subsystem.option2
### Step 5: CLI Reference
```markdown
## Command-Line Interface
### Global Options
```bash
command [global-options] <subcommand> [options] [arguments]
| Option | Short | Description | Default |
|---|---|---|---|
| --verbose | -v | Increase output verbosity | False |
| --config FILE | -c | Specify configuration file | ./config.yaml |
command createCreate a new resource.
Synopsis:
command create [options] <name>
Arguments:
<name>: Name of the resource to create (required)Options:
| Option | Description | Default |
|---|---|---|
| --type TYPE | Resource type | standard |
| --force | Overwrite if exists | False |
Examples:
# Create with defaults
command create myresource
# Create with options
command create --type advanced --force myresource
Exit Codes:
0: Success1: General error2: Invalid arguments
## Reference Deliverables
### Output File Location
All reference documentation will be generated in the `docs/reference/` directory with descriptive filenames based on the component being documented.
### Reference Template Structure
```markdown
# [System Name] Reference
## Overview
[Brief description and version information]
## Quick Reference
### Most Common Operations
| Operation | Command/Method | Description |
|-----------|---------------|-------------|
| [Common 1] | `syntax` | Brief description |
| [Common 2] | `syntax` | Brief description |
## Complete Reference
### Module: [Module Name]
#### Class: `ClassName`
##### Constructor
```language
new ClassName(param1, param2)
methodName(params)[Complete documentation following template]
[Complete configuration documentation]
| Code | Name | Description | Resolution |
|---|---|---|---|
| E001 | ErrorName | What causes it | How to fix |
type TypeName = {
field1: type;
field2?: type;
}
[Alphabetical list of all parameters]
[List of deprecated features]
[Changes across versions]
[Alphabetical index of all entries]
## Reference Best Practices
### DO:
- ā
Document EVERY parameter and option
- ā
Use consistent structure throughout
- ā
Provide accurate type information
- ā
Include valid ranges and defaults
- ā
Show working examples
- ā
Cross-reference related items
- ā
Maintain version information
- ā
Use tables for structured data
### DON'T:
- ā Include tutorials or how-to content
- ā Explain concepts at length
- ā Omit edge cases or limitations
- ā Use inconsistent formatting
- ā Leave parameters undocumented
- ā Include outdated information
- ā Mix reference with guidance
## Quality Checklist
Before finalizing reference documentation:
- [ ] Every feature/parameter documented
- [ ] Consistent structure throughout
- [ ] All examples tested and working
- [ ] Type information complete
- [ ] Default values specified
- [ ] Valid ranges/values listed
- [ ] Error codes documented
- [ ] Cross-references accurate
- [ ] Version information current
- [ ] Index/search optimized
## Usage Examples
```bash
# Basic reference generation
/diataxis-reference "REST API endpoints"
# Specify documentation type
/diataxis-reference "database configuration" --config
/diataxis-reference "CLI tool" --cli
/diataxis-reference "Python library" --api
/diataxis-reference "entire system" --complete
# Specific components
/diataxis-reference "authentication module"
/diataxis-reference "payment processing API"
Tutorial ā How-to ā Reference (You are here) ā Explanation
Learning ā Doing ā Looking up ā Understanding
### GET /api/resource/{id}
**Description**: Retrieve a specific resource
**Parameters**:
- Path: `id` (required) - Resource identifier
- Query: `include` (optional) - Related data to include
**Response**: 200 OK
```json
{
"id": "string",
"data": {}
}
```
### Configuration Pattern
```markdown
### setting.name
- **Type**: string|number|boolean
- **Default**: value
- **Environment**: SETTING_NAME
- **Description**: What it controls
### command [options] <required> [optional]
Options:
--flag, -f Description
Arguments:
required Description
optional Description (default: value)
Upon completion, generate docs/reference/[topic-slug].md containing:
Remember: Your job is to be the authoritative source of technical truth!
š« DO NOT: Explain why, provide tutorials, omit details ā DO: Document everything, maintain consistency, ensure accuracy, optimize lookup