Guidelines for creating technical specification and API reference documentation. Use when writing factual, complete content about data models, API contracts, and configuration options.
This skill provides guidelines for creating reference documentation - information-oriented technical specifications in the Diataxis framework.
Reference documentation provides factual information for lookup. Users consult it when they need specific details about APIs, configuration, data models, etc.
"I need to look up Y."
| Attribute | Description |
|---|---|
| Orientation | Information |
| Focus | Accuracy and completeness |
| Goal | Provide facts for lookup |
| Tone | Austere, precise, neutral |
docs/reference/ - General reference (API, CLI, config)docs/reference/api/ - API documentationdocs/technical/ - Technical specifications, data modelsReference docs should work regardless of implementation. Focus on:
| DO Document | DON'T Document |
|---|---|
| Data requirements | UI components |
| API contracts | Framework-specific code |
| Validation rules | State management |
| Error codes | CSS/styling |
| Business logic | Route configuration |
Test: "Could a developer use this to build a CLI that does the same thing?"
Use this template when creating technical specification documentation:
# [Feature/Component] Specification
*Last updated: [YYYY-MM-DD]*
*Version: [X.Y.Z]*
## Overview
[1-2 sentences describing what this document specifies]
## Requirements
### Functional Requirements
| ID | Requirement | Priority |
|----|-------------|----------|
| FR-1 | [Requirement description] | [Must/Should/Could] |
| FR-2 | [Requirement description] | [Must/Should/Could] |
### Non-Functional Requirements
| ID | Requirement | Metric |
|----|-------------|--------|
| NFR-1 | [Performance/Security/etc.] | [Measurable target] |
## Data Model
### [Entity Name]
| Field | Type | Required | Description |
|-------|------|----------|-------------|
| id | string | Yes | Unique identifier |
| [field] | [type] | [Yes/No] | [Description] |
| [field] | [type] | [Yes/No] | [Description] |
### Relationships
[Entity A] 1──────* [Entity B]
│
└──────1 [Entity C]
## API Contract
### [Endpoint/Method Name]
**Endpoint:** `[METHOD] /path/to/resource`
**Request:**
{
"[field]": "[type] - [description]"
}
**Response:**
{
"[field]": "[type] - [description]"
}
**Errors:**
| Status | Code | Description |
|--------|------|-------------|
| 400 | INVALID_INPUT | [When this occurs] |
| 404 | NOT_FOUND | [When this occurs] |
## Validation Rules
| Field | Rule | Error Message |
|-------|------|---------------|
| [field] | [validation rule] | [user-facing message] |
## Constraints
- [Constraint 1 - e.g., Maximum 100 items per request]
- [Constraint 2 - e.g., Field X must be unique per user]
## Dependencies
| Dependency | Type | Purpose |
|------------|------|---------|
| [Service/Component] | [Internal/External] | [Why needed] |
## Security Considerations
- [Security requirement 1]
- [Security requirement 2]
## Related Documents
- [Architecture Decision Record](../architecture/ADR-XXX.md)
- [API Reference](../reference/api/ENDPOINT.md)
Apply this checklist before finalizing any reference documentation.