@moreih29/nexus-core 0.11.0 → 0.13.0

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 (210) hide show
  1. package/README.md +48 -63
  2. package/assets/agents/architect/body.ko.md +177 -0
  3. package/{agents → assets/agents}/architect/body.md +16 -0
  4. package/assets/agents/designer/body.ko.md +125 -0
  5. package/{agents → assets/agents}/designer/body.md +16 -0
  6. package/assets/agents/engineer/body.ko.md +106 -0
  7. package/{agents → assets/agents}/engineer/body.md +14 -0
  8. package/assets/agents/lead/body.ko.md +70 -0
  9. package/assets/agents/lead/body.md +70 -0
  10. package/assets/agents/postdoc/body.ko.md +122 -0
  11. package/{agents → assets/agents}/postdoc/body.md +16 -0
  12. package/assets/agents/researcher/body.ko.md +137 -0
  13. package/{agents → assets/agents}/researcher/body.md +15 -0
  14. package/assets/agents/reviewer/body.ko.md +138 -0
  15. package/{agents → assets/agents}/reviewer/body.md +15 -0
  16. package/assets/agents/strategist/body.ko.md +116 -0
  17. package/{agents → assets/agents}/strategist/body.md +16 -0
  18. package/assets/agents/tester/body.ko.md +195 -0
  19. package/{agents → assets/agents}/tester/body.md +15 -0
  20. package/assets/agents/writer/body.ko.md +122 -0
  21. package/{agents → assets/agents}/writer/body.md +14 -0
  22. package/assets/capability-matrix.yml +198 -0
  23. package/assets/hooks/agent-bootstrap/handler.test.ts +368 -0
  24. package/assets/hooks/agent-bootstrap/handler.ts +119 -0
  25. package/assets/hooks/agent-bootstrap/meta.yml +10 -0
  26. package/assets/hooks/agent-finalize/handler.test.ts +368 -0
  27. package/assets/hooks/agent-finalize/handler.ts +76 -0
  28. package/assets/hooks/agent-finalize/meta.yml +10 -0
  29. package/assets/hooks/capability-matrix.yml +313 -0
  30. package/assets/hooks/post-tool-telemetry/handler.test.ts +302 -0
  31. package/assets/hooks/post-tool-telemetry/handler.ts +49 -0
  32. package/assets/hooks/post-tool-telemetry/meta.yml +11 -0
  33. package/assets/hooks/prompt-router/handler.test.ts +801 -0
  34. package/assets/hooks/prompt-router/handler.ts +261 -0
  35. package/assets/hooks/prompt-router/meta.yml +11 -0
  36. package/assets/hooks/session-init/handler.test.ts +274 -0
  37. package/assets/hooks/session-init/handler.ts +30 -0
  38. package/assets/hooks/session-init/meta.yml +9 -0
  39. package/assets/lsp-servers.json +55 -0
  40. package/assets/schema/lsp-servers.schema.json +67 -0
  41. package/assets/skills/nx-init/body.ko.md +197 -0
  42. package/{skills → assets/skills}/nx-init/body.md +11 -0
  43. package/assets/skills/nx-plan/body.ko.md +361 -0
  44. package/{skills → assets/skills}/nx-plan/body.md +13 -0
  45. package/assets/skills/nx-run/body.ko.md +161 -0
  46. package/{skills → assets/skills}/nx-run/body.md +11 -0
  47. package/assets/skills/nx-sync/body.ko.md +92 -0
  48. package/{skills → assets/skills}/nx-sync/body.md +10 -0
  49. package/assets/tools/tool-name-map.yml +353 -0
  50. package/dist/hooks/opencode-mount.d.ts +35 -0
  51. package/dist/hooks/opencode-mount.d.ts.map +1 -0
  52. package/dist/hooks/opencode-mount.js +332 -0
  53. package/dist/hooks/opencode-mount.js.map +1 -0
  54. package/dist/hooks/runtime.d.ts +37 -0
  55. package/dist/hooks/runtime.d.ts.map +1 -0
  56. package/dist/hooks/runtime.js +274 -0
  57. package/dist/hooks/runtime.js.map +1 -0
  58. package/dist/hooks/types.d.ts +196 -0
  59. package/dist/hooks/types.d.ts.map +1 -0
  60. package/dist/hooks/types.js +85 -0
  61. package/dist/hooks/types.js.map +1 -0
  62. package/dist/lsp/cache.d.ts +9 -0
  63. package/dist/lsp/cache.d.ts.map +1 -0
  64. package/dist/lsp/cache.js +216 -0
  65. package/dist/lsp/cache.js.map +1 -0
  66. package/dist/lsp/client.d.ts +24 -0
  67. package/dist/lsp/client.d.ts.map +1 -0
  68. package/dist/lsp/client.js +166 -0
  69. package/dist/lsp/client.js.map +1 -0
  70. package/dist/lsp/detect.d.ts +77 -0
  71. package/dist/lsp/detect.d.ts.map +1 -0
  72. package/dist/lsp/detect.js +116 -0
  73. package/dist/lsp/detect.js.map +1 -0
  74. package/dist/mcp/server.d.ts +5 -0
  75. package/dist/mcp/server.d.ts.map +1 -0
  76. package/dist/mcp/server.js +34 -0
  77. package/dist/mcp/server.js.map +1 -0
  78. package/dist/mcp/tools/artifact.d.ts +4 -0
  79. package/dist/mcp/tools/artifact.d.ts.map +1 -0
  80. package/dist/mcp/tools/artifact.js +36 -0
  81. package/dist/mcp/tools/artifact.js.map +1 -0
  82. package/dist/mcp/tools/history.d.ts +3 -0
  83. package/dist/mcp/tools/history.d.ts.map +1 -0
  84. package/dist/mcp/tools/history.js +29 -0
  85. package/dist/mcp/tools/history.js.map +1 -0
  86. package/dist/mcp/tools/lsp.d.ts +13 -0
  87. package/dist/mcp/tools/lsp.d.ts.map +1 -0
  88. package/dist/mcp/tools/lsp.js +225 -0
  89. package/dist/mcp/tools/lsp.js.map +1 -0
  90. package/dist/mcp/tools/plan.d.ts +3 -0
  91. package/dist/mcp/tools/plan.d.ts.map +1 -0
  92. package/dist/mcp/tools/plan.js +317 -0
  93. package/dist/mcp/tools/plan.js.map +1 -0
  94. package/dist/mcp/tools/task.d.ts +3 -0
  95. package/dist/mcp/tools/task.d.ts.map +1 -0
  96. package/dist/mcp/tools/task.js +252 -0
  97. package/dist/mcp/tools/task.js.map +1 -0
  98. package/dist/shared/invocations.d.ts +74 -0
  99. package/dist/shared/invocations.d.ts.map +1 -0
  100. package/dist/shared/invocations.js +247 -0
  101. package/dist/shared/invocations.js.map +1 -0
  102. package/dist/shared/json-store.d.ts +37 -0
  103. package/dist/shared/json-store.d.ts.map +1 -0
  104. package/dist/shared/json-store.js +163 -0
  105. package/dist/shared/json-store.js.map +1 -0
  106. package/dist/shared/mcp-utils.d.ts +3 -0
  107. package/dist/shared/mcp-utils.d.ts.map +1 -0
  108. package/dist/shared/mcp-utils.js +6 -0
  109. package/dist/shared/mcp-utils.js.map +1 -0
  110. package/dist/shared/paths.d.ts +21 -0
  111. package/dist/shared/paths.d.ts.map +1 -0
  112. package/dist/shared/paths.js +81 -0
  113. package/dist/shared/paths.js.map +1 -0
  114. package/dist/shared/tool-log.d.ts +8 -0
  115. package/dist/shared/tool-log.d.ts.map +1 -0
  116. package/dist/shared/tool-log.js +22 -0
  117. package/dist/shared/tool-log.js.map +1 -0
  118. package/dist/types/state.d.ts +862 -0
  119. package/dist/types/state.d.ts.map +1 -0
  120. package/dist/types/state.js +66 -0
  121. package/dist/types/state.js.map +1 -0
  122. package/docs/consuming/codex-lead-merge.md +106 -0
  123. package/docs/plugin-guide.md +360 -0
  124. package/docs/plugin-template/claude/.github/workflows/build.yml +60 -0
  125. package/docs/plugin-template/claude/README.md +110 -0
  126. package/docs/plugin-template/claude/package.json +16 -0
  127. package/docs/plugin-template/codex/.github/workflows/build.yml +51 -0
  128. package/docs/plugin-template/codex/README.md +147 -0
  129. package/docs/plugin-template/codex/package.json +17 -0
  130. package/docs/plugin-template/opencode/.github/workflows/build.yml +61 -0
  131. package/docs/plugin-template/opencode/README.md +121 -0
  132. package/docs/plugin-template/opencode/package.json +25 -0
  133. package/package.json +21 -21
  134. package/scripts/build-agents.test.ts +1279 -0
  135. package/scripts/build-agents.ts +978 -0
  136. package/scripts/build-hooks.test.ts +1385 -0
  137. package/scripts/build-hooks.ts +584 -0
  138. package/scripts/cli.test.ts +367 -0
  139. package/scripts/cli.ts +547 -0
  140. package/agents/architect/meta.yml +0 -13
  141. package/agents/designer/meta.yml +0 -13
  142. package/agents/engineer/meta.yml +0 -11
  143. package/agents/postdoc/meta.yml +0 -13
  144. package/agents/researcher/meta.yml +0 -12
  145. package/agents/reviewer/meta.yml +0 -12
  146. package/agents/strategist/meta.yml +0 -13
  147. package/agents/tester/meta.yml +0 -12
  148. package/agents/writer/meta.yml +0 -11
  149. package/conformance/README.md +0 -311
  150. package/conformance/examples/plan.extension.schema.example.json +0 -25
  151. package/conformance/lifecycle/README.md +0 -48
  152. package/conformance/lifecycle/agent-complete.json +0 -44
  153. package/conformance/lifecycle/agent-resume.json +0 -43
  154. package/conformance/lifecycle/agent-spawn.json +0 -36
  155. package/conformance/lifecycle/memory-access-record.json +0 -27
  156. package/conformance/lifecycle/session-end.json +0 -48
  157. package/conformance/scenarios/full-plan-cycle.json +0 -147
  158. package/conformance/scenarios/task-deps-ordering.json +0 -95
  159. package/conformance/schema/fixture.schema.json +0 -354
  160. package/conformance/state-schemas/agent-tracker.schema.json +0 -63
  161. package/conformance/state-schemas/history.schema.json +0 -134
  162. package/conformance/state-schemas/memory-access.schema.json +0 -36
  163. package/conformance/state-schemas/plan.schema.json +0 -77
  164. package/conformance/state-schemas/tasks.schema.json +0 -98
  165. package/conformance/tools/artifact-write.json +0 -97
  166. package/conformance/tools/context.json +0 -172
  167. package/conformance/tools/history-search.json +0 -219
  168. package/conformance/tools/plan-decide.json +0 -139
  169. package/conformance/tools/plan-start.json +0 -81
  170. package/conformance/tools/plan-status.json +0 -127
  171. package/conformance/tools/plan-update.json +0 -341
  172. package/conformance/tools/task-add.json +0 -156
  173. package/conformance/tools/task-close.json +0 -161
  174. package/conformance/tools/task-list.json +0 -177
  175. package/conformance/tools/task-update.json +0 -167
  176. package/docs/behavioral-contracts.md +0 -145
  177. package/docs/consumer-implementation-guide.md +0 -852
  178. package/docs/memory-lifecycle-contract.md +0 -119
  179. package/docs/nexus-layout.md +0 -224
  180. package/docs/nexus-outputs-contract.md +0 -344
  181. package/docs/nexus-state-overview.md +0 -170
  182. package/docs/nexus-tools-contract.md +0 -438
  183. package/manifest.json +0 -449
  184. package/schema/README.md +0 -69
  185. package/schema/agent.schema.json +0 -23
  186. package/schema/common.schema.json +0 -17
  187. package/schema/manifest.schema.json +0 -78
  188. package/schema/memory-policy.schema.json +0 -98
  189. package/schema/skill.schema.json +0 -54
  190. package/schema/task-exceptions.schema.json +0 -40
  191. package/schema/vocabulary.schema.json +0 -167
  192. package/scripts/.gitkeep +0 -0
  193. package/scripts/conformance-coverage.ts +0 -466
  194. package/scripts/import-from-claude-nexus.ts +0 -403
  195. package/scripts/lib/frontmatter.ts +0 -71
  196. package/scripts/lib/lint.ts +0 -348
  197. package/scripts/lib/structure.ts +0 -159
  198. package/scripts/lib/validate.ts +0 -794
  199. package/scripts/validate.ts +0 -90
  200. package/skills/nx-init/meta.yml +0 -8
  201. package/skills/nx-plan/meta.yml +0 -10
  202. package/skills/nx-run/meta.yml +0 -9
  203. package/skills/nx-sync/meta.yml +0 -7
  204. package/vocabulary/capabilities.yml +0 -65
  205. package/vocabulary/categories.yml +0 -11
  206. package/vocabulary/invocations.yml +0 -147
  207. package/vocabulary/memory_policy.yml +0 -88
  208. package/vocabulary/resume-tiers.yml +0 -11
  209. package/vocabulary/tags.yml +0 -60
  210. package/vocabulary/task-exceptions.yml +0 -29
@@ -1,341 +0,0 @@
1
- [
2
- {
3
- "test_id": "plan_update_add_happy_path",
4
- "description": "plan_update with action:add appends a new issue to the active plan with status pending and returns added:true",
5
- "covers": {
6
- "state_schemas": {
7
- "plan.schema.json": ["issues[].id", "issues[].title", "issues[].status"]
8
- },
9
- "return_value": {
10
- "plan_update": ["added", "issue.id", "issue.title", "issue.status"]
11
- }
12
- },
13
- "uncovered_params": ["action"],
14
- "precondition": {
15
- "state_files": {
16
- ".nexus/state/plan.json": {
17
- "id": 1,
18
- "topic": "Refactor state layer",
19
- "issues": [
20
- {
21
- "id": 1,
22
- "title": "Identify coupling points",
23
- "status": "pending"
24
- }
25
- ],
26
- "research_summary": "Reviewed codebase for state dependencies.",
27
- "created_at": "2026-04-13T00:00:00.000Z"
28
- }
29
- }
30
- },
31
- "action": {
32
- "tool": "plan_update",
33
- "params": {
34
- "action": "add",
35
- "title": "new issue"
36
- }
37
- },
38
- "postcondition": {
39
- "return_value": {
40
- "$.added": true,
41
- "$.issue.title": "new issue",
42
- "$.issue.status": "pending"
43
- },
44
- "state_files": {
45
- ".nexus/state/plan.json": {
46
- "$.issues.length": 2,
47
- "$.issues[1].title": "new issue",
48
- "$.issues[1].status": "pending"
49
- }
50
- }
51
- }
52
- },
53
- {
54
- "test_id": "plan_update_remove_happy_path",
55
- "description": "plan_update with action:remove deletes the target issue from the plan and returns removed:true",
56
- "covers": {
57
- "state_schemas": {
58
- "plan.schema.json": ["issues[].id"]
59
- },
60
- "return_value": {
61
- "plan_update": ["removed", "issue.id"]
62
- }
63
- },
64
- "uncovered_params": ["action", "issue_id"],
65
- "precondition": {
66
- "state_files": {
67
- ".nexus/state/plan.json": {
68
- "id": 2,
69
- "topic": "Refactor state layer",
70
- "issues": [
71
- {
72
- "id": 1,
73
- "title": "Identify coupling points",
74
- "status": "pending"
75
- },
76
- {
77
- "id": 2,
78
- "title": "Draft migration plan",
79
- "status": "pending"
80
- }
81
- ],
82
- "research_summary": "Reviewed codebase for state dependencies.",
83
- "created_at": "2026-04-13T00:00:00.000Z"
84
- }
85
- }
86
- },
87
- "action": {
88
- "tool": "plan_update",
89
- "params": {
90
- "action": "remove",
91
- "issue_id": 1
92
- }
93
- },
94
- "postcondition": {
95
- "return_value": {
96
- "$.removed": true,
97
- "$.issue.id": 1
98
- },
99
- "state_files": {
100
- ".nexus/state/plan.json": {
101
- "$.issues.length": 1,
102
- "$.issues[0].id": 2
103
- }
104
- }
105
- }
106
- },
107
- {
108
- "test_id": "plan_update_edit_happy_path",
109
- "description": "plan_update with action:edit changes the title of the target issue and returns edited:true",
110
- "covers": {
111
- "state_schemas": {
112
- "plan.schema.json": ["issues[].title"]
113
- },
114
- "return_value": {
115
- "plan_update": ["edited", "issue.title"]
116
- }
117
- },
118
- "uncovered_params": ["action", "issue_id"],
119
- "precondition": {
120
- "state_files": {
121
- ".nexus/state/plan.json": {
122
- "id": 3,
123
- "topic": "Refactor state layer",
124
- "issues": [
125
- {
126
- "id": 1,
127
- "title": "Old title",
128
- "status": "pending"
129
- }
130
- ],
131
- "research_summary": "Reviewed codebase for state dependencies.",
132
- "created_at": "2026-04-13T00:00:00.000Z"
133
- }
134
- }
135
- },
136
- "action": {
137
- "tool": "plan_update",
138
- "params": {
139
- "action": "edit",
140
- "issue_id": 1,
141
- "title": "edited"
142
- }
143
- },
144
- "postcondition": {
145
- "return_value": {
146
- "$.edited": true,
147
- "$.issue.title": "edited"
148
- },
149
- "state_files": {
150
- ".nexus/state/plan.json": {
151
- "$.issues[0].title": "edited"
152
- }
153
- }
154
- }
155
- },
156
- {
157
- "test_id": "plan_update_reopen_clears_decision",
158
- "description": "plan_update with action:reopen resets a decided issue back to pending status and removes its decision field",
159
- "covers": {
160
- "state_schemas": {
161
- "plan.schema.json": ["issues[].status", "issues[].decision"]
162
- },
163
- "return_value": {
164
- "plan_update": ["reopened", "issue.status"]
165
- }
166
- },
167
- "uncovered_params": ["action", "issue_id"],
168
- "precondition": {
169
- "state_files": {
170
- ".nexus/state/plan.json": {
171
- "id": 4,
172
- "topic": "Refactor state layer",
173
- "issues": [
174
- {
175
- "id": 1,
176
- "title": "Identify coupling points",
177
- "status": "decided",
178
- "decision": "Use dependency injection to decouple state access."
179
- }
180
- ],
181
- "research_summary": "Reviewed codebase for state dependencies.",
182
- "created_at": "2026-04-13T00:00:00.000Z"
183
- }
184
- }
185
- },
186
- "action": {
187
- "tool": "plan_update",
188
- "params": {
189
- "action": "reopen",
190
- "issue_id": 1
191
- }
192
- },
193
- "postcondition": {
194
- "return_value": {
195
- "$.reopened": true,
196
- "$.issue.status": "pending"
197
- },
198
- "state_files": {
199
- ".nexus/state/plan.json": {
200
- "$.issues[0].status": "pending",
201
- "$.issues[0].decision": null
202
- }
203
- }
204
- }
205
- },
206
- {
207
- "test_id": "plan_update_no_active_plan_error",
208
- "description": "plan_update returns an error containing 'No active plan session' when plan.json does not exist",
209
- "covers": {
210
- "return_value": {
211
- "plan_update": ["error"]
212
- }
213
- },
214
- "uncovered_params": ["action", "title"],
215
- "precondition": {
216
- "state_files": {
217
- ".nexus/state/plan.json": null
218
- }
219
- },
220
- "action": {
221
- "tool": "plan_update",
222
- "params": {
223
- "action": "add",
224
- "title": "Should fail"
225
- }
226
- },
227
- "postcondition": {
228
- "error_contains": "No active plan session"
229
- }
230
- },
231
- {
232
- "test_id": "plan_update_missing_issue_id_error",
233
- "description": "plan_update with action:remove returns an error when issue_id is omitted, because it is required for remove",
234
- "covers": {
235
- "return_value": {
236
- "plan_update": ["error"]
237
- }
238
- },
239
- "uncovered_params": ["action"],
240
- "precondition": {
241
- "state_files": {
242
- ".nexus/state/plan.json": {
243
- "id": 5,
244
- "topic": "Refactor state layer",
245
- "issues": [
246
- {
247
- "id": 1,
248
- "title": "Identify coupling points",
249
- "status": "pending"
250
- }
251
- ],
252
- "research_summary": "Reviewed codebase for state dependencies.",
253
- "created_at": "2026-04-13T00:00:00.000Z"
254
- }
255
- }
256
- },
257
- "action": {
258
- "tool": "plan_update",
259
- "params": {
260
- "action": "remove"
261
- }
262
- },
263
- "postcondition": {
264
- "error_contains": "issue_id is required"
265
- }
266
- },
267
- {
268
- "test_id": "plan_update_not_found_error",
269
- "description": "plan_update returns an error containing the issue id when the referenced issue_id does not exist in the plan",
270
- "covers": {
271
- "return_value": {
272
- "plan_update": ["error"]
273
- }
274
- },
275
- "uncovered_params": ["action", "issue_id", "title"],
276
- "precondition": {
277
- "state_files": {
278
- ".nexus/state/plan.json": {
279
- "id": 6,
280
- "topic": "Refactor state layer",
281
- "issues": [
282
- {
283
- "id": 1,
284
- "title": "Identify coupling points",
285
- "status": "pending"
286
- }
287
- ],
288
- "research_summary": "Reviewed codebase for state dependencies.",
289
- "created_at": "2026-04-13T00:00:00.000Z"
290
- }
291
- }
292
- },
293
- "action": {
294
- "tool": "plan_update",
295
- "params": {
296
- "action": "edit",
297
- "issue_id": 999,
298
- "title": "x"
299
- }
300
- },
301
- "postcondition": {
302
- "error_contains": "Issue 999 not found"
303
- }
304
- },
305
- {
306
- "test_id": "plan_update_unknown_action_error",
307
- "description": "plan_update returns an error containing 'Unknown action' when an unrecognized action value is passed",
308
- "covers": {
309
- "return_value": {
310
- "plan_update": ["error"]
311
- }
312
- },
313
- "uncovered_params": ["action"],
314
- "precondition": {
315
- "state_files": {
316
- ".nexus/state/plan.json": {
317
- "id": 7,
318
- "topic": "Refactor state layer",
319
- "issues": [
320
- {
321
- "id": 1,
322
- "title": "Identify coupling points",
323
- "status": "pending"
324
- }
325
- ],
326
- "research_summary": "Reviewed codebase for state dependencies.",
327
- "created_at": "2026-04-13T00:00:00.000Z"
328
- }
329
- }
330
- },
331
- "action": {
332
- "tool": "plan_update",
333
- "params": {
334
- "action": "invalid"
335
- }
336
- },
337
- "postcondition": {
338
- "error_contains": "Unknown action"
339
- }
340
- }
341
- ]
@@ -1,156 +0,0 @@
1
- [
2
- {
3
- "test_id": "task_add_happy_path",
4
- "description": "task_add creates tasks.json with the new task when no tasks.json existed, assigning id=1 and status=pending",
5
- "covers": {
6
- "state_schemas": {
7
- "tasks.schema.json": ["schema_version", "tasks[].id", "tasks[].title", "tasks[].status", "tasks[].deps", "tasks[].approach", "tasks[].acceptance", "tasks[].risk", "tasks[].context", "tasks[].created_at"]
8
- },
9
- "return_value": {
10
- "task_add": ["task"]
11
- }
12
- },
13
- "precondition": {
14
- "state_files": {
15
- ".nexus/state/tasks.json": null
16
- }
17
- },
18
- "action": {
19
- "tool": "task_add",
20
- "params": {
21
- "title": "Create fixture.schema.json",
22
- "context": "Define the JSON Schema that validates conformance test fixture files",
23
- "deps": [],
24
- "approach": "Write schema incrementally, validating against draft/2020-12 spec",
25
- "acceptance": "All 6 fixture files validate against the schema without errors",
26
- "risk": "JSONPath assertion syntax may need iteration to be harness-implementable"
27
- }
28
- },
29
- "postcondition": {
30
- "return_value": {
31
- "$.task.id": 1,
32
- "$.task.title": "Create fixture.schema.json",
33
- "$.task.status": "pending",
34
- "$.task.deps.length": 0,
35
- "$.task.created_at": { "type": "iso8601" }
36
- },
37
- "state_files": {
38
- ".nexus/state/tasks.json": {
39
- "$.tasks.length": 1,
40
- "$.tasks[0].id": 1,
41
- "$.tasks[0].title": "Create fixture.schema.json",
42
- "$.tasks[0].status": "pending",
43
- "$.tasks[0].context": { "type": "string", "minLength": 1 },
44
- "$.tasks[0].deps.length": 0,
45
- "$.tasks[0].approach": "Write schema incrementally, validating against draft/2020-12 spec",
46
- "$.tasks[0].acceptance": "All 6 fixture files validate against the schema without errors",
47
- "$.tasks[0].risk": "JSONPath assertion syntax may need iteration to be harness-implementable",
48
- "$.tasks[0].created_at": { "type": "iso8601" }
49
- }
50
- }
51
- }
52
- },
53
- {
54
- "test_id": "task_add_with_goal",
55
- "description": "task_add sets the goal field on tasks.json when the goal parameter is provided on the first call",
56
- "covers": {
57
- "state_schemas": {
58
- "tasks.schema.json": ["goal", "decisions", "decisions[]", "tasks[].deps[]"]
59
- },
60
- "return_value": {
61
- "task_add": ["task"]
62
- }
63
- },
64
- "precondition": {
65
- "state_files": {
66
- ".nexus/state/tasks.json": {
67
- "goal": "Existing goal",
68
- "decisions": [],
69
- "tasks": [
70
- {
71
- "id": 1,
72
- "title": "Prerequisite task",
73
- "context": "Already created",
74
- "status": "pending",
75
- "deps": [],
76
- "created_at": "2026-04-12T00:00:00.000Z"
77
- }
78
- ]
79
- }
80
- }
81
- },
82
- "action": {
83
- "tool": "task_add",
84
- "params": {
85
- "title": "Write conformance tool fixtures",
86
- "context": "Create the 4 per-tool fixture files covering happy path and error cases",
87
- "deps": [1],
88
- "goal": "Ship MVP conformance fixtures for nexus-core v0.2.0",
89
- "decisions": ["Cover plan_start, plan_decide, task_add, task_close"]
90
- }
91
- },
92
- "postcondition": {
93
- "return_value": {
94
- "$.task.id": 2,
95
- "$.task.title": "Write conformance tool fixtures",
96
- "$.task.deps[0]": 1
97
- },
98
- "state_files": {
99
- ".nexus/state/tasks.json": {
100
- "$.goal": "Ship MVP conformance fixtures for nexus-core v0.2.0",
101
- "$.decisions.length": 1,
102
- "$.decisions[0]": "Cover plan_start, plan_decide, task_add, task_close",
103
- "$.tasks.length": 2,
104
- "$.tasks[1].context": { "type": "string", "minLength": 1 },
105
- "$.tasks[1].deps[0]": 1
106
- }
107
- }
108
- }
109
- },
110
- {
111
- "test_id": "task_add_with_owner",
112
- "description": "task_add persists owner, owner_agent_id, and owner_reuse_policy on the created task when those params are provided",
113
- "covers": {
114
- "state_schemas": {
115
- "tasks.schema.json": ["tasks[].owner", "tasks[].owner_agent_id", "tasks[].owner_reuse_policy"]
116
- },
117
- "return_value": {
118
- "task_add": ["task"]
119
- }
120
- },
121
- "precondition": {
122
- "state_files": {
123
- ".nexus/state/tasks.json": null
124
- }
125
- },
126
- "action": {
127
- "tool": "task_add",
128
- "params": {
129
- "title": "Implement core feature",
130
- "context": "Write the initial implementation of the feature",
131
- "deps": [],
132
- "owner": "engineer",
133
- "owner_agent_id": "uuid-eng01",
134
- "owner_reuse_policy": "resume_if_same_artifact"
135
- }
136
- },
137
- "postcondition": {
138
- "return_value": {
139
- "$.task.id": 1,
140
- "$.task.title": "Implement core feature",
141
- "$.task.owner": "engineer",
142
- "$.task.owner_agent_id": "uuid-eng01",
143
- "$.task.owner_reuse_policy": "resume_if_same_artifact"
144
- },
145
- "state_files": {
146
- ".nexus/state/tasks.json": {
147
- "$.tasks[0].context": { "type": "string", "minLength": 1 },
148
- "$.tasks[0].deps.length": 0,
149
- "$.tasks[0].owner": "engineer",
150
- "$.tasks[0].owner_agent_id": "uuid-eng01",
151
- "$.tasks[0].owner_reuse_policy": "resume_if_same_artifact"
152
- }
153
- }
154
- }
155
- }
156
- ]
@@ -1,161 +0,0 @@
1
- [
2
- {
3
- "test_id": "task_close_happy_path",
4
- "description": "task_close archives plan and tasks into history.json then deletes plan.json and tasks.json",
5
- "covers": {
6
- "state_schemas": {
7
- "history.schema.json": [
8
- "schema_version",
9
- "cycles[].schema_version",
10
- "cycles[].completed_at",
11
- "cycles[].branch",
12
- "cycles[].plan",
13
- "cycles[].tasks",
14
- "cycles[].tasks[].title",
15
- "cycles[].tasks[].context",
16
- "cycles[].tasks[].approach",
17
- "cycles[].tasks[].acceptance",
18
- "cycles[].tasks[].risk",
19
- "cycles[].tasks[].status",
20
- "cycles[].tasks[].deps[]",
21
- "cycles[].tasks[].plan_issue",
22
- "cycles[].tasks[].owner",
23
- "cycles[].tasks[].owner_agent_id",
24
- "cycles[].tasks[].owner_reuse_policy",
25
- "cycles[].tasks[].created_at"
26
- ]
27
- },
28
- "return_value": {
29
- "task_close": ["closed", "archived.plan", "archived.decisions", "archived.tasks", "total_cycles"]
30
- }
31
- },
32
- "precondition": {
33
- "state_files": {
34
- ".nexus/state/plan.json": {
35
- "id": 1,
36
- "topic": "Introduce conformance test fixtures",
37
- "issues": [
38
- {
39
- "id": 1,
40
- "title": "What fixture format?",
41
- "status": "decided",
42
- "decision": "Declarative JSON with JSONPath assertions"
43
- },
44
- {
45
- "id": 2,
46
- "title": "Which tools to cover?",
47
- "status": "decided",
48
- "decision": "plan_start, plan_decide, task_add, task_close"
49
- }
50
- ],
51
- "research_summary": "Reviewed existing state-schemas and tool implementations.",
52
- "created_at": "2026-04-12T00:00:00.000Z"
53
- },
54
- ".nexus/state/tasks.json": {
55
- "goal": "Ship MVP conformance fixtures",
56
- "decisions": ["Declarative JSON with JSONPath assertions"],
57
- "tasks": [
58
- {
59
- "id": 1,
60
- "title": "Create fixture.schema.json",
61
- "context": "Define the JSON Schema for fixture files",
62
- "approach": "Write incrementally",
63
- "acceptance": "All fixture files validate",
64
- "risk": "Need iteration on JSONPath syntax",
65
- "status": "completed",
66
- "deps": [2],
67
- "plan_issue": 1,
68
- "owner": "engineer",
69
- "owner_agent_id": "uuid-eng01",
70
- "owner_reuse_policy": "fresh",
71
- "created_at": "2026-04-12T00:00:00.000Z"
72
- },
73
- {
74
- "id": 2,
75
- "title": "Research fixture formats",
76
- "context": "Survey existing contract-testing frameworks",
77
- "status": "completed",
78
- "deps": [],
79
- "created_at": "2026-04-11T00:00:00.000Z"
80
- }
81
- ]
82
- }
83
- }
84
- },
85
- "action": {
86
- "tool": "task_close",
87
- "params": {}
88
- },
89
- "postcondition": {
90
- "return_value": {
91
- "$.closed": true,
92
- "$.archived.plan": true,
93
- "$.archived.decisions": { "type": "number", "min": 1 },
94
- "$.archived.tasks": 2,
95
- "$.total_cycles": { "type": "number", "min": 1 }
96
- },
97
- "state_files": {
98
- ".nexus/state/plan.json": null,
99
- ".nexus/state/tasks.json": null,
100
- ".nexus/history.json": {
101
- "$.cycles.length": { "type": "number", "min": 1 },
102
- "$.cycles[-1].plan.topic": "Introduce conformance test fixtures",
103
- "$.cycles[-1].tasks.length": 2,
104
- "$.cycles[-1].completed_at": { "type": "iso8601" },
105
- "$.cycles[-1].branch": { "type": "string", "minLength": 1 },
106
- "$.cycles[-1].tasks[0].title": "Create fixture.schema.json",
107
- "$.cycles[-1].tasks[0].context": { "type": "string", "minLength": 1 },
108
- "$.cycles[-1].tasks[0].approach": { "type": "string", "minLength": 1 },
109
- "$.cycles[-1].tasks[0].acceptance": { "type": "string", "minLength": 1 },
110
- "$.cycles[-1].tasks[0].risk": { "type": "string", "minLength": 1 },
111
- "$.cycles[-1].tasks[0].status": "completed",
112
- "$.cycles[-1].tasks[0].plan_issue": 1,
113
- "$.cycles[-1].tasks[0].owner": "engineer",
114
- "$.cycles[-1].tasks[0].owner_agent_id": "uuid-eng01",
115
- "$.cycles[-1].tasks[0].owner_reuse_policy": "fresh",
116
- "$.cycles[-1].tasks[0].created_at": { "type": "iso8601" },
117
- "$.cycles[-1].tasks[0].deps[0]": 2
118
- }
119
- }
120
- }
121
- },
122
- {
123
- "test_id": "task_close_no_plan_or_tasks",
124
- "description": "task_close still creates a history cycle with null plan and empty tasks when neither plan.json nor tasks.json exist",
125
- "covers": {
126
- "state_schemas": {
127
- "history.schema.json": ["cycles[].plan", "cycles[].tasks"]
128
- },
129
- "return_value": {
130
- "task_close": ["closed", "archived.plan", "archived.tasks", "total_cycles"]
131
- }
132
- },
133
- "precondition": {
134
- "state_files": {
135
- ".nexus/state/plan.json": null,
136
- ".nexus/state/tasks.json": null
137
- }
138
- },
139
- "action": {
140
- "tool": "task_close",
141
- "params": {}
142
- },
143
- "postcondition": {
144
- "return_value": {
145
- "$.closed": true,
146
- "$.archived.plan": false,
147
- "$.archived.tasks": 0,
148
- "$.total_cycles": { "type": "number", "min": 1 }
149
- },
150
- "state_files": {
151
- ".nexus/state/plan.json": null,
152
- ".nexus/state/tasks.json": null,
153
- ".nexus/history.json": {
154
- "$.cycles.length": { "type": "number", "min": 1 },
155
- "$.cycles[-1].plan": null,
156
- "$.cycles[-1].tasks.length": 0
157
- }
158
- }
159
- }
160
- }
161
- ]