Documentation Organization
Use when creating, organizing, or working with documentation in a smart-docs managed folder. Provides patterns for structuring docs, using frontmatter, and leveraging auto-load features.
What this skill does
# Documentation Organization Patterns
When working with documentation in a smart-docs managed project, follow these patterns to ensure consistency and enable AI agent integration.
## Environment
The documentation folder path is available via `SMART_DOCS_PATH` environment variable.
## Directory Structure
Organize documentation hierarchically by audience and topic:
```
docs/
├── index.md # Overview and navigation
├── getting-started/ # Onboarding content
│ ├── installation.md
│ └── quickstart.md
├── guides/ # Task-oriented guides
│ ├── common-tasks.md
│ └── advanced-usage.md
├── reference/ # API and technical reference
│ ├── api.md
│ └── configuration.md
└── contributing/ # For contributors
└── guidelines.md
```
**Conventions:**
- Use kebab-case for file and folder names
- One topic per file
- Index files for navigation within sections
- Keep nesting to 2-3 levels maximum
## Frontmatter Requirements
Every markdown file should have frontmatter with at minimum:
```yaml
---
title: Human-Readable Title
description: Brief summary for search and previews
---
```
### Auto-Load Configuration
For documents that should be automatically loaded into AI agent context:
```yaml
---
title: Code Style Guide
description: Formatting and style rules for this project
autoLoad: true
autoLoadPriority: 3
agentRole: instructions
---
```
**Field Reference:**
| Field | Type | Description |
|-------|------|-------------|
| `autoLoad` | boolean | Set `true` to inject at session start |
| `autoLoadPriority` | number (1-10) | Lower = loads first |
| `agentRole` | string | `reference`, `instructions`, or `example` |
### What to Auto-Load
**Good candidates for `autoLoad: true`:**
- Project conventions and style guides
- Architecture decision records (ADRs)
- API design guidelines
- Critical setup instructions
- Glossary of project-specific terms
**Avoid auto-loading:**
- Lengthy tutorials or walkthroughs
- Full API reference documentation
- Historical changelogs
- Content that changes frequently
## Writing for AI Agents
When writing documentation that will be consumed by AI agents:
1. **Be explicit** - State rules and conventions directly
2. **Use examples** - Show correct patterns alongside explanations
3. **Structure consistently** - Use headers, lists, and tables predictably
4. **Avoid ambiguity** - "Should" vs "must" matters
5. **Keep it current** - Outdated docs mislead agents
### Example: Good Agent-Friendly Doc
```markdown
---
title: API Response Format
autoLoad: true
agentRole: instructions
---
# API Response Format
All API endpoints MUST return responses in this format:
## Success Response
\`\`\`json
{
"data": { /* response payload */ },
"meta": {
"timestamp": "ISO8601 date"
}
}
\`\`\`
## Error Response
\`\`\`json
{
"error": {
"code": "ERROR_CODE",
"message": "Human-readable message"
}
}
\`\`\`
## Rules
- Never return raw arrays at the top level
- Always include `meta.timestamp`
- Error codes must be SCREAMING_SNAKE_CASE
```
## Cross-Referencing
Use relative paths for links between documents:
```markdown
See [Installation Guide](../getting-started/installation.md) for setup.
```
## File Operations
When creating or modifying docs programmatically, use the smart-docs API:
- `GET /api/docs/tree` - List all documents
- `GET /api/docs/content?path=<path>` - Read a document
- `PUT /api/docs/content?path=<path>` - Update a document
- `POST /api/docs/content` - Create a new document
- `DELETE /api/docs/content?path=<path>` - Delete a document
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.