codex-genesis-harness 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. package/.codebase/ARCHITECTURE_REVIEW_COMPLETE.md +216 -216
  2. package/.codebase/CURRENT_STATE.md +7 -2
  3. package/.codebase/FILE_NAMING_CLARIFICATION.md +161 -161
  4. package/.codebase/HARNESS_COMPLETENESS_AUDIT.md +613 -613
  5. package/.codebase/IMPLEMENTATION_COMPLETE.md +429 -429
  6. package/.codebase/IMPLEMENTATION_HANDOFF.md +351 -351
  7. package/.codebase/IMPROVEMENTS_SUMMARY.md +419 -419
  8. package/.codebase/PHASE3_SKILLS_NAMING_COMPLETE.md +292 -292
  9. package/.codebase/PHASE_DEPENDENCY_MAP.md +486 -486
  10. package/.codebase/QUICK_START_SPEC_IMPACT.md +456 -456
  11. package/.codebase/README.md +139 -139
  12. package/.codebase/RECOVERY_POINTS.md +438 -438
  13. package/.codex/skills/genesis-api-sync/SKILL.md +354 -354
  14. package/.codex/skills/genesis-api-sync/checklists/api-sync-checklist.md +101 -101
  15. package/.codex/skills/genesis-api-sync/templates/api-change-template.md +257 -257
  16. package/.codex/skills/genesis-debug-guide/SKILL.md +479 -479
  17. package/.codex/skills/genesis-debug-guide/checklists/flaky-test-investigation.md +339 -339
  18. package/.codex/skills/genesis-debug-guide/checklists/production-bug-debug.md +210 -210
  19. package/.codex/skills/genesis-debug-guide/checklists/test-failure-debug.md +158 -158
  20. package/.codex/skills/genesis-debug-guide/observability/debug-commands.md +365 -365
  21. package/.codex/skills/genesis-debug-guide/playbooks/unit-test-failures.md +289 -289
  22. package/.codex/skills/genesis-debug-guide/templates/debug-investigation-log.md +288 -288
  23. package/.codex/skills/genesis-docs-automation/SKILL.md +1003 -1003
  24. package/.codex/skills/genesis-docs-automation/checklists/docs-validation.md +359 -359
  25. package/.codex/skills/genesis-docs-automation/checklists/spec-alignment.md +312 -312
  26. package/.codex/skills/genesis-docs-automation/observability/docs-tracking.md +382 -382
  27. package/.codex/skills/genesis-docs-automation/playbooks/auto-update-flow.md +851 -851
  28. package/.codex/skills/genesis-docs-automation/playbooks/changelog-generation.md +491 -491
  29. package/.codex/skills/genesis-docs-automation/templates/changelog-entry-template.md +187 -187
  30. package/.codex/skills/genesis-docs-automation/templates/handoff-template.md +297 -297
  31. package/.codex/skills/genesis-harness/SKILL.md +1427 -1427
  32. package/.codex/skills/genesis-harness/agents/openai.yaml +7 -7
  33. package/.codex/skills/genesis-harness/checklists/bug-fix-qa.md +169 -169
  34. package/.codex/skills/genesis-harness/checklists/new-feature-qa.md +157 -157
  35. package/.codex/skills/genesis-harness/checklists/refactor-qa.md +216 -216
  36. package/.codex/skills/genesis-harness/checklists/requirements-validation.md +211 -211
  37. package/.codex/skills/genesis-harness/references/planning-schema.md +35 -35
  38. package/.codex/skills/genesis-harness/references/quality-rubric.md +21 -21
  39. package/.codex/skills/genesis-harness/references/research-rubric.md +41 -41
  40. package/.codex/skills/genesis-harness/references/workflows.md +33 -33
  41. package/.codex/skills/genesis-harness/resources/agents-template.md +27 -27
  42. package/.codex/skills/genesis-harness/resources/api-docs-template.md +32 -32
  43. package/.codex/skills/genesis-harness/resources/architecture-template.md +30 -30
  44. package/.codex/skills/genesis-harness/resources/audit-template.md +26 -26
  45. package/.codex/skills/genesis-harness/resources/bug-template.md +34 -34
  46. package/.codex/skills/genesis-harness/resources/change-impact-matrix-template.md +204 -204
  47. package/.codex/skills/genesis-harness/resources/check-template.md +21 -21
  48. package/.codex/skills/genesis-harness/resources/conventions-template.md +42 -42
  49. package/.codex/skills/genesis-harness/resources/decision-template.md +33 -33
  50. package/.codex/skills/genesis-harness/resources/design-template.md +26 -26
  51. package/.codex/skills/genesis-harness/resources/escalation-template.md +21 -21
  52. package/.codex/skills/genesis-harness/resources/feature-template.md +49 -49
  53. package/.codex/skills/genesis-harness/resources/foundation-phase-template.md +131 -131
  54. package/.codex/skills/genesis-harness/resources/integrations-template.md +32 -32
  55. package/.codex/skills/genesis-harness/resources/journeys-template.md +13 -13
  56. package/.codex/skills/genesis-harness/resources/lessons-learned-template.md +12 -12
  57. package/.codex/skills/genesis-harness/resources/observability-template.md +34 -34
  58. package/.codex/skills/genesis-harness/resources/phase-00-foundation-template.md +76 -76
  59. package/.codex/skills/genesis-harness/resources/phase-template.md +34 -34
  60. package/.codex/skills/genesis-harness/resources/pitfalls-template.md +22 -22
  61. package/.codex/skills/genesis-harness/resources/planning-tree-template.md +39 -39
  62. package/.codex/skills/genesis-harness/resources/post-implementation-guide.md +347 -347
  63. package/.codex/skills/genesis-harness/resources/project-template.md +38 -38
  64. package/.codex/skills/genesis-harness/resources/quality-score-template.md +11 -11
  65. package/.codex/skills/genesis-harness/resources/requirements-template.md +26 -26
  66. package/.codex/skills/genesis-harness/resources/research-template.md +26 -26
  67. package/.codex/skills/genesis-harness/resources/review-template.md +22 -22
  68. package/.codex/skills/genesis-harness/resources/spec-changelog-template.md +6 -6
  69. package/.codex/skills/genesis-harness/resources/stack-template.md +33 -33
  70. package/.codex/skills/genesis-harness/resources/verification-template.md +26 -26
  71. package/.codex/skills/genesis-harness/scripts/check-architecture-boundaries.sh +0 -0
  72. package/.codex/skills/genesis-harness/scripts/check-docs-sync.sh +0 -0
  73. package/.codex/skills/genesis-harness/scripts/check-no-debug-logs.sh +0 -0
  74. package/.codex/skills/genesis-harness/scripts/check-required-planning-files.sh +0 -0
  75. package/.codex/skills/genesis-harness/scripts/check-spec-changelog.sh +0 -0
  76. package/.codex/skills/genesis-harness/scripts/check-task-tracking.sh +0 -0
  77. package/.codex/skills/genesis-harness/scripts/compact-context.sh +0 -0
  78. package/.codex/skills/genesis-harness/scripts/create-adr.sh +0 -0
  79. package/.codex/skills/genesis-harness/scripts/create-bug.sh +0 -0
  80. package/.codex/skills/genesis-harness/scripts/create-feature.sh +0 -0
  81. package/.codex/skills/genesis-harness/scripts/detect-stack.sh +0 -0
  82. package/.codex/skills/genesis-harness/scripts/init-planning.sh +0 -0
  83. package/.codex/skills/genesis-harness/scripts/list-changed-files.sh +0 -0
  84. package/.codex/skills/genesis-harness/scripts/offload-log.sh +0 -0
  85. package/.codex/skills/genesis-harness/scripts/run-verification.sh +0 -0
  86. package/.codex/skills/genesis-harness/scripts/run-verify-loop.sh +0 -0
  87. package/.codex/skills/genesis-harness/scripts/update-state.sh +0 -0
  88. package/.codex/skills/genesis-mvp-planning/SKILL.md +114 -0
  89. package/.codex/skills/genesis-mvp-planning/agents/openai.yaml +6 -0
  90. package/.codex/skills/genesis-mvp-planning/checklists/mvp-readiness.md +18 -0
  91. package/.codex/skills/genesis-mvp-planning/examples/5-phase-roadmap-example.md +43 -0
  92. package/.codex/skills/genesis-mvp-planning/templates/phase-1-core.md +17 -0
  93. package/.codex/skills/genesis-mvp-planning/templates/phase-2-auth.md +17 -0
  94. package/.codex/skills/genesis-mvp-planning/templates/phase-3-features.md +17 -0
  95. package/.codex/skills/genesis-mvp-planning/templates/phase-4-integrations.md +17 -0
  96. package/.codex/skills/genesis-mvp-planning/templates/phase-5-readiness.md +17 -0
  97. package/.codex/skills/genesis-new-design/agents/openai.yaml +3 -3
  98. package/.codex/skills/genesis-observability-automation/checklists/.gitkeep +0 -0
  99. package/.codex/skills/genesis-observability-automation/observability/.gitkeep +0 -0
  100. package/.codex/skills/genesis-observability-automation/playbooks/.gitkeep +0 -0
  101. package/.codex/skills/genesis-observability-automation/templates/.gitkeep +0 -0
  102. package/.codex/skills/genesis-release-orchestration/SKILL.md +653 -653
  103. package/.codex/skills/genesis-release-orchestration/checklists/post-deployment-verification.md +274 -274
  104. package/.codex/skills/genesis-release-orchestration/checklists/pre-release-validation.md +220 -220
  105. package/.codex/skills/genesis-release-orchestration/observability/release-tracking.md +253 -253
  106. package/.codex/skills/genesis-release-orchestration/playbooks/canary-deployment-orchestration.md +472 -472
  107. package/.codex/skills/genesis-release-orchestration/playbooks/semantic-versioning-automation.md +494 -494
  108. package/.codex/skills/genesis-release-orchestration/templates/deployment-strategy-template.md +303 -303
  109. package/.codex/skills/genesis-release-orchestration/templates/release-runbook-template.md +420 -420
  110. package/.codex/skills/genesis-research-first/SKILL.md +237 -237
  111. package/.codex/skills/genesis-research-first/templates/.gitkeep +0 -0
  112. package/.codex/skills/genesis-spec-propagation/SKILL.md +534 -534
  113. package/.codex/skills/genesis-spec-propagation/checklists/phase-update-verification.md +384 -384
  114. package/.codex/skills/genesis-spec-propagation/checklists/spec-change-detection.md +257 -257
  115. package/.codex/skills/genesis-spec-propagation/observability/propagation-tracking.md +373 -373
  116. package/.codex/skills/genesis-spec-propagation/playbooks/breaking-change-propagation.md +692 -692
  117. package/.codex/skills/genesis-spec-propagation/playbooks/feature-change-propagation.md +434 -434
  118. package/.codex/skills/genesis-spec-propagation/templates/migration-guide-template.md +407 -407
  119. package/.codex/skills/genesis-upgrade-design/agents/openai.yaml +3 -3
  120. package/.codex/skills/spec-impact-engine/SKILL.md +504 -504
  121. package/.codex/skills/spec-impact-engine/detect-spec-changes.sh +0 -0
  122. package/.codex-plugin/plugin.json +19 -19
  123. package/CHANGELOG.md +42 -0
  124. package/LICENSE +22 -22
  125. package/README.EN.md +784 -730
  126. package/README.VI.md +776 -723
  127. package/README.md +102 -247
  128. package/VERSION +2 -2
  129. package/bin/genesis-harness.js +90 -87
  130. package/package.json +9 -3
  131. package/scripts/README.md +342 -342
  132. package/scripts/compact-context.sh +0 -0
  133. package/scripts/contract_integrity_gate.js +83 -0
  134. package/scripts/detect-changes.sh +0 -0
  135. package/scripts/healing_telemetry.js +118 -0
  136. package/scripts/install.sh +4 -1
  137. package/scripts/offload-log.sh +0 -0
  138. package/scripts/prompt_sentinel.js +84 -0
  139. package/scripts/run-evals.sh +1 -0
  140. package/scripts/run-verify-loop.sh +11 -0
  141. package/scripts/spec_visual_sync.js +157 -0
  142. package/scripts/test_generator.js +142 -0
  143. package/scripts/transition_state.sh +0 -0
  144. package/scripts/uninstall.sh +1 -0
  145. package/scripts/validation_gates.sh +40 -1
  146. package/scripts/verify.sh +5 -0
  147. package/tests/unit/contract_integrity_gate.test.js +74 -0
  148. package/tests/unit/healing_telemetry.test.js +58 -0
  149. package/tests/unit/prompt_sentinel.test.js +50 -0
  150. package/tests/unit/spec_visual_sync.test.js +77 -0
  151. package/tests/unit/test_generator.test.js +62 -0
@@ -1,237 +1,237 @@
1
- ---
2
- name: genesis-research-first
3
- description: Auto-enforce research-first pattern - automatically research documentation, best practices, and GitHub before any important decision. Research output feeds directly into planning. Triggered automatically for features, bugs, architecture changes, and spec updates.
4
- ---
5
-
6
- # Genesis Research-First (Auto-Enforce)
7
-
8
- ## Purpose
9
-
10
- **Eliminate guesswork by auto-researching before planning.**
11
-
12
- This skill enforces a strict research-first pattern:
13
-
14
- ```
15
- User Request
16
- → [AUTO] Research Phase
17
- → Read local documentation
18
- → Search GitHub for best practices
19
- → Check official package/framework docs
20
- → Review existing codebase patterns
21
- → [AUTO] Compile Research Note
22
- → [AUTO] Generate Planning Artifact
23
- → User Reviews & Confirms
24
- → Planning Proceeds
25
- ```
26
-
27
- **Not optional. Automatic.**
28
-
29
- ## When Auto-Triggered
30
-
31
- Auto-trigger on these task types:
32
-
33
- - `/init` - Project initialization
34
- - `/new-feature` - Feature work
35
- - `/fix-bug` - Bug fixes
36
- - `/spec-change` - Architecture or API changes
37
- - `/architecture` - System design decisions
38
- - `/design` - UI/UX changes
39
- - `/plan` - Planning from scratch
40
- - `/upgrade` - Major upgrades or refactoring
41
-
42
- ## Research Scope
43
-
44
- For each task, research covers:
45
-
46
- ### 1. Local Documentation (5 min)
47
- ```
48
- Check files:
49
- - .codebase/CURRENT_STATE.md
50
- - .codebase/DOMAIN_MODELS.md
51
- - .codebase/MODULE_INDEX.md
52
- - contracts/ (relevant)
53
- - README.EN.md / README.VI.md
54
- - .instructions.md
55
- - CONTRIBUTING.md
56
- ```
57
-
58
- ### 2. Codebase Patterns (5 min)
59
- ```
60
- Search for:
61
- - Similar features already implemented
62
- - Existing patterns (test fixtures, error handling, etc.)
63
- - Related modules and dependencies
64
- - Previous decisions (in memory files)
65
- ```
66
-
67
- ### 3. External Best Practices (5-10 min)
68
- ```
69
- Research:
70
- - Official docs (Node.js, React, framework, etc.)
71
- - GitHub repositories (top 3 with similar feature)
72
- - Stack Overflow (if question is specific)
73
- - Framework/library GitHub Issues (for known issues)
74
- ```
75
-
76
- ### 4. Compile Research Note
77
- ```
78
- Format:
79
- - Question: What are we deciding?
80
- - Local Evidence: What does codebase show?
81
- - External Evidence: What do best practices say?
82
- - Recommendation: Based on evidence, what's best?
83
- - Risks: What could go wrong?
84
- - Next Steps: What to verify?
85
- ```
86
-
87
- ## Output
88
-
89
- Each research produces:
90
-
91
- 1. **Research Note** (saved to `.planning/RESEARCH_NOTES/`)
92
- - Format: `RESEARCH_[TASK_ID]_[DATE].md`
93
- - Required: Question, local evidence, external evidence, recommendation, risks
94
-
95
- 2. **Compiled Plan** (passed to `genesis-planning` automatically)
96
- - Pre-populated with research findings
97
- - Pre-populated with existing patterns
98
- - Pre-populated with risk/constraint list
99
-
100
- ## Token Saving Rules
101
-
102
- - Read summaries before source files (use .codebase summaries)
103
- - Target searches: Search for specific pattern, not broad topics
104
- - Avoid pasting: Cite sources with line numbers, not full excerpts
105
- - Trust cache: If recently researched, skip re-research
106
- - Parallel: Run local + external research in parallel
107
-
108
- ## Acceptance Criteria
109
-
110
- Research is complete when:
111
-
112
- - [ ] Local documentation reviewed
113
- - [ ] Codebase patterns identified
114
- - [ ] 3+ external sources checked
115
- - [ ] Research note compiled with recommendation
116
- - [ ] Risks and constraints documented
117
- - [ ] Plan passed to `genesis-planning` with research context
118
-
119
- ## Common Mistakes
120
-
121
- - **Skipping local docs** - Wastes time researching what's already documented
122
- - **Broad searches** - "How to build features" instead of "GraphQL subscriptions in Node.js"
123
- - **Trusting stale docs** - Check issue date and GitHub activity
124
- - **Forgetting to cite** - Always include source, date, and confidence level
125
- - **Over-researching** - 15 min max per task (diminishing returns)
126
-
127
- ## Recovery Workflow
128
-
129
- If research is inconclusive:
130
-
131
- 1. Identify the **primary source of uncertainty**
132
- 2. Research that ONE thing deeper (docs, GitHub issues, etc.)
133
- 3. If still unclear, document assumptions and ask user
134
- 4. Proceed with smallest reversible test
135
-
136
- ## Example: Feature Research
137
-
138
- ### User Request
139
- ```
140
- /new-feature "Add real-time notifications with WebSocket"
141
- ```
142
-
143
- ### Auto-Research Output
144
-
145
- **RESEARCH_WEBSOCKET_2026-05-31.md**:
146
- ```markdown
147
- # Research: WebSocket Implementation
148
-
149
- ## Question
150
- What's the best way to add real-time notifications with WebSocket?
151
-
152
- ## Local Evidence
153
- - Codebase uses Express.js (Node.js server)
154
- - Already uses Socket.io for chat (see: src/modules/chat/)
155
- - Test pattern: fixtures + integration tests
156
- - Error handling: try/catch + structured logging
157
-
158
- ## External Evidence
159
- 1. Socket.io docs recommend pub/sub pattern for scaling
160
- 2. GitHub trending (express-websocket): 2k+ stars
161
- 3. Best practice: Use Socket.io adapter for multi-server scaling
162
-
163
- ## Recommendation
164
- Extend existing Socket.io setup (already familiar to team, reduces learning)
165
- Add namespace: /notifications
166
- Use Redis adapter for multi-server support
167
-
168
- ## Risks
169
- - Single point of failure if Redis goes down
170
- - Learning curve for team on Redis adapter (mitigated by docs)
171
-
172
- ## Next Steps
173
- 1. Check existing Socket.io configuration
174
- 2. Verify Redis availability
175
- 3. Create test fixtures for notification flow
176
- ```
177
-
178
- ### Auto-Generated Plan
179
- ```
180
- **Phase 1: Socket.io Namespace Setup**
181
- - Extend existing Socket.io (pattern: src/modules/chat/)
182
- - Create /notifications namespace
183
- - Add Redis adapter
184
-
185
- **Phase 2: Authentication**
186
- - Verify user can only receive own notifications
187
- - Add auth middleware
188
-
189
- **Phase 3: Notification Flow**
190
- - Create API endpoint to trigger notification
191
- - Add test fixtures
192
- - Integration tests
193
-
194
- **Risks from Research**:
195
- - Redis dependency must be available
196
- - Handle redis down gracefully
197
- ```
198
-
199
- ## Installation
200
-
201
- Installed with Genesis Codex Harness by default.
202
-
203
- ```bash
204
- npm install -g codex-genesis-harness@latest
205
- ```
206
-
207
- ## Commands
208
-
209
- ```bash
210
- # Explicitly trigger research (optional - auto-triggers for /init, /new-feature, etc.)
211
- /research "WebSocket real-time notifications"
212
-
213
- # View research notes
214
- cd .planning/RESEARCH_NOTES/
215
- ls *.md | sort -r | head
216
- ```
217
-
218
- ## For Developers: How It Works
219
-
220
- This skill runs as a **PreToolUse hook** in `.instructions.md`:
221
-
222
- ```yaml
223
- PreToolUse:
224
- - IF: task_type in [init, new-feature, fix-bug, spec-change, architecture, design, plan, upgrade]
225
- THEN:
226
- 1. Load research prompt template
227
- 2. Run research (local docs + codebase + GitHub)
228
- 3. Compile research note
229
- 4. Generate initial plan from research
230
- 5. Pass to user for review
231
- ```
232
-
233
- **No code generated until research complete.**
234
-
235
- ---
236
-
237
- **Genesis Research-First** | Enforce best-practice research workflow | v1.0
1
+ ---
2
+ name: genesis-research-first
3
+ description: Auto-enforce research-first pattern - automatically research documentation, best practices, and GitHub before any important decision. Research output feeds directly into planning. Triggered automatically for features, bugs, architecture changes, and spec updates.
4
+ ---
5
+
6
+ # Genesis Research-First (Auto-Enforce)
7
+
8
+ ## Purpose
9
+
10
+ **Eliminate guesswork by auto-researching before planning.**
11
+
12
+ This skill enforces a strict research-first pattern:
13
+
14
+ ```
15
+ User Request
16
+ → [AUTO] Research Phase
17
+ → Read local documentation
18
+ → Search GitHub for best practices
19
+ → Check official package/framework docs
20
+ → Review existing codebase patterns
21
+ → [AUTO] Compile Research Note
22
+ → [AUTO] Generate Planning Artifact
23
+ → User Reviews & Confirms
24
+ → Planning Proceeds
25
+ ```
26
+
27
+ **Not optional. Automatic.**
28
+
29
+ ## When Auto-Triggered
30
+
31
+ Auto-trigger on these task types:
32
+
33
+ - `/init` - Project initialization
34
+ - `/new-feature` - Feature work
35
+ - `/fix-bug` - Bug fixes
36
+ - `/spec-change` - Architecture or API changes
37
+ - `/architecture` - System design decisions
38
+ - `/design` - UI/UX changes
39
+ - `/plan` - Planning from scratch
40
+ - `/upgrade` - Major upgrades or refactoring
41
+
42
+ ## Research Scope
43
+
44
+ For each task, research covers:
45
+
46
+ ### 1. Local Documentation (5 min)
47
+ ```
48
+ Check files:
49
+ - .codebase/CURRENT_STATE.md
50
+ - .codebase/DOMAIN_MODELS.md
51
+ - .codebase/MODULE_INDEX.md
52
+ - contracts/ (relevant)
53
+ - README.EN.md / README.VI.md
54
+ - .instructions.md
55
+ - CONTRIBUTING.md
56
+ ```
57
+
58
+ ### 2. Codebase Patterns (5 min)
59
+ ```
60
+ Search for:
61
+ - Similar features already implemented
62
+ - Existing patterns (test fixtures, error handling, etc.)
63
+ - Related modules and dependencies
64
+ - Previous decisions (in memory files)
65
+ ```
66
+
67
+ ### 3. External Best Practices (5-10 min)
68
+ ```
69
+ Research:
70
+ - Official docs (Node.js, React, framework, etc.)
71
+ - GitHub repositories (top 3 with similar feature)
72
+ - Stack Overflow (if question is specific)
73
+ - Framework/library GitHub Issues (for known issues)
74
+ ```
75
+
76
+ ### 4. Compile Research Note
77
+ ```
78
+ Format:
79
+ - Question: What are we deciding?
80
+ - Local Evidence: What does codebase show?
81
+ - External Evidence: What do best practices say?
82
+ - Recommendation: Based on evidence, what's best?
83
+ - Risks: What could go wrong?
84
+ - Next Steps: What to verify?
85
+ ```
86
+
87
+ ## Output
88
+
89
+ Each research produces:
90
+
91
+ 1. **Research Note** (saved to `.planning/RESEARCH_NOTES/`)
92
+ - Format: `RESEARCH_[TASK_ID]_[DATE].md`
93
+ - Required: Question, local evidence, external evidence, recommendation, risks
94
+
95
+ 2. **Compiled Plan** (passed to `genesis-planning` automatically)
96
+ - Pre-populated with research findings
97
+ - Pre-populated with existing patterns
98
+ - Pre-populated with risk/constraint list
99
+
100
+ ## Token Saving Rules
101
+
102
+ - Read summaries before source files (use .codebase summaries)
103
+ - Target searches: Search for specific pattern, not broad topics
104
+ - Avoid pasting: Cite sources with line numbers, not full excerpts
105
+ - Trust cache: If recently researched, skip re-research
106
+ - Parallel: Run local + external research in parallel
107
+
108
+ ## Acceptance Criteria
109
+
110
+ Research is complete when:
111
+
112
+ - [ ] Local documentation reviewed
113
+ - [ ] Codebase patterns identified
114
+ - [ ] 3+ external sources checked
115
+ - [ ] Research note compiled with recommendation
116
+ - [ ] Risks and constraints documented
117
+ - [ ] Plan passed to `genesis-planning` with research context
118
+
119
+ ## Common Mistakes
120
+
121
+ - **Skipping local docs** - Wastes time researching what's already documented
122
+ - **Broad searches** - "How to build features" instead of "GraphQL subscriptions in Node.js"
123
+ - **Trusting stale docs** - Check issue date and GitHub activity
124
+ - **Forgetting to cite** - Always include source, date, and confidence level
125
+ - **Over-researching** - 15 min max per task (diminishing returns)
126
+
127
+ ## Recovery Workflow
128
+
129
+ If research is inconclusive:
130
+
131
+ 1. Identify the **primary source of uncertainty**
132
+ 2. Research that ONE thing deeper (docs, GitHub issues, etc.)
133
+ 3. If still unclear, document assumptions and ask user
134
+ 4. Proceed with smallest reversible test
135
+
136
+ ## Example: Feature Research
137
+
138
+ ### User Request
139
+ ```
140
+ /new-feature "Add real-time notifications with WebSocket"
141
+ ```
142
+
143
+ ### Auto-Research Output
144
+
145
+ **RESEARCH_WEBSOCKET_2026-05-31.md**:
146
+ ```markdown
147
+ # Research: WebSocket Implementation
148
+
149
+ ## Question
150
+ What's the best way to add real-time notifications with WebSocket?
151
+
152
+ ## Local Evidence
153
+ - Codebase uses Express.js (Node.js server)
154
+ - Already uses Socket.io for chat (see: src/modules/chat/)
155
+ - Test pattern: fixtures + integration tests
156
+ - Error handling: try/catch + structured logging
157
+
158
+ ## External Evidence
159
+ 1. Socket.io docs recommend pub/sub pattern for scaling
160
+ 2. GitHub trending (express-websocket): 2k+ stars
161
+ 3. Best practice: Use Socket.io adapter for multi-server scaling
162
+
163
+ ## Recommendation
164
+ Extend existing Socket.io setup (already familiar to team, reduces learning)
165
+ Add namespace: /notifications
166
+ Use Redis adapter for multi-server support
167
+
168
+ ## Risks
169
+ - Single point of failure if Redis goes down
170
+ - Learning curve for team on Redis adapter (mitigated by docs)
171
+
172
+ ## Next Steps
173
+ 1. Check existing Socket.io configuration
174
+ 2. Verify Redis availability
175
+ 3. Create test fixtures for notification flow
176
+ ```
177
+
178
+ ### Auto-Generated Plan
179
+ ```
180
+ **Phase 1: Socket.io Namespace Setup**
181
+ - Extend existing Socket.io (pattern: src/modules/chat/)
182
+ - Create /notifications namespace
183
+ - Add Redis adapter
184
+
185
+ **Phase 2: Authentication**
186
+ - Verify user can only receive own notifications
187
+ - Add auth middleware
188
+
189
+ **Phase 3: Notification Flow**
190
+ - Create API endpoint to trigger notification
191
+ - Add test fixtures
192
+ - Integration tests
193
+
194
+ **Risks from Research**:
195
+ - Redis dependency must be available
196
+ - Handle redis down gracefully
197
+ ```
198
+
199
+ ## Installation
200
+
201
+ Installed with Genesis Codex Harness by default.
202
+
203
+ ```bash
204
+ npm install -g codex-genesis-harness@latest
205
+ ```
206
+
207
+ ## Commands
208
+
209
+ ```bash
210
+ # Explicitly trigger research (optional - auto-triggers for /init, /new-feature, etc.)
211
+ /research "WebSocket real-time notifications"
212
+
213
+ # View research notes
214
+ cd .planning/RESEARCH_NOTES/
215
+ ls *.md | sort -r | head
216
+ ```
217
+
218
+ ## For Developers: How It Works
219
+
220
+ This skill runs as a **PreToolUse hook** in `.instructions.md`:
221
+
222
+ ```yaml
223
+ PreToolUse:
224
+ - IF: task_type in [init, new-feature, fix-bug, spec-change, architecture, design, plan, upgrade]
225
+ THEN:
226
+ 1. Load research prompt template
227
+ 2. Run research (local docs + codebase + GitHub)
228
+ 3. Compile research note
229
+ 4. Generate initial plan from research
230
+ 5. Pass to user for review
231
+ ```
232
+
233
+ **No code generated until research complete.**
234
+
235
+ ---
236
+
237
+ **Genesis Research-First** | Enforce best-practice research workflow | v1.0