codex-genesis-harness 0.1.0 → 0.1.1

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 (231) hide show
  1. package/.codebase/API_CONTRACTS.md +12 -0
  2. package/.codebase/ARCHITECTURE.md +6 -0
  3. package/.codebase/CURRENT_STATE.md +6 -0
  4. package/.codebase/DEPENDENCY_GRAPH.md +14 -0
  5. package/.codebase/DOMAIN_MODELS.md +8 -0
  6. package/.codebase/EVOLUTION_PLAN.md +35 -0
  7. package/.codebase/KNOWN_PROBLEMS.md +6 -0
  8. package/.codebase/MODULE_INDEX.md +13 -0
  9. package/.codebase/PIPELINE_FLOW.md +14 -0
  10. package/.codebase/TEST_MATRIX.md +11 -0
  11. package/.codebase/UI_ROUTES.md +4 -0
  12. package/.codebase/context/backend-summary.md +4 -0
  13. package/.codebase/context/frontend-summary.md +4 -0
  14. package/.codebase/context/pipeline-summary.md +4 -0
  15. package/.codebase/context/providers-summary.md +4 -0
  16. package/.codebase/context/render-summary.md +4 -0
  17. package/.codebase/context/tests-summary.md +4 -0
  18. package/.codex/skills/ai-provider-skill/SKILL.md +46 -0
  19. package/.codex/skills/ai-provider-skill/agents/openai.yaml +7 -0
  20. package/.codex/skills/ai-provider-skill/checklists/checklist.md +9 -0
  21. package/.codex/skills/ai-provider-skill/examples/example.md +4 -0
  22. package/.codex/skills/ai-provider-skill/templates/provider-contract-template.md +9 -0
  23. package/.codex/skills/api-contract-skill/SKILL.md +46 -0
  24. package/.codex/skills/api-contract-skill/agents/openai.yaml +7 -0
  25. package/.codex/skills/api-contract-skill/checklists/checklist.md +8 -0
  26. package/.codex/skills/api-contract-skill/examples/example.md +4 -0
  27. package/.codex/skills/api-contract-skill/templates/api-contract-template.md +4 -0
  28. package/.codex/skills/architecture-skill/SKILL.md +46 -0
  29. package/.codex/skills/architecture-skill/agents/openai.yaml +7 -0
  30. package/.codex/skills/architecture-skill/checklists/checklist.md +8 -0
  31. package/.codex/skills/architecture-skill/examples/example.md +4 -0
  32. package/.codex/skills/architecture-skill/templates/architecture-decision-template.md +14 -0
  33. package/.codex/skills/codebase-map-skill/SKILL.md +46 -0
  34. package/.codex/skills/codebase-map-skill/agents/openai.yaml +7 -0
  35. package/.codex/skills/codebase-map-skill/checklists/checklist.md +7 -0
  36. package/.codex/skills/codebase-map-skill/examples/example.md +4 -0
  37. package/.codex/skills/codebase-map-skill/templates/map-update-template.md +8 -0
  38. package/.codex/skills/design-spec-skill/SKILL.md +46 -0
  39. package/.codex/skills/design-spec-skill/agents/openai.yaml +7 -0
  40. package/.codex/skills/design-spec-skill/checklists/checklist.md +7 -0
  41. package/.codex/skills/design-spec-skill/examples/example.md +4 -0
  42. package/.codex/skills/design-spec-skill/templates/design-spec-template.md +9 -0
  43. package/.codex/skills/docs-skill/SKILL.md +46 -0
  44. package/.codex/skills/docs-skill/agents/openai.yaml +7 -0
  45. package/.codex/skills/docs-skill/checklists/checklist.md +7 -0
  46. package/.codex/skills/docs-skill/examples/example.md +4 -0
  47. package/.codex/skills/docs-skill/templates/docs-update-template.md +8 -0
  48. package/.codex/skills/{project-genesis-harness → genesis-harness}/SKILL.md +43 -4
  49. package/.codex/skills/genesis-harness/agents/openai.yaml +9 -0
  50. package/.codex/skills/genesis-harness/checklists/checklist.md +10 -0
  51. package/.codex/skills/genesis-harness/examples/example.md +4 -0
  52. package/.codex/skills/genesis-harness/templates/harness-workflow-template.md +10 -0
  53. package/.codex/skills/genesis-new-design/SKILL.md +95 -0
  54. package/.codex/skills/genesis-new-design/agents/openai.yaml +4 -0
  55. package/.codex/skills/genesis-new-design/checklists/checklist.md +8 -0
  56. package/.codex/skills/genesis-new-design/examples/example.md +4 -0
  57. package/.codex/skills/genesis-new-design/templates/new-design-template.md +9 -0
  58. package/.codex/skills/genesis-upgrade-design/SKILL.md +97 -0
  59. package/.codex/skills/genesis-upgrade-design/agents/openai.yaml +4 -0
  60. package/.codex/skills/genesis-upgrade-design/checklists/checklist.md +8 -0
  61. package/.codex/skills/genesis-upgrade-design/examples/example.md +4 -0
  62. package/.codex/skills/genesis-upgrade-design/templates/upgrade-design-template.md +9 -0
  63. package/.codex/skills/harness-engineering-skill/SKILL.md +45 -0
  64. package/.codex/skills/harness-engineering-skill/agents/openai.yaml +7 -0
  65. package/.codex/skills/harness-engineering-skill/checklists/checklist.md +8 -0
  66. package/.codex/skills/harness-engineering-skill/examples/example.md +4 -0
  67. package/.codex/skills/harness-engineering-skill/templates/harness-change-template.md +8 -0
  68. package/.codex/skills/pipeline-orchestration-skill/SKILL.md +46 -0
  69. package/.codex/skills/pipeline-orchestration-skill/agents/openai.yaml +7 -0
  70. package/.codex/skills/pipeline-orchestration-skill/checklists/checklist.md +12 -0
  71. package/.codex/skills/pipeline-orchestration-skill/examples/example.md +4 -0
  72. package/.codex/skills/pipeline-orchestration-skill/templates/orchestration-template.md +12 -0
  73. package/.codex/skills/planning-skill/SKILL.md +46 -0
  74. package/.codex/skills/planning-skill/agents/openai.yaml +7 -0
  75. package/.codex/skills/planning-skill/checklists/checklist.md +8 -0
  76. package/.codex/skills/planning-skill/examples/example.md +4 -0
  77. package/.codex/skills/planning-skill/templates/plan-template.md +11 -0
  78. package/.codex/skills/release-skill/SKILL.md +46 -0
  79. package/.codex/skills/release-skill/agents/openai.yaml +7 -0
  80. package/.codex/skills/release-skill/checklists/checklist.md +8 -0
  81. package/.codex/skills/release-skill/examples/example.md +4 -0
  82. package/.codex/skills/release-skill/templates/release-checklist-template.md +9 -0
  83. package/.codex/skills/research-skill/SKILL.md +46 -0
  84. package/.codex/skills/research-skill/agents/openai.yaml +7 -0
  85. package/.codex/skills/research-skill/checklists/checklist.md +7 -0
  86. package/.codex/skills/research-skill/examples/example.md +4 -0
  87. package/.codex/skills/research-skill/templates/research-note-template.md +9 -0
  88. package/.codex/skills/ui-ux-test-skill/SKILL.md +46 -0
  89. package/.codex/skills/ui-ux-test-skill/agents/openai.yaml +7 -0
  90. package/.codex/skills/ui-ux-test-skill/checklists/checklist.md +8 -0
  91. package/.codex/skills/ui-ux-test-skill/examples/example.md +4 -0
  92. package/.codex/skills/ui-ux-test-skill/templates/playwright-test-template.md +4 -0
  93. package/.codex-plugin/plugin.json +13 -11
  94. package/README.md +164 -181
  95. package/bin/genesis-harness.js +124 -79
  96. package/contracts/agents/CharacterBibleAgent/error.json +1 -0
  97. package/contracts/agents/CharacterBibleAgent/example.json +1 -0
  98. package/contracts/agents/CharacterBibleAgent/request.json +1 -0
  99. package/contracts/agents/CharacterBibleAgent/response.json +1 -0
  100. package/contracts/agents/CharacterBibleAgent/schema.json +1 -0
  101. package/contracts/agents/ImageGenerationAgent/error.json +1 -0
  102. package/contracts/agents/ImageGenerationAgent/example.json +1 -0
  103. package/contracts/agents/ImageGenerationAgent/request.json +1 -0
  104. package/contracts/agents/ImageGenerationAgent/response.json +1 -0
  105. package/contracts/agents/ImageGenerationAgent/schema.json +1 -0
  106. package/contracts/agents/PipelineOrchestrator/error.json +1 -0
  107. package/contracts/agents/PipelineOrchestrator/example.json +1 -0
  108. package/contracts/agents/PipelineOrchestrator/request.json +1 -0
  109. package/contracts/agents/PipelineOrchestrator/response.json +1 -0
  110. package/contracts/agents/PipelineOrchestrator/schema.json +1 -0
  111. package/contracts/agents/PromptGenerationAgent/error.json +1 -0
  112. package/contracts/agents/PromptGenerationAgent/example.json +1 -0
  113. package/contracts/agents/PromptGenerationAgent/request.json +1 -0
  114. package/contracts/agents/PromptGenerationAgent/response.json +1 -0
  115. package/contracts/agents/PromptGenerationAgent/schema.json +1 -0
  116. package/contracts/agents/RenderAgent/error.json +1 -0
  117. package/contracts/agents/RenderAgent/example.json +1 -0
  118. package/contracts/agents/RenderAgent/request.json +1 -0
  119. package/contracts/agents/RenderAgent/response.json +1 -0
  120. package/contracts/agents/RenderAgent/schema.json +1 -0
  121. package/contracts/agents/ScenePlanningAgent/error.json +1 -0
  122. package/contracts/agents/ScenePlanningAgent/example.json +1 -0
  123. package/contracts/agents/ScenePlanningAgent/request.json +1 -0
  124. package/contracts/agents/ScenePlanningAgent/response.json +1 -0
  125. package/contracts/agents/ScenePlanningAgent/schema.json +1 -0
  126. package/contracts/agents/ScreenplayAgent/error.json +1 -0
  127. package/contracts/agents/ScreenplayAgent/example.json +1 -0
  128. package/contracts/agents/ScreenplayAgent/request.json +1 -0
  129. package/contracts/agents/ScreenplayAgent/response.json +1 -0
  130. package/contracts/agents/ScreenplayAgent/schema.json +1 -0
  131. package/contracts/agents/StoryAnalysisAgent/error.json +1 -0
  132. package/contracts/agents/StoryAnalysisAgent/example.json +1 -0
  133. package/contracts/agents/StoryAnalysisAgent/request.json +1 -0
  134. package/contracts/agents/StoryAnalysisAgent/response.json +1 -0
  135. package/contracts/agents/StoryAnalysisAgent/schema.json +1 -0
  136. package/contracts/agents/SubtitleGenerationAgent/error.json +1 -0
  137. package/contracts/agents/SubtitleGenerationAgent/example.json +1 -0
  138. package/contracts/agents/SubtitleGenerationAgent/request.json +1 -0
  139. package/contracts/agents/SubtitleGenerationAgent/response.json +1 -0
  140. package/contracts/agents/SubtitleGenerationAgent/schema.json +1 -0
  141. package/contracts/agents/VoiceGenerationAgent/error.json +1 -0
  142. package/contracts/agents/VoiceGenerationAgent/example.json +1 -0
  143. package/contracts/agents/VoiceGenerationAgent/request.json +1 -0
  144. package/contracts/agents/VoiceGenerationAgent/response.json +1 -0
  145. package/contracts/agents/VoiceGenerationAgent/schema.json +1 -0
  146. package/contracts/api/README.md +4 -0
  147. package/contracts/api/endpoint-template/error.json +7 -0
  148. package/contracts/api/endpoint-template/example.json +11 -0
  149. package/contracts/api/endpoint-template/request.json +7 -0
  150. package/contracts/api/endpoint-template/response.json +6 -0
  151. package/contracts/api/endpoint-template/schema.json +9 -0
  152. package/contracts/events/README.md +4 -0
  153. package/contracts/events/event-template/error.json +4 -0
  154. package/contracts/events/event-template/example.json +6 -0
  155. package/contracts/events/event-template/request.json +6 -0
  156. package/contracts/events/event-template/response.json +3 -0
  157. package/contracts/events/event-template/schema.json +8 -0
  158. package/contracts/ui/README.md +4 -0
  159. package/contracts/ui/screen-template/error.json +4 -0
  160. package/contracts/ui/screen-template/example.json +7 -0
  161. package/contracts/ui/screen-template/request.json +4 -0
  162. package/contracts/ui/screen-template/response.json +4 -0
  163. package/contracts/ui/screen-template/schema.json +8 -0
  164. package/fixtures/agents/agent-fixture-template.md +14 -0
  165. package/fixtures/api/api-fixture-template.md +14 -0
  166. package/fixtures/images/image-fixture-template.md +14 -0
  167. package/fixtures/pipeline/pipeline-fixture-template.md +14 -0
  168. package/fixtures/render/render-fixture-template.md +14 -0
  169. package/fixtures/tts/tts-fixture-template.md +14 -0
  170. package/fixtures/videos/video-fixture-template.md +14 -0
  171. package/observability/agent-runs/agent-run-template.md +22 -0
  172. package/observability/decision-logs/decision-log-template.md +18 -0
  173. package/observability/failures/failure-template.md +18 -0
  174. package/package.json +8 -2
  175. package/playwright/e2e/e2e-template.md +4 -0
  176. package/playwright/fixtures/ui-fixture-template.md +4 -0
  177. package/playwright/smoke/smoke-template.md +4 -0
  178. package/playwright/visual/visual-regression-template.md +4 -0
  179. package/scripts/install.sh +64 -39
  180. package/scripts/run-evals.sh +61 -22
  181. package/scripts/uninstall.sh +40 -20
  182. package/scripts/verify.sh +234 -55
  183. package/tests/contracts/contract-template.test.md +10 -0
  184. package/tests/fixtures/fixture-index.md +4 -0
  185. package/tests/integration/integration-template.test.md +4 -0
  186. package/tests/unit/unit-template.test.md +4 -0
  187. package/.codex/skills/project-genesis-harness/agents/openai.yaml +0 -9
  188. /package/.codex/skills/{project-genesis-harness → genesis-harness}/references/planning-schema.md +0 -0
  189. /package/.codex/skills/{project-genesis-harness → genesis-harness}/references/quality-rubric.md +0 -0
  190. /package/.codex/skills/{project-genesis-harness → genesis-harness}/references/research-rubric.md +0 -0
  191. /package/.codex/skills/{project-genesis-harness → genesis-harness}/references/workflows.md +0 -0
  192. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/agents-template.md +0 -0
  193. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/api-docs-template.md +0 -0
  194. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/architecture-template.md +0 -0
  195. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/audit-template.md +0 -0
  196. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/bug-template.md +0 -0
  197. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/check-template.md +0 -0
  198. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/conventions-template.md +0 -0
  199. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/decision-template.md +0 -0
  200. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/design-template.md +0 -0
  201. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/escalation-template.md +0 -0
  202. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/feature-template.md +0 -0
  203. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/integrations-template.md +0 -0
  204. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/journeys-template.md +0 -0
  205. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/lessons-learned-template.md +0 -0
  206. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/observability-template.md +0 -0
  207. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/phase-template.md +0 -0
  208. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/pitfalls-template.md +0 -0
  209. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/planning-tree-template.md +0 -0
  210. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/project-template.md +0 -0
  211. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/quality-score-template.md +0 -0
  212. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/requirements-template.md +0 -0
  213. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/research-template.md +0 -0
  214. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/review-template.md +0 -0
  215. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/spec-changelog-template.md +0 -0
  216. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/stack-template.md +0 -0
  217. /package/.codex/skills/{project-genesis-harness → genesis-harness}/resources/verification-template.md +0 -0
  218. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/check-architecture-boundaries.sh +0 -0
  219. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/check-docs-sync.sh +0 -0
  220. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/check-no-debug-logs.sh +0 -0
  221. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/check-required-planning-files.sh +0 -0
  222. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/check-spec-changelog.sh +0 -0
  223. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/check-task-tracking.sh +0 -0
  224. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/create-adr.sh +0 -0
  225. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/create-bug.sh +0 -0
  226. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/create-feature.sh +0 -0
  227. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/detect-stack.sh +0 -0
  228. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/init-planning.sh +0 -0
  229. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/list-changed-files.sh +0 -0
  230. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/run-verification.sh +0 -0
  231. /package/.codex/skills/{project-genesis-harness → genesis-harness}/scripts/update-state.sh +0 -0
package/scripts/verify.sh CHANGED
@@ -1,8 +1,66 @@
1
1
  #!/usr/bin/env bash
2
2
  set -euo pipefail
3
3
 
4
- repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
- skill_dir="${1:-$repo_root/.codex/skills/project-genesis-harness}"
4
+ repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
5
+ skill_root="${1:-$repo_root/.codex/skills}"
6
+ skill_names=(
7
+ genesis-harness
8
+ genesis-new-design
9
+ genesis-upgrade-design
10
+ architecture-skill
11
+ planning-skill
12
+ codebase-map-skill
13
+ design-spec-skill
14
+ api-contract-skill
15
+ ui-ux-test-skill
16
+ harness-engineering-skill
17
+ ai-provider-skill
18
+ pipeline-orchestration-skill
19
+ research-skill
20
+ docs-skill
21
+ release-skill
22
+ )
23
+
24
+ required_memory_files=(
25
+ ARCHITECTURE.md
26
+ CURRENT_STATE.md
27
+ MODULE_INDEX.md
28
+ DEPENDENCY_GRAPH.md
29
+ DOMAIN_MODELS.md
30
+ API_CONTRACTS.md
31
+ TEST_MATRIX.md
32
+ UI_ROUTES.md
33
+ PIPELINE_FLOW.md
34
+ KNOWN_PROBLEMS.md
35
+ EVOLUTION_PLAN.md
36
+ )
37
+
38
+ required_context_files=(
39
+ backend-summary.md
40
+ frontend-summary.md
41
+ pipeline-summary.md
42
+ providers-summary.md
43
+ render-summary.md
44
+ tests-summary.md
45
+ )
46
+
47
+ required_contract_roots=(api agents events ui)
48
+ required_fixture_roots=(api agents pipeline render tts images videos)
49
+ required_test_roots=(contracts integration unit fixtures)
50
+ required_playwright_roots=(e2e smoke visual fixtures)
51
+ required_observability_roots=(agent-runs failures decision-logs)
52
+ required_agent_contracts=(
53
+ StoryAnalysisAgent
54
+ CharacterBibleAgent
55
+ ScreenplayAgent
56
+ ScenePlanningAgent
57
+ PromptGenerationAgent
58
+ ImageGenerationAgent
59
+ VoiceGenerationAgent
60
+ SubtitleGenerationAgent
61
+ RenderAgent
62
+ PipelineOrchestrator
63
+ )
6
64
 
7
65
  required_resources=(
8
66
  planning-tree-template.md
@@ -50,60 +108,181 @@ required_scripts=(
50
108
  update-state.sh
51
109
  )
52
110
 
53
- fail() {
54
- echo "verify failed: $*" >&2
55
- exit 1
56
- }
57
-
58
- [ -f "$skill_dir/SKILL.md" ] || fail "missing SKILL.md"
59
- [ -d "$skill_dir/resources" ] || fail "missing resources/"
60
- [ -d "$skill_dir/scripts" ] || fail "missing scripts/"
61
- [ -f "$skill_dir/agents/openai.yaml" ] || fail "missing agents/openai.yaml"
62
- [ -f "$repo_root/.codex-plugin/plugin.json" ] || fail "missing .codex-plugin/plugin.json"
63
-
64
- grep -q '^name: project-genesis-harness$' "$skill_dir/SKILL.md" || fail "invalid skill name frontmatter"
65
- grep -q '^description:' "$skill_dir/SKILL.md" || fail "missing description frontmatter"
66
- grep -q 'Definition Of Ready' "$skill_dir/SKILL.md" || fail "missing Definition Of Ready"
67
- grep -q 'Definition Of Done' "$skill_dir/SKILL.md" || fail "missing Definition Of Done"
68
- grep -q 'Quality Rubric' "$skill_dir/SKILL.md" || fail "missing Quality Rubric"
69
- grep -q '"skills"' "$repo_root/.codex-plugin/plugin.json" || fail "plugin manifest missing skills path"
70
-
71
- for ref in workflows.md planning-schema.md research-rubric.md quality-rubric.md; do
72
- [ -f "$skill_dir/references/$ref" ] || fail "missing reference: $ref"
73
- grep -q "references/$ref" "$skill_dir/SKILL.md" || fail "SKILL.md does not mention reference: $ref"
74
- done
75
-
76
- for file in "${required_resources[@]}"; do
77
- [ -f "$skill_dir/resources/$file" ] || fail "missing resource: $file"
78
- done
79
-
80
- for file in "${required_scripts[@]}"; do
81
- [ -f "$skill_dir/scripts/$file" ] || fail "missing script: $file"
82
- [ -x "$skill_dir/scripts/$file" ] || fail "script is not executable: $file"
83
- done
84
-
85
- bash -n "$skill_dir"/scripts/*.sh
86
-
87
- tmp="$(mktemp -d)"
88
- cleanup() {
111
+ fail() {
112
+ echo "verify failed: $*" >&2
113
+ exit 1
114
+ }
115
+
116
+ [ -f "$repo_root/.codex-plugin/plugin.json" ] || fail "missing .codex-plugin/plugin.json"
117
+
118
+ grep -q '"skills"' "$repo_root/.codex-plugin/plugin.json" || fail "plugin manifest missing skills path"
119
+
120
+ verify_repository_harness() {
121
+ for file in "${required_memory_files[@]}"; do
122
+ [ -f "$repo_root/.codebase/$file" ] || fail "missing codebase memory file: .codebase/$file"
123
+ done
124
+
125
+ for file in "${required_context_files[@]}"; do
126
+ [ -f "$repo_root/.codebase/context/$file" ] || fail "missing context summary: .codebase/context/$file"
127
+ done
128
+
129
+ for dir in "${required_contract_roots[@]}"; do
130
+ [ -d "$repo_root/contracts/$dir" ] || fail "missing contract directory: contracts/$dir"
131
+ done
132
+
133
+ for dir in "${required_fixture_roots[@]}"; do
134
+ [ -d "$repo_root/fixtures/$dir" ] || fail "missing fixture directory: fixtures/$dir"
135
+ done
136
+
137
+ for dir in "${required_test_roots[@]}"; do
138
+ [ -d "$repo_root/tests/$dir" ] || fail "missing test directory: tests/$dir"
139
+ done
140
+
141
+ for dir in "${required_playwright_roots[@]}"; do
142
+ [ -d "$repo_root/playwright/$dir" ] || fail "missing playwright directory: playwright/$dir"
143
+ done
144
+
145
+ for dir in "${required_observability_roots[@]}"; do
146
+ [ -d "$repo_root/observability/$dir" ] || fail "missing observability directory: observability/$dir"
147
+ done
148
+
149
+ for agent in "${required_agent_contracts[@]}"; do
150
+ for file in request.json response.json schema.json example.json error.json; do
151
+ [ -f "$repo_root/contracts/agents/$agent/$file" ] || fail "missing agent contract: contracts/agents/$agent/$file"
152
+ done
153
+ done
154
+
155
+ [ -f "$repo_root/tests/contracts/contract-template.test.md" ] || fail "missing contract test template"
156
+ [ -f "$repo_root/playwright/visual/visual-regression-template.md" ] || fail "missing visual regression template"
157
+ [ -f "$repo_root/fixtures/agents/agent-fixture-template.md" ] || fail "missing agent fixture template"
158
+ [ -f "$repo_root/observability/decision-logs/decision-log-template.md" ] || fail "missing decision log template"
159
+ }
160
+
161
+ verify_repository_harness
162
+
163
+ verify_skill_metadata() {
164
+ local skill_dir="$1"
165
+ local expected_name="$2"
166
+
167
+ [ -f "$skill_dir/SKILL.md" ] || fail "missing SKILL.md: $skill_dir"
168
+ [ -f "$skill_dir/agents/openai.yaml" ] || fail "missing agents/openai.yaml: $skill_dir"
169
+ grep -q "^name: $expected_name$" "$skill_dir/SKILL.md" || fail "invalid skill name frontmatter: $skill_dir"
170
+ grep -q '^description:' "$skill_dir/SKILL.md" || fail "missing description frontmatter: $skill_dir"
171
+ grep -q 'default_prompt:' "$skill_dir/agents/openai.yaml" || fail "missing default_prompt: $skill_dir"
172
+ }
173
+
174
+ verify_harness_skill() {
175
+ local skill_dir="$1"
176
+
177
+ verify_skill_metadata "$skill_dir" genesis-harness
178
+ verify_skill_protocol "$skill_dir"
179
+ [ -d "$skill_dir/resources" ] || fail "missing resources/"
180
+ [ -d "$skill_dir/scripts" ] || fail "missing scripts/"
181
+ grep -q 'Definition Of Ready' "$skill_dir/SKILL.md" || fail "missing Definition Of Ready"
182
+ grep -q 'Definition Of Done' "$skill_dir/SKILL.md" || fail "missing Definition Of Done"
183
+ grep -q 'Quality Rubric' "$skill_dir/SKILL.md" || fail "missing Quality Rubric"
184
+
185
+ for ref in workflows.md planning-schema.md research-rubric.md quality-rubric.md; do
186
+ [ -f "$skill_dir/references/$ref" ] || fail "missing reference: $ref"
187
+ grep -q "references/$ref" "$skill_dir/SKILL.md" || fail "SKILL.md does not mention reference: $ref"
188
+ done
189
+
190
+ for file in "${required_resources[@]}"; do
191
+ [ -f "$skill_dir/resources/$file" ] || fail "missing resource: $file"
192
+ done
193
+
194
+ for file in "${required_scripts[@]}"; do
195
+ [ -f "$skill_dir/scripts/$file" ] || fail "missing script: $file"
196
+ [ -x "$skill_dir/scripts/$file" ] || fail "script is not executable: $file"
197
+ done
198
+
199
+ bash -n "$skill_dir"/scripts/*.sh
200
+ }
201
+
202
+ verify_design_skill() {
203
+ local skill_dir="$1"
204
+ local expected_name="$2"
205
+
206
+ verify_skill_metadata "$skill_dir" "$expected_name"
207
+ verify_skill_protocol "$skill_dir"
208
+ grep -q 'frontend web' "$skill_dir/SKILL.md" || fail "design skill missing frontend web scope: $skill_dir"
209
+ grep -q 'Verify' "$skill_dir/SKILL.md" || fail "design skill missing verification guidance: $skill_dir"
210
+ }
211
+
212
+ verify_skill_protocol() {
213
+ local skill_dir="$1"
214
+
215
+ [ -d "$skill_dir/templates" ] || fail "missing templates/: $skill_dir"
216
+ [ -d "$skill_dir/examples" ] || fail "missing examples/: $skill_dir"
217
+ [ -d "$skill_dir/checklists" ] || fail "missing checklists/: $skill_dir"
218
+ for section in Purpose "When to use" "When NOT to use" "Inputs required" "Outputs required" "Required tests" "Required fixtures" "Required contract updates" "Required codebase map updates" "Token saving rules" "Acceptance criteria" "Common mistakes" "Recovery workflow"; do
219
+ grep -q "^## $section" "$skill_dir/SKILL.md" || fail "missing section '$section': $skill_dir"
220
+ done
221
+ }
222
+
223
+ verified_harness=0
224
+
225
+ verify_one() {
226
+ local skill_dir="$1"
227
+ local expected_name
228
+ expected_name="$(basename "$skill_dir")"
229
+
230
+ case "$expected_name" in
231
+ genesis-harness)
232
+ verify_harness_skill "$skill_dir"
233
+ verified_harness=1
234
+ ;;
235
+ genesis-new-design|genesis-upgrade-design)
236
+ verify_design_skill "$skill_dir" "$expected_name"
237
+ ;;
238
+ architecture-skill|planning-skill|codebase-map-skill|design-spec-skill|api-contract-skill|ui-ux-test-skill|harness-engineering-skill|ai-provider-skill|pipeline-orchestration-skill|research-skill|docs-skill|release-skill)
239
+ verify_skill_metadata "$skill_dir" "$expected_name"
240
+ verify_skill_protocol "$skill_dir"
241
+ ;;
242
+ *)
243
+ fail "unknown skill for verification: $expected_name"
244
+ ;;
245
+ esac
246
+ }
247
+
248
+ if [ -f "$skill_root/SKILL.md" ]; then
249
+ verify_one "$skill_root"
250
+ else
251
+ for skill_name in "${skill_names[@]}"; do
252
+ verify_one "$skill_root/$skill_name"
253
+ done
254
+ fi
255
+
256
+ if [ "$verified_harness" -ne 1 ]; then
257
+ echo "verify passed: $skill_root"
258
+ exit 0
259
+ fi
260
+
261
+ harness_dir="$skill_root"
262
+ if [ ! -f "$harness_dir/SKILL.md" ]; then
263
+ harness_dir="$skill_root/genesis-harness"
264
+ fi
265
+
266
+ tmp="$(mktemp -d)"
267
+ cleanup() {
89
268
  rm -rf "$tmp"
90
269
  }
91
270
  trap cleanup EXIT
92
271
 
93
- set +e
94
- "$skill_dir/scripts/init-planning.sh" --root "$tmp" >/dev/null 2>"$tmp/init.err"
95
- code=$?
96
- set -e
97
- [ "$code" -eq 2 ] || fail "init-planning.sh should require confirmation"
98
-
99
- "$skill_dir/scripts/init-planning.sh" --confirmed --root "$tmp" >/dev/null
100
- "$skill_dir/scripts/create-feature.sh" sample-feature "Sample Feature" "$tmp" >/dev/null
101
- "$skill_dir/scripts/create-bug.sh" sample-bug "Sample Bug" "$tmp" >/dev/null
102
- "$skill_dir/scripts/create-adr.sh" use-sqlite "Use SQLite" "$tmp" >/dev/null
103
- "$skill_dir/scripts/update-state.sh" "$tmp" "01 Foundation" "features/001-sample-feature" "Created scaffold" "Fill plan" "Smoke passed" >/dev/null
104
- "$skill_dir/scripts/check-required-planning-files.sh" "$tmp"
105
- "$skill_dir/scripts/check-task-tracking.sh" "$tmp"
106
- "$skill_dir/scripts/check-architecture-boundaries.sh" "$tmp"
107
- "$skill_dir/scripts/check-no-debug-logs.sh" "$tmp" >/dev/null
108
-
109
- echo "verify passed: $skill_dir"
272
+ set +e
273
+ "$harness_dir/scripts/init-planning.sh" --root "$tmp" >/dev/null 2>"$tmp/init.err"
274
+ code=$?
275
+ set -e
276
+ [ "$code" -eq 2 ] || fail "init-planning.sh should require confirmation"
277
+
278
+ "$harness_dir/scripts/init-planning.sh" --confirmed --root "$tmp" >/dev/null
279
+ "$harness_dir/scripts/create-feature.sh" sample-feature "Sample Feature" "$tmp" >/dev/null
280
+ "$harness_dir/scripts/create-bug.sh" sample-bug "Sample Bug" "$tmp" >/dev/null
281
+ "$harness_dir/scripts/create-adr.sh" use-sqlite "Use SQLite" "$tmp" >/dev/null
282
+ "$harness_dir/scripts/update-state.sh" "$tmp" "01 Foundation" "features/001-sample-feature" "Created scaffold" "Fill plan" "Smoke passed" >/dev/null
283
+ "$harness_dir/scripts/check-required-planning-files.sh" "$tmp"
284
+ "$harness_dir/scripts/check-task-tracking.sh" "$tmp"
285
+ "$harness_dir/scripts/check-architecture-boundaries.sh" "$tmp"
286
+ "$harness_dir/scripts/check-no-debug-logs.sh" "$tmp" >/dev/null
287
+
288
+ echo "verify passed: $skill_root"
@@ -0,0 +1,10 @@
1
+ # Contract Test Template
2
+
3
+ For every endpoint or agent:
4
+
5
+ - success test
6
+ - validation error test
7
+ - not found test when addressable resources exist
8
+ - contract schema test
9
+ - snapshot test when output shape is stable
10
+
@@ -0,0 +1,4 @@
1
+ # Test Fixture Index
2
+
3
+ Map every fixture to the contract, test, and module it validates.
4
+
@@ -0,0 +1,4 @@
1
+ # Integration Test Template
2
+
3
+ Test real module boundaries with fixtures. Avoid network calls unless the test environment explicitly provides them.
4
+
@@ -0,0 +1,4 @@
1
+ # Unit Test Template
2
+
3
+ Test deterministic logic with small fixtures. One behavior per test.
4
+
@@ -1,9 +0,0 @@
1
- interface:
2
- display_name: "Project Genesis Harness"
3
- short_description: "Plan, track, verify, and review projects"
4
- brand_color: "#2563EB"
5
- default_prompt: "Use $project-genesis-harness to initialize planning and operate this repository with test-first workflows."
6
-
7
- policy:
8
- allow_implicit_invocation: true
9
-