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.
Files changed (156) hide show
  1. package/README.md +140 -0
  2. package/dist/cli.cjs +63 -0
  3. package/dist/mcp-server.cjs +51 -0
  4. package/dist/plugin.cjs +4 -0
  5. package/dist/worker.cjs +224 -0
  6. package/opencode/agent/the-analyst/feature-prioritization.md +66 -0
  7. package/opencode/agent/the-analyst/market-research.md +77 -0
  8. package/opencode/agent/the-analyst/project-coordination.md +81 -0
  9. package/opencode/agent/the-analyst/requirements-analysis.md +77 -0
  10. package/opencode/agent/the-architect/compatibility-review.md +138 -0
  11. package/opencode/agent/the-architect/complexity-review.md +137 -0
  12. package/opencode/agent/the-architect/quality-review.md +67 -0
  13. package/opencode/agent/the-architect/security-review.md +127 -0
  14. package/opencode/agent/the-architect/system-architecture.md +119 -0
  15. package/opencode/agent/the-architect/system-documentation.md +83 -0
  16. package/opencode/agent/the-architect/technology-research.md +85 -0
  17. package/opencode/agent/the-chief.md +79 -0
  18. package/opencode/agent/the-designer/accessibility-implementation.md +101 -0
  19. package/opencode/agent/the-designer/design-foundation.md +74 -0
  20. package/opencode/agent/the-designer/interaction-architecture.md +75 -0
  21. package/opencode/agent/the-designer/user-research.md +70 -0
  22. package/opencode/agent/the-meta-agent.md +155 -0
  23. package/opencode/agent/the-platform-engineer/ci-cd-pipelines.md +109 -0
  24. package/opencode/agent/the-platform-engineer/containerization.md +106 -0
  25. package/opencode/agent/the-platform-engineer/data-architecture.md +81 -0
  26. package/opencode/agent/the-platform-engineer/dependency-review.md +144 -0
  27. package/opencode/agent/the-platform-engineer/deployment-automation.md +81 -0
  28. package/opencode/agent/the-platform-engineer/infrastructure-as-code.md +107 -0
  29. package/opencode/agent/the-platform-engineer/performance-tuning.md +82 -0
  30. package/opencode/agent/the-platform-engineer/pipeline-engineering.md +81 -0
  31. package/opencode/agent/the-platform-engineer/production-monitoring.md +105 -0
  32. package/opencode/agent/the-qa-engineer/exploratory-testing.md +66 -0
  33. package/opencode/agent/the-qa-engineer/performance-testing.md +81 -0
  34. package/opencode/agent/the-qa-engineer/quality-assurance.md +77 -0
  35. package/opencode/agent/the-qa-engineer/test-execution.md +66 -0
  36. package/opencode/agent/the-software-engineer/api-development.md +78 -0
  37. package/opencode/agent/the-software-engineer/component-development.md +79 -0
  38. package/opencode/agent/the-software-engineer/concurrency-review.md +141 -0
  39. package/opencode/agent/the-software-engineer/domain-modeling.md +66 -0
  40. package/opencode/agent/the-software-engineer/performance-optimization.md +113 -0
  41. package/opencode/command/analyze.md +149 -0
  42. package/opencode/command/constitution.md +178 -0
  43. package/opencode/command/debug.md +194 -0
  44. package/opencode/command/document.md +178 -0
  45. package/opencode/command/implement.md +225 -0
  46. package/opencode/command/refactor.md +207 -0
  47. package/opencode/command/review.md +229 -0
  48. package/opencode/command/simplify.md +267 -0
  49. package/opencode/command/specify.md +191 -0
  50. package/opencode/command/validate.md +224 -0
  51. package/opencode/skill/accessibility-design/SKILL.md +566 -0
  52. package/opencode/skill/accessibility-design/checklists/wcag-checklist.md +435 -0
  53. package/opencode/skill/agent-coordination/SKILL.md +224 -0
  54. package/opencode/skill/api-contract-design/SKILL.md +550 -0
  55. package/opencode/skill/api-contract-design/templates/graphql-schema-template.md +818 -0
  56. package/opencode/skill/api-contract-design/templates/rest-api-template.md +417 -0
  57. package/opencode/skill/architecture-design/SKILL.md +160 -0
  58. package/opencode/skill/architecture-design/examples/architecture-examples.md +170 -0
  59. package/opencode/skill/architecture-design/template.md +749 -0
  60. package/opencode/skill/architecture-design/validation.md +99 -0
  61. package/opencode/skill/architecture-selection/SKILL.md +522 -0
  62. package/opencode/skill/architecture-selection/examples/adrs/001-example-adr.md +71 -0
  63. package/opencode/skill/architecture-selection/examples/architecture-patterns.md +239 -0
  64. package/opencode/skill/bug-diagnosis/SKILL.md +235 -0
  65. package/opencode/skill/code-quality-review/SKILL.md +337 -0
  66. package/opencode/skill/code-quality-review/examples/anti-patterns.md +629 -0
  67. package/opencode/skill/code-quality-review/reference.md +322 -0
  68. package/opencode/skill/code-review/SKILL.md +363 -0
  69. package/opencode/skill/code-review/reference.md +450 -0
  70. package/opencode/skill/codebase-analysis/SKILL.md +139 -0
  71. package/opencode/skill/codebase-navigation/SKILL.md +227 -0
  72. package/opencode/skill/codebase-navigation/examples/exploration-patterns.md +263 -0
  73. package/opencode/skill/coding-conventions/SKILL.md +178 -0
  74. package/opencode/skill/coding-conventions/checklists/accessibility-checklist.md +176 -0
  75. package/opencode/skill/coding-conventions/checklists/performance-checklist.md +154 -0
  76. package/opencode/skill/coding-conventions/checklists/security-checklist.md +127 -0
  77. package/opencode/skill/constitution-validation/SKILL.md +315 -0
  78. package/opencode/skill/constitution-validation/examples/CONSTITUTION.md +202 -0
  79. package/opencode/skill/constitution-validation/reference/rule-patterns.md +328 -0
  80. package/opencode/skill/constitution-validation/template.md +115 -0
  81. package/opencode/skill/context-preservation/SKILL.md +445 -0
  82. package/opencode/skill/data-modeling/SKILL.md +385 -0
  83. package/opencode/skill/data-modeling/templates/schema-design-template.md +268 -0
  84. package/opencode/skill/deployment-pipeline-design/SKILL.md +579 -0
  85. package/opencode/skill/deployment-pipeline-design/templates/pipeline-template.md +633 -0
  86. package/opencode/skill/documentation-extraction/SKILL.md +259 -0
  87. package/opencode/skill/documentation-sync/SKILL.md +431 -0
  88. package/opencode/skill/domain-driven-design/SKILL.md +509 -0
  89. package/opencode/skill/domain-driven-design/examples/ddd-patterns.md +688 -0
  90. package/opencode/skill/domain-driven-design/reference.md +465 -0
  91. package/opencode/skill/drift-detection/SKILL.md +383 -0
  92. package/opencode/skill/drift-detection/reference.md +340 -0
  93. package/opencode/skill/error-recovery/SKILL.md +162 -0
  94. package/opencode/skill/error-recovery/examples/error-patterns.md +484 -0
  95. package/opencode/skill/feature-prioritization/SKILL.md +419 -0
  96. package/opencode/skill/feature-prioritization/examples/rice-template.md +139 -0
  97. package/opencode/skill/feature-prioritization/reference.md +256 -0
  98. package/opencode/skill/git-workflow/SKILL.md +453 -0
  99. package/opencode/skill/implementation-planning/SKILL.md +215 -0
  100. package/opencode/skill/implementation-planning/examples/phase-examples.md +217 -0
  101. package/opencode/skill/implementation-planning/template.md +220 -0
  102. package/opencode/skill/implementation-planning/validation.md +88 -0
  103. package/opencode/skill/implementation-verification/SKILL.md +272 -0
  104. package/opencode/skill/knowledge-capture/SKILL.md +265 -0
  105. package/opencode/skill/knowledge-capture/reference/knowledge-capture.md +402 -0
  106. package/opencode/skill/knowledge-capture/reference.md +444 -0
  107. package/opencode/skill/knowledge-capture/templates/domain-template.md +325 -0
  108. package/opencode/skill/knowledge-capture/templates/interface-template.md +255 -0
  109. package/opencode/skill/knowledge-capture/templates/pattern-template.md +144 -0
  110. package/opencode/skill/observability-design/SKILL.md +291 -0
  111. package/opencode/skill/observability-design/references/monitoring-patterns.md +461 -0
  112. package/opencode/skill/pattern-detection/SKILL.md +171 -0
  113. package/opencode/skill/pattern-detection/examples/common-patterns.md +359 -0
  114. package/opencode/skill/performance-analysis/SKILL.md +266 -0
  115. package/opencode/skill/performance-analysis/references/profiling-tools.md +499 -0
  116. package/opencode/skill/requirements-analysis/SKILL.md +139 -0
  117. package/opencode/skill/requirements-analysis/examples/good-prd.md +66 -0
  118. package/opencode/skill/requirements-analysis/template.md +177 -0
  119. package/opencode/skill/requirements-analysis/validation.md +69 -0
  120. package/opencode/skill/requirements-elicitation/SKILL.md +518 -0
  121. package/opencode/skill/requirements-elicitation/examples/interview-questions.md +226 -0
  122. package/opencode/skill/requirements-elicitation/examples/user-stories.md +414 -0
  123. package/opencode/skill/safe-refactoring/SKILL.md +312 -0
  124. package/opencode/skill/safe-refactoring/reference/code-smells.md +347 -0
  125. package/opencode/skill/security-assessment/SKILL.md +421 -0
  126. package/opencode/skill/security-assessment/checklists/security-review-checklist.md +285 -0
  127. package/opencode/skill/specification-management/SKILL.md +143 -0
  128. package/opencode/skill/specification-management/readme-template.md +32 -0
  129. package/opencode/skill/specification-management/reference.md +115 -0
  130. package/opencode/skill/specification-management/spec.py +229 -0
  131. package/opencode/skill/specification-validation/SKILL.md +397 -0
  132. package/opencode/skill/specification-validation/reference/3cs-framework.md +306 -0
  133. package/opencode/skill/specification-validation/reference/ambiguity-detection.md +132 -0
  134. package/opencode/skill/specification-validation/reference/constitution-validation.md +301 -0
  135. package/opencode/skill/specification-validation/reference/drift-detection.md +383 -0
  136. package/opencode/skill/task-delegation/SKILL.md +607 -0
  137. package/opencode/skill/task-delegation/examples/file-coordination.md +495 -0
  138. package/opencode/skill/task-delegation/examples/parallel-research.md +337 -0
  139. package/opencode/skill/task-delegation/examples/sequential-build.md +504 -0
  140. package/opencode/skill/task-delegation/reference.md +825 -0
  141. package/opencode/skill/tech-stack-detection/SKILL.md +89 -0
  142. package/opencode/skill/tech-stack-detection/references/framework-signatures.md +598 -0
  143. package/opencode/skill/technical-writing/SKILL.md +190 -0
  144. package/opencode/skill/technical-writing/templates/adr-template.md +205 -0
  145. package/opencode/skill/technical-writing/templates/system-doc-template.md +380 -0
  146. package/opencode/skill/test-design/SKILL.md +464 -0
  147. package/opencode/skill/test-design/examples/test-pyramid.md +724 -0
  148. package/opencode/skill/testing/SKILL.md +213 -0
  149. package/opencode/skill/testing/examples/test-pyramid.md +724 -0
  150. package/opencode/skill/user-insight-synthesis/SKILL.md +576 -0
  151. package/opencode/skill/user-insight-synthesis/templates/research-plan-template.md +217 -0
  152. package/opencode/skill/user-research/SKILL.md +508 -0
  153. package/opencode/skill/user-research/examples/interview-questions.md +265 -0
  154. package/opencode/skill/user-research/examples/personas.md +267 -0
  155. package/opencode/skill/vibe-security/SKILL.md +654 -0
  156. package/package.json +45 -0
@@ -0,0 +1,417 @@
1
+ # Template: REST API Specification
2
+
3
+ ## Purpose
4
+
5
+ Use this template to document REST API endpoints with consistent structure. Suitable for OpenAPI-style documentation, API design reviews, and developer reference guides.
6
+
7
+ ## Template
8
+
9
+ ```markdown
10
+ # [API Name] REST API
11
+
12
+ ## Overview
13
+
14
+ [Brief description of the API's purpose and target consumers]
15
+
16
+ **Base URL:** `https://api.example.com/v1`
17
+
18
+ **Authentication:** [Bearer token / API key / OAuth 2.0]
19
+
20
+ **Content Type:** `application/json`
21
+
22
+ ---
23
+
24
+ ## Authentication
25
+
26
+ ### [Auth Method Name]
27
+
28
+ [Description of authentication mechanism]
29
+
30
+ **Header Format:**
31
+ ```
32
+ Authorization: Bearer <access_token>
33
+ ```
34
+
35
+ **Error Responses:**
36
+ | Status | Code | Description |
37
+ |--------|------|-------------|
38
+ | 401 | UNAUTHORIZED | Missing or invalid token |
39
+ | 403 | FORBIDDEN | Valid token but insufficient permissions |
40
+
41
+ ---
42
+
43
+ ## Resources
44
+
45
+ ### [Resource Name]
46
+
47
+ [Brief description of what this resource represents]
48
+
49
+ #### List [Resources]
50
+
51
+ Retrieves a paginated list of [resources].
52
+
53
+ **Endpoint:** `GET /[resources]`
54
+
55
+ **Query Parameters:**
56
+ | Parameter | Type | Required | Description |
57
+ |-----------|------|----------|-------------|
58
+ | page | integer | No | Page number (default: 1) |
59
+ | per_page | integer | No | Items per page (default: 20, max: 100) |
60
+ | sort | string | No | Sort field (prefix with - for descending) |
61
+ | [filter] | [type] | No | [Filter description] |
62
+
63
+ **Response:** `200 OK`
64
+ ```json
65
+ {
66
+ "data": [
67
+ {
68
+ "id": "uuid",
69
+ "type": "[resource]",
70
+ "attributes": {
71
+ "[field]": "[value]"
72
+ },
73
+ "relationships": {
74
+ "[related]": {
75
+ "id": "uuid",
76
+ "type": "[related_type]"
77
+ }
78
+ }
79
+ }
80
+ ],
81
+ "meta": {
82
+ "total": 100,
83
+ "page": 1,
84
+ "per_page": 20,
85
+ "total_pages": 5
86
+ },
87
+ "links": {
88
+ "self": "/[resources]?page=1",
89
+ "next": "/[resources]?page=2",
90
+ "last": "/[resources]?page=5"
91
+ }
92
+ }
93
+ ```
94
+
95
+ ---
96
+
97
+ #### Get [Resource]
98
+
99
+ Retrieves a single [resource] by ID.
100
+
101
+ **Endpoint:** `GET /[resources]/{id}`
102
+
103
+ **Path Parameters:**
104
+ | Parameter | Type | Description |
105
+ |-----------|------|-------------|
106
+ | id | uuid | Unique identifier of the [resource] |
107
+
108
+ **Response:** `200 OK`
109
+ ```json
110
+ {
111
+ "data": {
112
+ "id": "uuid",
113
+ "type": "[resource]",
114
+ "attributes": {
115
+ "[field]": "[value]"
116
+ }
117
+ }
118
+ }
119
+ ```
120
+
121
+ **Error Responses:**
122
+ | Status | Code | Description |
123
+ |--------|------|-------------|
124
+ | 404 | NOT_FOUND | [Resource] with specified ID not found |
125
+
126
+ ---
127
+
128
+ #### Create [Resource]
129
+
130
+ Creates a new [resource].
131
+
132
+ **Endpoint:** `POST /[resources]`
133
+
134
+ **Request Body:**
135
+ ```json
136
+ {
137
+ "[field]": "[value]",
138
+ "[required_field]": "[value]"
139
+ }
140
+ ```
141
+
142
+ **Field Validation:**
143
+ | Field | Type | Required | Constraints |
144
+ |-------|------|----------|-------------|
145
+ | [field] | [type] | Yes/No | [min/max, format, enum values] |
146
+
147
+ **Response:** `201 Created`
148
+
149
+ **Headers:**
150
+ ```
151
+ Location: /[resources]/{id}
152
+ ```
153
+
154
+ ```json
155
+ {
156
+ "data": {
157
+ "id": "uuid",
158
+ "type": "[resource]",
159
+ "attributes": {
160
+ "[field]": "[value]"
161
+ }
162
+ }
163
+ }
164
+ ```
165
+
166
+ **Error Responses:**
167
+ | Status | Code | Description |
168
+ |--------|------|-------------|
169
+ | 400 | BAD_REQUEST | Malformed request body |
170
+ | 422 | VALIDATION_ERROR | Field validation failed |
171
+ | 409 | CONFLICT | [Resource] already exists |
172
+
173
+ ---
174
+
175
+ #### Update [Resource]
176
+
177
+ Partially updates an existing [resource].
178
+
179
+ **Endpoint:** `PATCH /[resources]/{id}`
180
+
181
+ **Request Body:**
182
+ ```json
183
+ {
184
+ "[field]": "[new_value]"
185
+ }
186
+ ```
187
+
188
+ **Response:** `200 OK`
189
+ ```json
190
+ {
191
+ "data": {
192
+ "id": "uuid",
193
+ "type": "[resource]",
194
+ "attributes": {
195
+ "[field]": "[new_value]"
196
+ }
197
+ }
198
+ }
199
+ ```
200
+
201
+ **Error Responses:**
202
+ | Status | Code | Description |
203
+ |--------|------|-------------|
204
+ | 404 | NOT_FOUND | [Resource] not found |
205
+ | 422 | VALIDATION_ERROR | Field validation failed |
206
+ | 409 | CONFLICT | Version conflict (if using optimistic locking) |
207
+
208
+ ---
209
+
210
+ #### Delete [Resource]
211
+
212
+ Deletes a [resource].
213
+
214
+ **Endpoint:** `DELETE /[resources]/{id}`
215
+
216
+ **Response:** `204 No Content`
217
+
218
+ **Error Responses:**
219
+ | Status | Code | Description |
220
+ |--------|------|-------------|
221
+ | 404 | NOT_FOUND | [Resource] not found |
222
+ | 409 | CONFLICT | Cannot delete due to [dependencies] |
223
+
224
+ ---
225
+
226
+ ## Custom Actions
227
+
228
+ ### [Action Name]
229
+
230
+ [Description of the action]
231
+
232
+ **Endpoint:** `POST /[resources]/{id}/[action]`
233
+
234
+ **Request Body:**
235
+ ```json
236
+ {
237
+ "[param]": "[value]"
238
+ }
239
+ ```
240
+
241
+ **Response:** `200 OK` or `202 Accepted`
242
+ ```json
243
+ {
244
+ "data": {
245
+ "[result_field]": "[value]"
246
+ }
247
+ }
248
+ ```
249
+
250
+ ---
251
+
252
+ ## Error Format
253
+
254
+ All errors follow this consistent format:
255
+
256
+ ```json
257
+ {
258
+ "error": {
259
+ "code": "ERROR_CODE",
260
+ "message": "Human-readable error message",
261
+ "details": [
262
+ {
263
+ "field": "field_name",
264
+ "code": "FIELD_ERROR_CODE",
265
+ "message": "Field-specific error message"
266
+ }
267
+ ],
268
+ "request_id": "req_abc123",
269
+ "documentation_url": "https://docs.example.com/errors/ERROR_CODE"
270
+ }
271
+ }
272
+ ```
273
+
274
+ ### Error Codes
275
+
276
+ | Code | HTTP Status | Description | Resolution |
277
+ |------|-------------|-------------|------------|
278
+ | VALIDATION_ERROR | 422 | Request validation failed | Check field constraints |
279
+ | NOT_FOUND | 404 | Resource not found | Verify resource ID |
280
+ | UNAUTHORIZED | 401 | Authentication required | Provide valid credentials |
281
+ | FORBIDDEN | 403 | Permission denied | Check user permissions |
282
+ | CONFLICT | 409 | State conflict | Resolve conflict and retry |
283
+ | RATE_LIMITED | 429 | Too many requests | Wait and retry |
284
+ | INTERNAL_ERROR | 500 | Server error | Contact support |
285
+
286
+ ---
287
+
288
+ ## Rate Limiting
289
+
290
+ Rate limits are applied per API key/user.
291
+
292
+ **Headers:**
293
+ ```
294
+ X-RateLimit-Limit: 1000
295
+ X-RateLimit-Remaining: 999
296
+ X-RateLimit-Reset: 1705320000
297
+ ```
298
+
299
+ **Default Limits:**
300
+ | Tier | Requests/Hour | Burst |
301
+ |------|---------------|-------|
302
+ | Free | 100 | 10/min |
303
+ | Basic | 1,000 | 100/min |
304
+ | Pro | 10,000 | 1,000/min |
305
+
306
+ ---
307
+
308
+ ## Webhooks (if applicable)
309
+
310
+ ### Event Types
311
+
312
+ | Event | Description | Payload |
313
+ |-------|-------------|---------|
314
+ | [resource].created | New [resource] created | Full [resource] object |
315
+ | [resource].updated | [Resource] modified | Changed fields |
316
+ | [resource].deleted | [Resource] removed | ID only |
317
+
318
+ ### Payload Format
319
+
320
+ ```json
321
+ {
322
+ "id": "evt_abc123",
323
+ "type": "[resource].created",
324
+ "created_at": "2025-01-15T10:30:00Z",
325
+ "data": {
326
+ "object": { }
327
+ }
328
+ }
329
+ ```
330
+
331
+ ---
332
+
333
+ ## Versioning
334
+
335
+ Current version: `v1`
336
+
337
+ **Version Header:**
338
+ ```
339
+ API-Version: 2025-01-15
340
+ ```
341
+
342
+ **Deprecation Notice:**
343
+ When endpoints are deprecated, the following header is included:
344
+ ```
345
+ Deprecation: true
346
+ Sunset: Sat, 15 Jan 2026 00:00:00 GMT
347
+ Link: <https://api.example.com/v2/[resource]>; rel="successor-version"
348
+ ```
349
+
350
+ ---
351
+
352
+ ## SDKs and Examples
353
+
354
+ ### cURL
355
+
356
+ ```bash
357
+ curl -X GET "https://api.example.com/v1/[resources]" \
358
+ -H "Authorization: Bearer <token>" \
359
+ -H "Content-Type: application/json"
360
+ ```
361
+
362
+ ### JavaScript
363
+
364
+ ```javascript
365
+ const response = await fetch('https://api.example.com/v1/[resources]', {
366
+ headers: {
367
+ 'Authorization': `Bearer ${token}`,
368
+ 'Content-Type': 'application/json'
369
+ }
370
+ });
371
+ const data = await response.json();
372
+ ```
373
+
374
+ ### Python
375
+
376
+ ```python
377
+ import requests
378
+
379
+ response = requests.get(
380
+ 'https://api.example.com/v1/[resources]',
381
+ headers={
382
+ 'Authorization': f'Bearer {token}',
383
+ 'Content-Type': 'application/json'
384
+ }
385
+ )
386
+ data = response.json()
387
+ ```
388
+ ```
389
+
390
+ ## Usage Instructions
391
+
392
+ 1. Copy the template above into your API documentation
393
+ 2. Replace all `[bracketed]` placeholders with actual values
394
+ 3. Remove sections that don't apply to your API
395
+ 4. Add additional resources following the same pattern
396
+ 5. Include real example values in JSON snippets
397
+ 6. Document all error codes your API can return
398
+ 7. Update rate limits to match your actual implementation
399
+
400
+ ## Customization Tips
401
+
402
+ - **For internal APIs**: Simplify authentication section, skip SDK examples
403
+ - **For public APIs**: Add more detail to examples, include sandbox/testing info
404
+ - **For GraphQL companion**: Focus on REST-specific operations, link to GraphQL docs
405
+ - **For microservices**: Add service discovery and health check endpoints
406
+
407
+ ## Checklist
408
+
409
+ Before publishing:
410
+ - [ ] All placeholder text replaced with actual content
411
+ - [ ] All endpoints tested and documented accurately
412
+ - [ ] Error codes match actual implementation
413
+ - [ ] Rate limits documented correctly
414
+ - [ ] Authentication flows verified
415
+ - [ ] Example requests/responses validated
416
+ - [ ] Version information current
417
+ - [ ] Contact/support information included
@@ -0,0 +1,160 @@
1
+ ---
2
+ name: architecture-design
3
+ description: "Provides methodology for creating and validating solution design documents (SDD) with consistency verification, overlap detection, and architecture decision records"
4
+ license: MIT
5
+ compatibility: opencode
6
+ metadata:
7
+ category: design
8
+ version: "1.0"
9
+ ---
10
+
11
+ # Architecture Design
12
+
13
+ Roleplay as a solution design specialist that creates and validates SDDs focusing on HOW the solution will be built through technical architecture and design decisions.
14
+
15
+ ArchitectureDesign {
16
+ Activation {
17
+ When to use this skill:
18
+ - Create a new SDD from the template
19
+ - Complete sections in an existing solution-design.md
20
+ - Validate SDD completeness and consistency
21
+ - Design architecture and document technical decisions
22
+ - Work on any `solution-design.md` file in docs/specs/
23
+ }
24
+
25
+ Template {
26
+ Constraints {
27
+ 1. The SDD template is at [template.md](template.md) -- use this structure exactly
28
+ 2. Read the template from this skill's directory
29
+ 3. Write to spec directory: `docs/specs/[NNN]-[name]/solution-design.md`
30
+ }
31
+ }
32
+
33
+ SDDFocusAreas {
34
+ WhenWorkingOnSDD {
35
+ Focus on:
36
+ - **HOW** it will be built (architecture, patterns)
37
+ - **WHERE** code lives (directory structure, components)
38
+ - **WHAT** interfaces exist (APIs, data models, integrations)
39
+ - **WHY** decisions were made (ADRs with rationale)
40
+ }
41
+
42
+ EnsureAlignmentWith {
43
+ - PRD requirements (every requirement should be addressable)
44
+ - Existing codebase patterns (leverage what already works)
45
+ - Constraints identified in the PRD
46
+ }
47
+ }
48
+
49
+ CyclePattern {
50
+ DiscoveryPhase {
51
+ - Read the completed PRD to understand requirements
52
+ - Explore the codebase to understand existing patterns
53
+ - Launch parallel specialist agents to investigate:
54
+ - Architecture patterns and best practices
55
+ - Database/data model design
56
+ - API design and interface contracts
57
+ - Security implications
58
+ - Performance characteristics
59
+ - Integration approaches
60
+ }
61
+
62
+ DocumentationPhase {
63
+ - Update the SDD with research findings
64
+ - Replace [NEEDS CLARIFICATION] markers with actual content
65
+ - Focus only on current section being processed
66
+ - Follow template structure exactly -- preserve all sections as defined
67
+ }
68
+
69
+ ReviewPhase {
70
+ - Present ALL agent findings to user (complete responses, not summaries)
71
+ - Show conflicting recommendations or trade-offs
72
+ - Present proposed architecture with rationale
73
+ - Highlight decisions needing user confirmation (ADRs)
74
+ - Wait for user confirmation before next cycle
75
+ }
76
+
77
+ SelfCheck {
78
+ Ask yourself each cycle:
79
+ 1. Have I read and understood the relevant PRD requirements?
80
+ 2. Have I explored existing codebase patterns?
81
+ 3. Have I launched parallel specialist agents?
82
+ 4. Have I updated the SDD according to findings?
83
+ 5. Have I presented options and trade-offs to the user?
84
+ 6. Have I received user confirmation on architecture decisions?
85
+ }
86
+ }
87
+
88
+ FinalValidation {
89
+ OverlapAndConflictDetection {
90
+ Identify:
91
+ - **Component Overlap**: Are responsibilities duplicated across components?
92
+ - **Interface Conflicts**: Do multiple interfaces serve the same purpose?
93
+ - **Pattern Inconsistency**: Are there conflicting architectural patterns?
94
+ - **Data Redundancy**: Is data duplicated without justification?
95
+ }
96
+
97
+ CoverageAnalysis {
98
+ Verify:
99
+ - **PRD Coverage**: Are ALL requirements from the PRD addressed?
100
+ - **Component Completeness**: Are all necessary components defined (UI, business logic, data, integration)?
101
+ - **Interface Completeness**: Are all external and internal interfaces specified?
102
+ - **Cross-Cutting Concerns**: Are security, error handling, logging, and performance addressed?
103
+ - **Deployment Coverage**: Are all deployment, configuration, and operational aspects covered?
104
+ }
105
+
106
+ BoundaryValidation {
107
+ Validate:
108
+ - **Component Boundaries**: Is each component's responsibility clearly defined and bounded?
109
+ - **Layer Separation**: Are architectural layers (presentation, business, data) properly separated?
110
+ - **Integration Points**: Are all system boundaries and integration points explicitly documented?
111
+ - **Dependency Direction**: Do dependencies flow in the correct direction (no circular dependencies)?
112
+ }
113
+
114
+ ConsistencyVerification {
115
+ Check:
116
+ - **PRD Alignment**: Does every SDD design decision trace back to a PRD requirement?
117
+ - **Naming Consistency**: Are components, interfaces, and concepts named consistently?
118
+ - **Pattern Adherence**: Are architectural patterns applied consistently throughout?
119
+ - **No Context Drift**: Has the design stayed true to the original business requirements?
120
+ }
121
+ }
122
+
123
+ ValidationChecklist {
124
+ See [validation.md](validation.md) for the complete checklist. Key gates:
125
+ - [ ] All required sections are complete
126
+ - [ ] No [NEEDS CLARIFICATION] markers remain
127
+ - [ ] All context sources are listed with relevance ratings
128
+ - [ ] Project commands are discovered from actual project files
129
+ - [ ] Constraints to Strategy to Design to Implementation path is logical
130
+ - [ ] Architecture pattern is clearly stated with rationale
131
+ - [ ] Every component in diagram has directory mapping
132
+ - [ ] Every interface has specification
133
+ - [ ] Error handling covers all error types
134
+ - [ ] Quality requirements are specific and measurable
135
+ - [ ] Every quality requirement has test coverage
136
+ - [ ] **All architecture decisions confirmed by user**
137
+ - [ ] Component names consistent across diagrams
138
+ - [ ] A developer could implement from this design
139
+ }
140
+
141
+ ArchitectureDecisionRecords {
142
+ Format {
143
+ Every significant decision needs user confirmation:
144
+ ```markdown
145
+ - [ ] ADR-1 [Decision Name]: [Choice made]
146
+ - Rationale: [Why this over alternatives]
147
+ - Trade-offs: [What we accept]
148
+ - User confirmed: _Pending_
149
+ ```
150
+ }
151
+
152
+ Constraints {
153
+ 1. Obtain user confirmation for all implementation-impacting decisions
154
+ }
155
+ }
156
+
157
+ Examples {
158
+ See [examples/architecture-examples.md](examples/architecture-examples.md) for reference.
159
+ }
160
+ }