docs
Update documentation to match implementation
What this skill does
# Documentation Mode
**Recommended model tier:** balanced (sonnet) - this skill performs straightforward operations
Update documentation to accurately reflect the implemented code.
## Purpose
This is the DOCS stage of the SDLC pipeline. Implementation is complete and verified. Your job is to ensure documentation matches reality.
## What to Document
### 1. README Updates
If the feature affects how users interact with the project:
- Installation steps changed?
- New commands or options?
- New configuration?
- New dependencies?
### 2. API Documentation
If public APIs were added or changed:
- Function/method signatures
- Parameters and return types
- Usage examples
- Error conditions
### 3. Inline Documentation
If code needs explanation:
- Complex algorithms
- Non-obvious design decisions
- Integration points
- Edge cases
### 4. Architecture Docs
If structure changed:
- New components
- Changed data flow
- New dependencies between modules
## Workflow
### Step 1: Identify Changed Files
```bash
# See what was changed
git diff --name-only HEAD~5 # or appropriate range
# Find related docs
Glob for **/*.md
Glob for **/docs/**/*
```
### Step 2: Check Existing Documentation
Read current docs that might be affected:
```bash
Read README.md
Read docs/api.md # if exists
Read CHANGELOG.md # if exists
```
### Step 3: Read the Implementation
Understand what was built:
- Read the new code files
- Use `mcp__plugin_aide_aide__decision_get` with the feature topic to check design decisions
- Use `mcp__plugin_aide_aide__decision_list` to see all decisions
### Step 4: Update Documentation
#### README.md Updates
Add/update sections as needed:
```markdown
## New Feature
Description of what it does.
### Usage
\`\`\`bash
command --new-flag
\`\`\`
### Configuration
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| newOption | string | "default" | What it does |
```
#### API Documentation
Document public interfaces:
```markdown
### functionName(param1, param2)
Brief description.
**Parameters:**
- `param1` (string): What it is
- `param2` (number, optional): What it does. Default: 10
**Returns:** `Promise<Result>`
**Example:**
\`\`\`typescript
const result = await functionName("input", 20);
\`\`\`
**Throws:**
- `ValidationError`: When param1 is empty
```
#### Inline Comments
Add comments for non-obvious code:
```typescript
// Use exponential backoff to handle rate limiting
// Starts at 100ms, doubles each retry, max 5 retries
async function fetchWithRetry(url: string): Promise<Response> {
// ...
}
```
### Step 5: Verify Documentation
```bash
# If docs have a build step
npm run docs:build
# Check for broken links (if tool available)
npm run docs:check
# Manual review - read what you wrote
```
### Step 6: Commit Documentation
```bash
git add -A
git commit -m "docs: document <feature>"
```
## Documentation Standards
### Be Accurate
- Documentation must match code exactly
- If code changes, docs must change
- Never document aspirational features
### Be Concise
- One sentence per concept
- Use examples over explanations
- Bullet points over paragraphs
### Be Complete
- Cover happy path AND error cases
- Include all public API
- Document breaking changes
### Be Findable
- Use clear headings
- Add to table of contents
- Cross-reference related sections
## What NOT to Document
- Internal implementation details (unless complex)
- Obvious code (self-documenting)
- Temporary workarounds (use TODO instead)
- Aspirational features (only document what exists)
## Output Format
```markdown
## Documentation Updates
### Files Modified
- `README.md` - Added new feature section
- `docs/api.md` - Documented new endpoints
- `src/service.ts` - Added inline comments for complex logic
### Summary of Changes
1. Added usage instructions for `--new-flag`
2. Documented `createUser` API with examples
3. Updated configuration table with new options
### Verification
- [ ] Docs build successfully
- [ ] Examples are copy-pasteable and work
- [ ] No broken internal links
```
## Failure Handling
### No Documentation Exists
If this is a new project without docs structure:
1. Create minimal README.md
2. Document the feature inline
3. Note: "Recommend creating docs/ structure in future"
### Documentation Tool Broken
If docs build fails:
1. Fix the build issue if simple
2. Document what was attempted
3. Note: "Docs build issue - needs separate fix"
### Unclear What to Document
1. Focus on public API only
2. Document what a new user would need
3. Skip internal details
4. When in doubt, add an example
## Verification Checklist
Before completing:
- [ ] All new public APIs are documented
- [ ] README is updated if user-facing changes
- [ ] Examples are tested and work
- [ ] Docs build (if applicable)
- [ ] Changes are committed
## Completion
When documentation is complete:
```
Documentation complete.
- Updated: [list of files]
- Added: [new sections/files]
SDLC pipeline complete for this story.
```
## Integration with SDLC Pipeline
```
[DESIGN] → [TEST] → [DEV] → [VERIFY] → [DOCS]
↑
YOU ARE HERE
```
- **Input**: Verified, working implementation
- **Output**: Updated documentation
- **Next**: Story complete, ready for merge
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.