@comfanion/workflow 3.0.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 +185 -0
- package/bin/cli.js +406 -0
- package/package.json +50 -0
- package/src/build-info.json +16 -0
- package/src/opencode/ARCHITECTURE.md +255 -0
- package/src/opencode/FLOW.yaml +900 -0
- package/src/opencode/agents/analyst.md +141 -0
- package/src/opencode/agents/architect.md +177 -0
- package/src/opencode/agents/change-manager.md +263 -0
- package/src/opencode/agents/dev.md +171 -0
- package/src/opencode/agents/module-docs.md +628 -0
- package/src/opencode/agents/pm.md +157 -0
- package/src/opencode/agents/researcher.md +254 -0
- package/src/opencode/agents/sm.md +184 -0
- package/src/opencode/agents/workflow-orchestrator.md +249 -0
- package/src/opencode/checklists/architecture-checklist.md +166 -0
- package/src/opencode/checklists/code-review-checklist.md +151 -0
- package/src/opencode/checklists/prd-checklist.md +140 -0
- package/src/opencode/checklists/requirements-checklist.md +86 -0
- package/src/opencode/checklists/story-checklist.md +137 -0
- package/src/opencode/commands/architecture.md +68 -0
- package/src/opencode/commands/archive.md +146 -0
- package/src/opencode/commands/change.md +169 -0
- package/src/opencode/commands/clarify.md +132 -0
- package/src/opencode/commands/code-review.md +96 -0
- package/src/opencode/commands/coding-standards.md +102 -0
- package/src/opencode/commands/dev-story.md +80 -0
- package/src/opencode/commands/diagram.md +152 -0
- package/src/opencode/commands/epics.md +52 -0
- package/src/opencode/commands/help.md +139 -0
- package/src/opencode/commands/jira-sync.md +58 -0
- package/src/opencode/commands/module-docs.md +158 -0
- package/src/opencode/commands/prd.md +63 -0
- package/src/opencode/commands/quick.md +166 -0
- package/src/opencode/commands/requirements.md +49 -0
- package/src/opencode/commands/research.md +113 -0
- package/src/opencode/commands/sprint-plan.md +59 -0
- package/src/opencode/commands/stories.md +61 -0
- package/src/opencode/commands/validate.md +84 -0
- package/src/opencode/commands/workflow-status.md +150 -0
- package/src/opencode/config.yaml +223 -0
- package/src/opencode/opencode.json +36 -0
- package/src/opencode/skills/acceptance-criteria/SKILL.md +212 -0
- package/src/opencode/skills/adr-writing/SKILL.md +241 -0
- package/src/opencode/skills/architecture-design/SKILL.md +183 -0
- package/src/opencode/skills/architecture-validation/SKILL.md +199 -0
- package/src/opencode/skills/archiving/SKILL.md +191 -0
- package/src/opencode/skills/changelog/SKILL.md +280 -0
- package/src/opencode/skills/code-review/SKILL.md +193 -0
- package/src/opencode/skills/coding-standards/SKILL.md +430 -0
- package/src/opencode/skills/diagram-creation/SKILL.md +273 -0
- package/src/opencode/skills/doc-todo/SKILL.md +325 -0
- package/src/opencode/skills/epic-writing/SKILL.md +291 -0
- package/src/opencode/skills/jira-integration/SKILL.md +560 -0
- package/src/opencode/skills/methodologies/SKILL.md +376 -0
- package/src/opencode/skills/module-documentation/SKILL.md +214 -0
- package/src/opencode/skills/prd-validation/SKILL.md +164 -0
- package/src/opencode/skills/prd-writing/SKILL.md +104 -0
- package/src/opencode/skills/requirements-gathering/SKILL.md +132 -0
- package/src/opencode/skills/requirements-validation/SKILL.md +141 -0
- package/src/opencode/skills/research-methodology/SKILL.md +140 -0
- package/src/opencode/skills/sprint-planning/SKILL.md +217 -0
- package/src/opencode/skills/story-writing/SKILL.md +574 -0
- package/src/opencode/skills/test-design/SKILL.md +313 -0
- package/src/opencode/skills/translation/SKILL.md +411 -0
- package/src/opencode/templates/CHANGELOG.md +82 -0
- package/src/opencode/templates/adr-template.md +115 -0
- package/src/opencode/templates/architecture-template.md +362 -0
- package/src/opencode/templates/change-proposal-template.md +186 -0
- package/src/opencode/templates/epic-template.md +151 -0
- package/src/opencode/templates/git-workflow-template.md +384 -0
- package/src/opencode/templates/integration-tests-template.md +265 -0
- package/src/opencode/templates/jira-cache-template.yaml +103 -0
- package/src/opencode/templates/module-index-template.md +139 -0
- package/src/opencode/templates/module-test-cases-template.md +230 -0
- package/src/opencode/templates/prd-acceptance-criteria-template.md +124 -0
- package/src/opencode/templates/prd-template.md +479 -0
- package/src/opencode/templates/requirements-template.md +132 -0
- package/src/opencode/templates/sprint-status-template.yaml +84 -0
- package/src/opencode/templates/story-template.md +437 -0
- package/src/opencode/templates/testing-standards-template.md +359 -0
- package/src/opencode/workflows/dev-story/instructions.md +529 -0
- package/src/repo-structure/.gitattributes +64 -0
- package/src/repo-structure/CONTRIBUTING.md +182 -0
- package/src/repo-structure/README.md +77 -0
- package/src/repo-structure/docs/README.md +62 -0
- package/src/repo-structure/docs/api/README.md +43 -0
- package/src/repo-structure/docs/architecture/README.md +36 -0
- package/src/repo-structure/docs/architecture/adr/README.md +53 -0
- package/src/repo-structure/docs/architecture/diagrams/README.md +59 -0
- package/src/repo-structure/docs/coding-standards/README.md +52 -0
- package/src/repo-structure/docs/confluence/README.md +43 -0
- package/src/repo-structure/docs/requirements/README.md +28 -0
- package/src/repo-structure/docs/sprint-artifacts/README.md +76 -0
- package/src/repo-structure/docs/sprint-artifacts/backlog/README.md +24 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
# Change Proposal: [Name]
|
|
2
|
+
|
|
3
|
+
**ID:** CP-NNN
|
|
4
|
+
**Status:** Draft | Review | Approved | Rejected | Merged
|
|
5
|
+
**Author:** [Name]
|
|
6
|
+
**Created:** YYYY-MM-DD
|
|
7
|
+
**Updated:** YYYY-MM-DD
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Summary
|
|
12
|
+
|
|
13
|
+
[1-2 sentences: What is being changed and why]
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Motivation
|
|
18
|
+
|
|
19
|
+
### Problem
|
|
20
|
+
|
|
21
|
+
[What problem does this change solve?]
|
|
22
|
+
|
|
23
|
+
### Current State
|
|
24
|
+
|
|
25
|
+
[How things work now]
|
|
26
|
+
|
|
27
|
+
### Desired State
|
|
28
|
+
|
|
29
|
+
[How things should work after this change]
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Scope
|
|
34
|
+
|
|
35
|
+
### In Scope
|
|
36
|
+
|
|
37
|
+
- [What this change includes]
|
|
38
|
+
- [What this change includes]
|
|
39
|
+
|
|
40
|
+
### Out of Scope
|
|
41
|
+
|
|
42
|
+
- [What this change does NOT include]
|
|
43
|
+
- [What will be done later]
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Impact Analysis
|
|
48
|
+
|
|
49
|
+
### Documents Affected
|
|
50
|
+
|
|
51
|
+
| Document | Type of Change | Delta File |
|
|
52
|
+
|----------|----------------|------------|
|
|
53
|
+
| docs/architecture.md | Modify | [deltas/architecture.md](./deltas/architecture.md) |
|
|
54
|
+
| docs/prd.md | Modify | [deltas/prd.md](./deltas/prd.md) |
|
|
55
|
+
| docs/architecture/[module]/architecture.md | New | - |
|
|
56
|
+
|
|
57
|
+
### Modules Affected
|
|
58
|
+
|
|
59
|
+
| Module | Impact | Description |
|
|
60
|
+
|--------|--------|-------------|
|
|
61
|
+
| [Module A] | High | [What changes] |
|
|
62
|
+
| [Module B] | Low | [What changes] |
|
|
63
|
+
|
|
64
|
+
### Breaking Changes
|
|
65
|
+
|
|
66
|
+
- [ ] No breaking changes
|
|
67
|
+
- [ ] Breaking changes (describe below)
|
|
68
|
+
|
|
69
|
+
[If breaking changes, describe migration path]
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Proposed Changes
|
|
74
|
+
|
|
75
|
+
### Change 1: [Title]
|
|
76
|
+
|
|
77
|
+
**File:** `docs/[path]`
|
|
78
|
+
|
|
79
|
+
**Current:**
|
|
80
|
+
```
|
|
81
|
+
[Current text/structure]
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Proposed:**
|
|
85
|
+
```
|
|
86
|
+
[New text/structure]
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Rationale:** [Why this change]
|
|
90
|
+
|
|
91
|
+
### Change 2: [Title]
|
|
92
|
+
|
|
93
|
+
**File:** `docs/[path]`
|
|
94
|
+
|
|
95
|
+
**Current:**
|
|
96
|
+
```
|
|
97
|
+
[Current text/structure]
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Proposed:**
|
|
101
|
+
```
|
|
102
|
+
[New text/structure]
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Rationale:** [Why this change]
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Alternatives Considered
|
|
110
|
+
|
|
111
|
+
### Alternative 1: [Name]
|
|
112
|
+
|
|
113
|
+
[Description and why not chosen]
|
|
114
|
+
|
|
115
|
+
### Alternative 2: [Name]
|
|
116
|
+
|
|
117
|
+
[Description and why not chosen]
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Risks
|
|
122
|
+
|
|
123
|
+
| Risk | Probability | Impact | Mitigation |
|
|
124
|
+
|------|-------------|--------|------------|
|
|
125
|
+
| [Risk 1] | Low/Med/High | Low/Med/High | [How to mitigate] |
|
|
126
|
+
| [Risk 2] | Low/Med/High | Low/Med/High | [How to mitigate] |
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Implementation Plan
|
|
131
|
+
|
|
132
|
+
### Tasks
|
|
133
|
+
|
|
134
|
+
- [ ] [Task 1]
|
|
135
|
+
- [ ] [Task 2]
|
|
136
|
+
- [ ] [Task 3]
|
|
137
|
+
|
|
138
|
+
### Timeline
|
|
139
|
+
|
|
140
|
+
| Phase | Description | Target |
|
|
141
|
+
|-------|-------------|--------|
|
|
142
|
+
| Draft | Create proposal | YYYY-MM-DD |
|
|
143
|
+
| Review | Team review | YYYY-MM-DD |
|
|
144
|
+
| Approve | Get approval | YYYY-MM-DD |
|
|
145
|
+
| Merge | Apply changes | YYYY-MM-DD |
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## Approval
|
|
150
|
+
|
|
151
|
+
### Reviewers
|
|
152
|
+
|
|
153
|
+
| Name | Role | Status | Date |
|
|
154
|
+
|------|------|--------|------|
|
|
155
|
+
| [Name] | [Role] | Pending/Approved/Rejected | - |
|
|
156
|
+
| [Name] | [Role] | Pending/Approved/Rejected | - |
|
|
157
|
+
|
|
158
|
+
### Sign-off
|
|
159
|
+
|
|
160
|
+
- [ ] Architecture review
|
|
161
|
+
- [ ] Product review
|
|
162
|
+
- [ ] No conflicts with other changes
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Deltas
|
|
167
|
+
|
|
168
|
+
Deltas are stored in `./deltas/` directory:
|
|
169
|
+
|
|
170
|
+
```
|
|
171
|
+
changes/[change-name]/
|
|
172
|
+
├── proposal.md # This file
|
|
173
|
+
└── deltas/
|
|
174
|
+
├── architecture.md # Changes to architecture.md
|
|
175
|
+
├── prd.md # Changes to prd.md
|
|
176
|
+
└── ...
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## After Merge
|
|
182
|
+
|
|
183
|
+
- [ ] Archive this proposal to `docs/archive/changes/`
|
|
184
|
+
- [ ] Update related documents
|
|
185
|
+
- [ ] Notify stakeholders
|
|
186
|
+
- [ ] Run `/validate all`
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# Epic {{epic_number}}: {{epic_title}}
|
|
2
|
+
|
|
3
|
+
**Epic ID:** {{module}}-E{{epic_number}}
|
|
4
|
+
**Status:** TODO | IN_PROGRESS | DONE
|
|
5
|
+
**Priority:** P0 | P1 | P2
|
|
6
|
+
**Sprint:** sprint-{{sprint_number}}
|
|
7
|
+
**Branch:** feature/epic-{{epic_number}}-{{short_name}}
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
[2-3 sentences describing what this epic delivers and why it matters]
|
|
14
|
+
|
|
15
|
+
### Business Value
|
|
16
|
+
|
|
17
|
+
[Why is this epic important? What problem does it solve?]
|
|
18
|
+
|
|
19
|
+
### Dependencies
|
|
20
|
+
|
|
21
|
+
**Requires (must complete first):**
|
|
22
|
+
- [Epic ID]: [brief reason]
|
|
23
|
+
|
|
24
|
+
**Enables (unlocks these):**
|
|
25
|
+
- [Epic ID]: [brief reason]
|
|
26
|
+
|
|
27
|
+
### Architecture References
|
|
28
|
+
|
|
29
|
+
- [Link to architecture section]
|
|
30
|
+
- [Link to data model]
|
|
31
|
+
|
|
32
|
+
### PRD Coverage
|
|
33
|
+
|
|
34
|
+
| FR ID | Requirement | Covered |
|
|
35
|
+
|-------|-------------|---------|
|
|
36
|
+
| FR-XXX | [description] | [ ] |
|
|
37
|
+
| FR-YYY | [description] | [ ] |
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Acceptance Criteria
|
|
42
|
+
|
|
43
|
+
- [ ] [High-level acceptance criterion 1]
|
|
44
|
+
- [ ] [High-level acceptance criterion 2]
|
|
45
|
+
- [ ] [High-level acceptance criterion 3]
|
|
46
|
+
- [ ] All stories completed and reviewed
|
|
47
|
+
- [ ] All tests passing
|
|
48
|
+
- [ ] Documentation updated
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Stories
|
|
53
|
+
|
|
54
|
+
### Story Breakdown
|
|
55
|
+
|
|
56
|
+
| ID | Title | Status | Priority | Est | Tasks | Deps |
|
|
57
|
+
|----|-------|--------|----------|-----|-------|------|
|
|
58
|
+
| {{module}}-S{{epic_number}}-01 | [Domain Layer] | TODO | P0 | M | 6 | - |
|
|
59
|
+
| {{module}}-S{{epic_number}}-02 | [Use Cases] | TODO | P0 | M | 8 | S01 |
|
|
60
|
+
| {{module}}-S{{epic_number}}-03 | [HTTP Handlers] | TODO | P1 | S | 5 | S02 |
|
|
61
|
+
| {{module}}-S{{epic_number}}-04 | [Integration Tests] | TODO | P1 | S | 4 | S03 |
|
|
62
|
+
|
|
63
|
+
### Story Dependency Graph
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
S01 ──► S02 ──► S03 ──► S04
|
|
67
|
+
│ │
|
|
68
|
+
└──────────────┘ (S03 also needs domain from S01)
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Story Decomposition Rules
|
|
72
|
+
|
|
73
|
+
Each story MUST:
|
|
74
|
+
1. Be completable in 1-3 days
|
|
75
|
+
2. Have 4-10 atomic tasks (1-2h each)
|
|
76
|
+
3. Have clear dependencies on other stories
|
|
77
|
+
4. Map to specific Acceptance Criteria
|
|
78
|
+
|
|
79
|
+
### Recommended Story Order
|
|
80
|
+
|
|
81
|
+
1. **Domain Layer** - Aggregates, value objects, domain services
|
|
82
|
+
2. **Repository Interfaces** - Ports (domain layer)
|
|
83
|
+
3. **Use Cases** - Application layer handlers
|
|
84
|
+
4. **Repository Implementations** - Infrastructure adapters
|
|
85
|
+
5. **HTTP/API Handlers** - Infrastructure entry points
|
|
86
|
+
6. **Events** - Domain events, Kafka publishers
|
|
87
|
+
7. **Integration Tests** - End-to-end verification
|
|
88
|
+
|
|
89
|
+
### Total Effort Breakdown
|
|
90
|
+
|
|
91
|
+
| Layer | Stories | Tasks | Hours |
|
|
92
|
+
|-------|---------|-------|-------|
|
|
93
|
+
| Domain | 1 | 6 | 8h |
|
|
94
|
+
| Application | 1 | 8 | 12h |
|
|
95
|
+
| Infrastructure | 2 | 9 | 14h |
|
|
96
|
+
| Testing | 1 | 4 | 6h |
|
|
97
|
+
| **Total** | **5** | **27** | **40h** |
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Technical Notes
|
|
102
|
+
|
|
103
|
+
### Key Decisions
|
|
104
|
+
- [Decision 1]
|
|
105
|
+
- [Decision 2]
|
|
106
|
+
|
|
107
|
+
### Implementation Hints
|
|
108
|
+
- [Hint 1]
|
|
109
|
+
- [Hint 2]
|
|
110
|
+
|
|
111
|
+
### Files to Create/Modify
|
|
112
|
+
- `src/path/to/file` - [description]
|
|
113
|
+
- `src/path/to/another` - [description]
|
|
114
|
+
|
|
115
|
+
### Testing Strategy
|
|
116
|
+
- Unit tests: [approach]
|
|
117
|
+
- Integration tests: [approach]
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Risks & Mitigations
|
|
122
|
+
|
|
123
|
+
| Risk | Impact | Probability | Mitigation |
|
|
124
|
+
|------|--------|-------------|------------|
|
|
125
|
+
| [Risk 1] | H/M/L | H/M/L | [How to address] |
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Notes
|
|
130
|
+
|
|
131
|
+
[Any additional context, links, or references]
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Changelog
|
|
136
|
+
|
|
137
|
+
<!-- UPDATE AT END OF SESSION -->
|
|
138
|
+
|
|
139
|
+
| Version | Date | Author | Changes |
|
|
140
|
+
|---------|------|--------|---------|
|
|
141
|
+
| 0.1 | {{date}} | @{{author}} | Initial creation |
|
|
142
|
+
|
|
143
|
+
<!--
|
|
144
|
+
Changelog Guidelines:
|
|
145
|
+
- Update at END of work session
|
|
146
|
+
- Summarize all changes in one entry
|
|
147
|
+
- Version: 0.x=planning, 1.0=sprint-ready, 1.x=in-progress
|
|
148
|
+
|
|
149
|
+
Example:
|
|
150
|
+
| 1.0 | 2024-01-15 | @sm | Add stories S01-S05; Define all AC; Ready for sprint |
|
|
151
|
+
-->
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
# Git Workflow
|
|
2
|
+
|
|
3
|
+
**Version:** 1.0
|
|
4
|
+
**Status:** Active
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Branching Strategy
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
main (production)
|
|
12
|
+
│
|
|
13
|
+
├── develop (integration)
|
|
14
|
+
│ │
|
|
15
|
+
│ ├── epic/PROJ-E01-user-auth ─────────────────────┐
|
|
16
|
+
│ │ │ │
|
|
17
|
+
│ │ ├── feature/PROJ-S01-01-login-form │
|
|
18
|
+
│ │ ├── feature/PROJ-S01-02-password-reset │
|
|
19
|
+
│ │ ├── feature/PROJ-S01-03-oauth-google │
|
|
20
|
+
│ │ └── [merge to epic branch when ready] │
|
|
21
|
+
│ │ │
|
|
22
|
+
│ │◄───────────────────────────────────────────────┘
|
|
23
|
+
│ │ [merge epic to develop when complete]
|
|
24
|
+
│ │
|
|
25
|
+
│ ├── epic/PROJ-E02-catalog ───────────────────────┐
|
|
26
|
+
│ │ │ │
|
|
27
|
+
│ │ ├── feature/PROJ-S02-01-product-list │
|
|
28
|
+
│ │ ├── feature/PROJ-S02-02-product-detail │
|
|
29
|
+
│ │ └── ... │
|
|
30
|
+
│ │ │
|
|
31
|
+
│ │◄───────────────────────────────────────────────┘
|
|
32
|
+
│ │
|
|
33
|
+
│ └── hotfix/PROJ-XXX-critical-bug
|
|
34
|
+
│
|
|
35
|
+
└── release/v1.0.0 ──► tag: v1.0.0
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Branch Types
|
|
41
|
+
|
|
42
|
+
| Type | Pattern | Source | Target | Purpose |
|
|
43
|
+
|------|---------|--------|--------|---------|
|
|
44
|
+
| **main** | `main` | - | - | Production code |
|
|
45
|
+
| **develop** | `develop` | main | main | Integration branch |
|
|
46
|
+
| **epic** | `epic/[EPIC-ID]-[name]` | develop | develop | Epic scope |
|
|
47
|
+
| **feature** | `feature/[STORY-ID]-[name]` | epic/* | epic/* | Story implementation |
|
|
48
|
+
| **bugfix** | `bugfix/[STORY-ID]-[name]` | epic/* | epic/* | Bug fix in epic |
|
|
49
|
+
| **hotfix** | `hotfix/[ID]-[name]` | main | main + develop | Production fix |
|
|
50
|
+
| **release** | `release/v[X.Y.Z]` | develop | main | Release preparation |
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Branch Naming
|
|
55
|
+
|
|
56
|
+
### Epic Branches
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
epic/[PROJECT]-E[NN]-[short-description]
|
|
60
|
+
|
|
61
|
+
Examples:
|
|
62
|
+
epic/CATALOG-E01-product-management
|
|
63
|
+
epic/AUTH-E03-oauth-integration
|
|
64
|
+
epic/ORDER-E05-checkout-flow
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Feature/Story Branches
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
feature/[PROJECT]-S[EPIC]-[NN]-[short-description]
|
|
71
|
+
|
|
72
|
+
Examples:
|
|
73
|
+
feature/CATALOG-S01-01-create-product-api
|
|
74
|
+
feature/CATALOG-S01-02-product-validation
|
|
75
|
+
feature/AUTH-S03-01-google-oauth
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Bugfix Branches
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
bugfix/[PROJECT]-S[EPIC]-[NN]-[short-description]
|
|
82
|
+
|
|
83
|
+
Examples:
|
|
84
|
+
bugfix/CATALOG-S01-03-fix-price-validation
|
|
85
|
+
bugfix/AUTH-S03-02-token-refresh-error
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Hotfix Branches
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
hotfix/[PROJECT]-[ID]-[short-description]
|
|
92
|
+
|
|
93
|
+
Examples:
|
|
94
|
+
hotfix/CATALOG-123-fix-null-pointer
|
|
95
|
+
hotfix/AUTH-456-security-patch
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Workflow
|
|
101
|
+
|
|
102
|
+
### 1. Starting an Epic
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
# Create epic branch from develop
|
|
106
|
+
git checkout develop
|
|
107
|
+
git pull origin develop
|
|
108
|
+
git checkout -b epic/CATALOG-E01-product-management
|
|
109
|
+
|
|
110
|
+
# Push epic branch
|
|
111
|
+
git push -u origin epic/CATALOG-E01-product-management
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### 2. Starting a Story
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# Create feature branch from epic
|
|
118
|
+
git checkout epic/CATALOG-E01-product-management
|
|
119
|
+
git pull origin epic/CATALOG-E01-product-management
|
|
120
|
+
git checkout -b feature/CATALOG-S01-01-create-product-api
|
|
121
|
+
|
|
122
|
+
# Work on feature...
|
|
123
|
+
git add .
|
|
124
|
+
git commit -m "feat(catalog): add create product endpoint"
|
|
125
|
+
|
|
126
|
+
# Push feature branch
|
|
127
|
+
git push -u origin feature/CATALOG-S01-01-create-product-api
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### 3. Completing a Story
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
# Create PR/MR: feature/* → epic/*
|
|
134
|
+
# After review and approval, merge to epic branch
|
|
135
|
+
# Delete feature branch after merge
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### 4. Completing an Epic
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# Ensure all stories merged to epic branch
|
|
142
|
+
# Create PR/MR: epic/* → develop
|
|
143
|
+
# After review and approval, merge to develop
|
|
144
|
+
# Delete epic branch after merge
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### 5. Creating a Release
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
# Create release branch from develop
|
|
151
|
+
git checkout develop
|
|
152
|
+
git pull origin develop
|
|
153
|
+
git checkout -b release/v1.0.0
|
|
154
|
+
|
|
155
|
+
# Final testing, version bump, changelog
|
|
156
|
+
git commit -m "chore: prepare release v1.0.0"
|
|
157
|
+
|
|
158
|
+
# Merge to main
|
|
159
|
+
git checkout main
|
|
160
|
+
git merge release/v1.0.0
|
|
161
|
+
git tag -a v1.0.0 -m "Release v1.0.0"
|
|
162
|
+
git push origin main --tags
|
|
163
|
+
|
|
164
|
+
# Merge back to develop
|
|
165
|
+
git checkout develop
|
|
166
|
+
git merge release/v1.0.0
|
|
167
|
+
git push origin develop
|
|
168
|
+
|
|
169
|
+
# Delete release branch
|
|
170
|
+
git branch -d release/v1.0.0
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### 6. Hotfix
|
|
174
|
+
|
|
175
|
+
```bash
|
|
176
|
+
# Create hotfix from main
|
|
177
|
+
git checkout main
|
|
178
|
+
git pull origin main
|
|
179
|
+
git checkout -b hotfix/CATALOG-123-fix-null-pointer
|
|
180
|
+
|
|
181
|
+
# Fix and commit
|
|
182
|
+
git commit -m "fix(catalog): handle null product reference"
|
|
183
|
+
|
|
184
|
+
# Merge to main
|
|
185
|
+
git checkout main
|
|
186
|
+
git merge hotfix/CATALOG-123-fix-null-pointer
|
|
187
|
+
git tag -a v1.0.1 -m "Hotfix v1.0.1"
|
|
188
|
+
git push origin main --tags
|
|
189
|
+
|
|
190
|
+
# Merge to develop
|
|
191
|
+
git checkout develop
|
|
192
|
+
git merge hotfix/CATALOG-123-fix-null-pointer
|
|
193
|
+
git push origin develop
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## Commit Messages
|
|
199
|
+
|
|
200
|
+
### Format
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
<type>(<scope>): <subject>
|
|
204
|
+
|
|
205
|
+
[optional body]
|
|
206
|
+
|
|
207
|
+
[optional footer]
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Types
|
|
211
|
+
|
|
212
|
+
| Type | Description |
|
|
213
|
+
|------|-------------|
|
|
214
|
+
| `feat` | New feature |
|
|
215
|
+
| `fix` | Bug fix |
|
|
216
|
+
| `docs` | Documentation |
|
|
217
|
+
| `style` | Formatting (no code change) |
|
|
218
|
+
| `refactor` | Code restructuring |
|
|
219
|
+
| `test` | Adding tests |
|
|
220
|
+
| `chore` | Maintenance tasks |
|
|
221
|
+
| `perf` | Performance improvement |
|
|
222
|
+
| `ci` | CI/CD changes |
|
|
223
|
+
|
|
224
|
+
### Examples
|
|
225
|
+
|
|
226
|
+
```bash
|
|
227
|
+
# Feature
|
|
228
|
+
feat(catalog): add product search endpoint
|
|
229
|
+
|
|
230
|
+
# Bug fix
|
|
231
|
+
fix(auth): correct token expiration calculation
|
|
232
|
+
|
|
233
|
+
# With body
|
|
234
|
+
feat(order): implement checkout flow
|
|
235
|
+
|
|
236
|
+
- Add cart validation
|
|
237
|
+
- Integrate payment gateway
|
|
238
|
+
- Send confirmation email
|
|
239
|
+
|
|
240
|
+
Closes PROJ-S05-01
|
|
241
|
+
|
|
242
|
+
# Breaking change
|
|
243
|
+
feat(api)!: change response format for products
|
|
244
|
+
|
|
245
|
+
BREAKING CHANGE: Product response now includes nested category object
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## Pull/Merge Request
|
|
251
|
+
|
|
252
|
+
### Title Format
|
|
253
|
+
|
|
254
|
+
```
|
|
255
|
+
[STORY-ID] <type>: <description>
|
|
256
|
+
|
|
257
|
+
Examples:
|
|
258
|
+
[CATALOG-S01-01] feat: add create product API
|
|
259
|
+
[AUTH-S03-02] fix: token refresh error
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
### PR Template
|
|
263
|
+
|
|
264
|
+
```markdown
|
|
265
|
+
## Summary
|
|
266
|
+
[Brief description of changes]
|
|
267
|
+
|
|
268
|
+
## Story
|
|
269
|
+
[PROJ-S01-01](link-to-story)
|
|
270
|
+
|
|
271
|
+
## Type of Change
|
|
272
|
+
- [ ] Feature
|
|
273
|
+
- [ ] Bug fix
|
|
274
|
+
- [ ] Refactoring
|
|
275
|
+
- [ ] Documentation
|
|
276
|
+
|
|
277
|
+
## Checklist
|
|
278
|
+
- [ ] Tests added/updated
|
|
279
|
+
- [ ] Documentation updated
|
|
280
|
+
- [ ] No breaking changes (or documented)
|
|
281
|
+
- [ ] Code reviewed
|
|
282
|
+
|
|
283
|
+
## Screenshots (if UI)
|
|
284
|
+
[Add screenshots]
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Branch Protection Rules
|
|
290
|
+
|
|
291
|
+
### main
|
|
292
|
+
|
|
293
|
+
- Require PR before merging
|
|
294
|
+
- Require 2 approvals
|
|
295
|
+
- Require status checks (CI)
|
|
296
|
+
- No direct pushes
|
|
297
|
+
- No force pushes
|
|
298
|
+
|
|
299
|
+
### develop
|
|
300
|
+
|
|
301
|
+
- Require PR before merging
|
|
302
|
+
- Require 1 approval
|
|
303
|
+
- Require status checks (CI)
|
|
304
|
+
- No direct pushes
|
|
305
|
+
|
|
306
|
+
### epic/*
|
|
307
|
+
|
|
308
|
+
- Require PR before merging
|
|
309
|
+
- Require 1 approval
|
|
310
|
+
- Require status checks (CI)
|
|
311
|
+
|
|
312
|
+
---
|
|
313
|
+
|
|
314
|
+
## Workflow Diagram
|
|
315
|
+
|
|
316
|
+
```
|
|
317
|
+
┌─────────────────────────────────────┐
|
|
318
|
+
│ MAIN │
|
|
319
|
+
│ (production) │
|
|
320
|
+
└──────────────┬──────────────────────┘
|
|
321
|
+
│
|
|
322
|
+
┌─────────────────────────┼─────────────────────────┐
|
|
323
|
+
│ │ │
|
|
324
|
+
hotfix/* release/* │
|
|
325
|
+
│ │ │
|
|
326
|
+
▼ ▼ │
|
|
327
|
+
┌──────────────────────────────────────────────────────┐ │
|
|
328
|
+
│ DEVELOP │ │
|
|
329
|
+
│ (integration) │ │
|
|
330
|
+
└──────────────────────────┬───────────────────────────┘ │
|
|
331
|
+
│ │
|
|
332
|
+
┌────────────────────────────────┼────────────────────────────┐│
|
|
333
|
+
│ │ ││
|
|
334
|
+
▼ ▼ ▼│
|
|
335
|
+
┌──────────────────┐ ┌──────────────────┐ ┌─────────────────┐
|
|
336
|
+
│ epic/PROJ-E01-* │ │ epic/PROJ-E02-* │ │ epic/PROJ-E03-* │
|
|
337
|
+
└────────┬─────────┘ └────────┬─────────┘ └────────┬────────┘
|
|
338
|
+
│ │ │
|
|
339
|
+
┌────────┼────────┐ ┌────────┼────────┐ ┌────────┼────────┐
|
|
340
|
+
│ │ │ │ │ │ │ │ │
|
|
341
|
+
▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼ ▼
|
|
342
|
+
feature feature feature feature feature bugfix feature feature feature
|
|
343
|
+
S01-01 S01-02 S01-03 S02-01 S02-02 S02-03 S03-01 S03-02 S03-03
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
## Quick Reference
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
# Start epic
|
|
352
|
+
git checkout develop && git pull
|
|
353
|
+
git checkout -b epic/PROJ-E01-name
|
|
354
|
+
|
|
355
|
+
# Start story
|
|
356
|
+
git checkout epic/PROJ-E01-name && git pull
|
|
357
|
+
git checkout -b feature/PROJ-S01-01-name
|
|
358
|
+
|
|
359
|
+
# Daily work
|
|
360
|
+
git add . && git commit -m "feat(scope): message"
|
|
361
|
+
git push origin feature/PROJ-S01-01-name
|
|
362
|
+
|
|
363
|
+
# After PR merged to epic
|
|
364
|
+
git checkout epic/PROJ-E01-name
|
|
365
|
+
git pull origin epic/PROJ-E01-name
|
|
366
|
+
git branch -d feature/PROJ-S01-01-name
|
|
367
|
+
|
|
368
|
+
# After epic complete
|
|
369
|
+
git checkout develop
|
|
370
|
+
git pull origin develop
|
|
371
|
+
git branch -d epic/PROJ-E01-name
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## CI/CD Integration
|
|
377
|
+
|
|
378
|
+
| Event | Trigger | Actions |
|
|
379
|
+
|-------|---------|---------|
|
|
380
|
+
| Push to feature/* | On push | Lint, Test, Build |
|
|
381
|
+
| PR to epic/* | On PR | Lint, Test, Build, Code Review |
|
|
382
|
+
| PR to develop | On PR | Full test suite, Integration tests |
|
|
383
|
+
| PR to main | On PR | Full test suite, Security scan |
|
|
384
|
+
| Tag v*.*.* | On tag | Build, Deploy to production |
|