@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.
Files changed (95) hide show
  1. package/README.md +185 -0
  2. package/bin/cli.js +406 -0
  3. package/package.json +50 -0
  4. package/src/build-info.json +16 -0
  5. package/src/opencode/ARCHITECTURE.md +255 -0
  6. package/src/opencode/FLOW.yaml +900 -0
  7. package/src/opencode/agents/analyst.md +141 -0
  8. package/src/opencode/agents/architect.md +177 -0
  9. package/src/opencode/agents/change-manager.md +263 -0
  10. package/src/opencode/agents/dev.md +171 -0
  11. package/src/opencode/agents/module-docs.md +628 -0
  12. package/src/opencode/agents/pm.md +157 -0
  13. package/src/opencode/agents/researcher.md +254 -0
  14. package/src/opencode/agents/sm.md +184 -0
  15. package/src/opencode/agents/workflow-orchestrator.md +249 -0
  16. package/src/opencode/checklists/architecture-checklist.md +166 -0
  17. package/src/opencode/checklists/code-review-checklist.md +151 -0
  18. package/src/opencode/checklists/prd-checklist.md +140 -0
  19. package/src/opencode/checklists/requirements-checklist.md +86 -0
  20. package/src/opencode/checklists/story-checklist.md +137 -0
  21. package/src/opencode/commands/architecture.md +68 -0
  22. package/src/opencode/commands/archive.md +146 -0
  23. package/src/opencode/commands/change.md +169 -0
  24. package/src/opencode/commands/clarify.md +132 -0
  25. package/src/opencode/commands/code-review.md +96 -0
  26. package/src/opencode/commands/coding-standards.md +102 -0
  27. package/src/opencode/commands/dev-story.md +80 -0
  28. package/src/opencode/commands/diagram.md +152 -0
  29. package/src/opencode/commands/epics.md +52 -0
  30. package/src/opencode/commands/help.md +139 -0
  31. package/src/opencode/commands/jira-sync.md +58 -0
  32. package/src/opencode/commands/module-docs.md +158 -0
  33. package/src/opencode/commands/prd.md +63 -0
  34. package/src/opencode/commands/quick.md +166 -0
  35. package/src/opencode/commands/requirements.md +49 -0
  36. package/src/opencode/commands/research.md +113 -0
  37. package/src/opencode/commands/sprint-plan.md +59 -0
  38. package/src/opencode/commands/stories.md +61 -0
  39. package/src/opencode/commands/validate.md +84 -0
  40. package/src/opencode/commands/workflow-status.md +150 -0
  41. package/src/opencode/config.yaml +223 -0
  42. package/src/opencode/opencode.json +36 -0
  43. package/src/opencode/skills/acceptance-criteria/SKILL.md +212 -0
  44. package/src/opencode/skills/adr-writing/SKILL.md +241 -0
  45. package/src/opencode/skills/architecture-design/SKILL.md +183 -0
  46. package/src/opencode/skills/architecture-validation/SKILL.md +199 -0
  47. package/src/opencode/skills/archiving/SKILL.md +191 -0
  48. package/src/opencode/skills/changelog/SKILL.md +280 -0
  49. package/src/opencode/skills/code-review/SKILL.md +193 -0
  50. package/src/opencode/skills/coding-standards/SKILL.md +430 -0
  51. package/src/opencode/skills/diagram-creation/SKILL.md +273 -0
  52. package/src/opencode/skills/doc-todo/SKILL.md +325 -0
  53. package/src/opencode/skills/epic-writing/SKILL.md +291 -0
  54. package/src/opencode/skills/jira-integration/SKILL.md +560 -0
  55. package/src/opencode/skills/methodologies/SKILL.md +376 -0
  56. package/src/opencode/skills/module-documentation/SKILL.md +214 -0
  57. package/src/opencode/skills/prd-validation/SKILL.md +164 -0
  58. package/src/opencode/skills/prd-writing/SKILL.md +104 -0
  59. package/src/opencode/skills/requirements-gathering/SKILL.md +132 -0
  60. package/src/opencode/skills/requirements-validation/SKILL.md +141 -0
  61. package/src/opencode/skills/research-methodology/SKILL.md +140 -0
  62. package/src/opencode/skills/sprint-planning/SKILL.md +217 -0
  63. package/src/opencode/skills/story-writing/SKILL.md +574 -0
  64. package/src/opencode/skills/test-design/SKILL.md +313 -0
  65. package/src/opencode/skills/translation/SKILL.md +411 -0
  66. package/src/opencode/templates/CHANGELOG.md +82 -0
  67. package/src/opencode/templates/adr-template.md +115 -0
  68. package/src/opencode/templates/architecture-template.md +362 -0
  69. package/src/opencode/templates/change-proposal-template.md +186 -0
  70. package/src/opencode/templates/epic-template.md +151 -0
  71. package/src/opencode/templates/git-workflow-template.md +384 -0
  72. package/src/opencode/templates/integration-tests-template.md +265 -0
  73. package/src/opencode/templates/jira-cache-template.yaml +103 -0
  74. package/src/opencode/templates/module-index-template.md +139 -0
  75. package/src/opencode/templates/module-test-cases-template.md +230 -0
  76. package/src/opencode/templates/prd-acceptance-criteria-template.md +124 -0
  77. package/src/opencode/templates/prd-template.md +479 -0
  78. package/src/opencode/templates/requirements-template.md +132 -0
  79. package/src/opencode/templates/sprint-status-template.yaml +84 -0
  80. package/src/opencode/templates/story-template.md +437 -0
  81. package/src/opencode/templates/testing-standards-template.md +359 -0
  82. package/src/opencode/workflows/dev-story/instructions.md +529 -0
  83. package/src/repo-structure/.gitattributes +64 -0
  84. package/src/repo-structure/CONTRIBUTING.md +182 -0
  85. package/src/repo-structure/README.md +77 -0
  86. package/src/repo-structure/docs/README.md +62 -0
  87. package/src/repo-structure/docs/api/README.md +43 -0
  88. package/src/repo-structure/docs/architecture/README.md +36 -0
  89. package/src/repo-structure/docs/architecture/adr/README.md +53 -0
  90. package/src/repo-structure/docs/architecture/diagrams/README.md +59 -0
  91. package/src/repo-structure/docs/coding-standards/README.md +52 -0
  92. package/src/repo-structure/docs/confluence/README.md +43 -0
  93. package/src/repo-structure/docs/requirements/README.md +28 -0
  94. package/src/repo-structure/docs/sprint-artifacts/README.md +76 -0
  95. package/src/repo-structure/docs/sprint-artifacts/backlog/README.md +24 -0
@@ -0,0 +1,86 @@
1
+ # Requirements Validation Checklist
2
+
3
+ Use this checklist to validate requirements before proceeding to PRD creation.
4
+
5
+ ## Completeness Check
6
+
7
+ ### Functional Requirements
8
+ - [ ] All major user workflows covered
9
+ - [ ] Each FR has unique identifier (FR-XXX)
10
+ - [ ] Each FR has priority assigned (P0/P1/P2)
11
+ - [ ] Each FR has scope assigned (MVP/Growth/Vision)
12
+ - [ ] No duplicate requirements
13
+
14
+ ### Non-Functional Requirements
15
+ - [ ] Performance requirements defined with measurable targets
16
+ - [ ] Security requirements identified
17
+ - [ ] Scalability targets specified
18
+ - [ ] Reliability/availability targets set
19
+ - [ ] Compliance requirements listed (if applicable)
20
+
21
+ ### Coverage
22
+ - [ ] All stakeholder needs addressed
23
+ - [ ] All user personas have requirements
24
+ - [ ] Edge cases and error scenarios considered
25
+ - [ ] Integration points identified
26
+
27
+ ## SMART Criteria (Each FR must pass)
28
+
29
+ ### Specific
30
+ - [ ] Requirement is clear and unambiguous
31
+ - [ ] No vague terms like "fast", "user-friendly", "easy"
32
+ - [ ] Scope is well-defined
33
+
34
+ ### Measurable
35
+ - [ ] Has quantifiable acceptance criteria
36
+ - [ ] Can be tested/verified
37
+ - [ ] Success conditions are clear
38
+
39
+ ### Attainable
40
+ - [ ] Technically feasible
41
+ - [ ] Within project constraints (time, budget, resources)
42
+ - [ ] Dependencies are available or planned
43
+
44
+ ### Relevant
45
+ - [ ] Aligns with business objectives
46
+ - [ ] Addresses user needs
47
+ - [ ] Supports project goals
48
+
49
+ ### Traceable
50
+ - [ ] Source is identified (stakeholder, research, etc.)
51
+ - [ ] Can be traced to user journey or business objective
52
+ - [ ] Will map to implementation artifacts
53
+
54
+ ## Quality Check
55
+
56
+ ### Consistency
57
+ - [ ] No conflicting requirements
58
+ - [ ] Terminology is consistent
59
+ - [ ] Priority levels are logical
60
+
61
+ ### Structure
62
+ - [ ] Requirements are properly categorized
63
+ - [ ] Naming convention followed
64
+ - [ ] Document structure is complete
65
+
66
+ ### Dependencies
67
+ - [ ] Dependencies between requirements identified
68
+ - [ ] No circular dependencies
69
+ - [ ] External dependencies documented
70
+
71
+ ## Validation Summary
72
+
73
+ | Category | Pass | Fail | Notes |
74
+ |----------|------|------|-------|
75
+ | Completeness | | | |
76
+ | SMART Criteria | | | |
77
+ | Quality | | | |
78
+
79
+ **Overall Status:** PASS / NEEDS REVISION
80
+
81
+ **Action Items:**
82
+ 1. [Item if any]
83
+ 2. [Item if any]
84
+
85
+ **Validated By:** {{user_name}}
86
+ **Date:** {{date}}
@@ -0,0 +1,137 @@
1
+ # Story Validation Checklist
2
+
3
+ Use this checklist to validate stories before marking them "ready-for-dev".
4
+
5
+ ## Story Structure
6
+
7
+ ### Required Sections
8
+ - [ ] Story ID and Epic reference
9
+ - [ ] Status clearly indicated
10
+ - [ ] Priority and Estimate assigned
11
+ - [ ] User Story format (As a... I want... So that...)
12
+ - [ ] Acceptance Criteria (Given/When/Then)
13
+ - [ ] Tasks/Subtasks defined
14
+ - [ ] Dev Notes section
15
+ - [ ] Definition of Done
16
+
17
+ ### Metadata
18
+ - [ ] Created date
19
+ - [ ] Last updated date
20
+
21
+ ## User Story Quality
22
+
23
+ ### Format
24
+ - [ ] Follows "As a [persona], I want [capability], So that [benefit]"
25
+ - [ ] Persona is valid (from PRD)
26
+ - [ ] Capability is specific and actionable
27
+ - [ ] Benefit is clear and valuable
28
+
29
+ ### Scope
30
+ - [ ] Story is right-sized (1-3 days of work)
31
+ - [ ] Not too large (split if needed)
32
+ - [ ] Not too small (merge if needed)
33
+ - [ ] Single focus - does one thing well
34
+
35
+ ## Acceptance Criteria Quality
36
+
37
+ ### Format
38
+ - [ ] Uses Given/When/Then format
39
+ - [ ] Each AC is independent
40
+ - [ ] Each AC is testable
41
+
42
+ ### Coverage
43
+ - [ ] Happy path covered
44
+ - [ ] Error scenarios covered
45
+ - [ ] Edge cases considered
46
+ - [ ] Validation rules clear
47
+
48
+ ### Testability
49
+ - [ ] Can write automated test for each AC
50
+ - [ ] Expected outcomes are specific
51
+ - [ ] No ambiguous terms
52
+
53
+ ## Tasks/Subtasks Quality
54
+
55
+ ### Structure
56
+ - [ ] Tasks are in logical order
57
+ - [ ] Each task is atomic (single action)
58
+ - [ ] Subtasks break down complex tasks
59
+ - [ ] Red-green-refactor cycle applicable
60
+
61
+ ### Completeness
62
+ - [ ] Implementation tasks present
63
+ - [ ] Test writing tasks present
64
+ - [ ] Documentation tasks (if needed)
65
+ - [ ] Integration tasks (if needed)
66
+
67
+ ### Clarity
68
+ - [ ] Each task is actionable
69
+ - [ ] File paths indicated where relevant
70
+ - [ ] Dependencies between tasks clear
71
+
72
+ ## Dev Notes Quality
73
+
74
+ ### Context Provided
75
+ - [ ] Architecture requirements noted
76
+ - [ ] Related files/modules listed
77
+ - [ ] Patterns to follow specified
78
+ - [ ] Previous learnings documented
79
+
80
+ ### Technical Guidance
81
+ - [ ] API/Interface definitions clear
82
+ - [ ] Data model considerations noted
83
+ - [ ] Integration points identified
84
+ - [ ] Test scenarios suggested
85
+
86
+ ## Traceability
87
+
88
+ ### Backward Tracing
89
+ - [ ] Maps to Epic
90
+ - [ ] Maps to FR(s) from PRD
91
+ - [ ] Maps to user journey
92
+
93
+ ### Forward Tracing
94
+ - [ ] Can map to implementation files
95
+ - [ ] Can map to test files
96
+
97
+ ## Definition of Done
98
+
99
+ ### Standard DoD Items
100
+ - [ ] All AC implemented and verified
101
+ - [ ] All tasks/subtasks complete
102
+ - [ ] Unit tests written and passing
103
+ - [ ] Integration tests (if required)
104
+ - [ ] Code follows CLAUDE.md patterns
105
+ - [ ] Code reviewed
106
+ - [ ] No linting errors
107
+ - [ ] Documentation updated
108
+ - [ ] PR merged
109
+
110
+ ## Dependencies
111
+
112
+ - [ ] Dependencies on other stories identified
113
+ - [ ] External dependencies noted
114
+ - [ ] Blockers documented (if any)
115
+
116
+ ## Validation Summary
117
+
118
+ | Category | Pass | Fail | Notes |
119
+ |----------|------|------|-------|
120
+ | Story Structure | | | |
121
+ | User Story Quality | | | |
122
+ | AC Quality | | | |
123
+ | Tasks Quality | | | |
124
+ | Dev Notes | | | |
125
+ | Traceability | | | |
126
+ | DoD | | | |
127
+
128
+ **Status:** READY-FOR-DEV / NEEDS REVISION
129
+
130
+ **Issues Found:**
131
+ 1. [Issue if any]
132
+ 2. [Issue if any]
133
+
134
+ **Ready for Dev:** YES / NO
135
+
136
+ **Validated By:** {{user_name}}
137
+ **Date:** {{date}}
@@ -0,0 +1,68 @@
1
+ ---
2
+ description: Create or update the Architecture document
3
+ agent: architect
4
+ model: anthropic/claude-sonnet-4-20250514
5
+ ---
6
+
7
+ # Architecture Creation/Update
8
+
9
+ ## Arguments
10
+ $ARGUMENTS
11
+
12
+ - `create` or empty: Create new architecture
13
+ - `edit`: Edit existing architecture
14
+
15
+ ## Prerequisites
16
+
17
+ **Required:**
18
+ - @docs/prd.md - Must exist and be validated
19
+
20
+ **Reference:**
21
+ - @CLAUDE.md - Coding standards (CRITICAL)
22
+
23
+ **Check:**
24
+ !`ls -la docs/prd.md 2>/dev/null && echo "PRD EXISTS" || echo "PRD MISSING - Run /prd first"`
25
+
26
+ ## Task
27
+
28
+ **Create Mode:**
29
+ 1. Load skill: `architecture-design`
30
+ 2. Analyze PRD requirements
31
+ 3. Review existing codebase patterns (CLAUDE.md)
32
+ 4. Design:
33
+ - Module/service boundaries
34
+ - Data ownership
35
+ - Integration patterns
36
+ 5. Load skill: `adr-writing` for decisions
37
+ 6. Ensure NFR compliance
38
+ 7. Save to `docs/architecture.md`
39
+
40
+ **Edit Mode:**
41
+ 1. Load existing @docs/architecture.md
42
+ 2. Identify change trigger (new requirement? issue?)
43
+ 3. Make targeted updates
44
+ 4. Update affected ADRs
45
+ 5. Check for ripple effects
46
+ 6. Save updated architecture
47
+
48
+ ## Alignment Checks
49
+
50
+ - Follows hexagonal architecture (CLAUDE.md)
51
+ - Matches existing code structure
52
+ - NFRs have architectural support
53
+
54
+ ## Output
55
+
56
+ - Architecture: `docs/architecture.md`
57
+ - ADRs: `docs/architecture/adr/`
58
+
59
+ ## QA Reminder
60
+
61
+ After architecture is complete, create QA artifact:
62
+ `docs/architecture-integration-tests.md`
63
+
64
+ Use template: `@.opencode/templates/integration-tests-template.md`
65
+
66
+ ## Next Step
67
+
68
+ After completion, suggest: `/validate architecture`
@@ -0,0 +1,146 @@
1
+ ---
2
+ description: Archive outdated documents while preserving history
3
+ agent: archivist
4
+ ---
5
+
6
+ # Archive Command
7
+
8
+ ## Arguments
9
+ $ARGUMENTS
10
+
11
+ Format: `[action] [path]`
12
+
13
+ **Actions:**
14
+ - "move [path]" - Archive a specific document
15
+ - "sprint [sprint-N]" - Archive completed sprint
16
+ - "list" - Show archive contents
17
+ - "find [query]" - Search archive
18
+
19
+ **Examples:**
20
+ - `/archive move docs/research/technical/old-topic.md`
21
+ - `/archive sprint sprint-0`
22
+ - `/archive list`
23
+ - `/archive find authentication`
24
+
25
+ ## Archive Policy
26
+
27
+ **CRITICAL RULES:**
28
+ 1. Documents are NEVER deleted, only archived
29
+ 2. Every archived doc gets metadata (date, reason, superseded_by)
30
+ 3. References to archived docs must be updated
31
+ 4. Archive index must be updated
32
+
33
+ ## Current Archive State
34
+
35
+ !`tree docs/archive/ 2>/dev/null || echo "Archive empty"`
36
+
37
+ ## Your Task
38
+
39
+ ### Archive Document (move)
40
+
41
+ 1. **Verify document exists**:
42
+ !`ls -la $1`
43
+
44
+ 2. **Ask for archive reason**:
45
+ - Superseded by new version?
46
+ - No longer relevant?
47
+ - Merged into another doc?
48
+
49
+ 3. **Add archive metadata** to document:
50
+ ```markdown
51
+ ---
52
+ archived: true
53
+ archived_date: YYYY-MM-DD
54
+ archived_reason: "[reason]"
55
+ superseded_by: "[path]" # if applicable
56
+ original_path: "[original path]"
57
+ ---
58
+
59
+ # [Title] (ARCHIVED)
60
+
61
+ > **ARCHIVED:** This document was archived on YYYY-MM-DD.
62
+ > **Reason:** [reason]
63
+ > **Current Version:** [link] (if superseded)
64
+ ```
65
+
66
+ 4. **Determine archive path**:
67
+ - `docs/research/x.md` → `docs/archive/research/x-YYYY-MM-DD.md`
68
+ - `docs/prd.md` → `docs/archive/prd/prd-vX.Y-YYYY-MM-DD.md`
69
+ - `docs/architecture.md` → `docs/archive/architecture/architecture-vX.Y-YYYY-MM-DD.md`
70
+
71
+ 5. **Move document**:
72
+ ```bash
73
+ mkdir -p docs/archive/[type]/
74
+ mv [source] docs/archive/[type]/[name]-YYYY-MM-DD.md
75
+ ```
76
+
77
+ 6. **Update references**:
78
+ - Find docs that link to archived doc
79
+ - Update links or add "archived" notes
80
+
81
+ 7. **Update archive index**:
82
+ - Add entry to `docs/archive/README.md`
83
+
84
+ ### Archive Sprint
85
+
86
+ 1. **Verify sprint is complete**:
87
+ - All stories done
88
+ - Retrospective completed
89
+
90
+ 2. **Move entire sprint folder**:
91
+ ```bash
92
+ mv docs/sprint-artifacts/sprint-N docs/archive/sprint-artifacts/sprint-N
93
+ ```
94
+
95
+ 3. **Update sprint-status.yaml**:
96
+ - Mark sprint as archived
97
+ - Remove from active sprints
98
+
99
+ 4. **Update archive index**
100
+
101
+ ### List Archive
102
+
103
+ Show contents organized by:
104
+ - Type (research, prd, architecture, etc.)
105
+ - Date (most recent first)
106
+ - Status
107
+
108
+ ### Find in Archive
109
+
110
+ Search archive by:
111
+ - Document name
112
+ - Content keywords
113
+ - Date range
114
+
115
+ ## Archive Structure
116
+
117
+ ```
118
+ docs/archive/
119
+ ├── README.md # Archive index
120
+ ├── research/
121
+ │ └── [topic]-YYYY-MM-DD.md
122
+ ├── prd/
123
+ │ └── prd-vX.Y-YYYY-MM-DD.md
124
+ ├── architecture/
125
+ │ └── architecture-vX.Y-YYYY-MM-DD.md
126
+ ├── modules/
127
+ │ └── [module]/
128
+ ├── coding-standards/
129
+ │ └── [file]-YYYY-MM-DD.md
130
+ └── sprint-artifacts/
131
+ └── sprint-N/
132
+ ```
133
+
134
+ ## Validation
135
+
136
+ Before archiving:
137
+ - [ ] Archive reason documented
138
+ - [ ] Superseding doc exists (if applicable)
139
+ - [ ] Archive metadata added
140
+ - [ ] Target archive path correct
141
+
142
+ After archiving:
143
+ - [ ] Document moved successfully
144
+ - [ ] References updated
145
+ - [ ] Archive index updated
146
+ - [ ] No broken links
@@ -0,0 +1,169 @@
1
+ ---
2
+ description: Manage change proposals for modifying existing documentation
3
+ agent: change-manager
4
+ ---
5
+
6
+ # Change Management
7
+
8
+ ## Arguments
9
+ $ARGUMENTS
10
+
11
+ **Actions:**
12
+ - `new [name]` - Create new change proposal
13
+ - `delta [change] [doc]` - Create delta for a document
14
+ - `list` - List active change proposals
15
+ - `show [name]` - Show change details
16
+ - `review [name]` - Review for conflicts
17
+ - `approve [name]` - Approve change
18
+ - `reject [name] [reason]` - Reject change
19
+ - `merge [name]` - Apply and archive
20
+
21
+ ## When to Use Change Proposals
22
+
23
+ Use `/change` instead of direct edits when:
24
+ - Changing > 10 lines
25
+ - Affecting > 1 section
26
+ - Changing multiple documents
27
+ - Need stakeholder review
28
+ - Want rollback capability
29
+
30
+ For small edits, use direct commands like `/prd edit`.
31
+
32
+ ## Check Current Changes
33
+
34
+ !`ls -la docs/changes/ 2>/dev/null || echo "No changes directory"`
35
+ !`cat docs/changes/README.md 2>/dev/null || echo "No active changes"`
36
+
37
+ ## Actions
38
+
39
+ ### new [name]
40
+
41
+ Create new change proposal:
42
+
43
+ 1. Create directory: `docs/changes/[name]/`
44
+ 2. Create `proposal.md` with template
45
+ 3. Ask user for:
46
+ - Summary
47
+ - Motivation
48
+ - Affected documents
49
+ 4. Update `docs/changes/README.md`
50
+
51
+ ### delta [change] [doc]
52
+
53
+ Create delta for specific document:
54
+
55
+ 1. Load current document
56
+ 2. Ask what to ADD, MODIFY, REMOVE
57
+ 3. Create `docs/changes/[change]/deltas/[doc]-delta.md`
58
+ 4. Update proposal.md with affected doc
59
+
60
+ ### list
61
+
62
+ Show all active change proposals with status.
63
+
64
+ ### show [name]
65
+
66
+ Display:
67
+ - Proposal summary
68
+ - All deltas
69
+ - Affected documents
70
+ - Current status
71
+
72
+ ### review [name]
73
+
74
+ Check for:
75
+ 1. **Parallel Changes** - Other proposals affecting same docs?
76
+ 2. **Stale Deltas** - Source docs changed since delta created?
77
+ 3. **Missing Deltas** - All affected docs have deltas?
78
+ 4. **Conflicts** - Any conflicting changes?
79
+
80
+ Output review report with PASS/WARN/FAIL.
81
+
82
+ ### approve [name]
83
+
84
+ 1. Verify review passed
85
+ 2. Change status to "Approved"
86
+ 3. Update proposal.md
87
+ 4. Notify ready for merge
88
+
89
+ ### reject [name] [reason]
90
+
91
+ 1. Change status to "Rejected"
92
+ 2. Add rejection reason
93
+ 3. Move to `docs/archive/changes/`
94
+
95
+ ### merge [name]
96
+
97
+ 1. Verify status is "Approved"
98
+ 2. For each delta:
99
+ - Backup current document
100
+ - Apply changes
101
+ - Update version
102
+ 3. Update `docs/document-status.yaml`
103
+ 4. Archive change to `docs/archive/changes/`
104
+ 5. Update `docs/changes/README.md`
105
+
106
+ ## Directory Structure
107
+
108
+ ```
109
+ docs/changes/
110
+ ├── README.md # Active changes index
111
+ ├── add-oauth/
112
+ │ ├── proposal.md
113
+ │ ├── tasks.md
114
+ │ └── deltas/
115
+ │ ├── requirements-delta.md
116
+ │ ├── prd-delta.md
117
+ │ └── architecture-delta.md
118
+ └── refactor-auth/
119
+ ├── proposal.md
120
+ └── deltas/
121
+ └── architecture-delta.md
122
+ ```
123
+
124
+ ## Delta Format
125
+
126
+ ```markdown
127
+ # Delta: PRD
128
+
129
+ **Target:** docs/prd.md
130
+ **Change:** add-oauth
131
+
132
+ ---
133
+
134
+ ## ADDED
135
+
136
+ ### OAuth2 Authentication
137
+
138
+ New requirement for OAuth2 support with Google and GitHub providers.
139
+
140
+ ---
141
+
142
+ ## MODIFIED
143
+
144
+ ### Authentication Section
145
+
146
+ **Before:**
147
+ Users authenticate via email/password only.
148
+
149
+ **After:**
150
+ Users authenticate via email/password or OAuth2 (Google, GitHub).
151
+
152
+ **Rationale:**
153
+ User research shows 60% prefer social login.
154
+
155
+ ---
156
+
157
+ ## REMOVED
158
+
159
+ (none)
160
+ ```
161
+
162
+ ## Validation
163
+
164
+ Before merge:
165
+ - [ ] All affected docs have deltas
166
+ - [ ] No conflicting changes
167
+ - [ ] Deltas not stale
168
+ - [ ] Review completed
169
+ - [ ] Approval granted