@moreih29/nexus-core 0.1.2 → 0.3.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.
- package/README.md +3 -3
- package/agents/architect/body.md +7 -6
- package/agents/designer/body.md +3 -3
- package/agents/engineer/body.md +8 -8
- package/agents/postdoc/body.md +4 -4
- package/agents/researcher/body.md +5 -5
- package/agents/reviewer/body.md +2 -2
- package/agents/strategist/body.md +4 -4
- package/agents/tester/body.md +2 -2
- package/agents/writer/body.md +1 -1
- package/conformance/README.md +125 -0
- package/conformance/scenarios/full-plan-cycle.json +132 -0
- package/conformance/scenarios/task-deps-ordering.json +83 -0
- package/conformance/schema/fixture.schema.json +224 -0
- package/conformance/state-schemas/agent-tracker.schema.json +58 -0
- package/conformance/state-schemas/history.schema.json +124 -0
- package/conformance/state-schemas/plan.schema.json +72 -0
- package/conformance/state-schemas/runtime.schema.json +25 -0
- package/conformance/state-schemas/tasks.schema.json +93 -0
- package/conformance/tools/plan-decide.json +70 -0
- package/conformance/tools/plan-start.json +67 -0
- package/conformance/tools/task-add.json +73 -0
- package/conformance/tools/task-close.json +98 -0
- package/conformance/tools/task-list.json +157 -0
- package/conformance/tools/task-update.json +139 -0
- package/docs/behavioral-contracts.md +145 -0
- package/docs/consumer-implementation-guide.md +844 -0
- package/docs/nexus-layout.md +234 -0
- package/docs/nexus-state-overview.md +185 -0
- package/docs/nexus-tools-contract.md +427 -0
- package/manifest.json +90 -82
- package/package.json +5 -1
- package/schema/common.schema.json +0 -4
- package/schema/skill.schema.json +16 -1
- package/schema/vocabulary.schema.json +14 -9
- package/skills/nx-init/body.md +14 -17
- package/skills/nx-init/meta.yml +3 -0
- package/skills/nx-plan/body.md +17 -14
- package/skills/nx-plan/meta.yml +3 -0
- package/skills/nx-run/body.md +4 -4
- package/skills/nx-run/meta.yml +3 -0
- package/skills/nx-sync/body.md +5 -5
- package/skills/nx-sync/meta.yml +1 -0
- package/vocabulary/capabilities.yml +58 -25
- package/skills/nx-setup/body.md +0 -196
- package/skills/nx-setup/meta.yml +0 -4
package/manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
|
-
"nexus_core_version": "0.
|
|
3
|
-
"nexus_core_commit": "
|
|
4
|
-
"schema_contract_version": "
|
|
2
|
+
"nexus_core_version": "0.3.0",
|
|
3
|
+
"nexus_core_commit": "c5953c739cd5e24be7dd9eb2bb2940e96f611039",
|
|
4
|
+
"schema_contract_version": "2.0",
|
|
5
5
|
"agents": [
|
|
6
6
|
{
|
|
7
7
|
"name": "architect",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"no_task_update"
|
|
18
18
|
],
|
|
19
19
|
"id": "architect",
|
|
20
|
-
"body_hash": "sha256:
|
|
20
|
+
"body_hash": "sha256:85f9a3de419f32cdae284436eb1d902bff19a2230c50fe3068ffc642949a63b7"
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
23
|
"name": "designer",
|
|
@@ -33,22 +33,21 @@
|
|
|
33
33
|
"no_task_update"
|
|
34
34
|
],
|
|
35
35
|
"id": "designer",
|
|
36
|
-
"body_hash": "sha256:
|
|
36
|
+
"body_hash": "sha256:88ac56147d0e5bdf23fa591ce570a9c2d0eb1338df4ec2219f6238ddfcb65df4"
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
|
-
"name": "
|
|
40
|
-
"description": "
|
|
41
|
-
"task": "
|
|
42
|
-
"alias_ko": "
|
|
43
|
-
"category": "
|
|
44
|
-
"resume_tier": "
|
|
39
|
+
"name": "engineer",
|
|
40
|
+
"description": "Implementation — writes code, debugs issues, follows specifications from Lead and architect",
|
|
41
|
+
"task": "Code implementation, edits, debugging",
|
|
42
|
+
"alias_ko": "엔지니어",
|
|
43
|
+
"category": "do",
|
|
44
|
+
"resume_tier": "bounded",
|
|
45
45
|
"model_tier": "standard",
|
|
46
46
|
"capabilities": [
|
|
47
|
-
"no_file_edit",
|
|
48
47
|
"no_task_create"
|
|
49
48
|
],
|
|
50
|
-
"id": "
|
|
51
|
-
"body_hash": "sha256:
|
|
49
|
+
"id": "engineer",
|
|
50
|
+
"body_hash": "sha256:3d58b1b490c2f93cace2eedd0f04ec000f84514388eb086768cf53f8fa33db01"
|
|
52
51
|
},
|
|
53
52
|
{
|
|
54
53
|
"name": "strategist",
|
|
@@ -64,21 +63,7 @@
|
|
|
64
63
|
"no_task_update"
|
|
65
64
|
],
|
|
66
65
|
"id": "strategist",
|
|
67
|
-
"body_hash": "sha256:
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"name": "engineer",
|
|
71
|
-
"description": "Implementation — writes code, debugs issues, follows specifications from Lead and architect",
|
|
72
|
-
"task": "Code implementation, edits, debugging",
|
|
73
|
-
"alias_ko": "엔지니어",
|
|
74
|
-
"category": "do",
|
|
75
|
-
"resume_tier": "bounded",
|
|
76
|
-
"model_tier": "standard",
|
|
77
|
-
"capabilities": [
|
|
78
|
-
"no_task_create"
|
|
79
|
-
],
|
|
80
|
-
"id": "engineer",
|
|
81
|
-
"body_hash": "sha256:79ce728ef86027c3301b26454ae5e1ed2db58cf4ce812521df4f6473661e3cd3"
|
|
66
|
+
"body_hash": "sha256:0254b4144a22c66209bd68119553d9057a4fb7f9b1ff7ebb9878687d99583465"
|
|
82
67
|
},
|
|
83
68
|
{
|
|
84
69
|
"name": "researcher",
|
|
@@ -93,7 +78,7 @@
|
|
|
93
78
|
"no_task_create"
|
|
94
79
|
],
|
|
95
80
|
"id": "researcher",
|
|
96
|
-
"body_hash": "sha256:
|
|
81
|
+
"body_hash": "sha256:fc79bafec05503327bd51a0b84b6e642d304bd79c45b78db6448b112793c143e"
|
|
97
82
|
},
|
|
98
83
|
{
|
|
99
84
|
"name": "postdoc",
|
|
@@ -109,7 +94,22 @@
|
|
|
109
94
|
"no_task_update"
|
|
110
95
|
],
|
|
111
96
|
"id": "postdoc",
|
|
112
|
-
"body_hash": "sha256:
|
|
97
|
+
"body_hash": "sha256:da9b8c2568b8b5812abed6d6324139f814379d48dc63cdc5d0b5b263f5407814"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"name": "reviewer",
|
|
101
|
+
"description": "Content verification — validates accuracy, checks facts, confirms grammar and format of non-code deliverables",
|
|
102
|
+
"task": "Content verification, fact-checking, grammar review",
|
|
103
|
+
"alias_ko": "리뷰어",
|
|
104
|
+
"category": "check",
|
|
105
|
+
"resume_tier": "ephemeral",
|
|
106
|
+
"model_tier": "standard",
|
|
107
|
+
"capabilities": [
|
|
108
|
+
"no_file_edit",
|
|
109
|
+
"no_task_create"
|
|
110
|
+
],
|
|
111
|
+
"id": "reviewer",
|
|
112
|
+
"body_hash": "sha256:f04d15249601b14046e7e40a4475defb289436c4474afbd89986964f8c3e7c2f"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"name": "tester",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"no_task_create"
|
|
125
125
|
],
|
|
126
126
|
"id": "tester",
|
|
127
|
-
"body_hash": "sha256:
|
|
127
|
+
"body_hash": "sha256:4dd04e1c93ff9c0c9fa6aebb60ece3f9719e82f9714b13feea01b6163633caec"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
"name": "writer",
|
|
@@ -138,94 +138,102 @@
|
|
|
138
138
|
"no_task_create"
|
|
139
139
|
],
|
|
140
140
|
"id": "writer",
|
|
141
|
-
"body_hash": "sha256:
|
|
141
|
+
"body_hash": "sha256:2edd9bf52e537c446b5ebfaafab214ebaaad2491f019aa8534453bff3f1cd37b"
|
|
142
142
|
}
|
|
143
143
|
],
|
|
144
144
|
"skills": [
|
|
145
145
|
{
|
|
146
146
|
"name": "nx-run",
|
|
147
147
|
"description": "Execution — user-directed agent composition.",
|
|
148
|
+
"summary": "Execution — user-directed agent composition",
|
|
148
149
|
"triggers": [
|
|
149
150
|
"run"
|
|
150
151
|
],
|
|
152
|
+
"harness_docs_refs": [
|
|
153
|
+
"resume_invocation"
|
|
154
|
+
],
|
|
151
155
|
"id": "nx-run",
|
|
152
|
-
"body_hash": "sha256:
|
|
156
|
+
"body_hash": "sha256:6c8d1a36626d4034209ff83780dec6238297ec4710612441b2ef09daac714ca8"
|
|
153
157
|
},
|
|
154
158
|
{
|
|
155
|
-
"name": "nx-
|
|
156
|
-
"description": "
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
|
|
159
|
+
"name": "nx-plan",
|
|
160
|
+
"description": "Structured multi-perspective analysis to decompose issues, align on decisions, and produce an enriched plan before execution. Plan only — does not execute.",
|
|
161
|
+
"summary": "Structured planning — subagent-based analysis, deliberate decisions, produce execution plan",
|
|
162
|
+
"triggers": [
|
|
163
|
+
"plan"
|
|
164
|
+
],
|
|
165
|
+
"harness_docs_refs": [
|
|
166
|
+
"resume_invocation"
|
|
167
|
+
],
|
|
168
|
+
"id": "nx-plan",
|
|
169
|
+
"body_hash": "sha256:85b858089bd3dc276be61baa3f5265bc107a85470f169983e710fecb404bb4b1"
|
|
160
170
|
},
|
|
161
171
|
{
|
|
162
172
|
"name": "nx-init",
|
|
163
173
|
"description": "Project onboarding — scan, mission, essentials, context generation",
|
|
174
|
+
"summary": "Project onboarding — scan, mission, essentials, context generation",
|
|
164
175
|
"manual_only": true,
|
|
176
|
+
"harness_docs_refs": [
|
|
177
|
+
"instruction_file"
|
|
178
|
+
],
|
|
165
179
|
"id": "nx-init",
|
|
166
|
-
"body_hash": "sha256:
|
|
180
|
+
"body_hash": "sha256:3c8230ecc0f87c541ec0ff80492a28f28bf173d0b9781901adadfae69a54b8ed"
|
|
167
181
|
},
|
|
168
182
|
{
|
|
169
183
|
"name": "nx-sync",
|
|
170
184
|
"description": "Context knowledge synchronization — scans project state and updates .nexus/context/ design documents",
|
|
185
|
+
"summary": "Context knowledge synchronization",
|
|
171
186
|
"triggers": [
|
|
172
187
|
"sync"
|
|
173
188
|
],
|
|
174
189
|
"id": "nx-sync",
|
|
175
|
-
"body_hash": "sha256:
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
"name": "nx-plan",
|
|
179
|
-
"description": "Structured multi-perspective analysis to decompose issues, align on decisions, and produce an enriched plan before execution. Plan only — does not execute.",
|
|
180
|
-
"triggers": [
|
|
181
|
-
"plan"
|
|
182
|
-
],
|
|
183
|
-
"id": "nx-plan",
|
|
184
|
-
"body_hash": "sha256:461097c9b69db300c0b6afe56fc138eca0c26f019ab5fe3c0d245fddcd848a22"
|
|
190
|
+
"body_hash": "sha256:a7b0ae8f13ebcd10e52361d0ada1570ff0c47933f731deec07e95539c63e6946"
|
|
185
191
|
}
|
|
186
192
|
],
|
|
187
193
|
"vocabulary": {
|
|
188
194
|
"capabilities": [
|
|
189
195
|
{
|
|
190
196
|
"id": "no_file_edit",
|
|
191
|
-
"description": "Agent cannot create or
|
|
192
|
-
"
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
"
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
"patch",
|
|
202
|
-
"multiedit"
|
|
203
|
-
]
|
|
204
|
-
}
|
|
197
|
+
"description": "Agent cannot create, modify, or delete files in the user's workspace.",
|
|
198
|
+
"intent": "workspace_write_denial",
|
|
199
|
+
"blocks_semantic_classes": [
|
|
200
|
+
"file_creation",
|
|
201
|
+
"file_modification",
|
|
202
|
+
"file_deletion",
|
|
203
|
+
"partial_file_edit",
|
|
204
|
+
"structured_document_edit"
|
|
205
|
+
],
|
|
206
|
+
"prose_guidance": "Block any tool whose primary effect is to alter content at a workspace\nfile path. This includes: creating new files at arbitrary paths, rewriting\nwhole file contents, applying partial edits (diffs, patches, find-replace,\nmulti-edit batches), deleting or truncating files, and cell-level edits in\nstructured documents such as notebooks.\nRead-only operations are NOT blocked: reading file contents, querying\nmetadata, listing directories, and running code-intelligence queries that\ndo not mutate files.\n"
|
|
205
207
|
},
|
|
206
208
|
{
|
|
207
209
|
"id": "no_task_create",
|
|
208
|
-
"description": "Agent cannot create new tasks in the Nexus task pipeline",
|
|
209
|
-
"
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
"nx_task_add"
|
|
215
|
-
]
|
|
216
|
-
}
|
|
210
|
+
"description": "Agent cannot create new tasks in the Nexus task pipeline.",
|
|
211
|
+
"intent": "task_pipeline_append_denial",
|
|
212
|
+
"blocks_semantic_classes": [
|
|
213
|
+
"nexus_task_creation"
|
|
214
|
+
],
|
|
215
|
+
"prose_guidance": "Block any tool that appends a new task to the Nexus task pipeline (the\nmechanism by which Lead-owned work is enqueued for execution). Tools that\nread, list, or query existing tasks are NOT blocked. Tools that modify\nexisting task state belong to a separate capability (no_task_update) and\nare not governed here.\n"
|
|
217
216
|
},
|
|
218
217
|
{
|
|
219
218
|
"id": "no_task_update",
|
|
220
|
-
"description": "Agent cannot update the state of existing Nexus tasks",
|
|
221
|
-
"
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
219
|
+
"description": "Agent cannot update the state of existing Nexus tasks.",
|
|
220
|
+
"intent": "task_pipeline_mutate_denial",
|
|
221
|
+
"blocks_semantic_classes": [
|
|
222
|
+
"nexus_task_state_transition",
|
|
223
|
+
"nexus_task_metadata_modification"
|
|
224
|
+
],
|
|
225
|
+
"prose_guidance": "Block any tool that mutates an existing Nexus task: changing its status,\nediting its description, reassigning ownership, closing it, or modifying\nany field on its record. Tools that read, list, or query tasks are NOT\nblocked. Creation of new tasks is governed by no_task_create, not here.\n"
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"id": "no_shell_exec",
|
|
229
|
+
"description": "Agent cannot execute arbitrary shell commands or spawn subprocesses.",
|
|
230
|
+
"intent": "shell_execution_denial",
|
|
231
|
+
"blocks_semantic_classes": [
|
|
232
|
+
"shell_command_exec",
|
|
233
|
+
"subprocess_spawn",
|
|
234
|
+
"interactive_shell_session"
|
|
235
|
+
],
|
|
236
|
+
"prose_guidance": "Block any tool whose primary effect is to run a command-line invocation,\nshell script, or spawn a subprocess on the user's machine. This includes\ngeneral-purpose shell runners, background process managers, shell output\nreaders, and shell-session kill operations. Tools that read files, query\nmetadata, or call specialized non-shell APIs (HTTP, language-server\nqueries, sandboxed code evaluators that do not spawn user-machine\nprocesses) are NOT blocked.\n"
|
|
229
237
|
}
|
|
230
238
|
],
|
|
231
239
|
"categories": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moreih29/nexus-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Nexus ecosystem Authoring layer — canonical prompts, neutral metadata, and vocabulary shared by Nexus harnesses",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -17,6 +17,8 @@
|
|
|
17
17
|
"./skills/*": "./skills/*",
|
|
18
18
|
"./vocabulary/*": "./vocabulary/*",
|
|
19
19
|
"./schema/*": "./schema/*",
|
|
20
|
+
"./conformance/*": "./conformance/*",
|
|
21
|
+
"./docs/*": "./docs/*",
|
|
20
22
|
"./manifest.json": "./manifest.json"
|
|
21
23
|
},
|
|
22
24
|
"files": [
|
|
@@ -24,6 +26,8 @@
|
|
|
24
26
|
"skills",
|
|
25
27
|
"vocabulary",
|
|
26
28
|
"schema",
|
|
29
|
+
"conformance",
|
|
30
|
+
"docs",
|
|
27
31
|
"manifest.json"
|
|
28
32
|
],
|
|
29
33
|
"engines": {
|
package/schema/skill.schema.json
CHANGED
|
@@ -15,7 +15,22 @@
|
|
|
15
15
|
"items": { "$ref": "common.schema.json#/$defs/id" }
|
|
16
16
|
},
|
|
17
17
|
"alias_ko": { "type": "string" },
|
|
18
|
-
"manual_only": {
|
|
18
|
+
"manual_only": {
|
|
19
|
+
"type": "boolean",
|
|
20
|
+
"default": false,
|
|
21
|
+
"description": "When true, this skill MUST NOT be auto-invoked by the LLM from natural language inference. Only explicit user-initiated triggers (slash command or bracket tag typed by the user) may activate it."
|
|
22
|
+
},
|
|
23
|
+
"summary": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 10,
|
|
26
|
+
"maxLength": 120,
|
|
27
|
+
"description": "Short one-line identity for UI/catalog rendering. Not a substitute for description."
|
|
28
|
+
},
|
|
29
|
+
"harness_docs_refs": {
|
|
30
|
+
"type": "array",
|
|
31
|
+
"items": { "type": "string", "minLength": 1 },
|
|
32
|
+
"description": "List of harness-specific documentation keys that consumers should surface when rendering this skill. Keys reference entries in a consumer-local harness-docs directory."
|
|
33
|
+
}
|
|
19
34
|
},
|
|
20
35
|
"allOf": [
|
|
21
36
|
{
|
|
@@ -6,18 +6,23 @@
|
|
|
6
6
|
"capabilityEntry": {
|
|
7
7
|
"type": "object",
|
|
8
8
|
"additionalProperties": false,
|
|
9
|
-
"required": ["id", "description", "
|
|
9
|
+
"required": ["id", "description", "intent", "blocks_semantic_classes", "prose_guidance"],
|
|
10
10
|
"properties": {
|
|
11
11
|
"id": { "$ref": "common.schema.json#/$defs/id" },
|
|
12
12
|
"description": { "$ref": "common.schema.json#/$defs/description" },
|
|
13
|
-
"
|
|
14
|
-
"type": "
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
"intent": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1,
|
|
16
|
+
"pattern": "^[a-z][a-z0-9_]*$"
|
|
17
|
+
},
|
|
18
|
+
"blocks_semantic_classes": {
|
|
19
|
+
"type": "array",
|
|
20
|
+
"minItems": 1,
|
|
21
|
+
"items": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" }
|
|
22
|
+
},
|
|
23
|
+
"prose_guidance": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"minLength": 40
|
|
21
26
|
}
|
|
22
27
|
}
|
|
23
28
|
},
|
package/skills/nx-init/body.md
CHANGED
|
@@ -4,11 +4,11 @@ Scans the project and builds Nexus knowledge in the flat .nexus/ structure. On f
|
|
|
4
4
|
|
|
5
5
|
## Constraints
|
|
6
6
|
|
|
7
|
-
- NEVER modify source code. Slimming down
|
|
7
|
+
- NEVER modify source code. Slimming down the instruction file beyond the project section is not this skill's responsibility.
|
|
8
8
|
- NEVER infer or guess information that cannot be confirmed from code — do not write it to context/.
|
|
9
9
|
- NEVER store secrets (API keys, credentials, etc.) in knowledge files.
|
|
10
|
-
- NEVER overwrite existing files without `--reset`. On resume, preserve existing files.
|
|
11
|
-
- Project section in
|
|
10
|
+
- NEVER overwrite existing files without `--reset`. On resume, preserve existing files intact.
|
|
11
|
+
- Project section in the instruction file MUST go through user confirmation before writing.
|
|
12
12
|
- NEVER reference or create identity/, codebase/, reference/, or core/ paths.
|
|
13
13
|
- Essentials section MUST NOT exceed 10 lines. If more items are needed, move lower-priority ones to .nexus/context/.
|
|
14
14
|
|
|
@@ -51,12 +51,9 @@ Show backup directory list, let user select backups to delete.
|
|
|
51
51
|
```
|
|
52
52
|
IF --reset --cleanup flag:
|
|
53
53
|
Show list of .nexus/bak.*/ directories
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
options: [...backup list..., { label: "Cancel", description: "Exit without changes" }]
|
|
58
|
-
}]
|
|
59
|
-
})
|
|
54
|
+
Prompt user with options (using the harness's interactive prompt mechanism):
|
|
55
|
+
question: "Select a backup to delete (or cancel)"
|
|
56
|
+
options: [...backup list..., { label: "Cancel", description: "Exit without changes" }]
|
|
60
57
|
Delete selected backup and exit
|
|
61
58
|
|
|
62
59
|
ELSE IF --reset flag:
|
|
@@ -79,7 +76,7 @@ ELSE:
|
|
|
79
76
|
|
|
80
77
|
Auto-detect code structure and tech stack. Create the flat `.nexus/` directory structure if it does not exist.
|
|
81
78
|
|
|
82
|
-
Create directories (using
|
|
79
|
+
Create directories (using shell command execution):
|
|
83
80
|
- `.nexus/memory/`
|
|
84
81
|
- `.nexus/context/`
|
|
85
82
|
- `.nexus/state/`
|
|
@@ -119,7 +116,7 @@ Do not include items that are standard defaults for the detected tech stack. Do
|
|
|
119
116
|
Present the full draft to the user in this format:
|
|
120
117
|
|
|
121
118
|
```
|
|
122
|
-
The following will be added to
|
|
119
|
+
The following will be added to the instruction file (see harness docs: instruction_file) (existing content will not be changed):
|
|
123
120
|
|
|
124
121
|
<!-- PROJECT:START -->
|
|
125
122
|
## {project-name}
|
|
@@ -136,7 +133,7 @@ Any changes?
|
|
|
136
133
|
|
|
137
134
|
Wait for the user to confirm or provide edits. Apply all changes in one pass — do not ask about Mission and Essentials separately.
|
|
138
135
|
|
|
139
|
-
After confirmation, write the section into
|
|
136
|
+
After confirmation, write the section into the instruction file inside markers using the harness's file-editing primitive. If the instruction file already contains `<!-- PROJECT:START -->` markers, replace the content between them. If the instruction file does not exist, create it with the markers.
|
|
140
137
|
|
|
141
138
|
### Step 3: Context Knowledge Auto-Generation
|
|
142
139
|
|
|
@@ -152,9 +149,9 @@ Principles:
|
|
|
152
149
|
Generation targets (select and name based on what the project actually needs):
|
|
153
150
|
- Development stack (languages, frameworks, runtimes, key dependencies, build/test/deploy workflow)
|
|
154
151
|
- Design and architecture (module relationships, data flow, core entry points, conventions)
|
|
155
|
-
- Implementation specifics (pipeline details, configuration patterns, file structure conventions, tool restrictions — anything too specific for
|
|
152
|
+
- Implementation specifics (pipeline details, configuration patterns, file structure conventions, tool restrictions — anything too specific for the instruction file but not readable from code alone)
|
|
156
153
|
|
|
157
|
-
Use the
|
|
154
|
+
Use the harness's file-creation primitive to create files at `.nexus/context/{chosen-name}.md`.
|
|
158
155
|
|
|
159
156
|
For large projects, spawn Writer subagents per topic to generate context knowledge in parallel. Lead coordinates and reviews outputs.
|
|
160
157
|
|
|
@@ -165,7 +162,7 @@ On completion: "context knowledge N files generated"
|
|
|
165
162
|
Check whether team custom rules are needed.
|
|
166
163
|
|
|
167
164
|
```
|
|
168
|
-
|
|
165
|
+
prompt_user({
|
|
169
166
|
questions: [{
|
|
170
167
|
question: "Do you want to set up development rules now?",
|
|
171
168
|
options: [
|
|
@@ -176,7 +173,7 @@ AskUserQuestion({
|
|
|
176
173
|
})
|
|
177
174
|
```
|
|
178
175
|
|
|
179
|
-
If "Set up": present a draft based on scan results → user confirms → save via
|
|
176
|
+
If "Set up": present a draft based on scan results → user confirms → save via the harness's file-creation primitive to `.nexus/rules/{topic}.md`.
|
|
180
177
|
|
|
181
178
|
If "Skip": inform and proceed to Step 5.
|
|
182
179
|
|
|
@@ -188,7 +185,7 @@ Output a summary of the onboarding results.
|
|
|
188
185
|
## Nexus Initialization Complete
|
|
189
186
|
|
|
190
187
|
### Generated Files
|
|
191
|
-
-
|
|
188
|
+
- instruction file: project section — mission and essentials (<!-- PROJECT:START/END -->)
|
|
192
189
|
- .nexus/context/: {list of generated files}
|
|
193
190
|
- .nexus/rules/: {generated files or "none (skipped)"}
|
|
194
191
|
|
package/skills/nx-init/meta.yml
CHANGED
package/skills/nx-plan/body.md
CHANGED
|
@@ -8,7 +8,7 @@ Facilitate structured multi-perspective analysis using subagents to decompose is
|
|
|
8
8
|
- NEVER call `nx_plan_start` before research is complete (research_summary is required)
|
|
9
9
|
- NEVER present multiple issues at once — one issue at a time only
|
|
10
10
|
- NEVER ask groundless questions — always research code/knowledge/decisions first
|
|
11
|
-
- NEVER use
|
|
11
|
+
- NEVER use the harness's team creation primitive. Inter-agent messaging for resume is permitted ONLY for resuming completed subagents whose `resume_tier` is `persistent` or `bounded`, and ONLY within the constraints of the Resume Policy section below. Direct inter-agent communication to running teammates remains forbidden in plan sessions.
|
|
12
12
|
- MUST record all decisions with `[d]` tag so they are not scattered across turns
|
|
13
13
|
- MUST call `nx_plan_decide` when recording `[d]`
|
|
14
14
|
- MUST check for existing plan.json before starting a new session
|
|
@@ -28,7 +28,7 @@ Facilitate structured multi-perspective analysis using subagents to decompose is
|
|
|
28
28
|
## Trigger
|
|
29
29
|
|
|
30
30
|
- Explicit tag: `[plan]` — continue existing session if plan.json exists, otherwise start new
|
|
31
|
-
- Additional analysis needed mid-session: spawn HOW subagents independently via
|
|
31
|
+
- Additional analysis needed mid-session: spawn HOW subagents independently via the harness's subagent spawn primitive
|
|
32
32
|
- Continuing conversation without a tag → continue existing session
|
|
33
33
|
|
|
34
34
|
---
|
|
@@ -50,7 +50,7 @@ When triggered with `[plan:auto]` or invoked via `Skill({ args: "auto" })`, run
|
|
|
50
50
|
5. **Plan document** — generate tasks.json following Step 7 rules (including HOW-assisted decomposition if `how_agents` present in plan.json issues). Apply owner table and verification auto-pairing.
|
|
51
51
|
|
|
52
52
|
Key differences from interactive mode:
|
|
53
|
-
- No
|
|
53
|
+
- No user prompts or comparison tables — Lead decides autonomously
|
|
54
54
|
- No dynamic agenda proposals — Lead handles all derived issues internally
|
|
55
55
|
- Output: tasks.json ready for `[run]` execution
|
|
56
56
|
|
|
@@ -87,7 +87,7 @@ Determine planning depth and identify which HOW subagents to delegate analysis t
|
|
|
87
87
|
|
|
88
88
|
Understand code, core knowledge, and prior decisions before forming a planning agenda.
|
|
89
89
|
|
|
90
|
-
**Start by checking existing knowledge**: before spawning any subagent, use
|
|
90
|
+
**Start by checking existing knowledge**: before spawning any subagent, use file pattern search and file reading to scan `.nexus/memory/` and `.nexus/context/` for relevant memos and context files, and use `nx_history_search` to check for prior decisions on this topic. If the needed information is already there, use it directly and skip or narrow the subagent spawn. Only spawn subagents to fill gaps not covered by existing knowledge.
|
|
91
91
|
|
|
92
92
|
**Approach selection:**
|
|
93
93
|
|
|
@@ -99,7 +99,7 @@ Understand code, core knowledge, and prior decisions before forming a planning a
|
|
|
99
99
|
|
|
100
100
|
- NEVER call `nx_plan_start` before research is complete.
|
|
101
101
|
- `research_summary` parameter in `nx_plan_start` is required — forces research completion before session creation.
|
|
102
|
-
- Researcher subagents are spawned via the
|
|
102
|
+
- Researcher subagents are spawned via the harness's subagent spawn primitive and return findings to Lead. They do not join the plan session.
|
|
103
103
|
|
|
104
104
|
**Existing session (plan.json present):**
|
|
105
105
|
- Check current state with `nx_plan_status`.
|
|
@@ -120,7 +120,7 @@ Register the planning session.
|
|
|
120
120
|
For each issue:
|
|
121
121
|
|
|
122
122
|
1. **Current State Analysis** — Lead summarizes the current state and problems, drawing on research.
|
|
123
|
-
2. **Subagent Analysis** — for complex issues, spawn HOW subagents (architect, strategist, etc.) in parallel via
|
|
123
|
+
2. **Subagent Analysis** — for complex issues, spawn HOW subagents (architect, strategist, etc.) in parallel via the harness's subagent spawn primitive. Each subagent independently analyzes the issue and returns findings.
|
|
124
124
|
- **Domain-Agent mapping** — match issue keywords to recommended HOW subagents:
|
|
125
125
|
|
|
126
126
|
| Domain keywords | Recommended HOW |
|
|
@@ -154,7 +154,7 @@ For each issue:
|
|
|
154
154
|
|
|
155
155
|
## Resume Policy
|
|
156
156
|
|
|
157
|
-
When
|
|
157
|
+
When the harness's resume mechanism is unavailable, ALL resume paths are disabled — force fresh spawn. Otherwise:
|
|
158
158
|
|
|
159
159
|
| resume_tier | Same-issue default | Cross-issue | Disqualifiers |
|
|
160
160
|
|---|---|---|---|
|
|
@@ -211,7 +211,7 @@ All issues decided → generate the plan document (tasks.json) immediately:
|
|
|
211
211
|
- `deps` — task dependencies based on execution order
|
|
212
212
|
- `owner` — assign based on delegation analysis:
|
|
213
213
|
|
|
214
|
-
|
|
|
214
|
+
| Work type | owner | Criteria |
|
|
215
215
|
|-----------|-------|----------|
|
|
216
216
|
| Single file, small change | **lead** | Subagent overhead > task effort |
|
|
217
217
|
| Code implementation (.ts, .js, .py, etc.) | **engineer** | Source code creation/modification |
|
|
@@ -220,11 +220,14 @@ All issues decided → generate the plan document (tasks.json) immediately:
|
|
|
220
220
|
| Design analysis / review | **architect** etc. HOW | Technical trade-off judgment |
|
|
221
221
|
| Sequential edits to same file | **lead** | Parallel subagents risk conflict |
|
|
222
222
|
|
|
223
|
-
**Verification
|
|
224
|
-
-
|
|
225
|
-
-
|
|
223
|
+
**Verification auto-pairing** — create separate verification tasks:
|
|
224
|
+
- Any task with `owner: "engineer"` + `acceptance` field → pair a **tester** task (verify acceptance criteria)
|
|
225
|
+
- Any task with `owner: "writer"` → pair a **reviewer** task (verify deliverable)
|
|
226
226
|
- Paired verification tasks are linked via `deps` to the original task
|
|
227
|
-
|
|
227
|
+
|
|
228
|
+
**DO/CHECK decomposition principle**: DO category agents (engineer, writer, researcher) and CHECK category agents (tester, reviewer) operate on artifact-level scope and accumulate less per-task context than HOW category agents. When a task involves multiple independent artifacts (several files, several verification targets, multiple research questions), decompose the task across multiple parallel DO/CHECK subagents rather than bundling them into a single subagent. Single-subagent bundles risk context exhaustion with no wall-clock benefit over parallel decomposition. HOW agents benefit from consolidated context and should generally remain as single sessions. Task granularity is assessed per-task by the plan author, not declared per-agent in meta.yml.
|
|
229
|
+
|
|
230
|
+
4. **Populate tasks.json** via `nx_task_add`:
|
|
228
231
|
- Set `goal` from the plan topic
|
|
229
232
|
- Set `decisions` from plan.json decided summaries
|
|
230
233
|
- Call `nx_task_add(plan_issue=N, approach, acceptance, risk, owner)` for each task
|
|
@@ -292,8 +295,8 @@ Proceed with `[run]` to execute.
|
|
|
292
295
|
```
|
|
293
296
|
|
|
294
297
|
- **Create**: `nx_plan_start(topic, issues, research_summary)` — called in Step 3; auto-archives any existing plan.json
|
|
295
|
-
- **
|
|
296
|
-
- **Update**: `nx_plan_update(action, ...)` — add/remove/
|
|
298
|
+
- **Status**: `nx_plan_status()` — check current issue state + decisions
|
|
299
|
+
- **Update**: `nx_plan_update(action, ...)` — add/remove/modify/reopen issues
|
|
297
300
|
- **Decide**: `nx_plan_decide(issue_id, summary)` — marks issue as `decided`, writes decision inline
|
|
298
301
|
- **File presence = session in progress**
|
|
299
302
|
|
package/skills/nx-plan/meta.yml
CHANGED
|
@@ -2,6 +2,9 @@ name: nx-plan
|
|
|
2
2
|
description: Structured multi-perspective analysis to decompose issues, align on
|
|
3
3
|
decisions, and produce an enriched plan before execution. Plan only — does not
|
|
4
4
|
execute.
|
|
5
|
+
summary: "Structured planning — subagent-based analysis, deliberate decisions, produce execution plan"
|
|
5
6
|
triggers:
|
|
6
7
|
- plan
|
|
8
|
+
harness_docs_refs:
|
|
9
|
+
- resume_invocation
|
|
7
10
|
id: nx-plan
|
package/skills/nx-run/body.md
CHANGED
|
@@ -4,10 +4,10 @@ Execution norm that Lead follows when the user invokes the [run] tag. Composes s
|
|
|
4
4
|
|
|
5
5
|
## Constraints
|
|
6
6
|
|
|
7
|
-
- NEVER modify files via
|
|
7
|
+
- NEVER modify files via shell commands (sed, echo redirection, heredoc, tee, etc.) — always use the harness's dedicated file-editing primitives (gate enforced)
|
|
8
8
|
- NEVER terminate while pending tasks remain (Gate Stop nonstop)
|
|
9
9
|
- NEVER spawn a new branch without checking for main/master first
|
|
10
|
-
- MUST check tasks.json before executing — if absent,
|
|
10
|
+
- MUST check tasks.json before executing — if absent, generate the plan first
|
|
11
11
|
- MUST spawn subagents per-task based on owner field — Do not handle multi-task work as Lead solo when task count ≥ 2 or target files ≥ 2
|
|
12
12
|
- MUST NOT spawn parallel Engineers if their target files overlap — serialize instead
|
|
13
13
|
- MUST call nx_task_close before completing the cycle — archive plan+tasks to history.json
|
|
@@ -61,7 +61,7 @@ For each task, Lead chooses between fresh spawn and resume based on the `owner`'
|
|
|
61
61
|
2. If `ephemeral` → fresh spawn. Stop.
|
|
62
62
|
3. If `bounded` → check tasks.json history: did the same `owner` previously work on overlapping target files? If yes AND no intervening edits by other agents → resume candidate. Otherwise fresh. Always include "re-read target files before any modification" instruction in the resume prompt.
|
|
63
63
|
4. If `persistent` → resume by default if the same agent worked earlier in this run. Cross-task reuse allowed.
|
|
64
|
-
5. Before
|
|
64
|
+
5. Before attempting any resume, verify the harness's resume mechanism is available. If unavailable, fall back to fresh spawn silently — do NOT throw an error.
|
|
65
65
|
|
|
66
66
|
### Step 3: Verify (Lead + Check subagents)
|
|
67
67
|
|
|
@@ -142,7 +142,7 @@ ACCEPTANCE:
|
|
|
142
142
|
6. **SubagentStop escalation** — when a subagent stops with incomplete work, escalate through HOW diagnosis → re-delegation → user report. Max 1 cycle per task.
|
|
143
143
|
7. **Gate Stop nonstop** — cannot terminate while pending tasks exist
|
|
144
144
|
8. **Plan first** — if tasks.json is absent, nx-plan must run before Step 2
|
|
145
|
-
9. **No file modification via
|
|
145
|
+
9. **No file modification via shell commands** — sed, echo redirection, heredoc, tee, and similar shell-based file edits are prohibited. Always use the harness's dedicated file-editing primitives (gate enforced)
|
|
146
146
|
## State Management
|
|
147
147
|
|
|
148
148
|
`.nexus/state/tasks.json` — produced by nx-plan, managed via `nx_task_add`/`nx_task_update`. Gate Stop enforcement.
|