codex-genesis-harness 0.1.0 โ†’ 0.1.4

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 (328) hide show
  1. package/.codebase/API_CONTRACTS.md +12 -0
  2. package/.codebase/ARCHITECTURE.md +6 -0
  3. package/.codebase/ARCHITECTURE_REVIEW_COMPLETE.md +216 -0
  4. package/.codebase/CURRENT_STATE.md +8 -0
  5. package/.codebase/DEPENDENCY_GRAPH.md +14 -0
  6. package/.codebase/DOMAIN_MODELS.md +10 -0
  7. package/.codebase/EVOLUTION_PLAN.md +35 -0
  8. package/.codebase/FILE_NAMING_CLARIFICATION.md +161 -0
  9. package/.codebase/HARNESS_COMPLETENESS_AUDIT.md +613 -0
  10. package/.codebase/IMPLEMENTATION_COMPLETE.md +429 -0
  11. package/.codebase/IMPLEMENTATION_HANDOFF.md +351 -0
  12. package/.codebase/IMPROVEMENTS_SUMMARY.md +419 -0
  13. package/.codebase/KNOWN_PROBLEMS.md +6 -0
  14. package/.codebase/MODULE_INDEX.md +13 -0
  15. package/.codebase/PHASE3_SKILLS_NAMING_COMPLETE.md +292 -0
  16. package/.codebase/PHASE_DEPENDENCY_MAP.md +486 -0
  17. package/.codebase/PIPELINE_FLOW.md +14 -0
  18. package/.codebase/QUICK_START_SPEC_IMPACT.md +456 -0
  19. package/.codebase/README.md +139 -0
  20. package/.codebase/RECOVERY_POINTS.md +438 -0
  21. package/.codebase/TEST_MATRIX.md +11 -0
  22. package/.codebase/UI_ROUTES.md +4 -0
  23. package/.codebase/context/backend-summary.md +4 -0
  24. package/.codebase/context/frontend-summary.md +4 -0
  25. package/.codebase/context/pipeline-summary.md +4 -0
  26. package/.codebase/context/providers-summary.md +4 -0
  27. package/.codebase/context/render-summary.md +4 -0
  28. package/.codebase/context/tests-summary.md +4 -0
  29. package/.codex/skills/genesis-ai-provider/SKILL.md +46 -0
  30. package/.codex/skills/genesis-ai-provider/agents/openai.yaml +7 -0
  31. package/.codex/skills/genesis-ai-provider/checklists/checklist.md +9 -0
  32. package/.codex/skills/genesis-ai-provider/examples/example.md +4 -0
  33. package/.codex/skills/genesis-ai-provider/templates/provider-contract-template.md +9 -0
  34. package/.codex/skills/genesis-api-contract/SKILL.md +46 -0
  35. package/.codex/skills/genesis-api-contract/agents/openai.yaml +7 -0
  36. package/.codex/skills/genesis-api-contract/checklists/checklist.md +8 -0
  37. package/.codex/skills/genesis-api-contract/examples/example.md +4 -0
  38. package/.codex/skills/genesis-api-contract/templates/api-contract-template.md +4 -0
  39. package/.codex/skills/genesis-api-sync/SKILL.md +354 -0
  40. package/.codex/skills/genesis-api-sync/agents/openai.yaml +7 -0
  41. package/.codex/skills/genesis-api-sync/checklists/api-sync-checklist.md +101 -0
  42. package/.codex/skills/genesis-api-sync/examples/example.md +68 -0
  43. package/.codex/skills/genesis-api-sync/templates/api-change-template.md +257 -0
  44. package/.codex/skills/genesis-architecture/SKILL.md +46 -0
  45. package/.codex/skills/genesis-architecture/agents/openai.yaml +7 -0
  46. package/.codex/skills/genesis-architecture/checklists/checklist.md +8 -0
  47. package/.codex/skills/genesis-architecture/examples/example.md +4 -0
  48. package/.codex/skills/genesis-architecture/templates/architecture-decision-template.md +14 -0
  49. package/.codex/skills/genesis-codebase-map/SKILL.md +46 -0
  50. package/.codex/skills/genesis-codebase-map/agents/openai.yaml +7 -0
  51. package/.codex/skills/genesis-codebase-map/checklists/checklist.md +7 -0
  52. package/.codex/skills/genesis-codebase-map/examples/example.md +4 -0
  53. package/.codex/skills/genesis-codebase-map/templates/map-update-template.md +8 -0
  54. package/.codex/skills/genesis-debug-guide/SKILL.md +479 -0
  55. package/.codex/skills/genesis-debug-guide/agents/openai.yaml +7 -0
  56. package/.codex/skills/genesis-debug-guide/checklists/flaky-test-investigation.md +339 -0
  57. package/.codex/skills/genesis-debug-guide/checklists/production-bug-debug.md +210 -0
  58. package/.codex/skills/genesis-debug-guide/checklists/test-failure-debug.md +158 -0
  59. package/.codex/skills/genesis-debug-guide/examples/example.md +48 -0
  60. package/.codex/skills/genesis-debug-guide/observability/debug-commands.md +365 -0
  61. package/.codex/skills/genesis-debug-guide/playbooks/unit-test-failures.md +289 -0
  62. package/.codex/skills/genesis-debug-guide/templates/debug-investigation-log.md +288 -0
  63. package/.codex/skills/genesis-design-spec/SKILL.md +46 -0
  64. package/.codex/skills/genesis-design-spec/agents/openai.yaml +7 -0
  65. package/.codex/skills/genesis-design-spec/checklists/checklist.md +7 -0
  66. package/.codex/skills/genesis-design-spec/examples/example.md +4 -0
  67. package/.codex/skills/genesis-design-spec/templates/design-spec-template.md +9 -0
  68. package/.codex/skills/genesis-docs/SKILL.md +46 -0
  69. package/.codex/skills/genesis-docs/agents/openai.yaml +7 -0
  70. package/.codex/skills/genesis-docs/checklists/checklist.md +7 -0
  71. package/.codex/skills/genesis-docs/examples/example.md +4 -0
  72. package/.codex/skills/genesis-docs/templates/docs-update-template.md +8 -0
  73. package/.codex/skills/genesis-docs-automation/SKILL.md +1003 -0
  74. package/.codex/skills/genesis-docs-automation/agents/openai.yaml +7 -0
  75. package/.codex/skills/genesis-docs-automation/checklists/docs-validation.md +359 -0
  76. package/.codex/skills/genesis-docs-automation/checklists/spec-alignment.md +312 -0
  77. package/.codex/skills/genesis-docs-automation/examples/example.md +59 -0
  78. package/.codex/skills/genesis-docs-automation/observability/docs-tracking.md +382 -0
  79. package/.codex/skills/genesis-docs-automation/playbooks/auto-update-flow.md +851 -0
  80. package/.codex/skills/genesis-docs-automation/playbooks/changelog-generation.md +491 -0
  81. package/.codex/skills/genesis-docs-automation/templates/changelog-entry-template.md +187 -0
  82. package/.codex/skills/genesis-docs-automation/templates/handoff-template.md +297 -0
  83. package/.codex/skills/genesis-harness/SKILL.md +1418 -0
  84. package/.codex/skills/genesis-harness/agents/openai.yaml +9 -0
  85. package/.codex/skills/genesis-harness/checklists/bug-fix-qa.md +169 -0
  86. package/.codex/skills/genesis-harness/checklists/checklist.md +10 -0
  87. package/.codex/skills/genesis-harness/checklists/new-feature-qa.md +157 -0
  88. package/.codex/skills/genesis-harness/checklists/refactor-qa.md +216 -0
  89. package/.codex/skills/genesis-harness/checklists/requirements-validation.md +211 -0
  90. package/.codex/skills/genesis-harness/examples/example.md +4 -0
  91. package/.codex/skills/genesis-harness/resources/change-impact-matrix-template.md +204 -0
  92. package/.codex/skills/genesis-harness/resources/foundation-phase-template.md +131 -0
  93. package/.codex/skills/genesis-harness/resources/phase-00-foundation-template.md +76 -0
  94. package/.codex/skills/genesis-harness/resources/post-implementation-guide.md +347 -0
  95. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/check-architecture-boundaries.sh +23 -23
  96. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/check-docs-sync.sh +24 -24
  97. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/check-no-debug-logs.sh +21 -21
  98. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/check-required-planning-files.sh +46 -46
  99. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/check-spec-changelog.sh +24 -24
  100. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/check-task-tracking.sh +25 -25
  101. package/.codex/skills/genesis-harness/scripts/compact-context.sh +54 -0
  102. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/create-adr.sh +74 -74
  103. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/create-bug.sh +160 -160
  104. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/create-feature.sh +217 -217
  105. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/detect-stack.sh +26 -26
  106. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/init-planning.sh +750 -719
  107. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/list-changed-files.sh +12 -12
  108. package/.codex/skills/genesis-harness/scripts/offload-log.sh +72 -0
  109. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/run-verification.sh +47 -47
  110. package/.codex/skills/genesis-harness/scripts/run-verify-loop.sh +75 -0
  111. package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/scripts/update-state.sh +33 -33
  112. package/.codex/skills/genesis-harness/templates/harness-workflow-template.md +10 -0
  113. package/.codex/skills/genesis-harness-engineering/SKILL.md +159 -0
  114. package/.codex/skills/genesis-harness-engineering/agents/openai.yaml +7 -0
  115. package/.codex/skills/genesis-harness-engineering/checklists/checklist.md +48 -0
  116. package/.codex/skills/genesis-harness-engineering/examples/example.md +57 -0
  117. package/.codex/skills/genesis-harness-engineering/playbooks/harness-evolution.md +99 -0
  118. package/.codex/skills/genesis-harness-engineering/templates/harness-change-template.md +37 -0
  119. package/.codex/skills/genesis-new-design/SKILL.md +95 -0
  120. package/.codex/skills/genesis-new-design/agents/openai.yaml +4 -0
  121. package/.codex/skills/genesis-new-design/checklists/checklist.md +8 -0
  122. package/.codex/skills/genesis-new-design/examples/example.md +4 -0
  123. package/.codex/skills/genesis-new-design/templates/new-design-template.md +9 -0
  124. package/.codex/skills/genesis-observability-automation/SKILL.md +382 -0
  125. package/.codex/skills/genesis-observability-automation/agents/openai.yaml +7 -0
  126. package/.codex/skills/genesis-observability-automation/examples/example.md +86 -0
  127. package/.codex/skills/genesis-performance-profiling/SKILL.md +510 -0
  128. package/.codex/skills/genesis-performance-profiling/agents/openai.yaml +6 -0
  129. package/.codex/skills/genesis-performance-profiling/checklists/optimization-verification.md +199 -0
  130. package/.codex/skills/genesis-performance-profiling/checklists/performance-baseline.md +183 -0
  131. package/.codex/skills/genesis-performance-profiling/examples/example.md +234 -0
  132. package/.codex/skills/genesis-performance-profiling/observability/performance-tracking.md +202 -0
  133. package/.codex/skills/genesis-performance-profiling/playbooks/load-testing-orchestration.md +593 -0
  134. package/.codex/skills/genesis-performance-profiling/playbooks/profiling-playbook.md +601 -0
  135. package/.codex/skills/genesis-performance-profiling/templates/load-test-config-template.md +428 -0
  136. package/.codex/skills/genesis-performance-profiling/templates/performance-report-template.md +238 -0
  137. package/.codex/skills/genesis-pipeline-orchestration/SKILL.md +46 -0
  138. package/.codex/skills/genesis-pipeline-orchestration/agents/openai.yaml +7 -0
  139. package/.codex/skills/genesis-pipeline-orchestration/checklists/checklist.md +12 -0
  140. package/.codex/skills/genesis-pipeline-orchestration/examples/example.md +4 -0
  141. package/.codex/skills/genesis-pipeline-orchestration/templates/orchestration-template.md +12 -0
  142. package/.codex/skills/genesis-planning/SKILL.md +46 -0
  143. package/.codex/skills/genesis-planning/agents/openai.yaml +7 -0
  144. package/.codex/skills/genesis-planning/checklists/checklist.md +8 -0
  145. package/.codex/skills/genesis-planning/examples/example.md +4 -0
  146. package/.codex/skills/genesis-planning/templates/plan-template.md +11 -0
  147. package/.codex/skills/genesis-release/SKILL.md +46 -0
  148. package/.codex/skills/genesis-release/agents/openai.yaml +7 -0
  149. package/.codex/skills/genesis-release/checklists/checklist.md +8 -0
  150. package/.codex/skills/genesis-release/examples/example.md +4 -0
  151. package/.codex/skills/genesis-release/templates/release-checklist-template.md +9 -0
  152. package/.codex/skills/genesis-release-orchestration/SKILL.md +653 -0
  153. package/.codex/skills/genesis-release-orchestration/agents/openai.yaml +7 -0
  154. package/.codex/skills/genesis-release-orchestration/checklists/post-deployment-verification.md +274 -0
  155. package/.codex/skills/genesis-release-orchestration/checklists/pre-release-validation.md +220 -0
  156. package/.codex/skills/genesis-release-orchestration/examples/example.md +78 -0
  157. package/.codex/skills/genesis-release-orchestration/observability/release-tracking.md +253 -0
  158. package/.codex/skills/genesis-release-orchestration/playbooks/canary-deployment-orchestration.md +472 -0
  159. package/.codex/skills/genesis-release-orchestration/playbooks/semantic-versioning-automation.md +494 -0
  160. package/.codex/skills/genesis-release-orchestration/templates/deployment-strategy-template.md +303 -0
  161. package/.codex/skills/genesis-release-orchestration/templates/release-runbook-template.md +420 -0
  162. package/.codex/skills/genesis-research/SKILL.md +46 -0
  163. package/.codex/skills/genesis-research/agents/openai.yaml +7 -0
  164. package/.codex/skills/genesis-research/checklists/checklist.md +7 -0
  165. package/.codex/skills/genesis-research/examples/example.md +4 -0
  166. package/.codex/skills/genesis-research/templates/research-note-template.md +9 -0
  167. package/.codex/skills/genesis-research-first/SKILL.md +237 -0
  168. package/.codex/skills/genesis-research-first/agents/openai.yaml +7 -0
  169. package/.codex/skills/genesis-research-first/examples/example.md +85 -0
  170. package/.codex/skills/genesis-spec-propagation/SKILL.md +534 -0
  171. package/.codex/skills/genesis-spec-propagation/agents/openai.yaml +7 -0
  172. package/.codex/skills/genesis-spec-propagation/checklists/phase-update-verification.md +384 -0
  173. package/.codex/skills/genesis-spec-propagation/checklists/spec-change-detection.md +257 -0
  174. package/.codex/skills/genesis-spec-propagation/examples/example.md +63 -0
  175. package/.codex/skills/genesis-spec-propagation/observability/propagation-tracking.md +373 -0
  176. package/.codex/skills/genesis-spec-propagation/playbooks/breaking-change-propagation.md +692 -0
  177. package/.codex/skills/genesis-spec-propagation/playbooks/feature-change-propagation.md +434 -0
  178. package/.codex/skills/genesis-spec-propagation/templates/migration-guide-template.md +407 -0
  179. package/.codex/skills/genesis-upgrade-design/SKILL.md +97 -0
  180. package/.codex/skills/genesis-upgrade-design/agents/openai.yaml +4 -0
  181. package/.codex/skills/genesis-upgrade-design/checklists/checklist.md +8 -0
  182. package/.codex/skills/genesis-upgrade-design/examples/example.md +4 -0
  183. package/.codex/skills/genesis-upgrade-design/templates/upgrade-design-template.md +9 -0
  184. package/.codex/skills/spec-impact-engine/SKILL.md +504 -0
  185. package/.codex/skills/spec-impact-engine/agents/openai.yaml +7 -0
  186. package/.codex/skills/spec-impact-engine/detect-spec-changes.sh +262 -0
  187. package/.codex/skills/spec-impact-engine/examples/example.md +98 -0
  188. package/.codex/skills/spec-impact-engine/templates/impact-report.md +248 -0
  189. package/.codex/skills/spec-impact-engine/templates/migration-guide.md +223 -0
  190. package/.codex/skills/ui-ux-test-skill/SKILL.md +46 -0
  191. package/.codex/skills/ui-ux-test-skill/agents/openai.yaml +7 -0
  192. package/.codex/skills/ui-ux-test-skill/checklists/checklist.md +8 -0
  193. package/.codex/skills/ui-ux-test-skill/examples/example.md +4 -0
  194. package/.codex/skills/ui-ux-test-skill/templates/playwright-test-template.md +4 -0
  195. package/.codex-plugin/plugin.json +13 -11
  196. package/README.EN.md +719 -0
  197. package/README.VI.md +712 -0
  198. package/README.md +318 -181
  199. package/VERSION +1 -1
  200. package/bin/genesis-harness.js +133 -79
  201. package/contracts/agents/CharacterBibleAgent/error.json +1 -0
  202. package/contracts/agents/CharacterBibleAgent/example.json +1 -0
  203. package/contracts/agents/CharacterBibleAgent/request.json +1 -0
  204. package/contracts/agents/CharacterBibleAgent/response.json +1 -0
  205. package/contracts/agents/CharacterBibleAgent/schema.json +1 -0
  206. package/contracts/agents/ImageGenerationAgent/error.json +1 -0
  207. package/contracts/agents/ImageGenerationAgent/example.json +1 -0
  208. package/contracts/agents/ImageGenerationAgent/request.json +1 -0
  209. package/contracts/agents/ImageGenerationAgent/response.json +1 -0
  210. package/contracts/agents/ImageGenerationAgent/schema.json +1 -0
  211. package/contracts/agents/PipelineOrchestrator/error.json +1 -0
  212. package/contracts/agents/PipelineOrchestrator/example.json +1 -0
  213. package/contracts/agents/PipelineOrchestrator/request.json +1 -0
  214. package/contracts/agents/PipelineOrchestrator/response.json +1 -0
  215. package/contracts/agents/PipelineOrchestrator/schema.json +1 -0
  216. package/contracts/agents/PromptGenerationAgent/error.json +1 -0
  217. package/contracts/agents/PromptGenerationAgent/example.json +1 -0
  218. package/contracts/agents/PromptGenerationAgent/request.json +1 -0
  219. package/contracts/agents/PromptGenerationAgent/response.json +1 -0
  220. package/contracts/agents/PromptGenerationAgent/schema.json +1 -0
  221. package/contracts/agents/RenderAgent/error.json +1 -0
  222. package/contracts/agents/RenderAgent/example.json +1 -0
  223. package/contracts/agents/RenderAgent/request.json +1 -0
  224. package/contracts/agents/RenderAgent/response.json +1 -0
  225. package/contracts/agents/RenderAgent/schema.json +1 -0
  226. package/contracts/agents/ScenePlanningAgent/error.json +1 -0
  227. package/contracts/agents/ScenePlanningAgent/example.json +1 -0
  228. package/contracts/agents/ScenePlanningAgent/request.json +1 -0
  229. package/contracts/agents/ScenePlanningAgent/response.json +1 -0
  230. package/contracts/agents/ScenePlanningAgent/schema.json +1 -0
  231. package/contracts/agents/ScreenplayAgent/error.json +1 -0
  232. package/contracts/agents/ScreenplayAgent/example.json +1 -0
  233. package/contracts/agents/ScreenplayAgent/request.json +1 -0
  234. package/contracts/agents/ScreenplayAgent/response.json +1 -0
  235. package/contracts/agents/ScreenplayAgent/schema.json +1 -0
  236. package/contracts/agents/StoryAnalysisAgent/error.json +1 -0
  237. package/contracts/agents/StoryAnalysisAgent/example.json +1 -0
  238. package/contracts/agents/StoryAnalysisAgent/request.json +1 -0
  239. package/contracts/agents/StoryAnalysisAgent/response.json +1 -0
  240. package/contracts/agents/StoryAnalysisAgent/schema.json +1 -0
  241. package/contracts/agents/SubtitleGenerationAgent/error.json +1 -0
  242. package/contracts/agents/SubtitleGenerationAgent/example.json +1 -0
  243. package/contracts/agents/SubtitleGenerationAgent/request.json +1 -0
  244. package/contracts/agents/SubtitleGenerationAgent/response.json +1 -0
  245. package/contracts/agents/SubtitleGenerationAgent/schema.json +1 -0
  246. package/contracts/agents/VoiceGenerationAgent/error.json +1 -0
  247. package/contracts/agents/VoiceGenerationAgent/example.json +1 -0
  248. package/contracts/agents/VoiceGenerationAgent/request.json +1 -0
  249. package/contracts/agents/VoiceGenerationAgent/response.json +1 -0
  250. package/contracts/agents/VoiceGenerationAgent/schema.json +1 -0
  251. package/contracts/api/README.md +4 -0
  252. package/contracts/api/endpoint-template/error.json +7 -0
  253. package/contracts/api/endpoint-template/example.json +11 -0
  254. package/contracts/api/endpoint-template/request.json +7 -0
  255. package/contracts/api/endpoint-template/response.json +6 -0
  256. package/contracts/api/endpoint-template/schema.json +9 -0
  257. package/contracts/events/README.md +4 -0
  258. package/contracts/events/event-template/error.json +4 -0
  259. package/contracts/events/event-template/example.json +6 -0
  260. package/contracts/events/event-template/request.json +6 -0
  261. package/contracts/events/event-template/response.json +3 -0
  262. package/contracts/events/event-template/schema.json +8 -0
  263. package/contracts/ui/README.md +4 -0
  264. package/contracts/ui/screen-template/error.json +4 -0
  265. package/contracts/ui/screen-template/example.json +7 -0
  266. package/contracts/ui/screen-template/request.json +4 -0
  267. package/contracts/ui/screen-template/response.json +4 -0
  268. package/contracts/ui/screen-template/schema.json +8 -0
  269. package/fixtures/agents/agent-fixture-template.md +14 -0
  270. package/fixtures/api/api-fixture-template.md +14 -0
  271. package/fixtures/images/image-fixture-template.md +14 -0
  272. package/fixtures/pipeline/pipeline-fixture-template.md +14 -0
  273. package/fixtures/render/render-fixture-template.md +14 -0
  274. package/fixtures/tts/tts-fixture-template.md +14 -0
  275. package/fixtures/videos/video-fixture-template.md +14 -0
  276. package/observability/agent-runs/agent-run-template.md +22 -0
  277. package/observability/decision-logs/decision-log-template.md +18 -0
  278. package/observability/failures/failure-template.md +18 -0
  279. package/package.json +8 -2
  280. package/playwright/e2e/e2e-template.md +4 -0
  281. package/playwright/fixtures/ui-fixture-template.md +4 -0
  282. package/playwright/smoke/smoke-template.md +4 -0
  283. package/playwright/visual/visual-regression-template.md +4 -0
  284. package/scripts/README.md +342 -0
  285. package/scripts/compact-context.sh +54 -0
  286. package/scripts/detect-changes.sh +152 -0
  287. package/scripts/install.sh +103 -69
  288. package/scripts/offload-log.sh +72 -0
  289. package/scripts/run-evals.sh +118 -52
  290. package/scripts/run-verify-loop.sh +75 -0
  291. package/scripts/uninstall.sh +81 -52
  292. package/scripts/verify.sh +380 -109
  293. package/tests/contracts/contract-template.test.md +10 -0
  294. package/tests/fixtures/fixture-index.md +4 -0
  295. package/tests/integration/integration-template.test.md +4 -0
  296. package/tests/unit/unit-template.test.md +4 -0
  297. package/.codex/skills/project-genesis-harness/SKILL.md +0 -727
  298. package/.codex/skills/project-genesis-harness/agents/openai.yaml +0 -9
  299. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/references/planning-schema.md +0 -0
  300. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/references/quality-rubric.md +0 -0
  301. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/references/research-rubric.md +0 -0
  302. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/references/workflows.md +0 -0
  303. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/agents-template.md +0 -0
  304. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/api-docs-template.md +0 -0
  305. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/architecture-template.md +0 -0
  306. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/audit-template.md +0 -0
  307. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/bug-template.md +0 -0
  308. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/check-template.md +0 -0
  309. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/conventions-template.md +0 -0
  310. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/decision-template.md +0 -0
  311. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/design-template.md +0 -0
  312. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/escalation-template.md +0 -0
  313. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/feature-template.md +0 -0
  314. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/integrations-template.md +0 -0
  315. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/journeys-template.md +0 -0
  316. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/lessons-learned-template.md +0 -0
  317. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/observability-template.md +0 -0
  318. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/phase-template.md +0 -0
  319. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/pitfalls-template.md +0 -0
  320. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/planning-tree-template.md +0 -0
  321. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/project-template.md +0 -0
  322. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/quality-score-template.md +0 -0
  323. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/requirements-template.md +0 -0
  324. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/research-template.md +0 -0
  325. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/review-template.md +0 -0
  326. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/spec-changelog-template.md +0 -0
  327. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/stack-template.md +0 -0
  328. /package/.codex/skills/{project-genesis-harness โ†’ genesis-harness}/resources/verification-template.md +0 -0
@@ -1,12 +1,12 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- root="${1:-.}"
5
- cd "$root"
6
-
7
- if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
8
- git status --short
9
- else
10
- echo "Not a git repository; changed files cannot be listed with git."
11
- fi
12
-
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ root="${1:-.}"
5
+ cd "$root"
6
+
7
+ if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
8
+ git status --short
9
+ else
10
+ echo "Not a git repository; changed files cannot be listed with git."
11
+ fi
12
+
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env bash
2
+ # ==============================================================================
3
+ # Genesis Codex Harness โ€” Tool Call Offloading Script
4
+ # ==============================================================================
5
+ # Captures standard output & error of any command, saves it to a durable log file,
6
+ # and prints a trimmed head-and-tail summary if it exceeds a line count threshold.
7
+ # Protects the AI context window against Context Rot.
8
+ # ==============================================================================
9
+
10
+ set -uo pipefail
11
+
12
+ THRESHOLD_LINES=50
13
+ SCRATCH_DIR="scratch/tool_outputs"
14
+
15
+ usage() {
16
+ echo "Usage: $0 [--threshold lines] <command> [args...]" >&2
17
+ exit 2
18
+ }
19
+
20
+ if [ "$#" -eq 0 ]; then
21
+ usage
22
+ fi
23
+
24
+ if [ "$1" = "--threshold" ]; then
25
+ THRESHOLD_LINES="$2"
26
+ shift 2
27
+ fi
28
+
29
+ if [ "$#" -eq 0 ]; then
30
+ usage
31
+ fi
32
+
33
+ mkdir -p "$SCRATCH_DIR"
34
+
35
+ # Generate unique log file path
36
+ TIMESTAMP="$(date +%Y%m%d_%H%M%S)"
37
+ RAND_ID=$((RANDOM % 10000))
38
+ LOG_FILE="$SCRATCH_DIR/output_${TIMESTAMP}_${RAND_ID}.log"
39
+
40
+ # Execute command and capture output
41
+ set +e
42
+ "$@" > "$LOG_FILE" 2>&1
43
+ EXIT_CODE=$?
44
+ set -e
45
+
46
+ # Calculate output size
47
+ LINE_COUNT=$(wc -l < "$LOG_FILE")
48
+
49
+ if [ "$LINE_COUNT" -le "$THRESHOLD_LINES" ]; then
50
+ # Print normally if within threshold
51
+ cat "$LOG_FILE"
52
+ else
53
+ # Offload and print head/tail summary
54
+ HEAD_LINES=$((THRESHOLD_LINES / 2))
55
+ TAIL_LINES=$((THRESHOLD_LINES / 2))
56
+
57
+ echo "=============================================================================="
58
+ echo "==> [OFFLOADED] Command output exceeded threshold ($LINE_COUNT lines > $THRESHOLD_LINES lines)."
59
+ echo "==> Full log written to disk: file://$(pwd)/$LOG_FILE"
60
+ echo "=============================================================================="
61
+
62
+ head -n "$HEAD_LINES" "$LOG_FILE"
63
+
64
+ echo ""
65
+ echo "... [TRUNCATED $(($LINE_COUNT - THRESHOLD_LINES)) LINES] ..."
66
+ echo "Read file://$LOG_FILE to view the full execution history."
67
+ echo ""
68
+
69
+ tail -n "$TAIL_LINES" "$LOG_FILE"
70
+ fi
71
+
72
+ exit $EXIT_CODE
@@ -1,47 +1,47 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- root="${1:-.}"
5
- cd "$root"
6
-
7
- run_if() {
8
- local label="$1"
9
- shift
10
- echo "==> $label"
11
- "$@"
12
- }
13
-
14
- if [ -f package.json ]; then
15
- if command -v npm >/dev/null 2>&1; then
16
- npm run lint --if-present
17
- npm run typecheck --if-present
18
- npm test --if-present
19
- npm run build --if-present
20
- fi
21
- elif [ -f pyproject.toml ] || [ -f requirements.txt ]; then
22
- command -v pytest >/dev/null 2>&1 && run_if "pytest" pytest -q
23
- command -v ruff >/dev/null 2>&1 && run_if "ruff" ruff check .
24
- command -v mypy >/dev/null 2>&1 && run_if "mypy" mypy .
25
- elif [ -f Cargo.toml ]; then
26
- run_if "cargo test" cargo test
27
- run_if "cargo clippy" cargo clippy -- -D warnings
28
- elif [ -f go.mod ]; then
29
- run_if "go test" go test ./...
30
- elif [ -f composer.json ]; then
31
- command -v composer >/dev/null 2>&1 && composer test || true
32
- else
33
- echo "No known verification command detected. Add project-specific commands to .planning/SMOKE_TESTS.md."
34
- fi
35
-
36
- for check in \
37
- check-required-planning-files.sh \
38
- check-task-tracking.sh \
39
- check-no-debug-logs.sh \
40
- check-spec-changelog.sh \
41
- check-architecture-boundaries.sh
42
- do
43
- script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
44
- if [ -x "$script_dir/$check" ]; then
45
- run_if "$check" "$script_dir/$check" "$root"
46
- fi
47
- done
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ root="${1:-.}"
5
+ cd "$root"
6
+
7
+ run_if() {
8
+ local label="$1"
9
+ shift
10
+ echo "==> $label"
11
+ "$@"
12
+ }
13
+
14
+ if [ -f package.json ]; then
15
+ if command -v npm >/dev/null 2>&1; then
16
+ npm run lint --if-present
17
+ npm run typecheck --if-present
18
+ npm test --if-present
19
+ npm run build --if-present
20
+ fi
21
+ elif [ -f pyproject.toml ] || [ -f requirements.txt ]; then
22
+ command -v pytest >/dev/null 2>&1 && run_if "pytest" pytest -q
23
+ command -v ruff >/dev/null 2>&1 && run_if "ruff" ruff check .
24
+ command -v mypy >/dev/null 2>&1 && run_if "mypy" mypy .
25
+ elif [ -f Cargo.toml ]; then
26
+ run_if "cargo test" cargo test
27
+ run_if "cargo clippy" cargo clippy -- -D warnings
28
+ elif [ -f go.mod ]; then
29
+ run_if "go test" go test ./...
30
+ elif [ -f composer.json ]; then
31
+ command -v composer >/dev/null 2>&1 && composer test || true
32
+ else
33
+ echo "No known verification command detected. Add project-specific commands to .planning/SMOKE_TESTS.md."
34
+ fi
35
+
36
+ for check in \
37
+ check-required-planning-files.sh \
38
+ check-task-tracking.sh \
39
+ check-no-debug-logs.sh \
40
+ check-spec-changelog.sh \
41
+ check-architecture-boundaries.sh
42
+ do
43
+ script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
44
+ if [ -x "$script_dir/$check" ]; then
45
+ run_if "$check" "$script_dir/$check" "$root"
46
+ fi
47
+ done
@@ -0,0 +1,75 @@
1
+ #!/usr/bin/env bash
2
+ # ==============================================================================
3
+ # Genesis Codex Harness โ€” Ralph Loop (Verify-Fix) Orchestrator
4
+ # ==============================================================================
5
+ # Executes verification commands, tracks iteration counts to prevent infinite loops,
6
+ # and logs diagnostic failure reports to disk for step resumption.
7
+ # Enforces the self-verification safety invariant.
8
+ # ==============================================================================
9
+
10
+ set -uo pipefail
11
+
12
+ MAX_ITERATIONS=5
13
+ PLANNING_DIR=".planning"
14
+ LOOP_COUNT_FILE="$PLANNING_DIR/VERIFY_LOOP_COUNT"
15
+ FAILURE_LOG="$PLANNING_DIR/LAST_VERIFICATION_FAILURE.md"
16
+
17
+ usage() {
18
+ echo "Usage: $0 [--max-iterations N] <verification_command> [args...]" >&2
19
+ exit 2
20
+ }
21
+
22
+ if [ "$#" -eq 0 ]; then
23
+ usage
24
+ fi
25
+
26
+ if [ "$1" = "--max-iterations" ]; then
27
+ MAX_ITERATIONS="$2"
28
+ shift 2
29
+ fi
30
+
31
+ if [ "$#" -eq 0 ]; then
32
+ usage
33
+ fi
34
+
35
+ mkdir -p "$PLANNING_DIR"
36
+
37
+ # Initialize loop count
38
+ CURRENT_ITERATION=1
39
+ if [ -f "$LOOP_COUNT_FILE" ]; then
40
+ CURRENT_ITERATION=$(cat "$LOOP_COUNT_FILE")
41
+ CURRENT_ITERATION=$((CURRENT_ITERATION + 1))
42
+ fi
43
+
44
+ echo "$CURRENT_ITERATION" > "$LOOP_COUNT_FILE"
45
+
46
+ echo "==> [VERIFY LOOP] Iteration $CURRENT_ITERATION of $MAX_ITERATIONS"
47
+
48
+ if [ "$CURRENT_ITERATION" -gt "$MAX_ITERATIONS" ]; then
49
+ echo "=============================================================================="
50
+ echo "==> [BLOCKED] Verify-Fix loop exceeded maximum iteration count ($MAX_ITERATIONS)."
51
+ echo "==> Potentially stuck in an infinite loop. Halting for human intervention."
52
+ echo "=============================================================================="
53
+ rm -f "$LOOP_COUNT_FILE"
54
+ exit 99
55
+ fi
56
+
57
+ # Execute verification command
58
+ set +e
59
+ "$@" > "$FAILURE_LOG" 2>&1
60
+ EXIT_CODE=$?
61
+ set -e
62
+
63
+ if [ $EXIT_CODE -eq 0 ]; then
64
+ echo "==> [VERIFY LOOP] Pass! Verification completed successfully."
65
+ rm -f "$LOOP_COUNT_FILE"
66
+ rm -f "$FAILURE_LOG"
67
+ else
68
+ echo "=============================================================================="
69
+ echo "==> [FAILURE] Verification failed with exit code $EXIT_CODE."
70
+ echo "==> Failure diagnostic written to: file://$(pwd)/$FAILURE_LOG"
71
+ echo "==> Please inspect the log, fix the root cause, and re-run verification."
72
+ echo "=============================================================================="
73
+ fi
74
+
75
+ exit $EXIT_CODE
@@ -1,33 +1,33 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
-
4
- usage() {
5
- echo "Usage: $0 <root> <current-phase> <active-work> <last-completed-task> <next-task> <latest-verification>" >&2
6
- exit 2
7
- }
8
-
9
- root="${1:-}"
10
- phase="${2:-}"
11
- active="${3:-}"
12
- last="${4:-}"
13
- next="${5:-}"
14
- verification="${6:-}"
15
-
16
- [ -n "$root" ] && [ -n "$phase" ] && [ -n "$active" ] && [ -n "$last" ] && [ -n "$next" ] && [ -n "$verification" ] || usage
17
-
18
- cd "$root"
19
- mkdir -p .planning
20
-
21
- cat > .planning/STATE.md <<EOF
22
- # State
23
-
24
- Current project state: [~] Active
25
- Current phase: $phase
26
- Current feature or bug: $active
27
- Last completed task: $last
28
- Next task: $next
29
- Blocked items: None recorded
30
- Latest verification result: $verification
31
- EOF
32
-
33
- echo ".planning/STATE.md"
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ usage() {
5
+ echo "Usage: $0 <root> <current-phase> <active-work> <last-completed-task> <next-task> <latest-verification>" >&2
6
+ exit 2
7
+ }
8
+
9
+ root="${1:-}"
10
+ phase="${2:-}"
11
+ active="${3:-}"
12
+ last="${4:-}"
13
+ next="${5:-}"
14
+ verification="${6:-}"
15
+
16
+ [ -n "$root" ] && [ -n "$phase" ] && [ -n "$active" ] && [ -n "$last" ] && [ -n "$next" ] && [ -n "$verification" ] || usage
17
+
18
+ cd "$root"
19
+ mkdir -p .planning
20
+
21
+ cat > .planning/STATE.md <<EOF
22
+ # State
23
+
24
+ Current project state: [~] Active
25
+ Current phase: $phase
26
+ Current feature or bug: $active
27
+ Last completed task: $last
28
+ Next task: $next
29
+ Blocked items: None recorded
30
+ Latest verification result: $verification
31
+ EOF
32
+
33
+ echo ".planning/STATE.md"
@@ -0,0 +1,10 @@
1
+ # Harness Workflow Template
2
+
3
+ ## Intent
4
+ ## Failing Test
5
+ ## Fixture
6
+ ## Contract
7
+ ## Implementation
8
+ ## Verification
9
+ ## Memory Update
10
+
@@ -0,0 +1,159 @@
1
+ ---
2
+ name: harness-engineering-skill
3
+ description: "Evolve the Codex harness itself: verification loops, repository memory, test-first scaffolds, resumability, observability, and autonomous workflow reliability. Use for changes to this repository's skill system or harness architecture."
4
+ ---
5
+
6
+ # Harness Engineering Skill
7
+
8
+ **Automated evolution, verification scaling, and structural safety loop engineering for Codex developer environments**
9
+
10
+ ---
11
+
12
+ ## Purpose
13
+
14
+ To provide a robust, self-healing, and deterministic development environment for autonomous coding agents (Codex). Harness Engineering shifts the focus from writing soft, non-deterministic natural language prompts to building hard, mechanically-enforced environmental constraints (feedback loops, test runners, custom lints, and state managers) that prevent agentic drift and guarantee software quality.
15
+
16
+ By scaling and optimizing this harness, we achieve two primary objectives:
17
+ 1. **Extreme Feedback Velocity**: Compressing the time from code generation to execution feedback (TDD loop) to allow rapid self-correction.
18
+ 2. **Safety & Invariance Enforcement**: Ensuring that all changes satisfy strict codebase constraints (lints, typechecks, API contracts, and E2E journeys) before completion is declared.
19
+
20
+ ---
21
+
22
+ ## When to use
23
+
24
+ Use this skill when:
25
+ - **Modifying Core Verification Logic**: Adding new checks to `scripts/verify.sh` or expanding `scripts/run-evals.sh`.
26
+ - **Evolving Codex Skills**: Modifying existing `.codex/skills/` metadata, workflows, templates, or checklists.
27
+ - **Updating API, Agent, or Event Contracts**: Defining new schemas, request/response fixtures, or event topologies.
28
+ - **Extending Observability**: Adding tracking files, decision-logging formats, or failure telemetry inside `observability/`.
29
+ - **Configuring Distribution Channels**: Modifying the npm CLI wrapper (`bin/genesis-harness.js`), installers (`install.sh`), or CI/CD pipelines.
30
+
31
+ ---
32
+
33
+ ## When NOT to use
34
+
35
+ Do not use this skill for:
36
+ - Implementing application-specific business logic or customer features.
37
+ - General codebase research that does not affect the agentic operating environment.
38
+ - One-off scripting tasks unrelated to the reliability and verification loop of Codex.
39
+
40
+ ---
41
+
42
+ ## Inputs required
43
+
44
+ To evolve the harness, Codex must have access to:
45
+ 1. **Current Operating Memory**: `.codebase/CURRENT_STATE.md` and `.codebase/MODULE_INDEX.md`.
46
+ 2. **Harness Test Matrix**: `.codebase/TEST_MATRIX.md` showing existing verification paths.
47
+ 3. **Target Workflow Specs**: The contract or script being evolved (e.g., `bin/genesis-harness.js`, `scripts/verify.sh`).
48
+ 4. **Verification Gap**: The failure scenario or regression that is not currently caught by the test suite.
49
+
50
+ ---
51
+
52
+ ## Outputs required
53
+
54
+ Every harness evolution must deliver:
55
+ 1. **Failing Regression Test**: A new verification case added to `scripts/verify.sh` or `scripts/run-evals.sh` that fails *before* implementation.
56
+ 2. **Atomic Implementation Change**: The minimum code, script, or structural edit required to pass the test.
57
+ 3. **Clean Run Log**: Execution proof showing `scripts/verify.sh` and `scripts/run-evals.sh` passing cleanly with exit code `0`.
58
+ 4. **Normalized Script Files**: LF line ending assurance on all modified `.sh` files to prevent Windows compatibility bugs.
59
+ 5. **Durable Memory Update**: A recovery checkpoint written to `.codebase/RECOVERY_POINTS.md`.
60
+
61
+ ---
62
+
63
+ ## Required tests
64
+
65
+ - **Red-Green-Refactor Flow**: A failing assertion must be added to the test suite (`scripts/verify.sh` or `scripts/run-evals.sh`) prior to code modification.
66
+ - **Command Integrity Check**: The CLI `genesis-harness` must be verified using `npm run pack:check` and local execution tests in a separate sandbox.
67
+ - **Cross-Platform Validation**: All scripts must be checked for line-ending and interpreter syntax compatibility across POSIX/Bash environments on Windows/WSL and Linux.
68
+
69
+ ---
70
+
71
+ ## Required fixtures
72
+
73
+ - **Contract Templates**: Up-to-date `.json` schema templates for all agent, event, API, and UI interaction contracts.
74
+ - **Scaffold Fixtures**: Reusable sample files representing typical project states (like the `sample-feature` and `sample-bug` structures generated in test sandboxes).
75
+ - **Expected Validation Outputs**: JSON or Markdown files representing the expected logs or decision outputs of a successful run.
76
+
77
+ ---
78
+
79
+ ## Required contract updates
80
+
81
+ - **CLI-Skill Protocol**: Any change to CLI arguments, environment variable mappings, or directory output paths must be immediately reflected in `.codex-plugin/plugin.json`.
82
+ - **Agent ์บ๋ฆญํ„ฐ Contracts**: Changes to agent execution behavior must be documented in `contracts/agents/` schemas.
83
+ - **Event Topologies**: Updates to the event broker simulation must be verified against `contracts/events/` schemas.
84
+
85
+ ---
86
+
87
+ ## Required codebase map updates
88
+
89
+ - **Module Index Sync**: Newly added skills or templates must be registered in `.codebase/MODULE_INDEX.md` and `.codex/SKILLS_INDEX.md`.
90
+ - **Architecture Log**: Major design shifts in the harness workflow must be logged as Architecture Decision Records under `.codebase/decisions/` or `.planning/decisions/`.
91
+ - **State Transition**: Recalculate and update the architecture and quality scores inside `.codebase/CURRENT_STATE.md`.
92
+
93
+ ---
94
+
95
+ ## Token saving rules
96
+
97
+ - **Strict Ephemerality**: Treat the model's context window as volatile. Write key state updates to on-disk files (`task.md` and `.codebase/` memory) between steps instead of carrying huge logs in the prompt history.
98
+ - **On-Demand Loading**: Never load multiple `SKILL.md` files at once. Read the `.codebase/context/` summaries to target specific sub-directories.
99
+ - **Keep Commands Silent**: Suppress verbose compiler or script outputs (`>/dev/null`) unless a failure occurs, saving significant context tokens.
100
+
101
+ ---
102
+
103
+ ## Acceptance criteria
104
+
105
+ A harness modification is accepted *only* when:
106
+ - [x] The new check fails first in a fresh, isolated run of the verification pipeline.
107
+ - [x] The minimal change is implemented, resulting in a successful pass of `verify.sh` and `run-evals.sh` with exit code `0`.
108
+ - [x] All changed `.sh` files are validated to have LF line endings and parse cleanly without syntax warnings.
109
+ - [x] CLI dry-run package checks (`npm run pack:check`) confirm package integrity.
110
+ - [x] The evolution is documented in `.codebase/RECOVERY_POINTS.md` with exact recovery instructions.
111
+
112
+ ---
113
+
114
+ ## Common mistakes
115
+
116
+ - **Writing prose instructions**: Attempting to guide the model using soft natural-language descriptions in READMEs instead of writing hard validation scripts.
117
+ - **Duplicating context maps**: Storing identical configuration maps across multiple skills instead of importing standard `.codebase/` definitions.
118
+ - **CRLF Line Ending Traps**: Checking in scripts with Windows line-endings (`\r\n`), causing execution syntax errors in WSL/POSIX shells.
119
+ - **Generator-Evaluator Co-location**: Allowing the agent to grade its own output format using regex within its prompt instead of executing an external compiler or validator command.
120
+
121
+ ---
122
+
123
+ ## Recovery workflow
124
+
125
+ If a harness evolution breaks the local environment or causes test failures:
126
+ 1. **Isolate the Failing State**: Stop all active background processes and subagents.
127
+ 2. **Revert to Safety**: Run `git checkout -- <file>` to revert to the last committed stable state.
128
+ 3. **Read Recovery Point**: Inspect `.codebase/RECOVERY_POINTS.md` to identify the nearest stable checkpoint.
129
+ 4. **Write Minimal Reproducer**: Create a single, isolated script in the `scratch/` directory that demonstrates only the failure.
130
+ 5. **Re-attempt TDD**: Implement the fix on top of the reproducer before integrating back into the main harness.
131
+
132
+ ---
133
+
134
+ ## Core Invariants: The PEV Loop
135
+
136
+ Every agentic activity within this harness must strictly adhere to the **Plan-Execute-Verify (PEV)** pipeline:
137
+
138
+ ```txt
139
+ +---------------------------------------------------+
140
+ | Plan Phase (DoR Verified) |
141
+ | - Research patterns and write on-disk PLAN.md |
142
+ +---------------------------------------------------+
143
+ |
144
+ v
145
+ +---------------------------------------------------+
146
+ | Execute Phase (TDD Enforced) |
147
+ | - Create failing unit test/verification check |
148
+ | - Write minimal code to pass verification |
149
+ +---------------------------------------------------+
150
+ |
151
+ v
152
+ +---------------------------------------------------+
153
+ | Verify Phase (DoD Verified) |
154
+ | - Execute verify.sh and run-evals.sh |
155
+ | - Normalize line-endings and format files |
156
+ +---------------------------------------------------+
157
+ ```
158
+
159
+ Never skip a phase, and never claim completion without verifiable evidence of test passing.
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "Harness Engineering Skill"
3
+ short_description: "Improve Codex harness reliability"
4
+ default_prompt: "Use $harness-engineering-skill to evolve the harness with tests first."
5
+ policy:
6
+ allow_implicit_invocation: true
7
+
@@ -0,0 +1,48 @@
1
+ # Checklist: Pre-Flight Harness Validation & Compliance
2
+
3
+ Use this checklist prior to committing or declaring completion on any evolution of the **Genesis Codex Harness** operating environment.
4
+
5
+ ---
6
+
7
+ ## ๐Ÿ— Part 1: Structural & File Invariants
8
+
9
+ - [ ] **Folder Structure Compliance**: Every skill has a `SKILL.md`, `agents/openai.yaml`, `templates/`, and `examples/`. Playbook-based skills also include `checklists/`, `playbooks/`, and `observability/`.
10
+ - [ ] **Line Ending Invariants**: All script files recursively (`*.sh`) are verified to have LF line endings to avoid WSL/macOS parse failures on Windows engines.
11
+ - [ ] **Executable Bit**: All scripts inside `scripts/` and skill-specific script folders have executable flags set (`chmod +x`).
12
+
13
+ ---
14
+
15
+ ## ๐Ÿ“ Part 2: Skill Frontmatter & Section Checks
16
+
17
+ - [ ] **Casing Validation**: Standard skill sections match exact capitalization rules:
18
+ - `## Purpose`
19
+ - `## When to use`
20
+ - `## When NOT to use`
21
+ - `## Inputs required`
22
+ - `## Outputs required`
23
+ - `## Required tests`
24
+ - `## Required fixtures`
25
+ - `## Required contract updates`
26
+ - `## Required codebase map updates`
27
+ - `## Token saving rules`
28
+ - `## Acceptance criteria`
29
+ - `## Common mistakes`
30
+ - `## Recovery workflow`
31
+ - [ ] **Metadata Alignment**: The frontmatter `name:` matches the legacy expected string checked inside `scripts/verify.sh` for directory mapping.
32
+
33
+ ---
34
+
35
+ ## ๐Ÿงช Part 3: Test Suite & Distribution Execution
36
+
37
+ - [ ] **Red-State Invariant**: The test failure was demonstrated *first* before implementing the changes.
38
+ - [ ] **Verification Smoke Pass**: `bash scripts/verify.sh` completes cleanly with exit code `0`.
39
+ - [ ] **Regression Eval Pass**: `bash scripts/run-evals.sh` completes cleanly with exit code `0`.
40
+ - [ ] **CLI Dry-Run Integrity**: `npm run pack:check` runs successfully and package size is correct.
41
+ - [ ] **Uninstall Isolation**: The `uninstall.sh` script leaves no stale files behind in custom home locations.
42
+
43
+ ---
44
+
45
+ ## ๐Ÿ’พ Part 4: Memory Invariance
46
+
47
+ - [ ] **Current State Updated**: Skill counts, quality metrics, and completion statuses are synchronized in `.codebase/CURRENT_STATE.md`.
48
+ - [ ] **Recovery Point Saved**: Exact rollback steps and verification logs are saved in `.codebase/RECOVERY_POINTS.md`.
@@ -0,0 +1,57 @@
1
+ # Example: Harness Evolution - Integrating `genesis-performance-profiling`
2
+
3
+ This example demonstrates how an engineer (human or AI) safely scales the **Genesis Codex Harness** to support a new playbook-based skill called `genesis-performance-profiling`.
4
+
5
+ ---
6
+
7
+ ## Step 1: Write a Failing Verification Test (RED State)
8
+ First, we add the new skill directory to the `skill_names` array inside `scripts/verify.sh` so that it is included in the test loop:
9
+ ```diff
10
+ skill_names=(
11
+ genesis-harness
12
+ genesis-new-design
13
+ genesis-upgrade-design
14
+ + genesis-performance-profiling
15
+ )
16
+ ```
17
+ And we add its case mapping inside `verify_one`:
18
+ ```diff
19
+ + genesis-performance-profiling)
20
+ + verify_skill_metadata "$skill_dir" "genesis-performance-profiling"
21
+ + verify_playbook_skill "$skill_dir"
22
+ + ;;
23
+ ```
24
+ When we run `bash scripts/verify.sh`, it fails immediately because the directory `genesis-performance-profiling` does not exist yet. This confirms our validation test is active and skeptical!
25
+
26
+ ---
27
+
28
+ ## Step 2: Implement the Skill (GREEN State)
29
+ We create the directory and populate all required files according to the playbook protocol:
30
+ - `SKILL.md` (with all 13 standard headers and metadata).
31
+ - `agents/openai.yaml`.
32
+ - `templates/`, `checklists/`, `playbooks/`, `observability/`, and `examples/` directories.
33
+
34
+ ---
35
+
36
+ ## Step 3: Normalize Line Endings
37
+ We run our CRLF-to-LF conversion command to guarantee cross-platform shell compatibility:
38
+ ```bash
39
+ python -c "import os; [open(os.path.join(root, f), 'wb').write(content) for root, dirs, files in os.walk('.') for f in files if f.endswith('.sh') for content in [open(os.path.join(root, f), 'rb').read().replace(b'\r\n', b'\n')]]"
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Step 4: Run E2E Verification
45
+ We run all validation checks locally to confirm that the new skill is fully integrated and compliant:
46
+ ```bash
47
+ $ bash scripts/verify.sh
48
+ verify passed: /mnt/d/PROJECT/codex-genesis-harness/.codex/skills
49
+
50
+ $ bash scripts/run-evals.sh
51
+ evals passed
52
+ ```
53
+
54
+ ---
55
+
56
+ ## Step 5: Update Codebase Memory
57
+ We register our evolutionary step in [.codebase/CURRENT_STATE.md](file:///.codebase/CURRENT_STATE.md) and [.codebase/RECOVERY_POINTS.md](file:///.codebase/RECOVERY_POINTS.md) before pushing our changes to version control!