codex-genesis-harness 0.1.5 → 0.1.6
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/.codebase/ARCHITECTURE_REVIEW_COMPLETE.md +216 -216
- package/.codebase/CURRENT_STATE.md +7 -2
- package/.codebase/FILE_NAMING_CLARIFICATION.md +161 -161
- package/.codebase/HARNESS_COMPLETENESS_AUDIT.md +613 -613
- package/.codebase/IMPLEMENTATION_COMPLETE.md +429 -429
- package/.codebase/IMPLEMENTATION_HANDOFF.md +351 -351
- package/.codebase/IMPROVEMENTS_SUMMARY.md +419 -419
- package/.codebase/PHASE3_SKILLS_NAMING_COMPLETE.md +292 -292
- package/.codebase/PHASE_DEPENDENCY_MAP.md +486 -486
- package/.codebase/QUICK_START_SPEC_IMPACT.md +456 -456
- package/.codebase/README.md +139 -139
- package/.codebase/RECOVERY_POINTS.md +438 -438
- package/.codex/skills/genesis-api-sync/SKILL.md +354 -354
- package/.codex/skills/genesis-api-sync/checklists/api-sync-checklist.md +101 -101
- package/.codex/skills/genesis-api-sync/templates/api-change-template.md +257 -257
- package/.codex/skills/genesis-debug-guide/SKILL.md +479 -479
- package/.codex/skills/genesis-debug-guide/checklists/flaky-test-investigation.md +339 -339
- package/.codex/skills/genesis-debug-guide/checklists/production-bug-debug.md +210 -210
- package/.codex/skills/genesis-debug-guide/checklists/test-failure-debug.md +158 -158
- package/.codex/skills/genesis-debug-guide/observability/debug-commands.md +365 -365
- package/.codex/skills/genesis-debug-guide/playbooks/unit-test-failures.md +289 -289
- package/.codex/skills/genesis-debug-guide/templates/debug-investigation-log.md +288 -288
- package/.codex/skills/genesis-docs-automation/SKILL.md +1003 -1003
- package/.codex/skills/genesis-docs-automation/checklists/docs-validation.md +359 -359
- package/.codex/skills/genesis-docs-automation/checklists/spec-alignment.md +312 -312
- package/.codex/skills/genesis-docs-automation/observability/docs-tracking.md +382 -382
- package/.codex/skills/genesis-docs-automation/playbooks/auto-update-flow.md +851 -851
- package/.codex/skills/genesis-docs-automation/playbooks/changelog-generation.md +491 -491
- package/.codex/skills/genesis-docs-automation/templates/changelog-entry-template.md +187 -187
- package/.codex/skills/genesis-docs-automation/templates/handoff-template.md +297 -297
- package/.codex/skills/genesis-harness/SKILL.md +1427 -1427
- package/.codex/skills/genesis-harness/agents/openai.yaml +7 -7
- package/.codex/skills/genesis-harness/checklists/bug-fix-qa.md +169 -169
- package/.codex/skills/genesis-harness/checklists/new-feature-qa.md +157 -157
- package/.codex/skills/genesis-harness/checklists/refactor-qa.md +216 -216
- package/.codex/skills/genesis-harness/checklists/requirements-validation.md +211 -211
- package/.codex/skills/genesis-harness/references/planning-schema.md +35 -35
- package/.codex/skills/genesis-harness/references/quality-rubric.md +21 -21
- package/.codex/skills/genesis-harness/references/research-rubric.md +41 -41
- package/.codex/skills/genesis-harness/references/workflows.md +33 -33
- package/.codex/skills/genesis-harness/resources/agents-template.md +27 -27
- package/.codex/skills/genesis-harness/resources/api-docs-template.md +32 -32
- package/.codex/skills/genesis-harness/resources/architecture-template.md +30 -30
- package/.codex/skills/genesis-harness/resources/audit-template.md +26 -26
- package/.codex/skills/genesis-harness/resources/bug-template.md +34 -34
- package/.codex/skills/genesis-harness/resources/change-impact-matrix-template.md +204 -204
- package/.codex/skills/genesis-harness/resources/check-template.md +21 -21
- package/.codex/skills/genesis-harness/resources/conventions-template.md +42 -42
- package/.codex/skills/genesis-harness/resources/decision-template.md +33 -33
- package/.codex/skills/genesis-harness/resources/design-template.md +26 -26
- package/.codex/skills/genesis-harness/resources/escalation-template.md +21 -21
- package/.codex/skills/genesis-harness/resources/feature-template.md +49 -49
- package/.codex/skills/genesis-harness/resources/foundation-phase-template.md +131 -131
- package/.codex/skills/genesis-harness/resources/integrations-template.md +32 -32
- package/.codex/skills/genesis-harness/resources/journeys-template.md +13 -13
- package/.codex/skills/genesis-harness/resources/lessons-learned-template.md +12 -12
- package/.codex/skills/genesis-harness/resources/observability-template.md +34 -34
- package/.codex/skills/genesis-harness/resources/phase-00-foundation-template.md +76 -76
- package/.codex/skills/genesis-harness/resources/phase-template.md +34 -34
- package/.codex/skills/genesis-harness/resources/pitfalls-template.md +22 -22
- package/.codex/skills/genesis-harness/resources/planning-tree-template.md +39 -39
- package/.codex/skills/genesis-harness/resources/post-implementation-guide.md +347 -347
- package/.codex/skills/genesis-harness/resources/project-template.md +38 -38
- package/.codex/skills/genesis-harness/resources/quality-score-template.md +11 -11
- package/.codex/skills/genesis-harness/resources/requirements-template.md +26 -26
- package/.codex/skills/genesis-harness/resources/research-template.md +26 -26
- package/.codex/skills/genesis-harness/resources/review-template.md +22 -22
- package/.codex/skills/genesis-harness/resources/spec-changelog-template.md +6 -6
- package/.codex/skills/genesis-harness/resources/stack-template.md +33 -33
- package/.codex/skills/genesis-harness/resources/verification-template.md +26 -26
- package/.codex/skills/genesis-harness/scripts/check-architecture-boundaries.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/check-docs-sync.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/check-no-debug-logs.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/check-required-planning-files.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/check-spec-changelog.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/check-task-tracking.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/compact-context.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/create-adr.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/create-bug.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/create-feature.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/detect-stack.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/init-planning.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/list-changed-files.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/offload-log.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/run-verification.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/run-verify-loop.sh +0 -0
- package/.codex/skills/genesis-harness/scripts/update-state.sh +0 -0
- package/.codex/skills/genesis-mvp-planning/SKILL.md +114 -0
- package/.codex/skills/genesis-mvp-planning/agents/openai.yaml +6 -0
- package/.codex/skills/genesis-mvp-planning/checklists/mvp-readiness.md +18 -0
- package/.codex/skills/genesis-mvp-planning/examples/5-phase-roadmap-example.md +43 -0
- package/.codex/skills/genesis-mvp-planning/templates/phase-1-core.md +17 -0
- package/.codex/skills/genesis-mvp-planning/templates/phase-2-auth.md +17 -0
- package/.codex/skills/genesis-mvp-planning/templates/phase-3-features.md +17 -0
- package/.codex/skills/genesis-mvp-planning/templates/phase-4-integrations.md +17 -0
- package/.codex/skills/genesis-mvp-planning/templates/phase-5-readiness.md +17 -0
- package/.codex/skills/genesis-new-design/agents/openai.yaml +3 -3
- package/.codex/skills/genesis-observability-automation/checklists/.gitkeep +0 -0
- package/.codex/skills/genesis-observability-automation/observability/.gitkeep +0 -0
- package/.codex/skills/genesis-observability-automation/playbooks/.gitkeep +0 -0
- package/.codex/skills/genesis-observability-automation/templates/.gitkeep +0 -0
- package/.codex/skills/genesis-release-orchestration/SKILL.md +653 -653
- package/.codex/skills/genesis-release-orchestration/checklists/post-deployment-verification.md +274 -274
- package/.codex/skills/genesis-release-orchestration/checklists/pre-release-validation.md +220 -220
- package/.codex/skills/genesis-release-orchestration/observability/release-tracking.md +253 -253
- package/.codex/skills/genesis-release-orchestration/playbooks/canary-deployment-orchestration.md +472 -472
- package/.codex/skills/genesis-release-orchestration/playbooks/semantic-versioning-automation.md +494 -494
- package/.codex/skills/genesis-release-orchestration/templates/deployment-strategy-template.md +303 -303
- package/.codex/skills/genesis-release-orchestration/templates/release-runbook-template.md +420 -420
- package/.codex/skills/genesis-research-first/SKILL.md +237 -237
- package/.codex/skills/genesis-research-first/templates/.gitkeep +0 -0
- package/.codex/skills/genesis-spec-propagation/SKILL.md +534 -534
- package/.codex/skills/genesis-spec-propagation/checklists/phase-update-verification.md +384 -384
- package/.codex/skills/genesis-spec-propagation/checklists/spec-change-detection.md +257 -257
- package/.codex/skills/genesis-spec-propagation/observability/propagation-tracking.md +373 -373
- package/.codex/skills/genesis-spec-propagation/playbooks/breaking-change-propagation.md +692 -692
- package/.codex/skills/genesis-spec-propagation/playbooks/feature-change-propagation.md +434 -434
- package/.codex/skills/genesis-spec-propagation/templates/migration-guide-template.md +407 -407
- package/.codex/skills/genesis-upgrade-design/agents/openai.yaml +3 -3
- package/.codex/skills/spec-impact-engine/SKILL.md +504 -504
- package/.codex/skills/spec-impact-engine/detect-spec-changes.sh +0 -0
- package/.codex-plugin/plugin.json +19 -19
- package/CHANGELOG.md +42 -0
- package/LICENSE +22 -22
- package/README.EN.md +784 -730
- package/README.VI.md +776 -723
- package/README.md +102 -247
- package/VERSION +2 -2
- package/bin/genesis-harness.js +90 -87
- package/package.json +9 -3
- package/scripts/README.md +342 -342
- package/scripts/compact-context.sh +0 -0
- package/scripts/contract_integrity_gate.js +83 -0
- package/scripts/detect-changes.sh +0 -0
- package/scripts/healing_telemetry.js +118 -0
- package/scripts/install.sh +4 -1
- package/scripts/offload-log.sh +0 -0
- package/scripts/prompt_sentinel.js +84 -0
- package/scripts/run-evals.sh +1 -0
- package/scripts/run-verify-loop.sh +11 -0
- package/scripts/spec_visual_sync.js +157 -0
- package/scripts/test_generator.js +142 -0
- package/scripts/transition_state.sh +0 -0
- package/scripts/uninstall.sh +1 -0
- package/scripts/validation_gates.sh +40 -1
- package/scripts/verify.sh +5 -0
- package/tests/unit/contract_integrity_gate.test.js +74 -0
- package/tests/unit/healing_telemetry.test.js +58 -0
- package/tests/unit/prompt_sentinel.test.js +50 -0
- package/tests/unit/spec_visual_sync.test.js +77 -0
- package/tests/unit/test_generator.test.js +62 -0
|
@@ -1,257 +1,257 @@
|
|
|
1
|
-
# Spec Change Detection Checklist
|
|
2
|
-
|
|
3
|
-
## Pre-Propagation Verification
|
|
4
|
-
|
|
5
|
-
Verify before starting automatic propagation.
|
|
6
|
-
|
|
7
|
-
### 1. Change Documentation ✓
|
|
8
|
-
|
|
9
|
-
- [ ] Change is well-documented (why changed, impact)
|
|
10
|
-
- [ ] Old spec vs new spec available for comparison
|
|
11
|
-
- [ ] Change type identified (breaking/feature/non-impact)
|
|
12
|
-
- [ ] SPEC_CHANGELOG.md entry created (if not, auto-append)
|
|
13
|
-
|
|
14
|
-
### 2. Change Validity
|
|
15
|
-
|
|
16
|
-
- [ ] Change is intentional (not a mistake)
|
|
17
|
-
- [ ] Change doesn't introduce new technical debt
|
|
18
|
-
- [ ] Change is aligned with project architecture
|
|
19
|
-
- [ ] Change doesn't violate any contracts or constraints
|
|
20
|
-
|
|
21
|
-
**If any "No"**: STOP propagation, review change with team before continuing.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## Change Type Classification
|
|
26
|
-
|
|
27
|
-
Classify the change before propagation determines update strategy.
|
|
28
|
-
|
|
29
|
-
### BREAKING CHANGE
|
|
30
|
-
|
|
31
|
-
**Indicators**:
|
|
32
|
-
- ❌ Removed field from API response
|
|
33
|
-
- ❌ Changed field type (number → string, optional → required)
|
|
34
|
-
- ❌ Removed database column
|
|
35
|
-
- ❌ Changed endpoint URL or method
|
|
36
|
-
- ❌ Changed validation rule (stricter or behavioral change)
|
|
37
|
-
- ❌ Renamed field
|
|
38
|
-
|
|
39
|
-
**Examples**:
|
|
40
|
-
```diff
|
|
41
|
-
- { "userId": 123 } → { "id": 123 } // Renamed field
|
|
42
|
-
- { "status": "active" } → { "status": 1 } // Type changed
|
|
43
|
-
+ { "email": "required" } // Made required when optional
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
**Propagation Complexity**: HIGH (manual review recommended)
|
|
47
|
-
**Downstream Impact**: Major (all phases affected)
|
|
48
|
-
**Time to Update**: 2-4 hours (includes design decisions)
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
### FEATURE CHANGE
|
|
53
|
-
|
|
54
|
-
**Indicators**:
|
|
55
|
-
- ✅ Added new optional field to API response
|
|
56
|
-
- ✅ Added new optional parameter to function
|
|
57
|
-
- ✅ Added new endpoint or operation
|
|
58
|
-
- ✅ Added new validation (optional field)
|
|
59
|
-
- ✅ Extended enum with new value
|
|
60
|
-
- ✅ Made field optional (was required)
|
|
61
|
-
|
|
62
|
-
**Examples**:
|
|
63
|
-
```diff
|
|
64
|
-
+ { "avatarUrl": "https://..." } // New optional field
|
|
65
|
-
+ { "tags": [] } // New optional array
|
|
66
|
-
+ POST /api/users/export // New endpoint
|
|
67
|
-
+ "status" in ["active", "inactive", "archived"] // Extended enum
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
**Propagation Complexity**: MEDIUM (mostly automatic)
|
|
71
|
-
**Downstream Impact**: Moderate (Phase 2, 3, 5 affected)
|
|
72
|
-
**Time to Update**: 30-60 minutes
|
|
73
|
-
|
|
74
|
-
---
|
|
75
|
-
|
|
76
|
-
### NON-IMPACT CHANGE
|
|
77
|
-
|
|
78
|
-
**Indicators**:
|
|
79
|
-
- 📝 Updated description/documentation
|
|
80
|
-
- 📝 Updated example values
|
|
81
|
-
- 📝 Formatting/styling change
|
|
82
|
-
- 📝 Reordered fields (same data)
|
|
83
|
-
- 📝 Updated comment (code, not logic)
|
|
84
|
-
|
|
85
|
-
**Examples**:
|
|
86
|
-
```diff
|
|
87
|
-
- "description": "User name" → "description": "Full name of user"
|
|
88
|
-
- { "id": 1, "name": "John" } → { "name": "John", "id": 1 } // Reordered
|
|
89
|
-
- 200 → 200 // Same HTTP status, just reformatted
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
**Propagation Complexity**: LOW (minimal updates)
|
|
93
|
-
**Downstream Impact**: Minimal (maybe Phase 2 only for docs)
|
|
94
|
-
**Time to Update**: 5-10 minutes
|
|
95
|
-
|
|
96
|
-
---
|
|
97
|
-
|
|
98
|
-
## Affected Phase Detection Checklist
|
|
99
|
-
|
|
100
|
-
Verify the right phases are identified as affected.
|
|
101
|
-
|
|
102
|
-
### Phase 2: Tests
|
|
103
|
-
- [ ] Test mocks need updating? (breaking/feature)
|
|
104
|
-
- [ ] Test data needs updating? (breaking/feature)
|
|
105
|
-
- [ ] Test assertions need updating? (breaking)
|
|
106
|
-
- [ ] Affected test file identified?
|
|
107
|
-
|
|
108
|
-
### Phase 3: Backend Implementation
|
|
109
|
-
- [ ] API contract changes? (all types)
|
|
110
|
-
- [ ] Response builder affected? (breaking/feature)
|
|
111
|
-
- [ ] Request validation affected? (breaking)
|
|
112
|
-
- [ ] Database schema affected? (breaking - migration needed)
|
|
113
|
-
- [ ] Handler docstring needs update? (breaking)
|
|
114
|
-
|
|
115
|
-
### Phase 4: Client SDK
|
|
116
|
-
- [ ] Client method signatures affected? (breaking)
|
|
117
|
-
- [ ] Type definitions need update? (breaking/feature)
|
|
118
|
-
- [ ] Serialization logic affected? (breaking)
|
|
119
|
-
- [ ] Deprecation warnings needed? (breaking)
|
|
120
|
-
|
|
121
|
-
### Phase 5: E2E Tests
|
|
122
|
-
- [ ] E2E scenarios need new test cases? (feature)
|
|
123
|
-
- [ ] E2E assertions need updating? (breaking)
|
|
124
|
-
- [ ] E2E data needs updating? (breaking/feature)
|
|
125
|
-
- [ ] New scenarios for new fields? (feature)
|
|
126
|
-
|
|
127
|
-
**Validation**: At least Phase 2 OR Phase 3 should be "Yes" for any change.
|
|
128
|
-
|
|
129
|
-
---
|
|
130
|
-
|
|
131
|
-
## Dependency Path Verification
|
|
132
|
-
|
|
133
|
-
Confirm propagation order is correct (topological sort).
|
|
134
|
-
|
|
135
|
-
### Valid Propagation Order
|
|
136
|
-
|
|
137
|
-
1. **Phase 1**: Original spec change ✅
|
|
138
|
-
2. **Phase 2**: Tests updated (independent of implementation)
|
|
139
|
-
3. **Phase 3**: Backend implementation aligned with updated tests
|
|
140
|
-
4. **Phase 4**: Client SDK updated to match Phase 3 API
|
|
141
|
-
5. **Phase 5**: E2E tests updated to use Phase 4 SDK + Phase 3 API
|
|
142
|
-
|
|
143
|
-
### Order Validation Checklist
|
|
144
|
-
|
|
145
|
-
- [ ] Phase 2 updates don't depend on Phase 3 changes (true for mocks)
|
|
146
|
-
- [ ] Phase 3 updates use Phase 2 tests as reference
|
|
147
|
-
- [ ] Phase 4 updates don't precede Phase 3 (SDK depends on API)
|
|
148
|
-
- [ ] Phase 5 updates reference Phase 4 SDK + Phase 3 API
|
|
149
|
-
|
|
150
|
-
**If any violated**: Stop, reorder phases before propagation.
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## Manual Update Trigger
|
|
155
|
-
|
|
156
|
-
When should manual review override automatic updates?
|
|
157
|
-
|
|
158
|
-
### Require Manual Review If...
|
|
159
|
-
|
|
160
|
-
**CRITICAL TRIGGERS** (Stop propagation):
|
|
161
|
-
- [ ] Breaking change + no clear migration path
|
|
162
|
-
- [ ] Change affects 5+ files in Phase 3
|
|
163
|
-
- [ ] Database migration needed (breaking + data loss risk)
|
|
164
|
-
- [ ] API version bump needed (breaking)
|
|
165
|
-
- [ ] SDK deprecation policy violated
|
|
166
|
-
- [ ] Contract violates architectural constraint
|
|
167
|
-
|
|
168
|
-
**RECOMMENDED REVIEW** (Proceed with caution):
|
|
169
|
-
- [ ] Feature change affecting Phase 3 + Phase 4 together
|
|
170
|
-
- [ ] Type system needs re-design (e.g., union type)
|
|
171
|
-
- [ ] Performance implications (schema change, new indexes)
|
|
172
|
-
- [ ] Security implication (new validation, encryption)
|
|
173
|
-
|
|
174
|
-
**AUTOMATIC OK** (Can auto-propagate):
|
|
175
|
-
- [ ] Optional field addition (feature)
|
|
176
|
-
- [ ] Optional parameter addition (feature)
|
|
177
|
-
- [ ] New endpoint (feature)
|
|
178
|
-
- [ ] New enum value (feature)
|
|
179
|
-
- [ ] Documentation update (non-impact)
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
## Conflict Detection Checklist
|
|
184
|
-
|
|
185
|
-
Watch for conflicts during propagation.
|
|
186
|
-
|
|
187
|
-
### Potential Conflicts
|
|
188
|
-
|
|
189
|
-
**Phase 2 ↔ Phase 3**:
|
|
190
|
-
- [ ] Phase 2 mocks outdated when Phase 3 was implemented?
|
|
191
|
-
- [ ] Phase 3 handler not aligned with Phase 2 expectations?
|
|
192
|
-
|
|
193
|
-
**Phase 3 ↔ Phase 4**:
|
|
194
|
-
- [ ] Phase 4 SDK has workarounds for Phase 3 quirks?
|
|
195
|
-
- [ ] Backward compatibility code in Phase 4 would break?
|
|
196
|
-
|
|
197
|
-
**Phase 4 ↔ Phase 5**:
|
|
198
|
-
- [ ] Phase 5 tests rely on deprecated Phase 4 methods?
|
|
199
|
-
- [ ] Phase 5 hardcodes values from Phase 4 SDK?
|
|
200
|
-
|
|
201
|
-
**All Phases**:
|
|
202
|
-
- [ ] Any hardcoded values in tests/implementation?
|
|
203
|
-
- [ ] Any duplicate data definitions (brittleness)?
|
|
204
|
-
- [ ] Any circular dependencies?
|
|
205
|
-
|
|
206
|
-
**If conflicts found**: Document in CONFLICT_LOG.md, escalate for manual resolution.
|
|
207
|
-
|
|
208
|
-
---
|
|
209
|
-
|
|
210
|
-
## Post-Propagation Validation
|
|
211
|
-
|
|
212
|
-
After automatic updates, verify everything still works.
|
|
213
|
-
|
|
214
|
-
### Syntax Validation
|
|
215
|
-
|
|
216
|
-
- [ ] Phase 2 test files are valid JavaScript
|
|
217
|
-
- [ ] Phase 3 contract files are valid JSON
|
|
218
|
-
- [ ] Phase 4 type files are valid TypeScript
|
|
219
|
-
- [ ] Phase 5 scenario files are valid Markdown
|
|
220
|
-
|
|
221
|
-
### Semantic Validation
|
|
222
|
-
|
|
223
|
-
- [ ] Phase 2 tests make logical sense (not just syntactically valid)
|
|
224
|
-
- [ ] Phase 3 contract accurately describes new API
|
|
225
|
-
- [ ] Phase 4 types match Phase 3 contract structure
|
|
226
|
-
- [ ] Phase 5 scenarios reference Phase 4 SDK correctly
|
|
227
|
-
|
|
228
|
-
### Integration Testing
|
|
229
|
-
|
|
230
|
-
- [ ] Run Phase 2 tests: `npm test -- tests/`
|
|
231
|
-
- [ ] Run Phase 3 validation: `npm run validate:contracts`
|
|
232
|
-
- [ ] Run Phase 4 type check: `npm run tsc --noEmit`
|
|
233
|
-
- [ ] Run Phase 5 E2E: `npm run test:e2e` (subset)
|
|
234
|
-
|
|
235
|
-
### All Tests Green?
|
|
236
|
-
|
|
237
|
-
- [ ] Yes → Propagation successful ✅
|
|
238
|
-
- [ ] No → Identify failing tests, manual review needed ⚠️
|
|
239
|
-
|
|
240
|
-
---
|
|
241
|
-
|
|
242
|
-
## Migration Guide Checklist (BREAKING CHANGES ONLY)
|
|
243
|
-
|
|
244
|
-
For breaking changes, verify migration guide is complete.
|
|
245
|
-
|
|
246
|
-
- [ ] Migration guide file exists (e.g., `docs/migration-v2-to-v3.md`)
|
|
247
|
-
- [ ] "What changed" section complete
|
|
248
|
-
- [ ] "Why changed" section explains rationale
|
|
249
|
-
- [ ] "Impact" section lists affected consumers
|
|
250
|
-
- [ ] "Migration steps" are clear and step-by-step
|
|
251
|
-
- [ ] "Timeline" specified (deprecation period, cutoff date)
|
|
252
|
-
- [ ] "Rollback procedure" documented
|
|
253
|
-
- [ ] "Backward compatibility period" specified (if any)
|
|
254
|
-
- [ ] Examples of old vs new code provided
|
|
255
|
-
|
|
256
|
-
**If migration guide incomplete**: Block commit until complete.
|
|
257
|
-
|
|
1
|
+
# Spec Change Detection Checklist
|
|
2
|
+
|
|
3
|
+
## Pre-Propagation Verification
|
|
4
|
+
|
|
5
|
+
Verify before starting automatic propagation.
|
|
6
|
+
|
|
7
|
+
### 1. Change Documentation ✓
|
|
8
|
+
|
|
9
|
+
- [ ] Change is well-documented (why changed, impact)
|
|
10
|
+
- [ ] Old spec vs new spec available for comparison
|
|
11
|
+
- [ ] Change type identified (breaking/feature/non-impact)
|
|
12
|
+
- [ ] SPEC_CHANGELOG.md entry created (if not, auto-append)
|
|
13
|
+
|
|
14
|
+
### 2. Change Validity
|
|
15
|
+
|
|
16
|
+
- [ ] Change is intentional (not a mistake)
|
|
17
|
+
- [ ] Change doesn't introduce new technical debt
|
|
18
|
+
- [ ] Change is aligned with project architecture
|
|
19
|
+
- [ ] Change doesn't violate any contracts or constraints
|
|
20
|
+
|
|
21
|
+
**If any "No"**: STOP propagation, review change with team before continuing.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Change Type Classification
|
|
26
|
+
|
|
27
|
+
Classify the change before propagation determines update strategy.
|
|
28
|
+
|
|
29
|
+
### BREAKING CHANGE
|
|
30
|
+
|
|
31
|
+
**Indicators**:
|
|
32
|
+
- ❌ Removed field from API response
|
|
33
|
+
- ❌ Changed field type (number → string, optional → required)
|
|
34
|
+
- ❌ Removed database column
|
|
35
|
+
- ❌ Changed endpoint URL or method
|
|
36
|
+
- ❌ Changed validation rule (stricter or behavioral change)
|
|
37
|
+
- ❌ Renamed field
|
|
38
|
+
|
|
39
|
+
**Examples**:
|
|
40
|
+
```diff
|
|
41
|
+
- { "userId": 123 } → { "id": 123 } // Renamed field
|
|
42
|
+
- { "status": "active" } → { "status": 1 } // Type changed
|
|
43
|
+
+ { "email": "required" } // Made required when optional
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
**Propagation Complexity**: HIGH (manual review recommended)
|
|
47
|
+
**Downstream Impact**: Major (all phases affected)
|
|
48
|
+
**Time to Update**: 2-4 hours (includes design decisions)
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
### FEATURE CHANGE
|
|
53
|
+
|
|
54
|
+
**Indicators**:
|
|
55
|
+
- ✅ Added new optional field to API response
|
|
56
|
+
- ✅ Added new optional parameter to function
|
|
57
|
+
- ✅ Added new endpoint or operation
|
|
58
|
+
- ✅ Added new validation (optional field)
|
|
59
|
+
- ✅ Extended enum with new value
|
|
60
|
+
- ✅ Made field optional (was required)
|
|
61
|
+
|
|
62
|
+
**Examples**:
|
|
63
|
+
```diff
|
|
64
|
+
+ { "avatarUrl": "https://..." } // New optional field
|
|
65
|
+
+ { "tags": [] } // New optional array
|
|
66
|
+
+ POST /api/users/export // New endpoint
|
|
67
|
+
+ "status" in ["active", "inactive", "archived"] // Extended enum
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Propagation Complexity**: MEDIUM (mostly automatic)
|
|
71
|
+
**Downstream Impact**: Moderate (Phase 2, 3, 5 affected)
|
|
72
|
+
**Time to Update**: 30-60 minutes
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
### NON-IMPACT CHANGE
|
|
77
|
+
|
|
78
|
+
**Indicators**:
|
|
79
|
+
- 📝 Updated description/documentation
|
|
80
|
+
- 📝 Updated example values
|
|
81
|
+
- 📝 Formatting/styling change
|
|
82
|
+
- 📝 Reordered fields (same data)
|
|
83
|
+
- 📝 Updated comment (code, not logic)
|
|
84
|
+
|
|
85
|
+
**Examples**:
|
|
86
|
+
```diff
|
|
87
|
+
- "description": "User name" → "description": "Full name of user"
|
|
88
|
+
- { "id": 1, "name": "John" } → { "name": "John", "id": 1 } // Reordered
|
|
89
|
+
- 200 → 200 // Same HTTP status, just reformatted
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**Propagation Complexity**: LOW (minimal updates)
|
|
93
|
+
**Downstream Impact**: Minimal (maybe Phase 2 only for docs)
|
|
94
|
+
**Time to Update**: 5-10 minutes
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Affected Phase Detection Checklist
|
|
99
|
+
|
|
100
|
+
Verify the right phases are identified as affected.
|
|
101
|
+
|
|
102
|
+
### Phase 2: Tests
|
|
103
|
+
- [ ] Test mocks need updating? (breaking/feature)
|
|
104
|
+
- [ ] Test data needs updating? (breaking/feature)
|
|
105
|
+
- [ ] Test assertions need updating? (breaking)
|
|
106
|
+
- [ ] Affected test file identified?
|
|
107
|
+
|
|
108
|
+
### Phase 3: Backend Implementation
|
|
109
|
+
- [ ] API contract changes? (all types)
|
|
110
|
+
- [ ] Response builder affected? (breaking/feature)
|
|
111
|
+
- [ ] Request validation affected? (breaking)
|
|
112
|
+
- [ ] Database schema affected? (breaking - migration needed)
|
|
113
|
+
- [ ] Handler docstring needs update? (breaking)
|
|
114
|
+
|
|
115
|
+
### Phase 4: Client SDK
|
|
116
|
+
- [ ] Client method signatures affected? (breaking)
|
|
117
|
+
- [ ] Type definitions need update? (breaking/feature)
|
|
118
|
+
- [ ] Serialization logic affected? (breaking)
|
|
119
|
+
- [ ] Deprecation warnings needed? (breaking)
|
|
120
|
+
|
|
121
|
+
### Phase 5: E2E Tests
|
|
122
|
+
- [ ] E2E scenarios need new test cases? (feature)
|
|
123
|
+
- [ ] E2E assertions need updating? (breaking)
|
|
124
|
+
- [ ] E2E data needs updating? (breaking/feature)
|
|
125
|
+
- [ ] New scenarios for new fields? (feature)
|
|
126
|
+
|
|
127
|
+
**Validation**: At least Phase 2 OR Phase 3 should be "Yes" for any change.
|
|
128
|
+
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
## Dependency Path Verification
|
|
132
|
+
|
|
133
|
+
Confirm propagation order is correct (topological sort).
|
|
134
|
+
|
|
135
|
+
### Valid Propagation Order
|
|
136
|
+
|
|
137
|
+
1. **Phase 1**: Original spec change ✅
|
|
138
|
+
2. **Phase 2**: Tests updated (independent of implementation)
|
|
139
|
+
3. **Phase 3**: Backend implementation aligned with updated tests
|
|
140
|
+
4. **Phase 4**: Client SDK updated to match Phase 3 API
|
|
141
|
+
5. **Phase 5**: E2E tests updated to use Phase 4 SDK + Phase 3 API
|
|
142
|
+
|
|
143
|
+
### Order Validation Checklist
|
|
144
|
+
|
|
145
|
+
- [ ] Phase 2 updates don't depend on Phase 3 changes (true for mocks)
|
|
146
|
+
- [ ] Phase 3 updates use Phase 2 tests as reference
|
|
147
|
+
- [ ] Phase 4 updates don't precede Phase 3 (SDK depends on API)
|
|
148
|
+
- [ ] Phase 5 updates reference Phase 4 SDK + Phase 3 API
|
|
149
|
+
|
|
150
|
+
**If any violated**: Stop, reorder phases before propagation.
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## Manual Update Trigger
|
|
155
|
+
|
|
156
|
+
When should manual review override automatic updates?
|
|
157
|
+
|
|
158
|
+
### Require Manual Review If...
|
|
159
|
+
|
|
160
|
+
**CRITICAL TRIGGERS** (Stop propagation):
|
|
161
|
+
- [ ] Breaking change + no clear migration path
|
|
162
|
+
- [ ] Change affects 5+ files in Phase 3
|
|
163
|
+
- [ ] Database migration needed (breaking + data loss risk)
|
|
164
|
+
- [ ] API version bump needed (breaking)
|
|
165
|
+
- [ ] SDK deprecation policy violated
|
|
166
|
+
- [ ] Contract violates architectural constraint
|
|
167
|
+
|
|
168
|
+
**RECOMMENDED REVIEW** (Proceed with caution):
|
|
169
|
+
- [ ] Feature change affecting Phase 3 + Phase 4 together
|
|
170
|
+
- [ ] Type system needs re-design (e.g., union type)
|
|
171
|
+
- [ ] Performance implications (schema change, new indexes)
|
|
172
|
+
- [ ] Security implication (new validation, encryption)
|
|
173
|
+
|
|
174
|
+
**AUTOMATIC OK** (Can auto-propagate):
|
|
175
|
+
- [ ] Optional field addition (feature)
|
|
176
|
+
- [ ] Optional parameter addition (feature)
|
|
177
|
+
- [ ] New endpoint (feature)
|
|
178
|
+
- [ ] New enum value (feature)
|
|
179
|
+
- [ ] Documentation update (non-impact)
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Conflict Detection Checklist
|
|
184
|
+
|
|
185
|
+
Watch for conflicts during propagation.
|
|
186
|
+
|
|
187
|
+
### Potential Conflicts
|
|
188
|
+
|
|
189
|
+
**Phase 2 ↔ Phase 3**:
|
|
190
|
+
- [ ] Phase 2 mocks outdated when Phase 3 was implemented?
|
|
191
|
+
- [ ] Phase 3 handler not aligned with Phase 2 expectations?
|
|
192
|
+
|
|
193
|
+
**Phase 3 ↔ Phase 4**:
|
|
194
|
+
- [ ] Phase 4 SDK has workarounds for Phase 3 quirks?
|
|
195
|
+
- [ ] Backward compatibility code in Phase 4 would break?
|
|
196
|
+
|
|
197
|
+
**Phase 4 ↔ Phase 5**:
|
|
198
|
+
- [ ] Phase 5 tests rely on deprecated Phase 4 methods?
|
|
199
|
+
- [ ] Phase 5 hardcodes values from Phase 4 SDK?
|
|
200
|
+
|
|
201
|
+
**All Phases**:
|
|
202
|
+
- [ ] Any hardcoded values in tests/implementation?
|
|
203
|
+
- [ ] Any duplicate data definitions (brittleness)?
|
|
204
|
+
- [ ] Any circular dependencies?
|
|
205
|
+
|
|
206
|
+
**If conflicts found**: Document in CONFLICT_LOG.md, escalate for manual resolution.
|
|
207
|
+
|
|
208
|
+
---
|
|
209
|
+
|
|
210
|
+
## Post-Propagation Validation
|
|
211
|
+
|
|
212
|
+
After automatic updates, verify everything still works.
|
|
213
|
+
|
|
214
|
+
### Syntax Validation
|
|
215
|
+
|
|
216
|
+
- [ ] Phase 2 test files are valid JavaScript
|
|
217
|
+
- [ ] Phase 3 contract files are valid JSON
|
|
218
|
+
- [ ] Phase 4 type files are valid TypeScript
|
|
219
|
+
- [ ] Phase 5 scenario files are valid Markdown
|
|
220
|
+
|
|
221
|
+
### Semantic Validation
|
|
222
|
+
|
|
223
|
+
- [ ] Phase 2 tests make logical sense (not just syntactically valid)
|
|
224
|
+
- [ ] Phase 3 contract accurately describes new API
|
|
225
|
+
- [ ] Phase 4 types match Phase 3 contract structure
|
|
226
|
+
- [ ] Phase 5 scenarios reference Phase 4 SDK correctly
|
|
227
|
+
|
|
228
|
+
### Integration Testing
|
|
229
|
+
|
|
230
|
+
- [ ] Run Phase 2 tests: `npm test -- tests/`
|
|
231
|
+
- [ ] Run Phase 3 validation: `npm run validate:contracts`
|
|
232
|
+
- [ ] Run Phase 4 type check: `npm run tsc --noEmit`
|
|
233
|
+
- [ ] Run Phase 5 E2E: `npm run test:e2e` (subset)
|
|
234
|
+
|
|
235
|
+
### All Tests Green?
|
|
236
|
+
|
|
237
|
+
- [ ] Yes → Propagation successful ✅
|
|
238
|
+
- [ ] No → Identify failing tests, manual review needed ⚠️
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## Migration Guide Checklist (BREAKING CHANGES ONLY)
|
|
243
|
+
|
|
244
|
+
For breaking changes, verify migration guide is complete.
|
|
245
|
+
|
|
246
|
+
- [ ] Migration guide file exists (e.g., `docs/migration-v2-to-v3.md`)
|
|
247
|
+
- [ ] "What changed" section complete
|
|
248
|
+
- [ ] "Why changed" section explains rationale
|
|
249
|
+
- [ ] "Impact" section lists affected consumers
|
|
250
|
+
- [ ] "Migration steps" are clear and step-by-step
|
|
251
|
+
- [ ] "Timeline" specified (deprecation period, cutoff date)
|
|
252
|
+
- [ ] "Rollback procedure" documented
|
|
253
|
+
- [ ] "Backward compatibility period" specified (if any)
|
|
254
|
+
- [ ] Examples of old vs new code provided
|
|
255
|
+
|
|
256
|
+
**If migration guide incomplete**: Block commit until complete.
|
|
257
|
+
|