@moreih29/nexus-core 0.12.0 → 0.14.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 (245) hide show
  1. package/README.md +76 -57
  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/assets/hooks/agent-bootstrap/handler.d.ts +4 -0
  51. package/dist/assets/hooks/agent-bootstrap/handler.d.ts.map +1 -0
  52. package/dist/assets/hooks/agent-bootstrap/handler.js +100 -0
  53. package/dist/assets/hooks/agent-bootstrap/handler.js.map +1 -0
  54. package/dist/assets/hooks/agent-finalize/handler.d.ts +4 -0
  55. package/dist/assets/hooks/agent-finalize/handler.d.ts.map +1 -0
  56. package/dist/assets/hooks/agent-finalize/handler.js +63 -0
  57. package/dist/assets/hooks/agent-finalize/handler.js.map +1 -0
  58. package/dist/assets/hooks/post-tool-telemetry/handler.d.ts +4 -0
  59. package/dist/assets/hooks/post-tool-telemetry/handler.d.ts.map +1 -0
  60. package/dist/assets/hooks/post-tool-telemetry/handler.js +40 -0
  61. package/dist/assets/hooks/post-tool-telemetry/handler.js.map +1 -0
  62. package/dist/assets/hooks/prompt-router/handler.d.ts +4 -0
  63. package/dist/assets/hooks/prompt-router/handler.d.ts.map +1 -0
  64. package/dist/assets/hooks/prompt-router/handler.js +204 -0
  65. package/dist/assets/hooks/prompt-router/handler.js.map +1 -0
  66. package/dist/assets/hooks/session-init/handler.d.ts +4 -0
  67. package/dist/assets/hooks/session-init/handler.d.ts.map +1 -0
  68. package/dist/assets/hooks/session-init/handler.js +23 -0
  69. package/dist/assets/hooks/session-init/handler.js.map +1 -0
  70. package/dist/hooks/agent-bootstrap.js +105 -0
  71. package/dist/hooks/agent-finalize.js +164 -0
  72. package/dist/hooks/post-tool-telemetry.js +55 -0
  73. package/dist/hooks/prompt-router.js +7300 -0
  74. package/dist/hooks/session-init.js +21 -0
  75. package/dist/manifests/claude-hooks.json +52 -0
  76. package/dist/manifests/codex-hooks.json +28 -0
  77. package/dist/manifests/opencode-manifest.json +44 -0
  78. package/dist/manifests/portability-report.json +87 -0
  79. package/dist/scripts/build-agents.d.ts +157 -0
  80. package/dist/scripts/build-agents.d.ts.map +1 -0
  81. package/dist/scripts/build-agents.js +737 -0
  82. package/dist/scripts/build-agents.js.map +1 -0
  83. package/dist/scripts/build-hooks.d.ts +16 -0
  84. package/dist/scripts/build-hooks.d.ts.map +1 -0
  85. package/dist/scripts/build-hooks.js +388 -0
  86. package/dist/scripts/build-hooks.js.map +1 -0
  87. package/dist/scripts/cli.d.ts +54 -0
  88. package/dist/scripts/cli.d.ts.map +1 -0
  89. package/dist/scripts/cli.js +467 -0
  90. package/dist/scripts/cli.js.map +1 -0
  91. package/dist/src/hooks/opencode-mount.d.ts +35 -0
  92. package/dist/src/hooks/opencode-mount.d.ts.map +1 -0
  93. package/dist/src/hooks/opencode-mount.js +352 -0
  94. package/dist/src/hooks/opencode-mount.js.map +1 -0
  95. package/dist/src/hooks/runtime.d.ts +37 -0
  96. package/dist/src/hooks/runtime.d.ts.map +1 -0
  97. package/dist/src/hooks/runtime.js +274 -0
  98. package/dist/src/hooks/runtime.js.map +1 -0
  99. package/dist/src/hooks/types.d.ts +196 -0
  100. package/dist/src/hooks/types.d.ts.map +1 -0
  101. package/dist/src/hooks/types.js +85 -0
  102. package/dist/src/hooks/types.js.map +1 -0
  103. package/dist/src/lsp/cache.d.ts +9 -0
  104. package/dist/src/lsp/cache.d.ts.map +1 -0
  105. package/dist/src/lsp/cache.js +216 -0
  106. package/dist/src/lsp/cache.js.map +1 -0
  107. package/dist/src/lsp/client.d.ts +24 -0
  108. package/dist/src/lsp/client.d.ts.map +1 -0
  109. package/dist/src/lsp/client.js +166 -0
  110. package/dist/src/lsp/client.js.map +1 -0
  111. package/dist/src/lsp/detect.d.ts +77 -0
  112. package/dist/src/lsp/detect.d.ts.map +1 -0
  113. package/dist/src/lsp/detect.js +116 -0
  114. package/dist/src/lsp/detect.js.map +1 -0
  115. package/dist/src/mcp/server.d.ts +5 -0
  116. package/dist/src/mcp/server.d.ts.map +1 -0
  117. package/dist/src/mcp/server.js +34 -0
  118. package/dist/src/mcp/server.js.map +1 -0
  119. package/dist/src/mcp/tools/artifact.d.ts +4 -0
  120. package/dist/src/mcp/tools/artifact.d.ts.map +1 -0
  121. package/dist/src/mcp/tools/artifact.js +36 -0
  122. package/dist/src/mcp/tools/artifact.js.map +1 -0
  123. package/dist/src/mcp/tools/history.d.ts +3 -0
  124. package/dist/src/mcp/tools/history.d.ts.map +1 -0
  125. package/dist/src/mcp/tools/history.js +29 -0
  126. package/dist/src/mcp/tools/history.js.map +1 -0
  127. package/dist/src/mcp/tools/lsp.d.ts +13 -0
  128. package/dist/src/mcp/tools/lsp.d.ts.map +1 -0
  129. package/dist/src/mcp/tools/lsp.js +225 -0
  130. package/dist/src/mcp/tools/lsp.js.map +1 -0
  131. package/dist/src/mcp/tools/plan.d.ts +3 -0
  132. package/dist/src/mcp/tools/plan.d.ts.map +1 -0
  133. package/dist/src/mcp/tools/plan.js +317 -0
  134. package/dist/src/mcp/tools/plan.js.map +1 -0
  135. package/dist/src/mcp/tools/task.d.ts +3 -0
  136. package/dist/src/mcp/tools/task.d.ts.map +1 -0
  137. package/dist/src/mcp/tools/task.js +252 -0
  138. package/dist/src/mcp/tools/task.js.map +1 -0
  139. package/dist/src/shared/invocations.d.ts +74 -0
  140. package/dist/src/shared/invocations.d.ts.map +1 -0
  141. package/dist/src/shared/invocations.js +247 -0
  142. package/dist/src/shared/invocations.js.map +1 -0
  143. package/dist/src/shared/json-store.d.ts +37 -0
  144. package/dist/src/shared/json-store.d.ts.map +1 -0
  145. package/dist/src/shared/json-store.js +163 -0
  146. package/dist/src/shared/json-store.js.map +1 -0
  147. package/dist/src/shared/mcp-utils.d.ts +3 -0
  148. package/dist/src/shared/mcp-utils.d.ts.map +1 -0
  149. package/dist/src/shared/mcp-utils.js +6 -0
  150. package/dist/src/shared/mcp-utils.js.map +1 -0
  151. package/dist/src/shared/paths.d.ts +21 -0
  152. package/dist/src/shared/paths.d.ts.map +1 -0
  153. package/dist/src/shared/paths.js +81 -0
  154. package/dist/src/shared/paths.js.map +1 -0
  155. package/dist/src/shared/tool-log.d.ts +8 -0
  156. package/dist/src/shared/tool-log.d.ts.map +1 -0
  157. package/dist/src/shared/tool-log.js +22 -0
  158. package/dist/src/shared/tool-log.js.map +1 -0
  159. package/dist/src/types/state.d.ts +862 -0
  160. package/dist/src/types/state.d.ts.map +1 -0
  161. package/dist/src/types/state.js +66 -0
  162. package/dist/src/types/state.js.map +1 -0
  163. package/docs/consuming/codex-lead-merge.md +106 -0
  164. package/docs/plugin-guide.md +396 -0
  165. package/docs/plugin-template/claude/.github/workflows/build.yml +60 -0
  166. package/docs/plugin-template/claude/README.md +110 -0
  167. package/docs/plugin-template/claude/package.json +16 -0
  168. package/docs/plugin-template/codex/.github/workflows/build.yml +51 -0
  169. package/docs/plugin-template/codex/README.md +147 -0
  170. package/docs/plugin-template/codex/package.json +17 -0
  171. package/docs/plugin-template/opencode/.github/workflows/build.yml +61 -0
  172. package/docs/plugin-template/opencode/README.md +121 -0
  173. package/docs/plugin-template/opencode/package.json +25 -0
  174. package/package.json +36 -28
  175. package/agents/architect/meta.yml +0 -13
  176. package/agents/designer/meta.yml +0 -13
  177. package/agents/engineer/meta.yml +0 -11
  178. package/agents/postdoc/meta.yml +0 -13
  179. package/agents/researcher/meta.yml +0 -12
  180. package/agents/reviewer/meta.yml +0 -12
  181. package/agents/strategist/meta.yml +0 -13
  182. package/agents/tester/meta.yml +0 -12
  183. package/agents/writer/meta.yml +0 -11
  184. package/conformance/README.md +0 -311
  185. package/conformance/examples/plan.extension.schema.example.json +0 -25
  186. package/conformance/lifecycle/README.md +0 -48
  187. package/conformance/lifecycle/agent-complete.json +0 -44
  188. package/conformance/lifecycle/agent-resume.json +0 -43
  189. package/conformance/lifecycle/agent-spawn.json +0 -36
  190. package/conformance/lifecycle/memory-access-record.json +0 -27
  191. package/conformance/lifecycle/session-end.json +0 -48
  192. package/conformance/scenarios/full-plan-cycle.json +0 -147
  193. package/conformance/scenarios/task-deps-ordering.json +0 -95
  194. package/conformance/schema/fixture.schema.json +0 -354
  195. package/conformance/state-schemas/agent-tracker.schema.json +0 -63
  196. package/conformance/state-schemas/history.schema.json +0 -134
  197. package/conformance/state-schemas/memory-access.schema.json +0 -36
  198. package/conformance/state-schemas/plan.schema.json +0 -77
  199. package/conformance/state-schemas/tasks.schema.json +0 -98
  200. package/conformance/tools/artifact-write.json +0 -97
  201. package/conformance/tools/context.json +0 -172
  202. package/conformance/tools/history-search.json +0 -219
  203. package/conformance/tools/plan-decide.json +0 -139
  204. package/conformance/tools/plan-start.json +0 -81
  205. package/conformance/tools/plan-status.json +0 -127
  206. package/conformance/tools/plan-update.json +0 -341
  207. package/conformance/tools/task-add.json +0 -156
  208. package/conformance/tools/task-close.json +0 -161
  209. package/conformance/tools/task-list.json +0 -177
  210. package/conformance/tools/task-update.json +0 -167
  211. package/docs/behavioral-contracts.md +0 -145
  212. package/docs/consumer-implementation-guide.md +0 -840
  213. package/docs/memory-lifecycle-contract.md +0 -119
  214. package/docs/nexus-layout.md +0 -224
  215. package/docs/nexus-outputs-contract.md +0 -344
  216. package/docs/nexus-state-overview.md +0 -170
  217. package/docs/nexus-tools-contract.md +0 -438
  218. package/manifest.json +0 -448
  219. package/schema/README.md +0 -69
  220. package/schema/agent.schema.json +0 -23
  221. package/schema/common.schema.json +0 -17
  222. package/schema/manifest.schema.json +0 -78
  223. package/schema/memory-policy.schema.json +0 -98
  224. package/schema/skill.schema.json +0 -54
  225. package/schema/task-exceptions.schema.json +0 -40
  226. package/schema/vocabulary.schema.json +0 -167
  227. package/scripts/.gitkeep +0 -0
  228. package/scripts/conformance-coverage.ts +0 -466
  229. package/scripts/import-from-claude-nexus.ts +0 -403
  230. package/scripts/lib/frontmatter.ts +0 -71
  231. package/scripts/lib/lint.ts +0 -348
  232. package/scripts/lib/structure.ts +0 -159
  233. package/scripts/lib/validate.ts +0 -796
  234. package/scripts/validate.ts +0 -90
  235. package/skills/nx-init/meta.yml +0 -8
  236. package/skills/nx-plan/meta.yml +0 -10
  237. package/skills/nx-run/meta.yml +0 -8
  238. package/skills/nx-sync/meta.yml +0 -7
  239. package/vocabulary/capabilities.yml +0 -65
  240. package/vocabulary/categories.yml +0 -11
  241. package/vocabulary/invocations.yml +0 -147
  242. package/vocabulary/memory_policy.yml +0 -88
  243. package/vocabulary/resume-tiers.yml +0 -11
  244. package/vocabulary/tags.yml +0 -60
  245. package/vocabulary/task-exceptions.yml +0 -29
@@ -1,63 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "conformance/state-schemas/agent-tracker.schema.json",
4
- "title": "Nexus Agent Tracker",
5
- "description": "Schema for .nexus/state/agent-tracker.json — registry of spawned agent instances tracked across a session. No schema_version field: this file is session-scoped and deleted on session end — migration anchor not required.",
6
- "type": "array",
7
- "items": {
8
- "type": "object",
9
- "additionalProperties": false,
10
- "required": ["harness_id", "started_at"],
11
- "properties": {
12
- "harness_id": {
13
- "type": "string",
14
- "pattern": "^[a-z][a-z0-9-]*$",
15
- "description": "Identifier of the harness that spawned this agent."
16
- },
17
- "agent_name": {
18
- "type": "string",
19
- "pattern": "^[a-z][a-z0-9-]*$",
20
- "description": "Neutral agent id as defined in nexus-core agents/{id}/meta.yml (e.g. 'architect', 'engineer')."
21
- },
22
- "agent_id": {
23
- "type": "string",
24
- "minLength": 1,
25
- "description": "Harness-specific opaque agent instance identifier. Format is defined by the writing harness (UUID, composite string, etc.). Consumers MUST treat the value as opaque — do not parse or infer agent identity across harness namespaces."
26
- },
27
- "started_at": {
28
- "type": "string",
29
- "format": "date-time",
30
- "description": "ISO 8601 timestamp when this agent instance was first started"
31
- },
32
- "last_resumed_at": {
33
- "type": "string",
34
- "format": "date-time",
35
- "description": "ISO 8601 timestamp of the most recent resume, if the agent has been resumed"
36
- },
37
- "resume_count": {
38
- "type": "number",
39
- "minimum": 0,
40
- "description": "Number of times this agent instance has been resumed"
41
- },
42
- "status": {
43
- "type": "string",
44
- "enum": ["running", "completed"],
45
- "description": "Current lifecycle status of the agent instance"
46
- },
47
- "stopped_at": {
48
- "type": "string",
49
- "format": "date-time",
50
- "description": "ISO 8601 timestamp when the agent completed or was stopped"
51
- },
52
- "last_message": {
53
- "type": "string",
54
- "description": "Last recorded output or status message from the agent"
55
- },
56
- "files_touched": {
57
- "type": "array",
58
- "items": { "type": "string" },
59
- "description": "Paths of files created or modified by this agent instance"
60
- }
61
- }
62
- }
63
- }
@@ -1,134 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "conformance/state-schemas/history.schema.json",
4
- "title": "Nexus History",
5
- "description": "Schema for .nexus/history.json — append-only log of completed plan/execution cycles",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": ["cycles"],
9
- "properties": {
10
- "schema_version": {
11
- "type": "string",
12
- "pattern": "^\\d+\\.\\d+$",
13
- "description": "nexus-core version that introduced this schema shape (e.g. '0.5'). Optional in v0.5.0 — candidate for required in v1.0.0 (Phase 2 entry)."
14
- },
15
- "cycles": {
16
- "type": "array",
17
- "description": "Chronologically ordered list of completed execution cycles",
18
- "items": {
19
- "type": "object",
20
- "additionalProperties": false,
21
- "required": ["completed_at", "branch", "plan", "tasks", "schema_version"],
22
- "properties": {
23
- "schema_version": {
24
- "type": "string",
25
- "pattern": "^\\d+\\.\\d+$",
26
- "description": "Version tag recorded at the time this cycle was archived. Required for every cycle as history.json accumulates across nexus-core versions."
27
- },
28
- "completed_at": {
29
- "type": "string",
30
- "format": "date-time",
31
- "description": "ISO 8601 timestamp when this cycle was closed"
32
- },
33
- "branch": {
34
- "type": "string",
35
- "minLength": 1,
36
- "description": "Git branch active during this cycle"
37
- },
38
- "plan": {
39
- "oneOf": [
40
- { "$ref": "#/$defs/planFile" },
41
- { "type": "null" }
42
- ],
43
- "description": "Snapshot of the plan at cycle completion, or null if no plan was active"
44
- },
45
- "tasks": {
46
- "type": "array",
47
- "description": "Snapshot of all tasks at cycle completion",
48
- "items": { "$ref": "#/$defs/task" }
49
- }
50
- }
51
- }
52
- }
53
- },
54
- "$defs": {
55
- "planFile": {
56
- "type": "object",
57
- "additionalProperties": false,
58
- "required": ["id", "topic", "issues", "created_at"],
59
- "properties": {
60
- "id": {
61
- "type": "number",
62
- "minimum": 1
63
- },
64
- "topic": {
65
- "type": "string",
66
- "minLength": 1
67
- },
68
- "issues": {
69
- "type": "array",
70
- "items": {
71
- "type": "object",
72
- "additionalProperties": false,
73
- "required": ["id", "title", "status"],
74
- "properties": {
75
- "id": { "type": "number", "minimum": 1 },
76
- "title": { "type": "string", "minLength": 1 },
77
- "status": { "type": "string", "enum": ["pending", "decided"] },
78
- "decision": { "type": "string" },
79
- "how_agents": {
80
- "type": "array",
81
- "items": { "type": "string" }
82
- },
83
- "how_summary": {
84
- "type": "object",
85
- "additionalProperties": { "type": "string" }
86
- },
87
- "how_agent_ids": {
88
- "type": "object",
89
- "additionalProperties": { "type": "string" }
90
- }
91
- }
92
- }
93
- },
94
- "research_summary": { "type": "string" },
95
- "created_at": {
96
- "type": "string",
97
- "format": "date-time"
98
- }
99
- }
100
- },
101
- "task": {
102
- "type": "object",
103
- "additionalProperties": false,
104
- "required": ["id", "title", "context", "status", "deps"],
105
- "properties": {
106
- "id": { "type": "number", "minimum": 1 },
107
- "title": { "type": "string", "minLength": 1 },
108
- "context": { "type": "string", "minLength": 1 },
109
- "approach": { "type": "string" },
110
- "acceptance": { "type": "string" },
111
- "risk": { "type": "string" },
112
- "status": {
113
- "type": "string",
114
- "enum": ["pending", "in_progress", "completed"]
115
- },
116
- "deps": {
117
- "type": "array",
118
- "items": { "type": "number" }
119
- },
120
- "plan_issue": { "type": "number" },
121
- "owner": { "type": "string" },
122
- "owner_agent_id": { "type": "string" },
123
- "owner_reuse_policy": {
124
- "type": "string",
125
- "enum": ["fresh", "resume_if_same_artifact", "resume"]
126
- },
127
- "created_at": {
128
- "type": "string",
129
- "format": "date-time"
130
- }
131
- }
132
- }
133
- }
134
- }
@@ -1,36 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "https://moreih29/nexus-core/conformance/state-schemas/memory-access.schema.json",
4
- "title": "Memory Access Record",
5
- "description": "Schema for a single line in .nexus/state/{harness_id}/memory-access.jsonl — each JSONL line is a JSON object satisfying this schema. Upsert key is `path`.",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": ["path", "last_accessed_ts", "access_count", "last_agent"],
9
- "properties": {
10
- "path": {
11
- "type": "string",
12
- "minLength": 1,
13
- "description": "Absolute path to the memory file that was read. Typically resolved under .nexus/memory/."
14
- },
15
- "last_accessed_ts": {
16
- "type": "string",
17
- "format": "date-time",
18
- "description": "ISO 8601 timestamp of the most recent read event for this file."
19
- },
20
- "access_count": {
21
- "type": "integer",
22
- "minimum": 0,
23
- "description": "Cumulative count of read events observed for this file since tracking began in this harness."
24
- },
25
- "last_agent": {
26
- "type": "string",
27
- "minLength": 1,
28
- "description": "Opaque harness-specific identifier for the agent (or equivalent subject) that performed the most recent read."
29
- },
30
- "schema_version": {
31
- "type": "string",
32
- "pattern": "^\\d+\\.\\d+$",
33
- "description": "Optional migration anchor, aligned with other state schemas introduced in v0.5.0."
34
- }
35
- }
36
- }
@@ -1,77 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "conformance/state-schemas/plan.schema.json",
4
- "title": "Nexus Plan State",
5
- "description": "Schema for .nexus/state/plan.json — the active plan produced by nx-plan and consumed by MCP tools",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": ["id", "topic", "issues", "created_at"],
9
- "properties": {
10
- "schema_version": {
11
- "type": "string",
12
- "pattern": "^\\d+\\.\\d+$",
13
- "description": "nexus-core version that introduced this schema shape (e.g. '0.5'). Optional in v0.5.0 — candidate for required in v1.0.0 (Phase 2 entry)."
14
- },
15
- "id": {
16
- "type": "number",
17
- "minimum": 1,
18
- "description": "Monotonically increasing plan identifier"
19
- },
20
- "topic": {
21
- "type": "string",
22
- "minLength": 1,
23
- "description": "Human-readable topic or goal of this plan"
24
- },
25
- "issues": {
26
- "type": "array",
27
- "description": "Ordered list of issues analyzed during planning",
28
- "items": {
29
- "type": "object",
30
- "additionalProperties": false,
31
- "required": ["id", "title", "status"],
32
- "properties": {
33
- "id": {
34
- "type": "number",
35
- "minimum": 1
36
- },
37
- "title": {
38
- "type": "string",
39
- "minLength": 1
40
- },
41
- "status": {
42
- "type": "string",
43
- "enum": ["pending", "decided"]
44
- },
45
- "decision": {
46
- "type": "string",
47
- "description": "The recorded decision; present when status is 'decided'"
48
- },
49
- "how_agents": {
50
- "type": "array",
51
- "items": { "type": "string" },
52
- "description": "Agent types consulted for this issue"
53
- },
54
- "how_summary": {
55
- "type": "object",
56
- "additionalProperties": { "type": "string" },
57
- "description": "Key/value map of per-agent analysis summaries"
58
- },
59
- "how_agent_ids": {
60
- "type": "object",
61
- "additionalProperties": { "type": "string" },
62
- "description": "Key/value map of agent type to agent instance ID"
63
- }
64
- }
65
- }
66
- },
67
- "research_summary": {
68
- "type": "string",
69
- "description": "Optional background research summary compiled during planning"
70
- },
71
- "created_at": {
72
- "type": "string",
73
- "format": "date-time",
74
- "description": "ISO 8601 timestamp when this plan was created"
75
- }
76
- }
77
- }
@@ -1,98 +0,0 @@
1
- {
2
- "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "conformance/state-schemas/tasks.schema.json",
4
- "title": "Nexus Tasks State",
5
- "description": "Schema for .nexus/state/tasks.json — the task list produced by nx-plan and mutated by MCP tools during nx-run",
6
- "type": "object",
7
- "additionalProperties": false,
8
- "required": ["goal", "decisions", "tasks"],
9
- "properties": {
10
- "schema_version": {
11
- "type": "string",
12
- "pattern": "^\\d+\\.\\d+$",
13
- "description": "nexus-core version that introduced this schema shape (e.g. '0.5'). Optional in v0.5.0 — candidate for required in v1.0.0 (Phase 2 entry)."
14
- },
15
- "goal": {
16
- "type": "string",
17
- "minLength": 1,
18
- "description": "High-level goal statement for the current execution cycle"
19
- },
20
- "decisions": {
21
- "type": "array",
22
- "items": { "type": "string" },
23
- "description": "Key decisions carried forward from planning that constrain execution"
24
- },
25
- "tasks": {
26
- "type": "array",
27
- "description": "Ordered list of tasks to be executed",
28
- "items": {
29
- "$ref": "#/$defs/task"
30
- }
31
- }
32
- },
33
- "$defs": {
34
- "task": {
35
- "type": "object",
36
- "additionalProperties": false,
37
- "required": ["id", "title", "context", "status", "deps"],
38
- "properties": {
39
- "id": {
40
- "type": "number",
41
- "minimum": 1
42
- },
43
- "title": {
44
- "type": "string",
45
- "minLength": 1
46
- },
47
- "context": {
48
- "type": "string",
49
- "minLength": 1,
50
- "description": "Background context and motivation for this task"
51
- },
52
- "approach": {
53
- "type": "string",
54
- "description": "Implementation approach guidance"
55
- },
56
- "acceptance": {
57
- "type": "string",
58
- "description": "Acceptance criteria for task completion"
59
- },
60
- "risk": {
61
- "type": "string",
62
- "description": "Known risks or concerns"
63
- },
64
- "status": {
65
- "type": "string",
66
- "enum": ["pending", "in_progress", "completed"]
67
- },
68
- "deps": {
69
- "type": "array",
70
- "items": { "type": "number" },
71
- "description": "Task IDs that must complete before this task can start"
72
- },
73
- "plan_issue": {
74
- "type": "number",
75
- "description": "ID of the plan issue that originated this task"
76
- },
77
- "owner": {
78
- "type": "string",
79
- "description": "Agent type assigned to own this task (e.g. 'engineer')"
80
- },
81
- "owner_agent_id": {
82
- "type": "string",
83
- "description": "Specific agent instance ID assigned to this task"
84
- },
85
- "owner_reuse_policy": {
86
- "type": "string",
87
- "enum": ["fresh", "resume_if_same_artifact", "resume"],
88
- "description": "Policy controlling agent instance reuse across task executions"
89
- },
90
- "created_at": {
91
- "type": "string",
92
- "format": "date-time",
93
- "description": "ISO 8601 timestamp when this task was created"
94
- }
95
- }
96
- }
97
- }
98
- }
@@ -1,97 +0,0 @@
1
- [
2
- {
3
- "test_id": "artifact_write_first",
4
- "description": "artifact_write creates the artifacts directory and writes the file when no artifacts directory exists, returning success:true and a path ending in the filename",
5
- "covers": {
6
- "return_value": {
7
- "artifact_write": ["success", "path"]
8
- }
9
- },
10
- "uncovered_params": ["filename", "content"],
11
- "precondition": {
12
- "state_files": {
13
- ".nexus/state/artifacts/findings.md": null
14
- }
15
- },
16
- "action": {
17
- "tool": "artifact_write",
18
- "params": {
19
- "filename": "findings.md",
20
- "content": "# Findings\n\nInitial research findings for the conformance test suite."
21
- }
22
- },
23
- "postcondition": {
24
- "return_value": {
25
- "$.success": true,
26
- "$.path": { "type": "string", "pattern": "findings\\.md$" }
27
- },
28
- "state_files": {
29
- ".nexus/state/artifacts/findings.md": {}
30
- }
31
- }
32
- },
33
- {
34
- "test_id": "artifact_write_overwrite",
35
- "description": "artifact_write overwrites an existing artifact file and returns success:true without error",
36
- "covers": {
37
- "return_value": {
38
- "artifact_write": ["success", "path"]
39
- }
40
- },
41
- "uncovered_params": ["filename", "content"],
42
- "precondition": {
43
- "state_files": {
44
- ".nexus/state/artifacts/existing.md": {
45
- "content": "old content"
46
- }
47
- }
48
- },
49
- "action": {
50
- "tool": "artifact_write",
51
- "params": {
52
- "filename": "existing.md",
53
- "content": "new content"
54
- }
55
- },
56
- "postcondition": {
57
- "return_value": {
58
- "$.success": true,
59
- "$.path": { "type": "string", "pattern": "existing\\.md$" }
60
- },
61
- "state_files": {
62
- ".nexus/state/artifacts/existing.md": {}
63
- }
64
- }
65
- },
66
- {
67
- "test_id": "artifact_write_creates_directory",
68
- "description": "artifact_write auto-creates the .nexus/state/artifacts/ directory when it does not exist and then writes the file successfully",
69
- "covers": {
70
- "return_value": {
71
- "artifact_write": ["success", "path"]
72
- }
73
- },
74
- "uncovered_params": ["filename", "content"],
75
- "precondition": {
76
- "state_files": {
77
- ".nexus/state/artifacts/synthesis.md": null
78
- }
79
- },
80
- "action": {
81
- "tool": "artifact_write",
82
- "params": {
83
- "filename": "synthesis.md",
84
- "content": "# Synthesis\n\nCross-cycle pattern analysis."
85
- }
86
- },
87
- "postcondition": {
88
- "return_value": {
89
- "$.success": true,
90
- "$.path": { "type": "string", "pattern": "synthesis\\.md$" }
91
- },
92
- "state_files": {
93
- ".nexus/state/artifacts/synthesis.md": {}
94
- }
95
- }
96
- }
97
- ]
@@ -1,172 +0,0 @@
1
- [
2
- {
3
- "test_id": "context_no_tasks",
4
- "description": "context returns activeMode:null and an empty decisions array with a valid branch string when tasks.json does not exist",
5
- "covers": {
6
- "return_value": {
7
- "context": ["activeMode", "branch", "decisions"]
8
- }
9
- },
10
- "precondition": {
11
- "state_files": {
12
- ".nexus/state/tasks.json": null
13
- }
14
- },
15
- "action": {
16
- "tool": "context",
17
- "params": {}
18
- },
19
- "postcondition": {
20
- "return_value": {
21
- "$.activeMode": null,
22
- "$.branch": { "type": "string", "minLength": 1 },
23
- "$.decisions.length": 0
24
- }
25
- }
26
- },
27
- {
28
- "test_id": "context_with_tasks",
29
- "description": "context returns activeMode:team, the goal, and a tasksSummary with the correct total when tasks.json exists with a goal and 2 tasks",
30
- "covers": {
31
- "state_schemas": {
32
- "tasks.schema.json": ["goal", "tasks[].id", "tasks[].status"]
33
- },
34
- "return_value": {
35
- "context": ["activeMode", "goal", "tasksSummary.total", "tasksSummary.completed", "tasksSummary.pending"]
36
- }
37
- },
38
- "precondition": {
39
- "state_files": {
40
- ".nexus/state/tasks.json": {
41
- "goal": "Deliver conformance fixture suite",
42
- "decisions": [],
43
- "tasks": [
44
- {
45
- "id": 1,
46
- "title": "Write fixture schema",
47
- "context": "Define the JSON Schema",
48
- "status": "completed",
49
- "deps": [],
50
- "created_at": "2026-04-13T00:00:00.000Z"
51
- },
52
- {
53
- "id": 2,
54
- "title": "Write tool fixtures",
55
- "context": "Create per-tool fixture files",
56
- "status": "pending",
57
- "deps": [1],
58
- "created_at": "2026-04-13T00:00:00.000Z"
59
- }
60
- ]
61
- }
62
- }
63
- },
64
- "action": {
65
- "tool": "context",
66
- "params": {}
67
- },
68
- "postcondition": {
69
- "return_value": {
70
- "$.activeMode": "team",
71
- "$.goal": "Deliver conformance fixture suite",
72
- "$.tasksSummary.total": 2
73
- }
74
- }
75
- },
76
- {
77
- "test_id": "context_with_decisions",
78
- "description": "context returns a decisions array with length 2 when decisions.json contains 2 entries alongside an active tasks.json",
79
- "covers": {
80
- "return_value": {
81
- "context": ["decisions"]
82
- }
83
- },
84
- "precondition": {
85
- "state_files": {
86
- ".nexus/state/tasks.json": {
87
- "goal": "Deliver conformance fixture suite",
88
- "decisions": [
89
- "Use declarative JSONPath assertions for harness neutrality.",
90
- "One tool per fixture file to keep scope bounded."
91
- ],
92
- "tasks": [
93
- {
94
- "id": 1,
95
- "title": "Write fixture schema",
96
- "context": "Define the JSON Schema",
97
- "status": "completed",
98
- "deps": [],
99
- "created_at": "2026-04-13T00:00:00.000Z"
100
- }
101
- ]
102
- }
103
- }
104
- },
105
- "action": {
106
- "tool": "context",
107
- "params": {}
108
- },
109
- "postcondition": {
110
- "return_value": {
111
- "$.decisions.length": 2
112
- }
113
- }
114
- },
115
- {
116
- "test_id": "context_tasks_summary_breakdown",
117
- "description": "context computes tasksSummary correctly when the task list contains 1 completed, 1 pending, and 1 in_progress task",
118
- "covers": {
119
- "state_schemas": {
120
- "tasks.schema.json": ["tasks[].status"]
121
- },
122
- "return_value": {
123
- "context": ["tasksSummary.total", "tasksSummary.completed", "tasksSummary.pending"]
124
- }
125
- },
126
- "precondition": {
127
- "state_files": {
128
- ".nexus/state/tasks.json": {
129
- "goal": "Summary breakdown validation",
130
- "decisions": [],
131
- "tasks": [
132
- {
133
- "id": 1,
134
- "title": "Done task",
135
- "context": "Already finished",
136
- "status": "completed",
137
- "deps": [],
138
- "created_at": "2026-04-13T00:00:00.000Z"
139
- },
140
- {
141
- "id": 2,
142
- "title": "Pending task",
143
- "context": "Not yet started",
144
- "status": "pending",
145
- "deps": [],
146
- "created_at": "2026-04-13T00:00:00.000Z"
147
- },
148
- {
149
- "id": 3,
150
- "title": "Active task",
151
- "context": "Currently being worked on",
152
- "status": "in_progress",
153
- "deps": [],
154
- "created_at": "2026-04-13T00:00:00.000Z"
155
- }
156
- ]
157
- }
158
- }
159
- },
160
- "action": {
161
- "tool": "context",
162
- "params": {}
163
- },
164
- "postcondition": {
165
- "return_value": {
166
- "$.tasksSummary.total": 3,
167
- "$.tasksSummary.completed": 1,
168
- "$.tasksSummary.pending": 1
169
- }
170
- }
171
- }
172
- ]