adr-create
Create Architecture Decision Record from specification context.
What this skill does
# Create Architecture Decision Record
Create an ADR (Architecture Decision Record) from specification context.
## When to Create ADRs
Create an ADR when a specification contains:
- Technology choices (database, framework, library)
- Architectural patterns (microservices, CQRS, event sourcing)
- Integration approaches (sync vs async, REST vs GraphQL)
- Security decisions (auth method, encryption)
- Significant trade-offs (performance vs simplicity)
- Deviations from existing patterns
## MADR Format
Uses Markdown Any Decision Records (MADR) format:
```markdown
# ADR-NNN: [Title in Imperative Form]
## Status
[Proposed | Accepted | Deprecated | Superseded by ADR-XXX]
## Context
[Forces at play, situation motivating this decision]
## Decision
We will [decision in imperative form].
## Consequences
### Positive
- [Benefits]
### Negative
- [Drawbacks]
### Neutral
- [Trade-offs]
## Alternatives Considered
### [Alternative 1]
**Pros:** [advantages]
**Cons:** [disadvantages]
**Why Rejected:** [reason]
```
## Workflow
1. **Load Specification**
- Read the specification file
- Identify decision points
2. **Extract Decisions**
- Spawn `adr-creator` agent
- Find explicit decisions ("We will use X")
- Find implicit decisions (tech mentioned)
- Gather context and constraints
3. **Research Alternatives**
- If alternatives not documented:
- Identify reasonable alternatives
- Research pros and cons
- Document rejection reasons
4. **Generate ADR**
- Apply MADR format
- Link to specification
- Cross-reference requirements
5. **Save ADR**
- Assign ADR number
- Save to `docs/adr/` (or user-specified location)
- Update ADR index
## Arguments
- `$1` - Specification file path
- `--decision` - Specific decision to document
- `--output` - Output directory (default: `docs/adr/`)
- `--number` - ADR number (auto-assigned if not provided)
## Examples
```bash
# Extract ADRs from specification
/spec-driven-development:adr-create .specs/auth/spec.md
# Create specific decision ADR
/spec-driven-development:adr-create .specs/auth/spec.md --decision "Use JWT for session tokens"
# Specify output location
/spec-driven-development:adr-create .specs/auth/spec.md --output docs/adr/
# Assign specific number
/spec-driven-development:adr-create .specs/auth/spec.md --number 42
```
## ADR Example
```markdown
# ADR-015: Use Redis for Session Caching
<!--
Generated from: SPEC-AUTH-001
Requirements: NFR-1 (Performance), FR-3 (Session Management)
Created: 2024-01-15
-->
## Status
Proposed
## Context
The authentication specification (SPEC-AUTH-001) requires session tokens
to be validated within 50ms (NFR-1). Current database-only approach
shows p95 latency of 150ms, exceeding the requirement.
We need a caching strategy to reduce session validation latency.
## Decision
We will use Redis as an in-memory cache for session tokens.
- Cache session data with TTL matching session expiry
- Use cache-aside pattern (lazy loading)
- Invalidate on logout and password change
## Consequences
### Positive
- Expected 80% reduction in session validation latency
- Reduced database load for session queries
- Industry-standard solution with extensive documentation
- Team has Redis experience
### Negative
- Additional infrastructure component
- Cache invalidation complexity
- Memory costs scale with active sessions
### Neutral
- Requires Redis cluster for high availability
- Monitoring and alerting setup needed
## Alternatives Considered
### In-Memory Application Cache
Local cache in each application instance.
**Pros:** No additional infrastructure
**Cons:** Not shared across instances, lost on restart
**Why Rejected:** Multi-instance deployment requires shared cache
### Database Materialized Views
Pre-computed session data in database.
**Pros:** No new technology
**Cons:** Still has database latency, complex refresh logic
**Why Rejected:** Doesn't meet 50ms latency requirement
## Related
- **Specification:** SPEC-AUTH-001
- **Requirements:** NFR-1, FR-3
- **Related ADRs:** ADR-012 (Redis Infrastructure)
```
## ADR Index Update
When creating an ADR, the index is updated:
```markdown
## ADR Index
| ADR | Title | Status | Spec | Date |
| --- | --- | --- | --- | --- |
| ADR-014 | Use PostgreSQL | Accepted | SPEC-001 | 2024-01-10 |
| ADR-015 | Use Redis for Sessions | Proposed | SPEC-AUTH | 2024-01-15 |
```
## Related Commands
- `/spec-driven-development:specify` - Generate specification
- `/spec-driven-development:plan` - Generate design
- `/spec-driven-development:validate` - Validate specification
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.