@comfanion/workflow 4.1.2 → 4.3.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 +1 -2
- package/bin/cli.js +2 -4
- package/package.json +1 -1
- package/src/build-info.json +1 -1
- package/src/opencode/ARCHITECTURE.md +7 -6
- package/src/opencode/FLOW.yaml +10 -10
- package/src/opencode/agents/coder.md +82 -0
- package/src/opencode/agents/dev.md +10 -0
- package/src/opencode/commands/architecture.md +1 -1
- package/src/opencode/commands/prd.md +1 -1
- package/src/opencode/config.yaml +1 -1
- package/src/opencode/skills/adr-writing/SKILL.md +122 -159
- package/src/opencode/skills/adr-writing/template.md +130 -0
- package/src/opencode/skills/architecture-design/SKILL.md +113 -107
- package/src/opencode/skills/architecture-design/template.md +212 -0
- package/src/opencode/skills/architecture-validation/SKILL.md +1 -1
- package/src/opencode/skills/changelog/template.md +23 -0
- package/src/opencode/skills/epic-writing/SKILL.md +116 -264
- package/src/opencode/skills/epic-writing/template.md +119 -0
- package/src/opencode/skills/prd-validation/SKILL.md +1 -1
- package/src/opencode/skills/prd-writing/SKILL.md +79 -43
- package/src/opencode/skills/prd-writing/template.md +147 -0
- package/src/opencode/skills/requirements-gathering/SKILL.md +128 -78
- package/src/opencode/skills/requirements-gathering/template.md +156 -0
- package/src/opencode/skills/story-writing/SKILL.md +106 -464
- package/src/opencode/skills/story-writing/template.md +214 -0
- package/src/opencode/skills/unit-writing/SKILL.md +185 -0
- package/src/opencode/skills/unit-writing/template.md +136 -0
- package/src/repo-structure/docs/README.md +5 -5
- package/src/repo-structure/docs/requirements/README.md +1 -1
- package/src/opencode/templates/CHANGELOG.md +0 -82
- package/src/opencode/templates/adr-template.md +0 -115
- package/src/opencode/templates/architecture-template.md +0 -362
- package/src/opencode/templates/epic-template.md +0 -166
- package/src/opencode/templates/prd-template.md +0 -479
- package/src/opencode/templates/requirements-template.md +0 -132
- package/src/opencode/templates/story-template.md +0 -182
- /package/src/opencode/{templates/prd-acceptance-criteria-template.md → skills/acceptance-criteria/template.md} +0 -0
- /package/src/opencode/{templates/change-proposal-template.md → skills/archiving/template-change-proposal.md} +0 -0
- /package/src/opencode/{templates/git-workflow-template.md → skills/coding-standards/template-git.md} +0 -0
- /package/src/opencode/{templates/testing-standards-template.md → skills/coding-standards/template-testing.md} +0 -0
- /package/src/opencode/{templates/jira-cache-template.yaml → skills/jira-integration/template-cache.yaml} +0 -0
- /package/src/opencode/{templates/module-index-template.md → skills/module-documentation/template.md} +0 -0
- /package/src/opencode/{templates/sprint-status-template.yaml → skills/sprint-planning/template.yaml} +0 -0
- /package/src/opencode/{templates/integration-tests-template.md → skills/test-design/template-integration.md} +0 -0
- /package/src/opencode/{templates/module-test-cases-template.md → skills/test-design/template-module.md} +0 -0
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# Story {{E}}.{{N}}: {{title}}
|
|
2
|
+
|
|
3
|
+
```yaml
|
|
4
|
+
id: {{PREFIX}}-S{{E}}-{{N}}
|
|
5
|
+
epic: {{PREFIX}}-E{{E}}
|
|
6
|
+
status: draft | ready | in_progress | review | done
|
|
7
|
+
size: S | M | L
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Goal
|
|
13
|
+
|
|
14
|
+
{{one_sentence_describing_what_user_or_system_can_do_after_this}}
|
|
15
|
+
|
|
16
|
+
**Context:** This story is part of Epic {{E}} ({{epic_title}}). It focuses on {{specific_aspect}}.
|
|
17
|
+
|
|
18
|
+
**Out of Scope:**
|
|
19
|
+
- {{what_this_story_does_NOT_do}}
|
|
20
|
+
|
|
21
|
+
<!-- e.g.
|
|
22
|
+
Implement CRUD operations for Task entity following hexagonal architecture.
|
|
23
|
+
|
|
24
|
+
**Context:** This story is part of Epic 1 (Task Management Core). It focuses on the domain layer and repository.
|
|
25
|
+
|
|
26
|
+
**Out of Scope:**
|
|
27
|
+
- HTTP handlers (separate story)
|
|
28
|
+
- Notifications (separate epic)
|
|
29
|
+
-->
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Units Affected
|
|
34
|
+
|
|
35
|
+
| Unit | Action | Description |
|
|
36
|
+
|------|--------|-------------|
|
|
37
|
+
| → Unit: `{{unit}}` | Create | {{what_is_created}} |
|
|
38
|
+
| → Unit: `{{unit}}` | Modify | {{what_changes}} |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Required Reading
|
|
43
|
+
|
|
44
|
+
**Before starting, read these documents:**
|
|
45
|
+
|
|
46
|
+
| Document | Section | Why |
|
|
47
|
+
|----------|---------|-----|
|
|
48
|
+
| → `CLAUDE.md` | All | Project patterns, conventions |
|
|
49
|
+
| → `docs/coding-standards/` | All | **MANDATORY** — code style, patterns |
|
|
50
|
+
| → Unit: `{{unit}}` | Data Model | Field definitions, constraints |
|
|
51
|
+
| → `docs/architecture.md` | {{module}} Module | Service structure, events |
|
|
52
|
+
| → Epic: `{{epic_path}}` | Technical Decisions | ADRs for this epic |
|
|
53
|
+
|
|
54
|
+
<!-- e.g.
|
|
55
|
+
| → `CLAUDE.md` | All | Project patterns, naming |
|
|
56
|
+
| → `docs/coding-standards/` | All | **MANDATORY** — hexagonal, error handling |
|
|
57
|
+
| → Unit: `Task` | Data Model, Operations | Fields, validation rules |
|
|
58
|
+
| → `docs/architecture.md` | Task Module | Internal services, events |
|
|
59
|
+
| → `docs/architecture.md#error-handling` | Error Handling | Error codes format |
|
|
60
|
+
-->
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Acceptance Criteria
|
|
65
|
+
|
|
66
|
+
Story is complete when:
|
|
67
|
+
- [ ] {{user_can_or_system_does}}
|
|
68
|
+
- [ ] {{edge_case_handled}}
|
|
69
|
+
- [ ] {{error_case_handled}}
|
|
70
|
+
- [ ] Tests pass (unit + integration)
|
|
71
|
+
- [ ] Follows coding-standards
|
|
72
|
+
- [ ] No lint errors
|
|
73
|
+
|
|
74
|
+
<!-- e.g.
|
|
75
|
+
- [ ] User can create task with title and description
|
|
76
|
+
- [ ] Empty title returns validation error (400, TASK_001)
|
|
77
|
+
- [ ] Task ID is UUID format
|
|
78
|
+
- [ ] Tests cover: create, validation, duplicate handling
|
|
79
|
+
- [ ] Code follows hexagonal architecture from coding-standards
|
|
80
|
+
-->
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Tasks
|
|
85
|
+
|
|
86
|
+
| # | Task | Output | Status |
|
|
87
|
+
|---|------|--------|--------|
|
|
88
|
+
| T1 | {{task}} | `{{file_path}}` | ⬜ |
|
|
89
|
+
| T2 | {{task}} | `{{file_path}}` | ⬜ |
|
|
90
|
+
| T3 | {{task}} | `{{file_path}}` | ⬜ |
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### T1: {{task_name}}
|
|
95
|
+
|
|
96
|
+
**Goal:** {{what_this_achieves}}
|
|
97
|
+
|
|
98
|
+
**Read First:**
|
|
99
|
+
| Document | Section | What to Look For |
|
|
100
|
+
|----------|---------|------------------|
|
|
101
|
+
| → `docs/coding-standards/` | Naming | Struct/method naming |
|
|
102
|
+
| → `docs/coding-standards/` | Validation | Validation patterns |
|
|
103
|
+
| → Unit: `{{unit}}` | Data Model | All fields and types |
|
|
104
|
+
| → `{{existing_code_path}}` | Example | Similar implementation |
|
|
105
|
+
|
|
106
|
+
**Output Files:**
|
|
107
|
+
- `{{path/to/file}}`
|
|
108
|
+
- `{{path/to/file}}_test.go`
|
|
109
|
+
|
|
110
|
+
**Approach:**
|
|
111
|
+
1. {{step}}
|
|
112
|
+
2. {{step}}
|
|
113
|
+
3. Write tests: {{test_cases}}
|
|
114
|
+
|
|
115
|
+
**Done when:**
|
|
116
|
+
- [ ] {{specific_criterion}}
|
|
117
|
+
- [ ] Follows patterns from coding-standards
|
|
118
|
+
- [ ] Tests pass
|
|
119
|
+
|
|
120
|
+
<!-- e.g.
|
|
121
|
+
### T1: Domain Model
|
|
122
|
+
|
|
123
|
+
**Goal:** Define Task entity with validation logic
|
|
124
|
+
|
|
125
|
+
**Read First:**
|
|
126
|
+
| Document | Section | What to Look For |
|
|
127
|
+
|----------|---------|------------------|
|
|
128
|
+
| → `docs/coding-standards/` | Domain Layer | Entity patterns |
|
|
129
|
+
| → `docs/coding-standards/` | Validation | How to validate |
|
|
130
|
+
| → `docs/coding-standards/` | Errors | Error types, codes |
|
|
131
|
+
| → Unit: `Task` | Data Model | All fields |
|
|
132
|
+
| → `internal/user/domain/user.go` | Example | Similar entity |
|
|
133
|
+
|
|
134
|
+
**Output Files:**
|
|
135
|
+
- `internal/task/domain/task.go`
|
|
136
|
+
- `internal/task/domain/task_test.go`
|
|
137
|
+
|
|
138
|
+
**Approach:**
|
|
139
|
+
1. Create Task struct with fields from Unit doc
|
|
140
|
+
2. Add NewTask() constructor with validation
|
|
141
|
+
3. Add Validate() method
|
|
142
|
+
4. Write tests: valid task, empty title, invalid status
|
|
143
|
+
|
|
144
|
+
**Done when:**
|
|
145
|
+
- [ ] Task struct matches Unit data model
|
|
146
|
+
- [ ] Validation follows coding-standards patterns
|
|
147
|
+
- [ ] Error codes match architecture.md#error-handling
|
|
148
|
+
- [ ] Tests cover happy path + all error cases
|
|
149
|
+
-->
|
|
150
|
+
|
|
151
|
+
---
|
|
152
|
+
|
|
153
|
+
### T2: {{task_name}}
|
|
154
|
+
|
|
155
|
+
**Goal:** {{what_this_achieves}}
|
|
156
|
+
|
|
157
|
+
**Depends on:** T1
|
|
158
|
+
|
|
159
|
+
**Read First:**
|
|
160
|
+
| Document | Section | What to Look For |
|
|
161
|
+
|----------|---------|------------------|
|
|
162
|
+
| → `docs/coding-standards/` | Repository | Interface patterns |
|
|
163
|
+
| → `docs/coding-standards/` | Database | SQLC usage |
|
|
164
|
+
| → `{{similar_repo_path}}` | Example | Query patterns |
|
|
165
|
+
|
|
166
|
+
**Output Files:**
|
|
167
|
+
- `{{path}}`
|
|
168
|
+
|
|
169
|
+
**Approach:**
|
|
170
|
+
1. {{step}}
|
|
171
|
+
2. {{step}}
|
|
172
|
+
|
|
173
|
+
**Done when:**
|
|
174
|
+
- [ ] {{criterion}}
|
|
175
|
+
- [ ] Uses SQLC per coding-standards
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
### T3: {{task_name}}
|
|
180
|
+
|
|
181
|
+
**Goal:** {{what_this_achieves}}
|
|
182
|
+
|
|
183
|
+
**Depends on:** T1, T2
|
|
184
|
+
|
|
185
|
+
**Read First:**
|
|
186
|
+
| Document | Section | What to Look For |
|
|
187
|
+
|----------|---------|------------------|
|
|
188
|
+
| → `docs/coding-standards/` | Use Cases | Handler patterns |
|
|
189
|
+
| → `docs/coding-standards/` | Testing | Test structure |
|
|
190
|
+
|
|
191
|
+
**Output Files:**
|
|
192
|
+
- `{{path}}`
|
|
193
|
+
|
|
194
|
+
**Done when:**
|
|
195
|
+
- [ ] {{criterion}}
|
|
196
|
+
- [ ] Integration tests pass
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
200
|
+
## Notes
|
|
201
|
+
|
|
202
|
+
- {{important_implementation_detail}}
|
|
203
|
+
- {{gotcha_or_warning}}
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## Definition of Done
|
|
208
|
+
|
|
209
|
+
- [ ] All acceptance criteria met
|
|
210
|
+
- [ ] All tasks completed
|
|
211
|
+
- [ ] Code follows `docs/coding-standards/`
|
|
212
|
+
- [ ] Tests pass
|
|
213
|
+
- [ ] Code reviewed
|
|
214
|
+
- [ ] No lint errors
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: unit-writing
|
|
3
|
+
description: How to document modules, domains, entities, services, and features using the universal Unit format
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: opencode
|
|
6
|
+
metadata:
|
|
7
|
+
domain: documentation
|
|
8
|
+
artifacts: docs/architecture/units/*.md
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# Unit Writing Skill
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
Use this skill when you need to document any logical piece of the system:
|
|
16
|
+
- **Module** - Large bounded context (e.g., `catalog`, `billing`)
|
|
17
|
+
- **Domain** - Medium business area (e.g., `Order`, `Payment`)
|
|
18
|
+
- **Entity** - Small data object (e.g., `User`, `Task`, `Product`)
|
|
19
|
+
- **Service** - Medium component (e.g., `NotificationService`)
|
|
20
|
+
- **Feature** - Varies (e.g., `Search`, `Import`)
|
|
21
|
+
|
|
22
|
+
## Template
|
|
23
|
+
|
|
24
|
+
Use template at: `@.opencode/skills/unit-writing/template.md`
|
|
25
|
+
|
|
26
|
+
## Unit Document Structure
|
|
27
|
+
|
|
28
|
+
### 1. Header
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
id: {{ID}}
|
|
32
|
+
type: module | domain | entity | service | feature
|
|
33
|
+
status: draft | approved
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 2. Overview
|
|
37
|
+
|
|
38
|
+
Prose paragraph explaining:
|
|
39
|
+
- What the unit is responsible for
|
|
40
|
+
- What it owns
|
|
41
|
+
- What it provides to others
|
|
42
|
+
- Key characteristics
|
|
43
|
+
|
|
44
|
+
### 3. Boundaries
|
|
45
|
+
|
|
46
|
+
| Aspect | Details |
|
|
47
|
+
|--------|---------|
|
|
48
|
+
| **Owns** | Data and behavior this unit controls |
|
|
49
|
+
| **Uses** | → Unit: `dependency` |
|
|
50
|
+
| **Provides** | What others can use from this unit |
|
|
51
|
+
|
|
52
|
+
### 4. Data Model
|
|
53
|
+
|
|
54
|
+
| Field | Type | Constraints | Description |
|
|
55
|
+
|-------|------|-------------|-------------|
|
|
56
|
+
| id | UUID | PK | Primary identifier |
|
|
57
|
+
| name | string | required, max 200 | Display name |
|
|
58
|
+
|
|
59
|
+
### 5. Relations
|
|
60
|
+
|
|
61
|
+
ASCII diagram + table:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Task ──► User (assignee)
|
|
65
|
+
Task ──< Comment (1:N)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
| Relation | Target | Type | Description |
|
|
69
|
+
|----------|--------|------|-------------|
|
|
70
|
+
| assignee | → Unit: `User` | N:1 | Task assigned to user |
|
|
71
|
+
|
|
72
|
+
### 6. Operations
|
|
73
|
+
|
|
74
|
+
| Operation | Input | Output | Description |
|
|
75
|
+
|-----------|-------|--------|-------------|
|
|
76
|
+
| Create | params | Entity | Creates new instance |
|
|
77
|
+
|
|
78
|
+
With **Business Rules:** list.
|
|
79
|
+
|
|
80
|
+
### 7. State Machine (if applicable)
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
todo ──► in_progress ──► done
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
| State | Description | Transitions To |
|
|
87
|
+
|-------|-------------|----------------|
|
|
88
|
+
|
|
89
|
+
### 8. Errors
|
|
90
|
+
|
|
91
|
+
| Error | Code | When |
|
|
92
|
+
|-------|------|------|
|
|
93
|
+
| NotFound | UNIT_001 | Entity doesn't exist |
|
|
94
|
+
|
|
95
|
+
### 9. References
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
→ Architecture: `docs/architecture.md`
|
|
99
|
+
→ Related: → Unit: `OtherUnit`
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Unit Types Guide
|
|
103
|
+
|
|
104
|
+
| Type | When to Use | Example |
|
|
105
|
+
|------|-------------|---------|
|
|
106
|
+
| `module` | Deployable bounded context | `catalog`, `auth` |
|
|
107
|
+
| `domain` | Business concept grouping | `Order`, `Inventory` |
|
|
108
|
+
| `entity` | Core data object | `User`, `Task` |
|
|
109
|
+
| `service` | Stateless component | `EmailService` |
|
|
110
|
+
| `feature` | Cross-cutting capability | `Search`, `Export` |
|
|
111
|
+
|
|
112
|
+
## Naming Conventions
|
|
113
|
+
|
|
114
|
+
### File Names
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
unit-{name}.md
|
|
118
|
+
|
|
119
|
+
Examples:
|
|
120
|
+
- unit-task.md
|
|
121
|
+
- unit-catalog.md
|
|
122
|
+
- unit-notification-service.md
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Unit IDs
|
|
126
|
+
|
|
127
|
+
```
|
|
128
|
+
{TYPE}-{NAME}
|
|
129
|
+
|
|
130
|
+
Examples:
|
|
131
|
+
- MOD-CATALOG
|
|
132
|
+
- ENT-TASK
|
|
133
|
+
- SVC-NOTIFICATION
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
## Reference Format
|
|
137
|
+
|
|
138
|
+
Always use `→` prefix when referencing units:
|
|
139
|
+
|
|
140
|
+
```markdown
|
|
141
|
+
→ Unit: `Task`
|
|
142
|
+
→ Unit: `catalog/Product`
|
|
143
|
+
→ Unit: `NotificationService`
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
In other documents (PRD, Architecture, Stories):
|
|
147
|
+
```markdown
|
|
148
|
+
| Feature | Unit |
|
|
149
|
+
|---------|------|
|
|
150
|
+
| Task CRUD | → Unit: `Task` |
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## When to Create Unit Doc
|
|
154
|
+
|
|
155
|
+
| Situation | Create Unit Doc? |
|
|
156
|
+
|-----------|-----------------|
|
|
157
|
+
| New module in architecture | Yes |
|
|
158
|
+
| Complex entity with business rules | Yes |
|
|
159
|
+
| Entity referenced from multiple places | Yes |
|
|
160
|
+
| Simple value object | No (document inline) |
|
|
161
|
+
| Internal implementation detail | No |
|
|
162
|
+
|
|
163
|
+
## Validation Checklist
|
|
164
|
+
|
|
165
|
+
- [ ] Type is correctly specified
|
|
166
|
+
- [ ] Overview explains single responsibility
|
|
167
|
+
- [ ] Boundaries are clear (owns/uses/provides)
|
|
168
|
+
- [ ] Data model complete with constraints
|
|
169
|
+
- [ ] Relations use `→ Unit:` format
|
|
170
|
+
- [ ] Operations list all public methods
|
|
171
|
+
- [ ] Business rules documented
|
|
172
|
+
- [ ] Errors have codes
|
|
173
|
+
- [ ] References link to related docs
|
|
174
|
+
|
|
175
|
+
## Output
|
|
176
|
+
|
|
177
|
+
Save to: `docs/architecture/units/unit-{name}.md`
|
|
178
|
+
|
|
179
|
+
Or inline in architecture doc for simple units.
|
|
180
|
+
|
|
181
|
+
## Related Skills
|
|
182
|
+
|
|
183
|
+
- `architecture-design` - References units
|
|
184
|
+
- `story-writing` - Tasks reference units
|
|
185
|
+
- `epic-writing` - Epics affect units
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# Unit: {{name}}
|
|
2
|
+
|
|
3
|
+
```yaml
|
|
4
|
+
id: {{ID}}
|
|
5
|
+
type: module | domain | entity | service | feature
|
|
6
|
+
status: draft | approved
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
{{name}} is responsible for {{single_responsibility}}. It owns {{what_it_owns}} and provides {{what_it_exposes}} to other parts of the system.
|
|
14
|
+
|
|
15
|
+
**Type:** {{module/domain/entity/service/feature}}
|
|
16
|
+
|
|
17
|
+
**Key Characteristics:**
|
|
18
|
+
- {{characteristic_1}}
|
|
19
|
+
- {{characteristic_2}}
|
|
20
|
+
|
|
21
|
+
<!-- e.g.
|
|
22
|
+
Task is responsible for representing a unit of work in the system. It owns title, description, status, and due date, and provides CRUD operations and status transitions to other parts of the system.
|
|
23
|
+
|
|
24
|
+
**Type:** entity
|
|
25
|
+
|
|
26
|
+
**Key Characteristics:**
|
|
27
|
+
- Immutable ID after creation
|
|
28
|
+
- Status follows defined workflow
|
|
29
|
+
- Always belongs to one workspace
|
|
30
|
+
-->
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Boundaries
|
|
35
|
+
|
|
36
|
+
| Aspect | Details |
|
|
37
|
+
|--------|---------|
|
|
38
|
+
| **Owns** | {{data_and_behavior}} |
|
|
39
|
+
| **Uses** | → Unit: `{{dependency}}` |
|
|
40
|
+
| **Provides** | {{exposed_operations}} |
|
|
41
|
+
|
|
42
|
+
**Notes:**
|
|
43
|
+
- {{boundary_clarification}}
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Data Model
|
|
48
|
+
|
|
49
|
+
| Field | Type | Constraints | Description |
|
|
50
|
+
|-------|------|-------------|-------------|
|
|
51
|
+
| id | {{type}} | PK | Primary identifier |
|
|
52
|
+
| {{field}} | {{type}} | {{constraints}} | {{description}} |
|
|
53
|
+
| {{field}} | {{type}} | {{constraints}} | {{description}} |
|
|
54
|
+
|
|
55
|
+
<!-- e.g.
|
|
56
|
+
| id | UUID | PK | Primary identifier |
|
|
57
|
+
| title | string | required, max 200 | Task title |
|
|
58
|
+
| status | enum | required | todo, in_progress, done |
|
|
59
|
+
| assignee_id | UUID | FK → User, nullable | Assigned user |
|
|
60
|
+
| due_date | datetime | nullable | Deadline |
|
|
61
|
+
-->
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Relations
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
{{this}} ──► {{other}} ({{relation_type}})
|
|
69
|
+
{{this}} ──< {{other}} ({{relation_type}})
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
| Relation | Target | Type | Description |
|
|
73
|
+
|----------|--------|------|-------------|
|
|
74
|
+
| {{name}} | → Unit: `{{target}}` | {{1:1/1:N/N:M}} | {{description}} |
|
|
75
|
+
|
|
76
|
+
<!-- e.g.
|
|
77
|
+
| assignee | → Unit: `User` | N:1 | Task assigned to user |
|
|
78
|
+
| comments | → Unit: `Comment` | 1:N | Task has many comments |
|
|
79
|
+
| tags | → Unit: `Tag` | N:M | Task can have multiple tags |
|
|
80
|
+
-->
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## Operations
|
|
85
|
+
|
|
86
|
+
| Operation | Input | Output | Description |
|
|
87
|
+
|-----------|-------|--------|-------------|
|
|
88
|
+
| {{op}} | {{params}} | {{result}} | {{what_it_does}} |
|
|
89
|
+
|
|
90
|
+
**Business Rules:**
|
|
91
|
+
- {{rule}}
|
|
92
|
+
|
|
93
|
+
<!-- e.g.
|
|
94
|
+
| Create | title, description | Task | Creates new task with status=todo |
|
|
95
|
+
| Assign | task_id, user_id | Task | Assigns task to user |
|
|
96
|
+
| ChangeStatus | task_id, new_status | Task | Transitions status |
|
|
97
|
+
|
|
98
|
+
**Business Rules:**
|
|
99
|
+
- Cannot assign to deactivated user
|
|
100
|
+
- Status can only move forward (todo→progress→done)
|
|
101
|
+
-->
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## State Machine
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
{{state_1}} ──► {{state_2}} ──► {{state_3}}
|
|
109
|
+
│ │
|
|
110
|
+
└──────────────┘ ({{condition}})
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
| State | Description | Transitions To |
|
|
114
|
+
|-------|-------------|----------------|
|
|
115
|
+
| {{state}} | {{meaning}} | {{next_states}} |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Errors
|
|
120
|
+
|
|
121
|
+
| Error | Code | When |
|
|
122
|
+
|-------|------|------|
|
|
123
|
+
| {{error}} | {{code}} | {{condition}} |
|
|
124
|
+
|
|
125
|
+
<!-- e.g.
|
|
126
|
+
| TaskNotFound | TASK_001 | Task with ID doesn't exist |
|
|
127
|
+
| InvalidTransition | TASK_002 | Status change not allowed |
|
|
128
|
+
| AssigneeInactive | TASK_003 | Cannot assign to deactivated user |
|
|
129
|
+
-->
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## References
|
|
134
|
+
|
|
135
|
+
→ Architecture: `{{path}}`
|
|
136
|
+
→ Related: → Unit: `{{related}}`
|
|
@@ -47,11 +47,11 @@ docs/
|
|
|
47
47
|
|
|
48
48
|
## Templates
|
|
49
49
|
|
|
50
|
-
Templates are in `.opencode/
|
|
51
|
-
- `prd-template.md`
|
|
52
|
-
- `architecture-template.md`
|
|
53
|
-
- `epic-template.md`
|
|
54
|
-
- `story-template.md`
|
|
50
|
+
Templates are co-located with skills in `.opencode/skills/`:
|
|
51
|
+
- `skills/prd-writing/template.md`
|
|
52
|
+
- `skills/architecture-design/template.md`
|
|
53
|
+
- `skills/epic-writing/template.md`
|
|
54
|
+
- `skills/story-writing/template.md`
|
|
55
55
|
|
|
56
56
|
## Writing Guidelines
|
|
57
57
|
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
-
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
## [Unreleased]
|
|
9
|
-
|
|
10
|
-
### Added
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
### Changed
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
### Deprecated
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
### Removed
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
### Fixed
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
### Security
|
|
26
|
-
-
|
|
27
|
-
|
|
28
|
-
---
|
|
29
|
-
|
|
30
|
-
## [1.0.0] - YYYY-MM-DD
|
|
31
|
-
|
|
32
|
-
### Added
|
|
33
|
-
- Initial release
|
|
34
|
-
- Feature X
|
|
35
|
-
- Feature Y
|
|
36
|
-
|
|
37
|
-
### Changed
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
### Fixed
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
---
|
|
44
|
-
|
|
45
|
-
## [0.1.0] - YYYY-MM-DD
|
|
46
|
-
|
|
47
|
-
### Added
|
|
48
|
-
- Project skeleton
|
|
49
|
-
- Basic documentation
|
|
50
|
-
|
|
51
|
-
---
|
|
52
|
-
|
|
53
|
-
<!--
|
|
54
|
-
CHANGELOG GUIDELINES:
|
|
55
|
-
|
|
56
|
-
## Entry Format
|
|
57
|
-
- Start with verb: Add, Change, Fix, Remove, Deprecate
|
|
58
|
-
- Be specific: "Add user registration API" not "Add feature"
|
|
59
|
-
- Reference issues/PRs: "Fix login bug (#123)"
|
|
60
|
-
- Group related changes
|
|
61
|
-
|
|
62
|
-
## Categories
|
|
63
|
-
- Added: New features
|
|
64
|
-
- Changed: Changes in existing functionality
|
|
65
|
-
- Deprecated: Soon-to-be removed features
|
|
66
|
-
- Removed: Removed features
|
|
67
|
-
- Fixed: Bug fixes
|
|
68
|
-
- Security: Vulnerability fixes
|
|
69
|
-
|
|
70
|
-
## Versioning (SemVer)
|
|
71
|
-
- MAJOR: Breaking changes
|
|
72
|
-
- MINOR: New features (backward compatible)
|
|
73
|
-
- PATCH: Bug fixes (backward compatible)
|
|
74
|
-
|
|
75
|
-
## Example Entries
|
|
76
|
-
- Add product catalog API with CRUD operations
|
|
77
|
-
- Add user authentication via JWT tokens
|
|
78
|
-
- Change order status from string to enum
|
|
79
|
-
- Fix race condition in inventory reservation (#234)
|
|
80
|
-
- Remove deprecated v1 API endpoints
|
|
81
|
-
- Security: Fix SQL injection in search query
|
|
82
|
-
-->
|