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,170 @@
|
|
|
1
|
+
# Architecture Examples
|
|
2
|
+
|
|
3
|
+
Reference examples for common architectural patterns in SDDs.
|
|
4
|
+
|
|
5
|
+
## Example: Component Diagram
|
|
6
|
+
|
|
7
|
+
```mermaid
|
|
8
|
+
graph LR
|
|
9
|
+
subgraph "Presentation Layer"
|
|
10
|
+
UI[React Components]
|
|
11
|
+
API[REST API Controllers]
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
subgraph "Business Layer"
|
|
15
|
+
Service[Domain Services]
|
|
16
|
+
Validator[Validation Logic]
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
subgraph "Data Layer"
|
|
20
|
+
Repo[Repositories]
|
|
21
|
+
Cache[Cache Manager]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
subgraph "External"
|
|
25
|
+
DB[(PostgreSQL)]
|
|
26
|
+
Redis[(Redis)]
|
|
27
|
+
Stripe[Stripe API]
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
UI --> API
|
|
31
|
+
API --> Service
|
|
32
|
+
Service --> Validator
|
|
33
|
+
Service --> Repo
|
|
34
|
+
Service --> Cache
|
|
35
|
+
Repo --> DB
|
|
36
|
+
Cache --> Redis
|
|
37
|
+
Service --> Stripe
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Example: Directory Map
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
.
|
|
44
|
+
├── src/
|
|
45
|
+
│ ├── payments/ # NEW: Payment feature module
|
|
46
|
+
│ │ ├── controllers/
|
|
47
|
+
│ │ │ └── PaymentController.ts # NEW: REST API endpoints
|
|
48
|
+
│ │ ├── services/
|
|
49
|
+
│ │ │ └── PaymentService.ts # NEW: Business logic
|
|
50
|
+
│ │ ├── models/
|
|
51
|
+
│ │ │ └── Payment.ts # NEW: Domain entity
|
|
52
|
+
│ │ ├── repositories/
|
|
53
|
+
│ │ │ └── PaymentRepository.ts # NEW: Data access
|
|
54
|
+
│ │ └── validators/
|
|
55
|
+
│ │ └── PaymentValidator.ts # NEW: Input validation
|
|
56
|
+
│ └── shared/
|
|
57
|
+
│ └── errors/
|
|
58
|
+
│ └── PaymentError.ts # NEW: Custom errors
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Example: Interface Specification
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
Endpoint: Create Payment
|
|
65
|
+
Method: POST
|
|
66
|
+
Path: /api/v1/payments
|
|
67
|
+
Request:
|
|
68
|
+
amount: number, required, min: 0.01
|
|
69
|
+
currency: string, required, enum: [USD, EUR, GBP]
|
|
70
|
+
customer_id: string, required, uuid
|
|
71
|
+
description: string, optional, max: 255
|
|
72
|
+
Response:
|
|
73
|
+
success:
|
|
74
|
+
payment_id: string, uuid
|
|
75
|
+
status: string, enum: [pending, completed, failed]
|
|
76
|
+
created_at: string, ISO8601
|
|
77
|
+
error:
|
|
78
|
+
error_code: string, enum: [INVALID_AMOUNT, CUSTOMER_NOT_FOUND, PAYMENT_FAILED]
|
|
79
|
+
message: string
|
|
80
|
+
details: object, optional
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
## Example: Sequence Diagram
|
|
84
|
+
|
|
85
|
+
```mermaid
|
|
86
|
+
sequenceDiagram
|
|
87
|
+
actor User
|
|
88
|
+
participant API as PaymentController
|
|
89
|
+
participant Svc as PaymentService
|
|
90
|
+
participant Val as PaymentValidator
|
|
91
|
+
participant Stripe as Stripe API
|
|
92
|
+
participant DB as PaymentRepository
|
|
93
|
+
|
|
94
|
+
User->>API: POST /payments
|
|
95
|
+
API->>Val: validate(request)
|
|
96
|
+
Val-->>API: ValidationResult
|
|
97
|
+
|
|
98
|
+
alt Validation Failed
|
|
99
|
+
API-->>User: 400 Bad Request
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
API->>Svc: createPayment(data)
|
|
103
|
+
Svc->>Stripe: charges.create()
|
|
104
|
+
Stripe-->>Svc: ChargeResult
|
|
105
|
+
|
|
106
|
+
alt Stripe Error
|
|
107
|
+
Svc-->>API: PaymentError
|
|
108
|
+
API-->>User: 402 Payment Required
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
Svc->>DB: save(payment)
|
|
112
|
+
DB-->>Svc: Payment
|
|
113
|
+
Svc-->>API: Payment
|
|
114
|
+
API-->>User: 201 Created
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
## Example: ADR Format
|
|
118
|
+
|
|
119
|
+
```markdown
|
|
120
|
+
- [x] ADR-1 Use PostgreSQL for Primary Storage: Selected PostgreSQL over MongoDB
|
|
121
|
+
- Rationale: ACID compliance required for financial data, team expertise, existing infrastructure
|
|
122
|
+
- Trade-offs: Less flexible schema, requires migrations, but strong consistency guarantees
|
|
123
|
+
- User confirmed: ✅ Yes
|
|
124
|
+
|
|
125
|
+
- [x] ADR-2 Stripe for Payment Processing: Selected Stripe over Adyen
|
|
126
|
+
- Rationale: Better developer experience, simpler integration, sufficient for current volume
|
|
127
|
+
- Trade-offs: Slightly higher fees, but faster time-to-market and better documentation
|
|
128
|
+
- User confirmed: ✅ Yes
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
## Example: Error Handling Pattern
|
|
132
|
+
|
|
133
|
+
```pseudocode
|
|
134
|
+
FUNCTION: handle_operation_errors(operation_result)
|
|
135
|
+
CLASSIFY: error_type
|
|
136
|
+
- ValidationError: Invalid input data
|
|
137
|
+
- BusinessRuleError: Domain logic violation
|
|
138
|
+
- IntegrationError: External service failure
|
|
139
|
+
- SystemError: Infrastructure failure
|
|
140
|
+
|
|
141
|
+
LOG:
|
|
142
|
+
- error_type, message, context
|
|
143
|
+
- stack_trace for SystemError only
|
|
144
|
+
- correlation_id for tracing
|
|
145
|
+
|
|
146
|
+
RESPOND:
|
|
147
|
+
- ValidationError → 400 Bad Request + field errors
|
|
148
|
+
- BusinessRuleError → 422 Unprocessable Entity + business message
|
|
149
|
+
- IntegrationError → 502 Bad Gateway + retry guidance
|
|
150
|
+
- SystemError → 500 Internal Server Error + generic message
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Example: Quality Requirements
|
|
154
|
+
|
|
155
|
+
| Requirement | Target | Measurement |
|
|
156
|
+
|-------------|--------|-------------|
|
|
157
|
+
| API Response Time | p95 < 200ms | APM monitoring (Datadog) |
|
|
158
|
+
| Payment Success Rate | > 99.5% | Success / Total transactions |
|
|
159
|
+
| System Availability | 99.9% uptime | Health check monitoring |
|
|
160
|
+
| Error Rate | < 0.1% | Errors / Total requests |
|
|
161
|
+
|
|
162
|
+
## What Makes Good Architecture Documentation
|
|
163
|
+
|
|
164
|
+
1. **Visual + Text** - Diagrams AND written explanations
|
|
165
|
+
2. **Concrete Paths** - Actual file paths, not just concepts
|
|
166
|
+
3. **Complete Interfaces** - Request/response with all fields
|
|
167
|
+
4. **Decision Rationale** - WHY choices were made
|
|
168
|
+
5. **Measurable Quality** - Numbers, not "fast" or "scalable"
|
|
169
|
+
6. **Error Coverage** - All error types handled
|
|
170
|
+
7. **Implementable** - Developer can start coding from this
|