@comfanion/workflow 4.38.4-dev.0 → 4.39.0-dev.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/bin/cli.js +52 -529
- package/package.json +1 -1
- package/src/build-info.json +2 -2
- package/src/opencode/skills/acceptance-criteria/SKILL.md +58 -176
- package/src/opencode/skills/architecture-design/SKILL.md +86 -576
- package/src/opencode/skills/archiving/SKILL.md +60 -140
- package/src/opencode/skills/coding-standards/SKILL.md +113 -434
- package/src/opencode/skills/coding-standards/what-to-document.md +512 -0
- package/src/opencode/skills/database-design/SKILL.md +94 -778
- package/src/opencode/skills/database-design/indexing.md +187 -0
- package/src/opencode/skills/database-design/migrations.md +239 -0
- package/src/opencode/skills/database-design/schema-design.md +319 -0
- package/src/opencode/skills/doc-todo/SKILL.md +35 -27
- package/src/opencode/skills/epic-writing/SKILL.md +156 -244
- package/src/opencode/skills/epic-writing/template.md +11 -1
- package/src/opencode/skills/methodologies/SKILL.md +91 -354
- package/src/opencode/skills/methodologies/define.md +336 -0
- package/src/opencode/skills/methodologies/diagnose.md +374 -0
- package/src/opencode/skills/methodologies/empathize.md +253 -0
- package/src/opencode/skills/methodologies/ideate.md +458 -0
- package/src/opencode/skills/prd-writing/SKILL.md +162 -366
- package/src/opencode/skills/prd-writing/template.md +178 -48
- package/src/opencode/skills/requirements-gathering/SKILL.md +102 -117
- package/src/opencode/skills/requirements-gathering/template.md +97 -17
- package/src/opencode/skills/sprint-planning/SKILL.md +76 -225
- package/src/opencode/skills/sprint-planning/template.yaml +8 -0
- package/src/opencode/skills/story-writing/SKILL.md +76 -210
- package/src/opencode/skills/story-writing/template.md +10 -1
- package/src/opencode/skills/test-design/SKILL.md +78 -84
- package/src/opencode/skills/test-design/test-strategy.md +279 -0
- package/src/opencode/skills/test-design/unit-tests-mocking.md +247 -0
- package/src/opencode/skills/test-design/unit-tests-patterns.md +181 -0
- package/src/opencode/skills/test-design/unit-tests.md +117 -0
- package/src/opencode/skills/unit-writing/SKILL.md +119 -377
- package/src/opencode/skills/module-documentation/SKILL.md +0 -224
- package/src/opencode/skills/module-documentation/template.md +0 -139
- /package/src/opencode/skills/test-design/{template-integration.md → templates/template-integration.md} +0 -0
- /package/src/opencode/skills/test-design/{template-module.md → templates/template-module.md} +0 -0
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: module-documentation
|
|
3
|
-
description: Use when documenting a module, service, or domain with detailed specs
|
|
4
|
-
license: MIT
|
|
5
|
-
compatibility: opencode
|
|
6
|
-
metadata:
|
|
7
|
-
domain: documentation
|
|
8
|
-
agents: [architect, dev]
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Module Documentation Skill
|
|
12
|
-
|
|
13
|
-
How to create detailed per-module documentation.
|
|
14
|
-
|
|
15
|
-
## Purpose
|
|
16
|
-
|
|
17
|
-
Create comprehensive documentation for individual modules/services that enables developers to understand, implement, and maintain the module.
|
|
18
|
-
|
|
19
|
-
## Module Documentation Structure
|
|
20
|
-
|
|
21
|
-
```
|
|
22
|
-
docs/architecture/[module]/
|
|
23
|
-
├── index.md # Module overview and navigation
|
|
24
|
-
├── architecture.md # Technical architecture
|
|
25
|
-
├── data-model.md # Database schema and entities
|
|
26
|
-
├── api.md # API contracts
|
|
27
|
-
├── events.md # Event schemas (if applicable)
|
|
28
|
-
└── testing.md # Testing strategy
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## 1. Index Template (index.md)
|
|
32
|
-
|
|
33
|
-
```markdown
|
|
34
|
-
# {{module_name}} Module
|
|
35
|
-
|
|
36
|
-
## Overview
|
|
37
|
-
|
|
38
|
-
[1-2 paragraphs describing module purpose and responsibilities]
|
|
39
|
-
|
|
40
|
-
## Key Responsibilities
|
|
41
|
-
|
|
42
|
-
- [Responsibility 1]
|
|
43
|
-
- [Responsibility 2]
|
|
44
|
-
- [Responsibility 3]
|
|
45
|
-
|
|
46
|
-
## Module Boundaries
|
|
47
|
-
|
|
48
|
-
**Owns:**
|
|
49
|
-
- [What this module is responsible for]
|
|
50
|
-
|
|
51
|
-
**Does NOT Own:**
|
|
52
|
-
- [What other modules handle]
|
|
53
|
-
|
|
54
|
-
## Quick Links
|
|
55
|
-
|
|
56
|
-
- [Architecture](./architecture.md)
|
|
57
|
-
- [Data Model](./data-model.md)
|
|
58
|
-
- [API Contracts](./api.md)
|
|
59
|
-
- [Events](./events.md)
|
|
60
|
-
- [Testing](./testing.md)
|
|
61
|
-
|
|
62
|
-
## Related Modules
|
|
63
|
-
|
|
64
|
-
| Module | Relationship | Communication |
|
|
65
|
-
|--------|--------------|---------------|
|
|
66
|
-
| [Module A] | [Depends on] | [API / Events] |
|
|
67
|
-
| [Module B] | [Provides to] | [API / Events] |
|
|
68
|
-
|
|
69
|
-
## Key Requirements
|
|
70
|
-
|
|
71
|
-
| FR # | Description |
|
|
72
|
-
|------|-------------|
|
|
73
|
-
| FR-001 | [Requirement this module implements] |
|
|
74
|
-
| FR-002 | [Requirement this module implements] |
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
## 2. Architecture Template (architecture.md)
|
|
78
|
-
|
|
79
|
-
```markdown
|
|
80
|
-
# {{module_name}} Architecture
|
|
81
|
-
|
|
82
|
-
## Component Diagram
|
|
83
|
-
|
|
84
|
-
[ASCII or Mermaid diagram showing module components]
|
|
85
|
-
|
|
86
|
-
## Layer Structure
|
|
87
|
-
|
|
88
|
-
```
|
|
89
|
-
{{module_name}}/
|
|
90
|
-
├── domain/
|
|
91
|
-
│ ├── aggregate/
|
|
92
|
-
│ ├── valueobject/
|
|
93
|
-
│ ├── service/
|
|
94
|
-
│ └── repository/
|
|
95
|
-
├── application/
|
|
96
|
-
│ └── usecase/
|
|
97
|
-
└── infrastructure/
|
|
98
|
-
├── repo/
|
|
99
|
-
└── http/
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Key Components
|
|
103
|
-
|
|
104
|
-
### Domain Layer
|
|
105
|
-
|
|
106
|
-
#### Aggregates
|
|
107
|
-
- **{{Aggregate1}}**: [Description]
|
|
108
|
-
- **{{Aggregate2}}**: [Description]
|
|
109
|
-
|
|
110
|
-
#### Value Objects
|
|
111
|
-
- **{{VO1}}**: [Description]
|
|
112
|
-
- **{{VO2}}**: [Description]
|
|
113
|
-
|
|
114
|
-
### Application Layer
|
|
115
|
-
|
|
116
|
-
#### Use Cases
|
|
117
|
-
- **{{UseCase1}}**: [What it does]
|
|
118
|
-
- **{{UseCase2}}**: [What it does]
|
|
119
|
-
|
|
120
|
-
### Infrastructure Layer
|
|
121
|
-
|
|
122
|
-
#### Repositories
|
|
123
|
-
- **{{Repo1}}**: [Implementation details]
|
|
124
|
-
|
|
125
|
-
#### HTTP Handlers
|
|
126
|
-
- **{{Handler1}}**: [Endpoints handled]
|
|
127
|
-
|
|
128
|
-
## Design Decisions
|
|
129
|
-
|
|
130
|
-
See ADRs:
|
|
131
|
-
- [ADR-001: Decision title](../../adr/ADR-001.md)
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
## 3. Data Model Template (data-model.md)
|
|
135
|
-
|
|
136
|
-
```markdown
|
|
137
|
-
# {{module_name}} Data Model
|
|
138
|
-
|
|
139
|
-
## Entity Relationship Diagram
|
|
140
|
-
|
|
141
|
-
[ERD diagram]
|
|
142
|
-
|
|
143
|
-
## Tables
|
|
144
|
-
|
|
145
|
-
### {{table_name}}
|
|
146
|
-
|
|
147
|
-
| Column | Type | Constraints | Description |
|
|
148
|
-
|--------|------|-------------|-------------|
|
|
149
|
-
| id | UUID | PK | Primary key |
|
|
150
|
-
| name | VARCHAR(255) | NOT NULL | [Description] |
|
|
151
|
-
| created_at | TIMESTAMP | NOT NULL | Creation time |
|
|
152
|
-
|
|
153
|
-
**Indexes:**
|
|
154
|
-
- `idx_{{table}}_{{column}}` on ({{column}})
|
|
155
|
-
|
|
156
|
-
**Relationships:**
|
|
157
|
-
- Has many: {{related_table}}
|
|
158
|
-
- Belongs to: {{parent_table}}
|
|
159
|
-
|
|
160
|
-
## Migrations
|
|
161
|
-
|
|
162
|
-
| Version | Description | File |
|
|
163
|
-
|---------|-------------|------|
|
|
164
|
-
| 001 | Create {{table}} | migrations/001_create_{{table}}.sql |
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
## 4. API Template (api.md)
|
|
168
|
-
|
|
169
|
-
```markdown
|
|
170
|
-
# {{module_name}} API
|
|
171
|
-
|
|
172
|
-
## Base URL
|
|
173
|
-
|
|
174
|
-
`/api/v1/{{module}}`
|
|
175
|
-
|
|
176
|
-
## Endpoints
|
|
177
|
-
|
|
178
|
-
### Create {{Resource}}
|
|
179
|
-
|
|
180
|
-
`POST /{{resources}}`
|
|
181
|
-
|
|
182
|
-
**Request:**
|
|
183
|
-
```json
|
|
184
|
-
{
|
|
185
|
-
"field1": "value1",
|
|
186
|
-
"field2": "value2"
|
|
187
|
-
}
|
|
188
|
-
```
|
|
189
|
-
|
|
190
|
-
**Response (201):**
|
|
191
|
-
```json
|
|
192
|
-
{
|
|
193
|
-
"id": "uuid",
|
|
194
|
-
"field1": "value1",
|
|
195
|
-
"created_at": "2024-01-01T00:00:00Z"
|
|
196
|
-
}
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
**Errors:**
|
|
200
|
-
- 400: Validation error
|
|
201
|
-
- 401: Unauthorized
|
|
202
|
-
- 409: Conflict
|
|
203
|
-
|
|
204
|
-
### Get {{Resource}}
|
|
205
|
-
|
|
206
|
-
`GET /{{resources}}/:id`
|
|
207
|
-
|
|
208
|
-
[Continue for all endpoints...]
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
## Quality Checklist
|
|
212
|
-
|
|
213
|
-
- [ ] Index provides clear overview
|
|
214
|
-
- [ ] Architecture shows all components
|
|
215
|
-
- [ ] Data model is complete with indexes
|
|
216
|
-
- [ ] API contracts have request/response examples
|
|
217
|
-
- [ ] Events documented (if applicable)
|
|
218
|
-
- [ ] Testing strategy defined
|
|
219
|
-
- [ ] Links to ADRs included
|
|
220
|
-
- [ ] Requirements traceability present
|
|
221
|
-
|
|
222
|
-
## Output Location
|
|
223
|
-
|
|
224
|
-
`docs/architecture/[module-name]/`
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
# [Module Name]
|
|
2
|
-
|
|
3
|
-
**Domain:** [Bounded Context]
|
|
4
|
-
**Owner:** [Team/Person]
|
|
5
|
-
**Status:** Planning | Development | Production
|
|
6
|
-
**Last Updated:** YYYY-MM-DD
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## Overview
|
|
11
|
-
|
|
12
|
-
[2-3 sentences: What this module does and why it exists]
|
|
13
|
-
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
## Quick Links
|
|
17
|
-
|
|
18
|
-
| Document | Description |
|
|
19
|
-
|----------|-------------|
|
|
20
|
-
| [Architecture](./architecture.md) | Module design and structure |
|
|
21
|
-
| [PRD](./prd.md) | Module requirements |
|
|
22
|
-
| [Data Model](./data-model.md) | Database schema |
|
|
23
|
-
| [Domain](./domain.md) | Domain model (DDD) |
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Subdirectories
|
|
28
|
-
|
|
29
|
-
| Directory | Contents | Status |
|
|
30
|
-
|-----------|----------|--------|
|
|
31
|
-
| [api/](./api/) | OpenAPI specs | Active |
|
|
32
|
-
| [events/](./events/) | Event schemas | Active |
|
|
33
|
-
| [scenarios/](./scenarios/) | Use case scenarios | Active |
|
|
34
|
-
| [flows/](./flows/) | Flow diagrams | Active |
|
|
35
|
-
| [integrations/](./integrations/) | External integrations | - |
|
|
36
|
-
| [decisions/](./decisions/) | Module ADRs | - |
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## Key Responsibilities
|
|
41
|
-
|
|
42
|
-
- [Responsibility 1]
|
|
43
|
-
- [Responsibility 2]
|
|
44
|
-
- [Responsibility 3]
|
|
45
|
-
|
|
46
|
-
---
|
|
47
|
-
|
|
48
|
-
## Dependencies
|
|
49
|
-
|
|
50
|
-
### Depends On
|
|
51
|
-
|
|
52
|
-
| Module | Type | Purpose |
|
|
53
|
-
|--------|------|---------|
|
|
54
|
-
| [Module A](../module-a/) | Sync (HTTP) | Get user data |
|
|
55
|
-
| [Module B](../module-b/) | Async (Event) | React to events |
|
|
56
|
-
|
|
57
|
-
### Depended By
|
|
58
|
-
|
|
59
|
-
| Module | Type | Purpose |
|
|
60
|
-
|--------|------|---------|
|
|
61
|
-
| [Module C](../module-c/) | Sync (HTTP) | Fetch our data |
|
|
62
|
-
| [Module D](../module-d/) | Async (Event) | Consumes our events |
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
## Key Metrics
|
|
67
|
-
|
|
68
|
-
| Metric | Target | Current |
|
|
69
|
-
|--------|--------|---------|
|
|
70
|
-
| Latency (p95) | < 100ms | - |
|
|
71
|
-
| Availability | 99.9% | - |
|
|
72
|
-
| Error Rate | < 0.1% | - |
|
|
73
|
-
| Throughput | > 500 RPS | - |
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
|
-
## API Summary
|
|
78
|
-
|
|
79
|
-
| Method | Endpoint | Description |
|
|
80
|
-
|--------|----------|-------------|
|
|
81
|
-
| POST | `/api/v1/[resource]` | Create |
|
|
82
|
-
| GET | `/api/v1/[resource]/{id}` | Get by ID |
|
|
83
|
-
| PUT | `/api/v1/[resource]/{id}` | Update |
|
|
84
|
-
| GET | `/api/v1/[resource]` | List |
|
|
85
|
-
|
|
86
|
-
Full API: [api/](./api/)
|
|
87
|
-
|
|
88
|
-
---
|
|
89
|
-
|
|
90
|
-
## Events Summary
|
|
91
|
-
|
|
92
|
-
### Published
|
|
93
|
-
|
|
94
|
-
| Event | Topic | Description |
|
|
95
|
-
|-------|-------|-------------|
|
|
96
|
-
| [Event]Created | [topic] | When created |
|
|
97
|
-
| [Event]Updated | [topic] | When updated |
|
|
98
|
-
|
|
99
|
-
### Consumed
|
|
100
|
-
|
|
101
|
-
| Event | Topic | Source |
|
|
102
|
-
|-------|-------|--------|
|
|
103
|
-
| [Other]Created | [topic] | [Module] |
|
|
104
|
-
|
|
105
|
-
Full events: [events/](./events/)
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## Quick Start
|
|
110
|
-
|
|
111
|
-
### Local Development
|
|
112
|
-
|
|
113
|
-
```bash
|
|
114
|
-
# Prerequisites
|
|
115
|
-
# - Go 1.21+
|
|
116
|
-
# - PostgreSQL 15+
|
|
117
|
-
# - Docker
|
|
118
|
-
|
|
119
|
-
# Run locally
|
|
120
|
-
cd src/services/[module]
|
|
121
|
-
go run cmd/api/main.go
|
|
122
|
-
|
|
123
|
-
# Run tests
|
|
124
|
-
go test ./...
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
### Environment Variables
|
|
128
|
-
|
|
129
|
-
| Variable | Description | Required |
|
|
130
|
-
|----------|-------------|----------|
|
|
131
|
-
| `DATABASE_URL` | PostgreSQL connection | Yes |
|
|
132
|
-
| `KAFKA_BROKERS` | Kafka broker list | Yes |
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Related
|
|
137
|
-
|
|
138
|
-
- [System Architecture](../../architecture.md)
|
|
139
|
-
- [Database Overview](../../architecture-db.md)
|
|
File without changes
|
/package/src/opencode/skills/test-design/{template-module.md → templates/template-module.md}
RENAMED
|
File without changes
|