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,325 @@
|
|
|
1
|
+
# [Domain Concept/Entity Name]
|
|
2
|
+
|
|
3
|
+
> **Category:** Domain/Business Rules
|
|
4
|
+
> **Last Updated:** [Date]
|
|
5
|
+
> **Status:** [Active/Under Review/Deprecated]
|
|
6
|
+
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
**What:** [What this concept represents in the business]
|
|
10
|
+
**Why:** [Why this exists, business justification]
|
|
11
|
+
**Scope:** [Where in the application this applies]
|
|
12
|
+
|
|
13
|
+
## Business Context
|
|
14
|
+
|
|
15
|
+
### Background
|
|
16
|
+
|
|
17
|
+
[Business context and history of this domain concept]
|
|
18
|
+
|
|
19
|
+
### Stakeholders
|
|
20
|
+
|
|
21
|
+
- **[Role 1]:** [How they interact with this]
|
|
22
|
+
- **[Role 2]:** [How they interact with this]
|
|
23
|
+
- **[Role 3]:** [How they interact with this]
|
|
24
|
+
|
|
25
|
+
### Business Goals
|
|
26
|
+
|
|
27
|
+
1. [Goal 1]
|
|
28
|
+
2. [Goal 2]
|
|
29
|
+
3. [Goal 3]
|
|
30
|
+
|
|
31
|
+
## Core Concepts
|
|
32
|
+
|
|
33
|
+
### [Concept 1]
|
|
34
|
+
|
|
35
|
+
**Definition:** [Clear definition]
|
|
36
|
+
**Examples:** [Real-world examples]
|
|
37
|
+
**Constraints:** [Business constraints]
|
|
38
|
+
|
|
39
|
+
### [Concept 2]
|
|
40
|
+
|
|
41
|
+
**Definition:** [Clear definition]
|
|
42
|
+
**Examples:** [Real-world examples]
|
|
43
|
+
**Constraints:** [Business constraints]
|
|
44
|
+
|
|
45
|
+
## Business Rules
|
|
46
|
+
|
|
47
|
+
### Rule 1: [Rule Name]
|
|
48
|
+
|
|
49
|
+
**Statement:** [Clear rule statement]
|
|
50
|
+
|
|
51
|
+
**Rationale:** [Why this rule exists]
|
|
52
|
+
|
|
53
|
+
**Applies to:** [Who/what this affects]
|
|
54
|
+
|
|
55
|
+
**Exceptions:** [When this rule doesn't apply]
|
|
56
|
+
|
|
57
|
+
**Example:**
|
|
58
|
+
```
|
|
59
|
+
Given: [Initial state]
|
|
60
|
+
When: [Action occurs]
|
|
61
|
+
Then: [Expected outcome]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Rule 2: [Rule Name]
|
|
65
|
+
|
|
66
|
+
[Same structure as above]
|
|
67
|
+
|
|
68
|
+
## States and Transitions
|
|
69
|
+
|
|
70
|
+
### State Machine (if applicable)
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
[Initial State]
|
|
74
|
+
↓ [Event/Action]
|
|
75
|
+
[Next State]
|
|
76
|
+
↓ [Event/Action]
|
|
77
|
+
[Final State]
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### State Definitions
|
|
81
|
+
|
|
82
|
+
**[State 1]**
|
|
83
|
+
- **Meaning:** [What this state represents]
|
|
84
|
+
- **Entry conditions:** [How entity enters this state]
|
|
85
|
+
- **Exit conditions:** [How entity leaves this state]
|
|
86
|
+
- **Allowed actions:** [What can happen in this state]
|
|
87
|
+
|
|
88
|
+
**[State 2]**
|
|
89
|
+
[Same structure]
|
|
90
|
+
|
|
91
|
+
### Transition Rules
|
|
92
|
+
|
|
93
|
+
**[State A] → [State B]**
|
|
94
|
+
- **Trigger:** [What causes transition]
|
|
95
|
+
- **Conditions:** [Required conditions]
|
|
96
|
+
- **Side effects:** [What else happens]
|
|
97
|
+
- **Validation:** [What must be true]
|
|
98
|
+
|
|
99
|
+
## Permissions and Access Control
|
|
100
|
+
|
|
101
|
+
### Who Can Do What
|
|
102
|
+
|
|
103
|
+
**[Role 1]:**
|
|
104
|
+
- ✅ Can: [Action 1, Action 2]
|
|
105
|
+
- ❌ Cannot: [Action 3, Action 4]
|
|
106
|
+
- ⚠️ Conditional: [Action 5 - under conditions]
|
|
107
|
+
|
|
108
|
+
**[Role 2]:**
|
|
109
|
+
[Same structure]
|
|
110
|
+
|
|
111
|
+
### Permission Rules
|
|
112
|
+
|
|
113
|
+
**Rule:** [Permission rule statement]
|
|
114
|
+
**Logic:**
|
|
115
|
+
```
|
|
116
|
+
IF [condition]
|
|
117
|
+
AND [condition]
|
|
118
|
+
THEN [permission granted/denied]
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Validation Rules
|
|
122
|
+
|
|
123
|
+
### Field Validations
|
|
124
|
+
|
|
125
|
+
**[Field 1]:**
|
|
126
|
+
- **Type:** [Data type]
|
|
127
|
+
- **Required:** [Yes/No]
|
|
128
|
+
- **Format:** [Pattern or format]
|
|
129
|
+
- **Range:** [Min/max values]
|
|
130
|
+
- **Business rule:** [Any business constraint]
|
|
131
|
+
|
|
132
|
+
**[Field 2]:**
|
|
133
|
+
[Same structure]
|
|
134
|
+
|
|
135
|
+
### Cross-Field Validations
|
|
136
|
+
|
|
137
|
+
**Validation 1:** [Description]
|
|
138
|
+
```
|
|
139
|
+
IF [field1] is [value]
|
|
140
|
+
THEN [field2] must be [constraint]
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Validation 2:** [Description]
|
|
144
|
+
```
|
|
145
|
+
[Validation logic]
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Workflows
|
|
149
|
+
|
|
150
|
+
### Workflow 1: [Workflow Name]
|
|
151
|
+
|
|
152
|
+
**Trigger:** [What initiates this workflow]
|
|
153
|
+
|
|
154
|
+
**Steps:**
|
|
155
|
+
1. **[Step 1]**
|
|
156
|
+
- Actor: [Who performs this]
|
|
157
|
+
- Action: [What happens]
|
|
158
|
+
- Validation: [What's checked]
|
|
159
|
+
- Outcome: [Result]
|
|
160
|
+
|
|
161
|
+
2. **[Step 2]**
|
|
162
|
+
[Same structure]
|
|
163
|
+
|
|
164
|
+
3. **[Step 3]**
|
|
165
|
+
[Same structure]
|
|
166
|
+
|
|
167
|
+
**Success Criteria:** [What defines success]
|
|
168
|
+
**Failure Scenarios:** [What can go wrong]
|
|
169
|
+
|
|
170
|
+
## Calculations and Algorithms
|
|
171
|
+
|
|
172
|
+
### Calculation 1: [Name]
|
|
173
|
+
|
|
174
|
+
**Purpose:** [What this calculates]
|
|
175
|
+
|
|
176
|
+
**Formula:**
|
|
177
|
+
```
|
|
178
|
+
[Mathematical or logical formula]
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
**Example:**
|
|
182
|
+
```
|
|
183
|
+
Given:
|
|
184
|
+
- input1 = [value]
|
|
185
|
+
- input2 = [value]
|
|
186
|
+
|
|
187
|
+
Calculation:
|
|
188
|
+
result = [formula applied]
|
|
189
|
+
|
|
190
|
+
Output: [result]
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Edge Cases:**
|
|
194
|
+
- [Edge case 1 and handling]
|
|
195
|
+
- [Edge case 2 and handling]
|
|
196
|
+
|
|
197
|
+
## Constraints and Limits
|
|
198
|
+
|
|
199
|
+
### Business Constraints
|
|
200
|
+
|
|
201
|
+
1. **[Constraint 1]:** [Description and rationale]
|
|
202
|
+
2. **[Constraint 2]:** [Description and rationale]
|
|
203
|
+
3. **[Constraint 3]:** [Description and rationale]
|
|
204
|
+
|
|
205
|
+
### System Limits
|
|
206
|
+
|
|
207
|
+
- **[Limit 1]:** [Value and reason]
|
|
208
|
+
- **[Limit 2]:** [Value and reason]
|
|
209
|
+
- **[Limit 3]:** [Value and reason]
|
|
210
|
+
|
|
211
|
+
## Edge Cases
|
|
212
|
+
|
|
213
|
+
### Edge Case 1: [Scenario]
|
|
214
|
+
|
|
215
|
+
**Situation:** [Describe the edge case]
|
|
216
|
+
**Business Rule:** [How to handle it]
|
|
217
|
+
**Example:** [Concrete example]
|
|
218
|
+
|
|
219
|
+
### Edge Case 2: [Scenario]
|
|
220
|
+
|
|
221
|
+
[Same structure]
|
|
222
|
+
|
|
223
|
+
## Compliance and Regulations
|
|
224
|
+
|
|
225
|
+
### Regulatory Requirements
|
|
226
|
+
|
|
227
|
+
**[Regulation 1]:** [How it affects this domain concept]
|
|
228
|
+
**[Regulation 2]:** [How it affects this domain concept]
|
|
229
|
+
|
|
230
|
+
### Audit Requirements
|
|
231
|
+
|
|
232
|
+
- **What to log:** [Events/changes to track]
|
|
233
|
+
- **Retention:** [How long to keep records]
|
|
234
|
+
- **Who can access:** [Audit log access rules]
|
|
235
|
+
|
|
236
|
+
## Reporting and Analytics
|
|
237
|
+
|
|
238
|
+
### Key Metrics
|
|
239
|
+
|
|
240
|
+
1. **[Metric 1]:** [What it measures and why it matters]
|
|
241
|
+
2. **[Metric 2]:** [What it measures and why it matters]
|
|
242
|
+
3. **[Metric 3]:** [What it measures and why it matters]
|
|
243
|
+
|
|
244
|
+
### Reporting Requirements
|
|
245
|
+
|
|
246
|
+
- **[Report 1]:** [Purpose, frequency, audience]
|
|
247
|
+
- **[Report 2]:** [Purpose, frequency, audience]
|
|
248
|
+
|
|
249
|
+
## Examples and Scenarios
|
|
250
|
+
|
|
251
|
+
### Scenario 1: [Happy Path]
|
|
252
|
+
|
|
253
|
+
**Description:** [Common successful scenario]
|
|
254
|
+
|
|
255
|
+
**Flow:**
|
|
256
|
+
```
|
|
257
|
+
1. [Step with data]
|
|
258
|
+
2. [Step with data]
|
|
259
|
+
3. [Step with outcome]
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
**Business Rules Applied:** [Which rules from above]
|
|
263
|
+
|
|
264
|
+
### Scenario 2: [Error Case]
|
|
265
|
+
|
|
266
|
+
**Description:** [Common error scenario]
|
|
267
|
+
|
|
268
|
+
**Flow:**
|
|
269
|
+
```
|
|
270
|
+
1. [Step with data]
|
|
271
|
+
2. [Error condition]
|
|
272
|
+
3. [Error handling per business rules]
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
**Business Rules Applied:** [Which rules from above]
|
|
276
|
+
|
|
277
|
+
### Scenario 3: [Edge Case]
|
|
278
|
+
|
|
279
|
+
**Description:** [Unusual but valid scenario]
|
|
280
|
+
|
|
281
|
+
**Flow:**
|
|
282
|
+
```
|
|
283
|
+
1. [Step with data]
|
|
284
|
+
2. [Edge condition]
|
|
285
|
+
3. [Special handling]
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**Business Rules Applied:** [Which rules from above]
|
|
289
|
+
|
|
290
|
+
## Integration Points
|
|
291
|
+
|
|
292
|
+
### System Touchpoints
|
|
293
|
+
|
|
294
|
+
**[System 1]:**
|
|
295
|
+
- **Interaction:** [How they interact]
|
|
296
|
+
- **Data shared:** [What data flows]
|
|
297
|
+
- **Trigger:** [What causes interaction]
|
|
298
|
+
|
|
299
|
+
**[System 2]:**
|
|
300
|
+
[Same structure]
|
|
301
|
+
|
|
302
|
+
## Glossary
|
|
303
|
+
|
|
304
|
+
**[Term 1]:** [Definition in this context]
|
|
305
|
+
**[Term 2]:** [Definition in this context]
|
|
306
|
+
**[Term 3]:** [Definition in this context]
|
|
307
|
+
|
|
308
|
+
## Related Documentation
|
|
309
|
+
|
|
310
|
+
- **Patterns:** [Pattern Doc](../patterns/doc.md) - [Technical implementation]
|
|
311
|
+
- **Interfaces:** [Interface Doc](../interfaces/doc.md) - [External systems]
|
|
312
|
+
- **Specifications:** [Spec](../specs/NNN-name/PRD.md) - [Feature requirements]
|
|
313
|
+
|
|
314
|
+
## References
|
|
315
|
+
|
|
316
|
+
- [Business document or policy]
|
|
317
|
+
- [Industry standard or regulation]
|
|
318
|
+
- [Internal decision document]
|
|
319
|
+
|
|
320
|
+
## Version History
|
|
321
|
+
|
|
322
|
+
| Date | Change | Reason | Author |
|
|
323
|
+
|------|--------|--------|--------|
|
|
324
|
+
| [Date] | Initial documentation | [Why] | [Name/Tool] |
|
|
325
|
+
| [Date] | Updated [aspect] | [Why] | [Name/Tool] |
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# [Service Name] Integration
|
|
2
|
+
|
|
3
|
+
> **Category:** External Interface
|
|
4
|
+
> **Service:** [Service Name]
|
|
5
|
+
> **Last Updated:** [Date]
|
|
6
|
+
> **Status:** [Active/Deprecated/Planned]
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
**Service:** [Full service name]
|
|
11
|
+
**Provider:** [Company/organization]
|
|
12
|
+
**Purpose:** [What this integration accomplishes]
|
|
13
|
+
**Documentation:** [Link to official API docs]
|
|
14
|
+
|
|
15
|
+
## Authentication
|
|
16
|
+
|
|
17
|
+
### Method
|
|
18
|
+
|
|
19
|
+
[OAuth 2.0 / API Key / Basic Auth / JWT / etc.]
|
|
20
|
+
|
|
21
|
+
### Credentials Management
|
|
22
|
+
|
|
23
|
+
**Location:** [Where credentials are stored]
|
|
24
|
+
**Environment Variables:**
|
|
25
|
+
```bash
|
|
26
|
+
SERVICE_API_KEY=xxx
|
|
27
|
+
SERVICE_SECRET=xxx
|
|
28
|
+
SERVICE_ENDPOINT=https://...
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
**Rotation Policy:** [How often credentials change]
|
|
32
|
+
|
|
33
|
+
### Authentication Example
|
|
34
|
+
|
|
35
|
+
```[language]
|
|
36
|
+
// Example of authentication setup
|
|
37
|
+
[Code snippet]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## API Endpoints Used
|
|
41
|
+
|
|
42
|
+
### Endpoint 1: [Name]
|
|
43
|
+
|
|
44
|
+
**URL:** `[METHOD] /path/to/endpoint`
|
|
45
|
+
**Purpose:** [What this endpoint does]
|
|
46
|
+
|
|
47
|
+
**Request:**
|
|
48
|
+
```json
|
|
49
|
+
{
|
|
50
|
+
"field1": "value",
|
|
51
|
+
"field2": "value"
|
|
52
|
+
}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Response:**
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"status": "success",
|
|
59
|
+
"data": { }
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**Error Handling:**
|
|
64
|
+
- `400`: [How we handle]
|
|
65
|
+
- `401`: [How we handle]
|
|
66
|
+
- `500`: [How we handle]
|
|
67
|
+
|
|
68
|
+
### Endpoint 2: [Name]
|
|
69
|
+
|
|
70
|
+
**URL:** `[METHOD] /path/to/endpoint`
|
|
71
|
+
**Purpose:** [What this endpoint does]
|
|
72
|
+
|
|
73
|
+
[Same structure as above]
|
|
74
|
+
|
|
75
|
+
## Webhooks (if applicable)
|
|
76
|
+
|
|
77
|
+
### Webhook 1: [Event Name]
|
|
78
|
+
|
|
79
|
+
**Event Type:** `[event.type]`
|
|
80
|
+
**Trigger:** [When this fires]
|
|
81
|
+
**URL:** `[Your webhook endpoint]`
|
|
82
|
+
|
|
83
|
+
**Payload:**
|
|
84
|
+
```json
|
|
85
|
+
{
|
|
86
|
+
"event": "type",
|
|
87
|
+
"data": { }
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**Signature Verification:**
|
|
92
|
+
```[language]
|
|
93
|
+
// How to verify webhook authenticity
|
|
94
|
+
[Code snippet]
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Handling:**
|
|
98
|
+
```[language]
|
|
99
|
+
// How we process this webhook
|
|
100
|
+
[Code snippet]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
## Rate Limits
|
|
104
|
+
|
|
105
|
+
- **Requests per second:** [Limit]
|
|
106
|
+
- **Requests per day:** [Limit]
|
|
107
|
+
- **Burst limit:** [Limit]
|
|
108
|
+
|
|
109
|
+
**Handling Strategy:** [How we respect limits]
|
|
110
|
+
```[language]
|
|
111
|
+
// Rate limiting implementation
|
|
112
|
+
[Code snippet]
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Data Mapping
|
|
116
|
+
|
|
117
|
+
### Our Model → Service Model
|
|
118
|
+
|
|
119
|
+
| Our Field | Service Field | Transformation |
|
|
120
|
+
|-----------|---------------|----------------|
|
|
121
|
+
| `userId` | `external_id` | String conversion |
|
|
122
|
+
| `email` | `email_address` | Direct mapping |
|
|
123
|
+
| `amount` | `total_cents` | Multiply by 100 |
|
|
124
|
+
|
|
125
|
+
### Service Model → Our Model
|
|
126
|
+
|
|
127
|
+
| Service Field | Our Field | Transformation |
|
|
128
|
+
|---------------|-----------|----------------|
|
|
129
|
+
| `id` | `externalId` | Direct mapping |
|
|
130
|
+
| `status` | `state` | Enum mapping |
|
|
131
|
+
| `created_at` | `createdAt` | ISO 8601 parse |
|
|
132
|
+
|
|
133
|
+
## Error Handling
|
|
134
|
+
|
|
135
|
+
### Common Errors
|
|
136
|
+
|
|
137
|
+
**Error 1: [Name/Code]**
|
|
138
|
+
- **Cause:** [What triggers this]
|
|
139
|
+
- **Recovery:** [How we handle it]
|
|
140
|
+
- **Retry:** [Yes/No, strategy]
|
|
141
|
+
|
|
142
|
+
**Error 2: [Name/Code]**
|
|
143
|
+
- **Cause:** [What triggers this]
|
|
144
|
+
- **Recovery:** [How we handle it]
|
|
145
|
+
- **Retry:** [Yes/No, strategy]
|
|
146
|
+
|
|
147
|
+
### Retry Strategy
|
|
148
|
+
|
|
149
|
+
```[language]
|
|
150
|
+
// Exponential backoff implementation
|
|
151
|
+
[Code snippet]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Testing
|
|
155
|
+
|
|
156
|
+
### Test Credentials
|
|
157
|
+
|
|
158
|
+
**Sandbox URL:** `https://sandbox.service.com`
|
|
159
|
+
**Test API Key:** `[Where to get it]`
|
|
160
|
+
|
|
161
|
+
### Mock Server
|
|
162
|
+
|
|
163
|
+
**Location:** `tests/mocks/[service]-mock.ts`
|
|
164
|
+
**Usage:**
|
|
165
|
+
```[language]
|
|
166
|
+
// How to use mock in tests
|
|
167
|
+
[Code snippet]
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### Integration Tests
|
|
171
|
+
|
|
172
|
+
```[language]
|
|
173
|
+
// Example integration test
|
|
174
|
+
[Code snippet]
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Monitoring
|
|
178
|
+
|
|
179
|
+
### Health Checks
|
|
180
|
+
|
|
181
|
+
**Endpoint:** `[Service status endpoint]`
|
|
182
|
+
**Frequency:** [How often we check]
|
|
183
|
+
|
|
184
|
+
### Metrics to Track
|
|
185
|
+
|
|
186
|
+
- Request success rate
|
|
187
|
+
- Response time (p50, p95, p99)
|
|
188
|
+
- Error rate by type
|
|
189
|
+
- Rate limit proximity
|
|
190
|
+
|
|
191
|
+
### Alerts
|
|
192
|
+
|
|
193
|
+
- **Critical:** [Conditions that trigger urgent alerts]
|
|
194
|
+
- **Warning:** [Conditions that trigger warnings]
|
|
195
|
+
|
|
196
|
+
## Security Considerations
|
|
197
|
+
|
|
198
|
+
- [Security consideration 1]
|
|
199
|
+
- [Security consideration 2]
|
|
200
|
+
- [Security consideration 3]
|
|
201
|
+
|
|
202
|
+
## Compliance
|
|
203
|
+
|
|
204
|
+
**Data Handling:**
|
|
205
|
+
- PII fields: [List]
|
|
206
|
+
- Retention policy: [Duration]
|
|
207
|
+
- Geographic restrictions: [Any]
|
|
208
|
+
|
|
209
|
+
**Regulations:**
|
|
210
|
+
- GDPR: [Compliance notes]
|
|
211
|
+
- CCPA: [Compliance notes]
|
|
212
|
+
- Other: [Relevant regulations]
|
|
213
|
+
|
|
214
|
+
## Cost Considerations
|
|
215
|
+
|
|
216
|
+
**Pricing Model:** [How service charges]
|
|
217
|
+
**Cost per request:** [Estimate]
|
|
218
|
+
**Monthly estimate:** [Based on usage]
|
|
219
|
+
|
|
220
|
+
## Migration/Upgrade Path
|
|
221
|
+
|
|
222
|
+
**Current Version:** [Version]
|
|
223
|
+
**Upgrade Available:** [Yes/No, version]
|
|
224
|
+
**Breaking Changes:** [List if applicable]
|
|
225
|
+
|
|
226
|
+
**Migration Steps:**
|
|
227
|
+
1. [Step 1]
|
|
228
|
+
2. [Step 2]
|
|
229
|
+
3. [Step 3]
|
|
230
|
+
|
|
231
|
+
## Related Documentation
|
|
232
|
+
|
|
233
|
+
- **Patterns:** [Pattern Doc](../patterns/doc.md) - [How we use this service]
|
|
234
|
+
- **Domain:** [Domain Doc](../domain/doc.md) - [Business rules related to this]
|
|
235
|
+
- **Specifications:** [Spec](../specs/NNN-name/SDD.md) - [Implementation details]
|
|
236
|
+
|
|
237
|
+
## External Resources
|
|
238
|
+
|
|
239
|
+
- [Official API documentation]
|
|
240
|
+
- [Status page]
|
|
241
|
+
- [Developer community/forum]
|
|
242
|
+
- [SDK/library used]
|
|
243
|
+
|
|
244
|
+
## Contact
|
|
245
|
+
|
|
246
|
+
**Support:** [How to get help]
|
|
247
|
+
**Account Manager:** [If applicable]
|
|
248
|
+
**Escalation:** [Critical issue contact]
|
|
249
|
+
|
|
250
|
+
## Version History
|
|
251
|
+
|
|
252
|
+
| Date | Change | Author |
|
|
253
|
+
|------|--------|--------|
|
|
254
|
+
| [Date] | Initial integration | [Name/Tool] |
|
|
255
|
+
| [Date] | Updated to v2 API | [Name/Tool] |
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
# [Pattern Name]
|
|
2
|
+
|
|
3
|
+
> **Category:** Technical Pattern
|
|
4
|
+
> **Last Updated:** [Date]
|
|
5
|
+
> **Status:** [Active/Deprecated/Proposed]
|
|
6
|
+
|
|
7
|
+
## Purpose
|
|
8
|
+
|
|
9
|
+
[Brief description of what this pattern accomplishes and why it exists]
|
|
10
|
+
|
|
11
|
+
## Context
|
|
12
|
+
|
|
13
|
+
**When to use this pattern:**
|
|
14
|
+
- [Scenario 1]
|
|
15
|
+
- [Scenario 2]
|
|
16
|
+
- [Scenario 3]
|
|
17
|
+
|
|
18
|
+
**When NOT to use this pattern:**
|
|
19
|
+
- [Anti-scenario 1]
|
|
20
|
+
- [Anti-scenario 2]
|
|
21
|
+
|
|
22
|
+
## Implementation
|
|
23
|
+
|
|
24
|
+
### Overview
|
|
25
|
+
|
|
26
|
+
[High-level description of how the pattern works]
|
|
27
|
+
|
|
28
|
+
### Structure
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
[Directory structure or component organization]
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Key Components
|
|
35
|
+
|
|
36
|
+
**[Component 1 Name]**
|
|
37
|
+
- Purpose: [What it does]
|
|
38
|
+
- Responsibilities: [What it handles]
|
|
39
|
+
- Location: [Where to find it]
|
|
40
|
+
|
|
41
|
+
**[Component 2 Name]**
|
|
42
|
+
- Purpose: [What it does]
|
|
43
|
+
- Responsibilities: [What it handles]
|
|
44
|
+
- Location: [Where to find it]
|
|
45
|
+
|
|
46
|
+
### Code Example
|
|
47
|
+
|
|
48
|
+
```[language]
|
|
49
|
+
// Example implementation showing the pattern in action
|
|
50
|
+
[Code snippet]
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Usage Examples
|
|
54
|
+
|
|
55
|
+
### Example 1: [Scenario Name]
|
|
56
|
+
|
|
57
|
+
**Situation:** [Describe the use case]
|
|
58
|
+
|
|
59
|
+
**Implementation:**
|
|
60
|
+
```[language]
|
|
61
|
+
[Code showing how pattern is applied]
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Result:** [What this achieves]
|
|
65
|
+
|
|
66
|
+
### Example 2: [Scenario Name]
|
|
67
|
+
|
|
68
|
+
**Situation:** [Describe the use case]
|
|
69
|
+
|
|
70
|
+
**Implementation:**
|
|
71
|
+
```[language]
|
|
72
|
+
[Code showing how pattern is applied]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
**Result:** [What this achieves]
|
|
76
|
+
|
|
77
|
+
## Edge Cases and Gotchas
|
|
78
|
+
|
|
79
|
+
### Edge Case 1: [Case Name]
|
|
80
|
+
|
|
81
|
+
**Problem:** [What can go wrong]
|
|
82
|
+
**Solution:** [How to handle it]
|
|
83
|
+
|
|
84
|
+
### Edge Case 2: [Case Name]
|
|
85
|
+
|
|
86
|
+
**Problem:** [What can go wrong]
|
|
87
|
+
**Solution:** [How to handle it]
|
|
88
|
+
|
|
89
|
+
## Best Practices
|
|
90
|
+
|
|
91
|
+
1. **[Practice 1]:** [Description]
|
|
92
|
+
2. **[Practice 2]:** [Description]
|
|
93
|
+
3. **[Practice 3]:** [Description]
|
|
94
|
+
|
|
95
|
+
## Anti-Patterns
|
|
96
|
+
|
|
97
|
+
❌ **Don't:** [What to avoid]
|
|
98
|
+
**Why:** [Reason]
|
|
99
|
+
**Instead:** [Better approach]
|
|
100
|
+
|
|
101
|
+
❌ **Don't:** [What to avoid]
|
|
102
|
+
**Why:** [Reason]
|
|
103
|
+
**Instead:** [Better approach]
|
|
104
|
+
|
|
105
|
+
## Testing Strategy
|
|
106
|
+
|
|
107
|
+
**How to test code using this pattern:**
|
|
108
|
+
- [Testing approach 1]
|
|
109
|
+
- [Testing approach 2]
|
|
110
|
+
- [Testing approach 3]
|
|
111
|
+
|
|
112
|
+
**Example test:**
|
|
113
|
+
```[language]
|
|
114
|
+
[Test code example]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Performance Considerations
|
|
118
|
+
|
|
119
|
+
- **[Aspect 1]:** [Performance implication]
|
|
120
|
+
- **[Aspect 2]:** [Performance implication]
|
|
121
|
+
- **[Aspect 3]:** [Performance implication]
|
|
122
|
+
|
|
123
|
+
## Related Patterns
|
|
124
|
+
|
|
125
|
+
- [Pattern Name](./pattern-file.md) - [Relationship description]
|
|
126
|
+
- [Pattern Name](./pattern-file.md) - [Relationship description]
|
|
127
|
+
|
|
128
|
+
## Related Documentation
|
|
129
|
+
|
|
130
|
+
- **Domain:** [Domain Doc](../domain/doc.md) - [Relevance]
|
|
131
|
+
- **Interfaces:** [Interface Doc](../interfaces/doc.md) - [Relevance]
|
|
132
|
+
- **Specifications:** [Spec](../specs/NNN-name/SDD.md) - [Relevance]
|
|
133
|
+
|
|
134
|
+
## References
|
|
135
|
+
|
|
136
|
+
- [External resource 1]
|
|
137
|
+
- [External resource 2]
|
|
138
|
+
- [Internal decision doc or RFC]
|
|
139
|
+
|
|
140
|
+
## Version History
|
|
141
|
+
|
|
142
|
+
| Date | Change | Author |
|
|
143
|
+
|------|--------|--------|
|
|
144
|
+
| [Date] | Initial documentation | [Name/Tool] |
|