@moreih29/nexus-core 0.2.0 → 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.
@@ -117,6 +117,6 @@ Record when:
117
117
 
118
118
  To persist findings, either:
119
119
  - Suggest to the user that they use the `[m]` tag to save the finding to memory, or
120
- - Write directly to `.nexus/memory/{topic}.md` using the Write tool if you have permission
120
+ - Write directly to `.nexus/memory/{topic}.md` using the harness's file-creation primitive if you have permission
121
121
 
122
122
  Format for memory entries: include the research question, key findings, source URLs, and date searched.
@@ -0,0 +1,157 @@
1
+ [
2
+ {
3
+ "test_id": "task_list_no_tasks_file",
4
+ "description": "task_list returns exists:false when tasks.json does not exist",
5
+ "precondition": {
6
+ "state_files": {
7
+ ".nexus/state/tasks.json": null
8
+ }
9
+ },
10
+ "action": {
11
+ "tool": "task_list",
12
+ "params": {}
13
+ },
14
+ "postcondition": {
15
+ "return_value": {
16
+ "$.exists": false
17
+ }
18
+ }
19
+ },
20
+ {
21
+ "test_id": "task_list_happy_path",
22
+ "description": "task_list returns goal, full task list, and a correct progress summary when tasks.json exists",
23
+ "precondition": {
24
+ "state_files": {
25
+ ".nexus/state/tasks.json": {
26
+ "goal": "Ship conformance fixtures for nexus-core",
27
+ "decisions": ["Use declarative JSONPath assertions"],
28
+ "tasks": [
29
+ {
30
+ "id": 1,
31
+ "title": "Create fixture.schema.json",
32
+ "context": "Define the JSON Schema for fixture files",
33
+ "status": "completed",
34
+ "deps": [],
35
+ "created_at": "2026-04-12T00:00:00.000Z"
36
+ },
37
+ {
38
+ "id": 2,
39
+ "title": "Write plan_start fixture",
40
+ "context": "Happy path and missing-research-summary error case",
41
+ "status": "pending",
42
+ "deps": [1],
43
+ "created_at": "2026-04-12T00:00:00.000Z"
44
+ },
45
+ {
46
+ "id": 3,
47
+ "title": "Write task_add fixture",
48
+ "context": "Happy path and with-goal case",
49
+ "status": "pending",
50
+ "deps": [1],
51
+ "created_at": "2026-04-12T00:00:00.000Z"
52
+ }
53
+ ]
54
+ }
55
+ }
56
+ },
57
+ "action": {
58
+ "tool": "task_list",
59
+ "params": {}
60
+ },
61
+ "postcondition": {
62
+ "return_value": {
63
+ "$.goal": "Ship conformance fixtures for nexus-core",
64
+ "$.tasks.length": 3,
65
+ "$.summary.total": 3,
66
+ "$.summary.completed": 1,
67
+ "$.summary.pending": 2,
68
+ "$.summary.ready.length": 2,
69
+ "$.summary.ready[0]": 2,
70
+ "$.summary.ready[1]": 3
71
+ }
72
+ }
73
+ },
74
+ {
75
+ "test_id": "task_list_all_pending_no_deps",
76
+ "description": "task_list marks all tasks as ready when they have no dependencies and are all pending",
77
+ "precondition": {
78
+ "state_files": {
79
+ ".nexus/state/tasks.json": {
80
+ "goal": "Validate ready computation",
81
+ "decisions": [],
82
+ "tasks": [
83
+ {
84
+ "id": 1,
85
+ "title": "Independent task A",
86
+ "context": "No dependencies",
87
+ "status": "pending",
88
+ "deps": [],
89
+ "created_at": "2026-04-12T00:00:00.000Z"
90
+ },
91
+ {
92
+ "id": 2,
93
+ "title": "Independent task B",
94
+ "context": "No dependencies",
95
+ "status": "pending",
96
+ "deps": [],
97
+ "created_at": "2026-04-12T00:00:00.000Z"
98
+ }
99
+ ]
100
+ }
101
+ }
102
+ },
103
+ "action": {
104
+ "tool": "task_list",
105
+ "params": {}
106
+ },
107
+ "postcondition": {
108
+ "return_value": {
109
+ "$.summary.total": 2,
110
+ "$.summary.pending": 2,
111
+ "$.summary.completed": 0,
112
+ "$.summary.ready.length": 2
113
+ }
114
+ }
115
+ },
116
+ {
117
+ "test_id": "task_list_blocked_task_not_ready",
118
+ "description": "task_list excludes a task from ready when its dependency is still pending",
119
+ "precondition": {
120
+ "state_files": {
121
+ ".nexus/state/tasks.json": {
122
+ "goal": "Validate blocked task exclusion",
123
+ "decisions": [],
124
+ "tasks": [
125
+ {
126
+ "id": 1,
127
+ "title": "Prerequisite task",
128
+ "context": "Must finish first",
129
+ "status": "pending",
130
+ "deps": [],
131
+ "created_at": "2026-04-12T00:00:00.000Z"
132
+ },
133
+ {
134
+ "id": 2,
135
+ "title": "Dependent task",
136
+ "context": "Cannot start until task 1 is done",
137
+ "status": "pending",
138
+ "deps": [1],
139
+ "created_at": "2026-04-12T00:00:00.000Z"
140
+ }
141
+ ]
142
+ }
143
+ }
144
+ },
145
+ "action": {
146
+ "tool": "task_list",
147
+ "params": {}
148
+ },
149
+ "postcondition": {
150
+ "return_value": {
151
+ "$.summary.total": 2,
152
+ "$.summary.ready.length": 1,
153
+ "$.summary.ready[0]": 1
154
+ }
155
+ }
156
+ }
157
+ ]
@@ -0,0 +1,139 @@
1
+ [
2
+ {
3
+ "test_id": "task_update_status_to_in_progress",
4
+ "description": "task_update transitions a pending task to in_progress and returns the updated task object",
5
+ "precondition": {
6
+ "state_files": {
7
+ ".nexus/state/tasks.json": {
8
+ "goal": "Validate task_update behaviour",
9
+ "decisions": [],
10
+ "tasks": [
11
+ {
12
+ "id": 1,
13
+ "title": "Implement core feature",
14
+ "context": "Write the initial implementation",
15
+ "status": "pending",
16
+ "deps": [],
17
+ "created_at": "2026-04-12T00:00:00.000Z"
18
+ }
19
+ ]
20
+ }
21
+ }
22
+ },
23
+ "action": {
24
+ "tool": "task_update",
25
+ "params": {
26
+ "id": 1,
27
+ "status": "in_progress"
28
+ }
29
+ },
30
+ "postcondition": {
31
+ "return_value": {
32
+ "$.task.id": 1,
33
+ "$.task.status": "in_progress",
34
+ "$.task.title": "Implement core feature"
35
+ },
36
+ "state_files": {
37
+ ".nexus/state/tasks.json": {
38
+ "$.tasks[0].id": 1,
39
+ "$.tasks[0].status": "in_progress"
40
+ }
41
+ }
42
+ }
43
+ },
44
+ {
45
+ "test_id": "task_update_status_to_completed",
46
+ "description": "task_update transitions an in_progress task to completed and persists the change in tasks.json",
47
+ "precondition": {
48
+ "state_files": {
49
+ ".nexus/state/tasks.json": {
50
+ "goal": "Validate task_update behaviour",
51
+ "decisions": [],
52
+ "tasks": [
53
+ {
54
+ "id": 1,
55
+ "title": "Implement core feature",
56
+ "context": "Write the initial implementation",
57
+ "status": "in_progress",
58
+ "deps": [],
59
+ "created_at": "2026-04-12T00:00:00.000Z"
60
+ }
61
+ ]
62
+ }
63
+ }
64
+ },
65
+ "action": {
66
+ "tool": "task_update",
67
+ "params": {
68
+ "id": 1,
69
+ "status": "completed"
70
+ }
71
+ },
72
+ "postcondition": {
73
+ "return_value": {
74
+ "$.task.id": 1,
75
+ "$.task.status": "completed",
76
+ "$.task.title": "Implement core feature"
77
+ },
78
+ "state_files": {
79
+ ".nexus/state/tasks.json": {
80
+ "$.tasks[0].id": 1,
81
+ "$.tasks[0].status": "completed"
82
+ }
83
+ }
84
+ }
85
+ },
86
+ {
87
+ "test_id": "task_update_not_found_error",
88
+ "description": "task_update returns an error when the referenced task id does not exist in tasks.json",
89
+ "precondition": {
90
+ "state_files": {
91
+ ".nexus/state/tasks.json": {
92
+ "goal": "Validate task_update behaviour",
93
+ "decisions": [],
94
+ "tasks": [
95
+ {
96
+ "id": 1,
97
+ "title": "Only task",
98
+ "context": "The only task in the list",
99
+ "status": "pending",
100
+ "deps": [],
101
+ "created_at": "2026-04-12T00:00:00.000Z"
102
+ }
103
+ ]
104
+ }
105
+ }
106
+ },
107
+ "action": {
108
+ "tool": "task_update",
109
+ "params": {
110
+ "id": 99,
111
+ "status": "completed"
112
+ }
113
+ },
114
+ "postcondition": {
115
+ "error": true,
116
+ "error_contains": "Task id 99 not found"
117
+ }
118
+ },
119
+ {
120
+ "test_id": "task_update_no_tasks_file_error",
121
+ "description": "task_update returns an error when tasks.json does not exist",
122
+ "precondition": {
123
+ "state_files": {
124
+ ".nexus/state/tasks.json": null
125
+ }
126
+ },
127
+ "action": {
128
+ "tool": "task_update",
129
+ "params": {
130
+ "id": 1,
131
+ "status": "completed"
132
+ }
133
+ },
134
+ "postcondition": {
135
+ "error": true,
136
+ "error_contains": "tasks.json not found"
137
+ }
138
+ }
139
+ ]
@@ -719,9 +719,9 @@ If your harness exposes an inter-agent communication tool, it must be available
719
719
 
720
720
  ---
721
721
 
722
- ## 11. Conformance Verification
722
+ ## 11. Conformance Verification (Required)
723
723
 
724
- Conformance fixtures verify that your tool implementations behave identically to the nexus-core specification. Passing all fixtures guarantees interoperability with any other nexus-core consumer and ensures your harness will remain compatible as nexus-core evolves.
724
+ Consumers MUST pass all conformance fixtures to claim nexus-core compatibility. This is not optional — it is the mechanism by which cross-harness interoperability is guaranteed. Non-conforming implementations may produce state files that other Nexus ecosystem components cannot read, or exhibit behavioral divergence that breaks plan/task lifecycle assumptions.
725
725
 
726
726
  ### Fixture types
727
727
 
@@ -761,7 +761,7 @@ For runner implementation patterns and a TypeScript sketch, see [conformance/REA
761
761
 
762
762
  ### CI integration
763
763
 
764
- Add the conformance test runner to your CI pipeline. Conformance failures on a version bump indicate a breaking behavioral change in your tool implementation. Do not merge harness changes that break conformance unless you have intentionally diverged from the spec (which is not recommended and is not supported).
764
+ Add the conformance test runner to your CI pipeline. Conformance failures MUST block release. Do not merge harness changes that break conformance a conformance failure means your implementation diverges from the Nexus ecosystem contract.
765
765
 
766
766
  Conformance verification is distinct from your harness's own unit tests. Run both.
767
767
 
package/manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "nexus_core_version": "0.2.0",
3
- "nexus_core_commit": "166a3b29f2b5795b9df037442ddc5d2ae7e36e5a",
2
+ "nexus_core_version": "0.3.0",
3
+ "nexus_core_commit": "c5953c739cd5e24be7dd9eb2bb2940e96f611039",
4
4
  "schema_contract_version": "2.0",
5
5
  "agents": [
6
6
  {
@@ -20,39 +20,40 @@
20
20
  "body_hash": "sha256:85f9a3de419f32cdae284436eb1d902bff19a2230c50fe3068ffc642949a63b7"
21
21
  },
22
22
  {
23
- "name": "writer",
24
- "description": "Technical writingtransforms research findings, code, and analysis into clear documents and presentations for the intended audience",
25
- "task": "Technical writing, documentation, presentations",
26
- "alias_ko": "라이터",
27
- "category": "do",
28
- "resume_tier": "bounded",
29
- "model_tier": "standard",
23
+ "name": "designer",
24
+ "description": "UX/UI designevaluates user experience, interaction patterns, and how users will experience the product",
25
+ "task": "UI/UX design, interaction patterns, user experience",
26
+ "alias_ko": "디자이너",
27
+ "category": "how",
28
+ "resume_tier": "persistent",
29
+ "model_tier": "high",
30
30
  "capabilities": [
31
- "no_task_create"
31
+ "no_file_edit",
32
+ "no_task_create",
33
+ "no_task_update"
32
34
  ],
33
- "id": "writer",
34
- "body_hash": "sha256:2edd9bf52e537c446b5ebfaafab214ebaaad2491f019aa8534453bff3f1cd37b"
35
+ "id": "designer",
36
+ "body_hash": "sha256:88ac56147d0e5bdf23fa591ce570a9c2d0eb1338df4ec2219f6238ddfcb65df4"
35
37
  },
36
38
  {
37
- "name": "tester",
38
- "description": "Testing and verification — tests, verifies, validates stability and security of implementations",
39
- "task": "Testing, verification, security review",
40
- "alias_ko": "테스터",
41
- "category": "check",
42
- "resume_tier": "ephemeral",
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",
43
45
  "model_tier": "standard",
44
46
  "capabilities": [
45
- "no_file_edit",
46
47
  "no_task_create"
47
48
  ],
48
- "id": "tester",
49
- "body_hash": "sha256:4dd04e1c93ff9c0c9fa6aebb60ece3f9719e82f9714b13feea01b6163633caec"
49
+ "id": "engineer",
50
+ "body_hash": "sha256:3d58b1b490c2f93cace2eedd0f04ec000f84514388eb086768cf53f8fa33db01"
50
51
  },
51
52
  {
52
- "name": "postdoc",
53
- "description": "Research methodology and synthesis designs investigation approach, evaluates evidence quality, writes synthesis documents",
54
- "task": "Research methodology, evidence synthesis",
55
- "alias_ko": "포닥",
53
+ "name": "strategist",
54
+ "description": "Business strategy evaluates market positioning, competitive landscape, and business viability of decisions",
55
+ "task": "Business strategy, market analysis, competitive positioning",
56
+ "alias_ko": "전략가",
56
57
  "category": "how",
57
58
  "resume_tier": "persistent",
58
59
  "model_tier": "high",
@@ -61,8 +62,8 @@
61
62
  "no_task_create",
62
63
  "no_task_update"
63
64
  ],
64
- "id": "postdoc",
65
- "body_hash": "sha256:da9b8c2568b8b5812abed6d6324139f814379d48dc63cdc5d0b5b263f5407814"
65
+ "id": "strategist",
66
+ "body_hash": "sha256:0254b4144a22c66209bd68119553d9057a4fb7f9b1ff7ebb9878687d99583465"
66
67
  },
67
68
  {
68
69
  "name": "researcher",
@@ -77,13 +78,13 @@
77
78
  "no_task_create"
78
79
  ],
79
80
  "id": "researcher",
80
- "body_hash": "sha256:7f5db3b52ae76a3b3214cf73b076980e15ef85c80b9aa86a9704f737e4b13251"
81
+ "body_hash": "sha256:fc79bafec05503327bd51a0b84b6e642d304bd79c45b78db6448b112793c143e"
81
82
  },
82
83
  {
83
- "name": "strategist",
84
- "description": "Business strategyevaluates market positioning, competitive landscape, and business viability of decisions",
85
- "task": "Business strategy, market analysis, competitive positioning",
86
- "alias_ko": "전략가",
84
+ "name": "postdoc",
85
+ "description": "Research methodology and synthesis designs investigation approach, evaluates evidence quality, writes synthesis documents",
86
+ "task": "Research methodology, evidence synthesis",
87
+ "alias_ko": "포닥",
87
88
  "category": "how",
88
89
  "resume_tier": "persistent",
89
90
  "model_tier": "high",
@@ -92,8 +93,8 @@
92
93
  "no_task_create",
93
94
  "no_task_update"
94
95
  ],
95
- "id": "strategist",
96
- "body_hash": "sha256:0254b4144a22c66209bd68119553d9057a4fb7f9b1ff7ebb9878687d99583465"
96
+ "id": "postdoc",
97
+ "body_hash": "sha256:da9b8c2568b8b5812abed6d6324139f814379d48dc63cdc5d0b5b263f5407814"
97
98
  },
98
99
  {
99
100
  "name": "reviewer",
@@ -111,34 +112,33 @@
111
112
  "body_hash": "sha256:f04d15249601b14046e7e40a4475defb289436c4474afbd89986964f8c3e7c2f"
112
113
  },
113
114
  {
114
- "name": "engineer",
115
- "description": "Implementationwrites code, debugs issues, follows specifications from Lead and architect",
116
- "task": "Code implementation, edits, debugging",
117
- "alias_ko": "엔지니어",
118
- "category": "do",
119
- "resume_tier": "bounded",
115
+ "name": "tester",
116
+ "description": "Testing and verification tests, verifies, validates stability and security of implementations",
117
+ "task": "Testing, verification, security review",
118
+ "alias_ko": "테스터",
119
+ "category": "check",
120
+ "resume_tier": "ephemeral",
120
121
  "model_tier": "standard",
121
122
  "capabilities": [
123
+ "no_file_edit",
122
124
  "no_task_create"
123
125
  ],
124
- "id": "engineer",
125
- "body_hash": "sha256:3d58b1b490c2f93cace2eedd0f04ec000f84514388eb086768cf53f8fa33db01"
126
+ "id": "tester",
127
+ "body_hash": "sha256:4dd04e1c93ff9c0c9fa6aebb60ece3f9719e82f9714b13feea01b6163633caec"
126
128
  },
127
129
  {
128
- "name": "designer",
129
- "description": "UX/UI designevaluates user experience, interaction patterns, and how users will experience the product",
130
- "task": "UI/UX design, interaction patterns, user experience",
131
- "alias_ko": "디자이너",
132
- "category": "how",
133
- "resume_tier": "persistent",
134
- "model_tier": "high",
130
+ "name": "writer",
131
+ "description": "Technical writingtransforms research findings, code, and analysis into clear documents and presentations for the intended audience",
132
+ "task": "Technical writing, documentation, presentations",
133
+ "alias_ko": "라이터",
134
+ "category": "do",
135
+ "resume_tier": "bounded",
136
+ "model_tier": "standard",
135
137
  "capabilities": [
136
- "no_file_edit",
137
- "no_task_create",
138
- "no_task_update"
138
+ "no_task_create"
139
139
  ],
140
- "id": "designer",
141
- "body_hash": "sha256:88ac56147d0e5bdf23fa591ce570a9c2d0eb1338df4ec2219f6238ddfcb65df4"
140
+ "id": "writer",
141
+ "body_hash": "sha256:2edd9bf52e537c446b5ebfaafab214ebaaad2491f019aa8534453bff3f1cd37b"
142
142
  }
143
143
  ],
144
144
  "skills": [
@@ -166,33 +166,28 @@
166
166
  "resume_invocation"
167
167
  ],
168
168
  "id": "nx-plan",
169
- "body_hash": "sha256:2e3f4fabb2961c052c4449f19ec16ed940394be037a63d4af90a3d12df8e4895"
170
- },
171
- {
172
- "name": "nx-sync",
173
- "description": "Context knowledge synchronization — scans project state and updates .nexus/context/ design documents",
174
- "summary": "Context knowledge synchronization",
175
- "triggers": [
176
- "sync"
177
- ],
178
- "id": "nx-sync",
179
- "body_hash": "sha256:dbd3933c0474b2831a857308d9dd6ccd2c072f089327c22ce8d2842894fc3216"
169
+ "body_hash": "sha256:85b858089bd3dc276be61baa3f5265bc107a85470f169983e710fecb404bb4b1"
180
170
  },
181
171
  {
182
172
  "name": "nx-init",
183
173
  "description": "Project onboarding — scan, mission, essentials, context generation",
184
174
  "summary": "Project onboarding — scan, mission, essentials, context generation",
185
175
  "manual_only": true,
176
+ "harness_docs_refs": [
177
+ "instruction_file"
178
+ ],
186
179
  "id": "nx-init",
187
- "body_hash": "sha256:11761d37bad2fb30ef1d562d22d9a395e27e0c3ce58ea42ad3b1799f47bf8950"
180
+ "body_hash": "sha256:3c8230ecc0f87c541ec0ff80492a28f28bf173d0b9781901adadfae69a54b8ed"
188
181
  },
189
182
  {
190
- "name": "nx-setup",
191
- "description": "Interactive project setup wizard for Nexus configuration.",
192
- "summary": "Interactive Nexus configuration wizard",
193
- "manual_only": true,
194
- "id": "nx-setup",
195
- "body_hash": "sha256:e66b0116d5da403c6480876a5b0a575110bcd26ecaa30079ce17de64fc112e65"
183
+ "name": "nx-sync",
184
+ "description": "Context knowledge synchronization — scans project state and updates .nexus/context/ design documents",
185
+ "summary": "Context knowledge synchronization",
186
+ "triggers": [
187
+ "sync"
188
+ ],
189
+ "id": "nx-sync",
190
+ "body_hash": "sha256:a7b0ae8f13ebcd10e52361d0ada1570ff0c47933f731deec07e95539c63e6946"
196
191
  }
197
192
  ],
198
193
  "vocabulary": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moreih29/nexus-core",
3
- "version": "0.2.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": {
@@ -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 CLAUDE.md beyond the project section is not this skill's responsibility.
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
10
  - NEVER overwrite existing files without `--reset`. On resume, preserve existing files intact.
11
- - Project section in CLAUDE.md MUST go through user confirmation before writing.
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
 
@@ -116,7 +116,7 @@ Do not include items that are standard defaults for the detected tech stack. Do
116
116
  Present the full draft to the user in this format:
117
117
 
118
118
  ```
119
- The following will be added to CLAUDE.md (existing content will not be changed):
119
+ The following will be added to the instruction file (see harness docs: instruction_file) (existing content will not be changed):
120
120
 
121
121
  <!-- PROJECT:START -->
122
122
  ## {project-name}
@@ -133,7 +133,7 @@ Any changes?
133
133
 
134
134
  Wait for the user to confirm or provide edits. Apply all changes in one pass — do not ask about Mission and Essentials separately.
135
135
 
136
- After confirmation, write the section into CLAUDE.md inside markers using the Edit tool. If CLAUDE.md already contains `<!-- PROJECT:START -->` markers, replace the content between them. If CLAUDE.md does not exist, create it with the markers.
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.
137
137
 
138
138
  ### Step 3: Context Knowledge Auto-Generation
139
139
 
@@ -149,9 +149,9 @@ Principles:
149
149
  Generation targets (select and name based on what the project actually needs):
150
150
  - Development stack (languages, frameworks, runtimes, key dependencies, build/test/deploy workflow)
151
151
  - Design and architecture (module relationships, data flow, core entry points, conventions)
152
- - Implementation specifics (pipeline details, configuration patterns, file structure conventions, tool restrictions — anything too specific for CLAUDE.md but not readable from code alone)
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)
153
153
 
154
- Use the Write tool to create files at `.nexus/context/{chosen-name}.md`.
154
+ Use the harness's file-creation primitive to create files at `.nexus/context/{chosen-name}.md`.
155
155
 
156
156
  For large projects, spawn Writer subagents per topic to generate context knowledge in parallel. Lead coordinates and reviews outputs.
157
157
 
@@ -173,7 +173,7 @@ prompt_user({
173
173
  })
174
174
  ```
175
175
 
176
- If "Set up": present a draft based on scan results → user confirms → save via Write tool to `.nexus/rules/{topic}.md`.
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`.
177
177
 
178
178
  If "Skip": inform and proceed to Step 5.
179
179
 
@@ -185,7 +185,7 @@ Output a summary of the onboarding results.
185
185
  ## Nexus Initialization Complete
186
186
 
187
187
  ### Generated Files
188
- - CLAUDE.md: project section — mission and essentials (<!-- PROJECT:START/END -->)
188
+ - instruction file: project section — mission and essentials (<!-- PROJECT:START/END -->)
189
189
  - .nexus/context/: {list of generated files}
190
190
  - .nexus/rules/: {generated files or "none (skipped)"}
191
191
 
@@ -2,4 +2,6 @@ name: nx-init
2
2
  description: Project onboarding — scan, mission, essentials, context generation
3
3
  summary: "Project onboarding — scan, mission, essentials, context generation"
4
4
  manual_only: true
5
+ harness_docs_refs:
6
+ - instruction_file
5
7
  id: nx-init
@@ -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 Agent tool
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
  ---
@@ -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 Agent tool and return findings to Lead. They do not join the plan session.
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 Agent tool. Each subagent independently analyzes the issue and returns findings.
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 |
@@ -8,7 +8,7 @@ Scans the current project state and synchronizes .nexus/context/ design document
8
8
  - NEVER modify source code — this skill updates documentation only
9
9
  - NEVER guess information that cannot be confirmed from sources — mark as "needs verification" instead
10
10
  - MUST preserve existing content structure — update sections, don't rewrite entire files unnecessarily
11
- - NEVER use deprecated MCP knowledge tools — use Read and Write native tools only
11
+ - NEVER use deprecated MCP knowledge tools — use the harness's file-reading and file-creation primitives only
12
12
 
13
13
  ## Guidelines
14
14
 
@@ -31,7 +31,7 @@ Collect information from all available sources:
31
31
 
32
32
  ### Step 2: Read Current Context
33
33
 
34
- Read all files in `.nexus/context/` using the Read tool:
34
+ Read all files in `.nexus/context/` using the harness's file-reading primitive:
35
35
 
36
36
  - List files: `ls .nexus/context/`
37
37
  - Read each file to understand current documented state
@@ -45,13 +45,13 @@ Spawn Writer agent to update affected context documents:
45
45
 
46
46
  ```
47
47
  Agent({ subagent_type: "claude-nexus:writer", name: "writer-sync-context",
48
- prompt: "Update .nexus/context/ documents based on the following changes. Read current files with the Read tool, then write updates with the Write tool. Changes: {change_manifest}" })
48
+ prompt: "Update .nexus/context/ documents based on the following changes. Read current files with the harness's file-reading primitive, then write updates with the harness's file-creation primitive. Changes: {change_manifest}" })
49
49
  ```
50
50
 
51
51
  The Writer agent:
52
- - Reads each relevant context file with the Read tool
52
+ - Reads each relevant context file with the harness's file-reading primitive
53
53
  - Applies targeted updates — changes only the sections that are stale
54
- - Writes the updated file back with the Write tool
54
+ - Writes the updated file back with the harness's file-creation primitive
55
55
  - Does not rewrite files that are already accurate
56
56
 
57
57
  ### Step 4: Report
@@ -1,196 +0,0 @@
1
- ## Role
2
-
3
- Interactive project setup wizard — configure Nexus for a new project with minimal token cost. Every step is a concrete choice via `prompt_user`, with no open-ended exploration.
4
-
5
- ## Constraints
6
-
7
- - NEVER accept free-text input — every step must use `prompt_user` with explicit options.
8
- - NEVER skip the "Skip" option — all steps are optional.
9
- - NEVER modify files outside the selected scope without explicit user confirmation.
10
- - NEVER overwrite an existing `statusLine` field in settings.json without explicit user confirmation.
11
-
12
- ## Guidelines
13
-
14
- ## Trigger
15
- - Direct invocation: `/claude-nexus:nx-setup`
16
-
17
- ---
18
-
19
- ## Steps
20
-
21
- ### Step 1: Scope Selection
22
-
23
- ```
24
- prompt_user({
25
- questions: [{
26
- question: "Where should the Nexus configuration be applied?",
27
- header: "Scope",
28
- multiSelect: false,
29
- options: [
30
- { label: "User (Global)", description: "Apply to all projects (~/.claude/CLAUDE.md, ~/.claude/settings.json statusline)" },
31
- { label: "Project", description: "Apply to this project only (CLAUDE.md, .claude/settings.local.json)" }
32
- ]
33
- }]
34
- })
35
- ```
36
-
37
- All file write paths for subsequent steps are determined by this selection:
38
- - User: `~/.claude/CLAUDE.md`, `~/.claude/settings.json` (statusline wrapper)
39
- - Project: `./CLAUDE.md`, `./.claude/settings.local.json`
40
-
41
- ### Step 2: Statusline
42
-
43
- ```
44
- prompt_user({
45
- questions: [{
46
- question: "Enable the Nexus statusline? (model, branch, context usage, rate limits)",
47
- header: "Statusline",
48
- multiSelect: false,
49
- options: [
50
- { label: "Enable (Recommended)", description: "2 lines: model+branch+git, context+usage meters" },
51
- { label: "Skip", description: "Skip statusline configuration" }
52
- ]
53
- }]
54
- })
55
- ```
56
-
57
- **Create wrapper script** (for Enable, run via Bash tool):
58
- ```bash
59
- mkdir -p ~/.claude/hooks
60
- cat > ~/.claude/hooks/nexus-statusline.sh << 'EOF'
61
- #!/bin/bash
62
- SCRIPT=$(ls -1d "$HOME/.claude/plugins/cache/nexus/claude-nexus"/*/scripts/statusline.cjs 2>/dev/null | sort -V | tail -1)
63
- [ -n "$SCRIPT" ] && exec node "$SCRIPT"
64
- EOF
65
- chmod +x ~/.claude/hooks/nexus-statusline.sh
66
- ```
67
-
68
- **On selection, depending on scope:**
69
-
70
- **(1) User scope:**
71
- - Create wrapper script (run step above)
72
- - If `statusLine` field is **absent** in `~/.claude/settings.json`: add statusLine setting directly:
73
- ```json
74
- { "statusLine": { "type": "command", "command": "bash $HOME/.claude/hooks/nexus-statusline.sh" } }
75
- ```
76
- - If `statusLine` field **already exists** in `~/.claude/settings.json`: create wrapper only, do not modify settings.json — ask user to confirm replacement (see "Statusline coexistence handling" below)
77
-
78
- **(2) Project scope:**
79
- - Create wrapper script (run step above)
80
- - If `statusLine` field is **absent** in `.claude/settings.local.json`: add statusLine setting directly:
81
- ```json
82
- { "statusLine": { "type": "command", "command": "bash $HOME/.claude/hooks/nexus-statusline.sh" } }
83
- ```
84
- - If `statusLine` field **already exists** in `.claude/settings.local.json`: create wrapper only, do not modify settings.local.json — ask user to confirm replacement (see "Statusline coexistence handling" below)
85
- **(3) Skip:**
86
- - Do not create wrapper or modify settings.json.
87
-
88
- **Statusline coexistence handling:**
89
-
90
- Run only if settings.json modification was deferred above (i.e., wrapper was created but existing statusLine was detected).
91
- If statusLine settings were already applied above, skip this sub-step.
92
-
93
- Specifically, treat an existing statusline setting as detected if any of the following are true:
94
- - `~/.claude/hooks/statusline.sh` file exists
95
- - Or the scope-appropriate settings.json (`~/.claude/settings.json` or `.claude/settings.local.json`) already has a `statusLine` field
96
-
97
- If detected:
98
-
99
- ```
100
- prompt_user({
101
- questions: [{
102
- question: "An existing statusline configuration was detected. Replace it with the Nexus statusline?",
103
- header: "Statusline",
104
- multiSelect: false,
105
- options: [
106
- { label: "Replace (Recommended)", description: "Replace with Nexus statusline (wrapper script configuration)" },
107
- { label: "Keep Existing", description: "Keep existing statusline. Nexus wrapper is created but settings.json is not modified." }
108
- ]
109
- }]
110
- })
111
- ```
112
-
113
- - "Replace (Recommended)": replace the `statusLine` in the scope-appropriate settings.json with the Nexus wrapper (wrapper script already created above)
114
- - "Keep Existing": keep the existing `statusLine` in settings.json (wrapper script already created above — user can switch manually later)
115
-
116
- If no existing statusline configuration is detected, skip this sub-step.
117
-
118
- ### Step 3: Recommended Plugin
119
-
120
- Check if `context7@claude-plugins-official` is in `enabledPlugins` (global or project settings.json).
121
-
122
- **Already installed:**
123
-
124
- Notify and skip:
125
- ```
126
- "Recommended plugin already installed: context7 ✓"
127
- ```
128
-
129
- **Not installed:**
130
-
131
- ```
132
- prompt_user({
133
- questions: [{
134
- question: "Install the context7 plugin? It enables agents to look up library docs in real time.",
135
- header: "Plugin",
136
- multiSelect: false,
137
- options: [
138
- { label: "Install (Recommended)", description: "context7 — real-time library documentation lookup (Upstash Context7)" },
139
- { label: "Skip", description: "Skip recommended plugin installation" }
140
- ]
141
- }]
142
- })
143
- ```
144
-
145
- **If "Install":**
146
- Add to `enabledPlugins` in the scope-appropriate settings.json (`~/.claude/settings.json` or `.claude/settings.local.json`):
147
- ```json
148
- {
149
- "context7@claude-plugins-official": true
150
- }
151
- ```
152
- Claude Code will automatically install the plugin at the start of the next session.
153
-
154
- **If "Skip":** proceed to the next step.
155
-
156
- Note: Once added to `enabledPlugins`, Claude Code automatically installs the plugin at the start of the next session.
157
-
158
- ### Step 4: Knowledge Init
159
-
160
- ```
161
- prompt_user({
162
- questions: [{
163
- question: "Auto-generate project core knowledge?",
164
- header: "Init",
165
- multiSelect: false,
166
- options: [
167
- { label: "Yes (Recommended)", description: "Analyze existing docs (README, CLAUDE.md, etc.) to generate knowledge files in .nexus/memory/ and .nexus/context/" },
168
- { label: "Skip", description: "Run manually later with /claude-nexus:nx-init" }
169
- ]
170
- }]
171
- })
172
- ```
173
-
174
- If "Yes": invoke `Skill({ skill: "claude-nexus:nx-init" })`.
175
- If "Skip": proceed to next step.
176
-
177
- ### Step 5: Complete
178
-
179
- Output a setup completion message:
180
- - Summary of applied settings
181
- - Brief introduction to available skills/agents
182
- - "To get started, describe a task, or use [plan] for planning, [run] for execution, [rule] for saving rules"
183
-
184
- ---
185
-
186
- ## Key Principles
187
-
188
- 1. **Every step uses prompt_user** — no free-text input
189
- 2. **Minimize tokens** — limit each step to concrete choices to prevent unnecessary exploration
190
- 3. **Always provide a Skip option** — nothing is forced
191
- 4. **Extensible structure** — includes recommended plugin step, expandable to additional categories in the future
192
-
193
- ## State Management
194
-
195
- Setup operates via sequential prompt_user calls with no state file.
196
- Configuration results are written to the scope-appropriate settings file at each step.
@@ -1,5 +0,0 @@
1
- name: nx-setup
2
- description: Interactive project setup wizard for Nexus configuration.
3
- summary: "Interactive Nexus configuration wizard"
4
- manual_only: true
5
- id: nx-setup