@moreih29/nexus-core 0.8.0 → 0.9.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.
@@ -160,8 +160,6 @@ Nexus state is split into two categories with different scopes, persistence, and
160
160
  │ ├── plan.json
161
161
  │ ├── tasks.json
162
162
  │ ├── tool-log.jsonl
163
- │ ├── edit-tracker.json
164
- │ ├── reopen-tracker.json
165
163
  │ ├── artifacts/
166
164
  │ └── {harness-id}/ ← harness namespace (see §Harness-local State Extension)
167
165
  │ └── agent-tracker.json
@@ -193,7 +191,6 @@ At session start, your harness must:
193
191
  | `state/tasks.json` | Session | No | `task_add` tool (first call) | `task_close` tool |
194
192
  | `state/{harness-id}/agent-tracker.json` | Session | No | session_start hook | session_end hook |
195
193
  | `state/tool-log.jsonl` | Session | No | post_tool_use hook | session_end hook |
196
- | `state/edit-tracker.json` | Session | No | post_tool_use hook (first edit) | task_close / session_end |
197
194
  | `history.json` | Project | Yes | `plan_start` or `task_close` (first archive) | Never |
198
195
 
199
196
  ### Schema validation
@@ -235,7 +232,7 @@ For every tool, implement exactly the parameter schema, return shape, and side e
235
232
  Specific requirements to enforce:
236
233
 
237
234
  - `plan_start`: when a prior `plan.json` exists, archive it to `history.json` before creating the new session. Failure to archive on replace will cause data loss.
238
- - `task_close`: delete `plan.json`, `tasks.json`, `edit-tracker.json`, and `reopen-tracker.json` after archiving. Leaving these files causes stale state on next session.
235
+ - `task_close`: delete `plan.json` and `tasks.json` after archiving. Leaving these files causes stale state on next session. Files such as `edit-tracker.json` and `reopen-tracker.json` are harness-local concerns and are not managed by `task_close`; delete them in your session_end hook if your harness maintains them.
239
236
  - `artifact_write`: create `.nexus/state/artifacts/` on demand if it does not exist. Do not require the directory to pre-exist.
240
237
  - `context`: return `{ active: false }` (for plan_status) or `{ exists: false }` (for task_list) when the relevant state file is absent. Do not return an error.
241
238
 
@@ -567,8 +564,8 @@ Identify the equivalent events in your harness's plugin system and implement the
567
564
 
568
565
  **Expected consumer behavior:**
569
566
  - Update `.nexus/state/{harness-id}/agent-tracker.json`: set `status=completed`, record `stopped_at` timestamp.
570
- - Compute `files_touched` from your tool-log or the subagent's tool usage record. Record which files were created or modified.
571
- - Update `edit-tracker.json` with the files touched by this agent. This data feeds the bounded-tier resume evaluation on subsequent spawns.
567
+ - Compute `files_touched` from your tool-log or the subagent's tool usage record. Record which files were created or modified in the `files_touched` array of the agent's `agent-tracker.json` entry. This field is the authoritative source for bounded-tier resume evaluation.
568
+ - (Optional, harness-local) If your harness maintains a separate `edit-tracker.json` for cross-session file-touch history, update it here. This is not a nexus-core requirement; it is a harness-local optimization.
572
569
  - Check if the completed task has pending acceptance criteria that were not verified. If the task has `acceptance` defined and no `tester` or `reviewer` subagent has been scheduled, surface a reminder to Lead.
573
570
  - Update the task status in `tasks.json` via the `task_update` tool: set to `completed`.
574
571
 
@@ -593,7 +590,7 @@ Read-only tools (query tools, status reads) are never blocked by capability gate
593
590
 
594
591
  **Expected consumer behavior:**
595
592
  - Append a log entry to `.nexus/state/tool-log.jsonl`: timestamp, agent_id, tool name, file path (if a file was touched), result status.
596
- - If the tool was a file-editing tool, update `edit-tracker.json`: record the file path and the agent_id that modified it. This is the data source for bounded-tier resume evaluation.
593
+ - (Optional, harness-local) If your harness maintains `edit-tracker.json`, record the file path and agent_id here. This is a harness-local optimization and is not required by nexus-core. The `files_touched` array in `agent-tracker.json` is the nexus-core-defined record of which files an agent touched.
597
594
  - If the tool result indicates an error, record the error in the log for diagnostic purposes. Do not suppress error results.
598
595
 
599
596
  ---
@@ -704,8 +701,8 @@ Before attempting to resume, verify that your harness supports the resume mechan
704
701
 
705
702
  For `bounded` agents evaluating resume eligibility:
706
703
  - Check `.nexus/state/{harness-id}/agent-tracker.json` for the prior agent ID assigned to this task.
707
- - Check `edit-tracker.json` to determine if any other agent has modified the target files since the last session.
708
- - If any intervening edit is found, use a fresh spawn regardless of `owner_reuse_policy`.
704
+ - Scan the `files_touched` arrays of all other completed agents in `agent-tracker.json`. If any other agent has touched the same target files since the last session, treat that as an intervening edit and use a fresh spawn regardless of `owner_reuse_policy`. The `files_touched` field is defined in `state-schemas/agent-tracker.schema.json` and is the nexus-core-defined source for this check.
705
+ - If your harness additionally maintains `edit-tracker.json` for finer-grained cross-session tracking, you may consult it as a supplemental heuristic, but it is not required by nexus-core.
709
706
 
710
707
  Full resume tier definitions are in [behavioral-contracts.md §3](./behavioral-contracts.md).
711
708
 
@@ -807,7 +804,7 @@ Implement tag detection in your `user_message` hook. When `[plan]` is detected,
807
804
  |-------|--------------------------|
808
805
  | `session_start` | Create `.nexus/state/{harness-id}/` directory; initialize `agent-tracker.json` as `[]` |
809
806
  | `user_message` | Detect `[plan]` tag; load `skills/nx-plan/body.md`; inject into Lead's context |
810
- | `session_end` | Check for `tasks.json`; if present with incomplete tasks, warn the user |
807
+ | `session_end` | Check for `tasks.json`; if present with incomplete tasks, warn the user. If the harness maintains local tracker files (e.g. `edit-tracker.json`, `reopen-tracker.json`), delete them here — see the `session_end` subsection in §9 for full details. |
811
808
 
812
809
  ### State files (3 minimum)
813
810
 
@@ -12,13 +12,15 @@ This document is the canonical reference for the `.nexus/` directory structure u
12
12
  │ ├── plan.json
13
13
  │ ├── tasks.json
14
14
  │ ├── tool-log.jsonl
15
- │ ├── edit-tracker.json
16
- │ ├── reopen-tracker.json
17
15
  │ ├── artifacts/
18
16
  │ ├── claude-nexus/ ← harness-namespaced directory (example)
19
- │ │ └── agent-tracker.json
17
+ │ │ ├── agent-tracker.json
18
+ │ │ ├── edit-tracker.json
19
+ │ │ └── reopen-tracker.json
20
20
  │ └── opencode-nexus/ ← harness-namespaced directory (example)
21
- └── agent-tracker.json
21
+ ├── agent-tracker.json
22
+ │ ├── edit-tracker.json
23
+ │ └── reopen-tracker.json
22
24
  ├── history.json ← project-scoped (git-tracked, append-only)
23
25
  ├── memory/ ← project-scoped (git-tracked)
24
26
  │ └── *.md
@@ -103,7 +105,7 @@ This document is the canonical reference for the `.nexus/` directory structure u
103
105
 
104
106
  ---
105
107
 
106
- #### `state/edit-tracker.json`
108
+ #### `state/{harness-id}/edit-tracker.json`
107
109
 
108
110
  **Purpose.** Tracks which files have been edited in the current session. Used by the bounded resume tier to detect intervening edits before allowing agent reuse.
109
111
 
@@ -111,13 +113,13 @@ This document is the canonical reference for the `.nexus/` directory structure u
111
113
 
112
114
  **Git tracking.** Ignored.
113
115
 
114
- **Lifecycle.** Created on first file edit. Cleared at session end.
116
+ **Lifecycle.** Created on first file edit. Cleared at session end by the consumer harness session hook.
115
117
 
116
- **Owner.** Harness file-edit hooks.
118
+ **Owner.** Consumer harness session hook. Not managed by any nexus-core MCP tool.
117
119
 
118
120
  ---
119
121
 
120
- #### `state/reopen-tracker.json`
122
+ #### `state/{harness-id}/reopen-tracker.json`
121
123
 
122
124
  **Purpose.** Records tasks or plan issues that have been reopened within the current cycle, to prevent infinite reopen loops.
123
125
 
@@ -125,9 +127,9 @@ This document is the canonical reference for the `.nexus/` directory structure u
125
127
 
126
128
  **Git tracking.** Ignored.
127
129
 
128
- **Lifecycle.** Created on first reopen event. Cleared at cycle end.
130
+ **Lifecycle.** Created on first reopen event. Cleared at cycle end by the consumer harness session hook.
129
131
 
130
- **Owner.** Task and plan lifecycle tools.
132
+ **Owner.** Consumer harness session hook. Not managed by any nexus-core MCP tool.
131
133
 
132
134
  ---
133
135
 
@@ -101,8 +101,8 @@ Nexus 산출물은 생성 책임 주체에 따라 세 카테고리로 분류된
101
101
  **Schema reference**: `conformance/state-schemas/agent-tracker.schema.json`
102
102
 
103
103
  **Interop requirement**:
104
- - 하네스는 `agent-tracker.json`을 기록할 때 MUST `conformance/state-schemas/agent-tracker.schema.json`에 유효한 JSON을 기록해야 한다.
105
- - MUST required 2 필드(`harness_id`, `started_at`)를 포함해야 한다.
104
+ - 하네스는 `agent-tracker.json`을 기록할 때 MUST `conformance/state-schemas/agent-tracker.schema.json`에 유효한 JSON을 기록해야 한다. 파일의 top-level 구조는 배열(`[]`)이며 각 원소가 하나의 에이전트 인스턴스 entry이다.
105
+ - 각 entry는 MUST required 2 필드(`harness_id`, `started_at`)를 포함해야 한다.
106
106
  - SHOULD cross-harness display/liveness를 위한 추가 필드(`agent_name`, `status`)를 제공한다.
107
107
  - `owner_agent_id`는 MUST harness-scoped opaque string으로 취급되어야 한다 — 다른 하네스의 `agent_id`를 parse하거나 추론하는 것은 MUST NOT 허용되어서는 안 된다. `agent_id`는 하네스별 내부 식별자이며 cross-harness 해석 대상이 아니다.
108
108
  - `agent-tracker.json`은 MUST NOT git-tracked 상태로 commit되어서는 안 된다.
@@ -195,7 +195,6 @@ Nexus 산출물은 생성 책임 주체에 따라 세 카테고리로 분류된
195
195
  - **MUST NOT**: 다른 하네스의 namespace 디렉토리에 쓰거나 읽는다.
196
196
  - **MUST NOT**: `{harness-id}/` 하위에서 공통 schema 파일명(plan.json, tasks.json, history.json)을 재사용한다. 예: `.nexus/state/claude-nexus/plan.json` 금지.
197
197
  - **허용**: `.nexus/state/claude-nexus/agent-tracker.json` ✓ — shared-purpose file이며 §Shared filename convention에 등록된 첫 사례. 공통 schema 파일명 재사용 금지 규칙의 예외가 아니라, shared-purpose 유형으로 별도 분류된다.
198
- - **예외**: v0.3.x 이하에 루트 경로로 등록된 legacy 2종(`edit-tracker.json`, `reopen-tracker.json`)은 `task_close` tool 계약에 묶여 있어 backward-compat으로 루트 유지 허용한다. 신규 파일에는 예외 편승 금지.
199
198
 
200
199
  ### Archive 정책
201
200
 
@@ -220,16 +219,14 @@ Nexus 산출물은 생성 책임 주체에 따라 세 카테고리로 분류된
220
219
  │ ├── plan.extension.json ← plan.json의 확장 (priority, estimated_effort 등)
221
220
  │ ├── tasks.extension.json
222
221
  │ ├── history.extension.json ← 하네스 자체 archive
223
- │ ├── edit-tracker.json ← 독립 파일
224
- │ ├── reopen-tracker.json ← 독립 파일
222
+ │ ├── edit-tracker.json ← 하네스 독립 파일
223
+ │ ├── reopen-tracker.json ← 하네스 독립 파일
225
224
  │ └── tool-log.jsonl
226
225
  └── opencode-nexus/ ← sibling 하네스 namespace 디렉토리
227
226
  ├── agent-tracker.json ← shared-purpose file (동일 파일명, harness-local)
228
227
  └── ...
229
228
  ```
230
229
 
231
- (루트 레벨 `edit-tracker.json`/`reopen-tracker.json`은 legacy carve-out으로 v0.3.x 이하 호환 유지)
232
-
233
230
  ### Reference example
234
231
 
235
232
  `conformance/examples/plan.extension.schema.example.json`에 non-normative 참조 예시가 있다. 이 파일은 다음 요소를 보여준다:
@@ -102,7 +102,7 @@ The Nexus state layout is divided into two categories:
102
102
 
103
103
  **Purpose.** Tracks agent instance activity during the session — which agents were spawned, their instance IDs, and what artifacts they touched. Used by the harness to evaluate `owner_reuse_policy` on subsequent `task_add` calls and to support agent resume. Each harness writes its own file under a harness-specific subdirectory, keeping records isolated across harness namespaces.
104
104
 
105
- **Schema.** The file contains a JSON object. Required fields: `harness_id` (string, identifies the writing harness) and `started_at` (ISO 8601 timestamp of session start). The following fields are optional: `agent_id`, `tasks`, `artifacts`, and any harness-defined extension fields.
105
+ **Schema.** The file contains a JSON array. Each entry is an object representing one spawned agent instance. Required fields per entry: `harness_id` (string, identifies the writing harness) and `started_at` (ISO 8601 timestamp when the agent instance was first started). The following fields are optional per entry: `agent_name`, `agent_id`, `last_resumed_at`, `resume_count`, `status`, `stopped_at`, `last_message`, and `files_touched`. Harness-defined extension fields are not permitted — `additionalProperties` is false per the schema.
106
106
 
107
107
  The `agent_id` field, when present, is a harness-specific opaque agent instance identifier. Its format is defined by the writing harness (for example, a UUID, a composite string, or another harness-native scheme). Consumers of this file treat the value as opaque — they do not parse it or infer agent identity across harness namespaces.
108
108
 
@@ -326,13 +326,14 @@ None.
326
326
  | `total_cycles` | `number` | Total number of cycles in `history.json` after closure |
327
327
  | `memoryHint.taskCount` | `number` | Number of tasks in the closed cycle |
328
328
  | `memoryHint.decisionCount` | `number` | Number of decided issues in the closed cycle |
329
- | `memoryHint.hadLoopDetection` | `boolean` | `true` if the edit tracker recorded three or more edits to any single file during the cycle |
330
329
  | `memoryHint.cycleTopics` | `string[]` | Non-empty strings from `plan.topic` and `tasks.goal` |
331
330
 
332
331
  ### Side Effects
333
332
 
334
333
  - Appends a cycle record to `.nexus/history.json` (creating the file if absent). The record contains `completed_at`, `branch`, `plan` (full `PlanFile` or `null`), and `tasks` (full `Task[]`).
335
- - Deletes the following session-scoped files if they exist: `plan.json`, `tasks.json`, `edit-tracker.json`, `reopen-tracker.json` (all within `.nexus/state/`).
334
+ - Deletes the following session-scoped files if they exist: `plan.json`, `tasks.json` (all within `.nexus/state/`).
335
+
336
+ Harness-local tracker files (`edit-tracker.json`, `reopen-tracker.json`, and any other files under `.nexus/state/{harness-id}/`) are not managed by `task_close`. Their lifecycle is the responsibility of consumer harness session hooks.
336
337
 
337
338
  ### Error Conditions
338
339
 
package/manifest.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "nexus_core_version": "0.8.0",
3
- "nexus_core_commit": "254efc7d8f4f52e45b548706dd42389fdb9801b2",
2
+ "nexus_core_version": "0.9.0",
3
+ "nexus_core_commit": "ff5fb5de66dc2bf5f45dfba141901ccca7eb48e9",
4
4
  "schema_contract_version": "2.0",
5
5
  "agents": [
6
6
  {
@@ -19,6 +19,22 @@
19
19
  "id": "architect",
20
20
  "body_hash": "sha256:85f9a3de419f32cdae284436eb1d902bff19a2230c50fe3068ffc642949a63b7"
21
21
  },
22
+ {
23
+ "name": "designer",
24
+ "description": "UX/UI design — evaluates 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
+ "capabilities": [
31
+ "no_file_edit",
32
+ "no_task_create",
33
+ "no_task_update"
34
+ ],
35
+ "id": "designer",
36
+ "body_hash": "sha256:88ac56147d0e5bdf23fa591ce570a9c2d0eb1338df4ec2219f6238ddfcb65df4"
37
+ },
22
38
  {
23
39
  "name": "reviewer",
24
40
  "description": "Content verification — validates accuracy, checks facts, confirms grammar and format of non-code deliverables",
@@ -34,6 +50,20 @@
34
50
  "id": "reviewer",
35
51
  "body_hash": "sha256:f04d15249601b14046e7e40a4475defb289436c4474afbd89986964f8c3e7c2f"
36
52
  },
53
+ {
54
+ "name": "engineer",
55
+ "description": "Implementation — writes code, debugs issues, follows specifications from Lead and architect",
56
+ "task": "Code implementation, edits, debugging",
57
+ "alias_ko": "엔지니어",
58
+ "category": "do",
59
+ "resume_tier": "bounded",
60
+ "model_tier": "standard",
61
+ "capabilities": [
62
+ "no_task_create"
63
+ ],
64
+ "id": "engineer",
65
+ "body_hash": "sha256:3d58b1b490c2f93cace2eedd0f04ec000f84514388eb086768cf53f8fa33db01"
66
+ },
37
67
  {
38
68
  "name": "strategist",
39
69
  "description": "Business strategy — evaluates market positioning, competitive landscape, and business viability of decisions",
@@ -50,22 +80,6 @@
50
80
  "id": "strategist",
51
81
  "body_hash": "sha256:0254b4144a22c66209bd68119553d9057a4fb7f9b1ff7ebb9878687d99583465"
52
82
  },
53
- {
54
- "name": "designer",
55
- "description": "UX/UI design — evaluates user experience, interaction patterns, and how users will experience the product",
56
- "task": "UI/UX design, interaction patterns, user experience",
57
- "alias_ko": "디자이너",
58
- "category": "how",
59
- "resume_tier": "persistent",
60
- "model_tier": "high",
61
- "capabilities": [
62
- "no_file_edit",
63
- "no_task_create",
64
- "no_task_update"
65
- ],
66
- "id": "designer",
67
- "body_hash": "sha256:88ac56147d0e5bdf23fa591ce570a9c2d0eb1338df4ec2219f6238ddfcb65df4"
68
- },
69
83
  {
70
84
  "name": "researcher",
71
85
  "description": "Independent investigation — conducts web searches, gathers evidence, and reports findings with citations",
@@ -81,20 +95,6 @@
81
95
  "id": "researcher",
82
96
  "body_hash": "sha256:fc79bafec05503327bd51a0b84b6e642d304bd79c45b78db6448b112793c143e"
83
97
  },
84
- {
85
- "name": "engineer",
86
- "description": "Implementation — writes code, debugs issues, follows specifications from Lead and architect",
87
- "task": "Code implementation, edits, debugging",
88
- "alias_ko": "엔지니어",
89
- "category": "do",
90
- "resume_tier": "bounded",
91
- "model_tier": "standard",
92
- "capabilities": [
93
- "no_task_create"
94
- ],
95
- "id": "engineer",
96
- "body_hash": "sha256:3d58b1b490c2f93cace2eedd0f04ec000f84514388eb086768cf53f8fa33db01"
97
- },
98
98
  {
99
99
  "name": "postdoc",
100
100
  "description": "Research methodology and synthesis — designs investigation approach, evaluates evidence quality, writes synthesis documents",
@@ -142,6 +142,19 @@
142
142
  }
143
143
  ],
144
144
  "skills": [
145
+ {
146
+ "name": "nx-run",
147
+ "description": "Execution — user-directed agent composition.",
148
+ "summary": "Execution — user-directed agent composition",
149
+ "triggers": [
150
+ "run"
151
+ ],
152
+ "harness_docs_refs": [
153
+ "resume_invocation"
154
+ ],
155
+ "id": "nx-run",
156
+ "body_hash": "sha256:0e2c443efceeab4621709a85cd4e2ba50471d2e850680c655d776cbb62814549"
157
+ },
145
158
  {
146
159
  "name": "nx-init",
147
160
  "description": "Project onboarding — scan, mission, essentials, context generation",
@@ -176,19 +189,6 @@
176
189
  ],
177
190
  "id": "nx-plan",
178
191
  "body_hash": "sha256:cd7a5fd1815530be6ffad18358a1295d1f74ef8a24132e75b73522c106eb6ae5"
179
- },
180
- {
181
- "name": "nx-run",
182
- "description": "Execution — user-directed agent composition.",
183
- "summary": "Execution — user-directed agent composition",
184
- "triggers": [
185
- "run"
186
- ],
187
- "harness_docs_refs": [
188
- "resume_invocation"
189
- ],
190
- "id": "nx-run",
191
- "body_hash": "sha256:0e2c443efceeab4621709a85cd4e2ba50471d2e850680c655d776cbb62814549"
192
192
  }
193
193
  ],
194
194
  "vocabulary": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@moreih29/nexus-core",
3
- "version": "0.8.0",
3
+ "version": "0.9.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": {