opencode-metis 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +140 -0
- package/dist/cli.cjs +63 -0
- package/dist/mcp-server.cjs +51 -0
- package/dist/plugin.cjs +4 -0
- package/dist/worker.cjs +224 -0
- package/opencode/agent/the-analyst/feature-prioritization.md +66 -0
- package/opencode/agent/the-analyst/market-research.md +77 -0
- package/opencode/agent/the-analyst/project-coordination.md +81 -0
- package/opencode/agent/the-analyst/requirements-analysis.md +77 -0
- package/opencode/agent/the-architect/compatibility-review.md +138 -0
- package/opencode/agent/the-architect/complexity-review.md +137 -0
- package/opencode/agent/the-architect/quality-review.md +67 -0
- package/opencode/agent/the-architect/security-review.md +127 -0
- package/opencode/agent/the-architect/system-architecture.md +119 -0
- package/opencode/agent/the-architect/system-documentation.md +83 -0
- package/opencode/agent/the-architect/technology-research.md +85 -0
- package/opencode/agent/the-chief.md +79 -0
- package/opencode/agent/the-designer/accessibility-implementation.md +101 -0
- package/opencode/agent/the-designer/design-foundation.md +74 -0
- package/opencode/agent/the-designer/interaction-architecture.md +75 -0
- package/opencode/agent/the-designer/user-research.md +70 -0
- package/opencode/agent/the-meta-agent.md +155 -0
- package/opencode/agent/the-platform-engineer/ci-cd-pipelines.md +109 -0
- package/opencode/agent/the-platform-engineer/containerization.md +106 -0
- package/opencode/agent/the-platform-engineer/data-architecture.md +81 -0
- package/opencode/agent/the-platform-engineer/dependency-review.md +144 -0
- package/opencode/agent/the-platform-engineer/deployment-automation.md +81 -0
- package/opencode/agent/the-platform-engineer/infrastructure-as-code.md +107 -0
- package/opencode/agent/the-platform-engineer/performance-tuning.md +82 -0
- package/opencode/agent/the-platform-engineer/pipeline-engineering.md +81 -0
- package/opencode/agent/the-platform-engineer/production-monitoring.md +105 -0
- package/opencode/agent/the-qa-engineer/exploratory-testing.md +66 -0
- package/opencode/agent/the-qa-engineer/performance-testing.md +81 -0
- package/opencode/agent/the-qa-engineer/quality-assurance.md +77 -0
- package/opencode/agent/the-qa-engineer/test-execution.md +66 -0
- package/opencode/agent/the-software-engineer/api-development.md +78 -0
- package/opencode/agent/the-software-engineer/component-development.md +79 -0
- package/opencode/agent/the-software-engineer/concurrency-review.md +141 -0
- package/opencode/agent/the-software-engineer/domain-modeling.md +66 -0
- package/opencode/agent/the-software-engineer/performance-optimization.md +113 -0
- package/opencode/command/analyze.md +149 -0
- package/opencode/command/constitution.md +178 -0
- package/opencode/command/debug.md +194 -0
- package/opencode/command/document.md +178 -0
- package/opencode/command/implement.md +225 -0
- package/opencode/command/refactor.md +207 -0
- package/opencode/command/review.md +229 -0
- package/opencode/command/simplify.md +267 -0
- package/opencode/command/specify.md +191 -0
- package/opencode/command/validate.md +224 -0
- package/opencode/skill/accessibility-design/SKILL.md +566 -0
- package/opencode/skill/accessibility-design/checklists/wcag-checklist.md +435 -0
- package/opencode/skill/agent-coordination/SKILL.md +224 -0
- package/opencode/skill/api-contract-design/SKILL.md +550 -0
- package/opencode/skill/api-contract-design/templates/graphql-schema-template.md +818 -0
- package/opencode/skill/api-contract-design/templates/rest-api-template.md +417 -0
- package/opencode/skill/architecture-design/SKILL.md +160 -0
- package/opencode/skill/architecture-design/examples/architecture-examples.md +170 -0
- package/opencode/skill/architecture-design/template.md +749 -0
- package/opencode/skill/architecture-design/validation.md +99 -0
- package/opencode/skill/architecture-selection/SKILL.md +522 -0
- package/opencode/skill/architecture-selection/examples/adrs/001-example-adr.md +71 -0
- package/opencode/skill/architecture-selection/examples/architecture-patterns.md +239 -0
- package/opencode/skill/bug-diagnosis/SKILL.md +235 -0
- package/opencode/skill/code-quality-review/SKILL.md +337 -0
- package/opencode/skill/code-quality-review/examples/anti-patterns.md +629 -0
- package/opencode/skill/code-quality-review/reference.md +322 -0
- package/opencode/skill/code-review/SKILL.md +363 -0
- package/opencode/skill/code-review/reference.md +450 -0
- package/opencode/skill/codebase-analysis/SKILL.md +139 -0
- package/opencode/skill/codebase-navigation/SKILL.md +227 -0
- package/opencode/skill/codebase-navigation/examples/exploration-patterns.md +263 -0
- package/opencode/skill/coding-conventions/SKILL.md +178 -0
- package/opencode/skill/coding-conventions/checklists/accessibility-checklist.md +176 -0
- package/opencode/skill/coding-conventions/checklists/performance-checklist.md +154 -0
- package/opencode/skill/coding-conventions/checklists/security-checklist.md +127 -0
- package/opencode/skill/constitution-validation/SKILL.md +315 -0
- package/opencode/skill/constitution-validation/examples/CONSTITUTION.md +202 -0
- package/opencode/skill/constitution-validation/reference/rule-patterns.md +328 -0
- package/opencode/skill/constitution-validation/template.md +115 -0
- package/opencode/skill/context-preservation/SKILL.md +445 -0
- package/opencode/skill/data-modeling/SKILL.md +385 -0
- package/opencode/skill/data-modeling/templates/schema-design-template.md +268 -0
- package/opencode/skill/deployment-pipeline-design/SKILL.md +579 -0
- package/opencode/skill/deployment-pipeline-design/templates/pipeline-template.md +633 -0
- package/opencode/skill/documentation-extraction/SKILL.md +259 -0
- package/opencode/skill/documentation-sync/SKILL.md +431 -0
- package/opencode/skill/domain-driven-design/SKILL.md +509 -0
- package/opencode/skill/domain-driven-design/examples/ddd-patterns.md +688 -0
- package/opencode/skill/domain-driven-design/reference.md +465 -0
- package/opencode/skill/drift-detection/SKILL.md +383 -0
- package/opencode/skill/drift-detection/reference.md +340 -0
- package/opencode/skill/error-recovery/SKILL.md +162 -0
- package/opencode/skill/error-recovery/examples/error-patterns.md +484 -0
- package/opencode/skill/feature-prioritization/SKILL.md +419 -0
- package/opencode/skill/feature-prioritization/examples/rice-template.md +139 -0
- package/opencode/skill/feature-prioritization/reference.md +256 -0
- package/opencode/skill/git-workflow/SKILL.md +453 -0
- package/opencode/skill/implementation-planning/SKILL.md +215 -0
- package/opencode/skill/implementation-planning/examples/phase-examples.md +217 -0
- package/opencode/skill/implementation-planning/template.md +220 -0
- package/opencode/skill/implementation-planning/validation.md +88 -0
- package/opencode/skill/implementation-verification/SKILL.md +272 -0
- package/opencode/skill/knowledge-capture/SKILL.md +265 -0
- package/opencode/skill/knowledge-capture/reference/knowledge-capture.md +402 -0
- package/opencode/skill/knowledge-capture/reference.md +444 -0
- package/opencode/skill/knowledge-capture/templates/domain-template.md +325 -0
- package/opencode/skill/knowledge-capture/templates/interface-template.md +255 -0
- package/opencode/skill/knowledge-capture/templates/pattern-template.md +144 -0
- package/opencode/skill/observability-design/SKILL.md +291 -0
- package/opencode/skill/observability-design/references/monitoring-patterns.md +461 -0
- package/opencode/skill/pattern-detection/SKILL.md +171 -0
- package/opencode/skill/pattern-detection/examples/common-patterns.md +359 -0
- package/opencode/skill/performance-analysis/SKILL.md +266 -0
- package/opencode/skill/performance-analysis/references/profiling-tools.md +499 -0
- package/opencode/skill/requirements-analysis/SKILL.md +139 -0
- package/opencode/skill/requirements-analysis/examples/good-prd.md +66 -0
- package/opencode/skill/requirements-analysis/template.md +177 -0
- package/opencode/skill/requirements-analysis/validation.md +69 -0
- package/opencode/skill/requirements-elicitation/SKILL.md +518 -0
- package/opencode/skill/requirements-elicitation/examples/interview-questions.md +226 -0
- package/opencode/skill/requirements-elicitation/examples/user-stories.md +414 -0
- package/opencode/skill/safe-refactoring/SKILL.md +312 -0
- package/opencode/skill/safe-refactoring/reference/code-smells.md +347 -0
- package/opencode/skill/security-assessment/SKILL.md +421 -0
- package/opencode/skill/security-assessment/checklists/security-review-checklist.md +285 -0
- package/opencode/skill/specification-management/SKILL.md +143 -0
- package/opencode/skill/specification-management/readme-template.md +32 -0
- package/opencode/skill/specification-management/reference.md +115 -0
- package/opencode/skill/specification-management/spec.py +229 -0
- package/opencode/skill/specification-validation/SKILL.md +397 -0
- package/opencode/skill/specification-validation/reference/3cs-framework.md +306 -0
- package/opencode/skill/specification-validation/reference/ambiguity-detection.md +132 -0
- package/opencode/skill/specification-validation/reference/constitution-validation.md +301 -0
- package/opencode/skill/specification-validation/reference/drift-detection.md +383 -0
- package/opencode/skill/task-delegation/SKILL.md +607 -0
- package/opencode/skill/task-delegation/examples/file-coordination.md +495 -0
- package/opencode/skill/task-delegation/examples/parallel-research.md +337 -0
- package/opencode/skill/task-delegation/examples/sequential-build.md +504 -0
- package/opencode/skill/task-delegation/reference.md +825 -0
- package/opencode/skill/tech-stack-detection/SKILL.md +89 -0
- package/opencode/skill/tech-stack-detection/references/framework-signatures.md +598 -0
- package/opencode/skill/technical-writing/SKILL.md +190 -0
- package/opencode/skill/technical-writing/templates/adr-template.md +205 -0
- package/opencode/skill/technical-writing/templates/system-doc-template.md +380 -0
- package/opencode/skill/test-design/SKILL.md +464 -0
- package/opencode/skill/test-design/examples/test-pyramid.md +724 -0
- package/opencode/skill/testing/SKILL.md +213 -0
- package/opencode/skill/testing/examples/test-pyramid.md +724 -0
- package/opencode/skill/user-insight-synthesis/SKILL.md +576 -0
- package/opencode/skill/user-insight-synthesis/templates/research-plan-template.md +217 -0
- package/opencode/skill/user-research/SKILL.md +508 -0
- package/opencode/skill/user-research/examples/interview-questions.md +265 -0
- package/opencode/skill/user-research/examples/personas.md +267 -0
- package/opencode/skill/vibe-security/SKILL.md +654 -0
- package/package.json +45 -0
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
# Documentation Skill Reference
|
|
2
|
+
|
|
3
|
+
Complete reference for the documentation skill including advanced patterns, edge cases, and detailed protocols.
|
|
4
|
+
|
|
5
|
+
## Advanced Categorization Rules
|
|
6
|
+
|
|
7
|
+
### Gray Areas and Edge Cases
|
|
8
|
+
|
|
9
|
+
#### When Business and Technical Overlap
|
|
10
|
+
|
|
11
|
+
**Authentication Example:**
|
|
12
|
+
|
|
13
|
+
- `docs/domain/user-roles.md` - WHO can access WHAT (business rule)
|
|
14
|
+
- `docs/patterns/authentication-flow.md` - HOW authentication works (technical)
|
|
15
|
+
- `docs/interfaces/oauth-providers.md` - EXTERNAL services used (integration)
|
|
16
|
+
|
|
17
|
+
**Guideline:** If it affects WHAT users can do → domain. If it affects HOW we build it → patterns.
|
|
18
|
+
|
|
19
|
+
#### When Pattern Becomes Interface
|
|
20
|
+
|
|
21
|
+
**Caching Example:**
|
|
22
|
+
|
|
23
|
+
- Local in-memory caching → `docs/patterns/caching-strategy.md`
|
|
24
|
+
- Redis/Memcached integration → `docs/interfaces/redis-cache.md`
|
|
25
|
+
|
|
26
|
+
**Guideline:** Self-contained code patterns → patterns. External service dependencies → interfaces.
|
|
27
|
+
|
|
28
|
+
#### When Multiple Categories Apply
|
|
29
|
+
|
|
30
|
+
**Payment Processing Example:**
|
|
31
|
+
Could span all three:
|
|
32
|
+
|
|
33
|
+
- `docs/domain/payment-rules.md` - Refund policies, pricing rules
|
|
34
|
+
- `docs/patterns/payment-processing.md` - Internal payment handling
|
|
35
|
+
- `docs/interfaces/stripe-api.md` - Stripe integration specifics
|
|
36
|
+
|
|
37
|
+
**Guideline:** Create separate documents for each perspective. Cross-reference heavily.
|
|
38
|
+
|
|
39
|
+
## Naming Conventions
|
|
40
|
+
|
|
41
|
+
### Pattern: `[noun]-[noun/verb].md`
|
|
42
|
+
|
|
43
|
+
**Good Examples:**
|
|
44
|
+
|
|
45
|
+
- `error-handling.md`
|
|
46
|
+
- `database-migrations.md`
|
|
47
|
+
- `api-versioning.md`
|
|
48
|
+
- `event-sourcing.md`
|
|
49
|
+
|
|
50
|
+
**Avoid:**
|
|
51
|
+
|
|
52
|
+
- Single words: `cache.md`, `auth.md`
|
|
53
|
+
- Abbreviations: `db-mig.md`, `err-hdl.md`
|
|
54
|
+
- Generic terms: `utilities.md`, `helpers.md`
|
|
55
|
+
|
|
56
|
+
### Interface: `[service-name]-[integration-type].md`
|
|
57
|
+
|
|
58
|
+
**Good Examples:**
|
|
59
|
+
|
|
60
|
+
- `stripe-payments.md`
|
|
61
|
+
- `sendgrid-webhooks.md`
|
|
62
|
+
- `github-api.md`
|
|
63
|
+
- `aws-s3-storage.md`
|
|
64
|
+
|
|
65
|
+
**Avoid:**
|
|
66
|
+
|
|
67
|
+
- Generic: `payment-gateway.md` (which one?)
|
|
68
|
+
- Vague: `email.md` (what about email?)
|
|
69
|
+
- Tech-only: `rest-api.md` (which service?)
|
|
70
|
+
|
|
71
|
+
### Domain: `[entity/concept]-[aspect].md`
|
|
72
|
+
|
|
73
|
+
**Good Examples:**
|
|
74
|
+
|
|
75
|
+
- `user-permissions.md`
|
|
76
|
+
- `order-workflow.md`
|
|
77
|
+
- `inventory-tracking.md`
|
|
78
|
+
- `pricing-rules.md`
|
|
79
|
+
|
|
80
|
+
**Avoid:**
|
|
81
|
+
|
|
82
|
+
- Implementation details: `user-table.md` (that's technical)
|
|
83
|
+
- Generic: `rules.md` (which rules?)
|
|
84
|
+
- Too broad: `business-logic.md` (everything?)
|
|
85
|
+
|
|
86
|
+
## Update vs Create Decision Matrix
|
|
87
|
+
|
|
88
|
+
| Scenario | Existing Doc | Action |
|
|
89
|
+
| ------------------------ | ------------------------------ | --------------------------------------------------------- |
|
|
90
|
+
| New payment provider | `stripe-payments.md` exists | **Create** `paypal-payments.md` (different service) |
|
|
91
|
+
| Additional caching layer | `caching-strategy.md` exists | **Update** existing (same pattern, new details) |
|
|
92
|
+
| New user role type | `user-permissions.md` exists | **Update** existing (extends same rule set) |
|
|
93
|
+
| Different auth method | `jwt-authentication.md` exists | **Create** `oauth-authentication.md` (different approach) |
|
|
94
|
+
| API version change | `github-api.md` exists | **Update** existing (same service, evolved) |
|
|
95
|
+
| New business constraint | `order-workflow.md` exists | **Update** if related, **Create** if distinct |
|
|
96
|
+
|
|
97
|
+
**Guiding Principle:** Same topic/service = update. Different topic/service = create new.
|
|
98
|
+
|
|
99
|
+
## Template Usage Guidelines
|
|
100
|
+
|
|
101
|
+
### Pattern Template
|
|
102
|
+
|
|
103
|
+
Use for:
|
|
104
|
+
|
|
105
|
+
- Architectural decisions (MVC, microservices, event-driven)
|
|
106
|
+
- Code organization patterns (repository, factory, singleton)
|
|
107
|
+
- Data handling approaches (caching, validation, serialization)
|
|
108
|
+
- Testing strategies (unit, integration, e2e)
|
|
109
|
+
|
|
110
|
+
### Interface Template
|
|
111
|
+
|
|
112
|
+
Use for:
|
|
113
|
+
|
|
114
|
+
- Third-party API integrations
|
|
115
|
+
- Webhook implementations
|
|
116
|
+
- External service authentication
|
|
117
|
+
- Data exchange protocols
|
|
118
|
+
- Partner system integrations
|
|
119
|
+
|
|
120
|
+
### Domain Template
|
|
121
|
+
|
|
122
|
+
Use for:
|
|
123
|
+
|
|
124
|
+
- Business rules and constraints
|
|
125
|
+
- User permission systems
|
|
126
|
+
- Workflow state machines
|
|
127
|
+
- Validation requirements
|
|
128
|
+
- Domain entity behaviors
|
|
129
|
+
|
|
130
|
+
## Deduplication Techniques
|
|
131
|
+
|
|
132
|
+
### Technique 1: Keyword Search
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Search filenames
|
|
136
|
+
find docs -type f -name "*.md" | grep -i keyword
|
|
137
|
+
|
|
138
|
+
# Search content
|
|
139
|
+
grep -ri "search term" docs/
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Technique 2: Category Listing
|
|
143
|
+
|
|
144
|
+
```bash
|
|
145
|
+
# List all patterns
|
|
146
|
+
ls docs/patterns/
|
|
147
|
+
|
|
148
|
+
# List all interfaces
|
|
149
|
+
ls docs/interfaces/
|
|
150
|
+
|
|
151
|
+
# List all domain docs
|
|
152
|
+
ls docs/domain/
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Technique 3: Content Scanning
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
# Show first 5 lines of each file
|
|
159
|
+
find docs/patterns -name "*.md" -exec head -5 {} \; -print
|
|
160
|
+
|
|
161
|
+
# Search for specific concept
|
|
162
|
+
grep -l "authentication" docs/**/*.md
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Technique 4: Related Term Mapping
|
|
166
|
+
|
|
167
|
+
For a new document about "caching":
|
|
168
|
+
|
|
169
|
+
- Check for: cache, caching, cached, memoization, storage
|
|
170
|
+
- Check categories: patterns (implementation), interfaces (Redis/Memcached)
|
|
171
|
+
- Read related files before deciding
|
|
172
|
+
|
|
173
|
+
## Merge vs Separate Guidelines
|
|
174
|
+
|
|
175
|
+
### Merge When:
|
|
176
|
+
|
|
177
|
+
- Same category and closely related topic
|
|
178
|
+
- Information enhances without confusing
|
|
179
|
+
- Single cohesive narrative possible
|
|
180
|
+
- Total length stays under 500 lines
|
|
181
|
+
|
|
182
|
+
**Example:** Merging "JWT tokens" into existing `authentication-flow.md`
|
|
183
|
+
|
|
184
|
+
### Keep Separate When:
|
|
185
|
+
|
|
186
|
+
- Different approaches to same problem
|
|
187
|
+
- Distinct services/technologies
|
|
188
|
+
- Would make document unfocused
|
|
189
|
+
- Exceeds reasonable length
|
|
190
|
+
|
|
191
|
+
**Example:** `jwt-authentication.md` and `oauth-authentication.md` as separate files
|
|
192
|
+
|
|
193
|
+
## Cross-Reference Patterns
|
|
194
|
+
|
|
195
|
+
### Within Same Category
|
|
196
|
+
|
|
197
|
+
```markdown
|
|
198
|
+
## Related Patterns
|
|
199
|
+
|
|
200
|
+
- [Repository Pattern](./repository-pattern.md) - Data access layer
|
|
201
|
+
- [Service Layer](./service-layer.md) - Business logic organization
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Across Categories
|
|
205
|
+
|
|
206
|
+
```markdown
|
|
207
|
+
## Related Documentation
|
|
208
|
+
|
|
209
|
+
- **Domain:** [User Permissions](../domain/user-permissions.md) - Authorization rules
|
|
210
|
+
- **Patterns:** [Authentication Flow](../patterns/authentication-flow.md) - Technical implementation
|
|
211
|
+
- **Interfaces:** [OAuth Providers](../interfaces/oauth-providers.md) - External auth services
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### To Specifications
|
|
215
|
+
|
|
216
|
+
```markdown
|
|
217
|
+
## Implementations
|
|
218
|
+
|
|
219
|
+
- [User Authentication](../specs/001-user-auth/SDD.md) - Technical specification
|
|
220
|
+
- [OAuth Integration](../specs/015-oauth/PRD.md) - Product requirements
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Version Management
|
|
224
|
+
|
|
225
|
+
### When Patterns Evolve
|
|
226
|
+
|
|
227
|
+
**Approach 1: Update in Place**
|
|
228
|
+
|
|
229
|
+
- Add "Version History" section
|
|
230
|
+
- Document what changed and when
|
|
231
|
+
- Keep current approach primary
|
|
232
|
+
|
|
233
|
+
**Approach 2: Separate Documents**
|
|
234
|
+
|
|
235
|
+
- `authentication-v1.md` (legacy)
|
|
236
|
+
- `authentication-v2.md` (current)
|
|
237
|
+
- Clear migration path documented
|
|
238
|
+
|
|
239
|
+
**Guideline:** Update in place unless breaking change makes old version still relevant for existing code.
|
|
240
|
+
|
|
241
|
+
### Deprecation
|
|
242
|
+
|
|
243
|
+
When a pattern/interface is superseded:
|
|
244
|
+
|
|
245
|
+
```markdown
|
|
246
|
+
# Old Authentication Pattern
|
|
247
|
+
|
|
248
|
+
> **⚠️ DEPRECATED:** This pattern is no longer recommended.
|
|
249
|
+
> See [New Authentication Flow](./authentication-flow.md) for current approach.
|
|
250
|
+
>
|
|
251
|
+
> This document is maintained for reference by legacy code in modules X, Y, Z.
|
|
252
|
+
|
|
253
|
+
[Original content preserved...]
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
## Quality Standards
|
|
257
|
+
|
|
258
|
+
### Completeness Checklist
|
|
259
|
+
|
|
260
|
+
- [ ] Title clearly states what is documented
|
|
261
|
+
- [ ] Context explains when/why this applies
|
|
262
|
+
- [ ] Examples show real usage
|
|
263
|
+
- [ ] Edge cases are covered
|
|
264
|
+
- [ ] Related docs are linked
|
|
265
|
+
- [ ] Code snippets use real project conventions
|
|
266
|
+
|
|
267
|
+
### Clarity Checklist
|
|
268
|
+
|
|
269
|
+
- [ ] New team member could understand it
|
|
270
|
+
- [ ] Technical terms are explained
|
|
271
|
+
- [ ] Assumptions are stated explicitly
|
|
272
|
+
- [ ] Steps are in logical order
|
|
273
|
+
- [ ] Diagrams included for complex flows (if applicable)
|
|
274
|
+
|
|
275
|
+
### Maintainability Checklist
|
|
276
|
+
|
|
277
|
+
- [ ] Searchable filename
|
|
278
|
+
- [ ] Correct category
|
|
279
|
+
- [ ] No duplicate content
|
|
280
|
+
- [ ] Cross-references are bidirectional
|
|
281
|
+
- [ ] Version history if evolved
|
|
282
|
+
|
|
283
|
+
## Common Mistakes to Avoid
|
|
284
|
+
|
|
285
|
+
### ❌ Mistake 1: Creating Without Checking
|
|
286
|
+
|
|
287
|
+
**Problem:** Duplicate documentation proliferates
|
|
288
|
+
**Solution:** Always search first - multiple ways (grep, find, ls)
|
|
289
|
+
|
|
290
|
+
### ❌ Mistake 2: Wrong Category
|
|
291
|
+
|
|
292
|
+
**Problem:** Business rules in patterns/, technical details in domain/
|
|
293
|
+
**Solution:** Ask "Is this about WHAT (domain) or HOW (patterns)?"
|
|
294
|
+
|
|
295
|
+
### ❌ Mistake 3: Too Generic Names
|
|
296
|
+
|
|
297
|
+
**Problem:** Can't find documentation later
|
|
298
|
+
**Solution:** Full descriptive names, not abbreviations
|
|
299
|
+
|
|
300
|
+
### ❌ Mistake 4: No Cross-References
|
|
301
|
+
|
|
302
|
+
**Problem:** Related knowledge stays siloed
|
|
303
|
+
**Solution:** Link liberally between related docs
|
|
304
|
+
|
|
305
|
+
### ❌ Mistake 5: Template Ignored
|
|
306
|
+
|
|
307
|
+
**Problem:** Inconsistent structure makes scanning hard
|
|
308
|
+
**Solution:** Follow templates for consistency
|
|
309
|
+
|
|
310
|
+
### ❌ Mistake 6: No Examples
|
|
311
|
+
|
|
312
|
+
**Problem:** Abstract descriptions don't help
|
|
313
|
+
**Solution:** Include real code snippets and scenarios
|
|
314
|
+
|
|
315
|
+
## Edge Case Handling
|
|
316
|
+
|
|
317
|
+
### What if Nothing Fits the Categories?
|
|
318
|
+
|
|
319
|
+
**Option 1:** Expand categories (rare, think hard first)
|
|
320
|
+
**Option 2:** Create `docs/architecture/` for cross-cutting concerns
|
|
321
|
+
**Option 3:** Add to specification docs if feature-specific
|
|
322
|
+
|
|
323
|
+
**Example:** ADRs (Architecture Decision Records) might warrant `docs/decisions/`
|
|
324
|
+
|
|
325
|
+
### What if It's Too Small to Document?
|
|
326
|
+
|
|
327
|
+
**Guideline:** If it's reusable or non-obvious, document it.
|
|
328
|
+
|
|
329
|
+
**Too small:**
|
|
330
|
+
|
|
331
|
+
- "We use camelCase" (coding standard, not pattern)
|
|
332
|
+
- "API returns JSON" (obvious, not worth documenting)
|
|
333
|
+
|
|
334
|
+
**Worth documenting:**
|
|
335
|
+
|
|
336
|
+
- "We use optimistic locking for inventory" (non-obvious pattern)
|
|
337
|
+
- "Rate limiting uses token bucket algorithm" (specific approach)
|
|
338
|
+
|
|
339
|
+
### What if It's Extremely Specific?
|
|
340
|
+
|
|
341
|
+
**Guideline:** Very feature-specific logic goes in specs, not shared docs.
|
|
342
|
+
|
|
343
|
+
**Spec-level:**
|
|
344
|
+
|
|
345
|
+
- `specs/023-checkout/SDD.md` - Checkout flow specifics
|
|
346
|
+
|
|
347
|
+
**Shared docs:**
|
|
348
|
+
|
|
349
|
+
- `docs/patterns/state-machines.md` - Reusable state machine pattern
|
|
350
|
+
- `docs/domain/order-workflow.md` - General order rules
|
|
351
|
+
|
|
352
|
+
## Performance Considerations
|
|
353
|
+
|
|
354
|
+
### Keep Docs Focused
|
|
355
|
+
|
|
356
|
+
- Single file shouldn't exceed 1000 lines
|
|
357
|
+
- Split large topics into multiple focused docs
|
|
358
|
+
- Use cross-references instead of duplicating
|
|
359
|
+
|
|
360
|
+
### Optimize for Searchability
|
|
361
|
+
|
|
362
|
+
- Use keywords in filename
|
|
363
|
+
- Include synonyms in content
|
|
364
|
+
- Add tags/topics section at top
|
|
365
|
+
|
|
366
|
+
### Progressive Detail
|
|
367
|
+
|
|
368
|
+
```markdown
|
|
369
|
+
# Caching Strategy
|
|
370
|
+
|
|
371
|
+
Quick overview: We use Redis for session and API response caching.
|
|
372
|
+
|
|
373
|
+
## Details
|
|
374
|
+
|
|
375
|
+
[Detailed implementation...]
|
|
376
|
+
|
|
377
|
+
## Advanced Configuration
|
|
378
|
+
|
|
379
|
+
[Complex edge cases...]
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
## Integration with Specifications
|
|
383
|
+
|
|
384
|
+
### During Analysis (`/analyze`)
|
|
385
|
+
|
|
386
|
+
Documentation skill captures discovered patterns:
|
|
387
|
+
|
|
388
|
+
- Code analysis reveals patterns → Document in `docs/patterns/`
|
|
389
|
+
- Business rules discovered → Document in `docs/domain/`
|
|
390
|
+
- External APIs found → Document in `docs/interfaces/`
|
|
391
|
+
|
|
392
|
+
### During Specification (`/specify`)
|
|
393
|
+
|
|
394
|
+
- PRD/SDD references existing documentation
|
|
395
|
+
- New patterns discovered → Document them
|
|
396
|
+
- Specifications live in `docs/specs/`, reference shared docs
|
|
397
|
+
|
|
398
|
+
### During Implementation (`/implement`)
|
|
399
|
+
|
|
400
|
+
- Implementation follows documented patterns
|
|
401
|
+
- Deviations discovered → Update documentation
|
|
402
|
+
- New patterns emerge → Document for reuse
|
|
403
|
+
|
|
404
|
+
## Automation Support
|
|
405
|
+
|
|
406
|
+
### Pre-documentation Checks
|
|
407
|
+
|
|
408
|
+
Automate the search process:
|
|
409
|
+
|
|
410
|
+
```bash
|
|
411
|
+
# Check if topic exists
|
|
412
|
+
./scripts/check-doc-exists.sh "authentication"
|
|
413
|
+
|
|
414
|
+
# List related docs
|
|
415
|
+
./scripts/find-related-docs.sh "payment"
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### Post-documentation Validation
|
|
419
|
+
|
|
420
|
+
```bash
|
|
421
|
+
# Verify no duplicates
|
|
422
|
+
./scripts/validate-docs.sh
|
|
423
|
+
|
|
424
|
+
# Check cross-references
|
|
425
|
+
./scripts/check-links.sh
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
## Summary
|
|
429
|
+
|
|
430
|
+
The documentation skill ensures:
|
|
431
|
+
|
|
432
|
+
1. **No duplication** - Always check before creating
|
|
433
|
+
2. **Correct categorization** - Business vs Technical vs External
|
|
434
|
+
3. **Discoverability** - Descriptive names and cross-references
|
|
435
|
+
4. **Consistency** - Template-based structure
|
|
436
|
+
5. **Maintainability** - Clear, complete, and up-to-date
|
|
437
|
+
|
|
438
|
+
When in doubt, ask:
|
|
439
|
+
|
|
440
|
+
- Does related documentation already exist?
|
|
441
|
+
- Which category fits best?
|
|
442
|
+
- What name would I search for?
|
|
443
|
+
- What template applies?
|
|
444
|
+
- How does this connect to other knowledge?
|