codex-genesis-harness 0.1.1 → 0.1.5

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 (184) hide show
  1. package/.codebase/ARCHITECTURE_REVIEW_COMPLETE.md +216 -0
  2. package/.codebase/CURRENT_STATE.md +4 -5
  3. package/.codebase/DOMAIN_MODELS.md +5 -3
  4. package/.codebase/FILE_NAMING_CLARIFICATION.md +161 -0
  5. package/.codebase/HARNESS_COMPLETENESS_AUDIT.md +613 -0
  6. package/.codebase/IMPLEMENTATION_COMPLETE.md +429 -0
  7. package/.codebase/IMPLEMENTATION_HANDOFF.md +351 -0
  8. package/.codebase/IMPROVEMENTS_SUMMARY.md +419 -0
  9. package/.codebase/PHASE3_SKILLS_NAMING_COMPLETE.md +292 -0
  10. package/.codebase/PHASE_DEPENDENCY_MAP.md +486 -0
  11. package/.codebase/QUICK_START_SPEC_IMPACT.md +456 -0
  12. package/.codebase/README.md +139 -0
  13. package/.codebase/RECOVERY_POINTS.md +438 -0
  14. package/.codebase/state.json +37 -0
  15. package/.codex/skills/genesis-api-sync/SKILL.md +354 -0
  16. package/.codex/skills/genesis-api-sync/agents/openai.yaml +7 -0
  17. package/.codex/skills/genesis-api-sync/checklists/api-sync-checklist.md +101 -0
  18. package/.codex/skills/genesis-api-sync/examples/example.md +68 -0
  19. package/.codex/skills/genesis-api-sync/templates/api-change-template.md +257 -0
  20. package/.codex/skills/genesis-debug-guide/SKILL.md +479 -0
  21. package/.codex/skills/genesis-debug-guide/agents/openai.yaml +7 -0
  22. package/.codex/skills/genesis-debug-guide/checklists/flaky-test-investigation.md +339 -0
  23. package/.codex/skills/genesis-debug-guide/checklists/production-bug-debug.md +210 -0
  24. package/.codex/skills/genesis-debug-guide/checklists/test-failure-debug.md +158 -0
  25. package/.codex/skills/genesis-debug-guide/examples/example.md +48 -0
  26. package/.codex/skills/genesis-debug-guide/observability/debug-commands.md +365 -0
  27. package/.codex/skills/genesis-debug-guide/playbooks/unit-test-failures.md +289 -0
  28. package/.codex/skills/genesis-debug-guide/templates/debug-investigation-log.md +288 -0
  29. package/.codex/skills/genesis-docs-automation/SKILL.md +1003 -0
  30. package/.codex/skills/genesis-docs-automation/agents/openai.yaml +7 -0
  31. package/.codex/skills/genesis-docs-automation/checklists/docs-validation.md +359 -0
  32. package/.codex/skills/genesis-docs-automation/checklists/spec-alignment.md +312 -0
  33. package/.codex/skills/genesis-docs-automation/examples/example.md +59 -0
  34. package/.codex/skills/genesis-docs-automation/observability/docs-tracking.md +382 -0
  35. package/.codex/skills/genesis-docs-automation/playbooks/auto-update-flow.md +851 -0
  36. package/.codex/skills/genesis-docs-automation/playbooks/changelog-generation.md +491 -0
  37. package/.codex/skills/genesis-docs-automation/templates/changelog-entry-template.md +187 -0
  38. package/.codex/skills/genesis-docs-automation/templates/handoff-template.md +297 -0
  39. package/.codex/skills/genesis-harness/SKILL.md +743 -82
  40. package/.codex/skills/genesis-harness/checklists/bug-fix-qa.md +169 -0
  41. package/.codex/skills/genesis-harness/checklists/new-feature-qa.md +157 -0
  42. package/.codex/skills/genesis-harness/checklists/refactor-qa.md +216 -0
  43. package/.codex/skills/genesis-harness/checklists/requirements-validation.md +211 -0
  44. package/.codex/skills/genesis-harness/resources/change-impact-matrix-template.md +204 -0
  45. package/.codex/skills/genesis-harness/resources/foundation-phase-template.md +131 -0
  46. package/.codex/skills/genesis-harness/resources/phase-00-foundation-template.md +76 -0
  47. package/.codex/skills/genesis-harness/resources/post-implementation-guide.md +347 -0
  48. package/.codex/skills/genesis-harness/scripts/check-architecture-boundaries.sh +23 -23
  49. package/.codex/skills/genesis-harness/scripts/check-docs-sync.sh +24 -24
  50. package/.codex/skills/genesis-harness/scripts/check-no-debug-logs.sh +21 -21
  51. package/.codex/skills/genesis-harness/scripts/check-required-planning-files.sh +46 -46
  52. package/.codex/skills/genesis-harness/scripts/check-spec-changelog.sh +24 -24
  53. package/.codex/skills/genesis-harness/scripts/check-task-tracking.sh +25 -25
  54. package/.codex/skills/genesis-harness/scripts/compact-context.sh +54 -0
  55. package/.codex/skills/genesis-harness/scripts/create-adr.sh +74 -74
  56. package/.codex/skills/genesis-harness/scripts/create-bug.sh +160 -160
  57. package/.codex/skills/genesis-harness/scripts/create-feature.sh +217 -217
  58. package/.codex/skills/genesis-harness/scripts/detect-stack.sh +26 -26
  59. package/.codex/skills/genesis-harness/scripts/init-planning.sh +750 -719
  60. package/.codex/skills/genesis-harness/scripts/list-changed-files.sh +12 -12
  61. package/.codex/skills/genesis-harness/scripts/offload-log.sh +72 -0
  62. package/.codex/skills/genesis-harness/scripts/run-verification.sh +47 -47
  63. package/.codex/skills/genesis-harness/scripts/run-verify-loop.sh +75 -0
  64. package/.codex/skills/genesis-harness/scripts/update-state.sh +33 -33
  65. package/.codex/skills/genesis-harness-engineering/SKILL.md +159 -0
  66. package/.codex/skills/genesis-harness-engineering/checklists/checklist.md +48 -0
  67. package/.codex/skills/genesis-harness-engineering/examples/example.md +57 -0
  68. package/.codex/skills/genesis-harness-engineering/playbooks/harness-evolution.md +99 -0
  69. package/.codex/skills/genesis-harness-engineering/templates/harness-change-template.md +37 -0
  70. package/.codex/skills/genesis-observability-automation/SKILL.md +382 -0
  71. package/.codex/skills/genesis-observability-automation/agents/openai.yaml +7 -0
  72. package/.codex/skills/genesis-observability-automation/examples/example.md +86 -0
  73. package/.codex/skills/genesis-performance-profiling/SKILL.md +510 -0
  74. package/.codex/skills/genesis-performance-profiling/agents/openai.yaml +6 -0
  75. package/.codex/skills/genesis-performance-profiling/checklists/optimization-verification.md +199 -0
  76. package/.codex/skills/genesis-performance-profiling/checklists/performance-baseline.md +183 -0
  77. package/.codex/skills/genesis-performance-profiling/examples/example.md +234 -0
  78. package/.codex/skills/genesis-performance-profiling/observability/performance-tracking.md +202 -0
  79. package/.codex/skills/genesis-performance-profiling/playbooks/load-testing-orchestration.md +593 -0
  80. package/.codex/skills/genesis-performance-profiling/playbooks/profiling-playbook.md +601 -0
  81. package/.codex/skills/genesis-performance-profiling/templates/load-test-config-template.md +428 -0
  82. package/.codex/skills/genesis-performance-profiling/templates/performance-report-template.md +238 -0
  83. package/.codex/skills/genesis-release-orchestration/SKILL.md +653 -0
  84. package/.codex/skills/genesis-release-orchestration/agents/openai.yaml +7 -0
  85. package/.codex/skills/genesis-release-orchestration/checklists/post-deployment-verification.md +274 -0
  86. package/.codex/skills/genesis-release-orchestration/checklists/pre-release-validation.md +220 -0
  87. package/.codex/skills/genesis-release-orchestration/examples/example.md +78 -0
  88. package/.codex/skills/genesis-release-orchestration/observability/release-tracking.md +253 -0
  89. package/.codex/skills/genesis-release-orchestration/playbooks/canary-deployment-orchestration.md +472 -0
  90. package/.codex/skills/genesis-release-orchestration/playbooks/semantic-versioning-automation.md +494 -0
  91. package/.codex/skills/genesis-release-orchestration/templates/deployment-strategy-template.md +303 -0
  92. package/.codex/skills/genesis-release-orchestration/templates/release-runbook-template.md +420 -0
  93. package/.codex/skills/genesis-research-first/SKILL.md +237 -0
  94. package/.codex/skills/genesis-research-first/agents/openai.yaml +7 -0
  95. package/.codex/skills/genesis-research-first/examples/example.md +85 -0
  96. package/.codex/skills/genesis-spec-propagation/SKILL.md +534 -0
  97. package/.codex/skills/genesis-spec-propagation/agents/openai.yaml +7 -0
  98. package/.codex/skills/genesis-spec-propagation/checklists/phase-update-verification.md +384 -0
  99. package/.codex/skills/genesis-spec-propagation/checklists/spec-change-detection.md +257 -0
  100. package/.codex/skills/genesis-spec-propagation/examples/example.md +63 -0
  101. package/.codex/skills/genesis-spec-propagation/observability/propagation-tracking.md +373 -0
  102. package/.codex/skills/genesis-spec-propagation/playbooks/breaking-change-propagation.md +692 -0
  103. package/.codex/skills/genesis-spec-propagation/playbooks/feature-change-propagation.md +434 -0
  104. package/.codex/skills/genesis-spec-propagation/templates/migration-guide-template.md +407 -0
  105. package/.codex/skills/genesis-state-machine/SKILL.md +34 -0
  106. package/.codex/skills/spec-impact-engine/SKILL.md +504 -0
  107. package/.codex/skills/spec-impact-engine/agents/openai.yaml +7 -0
  108. package/.codex/skills/spec-impact-engine/detect-spec-changes.sh +262 -0
  109. package/.codex/skills/spec-impact-engine/examples/example.md +98 -0
  110. package/.codex/skills/spec-impact-engine/templates/impact-report.md +248 -0
  111. package/.codex/skills/spec-impact-engine/templates/migration-guide.md +223 -0
  112. package/.codex-plugin/plugin.json +7 -7
  113. package/README.EN.md +730 -0
  114. package/README.VI.md +723 -0
  115. package/README.md +266 -107
  116. package/VERSION +1 -1
  117. package/bin/genesis-harness.js +20 -11
  118. package/package.json +62 -43
  119. package/scripts/README.md +342 -0
  120. package/scripts/compact-context.sh +54 -0
  121. package/scripts/detect-changes.sh +152 -0
  122. package/scripts/install.sh +50 -41
  123. package/scripts/offload-log.sh +72 -0
  124. package/scripts/run-evals.sh +70 -43
  125. package/scripts/run-verify-loop.sh +75 -0
  126. package/scripts/transition_state.sh +67 -0
  127. package/scripts/uninstall.sh +52 -43
  128. package/scripts/validation_gates.sh +46 -0
  129. package/scripts/verify.sh +165 -73
  130. package/.codex/skills/harness-engineering-skill/SKILL.md +0 -45
  131. package/.codex/skills/harness-engineering-skill/checklists/checklist.md +0 -8
  132. package/.codex/skills/harness-engineering-skill/examples/example.md +0 -4
  133. package/.codex/skills/harness-engineering-skill/templates/harness-change-template.md +0 -8
  134. /package/.codex/skills/{ai-provider-skill → genesis-ai-provider}/SKILL.md +0 -0
  135. /package/.codex/skills/{ai-provider-skill → genesis-ai-provider}/agents/openai.yaml +0 -0
  136. /package/.codex/skills/{ai-provider-skill → genesis-ai-provider}/checklists/checklist.md +0 -0
  137. /package/.codex/skills/{ai-provider-skill → genesis-ai-provider}/examples/example.md +0 -0
  138. /package/.codex/skills/{ai-provider-skill → genesis-ai-provider}/templates/provider-contract-template.md +0 -0
  139. /package/.codex/skills/{api-contract-skill → genesis-api-contract}/SKILL.md +0 -0
  140. /package/.codex/skills/{api-contract-skill → genesis-api-contract}/agents/openai.yaml +0 -0
  141. /package/.codex/skills/{api-contract-skill → genesis-api-contract}/checklists/checklist.md +0 -0
  142. /package/.codex/skills/{api-contract-skill → genesis-api-contract}/examples/example.md +0 -0
  143. /package/.codex/skills/{api-contract-skill → genesis-api-contract}/templates/api-contract-template.md +0 -0
  144. /package/.codex/skills/{architecture-skill → genesis-architecture}/SKILL.md +0 -0
  145. /package/.codex/skills/{architecture-skill → genesis-architecture}/agents/openai.yaml +0 -0
  146. /package/.codex/skills/{architecture-skill → genesis-architecture}/checklists/checklist.md +0 -0
  147. /package/.codex/skills/{architecture-skill → genesis-architecture}/examples/example.md +0 -0
  148. /package/.codex/skills/{architecture-skill → genesis-architecture}/templates/architecture-decision-template.md +0 -0
  149. /package/.codex/skills/{codebase-map-skill → genesis-codebase-map}/SKILL.md +0 -0
  150. /package/.codex/skills/{codebase-map-skill → genesis-codebase-map}/agents/openai.yaml +0 -0
  151. /package/.codex/skills/{codebase-map-skill → genesis-codebase-map}/checklists/checklist.md +0 -0
  152. /package/.codex/skills/{codebase-map-skill → genesis-codebase-map}/examples/example.md +0 -0
  153. /package/.codex/skills/{codebase-map-skill → genesis-codebase-map}/templates/map-update-template.md +0 -0
  154. /package/.codex/skills/{design-spec-skill → genesis-design-spec}/SKILL.md +0 -0
  155. /package/.codex/skills/{design-spec-skill → genesis-design-spec}/agents/openai.yaml +0 -0
  156. /package/.codex/skills/{design-spec-skill → genesis-design-spec}/checklists/checklist.md +0 -0
  157. /package/.codex/skills/{design-spec-skill → genesis-design-spec}/examples/example.md +0 -0
  158. /package/.codex/skills/{design-spec-skill → genesis-design-spec}/templates/design-spec-template.md +0 -0
  159. /package/.codex/skills/{docs-skill → genesis-docs}/SKILL.md +0 -0
  160. /package/.codex/skills/{docs-skill → genesis-docs}/agents/openai.yaml +0 -0
  161. /package/.codex/skills/{docs-skill → genesis-docs}/checklists/checklist.md +0 -0
  162. /package/.codex/skills/{docs-skill → genesis-docs}/examples/example.md +0 -0
  163. /package/.codex/skills/{docs-skill → genesis-docs}/templates/docs-update-template.md +0 -0
  164. /package/.codex/skills/{harness-engineering-skill → genesis-harness-engineering}/agents/openai.yaml +0 -0
  165. /package/.codex/skills/{pipeline-orchestration-skill → genesis-pipeline-orchestration}/SKILL.md +0 -0
  166. /package/.codex/skills/{pipeline-orchestration-skill → genesis-pipeline-orchestration}/agents/openai.yaml +0 -0
  167. /package/.codex/skills/{pipeline-orchestration-skill → genesis-pipeline-orchestration}/checklists/checklist.md +0 -0
  168. /package/.codex/skills/{pipeline-orchestration-skill → genesis-pipeline-orchestration}/examples/example.md +0 -0
  169. /package/.codex/skills/{pipeline-orchestration-skill → genesis-pipeline-orchestration}/templates/orchestration-template.md +0 -0
  170. /package/.codex/skills/{planning-skill → genesis-planning}/SKILL.md +0 -0
  171. /package/.codex/skills/{planning-skill → genesis-planning}/agents/openai.yaml +0 -0
  172. /package/.codex/skills/{planning-skill → genesis-planning}/checklists/checklist.md +0 -0
  173. /package/.codex/skills/{planning-skill → genesis-planning}/examples/example.md +0 -0
  174. /package/.codex/skills/{planning-skill → genesis-planning}/templates/plan-template.md +0 -0
  175. /package/.codex/skills/{release-skill → genesis-release}/SKILL.md +0 -0
  176. /package/.codex/skills/{release-skill → genesis-release}/agents/openai.yaml +0 -0
  177. /package/.codex/skills/{release-skill → genesis-release}/checklists/checklist.md +0 -0
  178. /package/.codex/skills/{release-skill → genesis-release}/examples/example.md +0 -0
  179. /package/.codex/skills/{release-skill → genesis-release}/templates/release-checklist-template.md +0 -0
  180. /package/.codex/skills/{research-skill → genesis-research}/SKILL.md +0 -0
  181. /package/.codex/skills/{research-skill → genesis-research}/agents/openai.yaml +0 -0
  182. /package/.codex/skills/{research-skill → genesis-research}/checklists/checklist.md +0 -0
  183. /package/.codex/skills/{research-skill → genesis-research}/examples/example.md +0 -0
  184. /package/.codex/skills/{research-skill → genesis-research}/templates/research-note-template.md +0 -0
@@ -0,0 +1,456 @@
1
+ # Quick Start: Using the New Spec Impact System
2
+
3
+ **Goal**: Understand how to use the new automatic spec propagation features
4
+
5
+ ---
6
+
7
+ ## Scenario 1: API Change During Development
8
+
9
+ ### What Happens
10
+
11
+ You're in Phase 1 (Auth system). You modify an API endpoint:
12
+
13
+ ```
14
+ Before: GET /api/users/:id → { name, email, role }
15
+ After: GET /api/users/:id → { id, name, email, roles[] }
16
+ ```
17
+
18
+ ### What You Do
19
+
20
+ ```bash
21
+ # 1. Commit your changes
22
+ git add .planning/API_DOCS.md
23
+ git commit -m "feat: add roles array to user API endpoint"
24
+ git push
25
+
26
+ # OR manually trigger impact analysis
27
+ /spec-change .planning/API_DOCS.md
28
+ ```
29
+
30
+ ### What Happens Automatically
31
+
32
+ ```
33
+ GitHub Actions triggers:
34
+ ✓ Tests run (verify your change works)
35
+ ✓ spec-impact-engine detects breaking change
36
+ ✓ Finds Phase 2, 3, 4 depend on this API
37
+ ✓ Auto-updates Phase 2 SPEC.md (your API call examples)
38
+ ✓ Auto-updates Phase 2 TEST_CONTRACT.md (5 tests updated)
39
+ ✓ Auto-updates Phase 3 SPEC.md (2 API calls updated)
40
+ ✓ Auto-updates Phase 3 TEST_CONTRACT.md (8 tests updated)
41
+ ✓ Runs tests in Phase 2 and 3 (both pass)
42
+ ✓ Creates .codebase/IMPACT_REPORT_2026-05-30_14-30.md
43
+ ✓ Auto-commits: "docs: auto-sync Phase 2,3 specs after API change [CI]"
44
+ ✓ Auto-updates CURRENT_STATE.md: "Propagated to 2 phases"
45
+ ```
46
+
47
+ ### What You See
48
+
49
+ Email/notification:
50
+ ```
51
+ ✓ API Change Impact Report
52
+ Breaking change detected: GET /api/users/:id response format
53
+
54
+ Affected phases:
55
+ - Phase 2: Updated 1 spec, 5 tests ✓
56
+ - Phase 3: Updated 2 specs, 8 tests ✓
57
+ - Phase 4: 1 related API call reviewed (manual)
58
+
59
+ Timeline impact: +0 hours
60
+ Status: Ready to proceed
61
+
62
+ Developers: Phase 2 and 3 specs already updated!
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Scenario 2: Database Schema Change
68
+
69
+ ### What Happens
70
+
71
+ You're in Phase 2 (Product Catalog). You add a field to products:
72
+
73
+ ```sql
74
+ ALTER TABLE products ADD COLUMN category_id UUID;
75
+ ```
76
+
77
+ ### What You Do
78
+
79
+ ```bash
80
+ # Update your implementation files
81
+ git add src/models/Product.ts
82
+ git add .planning/ARCHITECTURE.md
83
+ git commit -m "feat: add product categorization"
84
+ git push
85
+
86
+ # GitHub Actions triggers automatically
87
+ ```
88
+
89
+ ### What Happens Automatically
90
+
91
+ ```
92
+ Spec-impact-engine:
93
+ ✓ Detects ARCHITECTURE.md changed
94
+ ✓ Detects database schema modified
95
+ ✓ Severity: MEDIUM (potential downstream impact)
96
+ ✓ Finds Phase 3 queries need category_id
97
+ ✓ Finds Phase 4 admin dashboard needs category column
98
+
99
+ Auto-update Phase 3:
100
+ ✓ SPEC.md: updated product queries
101
+ ✓ TEST_CONTRACT.md: added category assertions
102
+
103
+ Flag for review Phase 4:
104
+ ⚠️ Admin dashboard may need category column
105
+ ⚠️ Manual review recommended
106
+
107
+ Impact report:
108
+ - Auto-updated: 1 phase
109
+ - Manual review needed: 1 phase
110
+ - Timeline impact: +30 min (Phase 4 review)
111
+ ```
112
+
113
+ ### What Phase 3 Developer Sees
114
+
115
+ ```
116
+ Morning update: Phase 3 spec automatically updated!
117
+
118
+ What changed:
119
+ - Added: Product queries now include category_id
120
+ - Added: 3 new test cases for category filtering
121
+ - Status: Tests already passing ✓
122
+
123
+ Your action:
124
+ - Read updated SPEC.md (5 min)
125
+ - Confirm changes make sense
126
+ - Continue implementation
127
+
128
+ Time saved: 1 hour (you would have discovered this later)
129
+ ```
130
+
131
+ ---
132
+
133
+ ## Scenario 3: Manually Trigger Impact Analysis
134
+
135
+ ### When to Use
136
+
137
+ Sometimes you want to manually check impact before committing:
138
+
139
+ ```bash
140
+ # Analyze impact of a spec change WITHOUT committing
141
+ /spec-change .planning/REQUIREMENTS.md
142
+ ```
143
+
144
+ ### What You Get
145
+
146
+ ```
147
+ Spec Change Analysis
148
+
149
+ File: .planning/REQUIREMENTS.md
150
+ Changed section: Shopping Cart Behavior
151
+
152
+ Old spec: "Cart should persist 1 hour"
153
+ New spec: "Cart should persist 7 days"
154
+
155
+ Severity: LOW (not breaking, backward compatible)
156
+
157
+ Affected phases:
158
+ - Phase 3: Cart logic exists
159
+ Impact: MEDIUM (needs new cleanup job)
160
+ Action: Update PLAN.md, add background job task
161
+
162
+ - Phase 4: Payments uses cart
163
+ Impact: LOW (no change needed)
164
+ Action: None
165
+
166
+ - Phase 5: Admin views cart data
167
+ Impact: LOW (no change needed)
168
+ Action: None
169
+
170
+ Recommendation:
171
+ This change requires Phase 3 update.
172
+ Timeline impact: +2 hours (add cleanup job)
173
+
174
+ Ready to proceed? Run:
175
+ /propagate-spec
176
+ ```
177
+
178
+ ---
179
+
180
+ ## Scenario 4: Resume Work After Interruption
181
+
182
+ ### You Paused Phase 3 Last Week
183
+
184
+ ```
185
+ Last week: Phase 3 implementation paused mid-way
186
+
187
+ Questions:
188
+ - Did Phase 1 or 2 specs change while I was gone?
189
+ - Are Phase 3 requirements still current?
190
+ - What should I work on now?
191
+ ```
192
+
193
+ ### What You Do
194
+
195
+ ```bash
196
+ /validate-specs
197
+
198
+ # Checks all phases for alignment
199
+ ```
200
+
201
+ ### What You Get
202
+
203
+ ```
204
+ ✓ Spec Alignment Check
205
+
206
+ Phase 1 Status: ✓ Current (last updated 2 days ago)
207
+ Phase 2 Status: ⚠️ Stale (last updated 5 days ago)
208
+ - API changes: 2 endpoints modified
209
+ - Phase 2 specs reflect changes ✓
210
+
211
+ Phase 3 Status: ❌ MISALIGNED
212
+ - Depends on Phase 2 API
213
+ - Phase 3 spec: 5 days old
214
+ - Phase 2 changed: 2 days ago
215
+ - SPEC DRIFT DETECTED
216
+
217
+ Missing updates:
218
+ - Product API response format changed
219
+ - Phase 3 still expects old format
220
+
221
+ Action needed:
222
+ Run: /propagate-spec
223
+ Then run: Phase 3 tests
224
+
225
+ Time: 30 min to sync, 1 hour testing
226
+
227
+ Phase 4 & 5: ✓ OK (no upstream changes)
228
+
229
+ Recommendation:
230
+ 1. Run /propagate-spec (auto-sync)
231
+ 2. Run Phase 3 tests
232
+ 3. Continue from RECOVERY_POINTS.md
233
+ ```
234
+
235
+ ---
236
+
237
+ ## Scenario 5: Check Project Health
238
+
239
+ ### What You Want to Know
240
+
241
+ ```
242
+ - Are all phases still aligned?
243
+ - Any cascading failures waiting?
244
+ - What's the current project status?
245
+ - Timeline risks?
246
+ ```
247
+
248
+ ### What You Do
249
+
250
+ ```bash
251
+ /validate-specs
252
+ ```
253
+
254
+ ### What You Get
255
+
256
+ ```
257
+ Comprehensive Spec Validation Report
258
+
259
+ Project Health: ⚠️ MEDIUM RISK
260
+ 2 phases need attention
261
+
262
+ Phase 1 (Auth): ✓ Current
263
+ Phase 2 (Products): ⚠️ Stale (5 days)
264
+ - Spec age: 5 days
265
+ - Last upstream change: 3 days ago
266
+ - Updates applied: NO
267
+ - Action: Run /propagate-spec
268
+
269
+ Phase 3 (Cart): ⚠️ BLOCKED
270
+ - Cannot start until Phase 2 aligned
271
+ - Phase 2 has 2 pending spec changes
272
+ - Estimated unblock time: 30 min
273
+
274
+ Phase 4 (Payments): ✓ Ready (Phase 3 not started yet)
275
+ Phase 5 (Admin): ✓ Waiting (Phase 4 dependency)
276
+
277
+ Critical Path: Phase 1 → Phase 2 → Phase 3 → Phase 4 → Phase 5
278
+
279
+ Timeline Impact:
280
+ Phase 2 misalignment: +30 min
281
+ Phase 3 blocked: +1.5 hours
282
+
283
+ Current delay: +2 hours from ideal timeline
284
+
285
+ Recommendations:
286
+ 1. URGENT: Run /propagate-spec (30 min)
287
+ 2. Validate Phase 3 tests pass (1 hour)
288
+ 3. Unblock Phase 3 work
289
+ 4. Project back on track
290
+
291
+ Next steps:
292
+ /propagate-spec
293
+ Then: Run Phase 2 and 3 tests
294
+ Then: Resume Phase 3 development
295
+ ```
296
+
297
+ ---
298
+
299
+ ## Command Reference
300
+
301
+ ### `/spec-change <file>`
302
+
303
+ **Purpose**: Detect impact of a single spec change
304
+
305
+ ```bash
306
+ /spec-change .planning/API_DOCS.md
307
+ /spec-change .planning/ARCHITECTURE.md
308
+ /spec-change .planning/REQUIREMENTS.md
309
+ ```
310
+
311
+ **Output**: Impact report with affected phases, severity, recommendations
312
+
313
+ **Time**: 1-2 minutes
314
+
315
+ ---
316
+
317
+ ### `/propagate-spec`
318
+
319
+ **Purpose**: Auto-update ALL downstream phases for pending spec changes
320
+
321
+ ```bash
322
+ /propagate-spec
323
+ ```
324
+
325
+ **What it does**:
326
+ 1. Scans SPEC_CHANGELOG.md for unpropagated changes
327
+ 2. Auto-updates all affected phase specs
328
+ 3. Auto-updates all affected test contracts
329
+ 4. Runs validation tests
330
+ 5. Generates migration guides
331
+ 6. Commits changes
332
+ 7. Creates comprehensive report
333
+
334
+ **Output**: Updated phase specs, passed tests, impact report
335
+
336
+ **Time**: 5-15 minutes depending on number of phases
337
+
338
+ ---
339
+
340
+ ### `/validate-specs`
341
+
342
+ **Purpose**: Check all phases are aligned with dependencies
343
+
344
+ ```bash
345
+ /validate-specs
346
+ ```
347
+
348
+ **What it checks**:
349
+ 1. Each phase spec matches upstream outputs
350
+ 2. No stale specs detected
351
+ 3. No blocking misalignments
352
+ 4. All dependencies satisfied
353
+ 5. Timeline cascading calculated
354
+
355
+ **Output**: Alignment report, recommendations, blockers
356
+
357
+ **Time**: 2-3 minutes
358
+
359
+ ---
360
+
361
+ ## Best Practices
362
+
363
+ ### ✅ DO
364
+
365
+ - ✅ Commit your changes immediately after implementation
366
+ - ✅ Let GitHub Actions auto-sync docs
367
+ - ✅ Run `/validate-specs` before starting new phase
368
+ - ✅ Review IMPACT_REPORT.md for breaking changes
369
+ - ✅ Run phase tests after auto-updates
370
+
371
+ ### ❌ DON'T
372
+
373
+ - ❌ Manually update downstream phase specs (auto-engine does it)
374
+ - ❌ Skip `/validate-specs` before phase start
375
+ - ❌ Commit without running tests first
376
+ - ❌ Ignore impact reports
377
+ - ❌ Work on multiple phases without validation
378
+
379
+ ---
380
+
381
+ ## Troubleshooting
382
+
383
+ ### Specs Not Updating?
384
+
385
+ ```bash
386
+ # Check if changes detected
387
+ git status
388
+ # Should show auto-synced files
389
+
390
+ # Check impact report
391
+ ls -la .codebase/IMPACT_REPORT*.md
392
+
393
+ # Manually trigger if needed
394
+ /propagate-spec
395
+ ```
396
+
397
+ ### Tests Failing After Auto-Update?
398
+
399
+ ```bash
400
+ # Review what changed
401
+ cat .codebase/IMPACT_REPORT_*.md
402
+
403
+ # Read updated test contract
404
+ cat .planning/features/NNN/TEST_CONTRACT.md
405
+
406
+ # Run specific test
407
+ npm test -- Phase3
408
+
409
+ # If still broken, revert and review manually
410
+ git revert HEAD
411
+ /spec-change .planning/API_DOCS.md
412
+ ```
413
+
414
+ ### Need to Understand What Changed?
415
+
416
+ ```bash
417
+ # View detailed impact report
418
+ cat .codebase/IMPACT_REPORT_latest.md
419
+
420
+ # Check SPEC_CHANGELOG for context
421
+ grep -A 5 "$(date +%Y-%m-%d)" .planning/SPEC_CHANGELOG.md
422
+
423
+ # Review git diffs
424
+ git diff HEAD~1 .planning/
425
+ ```
426
+
427
+ ---
428
+
429
+ ## Time Tracking
430
+
431
+ **Before Automation**:
432
+ - Detect change: 5 min
433
+ - Manual update Phase 2: 1 hour
434
+ - Manual update Phase 3: 1.5 hours
435
+ - Manual update Phase 4: 45 min
436
+ - Test all phases: 1 hour
437
+ - **Total**: ~4.5 hours
438
+
439
+ **After Automation**:
440
+ - Commit change: 2 min
441
+ - Auto-detect + update: 2 min
442
+ - Tests run: 5 min
443
+ - Review impact report: 5 min
444
+ - **Total**: ~15 minutes
445
+
446
+ **Time Saved**: ~4 hours per spec change ✅
447
+
448
+ ---
449
+
450
+ ## Next: Full Harness Documentation
451
+
452
+ See:
453
+ - `.codex/skills/spec-impact-engine/SKILL.md` - Full technical details
454
+ - `.codebase/PHASE_DEPENDENCY_MAP.md` - Phase structure
455
+ - `.codebase/IMPLEMENTATION_COMPLETE.md` - What was built
456
+ - `.codex/skills/genesis-harness/SKILL.md` - Full Genesis Harness reference
@@ -0,0 +1,139 @@
1
+ # Repository Memory System
2
+
3
+ The `.codebase/` directory contains persistent, compressed documentation about the project state, architecture, and ongoing work. This is the **single source of truth** for understanding the codebase.
4
+
5
+ ## Core Reference Files
6
+
7
+ ### CURRENT_STATE.md
8
+ **What**: Snapshot of the project's current status
9
+ **Update**: After every significant change or phase completion
10
+ **When to read**: Before starting work to understand what's been done
11
+
12
+ ### MODULE_INDEX.md
13
+ **What**: Complete inventory of all modules, skills, and components
14
+ **Update**: When adding/removing modules or significant restructures
15
+ **When to read**: To find where functionality lives
16
+
17
+ ### TEST_MATRIX.md
18
+ **What**: Coverage status of all testable components
19
+ **Update**: After writing tests, every sprint
20
+ **When to read**: To identify testing gaps and priorities
21
+
22
+ ### ARCHITECTURE.md
23
+ **What**: System design, data flow, and integration points
24
+ **Update**: When architecture decisions change
25
+ **When to read**: Before major refactoring or new features
26
+
27
+ ### API_CONTRACTS.md
28
+ **What**: All API endpoints, schemas, and breaking changes
29
+ **Update**: When API changes (must update before implementation)
30
+ **When to read**: Before working on API features
31
+
32
+ ### DOMAIN_MODELS.md
33
+ **What**: Core data structures and business logic rules
34
+ **Update**: When domain models evolve
35
+ **When to read**: To understand business constraints
36
+
37
+ ### PIPELINE_FLOW.md
38
+ **What**: AI pipeline orchestration and data flow
39
+ **Update**: When pipeline configuration changes
40
+ **When to read**: To understand job execution order and dependencies
41
+
42
+ ### DEPENDENCY_GRAPH.md
43
+ **What**: Module dependencies and relationships
44
+ **Update**: When adding new dependencies or removing unused ones
45
+ **When to read**: Before major refactoring to understand impact
46
+
47
+ ### UI_ROUTES.md
48
+ **What**: Frontend routes, pages, and navigation flow
49
+ **Update**: When adding/removing pages or changing routes
50
+ **When to read**: To understand frontend structure
51
+
52
+ ### EVOLUTION_PLAN.md
53
+ **What**: Future features, roadmap, and planned changes
54
+ **Update**: During planning phases
55
+ **When to read**: To align current work with long-term goals
56
+
57
+ ### KNOWN_PROBLEMS.md
58
+ **What**: Active bugs, technical debt, and limitations
59
+ **Update**: When discovering or fixing issues
60
+ **When to read**: Before starting features (may need workarounds)
61
+
62
+ ## Context Summaries
63
+
64
+ The `context/` subdirectory contains compressed summaries for quick reference:
65
+
66
+ - `backend-summary.md` - Backend services, APIs, databases
67
+ - `frontend-summary.md` - UI structure, routes, components
68
+ - `pipeline-summary.md` - Job orchestration and data flow
69
+ - `providers-summary.md` - External services and integrations
70
+ - `render-summary.md` - Rendering engines and output formats
71
+ - `tests-summary.md` - Test coverage and strategies
72
+
73
+ **These are read-only reference documents.** Update the source files, not these summaries.
74
+
75
+ ## Maintenance Guidelines
76
+
77
+ ### Before Starting Any Task
78
+
79
+ 1. Read `CURRENT_STATE.md` - Understand what's been done
80
+ 2. Read relevant reference files based on your work type
81
+ 3. Check `KNOWN_PROBLEMS.md` - Avoid duplicating known issues
82
+
83
+ ### After Completing Work
84
+
85
+ 1. Update `CURRENT_STATE.md` with your changes
86
+ 2. Update any reference files affected by your work
87
+ 3. If you solved a known problem, remove from `KNOWN_PROBLEMS.md`
88
+ 4. Create a decision log in `../observability/decision-logs/`
89
+
90
+ ### Keeping Memory Fresh
91
+
92
+ - Do NOT let `.codebase/` files go stale
93
+ - If a file is >6 months old without updates, it's likely outdated
94
+ - Run `./scripts/verify.sh` to check consistency
95
+ - When in doubt, inspect actual code rather than trusting old docs
96
+
97
+ ## File Size Expectations
98
+
99
+ - Each file should be **2000-5000 lines MAX**
100
+ - If a file grows larger, split into subtopics
101
+ - Use `context/` subdirectory for compressed summaries
102
+ - Link to specific sections, don't duplicate content
103
+
104
+ ## Structure
105
+
106
+ ```
107
+ .codebase/
108
+ ├── README.md (this file)
109
+ ├── CURRENT_STATE.md
110
+ ├── MODULE_INDEX.md
111
+ ├── TEST_MATRIX.md
112
+ ├── ARCHITECTURE.md
113
+ ├── API_CONTRACTS.md
114
+ ├── DOMAIN_MODELS.md
115
+ ├── PIPELINE_FLOW.md
116
+ ├── DEPENDENCY_GRAPH.md
117
+ ├── UI_ROUTES.md
118
+ ├── EVOLUTION_PLAN.md
119
+ ├── KNOWN_PROBLEMS.md
120
+ └── context/
121
+ ├── backend-summary.md
122
+ ├── frontend-summary.md
123
+ ├── pipeline-summary.md
124
+ ├── providers-summary.md
125
+ ├── render-summary.md
126
+ └── tests-summary.md
127
+ ```
128
+
129
+ ## Quick Reference
130
+
131
+ | Task | Read First | Update After |
132
+ |------|-----------|--------------|
133
+ | New feature | CURRENT_STATE, EVOLUTION_PLAN | CURRENT_STATE, TEST_MATRIX |
134
+ | Bug fix | KNOWN_PROBLEMS, CURRENT_STATE | KNOWN_PROBLEMS, CURRENT_STATE |
135
+ | Refactoring | ARCHITECTURE, DEPENDENCY_GRAPH | ARCHITECTURE, DEPENDENCY_GRAPH |
136
+ | Testing | TEST_MATRIX | TEST_MATRIX, CURRENT_STATE |
137
+ | API work | API_CONTRACTS | API_CONTRACTS, CURRENT_STATE |
138
+ | Performance | PIPELINE_FLOW, DOMAIN_MODELS | CURRENT_STATE |
139
+ | Deployment | CURRENT_STATE, EVOLUTION_PLAN | CURRENT_STATE |