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,380 @@
|
|
|
1
|
+
# Template: System Documentation
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Use this template to document a system's architecture, components, and operations. System documentation helps new team members onboard, supports operational decisions, and preserves critical knowledge about how the system works and why.
|
|
6
|
+
|
|
7
|
+
## Template
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
# [System Name]
|
|
11
|
+
|
|
12
|
+
**Version:** [Document version, e.g., 1.0]
|
|
13
|
+
**Last Updated:** [YYYY-MM-DD]
|
|
14
|
+
**Owner:** [Team or individual responsible]
|
|
15
|
+
|
|
16
|
+
## Overview
|
|
17
|
+
|
|
18
|
+
### Purpose
|
|
19
|
+
|
|
20
|
+
[1-2 paragraphs explaining what this system does and why it exists.
|
|
21
|
+
Focus on the business problem it solves, not implementation details.]
|
|
22
|
+
|
|
23
|
+
### Key Capabilities
|
|
24
|
+
|
|
25
|
+
- [Capability 1: What the system enables users/other systems to do]
|
|
26
|
+
- [Capability 2]
|
|
27
|
+
- [Capability 3]
|
|
28
|
+
|
|
29
|
+
### Scope
|
|
30
|
+
|
|
31
|
+
**In Scope:**
|
|
32
|
+
- [What this system is responsible for]
|
|
33
|
+
|
|
34
|
+
**Out of Scope:**
|
|
35
|
+
- [What this system explicitly does NOT handle]
|
|
36
|
+
- [Common misconceptions about system boundaries]
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Architecture
|
|
41
|
+
|
|
42
|
+
### System Context
|
|
43
|
+
|
|
44
|
+
[Diagram showing this system and its external interactions]
|
|
45
|
+
|
|
46
|
+
```
|
|
47
|
+
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
|
|
48
|
+
│ Users │────▶│ System │────▶│ External │
|
|
49
|
+
│ │ │ │ │ Service │
|
|
50
|
+
└─────────────┘ └─────────────┘ └─────────────┘
|
|
51
|
+
│
|
|
52
|
+
▼
|
|
53
|
+
┌─────────────┐
|
|
54
|
+
│ Database │
|
|
55
|
+
└─────────────┘
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
[Description of each external entity and its relationship to the system]
|
|
59
|
+
|
|
60
|
+
### Component Architecture
|
|
61
|
+
|
|
62
|
+
[Diagram showing major internal components]
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
┌──────────────────────────────────────────────────┐
|
|
66
|
+
│ System │
|
|
67
|
+
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
|
|
68
|
+
│ │ API │ │ Worker │ │ Scheduler│ │
|
|
69
|
+
│ │ Layer │ │ Service │ │ │ │
|
|
70
|
+
│ └────┬─────┘ └────┬─────┘ └────┬─────┘ │
|
|
71
|
+
│ │ │ │ │
|
|
72
|
+
│ └─────────────┼─────────────┘ │
|
|
73
|
+
│ ▼ │
|
|
74
|
+
│ ┌──────────────┐ │
|
|
75
|
+
│ │ Domain │ │
|
|
76
|
+
│ │ Layer │ │
|
|
77
|
+
│ └──────────────┘ │
|
|
78
|
+
└──────────────────────────────────────────────────┘
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Component Descriptions
|
|
82
|
+
|
|
83
|
+
| Component | Responsibility | Technology |
|
|
84
|
+
|-----------|---------------|------------|
|
|
85
|
+
| [API Layer] | [Handles HTTP requests, authentication] | [Node.js, Express] |
|
|
86
|
+
| [Worker Service] | [Processes async jobs from queue] | [Node.js, Bull] |
|
|
87
|
+
| [Domain Layer] | [Business logic, validations] | [TypeScript] |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Data Architecture
|
|
92
|
+
|
|
93
|
+
### Data Stores
|
|
94
|
+
|
|
95
|
+
| Store | Type | Purpose | Retention |
|
|
96
|
+
|-------|------|---------|-----------|
|
|
97
|
+
| [Primary DB] | [PostgreSQL] | [Transactional data] | [Indefinite] |
|
|
98
|
+
| [Cache] | [Redis] | [Session, hot data] | [24 hours] |
|
|
99
|
+
| [Search] | [Elasticsearch] | [Full-text search] | [90 days] |
|
|
100
|
+
|
|
101
|
+
### Key Entities
|
|
102
|
+
|
|
103
|
+
[Diagram or table showing main data entities and relationships]
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
┌─────────┐ ┌─────────┐ ┌─────────┐
|
|
107
|
+
│ User │──────▶│ Order │──────▶│ Item │
|
|
108
|
+
└─────────┘ 1:N └─────────┘ 1:N └─────────┘
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Data Flows
|
|
112
|
+
|
|
113
|
+
[Describe how data moves through the system for key operations]
|
|
114
|
+
|
|
115
|
+
**[Flow Name, e.g., Order Creation]:**
|
|
116
|
+
1. User submits order via API
|
|
117
|
+
2. API validates request and creates order record
|
|
118
|
+
3. Order event published to message queue
|
|
119
|
+
4. Worker processes order, updates inventory
|
|
120
|
+
5. Notification sent to user
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Integration Points
|
|
125
|
+
|
|
126
|
+
### Upstream Dependencies
|
|
127
|
+
|
|
128
|
+
[Services this system depends on]
|
|
129
|
+
|
|
130
|
+
| Service | Purpose | Protocol | SLA |
|
|
131
|
+
|---------|---------|----------|-----|
|
|
132
|
+
| [Auth Service] | [User authentication] | [REST/OAuth2] | [99.9%] |
|
|
133
|
+
| [Payment Gateway] | [Process payments] | [REST] | [99.95%] |
|
|
134
|
+
|
|
135
|
+
### Downstream Consumers
|
|
136
|
+
|
|
137
|
+
[Services that depend on this system]
|
|
138
|
+
|
|
139
|
+
| Consumer | Purpose | Protocol | Contract |
|
|
140
|
+
|----------|---------|----------|----------|
|
|
141
|
+
| [Mobile App] | [User interface] | [REST API] | [API v2] |
|
|
142
|
+
| [Analytics] | [Business metrics] | [Event stream] | [Event schema v1] |
|
|
143
|
+
|
|
144
|
+
### API Contracts
|
|
145
|
+
|
|
146
|
+
[Link to API documentation or summary of key endpoints]
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Deployment
|
|
151
|
+
|
|
152
|
+
### Infrastructure
|
|
153
|
+
|
|
154
|
+
[Diagram showing deployment architecture]
|
|
155
|
+
|
|
156
|
+
```
|
|
157
|
+
┌─────────────────────────────────────────────┐
|
|
158
|
+
│ AWS │
|
|
159
|
+
│ ┌─────────┐ ┌──────────────────────┐ │
|
|
160
|
+
│ │ ALB │───▶│ ECS Cluster │ │
|
|
161
|
+
│ └─────────┘ │ ┌────┐ ┌────┐ ┌────┐│ │
|
|
162
|
+
│ │ │ API│ │ API│ │ API││ │
|
|
163
|
+
│ │ └────┘ └────┘ └────┘│ │
|
|
164
|
+
│ └──────────────────────┘ │
|
|
165
|
+
│ │ │
|
|
166
|
+
│ ┌────────┴────────┐ │
|
|
167
|
+
│ ▼ ▼ │
|
|
168
|
+
│ ┌──────────┐ ┌──────────┐ │
|
|
169
|
+
│ │ RDS │ │ Redis │ │
|
|
170
|
+
│ └──────────┘ └──────────┘ │
|
|
171
|
+
└─────────────────────────────────────────────┘
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### Environments
|
|
175
|
+
|
|
176
|
+
| Environment | Purpose | URL | Notes |
|
|
177
|
+
|-------------|---------|-----|-------|
|
|
178
|
+
| Development | [Local testing] | [localhost:3000] | [Local Docker] |
|
|
179
|
+
| Staging | [Pre-prod testing] | [staging.example.com] | [Production-like] |
|
|
180
|
+
| Production | [Live traffic] | [api.example.com] | [Multi-AZ] |
|
|
181
|
+
|
|
182
|
+
### Configuration
|
|
183
|
+
|
|
184
|
+
[List key configuration variables and their purpose]
|
|
185
|
+
|
|
186
|
+
| Variable | Purpose | Default | Notes |
|
|
187
|
+
|----------|---------|---------|-------|
|
|
188
|
+
| `DATABASE_URL` | [DB connection] | [Required] | [No default] |
|
|
189
|
+
| `CACHE_TTL` | [Cache duration] | [3600] | [Seconds] |
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Operations
|
|
194
|
+
|
|
195
|
+
### Monitoring
|
|
196
|
+
|
|
197
|
+
| Metric | Description | Alert Threshold |
|
|
198
|
+
|--------|-------------|-----------------|
|
|
199
|
+
| [Request latency p95] | [API response time] | [> 500ms] |
|
|
200
|
+
| [Error rate] | [5xx responses / total] | [> 1%] |
|
|
201
|
+
| [Queue depth] | [Pending jobs] | [> 1000] |
|
|
202
|
+
|
|
203
|
+
### Health Checks
|
|
204
|
+
|
|
205
|
+
| Endpoint | Purpose | Expected Response |
|
|
206
|
+
|----------|---------|-------------------|
|
|
207
|
+
| `/health` | [Basic liveness] | [200 OK] |
|
|
208
|
+
| `/health/ready` | [Full readiness] | [200 with deps status] |
|
|
209
|
+
|
|
210
|
+
### Runbooks
|
|
211
|
+
|
|
212
|
+
- [Link to deployment runbook]
|
|
213
|
+
- [Link to incident response runbook]
|
|
214
|
+
- [Link to scaling runbook]
|
|
215
|
+
|
|
216
|
+
### On-Call
|
|
217
|
+
|
|
218
|
+
| Severity | Response Time | Escalation |
|
|
219
|
+
|----------|---------------|------------|
|
|
220
|
+
| P1 (Outage) | [15 minutes] | [Page on-call, then manager] |
|
|
221
|
+
| P2 (Degraded) | [1 hour] | [Page on-call] |
|
|
222
|
+
| P3 (Minor) | [Next business day] | [Slack channel] |
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Security
|
|
227
|
+
|
|
228
|
+
### Authentication
|
|
229
|
+
|
|
230
|
+
[How users/services authenticate]
|
|
231
|
+
|
|
232
|
+
### Authorization
|
|
233
|
+
|
|
234
|
+
[How permissions are determined]
|
|
235
|
+
|
|
236
|
+
### Data Classification
|
|
237
|
+
|
|
238
|
+
| Data Type | Classification | Handling |
|
|
239
|
+
|-----------|---------------|----------|
|
|
240
|
+
| [User PII] | [Confidential] | [Encrypted at rest, masked in logs] |
|
|
241
|
+
| [Public content] | [Public] | [No restrictions] |
|
|
242
|
+
|
|
243
|
+
### Compliance
|
|
244
|
+
|
|
245
|
+
[List relevant compliance requirements: SOC2, GDPR, HIPAA, etc.]
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Development
|
|
250
|
+
|
|
251
|
+
### Getting Started
|
|
252
|
+
|
|
253
|
+
[Quick start for local development]
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
# Clone and setup
|
|
257
|
+
git clone [repo-url]
|
|
258
|
+
cd [repo-name]
|
|
259
|
+
npm install
|
|
260
|
+
|
|
261
|
+
# Run locally
|
|
262
|
+
docker-compose up -d
|
|
263
|
+
npm run dev
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Testing
|
|
267
|
+
|
|
268
|
+
[How to run tests]
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
npm test # Unit tests
|
|
272
|
+
npm run test:e2e # Integration tests
|
|
273
|
+
npm run test:coverage # With coverage
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
### Contributing
|
|
277
|
+
|
|
278
|
+
[Link to contribution guidelines]
|
|
279
|
+
|
|
280
|
+
---
|
|
281
|
+
|
|
282
|
+
## Decision Log
|
|
283
|
+
|
|
284
|
+
[Link to ADRs or list key architectural decisions]
|
|
285
|
+
|
|
286
|
+
| ADR | Decision | Date |
|
|
287
|
+
|-----|----------|------|
|
|
288
|
+
| [ADR-001] | [Use PostgreSQL for persistence] | [2024-01-15] |
|
|
289
|
+
| [ADR-002] | [Adopt event-driven architecture] | [2024-02-20] |
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Appendix
|
|
294
|
+
|
|
295
|
+
### Glossary
|
|
296
|
+
|
|
297
|
+
| Term | Definition |
|
|
298
|
+
|------|------------|
|
|
299
|
+
| [Term 1] | [Definition] |
|
|
300
|
+
| [Term 2] | [Definition] |
|
|
301
|
+
|
|
302
|
+
### Related Documentation
|
|
303
|
+
|
|
304
|
+
- [Link to API docs]
|
|
305
|
+
- [Link to runbooks]
|
|
306
|
+
- [Link to design docs]
|
|
307
|
+
|
|
308
|
+
### Change Log
|
|
309
|
+
|
|
310
|
+
| Date | Version | Changes |
|
|
311
|
+
|------|---------|---------|
|
|
312
|
+
| [YYYY-MM-DD] | [1.0] | [Initial version] |
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
## Usage Instructions
|
|
316
|
+
|
|
317
|
+
1. Copy the template into a new file, typically `docs/system/[system-name].md`
|
|
318
|
+
2. Replace all bracketed placeholders with actual content
|
|
319
|
+
3. Remove sections that don't apply to your system
|
|
320
|
+
4. Add sections as needed for your specific context
|
|
321
|
+
5. Update the "Last Updated" date whenever you make changes
|
|
322
|
+
6. Review quarterly to ensure accuracy
|
|
323
|
+
|
|
324
|
+
## Section Selection Guide
|
|
325
|
+
|
|
326
|
+
**For a new/small system, start with:**
|
|
327
|
+
- Overview
|
|
328
|
+
- Architecture (system context)
|
|
329
|
+
- Deployment (basic)
|
|
330
|
+
- Development (getting started)
|
|
331
|
+
|
|
332
|
+
**Add as the system grows:**
|
|
333
|
+
- Component architecture
|
|
334
|
+
- Data architecture
|
|
335
|
+
- Integration points
|
|
336
|
+
- Operations (monitoring, runbooks)
|
|
337
|
+
|
|
338
|
+
**For production-critical systems, include:**
|
|
339
|
+
- All sections
|
|
340
|
+
- Detailed runbooks
|
|
341
|
+
- Security section
|
|
342
|
+
- On-call procedures
|
|
343
|
+
|
|
344
|
+
## Tips for Effective System Documentation
|
|
345
|
+
|
|
346
|
+
1. **Start with the overview**: A reader should understand what the system does after reading just the overview
|
|
347
|
+
2. **Use diagrams liberally**: Visual representations communicate architecture faster than text
|
|
348
|
+
3. **Keep it current**: Outdated docs are worse than no docs; schedule regular reviews
|
|
349
|
+
4. **Link, don't duplicate**: Reference other docs rather than copying content that will drift
|
|
350
|
+
5. **Include the "why"**: Not just what exists, but why decisions were made
|
|
351
|
+
6. **Test your getting started**: Have a new team member follow it and note confusion points
|
|
352
|
+
|
|
353
|
+
## Diagram Conventions
|
|
354
|
+
|
|
355
|
+
Use consistent shapes and arrows:
|
|
356
|
+
|
|
357
|
+
```
|
|
358
|
+
┌─────────┐ Rectangle: Component, Service, System
|
|
359
|
+
└─────────┘
|
|
360
|
+
|
|
361
|
+
┌─────────┐
|
|
362
|
+
│ │ Solid arrow: Synchronous call, direct dependency
|
|
363
|
+
└────┬────┘
|
|
364
|
+
│
|
|
365
|
+
▼
|
|
366
|
+
┌─────────┐
|
|
367
|
+
└─────────┘
|
|
368
|
+
|
|
369
|
+
┌─────────┐
|
|
370
|
+
│ │ Dashed arrow: Asynchronous, event-based
|
|
371
|
+
└────┬────┘
|
|
372
|
+
┆
|
|
373
|
+
▼
|
|
374
|
+
┌─────────┐
|
|
375
|
+
└─────────┘
|
|
376
|
+
|
|
377
|
+
(─────────) Cylinder: Database, persistent storage
|
|
378
|
+
|
|
379
|
+
[─────────] Cloud: External service, third-party
|
|
380
|
+
```
|