codex-genesis-harness 0.1.5 → 0.1.7

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 (178) hide show
  1. package/.codebase/ARCHITECTURE_REVIEW_COMPLETE.md +216 -216
  2. package/.codebase/CURRENT_STATE.md +8 -2
  3. package/.codebase/FILE_NAMING_CLARIFICATION.md +161 -161
  4. package/.codebase/HARNESS_COMPLETENESS_AUDIT.md +613 -613
  5. package/.codebase/IMPLEMENTATION_COMPLETE.md +429 -429
  6. package/.codebase/IMPLEMENTATION_HANDOFF.md +351 -351
  7. package/.codebase/IMPROVEMENTS_SUMMARY.md +419 -419
  8. package/.codebase/PHASE3_SKILLS_NAMING_COMPLETE.md +292 -292
  9. package/.codebase/PHASE_DEPENDENCY_MAP.md +486 -486
  10. package/.codebase/QUICK_START_SPEC_IMPACT.md +456 -456
  11. package/.codebase/README.md +139 -139
  12. package/.codebase/RECOVERY_POINTS.md +83 -438
  13. package/.codebase/beads.json +16 -0
  14. package/.codex/skills/genesis-ai-provider/SKILL.md +1 -1
  15. package/.codex/skills/genesis-api-contract/SKILL.md +1 -1
  16. package/.codex/skills/genesis-api-sync/SKILL.md +354 -354
  17. package/.codex/skills/genesis-api-sync/checklists/api-sync-checklist.md +101 -101
  18. package/.codex/skills/genesis-api-sync/templates/api-change-template.md +257 -257
  19. package/.codex/skills/genesis-architecture/SKILL.md +1 -1
  20. package/.codex/skills/genesis-codebase-map/SKILL.md +1 -1
  21. package/.codex/skills/genesis-debug-guide/SKILL.md +479 -479
  22. package/.codex/skills/genesis-debug-guide/checklists/flaky-test-investigation.md +339 -339
  23. package/.codex/skills/genesis-debug-guide/checklists/production-bug-debug.md +210 -210
  24. package/.codex/skills/genesis-debug-guide/checklists/test-failure-debug.md +158 -158
  25. package/.codex/skills/genesis-debug-guide/observability/debug-commands.md +365 -365
  26. package/.codex/skills/genesis-debug-guide/playbooks/unit-test-failures.md +289 -289
  27. package/.codex/skills/genesis-debug-guide/templates/debug-investigation-log.md +288 -288
  28. package/.codex/skills/genesis-design-spec/SKILL.md +3 -3
  29. package/.codex/skills/genesis-docs-automation/SKILL.md +1003 -1003
  30. package/.codex/skills/genesis-docs-automation/checklists/docs-validation.md +359 -359
  31. package/.codex/skills/genesis-docs-automation/checklists/spec-alignment.md +312 -312
  32. package/.codex/skills/genesis-docs-automation/observability/docs-tracking.md +382 -382
  33. package/.codex/skills/genesis-docs-automation/playbooks/auto-update-flow.md +851 -851
  34. package/.codex/skills/genesis-docs-automation/playbooks/changelog-generation.md +491 -491
  35. package/.codex/skills/genesis-docs-automation/templates/changelog-entry-template.md +187 -187
  36. package/.codex/skills/genesis-docs-automation/templates/handoff-template.md +297 -297
  37. package/.codex/skills/genesis-harness/SKILL.md +1428 -1427
  38. package/.codex/skills/genesis-harness/agents/openai.yaml +7 -7
  39. package/.codex/skills/genesis-harness/checklists/bug-fix-qa.md +169 -169
  40. package/.codex/skills/genesis-harness/checklists/new-feature-qa.md +157 -157
  41. package/.codex/skills/genesis-harness/checklists/refactor-qa.md +216 -216
  42. package/.codex/skills/genesis-harness/checklists/requirements-validation.md +211 -211
  43. package/.codex/skills/genesis-harness/references/planning-schema.md +35 -35
  44. package/.codex/skills/genesis-harness/references/quality-rubric.md +21 -21
  45. package/.codex/skills/genesis-harness/references/research-rubric.md +41 -41
  46. package/.codex/skills/genesis-harness/references/workflows.md +33 -33
  47. package/.codex/skills/genesis-harness/resources/agents-template.md +27 -27
  48. package/.codex/skills/genesis-harness/resources/api-docs-template.md +32 -32
  49. package/.codex/skills/genesis-harness/resources/architecture-template.md +30 -30
  50. package/.codex/skills/genesis-harness/resources/audit-template.md +26 -26
  51. package/.codex/skills/genesis-harness/resources/bug-template.md +34 -34
  52. package/.codex/skills/genesis-harness/resources/change-impact-matrix-template.md +204 -204
  53. package/.codex/skills/genesis-harness/resources/check-template.md +21 -21
  54. package/.codex/skills/genesis-harness/resources/conventions-template.md +42 -42
  55. package/.codex/skills/genesis-harness/resources/decision-template.md +33 -33
  56. package/.codex/skills/genesis-harness/resources/design-template.md +26 -26
  57. package/.codex/skills/genesis-harness/resources/escalation-template.md +21 -21
  58. package/.codex/skills/genesis-harness/resources/feature-template.md +49 -49
  59. package/.codex/skills/genesis-harness/resources/foundation-phase-template.md +131 -131
  60. package/.codex/skills/genesis-harness/resources/integrations-template.md +32 -32
  61. package/.codex/skills/genesis-harness/resources/journeys-template.md +13 -13
  62. package/.codex/skills/genesis-harness/resources/lessons-learned-template.md +12 -12
  63. package/.codex/skills/genesis-harness/resources/observability-template.md +34 -34
  64. package/.codex/skills/genesis-harness/resources/phase-00-foundation-template.md +76 -76
  65. package/.codex/skills/genesis-harness/resources/phase-template.md +34 -34
  66. package/.codex/skills/genesis-harness/resources/pitfalls-template.md +22 -22
  67. package/.codex/skills/genesis-harness/resources/planning-tree-template.md +39 -39
  68. package/.codex/skills/genesis-harness/resources/post-implementation-guide.md +347 -347
  69. package/.codex/skills/genesis-harness/resources/project-template.md +38 -38
  70. package/.codex/skills/genesis-harness/resources/quality-score-template.md +11 -11
  71. package/.codex/skills/genesis-harness/resources/requirements-template.md +26 -26
  72. package/.codex/skills/genesis-harness/resources/research-template.md +26 -26
  73. package/.codex/skills/genesis-harness/resources/review-template.md +22 -22
  74. package/.codex/skills/genesis-harness/resources/spec-changelog-template.md +6 -6
  75. package/.codex/skills/genesis-harness/resources/stack-template.md +33 -33
  76. package/.codex/skills/genesis-harness/resources/verification-template.md +26 -26
  77. package/.codex/skills/genesis-harness/scripts/check-architecture-boundaries.sh +0 -0
  78. package/.codex/skills/genesis-harness/scripts/check-docs-sync.sh +0 -0
  79. package/.codex/skills/genesis-harness/scripts/check-no-debug-logs.sh +0 -0
  80. package/.codex/skills/genesis-harness/scripts/check-required-planning-files.sh +0 -0
  81. package/.codex/skills/genesis-harness/scripts/check-spec-changelog.sh +0 -0
  82. package/.codex/skills/genesis-harness/scripts/check-task-tracking.sh +0 -0
  83. package/.codex/skills/genesis-harness/scripts/compact-context.sh +0 -0
  84. package/.codex/skills/genesis-harness/scripts/create-adr.sh +0 -0
  85. package/.codex/skills/genesis-harness/scripts/create-bug.sh +0 -0
  86. package/.codex/skills/genesis-harness/scripts/create-feature.sh +0 -0
  87. package/.codex/skills/genesis-harness/scripts/detect-stack.sh +0 -0
  88. package/.codex/skills/genesis-harness/scripts/init-planning.sh +0 -0
  89. package/.codex/skills/genesis-harness/scripts/list-changed-files.sh +0 -0
  90. package/.codex/skills/genesis-harness/scripts/offload-log.sh +0 -0
  91. package/.codex/skills/genesis-harness/scripts/run-verification.sh +0 -0
  92. package/.codex/skills/genesis-harness/scripts/run-verify-loop.sh +0 -0
  93. package/.codex/skills/genesis-harness/scripts/update-state.sh +0 -0
  94. package/.codex/skills/genesis-harness-engineering/SKILL.md +1 -1
  95. package/.codex/skills/genesis-new-design/SKILL.md +2 -1
  96. package/.codex/skills/genesis-new-design/agents/openai.yaml +3 -3
  97. package/.codex/skills/genesis-observability-automation/checklists/.gitkeep +0 -0
  98. package/.codex/skills/genesis-observability-automation/observability/.gitkeep +0 -0
  99. package/.codex/skills/genesis-observability-automation/playbooks/.gitkeep +0 -0
  100. package/.codex/skills/genesis-observability-automation/templates/.gitkeep +0 -0
  101. package/.codex/skills/genesis-pipeline-orchestration/SKILL.md +1 -1
  102. package/.codex/skills/genesis-planning/SKILL.md +26 -1
  103. package/.codex/skills/genesis-planning/checklists/mvp-readiness.md +18 -0
  104. package/.codex/skills/genesis-planning/examples/5-phase-roadmap-example.md +43 -0
  105. package/.codex/skills/genesis-planning/templates/phase-1-core.md +17 -0
  106. package/.codex/skills/genesis-planning/templates/phase-2-auth.md +17 -0
  107. package/.codex/skills/genesis-planning/templates/phase-3-features.md +17 -0
  108. package/.codex/skills/genesis-planning/templates/phase-4-integrations.md +17 -0
  109. package/.codex/skills/genesis-planning/templates/phase-5-readiness.md +17 -0
  110. package/.codex/skills/genesis-release/SKILL.md +24 -1
  111. package/.codex/skills/{genesis-release-orchestration → genesis-release}/checklists/post-deployment-verification.md +274 -274
  112. package/.codex/skills/{genesis-release-orchestration → genesis-release}/checklists/pre-release-validation.md +220 -220
  113. package/.codex/skills/{genesis-release-orchestration → genesis-release}/observability/release-tracking.md +253 -253
  114. package/.codex/skills/{genesis-release-orchestration → genesis-release}/playbooks/canary-deployment-orchestration.md +472 -472
  115. package/.codex/skills/{genesis-release-orchestration → genesis-release}/playbooks/semantic-versioning-automation.md +494 -494
  116. package/.codex/skills/{genesis-release-orchestration → genesis-release}/templates/deployment-strategy-template.md +303 -303
  117. package/.codex/skills/{genesis-release-orchestration → genesis-release}/templates/release-runbook-template.md +420 -420
  118. package/.codex/skills/genesis-research-first/SKILL.md +237 -237
  119. package/.codex/skills/genesis-research-first/templates/.gitkeep +0 -0
  120. package/.codex/skills/genesis-spec-propagation/SKILL.md +534 -534
  121. package/.codex/skills/genesis-spec-propagation/checklists/phase-update-verification.md +384 -384
  122. package/.codex/skills/genesis-spec-propagation/checklists/spec-change-detection.md +257 -257
  123. package/.codex/skills/genesis-spec-propagation/observability/propagation-tracking.md +373 -373
  124. package/.codex/skills/genesis-spec-propagation/playbooks/breaking-change-propagation.md +692 -692
  125. package/.codex/skills/genesis-spec-propagation/playbooks/feature-change-propagation.md +434 -434
  126. package/.codex/skills/genesis-spec-propagation/templates/migration-guide-template.md +407 -407
  127. package/.codex/skills/{ui-ux-test-skill → genesis-ui-ux-test}/SKILL.md +1 -1
  128. package/.codex/skills/genesis-upgrade-design/agents/openai.yaml +3 -3
  129. package/.codex/skills/spec-impact-engine/SKILL.md +504 -504
  130. package/.codex/skills/spec-impact-engine/detect-spec-changes.sh +0 -0
  131. package/.codex-plugin/plugin.json +19 -19
  132. package/CHANGELOG.md +56 -0
  133. package/LICENSE +22 -22
  134. package/README.EN.md +780 -730
  135. package/README.VI.md +772 -723
  136. package/README.md +102 -247
  137. package/VERSION +2 -2
  138. package/bin/genesis-harness.js +695 -92
  139. package/package.json +9 -3
  140. package/scripts/README.md +342 -342
  141. package/scripts/compact-context.sh +0 -0
  142. package/scripts/contract_integrity_gate.js +83 -0
  143. package/scripts/detect-changes.sh +0 -0
  144. package/scripts/healing_telemetry.js +118 -0
  145. package/scripts/install.sh +5 -6
  146. package/scripts/offload-log.sh +0 -0
  147. package/scripts/prompt_sentinel.js +84 -0
  148. package/scripts/run-evals.sh +20 -24
  149. package/scripts/run-verify-loop.sh +11 -0
  150. package/scripts/spec_visual_sync.js +157 -0
  151. package/scripts/test_generator.js +142 -0
  152. package/scripts/transition_state.sh +0 -0
  153. package/scripts/uninstall.sh +2 -5
  154. package/scripts/validation_gates.sh +40 -1
  155. package/scripts/verify.sh +6 -61
  156. package/tests/unit/contract_integrity_gate.test.js +74 -0
  157. package/tests/unit/healing_telemetry.test.js +58 -0
  158. package/tests/unit/prompt_sentinel.test.js +50 -0
  159. package/tests/unit/spec_visual_sync.test.js +77 -0
  160. package/tests/unit/test_generator.test.js +62 -0
  161. package/.codex/skills/genesis-docs/SKILL.md +0 -46
  162. package/.codex/skills/genesis-docs/agents/openai.yaml +0 -7
  163. package/.codex/skills/genesis-release-orchestration/SKILL.md +0 -653
  164. package/.codex/skills/genesis-release-orchestration/agents/openai.yaml +0 -7
  165. package/.codex/skills/genesis-research/SKILL.md +0 -46
  166. package/.codex/skills/genesis-research/agents/openai.yaml +0 -7
  167. /package/.codex/skills/{genesis-docs/checklists/checklist.md → genesis-docs-automation/checklists/manual-docs-checklist.md} +0 -0
  168. /package/.codex/skills/{genesis-docs/examples/example.md → genesis-docs-automation/examples/manual-docs-example.md} +0 -0
  169. /package/.codex/skills/{genesis-docs → genesis-docs-automation}/templates/docs-update-template.md +0 -0
  170. /package/.codex/skills/{genesis-state-machine/SKILL.md → genesis-harness/references/state-machine.md} +0 -0
  171. /package/.codex/skills/{genesis-release-orchestration/examples/example.md → genesis-release/examples/orchestration-example.md} +0 -0
  172. /package/.codex/skills/{genesis-research → genesis-research-first}/checklists/checklist.md +0 -0
  173. /package/.codex/skills/{genesis-research/examples/example.md → genesis-research-first/examples/manual-research-example.md} +0 -0
  174. /package/.codex/skills/{genesis-research → genesis-research-first}/templates/research-note-template.md +0 -0
  175. /package/.codex/skills/{ui-ux-test-skill → genesis-ui-ux-test}/agents/openai.yaml +0 -0
  176. /package/.codex/skills/{ui-ux-test-skill → genesis-ui-ux-test}/checklists/checklist.md +0 -0
  177. /package/.codex/skills/{ui-ux-test-skill → genesis-ui-ux-test}/examples/example.md +0 -0
  178. /package/.codex/skills/{ui-ux-test-skill → genesis-ui-ux-test}/templates/playwright-test-template.md +0 -0
@@ -1,359 +1,359 @@
1
- # Docs Validation Checklist
2
-
3
- **Purpose**: Pre-update verification checklist to catch incomplete/broken documentation before processing
4
-
5
- **When to Use**:
6
- - After code changes detected
7
- - Before auto-doc generation
8
- - During manual `/update-docs` invocation
9
-
10
- ---
11
-
12
- ## 📋 Pre-Validation: Is Documentation Update Needed?
13
-
14
- - [ ] At least one file changed in Phase 1-5 (contract/backend/SDK/test)?
15
- - [ ] Tests passing? (Required for auto-trigger)
16
- - [ ] Changed files are tracked in Git? (No local-only changes)
17
- - [ ] Changes are committed/staged (not just pending)?
18
-
19
- **If any unchecked**: Stop here, resolve first, then re-run
20
-
21
- ---
22
-
23
- ## 🔍 Phase 1: Contract Change Detection
24
-
25
- ### If API Contract Changed (contracts/api/*/request.json or response.json)
26
-
27
- **Contract Validation**:
28
- - [ ] request.json has valid JSON schema
29
- - [ ] response.json has valid JSON schema
30
- - [ ] error.json has valid error code map
31
- - [ ] All required fields marked as such
32
- - [ ] Type definitions are precise (string vs enum, number vs range)
33
- - [ ] Examples provided for each request/response type
34
-
35
- **Doc Requirements**:
36
- - [ ] API_REFERENCE.md needs update (endpoint details)
37
- - [ ] SPEC_CHANGELOG.md needs entry (what changed)
38
- - [ ] IMPLEMENTATION_HANDOFF.md may need update (if breaking)
39
- - [ ] Examples need code samples in 2+ languages (JS, Python)
40
-
41
- **Change Classification**:
42
-
43
- Is this a BREAKING change?
44
- - [ ] Removed required field? **YES** → BREAKING
45
- - [ ] Changed field type? (e.g., string → number) **YES** → BREAKING
46
- - [ ] Changed response structure? **YES** → BREAKING
47
- - [ ] Changed endpoint URL? **YES** → BREAKING
48
- - [ ] Changed error codes? **YES** → BREAKING
49
-
50
- If ANY yes: **MARK AS BREAKING** (requires manual review gate)
51
-
52
- Is this a FEATURE change?
53
- - [ ] Added new optional field? **YES** → FEATURE
54
- - [ ] Added new endpoint? **YES** → FEATURE
55
- - [ ] Made required field optional? **YES** → FEATURE (backward compatible)
56
- - [ ] Added new error code? **YES** → FEATURE
57
-
58
- If ANY yes: **MARK AS FEATURE** (auto-update OK, provide migration guide)
59
-
60
- Otherwise: **MARK AS BUG_FIX or INTERNAL**
61
-
62
- ---
63
-
64
- ## 🔄 Phase 2: Test File Changes
65
-
66
- ### If Test Files Changed (tests/unit, tests/integration, playwright/e2e)
67
-
68
- **Test Validation**:
69
- - [ ] All tests passing (must have 0 failures)
70
- - [ ] Test file has clear description of what's being tested
71
- - [ ] New test cases have proper setup/teardown
72
- - [ ] Mock data matches expected schema
73
- - [ ] No hardcoded IDs or timestamps (use factories)
74
-
75
- **Doc Requirements**:
76
- - [ ] If new integration test: Add scenario to IMPLEMENTATION.md
77
- - [ ] If new E2E test: Add user flow to docs
78
- - [ ] SPEC_CHANGELOG.md: Add "Test Coverage" section if new major scenario
79
- - [ ] Update test coverage % in IMPLEMENTATION_HANDOFF.md
80
-
81
- **Test Categorization**:
82
- - [ ] Unit tests: Testing individual functions
83
- - [ ] Integration tests: Testing API endpoint + database
84
- - [ ] E2E tests: Testing user flows across UI + API
85
- - [ ] Performance tests: Testing response times
86
- - [ ] Error tests: Testing error handling
87
-
88
- ---
89
-
90
- ## 💾 Phase 3: Backend Implementation Changes
91
-
92
- ### If Backend Files Changed (src/api/handlers, src/services, src/database)
93
-
94
- **Code Quality**:
95
- - [ ] Code has docstrings/comments explaining logic
96
- - [ ] Error handling is explicit (no silent failures)
97
- - [ ] Database queries are indexed (if new queries)
98
- - [ ] Performance is acceptable (check test results for timing)
99
- - [ ] Security implications noted (auth, validation, SQL injection)
100
-
101
- **Doc Requirements**:
102
- - [ ] API_REFERENCE.md: Updated if endpoint changed
103
- - [ ] IMPLEMENTATION.md: Added key code locations
104
- - [ ] ARCHITECTURE.md: Updated if data flow changed
105
- - [ ] SPEC_CHANGELOG.md: Entry with implementation notes
106
- - [ ] IMPLEMENTATION_HANDOFF.md: Updated with next steps
107
- - [ ] Docstrings: Added/updated for public methods
108
-
109
- **Implementation Category**:
110
- - [ ] New handler: Needs full API docs + implementation guide
111
- - [ ] Modified handler: Needs updated API docs + changelog
112
- - [ ] New service: Needs architecture docs + implementation guide
113
- - [ ] Modified service: Needs updated architecture docs
114
- - [ ] Database change: Needs migration guide + schema docs
115
- - [ ] Error handling: Needs error code documentation
116
-
117
- ---
118
-
119
- ## 📱 Phase 4: SDK/Client Changes
120
-
121
- ### If SDK Files Changed (src/client/*, src/types/*)
122
-
123
- **Type Validation**:
124
- - [ ] All TypeScript types compile without errors
125
- - [ ] Type definitions match backend schema (Phase 3)
126
- - [ ] No `any` types without justification
127
- - [ ] Generic types properly constrained
128
- - [ ] Deprecation warnings added for old methods
129
-
130
- **Doc Requirements**:
131
- - [ ] API Reference: Updated with new methods
132
- - [ ] Type definitions documented with examples
133
- - [ ] SPEC_CHANGELOG.md: Entry with SDK changes
134
- - [ ] IMPLEMENTATION_HANDOFF.md: Updated with next phase steps
135
- - [ ] Migration guide: Provided if breaking change
136
- - [ ] Code examples: Added in docs for new methods
137
-
138
- **SDK Change Type**:
139
- - [ ] New method: Needs documentation + example
140
- - [ ] Modified method: Needs updated documentation
141
- - [ ] Deprecated method: Needs migration guide
142
- - [ ] New type: Needs type reference documentation
143
- - [ ] Type change: Breaking change, needs migration guide
144
-
145
- ---
146
-
147
- ## 🎯 Phase 5: E2E Test Changes
148
-
149
- ### If E2E Test Files Changed (playwright/e2e/*.spec.ts)
150
-
151
- **Test Scenario Validation**:
152
- - [ ] Each scenario tests a complete user flow
153
- - [ ] Scenarios are independent (no test ordering)
154
- - [ ] Assertions match expected behavior
155
- - [ ] Error scenarios included (not just happy path)
156
- - [ ] Page objects used (not hardcoded selectors)
157
-
158
- **Doc Requirements**:
159
- - [ ] User flows documented in IMPLEMENTATION.md
160
- - [ ] Scenario names match documentation
161
- - [ ] SPEC_CHANGELOG.md: New scenarios noted
162
- - [ ] IMPLEMENTATION_HANDOFF.md: Test coverage updated
163
- - [ ] Examples provided for each scenario
164
-
165
- **Scenario Classification**:
166
- - [ ] Happy path: Normal user flow
167
- - [ ] Error case: User makes mistake
168
- - [ ] Edge case: Unusual but valid scenario
169
- - [ ] Regression: Previous bug that came back
170
- - [ ] Performance: Testing under load
171
-
172
- ---
173
-
174
- ## ✅ Cross-Phase Consistency Check
175
-
176
- ### Contract ↔ Implementation Alignment
177
-
178
- - [ ] Phase 1 endpoint in API contract → Phase 3 handler exists?
179
- - [ ] Phase 1 request schema → Phase 3 validation matches?
180
- - [ ] Phase 1 response schema → Phase 3 handler response matches?
181
- - [ ] Phase 1 error codes → Phase 3 error handling matches?
182
- - [ ] Phase 1 response fields → Phase 2 test mocks match?
183
-
184
- **If misaligned**: 🔴 STOP - Document conflict in DOCS_UPDATE_LOG.md
185
-
186
- ### Implementation ↔ SDK Alignment
187
-
188
- - [ ] Phase 3 API response → Phase 4 type definitions match?
189
- - [ ] Phase 3 error codes → Phase 4 error handling matches?
190
- - [ ] Phase 3 data flow → Phase 4 client flow matches?
191
- - [ ] New Phase 3 fields → Phase 4 types include them?
192
-
193
- **If misaligned**: 🔴 STOP - Document conflict in DOCS_UPDATE_LOG.md
194
-
195
- ### SDK ↔ E2E Alignment
196
-
197
- - [ ] Phase 4 SDK methods → Phase 5 E2E tests use them?
198
- - [ ] Phase 4 type definitions → Phase 5 test data matches?
199
- - [ ] Phase 4 error handling → Phase 5 error scenarios match?
200
-
201
- **If misaligned**: 🔴 STOP - Document conflict in DOCS_UPDATE_LOG.md
202
-
203
- ---
204
-
205
- ## 🚨 Manual Review Decision Gate
206
-
207
- If ANY of these apply, require manual review (don't auto-proceed):
208
-
209
- ### 🔴 ALWAYS MANUAL (Critical)
210
-
211
- - [ ] **BREAKING change** detected (field removed, type changed, etc.)
212
- - [ ] **Phase misalignment** detected (contract ≠ implementation)
213
- - [ ] **Security change** (auth, validation, encryption related)
214
- - [ ] **Database schema change** (new table, column removal)
215
- - [ ] **Error code change** (new error, changed error behavior)
216
- - [ ] **Performance regression** (response time increased >10%)
217
- - [ ] **Deprecated endpoint** without migration guide
218
-
219
- ### 🟡 MANUAL RECOMMENDED (High Value)
220
-
221
- - [ ] **New public API** (new endpoint or public method)
222
- - [ ] **Architecture change** (new service, new module, data flow change)
223
- - [ ] **Significant refactoring** (>50 lines changed in critical path)
224
- - [ ] **Third-party library update** (new dependency or major version bump)
225
- - [ ] **Cross-phase impact** (changes affect multiple phases)
226
-
227
- ### 🟢 AUTO OK (Standard)
228
-
229
- - [ ] Feature addition (new optional field, new optional method)
230
- - [ ] Bug fix (behavior corrected, backward compatible)
231
- - [ ] Test addition (new test cases for existing features)
232
- - [ ] Documentation update (comments, examples, guides)
233
- - [ ] Internal refactoring (no behavior change, single module)
234
-
235
- ---
236
-
237
- ## 📝 Docs Completeness Checklist
238
-
239
- ### If Documentation Update Flagged, Verify:
240
-
241
- **API Documentation**:
242
- - [ ] All endpoints documented (GET, POST, PUT, DELETE)
243
- - [ ] Request parameters documented (required, optional, types)
244
- - [ ] Response schema documented with example JSON
245
- - [ ] Error codes documented (code, message, cause, resolution)
246
- - [ ] Code examples in 2+ languages (JavaScript, Python)
247
- - [ ] Rate limits noted (if applicable)
248
- - [ ] Authentication requirements noted
249
-
250
- **Implementation Documentation**:
251
- - [ ] File locations referenced (src/api/handlers/xxx.ts, etc.)
252
- - [ ] Line numbers accurate (spot-check a few)
253
- - [ ] Docstring examples compile/run
254
- - [ ] Error handling strategy explained
255
- - [ ] Performance characteristics noted (if critical path)
256
- - [ ] Security implications noted (if applicable)
257
- - [ ] Design decisions explained (why this approach?)
258
-
259
- **Architecture Documentation**:
260
- - [ ] Data flow diagram updated (if applicable)
261
- - [ ] Service interactions documented
262
- - [ ] Cache strategy documented (if added)
263
- - [ ] External API dependencies noted
264
- - [ ] Scalability considerations noted
265
- - [ ] Failure scenarios documented
266
-
267
- **Changelog Documentation**:
268
- - [ ] Change type correct (BREAKING, FEATURE, BUG_FIX)
269
- - [ ] Change severity matches impact
270
- - [ ] Migration guide provided for breaking changes
271
- - [ ] Timeline clear for deprecations
272
- - [ ] Examples provided for new features
273
- - [ ] Related resources linked (API ref, implementation guide)
274
-
275
- **Handoff Documentation**:
276
- - [ ] Phase completion status clear (✅ what's done)
277
- - [ ] Testing checklist provided for next phase
278
- - [ ] Known issues documented (severity, workarounds)
279
- - [ ] Next steps clear (what Phase 4 needs to do)
280
- - [ ] Open questions documented
281
- - [ ] Contact info for questions
282
-
283
- ---
284
-
285
- ## 🎯 Final Sign-Off Checklist
286
-
287
- Before marking docs update COMPLETE:
288
-
289
- **Syntax Validation**:
290
- - [ ] All markdown files compile without errors
291
- - [ ] All code blocks properly syntax-highlighted
292
- - [ ] All links internally valid (cross-references work)
293
- - [ ] No broken image references
294
- - [ ] Frontmatter (if used) valid YAML/JSON
295
-
296
- **Content Validation**:
297
- - [ ] No TODO markers remain (🚫 "TODO: document this")
298
- - [ ] No placeholder text ("Placeholder for API docs")
299
- - [ ] All examples tested (code runs without errors)
300
- - [ ] All file paths exist (spot-check a few)
301
- - [ ] All line numbers accurate (spot-check a few)
302
-
303
- **Consistency Validation**:
304
- - [ ] Terminology consistent (API vs Backend, User vs Account)
305
- - [ ] Formatting consistent (markdown headers, code blocks)
306
- - [ ] Tone consistent (technical, not marketing)
307
- - [ ] All promises kept (referenced features exist)
308
-
309
- **Phase Alignment**:
310
- - [ ] Phase 1 contract ⊂ Phase 3 implementation ✓
311
- - [ ] Phase 3 response ⊂ Phase 4 types ✓
312
- - [ ] Phase 4 types ⊂ Phase 5 tests ✓
313
- - [ ] All layers agree on field names, types ✓
314
-
315
- **Update Complete**: ✅ Ready for commit
316
-
317
- ---
318
-
319
- ## 📊 Validation Results Template
320
-
321
- ```
322
- DOCS VALIDATION REPORT
323
- Generated: [timestamp]
324
- Change: [brief description]
325
-
326
- CONTRACT CHANGES: [0-N]
327
- - [endpoint/field] - [change type]
328
-
329
- TEST CHANGES: [0-N]
330
- - [test name] - [scenario]
331
-
332
- BACKEND CHANGES: [0-N]
333
- - [file] - [type of change]
334
-
335
- SDK CHANGES: [0-N]
336
- - [method/type] - [change type]
337
-
338
- E2E CHANGES: [0-N]
339
- - [scenario] - [user flow]
340
-
341
- PHASE ALIGNMENT: ✅ All phases aligned
342
- MANUAL REVIEW GATE: ⚠️ BREAKING CHANGE - Manual review required
343
-
344
- DOCS GENERATED:
345
- - ✅ API_REFERENCE.md updated
346
- - ✅ IMPLEMENTATION.md updated
347
- - ✅ ARCHITECTURE.md updated
348
- - ✅ SPEC_CHANGELOG.md entry added
349
- - ⚠️ IMPLEMENTATION_HANDOFF.md incomplete (flagged for manual review)
350
-
351
- STATUS: ⚠️ CONDITIONAL COMPLETE
352
- - Auto-update: ✅ DONE
353
- - Manual review: ⏳ REQUIRED (breaking change gate)
354
- - Ready for commit: ❌ NO (awaiting manual approval)
355
- ```
356
-
357
- ---
358
-
359
- **Last Updated**: May 31, 2026 | **Status**: ACTIVE
1
+ # Docs Validation Checklist
2
+
3
+ **Purpose**: Pre-update verification checklist to catch incomplete/broken documentation before processing
4
+
5
+ **When to Use**:
6
+ - After code changes detected
7
+ - Before auto-doc generation
8
+ - During manual `/update-docs` invocation
9
+
10
+ ---
11
+
12
+ ## 📋 Pre-Validation: Is Documentation Update Needed?
13
+
14
+ - [ ] At least one file changed in Phase 1-5 (contract/backend/SDK/test)?
15
+ - [ ] Tests passing? (Required for auto-trigger)
16
+ - [ ] Changed files are tracked in Git? (No local-only changes)
17
+ - [ ] Changes are committed/staged (not just pending)?
18
+
19
+ **If any unchecked**: Stop here, resolve first, then re-run
20
+
21
+ ---
22
+
23
+ ## 🔍 Phase 1: Contract Change Detection
24
+
25
+ ### If API Contract Changed (contracts/api/*/request.json or response.json)
26
+
27
+ **Contract Validation**:
28
+ - [ ] request.json has valid JSON schema
29
+ - [ ] response.json has valid JSON schema
30
+ - [ ] error.json has valid error code map
31
+ - [ ] All required fields marked as such
32
+ - [ ] Type definitions are precise (string vs enum, number vs range)
33
+ - [ ] Examples provided for each request/response type
34
+
35
+ **Doc Requirements**:
36
+ - [ ] API_REFERENCE.md needs update (endpoint details)
37
+ - [ ] SPEC_CHANGELOG.md needs entry (what changed)
38
+ - [ ] IMPLEMENTATION_HANDOFF.md may need update (if breaking)
39
+ - [ ] Examples need code samples in 2+ languages (JS, Python)
40
+
41
+ **Change Classification**:
42
+
43
+ Is this a BREAKING change?
44
+ - [ ] Removed required field? **YES** → BREAKING
45
+ - [ ] Changed field type? (e.g., string → number) **YES** → BREAKING
46
+ - [ ] Changed response structure? **YES** → BREAKING
47
+ - [ ] Changed endpoint URL? **YES** → BREAKING
48
+ - [ ] Changed error codes? **YES** → BREAKING
49
+
50
+ If ANY yes: **MARK AS BREAKING** (requires manual review gate)
51
+
52
+ Is this a FEATURE change?
53
+ - [ ] Added new optional field? **YES** → FEATURE
54
+ - [ ] Added new endpoint? **YES** → FEATURE
55
+ - [ ] Made required field optional? **YES** → FEATURE (backward compatible)
56
+ - [ ] Added new error code? **YES** → FEATURE
57
+
58
+ If ANY yes: **MARK AS FEATURE** (auto-update OK, provide migration guide)
59
+
60
+ Otherwise: **MARK AS BUG_FIX or INTERNAL**
61
+
62
+ ---
63
+
64
+ ## 🔄 Phase 2: Test File Changes
65
+
66
+ ### If Test Files Changed (tests/unit, tests/integration, playwright/e2e)
67
+
68
+ **Test Validation**:
69
+ - [ ] All tests passing (must have 0 failures)
70
+ - [ ] Test file has clear description of what's being tested
71
+ - [ ] New test cases have proper setup/teardown
72
+ - [ ] Mock data matches expected schema
73
+ - [ ] No hardcoded IDs or timestamps (use factories)
74
+
75
+ **Doc Requirements**:
76
+ - [ ] If new integration test: Add scenario to IMPLEMENTATION.md
77
+ - [ ] If new E2E test: Add user flow to docs
78
+ - [ ] SPEC_CHANGELOG.md: Add "Test Coverage" section if new major scenario
79
+ - [ ] Update test coverage % in IMPLEMENTATION_HANDOFF.md
80
+
81
+ **Test Categorization**:
82
+ - [ ] Unit tests: Testing individual functions
83
+ - [ ] Integration tests: Testing API endpoint + database
84
+ - [ ] E2E tests: Testing user flows across UI + API
85
+ - [ ] Performance tests: Testing response times
86
+ - [ ] Error tests: Testing error handling
87
+
88
+ ---
89
+
90
+ ## 💾 Phase 3: Backend Implementation Changes
91
+
92
+ ### If Backend Files Changed (src/api/handlers, src/services, src/database)
93
+
94
+ **Code Quality**:
95
+ - [ ] Code has docstrings/comments explaining logic
96
+ - [ ] Error handling is explicit (no silent failures)
97
+ - [ ] Database queries are indexed (if new queries)
98
+ - [ ] Performance is acceptable (check test results for timing)
99
+ - [ ] Security implications noted (auth, validation, SQL injection)
100
+
101
+ **Doc Requirements**:
102
+ - [ ] API_REFERENCE.md: Updated if endpoint changed
103
+ - [ ] IMPLEMENTATION.md: Added key code locations
104
+ - [ ] ARCHITECTURE.md: Updated if data flow changed
105
+ - [ ] SPEC_CHANGELOG.md: Entry with implementation notes
106
+ - [ ] IMPLEMENTATION_HANDOFF.md: Updated with next steps
107
+ - [ ] Docstrings: Added/updated for public methods
108
+
109
+ **Implementation Category**:
110
+ - [ ] New handler: Needs full API docs + implementation guide
111
+ - [ ] Modified handler: Needs updated API docs + changelog
112
+ - [ ] New service: Needs architecture docs + implementation guide
113
+ - [ ] Modified service: Needs updated architecture docs
114
+ - [ ] Database change: Needs migration guide + schema docs
115
+ - [ ] Error handling: Needs error code documentation
116
+
117
+ ---
118
+
119
+ ## 📱 Phase 4: SDK/Client Changes
120
+
121
+ ### If SDK Files Changed (src/client/*, src/types/*)
122
+
123
+ **Type Validation**:
124
+ - [ ] All TypeScript types compile without errors
125
+ - [ ] Type definitions match backend schema (Phase 3)
126
+ - [ ] No `any` types without justification
127
+ - [ ] Generic types properly constrained
128
+ - [ ] Deprecation warnings added for old methods
129
+
130
+ **Doc Requirements**:
131
+ - [ ] API Reference: Updated with new methods
132
+ - [ ] Type definitions documented with examples
133
+ - [ ] SPEC_CHANGELOG.md: Entry with SDK changes
134
+ - [ ] IMPLEMENTATION_HANDOFF.md: Updated with next phase steps
135
+ - [ ] Migration guide: Provided if breaking change
136
+ - [ ] Code examples: Added in docs for new methods
137
+
138
+ **SDK Change Type**:
139
+ - [ ] New method: Needs documentation + example
140
+ - [ ] Modified method: Needs updated documentation
141
+ - [ ] Deprecated method: Needs migration guide
142
+ - [ ] New type: Needs type reference documentation
143
+ - [ ] Type change: Breaking change, needs migration guide
144
+
145
+ ---
146
+
147
+ ## 🎯 Phase 5: E2E Test Changes
148
+
149
+ ### If E2E Test Files Changed (playwright/e2e/*.spec.ts)
150
+
151
+ **Test Scenario Validation**:
152
+ - [ ] Each scenario tests a complete user flow
153
+ - [ ] Scenarios are independent (no test ordering)
154
+ - [ ] Assertions match expected behavior
155
+ - [ ] Error scenarios included (not just happy path)
156
+ - [ ] Page objects used (not hardcoded selectors)
157
+
158
+ **Doc Requirements**:
159
+ - [ ] User flows documented in IMPLEMENTATION.md
160
+ - [ ] Scenario names match documentation
161
+ - [ ] SPEC_CHANGELOG.md: New scenarios noted
162
+ - [ ] IMPLEMENTATION_HANDOFF.md: Test coverage updated
163
+ - [ ] Examples provided for each scenario
164
+
165
+ **Scenario Classification**:
166
+ - [ ] Happy path: Normal user flow
167
+ - [ ] Error case: User makes mistake
168
+ - [ ] Edge case: Unusual but valid scenario
169
+ - [ ] Regression: Previous bug that came back
170
+ - [ ] Performance: Testing under load
171
+
172
+ ---
173
+
174
+ ## ✅ Cross-Phase Consistency Check
175
+
176
+ ### Contract ↔ Implementation Alignment
177
+
178
+ - [ ] Phase 1 endpoint in API contract → Phase 3 handler exists?
179
+ - [ ] Phase 1 request schema → Phase 3 validation matches?
180
+ - [ ] Phase 1 response schema → Phase 3 handler response matches?
181
+ - [ ] Phase 1 error codes → Phase 3 error handling matches?
182
+ - [ ] Phase 1 response fields → Phase 2 test mocks match?
183
+
184
+ **If misaligned**: 🔴 STOP - Document conflict in DOCS_UPDATE_LOG.md
185
+
186
+ ### Implementation ↔ SDK Alignment
187
+
188
+ - [ ] Phase 3 API response → Phase 4 type definitions match?
189
+ - [ ] Phase 3 error codes → Phase 4 error handling matches?
190
+ - [ ] Phase 3 data flow → Phase 4 client flow matches?
191
+ - [ ] New Phase 3 fields → Phase 4 types include them?
192
+
193
+ **If misaligned**: 🔴 STOP - Document conflict in DOCS_UPDATE_LOG.md
194
+
195
+ ### SDK ↔ E2E Alignment
196
+
197
+ - [ ] Phase 4 SDK methods → Phase 5 E2E tests use them?
198
+ - [ ] Phase 4 type definitions → Phase 5 test data matches?
199
+ - [ ] Phase 4 error handling → Phase 5 error scenarios match?
200
+
201
+ **If misaligned**: 🔴 STOP - Document conflict in DOCS_UPDATE_LOG.md
202
+
203
+ ---
204
+
205
+ ## 🚨 Manual Review Decision Gate
206
+
207
+ If ANY of these apply, require manual review (don't auto-proceed):
208
+
209
+ ### 🔴 ALWAYS MANUAL (Critical)
210
+
211
+ - [ ] **BREAKING change** detected (field removed, type changed, etc.)
212
+ - [ ] **Phase misalignment** detected (contract ≠ implementation)
213
+ - [ ] **Security change** (auth, validation, encryption related)
214
+ - [ ] **Database schema change** (new table, column removal)
215
+ - [ ] **Error code change** (new error, changed error behavior)
216
+ - [ ] **Performance regression** (response time increased >10%)
217
+ - [ ] **Deprecated endpoint** without migration guide
218
+
219
+ ### 🟡 MANUAL RECOMMENDED (High Value)
220
+
221
+ - [ ] **New public API** (new endpoint or public method)
222
+ - [ ] **Architecture change** (new service, new module, data flow change)
223
+ - [ ] **Significant refactoring** (>50 lines changed in critical path)
224
+ - [ ] **Third-party library update** (new dependency or major version bump)
225
+ - [ ] **Cross-phase impact** (changes affect multiple phases)
226
+
227
+ ### 🟢 AUTO OK (Standard)
228
+
229
+ - [ ] Feature addition (new optional field, new optional method)
230
+ - [ ] Bug fix (behavior corrected, backward compatible)
231
+ - [ ] Test addition (new test cases for existing features)
232
+ - [ ] Documentation update (comments, examples, guides)
233
+ - [ ] Internal refactoring (no behavior change, single module)
234
+
235
+ ---
236
+
237
+ ## 📝 Docs Completeness Checklist
238
+
239
+ ### If Documentation Update Flagged, Verify:
240
+
241
+ **API Documentation**:
242
+ - [ ] All endpoints documented (GET, POST, PUT, DELETE)
243
+ - [ ] Request parameters documented (required, optional, types)
244
+ - [ ] Response schema documented with example JSON
245
+ - [ ] Error codes documented (code, message, cause, resolution)
246
+ - [ ] Code examples in 2+ languages (JavaScript, Python)
247
+ - [ ] Rate limits noted (if applicable)
248
+ - [ ] Authentication requirements noted
249
+
250
+ **Implementation Documentation**:
251
+ - [ ] File locations referenced (src/api/handlers/xxx.ts, etc.)
252
+ - [ ] Line numbers accurate (spot-check a few)
253
+ - [ ] Docstring examples compile/run
254
+ - [ ] Error handling strategy explained
255
+ - [ ] Performance characteristics noted (if critical path)
256
+ - [ ] Security implications noted (if applicable)
257
+ - [ ] Design decisions explained (why this approach?)
258
+
259
+ **Architecture Documentation**:
260
+ - [ ] Data flow diagram updated (if applicable)
261
+ - [ ] Service interactions documented
262
+ - [ ] Cache strategy documented (if added)
263
+ - [ ] External API dependencies noted
264
+ - [ ] Scalability considerations noted
265
+ - [ ] Failure scenarios documented
266
+
267
+ **Changelog Documentation**:
268
+ - [ ] Change type correct (BREAKING, FEATURE, BUG_FIX)
269
+ - [ ] Change severity matches impact
270
+ - [ ] Migration guide provided for breaking changes
271
+ - [ ] Timeline clear for deprecations
272
+ - [ ] Examples provided for new features
273
+ - [ ] Related resources linked (API ref, implementation guide)
274
+
275
+ **Handoff Documentation**:
276
+ - [ ] Phase completion status clear (✅ what's done)
277
+ - [ ] Testing checklist provided for next phase
278
+ - [ ] Known issues documented (severity, workarounds)
279
+ - [ ] Next steps clear (what Phase 4 needs to do)
280
+ - [ ] Open questions documented
281
+ - [ ] Contact info for questions
282
+
283
+ ---
284
+
285
+ ## 🎯 Final Sign-Off Checklist
286
+
287
+ Before marking docs update COMPLETE:
288
+
289
+ **Syntax Validation**:
290
+ - [ ] All markdown files compile without errors
291
+ - [ ] All code blocks properly syntax-highlighted
292
+ - [ ] All links internally valid (cross-references work)
293
+ - [ ] No broken image references
294
+ - [ ] Frontmatter (if used) valid YAML/JSON
295
+
296
+ **Content Validation**:
297
+ - [ ] No TODO markers remain (🚫 "TODO: document this")
298
+ - [ ] No placeholder text ("Placeholder for API docs")
299
+ - [ ] All examples tested (code runs without errors)
300
+ - [ ] All file paths exist (spot-check a few)
301
+ - [ ] All line numbers accurate (spot-check a few)
302
+
303
+ **Consistency Validation**:
304
+ - [ ] Terminology consistent (API vs Backend, User vs Account)
305
+ - [ ] Formatting consistent (markdown headers, code blocks)
306
+ - [ ] Tone consistent (technical, not marketing)
307
+ - [ ] All promises kept (referenced features exist)
308
+
309
+ **Phase Alignment**:
310
+ - [ ] Phase 1 contract ⊂ Phase 3 implementation ✓
311
+ - [ ] Phase 3 response ⊂ Phase 4 types ✓
312
+ - [ ] Phase 4 types ⊂ Phase 5 tests ✓
313
+ - [ ] All layers agree on field names, types ✓
314
+
315
+ **Update Complete**: ✅ Ready for commit
316
+
317
+ ---
318
+
319
+ ## 📊 Validation Results Template
320
+
321
+ ```
322
+ DOCS VALIDATION REPORT
323
+ Generated: [timestamp]
324
+ Change: [brief description]
325
+
326
+ CONTRACT CHANGES: [0-N]
327
+ - [endpoint/field] - [change type]
328
+
329
+ TEST CHANGES: [0-N]
330
+ - [test name] - [scenario]
331
+
332
+ BACKEND CHANGES: [0-N]
333
+ - [file] - [type of change]
334
+
335
+ SDK CHANGES: [0-N]
336
+ - [method/type] - [change type]
337
+
338
+ E2E CHANGES: [0-N]
339
+ - [scenario] - [user flow]
340
+
341
+ PHASE ALIGNMENT: ✅ All phases aligned
342
+ MANUAL REVIEW GATE: ⚠️ BREAKING CHANGE - Manual review required
343
+
344
+ DOCS GENERATED:
345
+ - ✅ API_REFERENCE.md updated
346
+ - ✅ IMPLEMENTATION.md updated
347
+ - ✅ ARCHITECTURE.md updated
348
+ - ✅ SPEC_CHANGELOG.md entry added
349
+ - ⚠️ IMPLEMENTATION_HANDOFF.md incomplete (flagged for manual review)
350
+
351
+ STATUS: ⚠️ CONDITIONAL COMPLETE
352
+ - Auto-update: ✅ DONE
353
+ - Manual review: ⏳ REQUIRED (breaking change gate)
354
+ - Ready for commit: ❌ NO (awaiting manual approval)
355
+ ```
356
+
357
+ ---
358
+
359
+ **Last Updated**: May 31, 2026 | **Status**: ACTIVE