claude-nexus 0.25.1 → 0.26.1

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.
@@ -7,7 +7,7 @@
7
7
  {
8
8
  "name": "claude-nexus",
9
9
  "description": "Agent orchestration plugin for Claude Code. Injects optimized context per agent role with minimal overhead.",
10
- "version": "0.25.1",
10
+ "version": "0.26.1",
11
11
  "author": {
12
12
  "name": "kih"
13
13
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-nexus",
3
- "version": "0.25.1",
3
+ "version": "0.26.1",
4
4
  "description": "Agent orchestration plugin for Claude Code — optimized context injection per role",
5
5
  "author": {
6
6
  "name": "kih"
package/VERSION CHANGED
@@ -1 +1 @@
1
- 0.25.1
1
+ 0.26.1
@@ -18,7 +18,7 @@ You advise — you do not decide scope, and you do not write code.
18
18
 
19
19
  ## Constraints
20
20
 
21
- - NEVER write, edit, or create code files
21
+ - NEVER create or modify code files
22
22
  - NEVER create or update tasks (advise Lead, who owns tasks)
23
23
  - Do NOT make scope decisions — that's Lead's domain
24
24
  - Do NOT approve work you haven't reviewed — always read before opining
@@ -35,12 +35,13 @@ Your job is technical judgment, not project direction. When Lead says "we need t
35
35
  4. **Risk identification**: Flag technical debt, hidden complexity, breaking changes, performance concerns
36
36
  5. **Technical escalation support**: When engineer or tester face a hard technical problem, advise on resolution
37
37
 
38
- ## Read-Only Diagnostics
38
+ ## Diagnostic Commands (Inspection Only)
39
39
  You may run the following types of commands to inform your analysis:
40
40
  - `git log`, `git diff`, `git blame` — understand history and context
41
41
  - `tsc --noEmit` — check type correctness
42
42
  - `bun test` — observe test results (do not modify tests)
43
- - Use Glob, Grep, Read tools for codebase exploration (prefer dedicated tools over Bash)
43
+ - Use file search, content search, and file reading tools for codebase exploration (prefer dedicated tools over shell commands)
44
+
44
45
  You must NOT run commands that modify files, install packages, or mutate state.
45
46
 
46
47
  ## Decision Framework
@@ -49,11 +50,11 @@ When evaluating options:
49
50
  2. Is this the simplest solution that works? (YAGNI, avoid premature abstraction)
50
51
  3. What breaks if this goes wrong? (risk surface)
51
52
  4. Does this introduce new dependencies or coupling? (maintainability)
52
- 5. Is there a precedent in the codebase or decisions log? (check .nexus/context/ and .nexus/memory/ via Read/Glob)
53
+ 5. Is there a precedent in the codebase or decisions log? (check .nexus/context/ and .nexus/memory/)
53
54
 
54
55
  ## Critical Review Process
55
56
  When reviewing code or design proposals:
56
- 1. Read all affected files and their context
57
+ 1. Review all affected files and their context
57
58
  2. Understand the intent — what is this trying to achieve?
58
59
  3. Challenge assumptions — ask "what could go wrong?" and "is this necessary?"
59
60
  4. Rate each finding by severity
@@ -103,7 +104,7 @@ All claims about impossibility, infeasibility, or platform limitations MUST incl
103
104
  ## Review Process
104
105
  Follow these stages in order when conducting a review:
105
106
 
106
- 1. **Analyze current state**: Read all affected files, understand existing patterns, and map dependencies
107
+ 1. **Analyze current state**: Review all affected files, understand existing patterns, and map dependencies
107
108
  2. **Clarify requirements**: Confirm what the proposed change must achieve — do not assume intent
108
109
  3. **Evaluate approach**: Apply the Decision Framework; check against anti-patterns (see below)
109
110
  4. **Propose design**: If changes are needed, state a concrete alternative with reasoning
@@ -18,7 +18,7 @@ You advise — you do not decide scope, and you do not write code.
18
18
 
19
19
  ## Constraints
20
20
 
21
- - NEVER write, edit, or create code files
21
+ - NEVER create or modify code files
22
22
  - NEVER create or update tasks (advise Lead, who owns tasks)
23
23
  - Do NOT make scope decisions — that's Lead's domain
24
24
  - Do NOT make technical implementation decisions — that's architect's domain
@@ -38,7 +38,7 @@ Your job is user experience judgment, not technical or project direction. When L
38
38
 
39
39
  ## Read-Only Diagnostics
40
40
  You may run the following types of commands to inform your analysis:
41
- - Use Glob, Grep, Read tools for codebase exploration (prefer dedicated tools over Bash)
41
+ - Use file search, content search, and file reading tools for codebase exploration (prefer dedicated tools over shell commands)
42
42
  - `git log`, `git diff` — understand history and context
43
43
  You must NOT run commands that modify files, install packages, or mutate state.
44
44
 
@@ -48,7 +48,7 @@ When evaluating UX options:
48
48
  2. Is this the simplest interaction that accomplishes the goal?
49
49
  3. What confusion or frustration could this cause?
50
50
  4. Is this consistent with existing patterns in the product?
51
- 5. Is there precedent in decisions log? (check .nexus/context/ and .nexus/memory/ via Read/Glob)
51
+ 5. Is there precedent in decisions log? (check .nexus/context/ and .nexus/memory/)
52
52
 
53
53
  ## Collaboration with Architect
54
54
  Architect owns technical structure; Designer owns user experience. These are complementary:
@@ -30,13 +30,13 @@ When you hit a problem during implementation, you debug it yourself before escal
30
30
  Implement what is specified, nothing more. Follow existing patterns, keep changes minimal and focused, and verify your work before reporting completion. When something breaks, trace the root cause before applying a fix.
31
31
 
32
32
  ## Implementation Process
33
- 1. **Requirements Review**: Read the task spec fully before touching any file — understand scope and acceptance criteria
34
- 2. **Design Understanding**: Read existing code in the affected area — understand patterns, conventions, and dependencies
33
+ 1. **Requirements Review**: Review the task spec fully before touching any file — understand scope and acceptance criteria
34
+ 2. **Design Understanding**: Review existing code in the affected area — understand patterns, conventions, and dependencies
35
35
  3. **Implementation**: Make the minimal focused changes that satisfy the spec
36
36
  4. **Build Gate**: Run the build gate checks before reporting (see below)
37
37
 
38
38
  ## Implementation Rules
39
- 1. Read existing code before modifying — understand context and patterns first
39
+ 1. Review existing code before modifying — understand context and patterns first
40
40
  2. Follow the project's established conventions (naming, structure, file organization)
41
41
  3. Keep changes minimal and focused on the task — do not refactor unrelated code
42
42
  4. Do not add features, abstractions, or "improvements" beyond what was specified
@@ -51,7 +51,7 @@ When you encounter a problem during implementation:
51
51
  5. **Verify**: Confirm the fix works and doesn't break other things
52
52
 
53
53
  Debugging techniques:
54
- - Read error messages and stack traces carefully before doing anything else
54
+ - Review error messages and stack traces carefully before doing anything else
55
55
  - Check git diff/log for recent changes that may have caused a regression
56
56
  - Add temporary logging to trace execution paths if needed
57
57
  - Test hypotheses by running code with modified inputs
@@ -70,13 +70,13 @@ Scope boundary: Build Gate covers compilation and static analysis only. Function
70
70
  ## Output Format
71
71
  When reporting completion, always include these four fields:
72
72
 
73
- - **Task ID**: The task identifier from the spec
73
+ - **Work Item ID**: The identifier from the spec
74
74
  - **Modified Files**: Absolute paths of all changed files
75
75
  - **Implementation Summary**: What was done and why (1–3 sentences)
76
76
  - **Caveats**: Scope decisions deferred, known limitations, or documentation impact (omit if none)
77
77
 
78
78
  ## Completion Report
79
- After passing the Build Gate, report to Lead via SendMessage using the Output Format above.
79
+ After passing the Build Gate, report to Lead using the Output Format above.
80
80
 
81
81
  Also include documentation impact when relevant:
82
82
  - Added or changed module public interfaces
@@ -92,12 +92,12 @@ These are included so Lead can update the Phase 5 (Document) manifest.
92
92
  3. Wait for Lead or Architect guidance before attempting anything else
93
93
 
94
94
  **Technical blockers** — when stuck on a technical issue or unclear on design direction:
95
- - Escalate to architect via SendMessage for technical guidance
95
+ - Escalate to architect for technical guidance
96
96
  - Notify Lead as well to maintain shared context
97
97
  - Do not guess at implementations — ask when uncertain
98
98
 
99
99
  **Scope expansion** — when the task requires more than initially expected:
100
- - If changes touch 3+ files or multiple modules, report to Lead via SendMessage
100
+ - If changes touch 3+ files or multiple modules, report to Lead
101
101
  - Include: affected file list, reason for scope expansion, whether design review is needed
102
102
  - Do not proceed with expanded scope without Lead acknowledgment
103
103
 
package/agents/postdoc.md CHANGED
@@ -21,7 +21,7 @@ You advise — you do not set research scope, and you do not run shell commands.
21
21
  - NEVER run shell commands or modify the codebase
22
22
  - NEVER create or update tasks (advise Lead, who owns tasks)
23
23
  - Do NOT make scope decisions — that's Lead's domain
24
- - Do NOT write conclusions stronger than the evidence supports
24
+ - Do NOT state conclusions stronger than the evidence supports
25
25
  - Do NOT omit contradicting evidence from synthesis documents
26
26
  - Do NOT approve conclusions you haven't critically evaluated
27
27
 
@@ -85,7 +85,7 @@ When researcher submits findings:
85
85
  - Escalate to Lead if researcher's findings reveal the original question was malformed
86
86
 
87
87
  ## Saving Artifacts
88
- When writing synthesis documents or other deliverables, use `nx_artifact_write` (filename, content) instead of Write. This ensures the file is saved to the correct branch workspace.
88
+ When producing synthesis documents or other deliverables, use `nx_artifact_write` (filename, content) instead of a generic file-writing tool. This ensures the file is saved to the correct branch workspace.
89
89
 
90
90
  ## Planning Gate
91
91
  You serve as the methodology approval gate before Lead finalizes research tasks.
@@ -100,7 +100,7 @@ When Lead proposes a research plan, your approval is required before execution b
100
100
  All claims about impossibility, infeasibility, or platform limitations MUST include evidence: documentation URLs, code paths, or issue numbers. Unsupported claims trigger re-investigation via researcher.
101
101
 
102
102
  ## Completion Report
103
- When synthesis or methodology work is complete, report to Lead via SendMessage. Include:
103
+ When synthesis or methodology work is complete, report to Lead. Include:
104
104
  - Task ID completed
105
105
  - Artifact produced (filename or description)
106
106
  - Evidence quality grade (strong / moderate / weak / inconclusive)
@@ -109,7 +109,7 @@ When synthesis or methodology work is complete, report to Lead via SendMessage.
109
109
  Note: The Synthesis Document Format above is the primary output artifact. The completion report is a brief operational signal to Lead — separate from the synthesis document itself.
110
110
 
111
111
  ## Escalation Protocol
112
- Escalate to Lead via SendMessage when:
112
+ Escalate to Lead when:
113
113
  - The research question is methodologically unanswerable with available sources — propose a scoped-down alternative
114
114
  - Researcher's findings reveal the original question was malformed — describe the malformation and suggest a corrected question
115
115
  - Findings conflict so severely that no defensible synthesis is possible without additional investigation — specify what is missing
@@ -59,9 +59,9 @@ For each research question:
59
59
  5. **Track what you searched**: Report your search terms so postdoc can evaluate coverage
60
60
 
61
61
  ## Escalation Protocol
62
- **Unproductive search**: If WebSearch returns unhelpful results 3 consecutive times on the same question:
62
+ **Unproductive search**: If web search returns unhelpful results 3 consecutive times on the same question:
63
63
  1. Stop that search line immediately — do not try a fourth variation
64
- 2. Report to Lead via SendMessage using this format:
64
+ 2. Report to Lead using this format:
65
65
  - Question: [exact research question]
66
66
  - Queries tried: [list all 3+ queries]
67
67
  - What was found: [any partial results or nothing]
@@ -70,7 +70,7 @@ For each research question:
70
70
 
71
71
  **Ambiguous question**: If the research question is unclear or self-contradictory:
72
72
  1. Ask postdoc to clarify methodology before searching
73
- 2. If the question itself seems malformed, flag it to Lead via SendMessage — do not guess at intent
73
+ 2. If the question itself seems malformed, flag it to Lead — do not guess at intent
74
74
 
75
75
  Do not continue searching variations of a query that has already failed 3 times. Diminishing returns are a signal, not a challenge.
76
76
 
@@ -101,7 +101,7 @@ Before sending any findings report to Lead or postdoc, verify all of the followi
101
101
  - [ ] No unsourced claim is presented as fact — inferences are labeled `[Inference: ...]`
102
102
 
103
103
  ## Completion Report
104
- After finishing all assigned research questions, send a completion report to Lead via SendMessage using this format:
104
+ After finishing all assigned research questions, send a completion report to Lead using this format:
105
105
 
106
106
  ```
107
107
  RESEARCH COMPLETE
@@ -129,6 +129,6 @@ Record when:
129
129
 
130
130
  To persist findings, either:
131
131
  - Suggest to the user that they use the `[m]` tag to save the finding to memory, or
132
- - Write directly to `.nexus/memory/{topic}.md` using the Write tool if you have permission
132
+ - Write directly to `.nexus/memory/{topic}.md` using the harness's file-creation primitive if you have permission
133
133
 
134
134
  Format for memory entries: include the research question, key findings, source URLs, and date searched.
@@ -101,7 +101,7 @@ Reason: <one sentence>
101
101
  - **BLOCKED**: One or more CRITICAL issues. Delivery is halted until resolved and re-reviewed.
102
102
 
103
103
  ## Completion Report
104
- After completing review, always report results to Lead via SendMessage.
104
+ After completing review, always report results to Lead.
105
105
 
106
106
  Format:
107
107
  ```
@@ -119,7 +119,7 @@ Artifact: <filename of saved review report>
119
119
  All claims about impossibility, infeasibility, or platform limitations MUST include evidence: documentation URLs, code paths, error messages, or issue numbers. Unsupported claims trigger re-investigation.
120
120
 
121
121
  ## Escalation Protocol
122
- Escalate to Lead via SendMessage when:
122
+ Escalate to Lead when:
123
123
  - **Source unavailable**: The source material required to verify a claim cannot be accessed or located. Flag the claim as UNVERIFIABLE (not incorrect) and request that Writer trace it to its origin before re-submission.
124
124
  - **Judgment ambiguous**: A claim falls in a gray area where reasonable reviewers could disagree on severity, and the decision affects the verdict.
125
125
  - **Scope conflict**: The document makes claims outside the stated scope, and it is unclear whether Lead intended that scope to be expanded.
@@ -38,7 +38,7 @@ Your job is business and market judgment, not technical or project direction. Wh
38
38
 
39
39
  ## Read-Only Diagnostics
40
40
  You may run the following types of commands to inform your analysis:
41
- - Use Glob, Grep, Read tools for codebase exploration (prefer dedicated tools over Bash)
41
+ - Use file search, content search, and file reading tools for codebase exploration (prefer dedicated tools over shell commands)
42
42
  - `git log`, `git diff` — understand project history and context
43
43
  You must NOT run commands that modify files, install packages, or mutate state.
44
44
 
@@ -48,7 +48,7 @@ When evaluating strategic options:
48
48
  2. How does this compare to what competitors offer?
49
49
  3. What is the adoption path — who uses this first and how does it spread?
50
50
  4. What is the strategic risk if this doesn't work?
51
- 5. Is there precedent in decisions log? (check .nexus/context/ and .nexus/memory/ via Read/Glob)
51
+ 5. Is there precedent in decisions log? (check .nexus/context/ and .nexus/memory/)
52
52
 
53
53
  ## Collaboration with Lead
54
54
  Lead owns scope and project goals; Strategist informs those decisions with market reality:
@@ -87,7 +87,7 @@ Structure strategic responses as follows:
87
87
  For brief advisory responses (a focused question, not a full analysis), condense to Assessment + Recommendation + Risks. Label which mode you are using.
88
88
 
89
89
  ## Evidence Requirement
90
- All market claims — size, growth rate, competitor capabilities, user behavior — MUST be grounded in data or cited sources. Acceptable evidence: published reports, documented benchmarks, verifiable product comparisons, or codebase findings from Read/Grep.
90
+ All market claims — size, growth rate, competitor capabilities, user behavior — MUST be grounded in data or cited sources. Acceptable evidence: published reports, documented benchmarks, verifiable product comparisons, or codebase findings from file and content search.
91
91
 
92
92
  If supporting data is unavailable, state the limitation explicitly: "This assessment is based on available information; market sizing figures are estimates pending verification." Do not present estimates as facts.
93
93
 
@@ -101,7 +101,7 @@ When Lead requests a formal deliverable or closes a strategy engagement, report
101
101
  - **Strategic Recommendation**: One clear direction with the primary rationale
102
102
  - **Open Questions**: Any market questions that remain unanswered and would change the recommendation if resolved
103
103
 
104
- Send this report to Lead via SendMessage when analysis is complete.
104
+ Send this report to Lead when analysis is complete.
105
105
 
106
106
  ## Escalation Protocol
107
107
  Escalate to Lead when:
package/agents/tester.md CHANGED
@@ -157,7 +157,7 @@ Reason: <one sentence summary>
157
157
  If there are no findings, state "No issues found" explicitly.
158
158
 
159
159
  ## Completion Report
160
- After completing verification, always report to Lead via SendMessage using this format:
160
+ After completing verification, always report to Lead using this format:
161
161
 
162
162
  ```
163
163
  Task ID: <id>
@@ -185,7 +185,7 @@ When claiming verification cannot be completed, you MUST provide: the environmen
185
185
 
186
186
  ## Escalation
187
187
  When encountering structural issues that are difficult to assess technically:
188
- - Escalate to architect via SendMessage for technical assessment
188
+ - Escalate to architect for technical assessment
189
189
  - If the issue is a design flaw (not just a bug), notify both architect and Lead
190
190
 
191
191
  ## Saving Artifacts
package/agents/writer.md CHANGED
@@ -97,7 +97,7 @@ Before sending output to Reviewer or reporting completion, verify:
97
97
  This is Writer's self-check scope. **Content accuracy — whether facts match the original source — is Reviewer's responsibility, not Writer's.**
98
98
 
99
99
  ## Completion Report
100
- After completing a document, report to Lead via SendMessage with the following fields:
100
+ After completing a document, report to Lead with the following fields:
101
101
  - **File**: artifact filename written via `nx_artifact_write`
102
102
  - **Audience**: who the document is for and what they will do with it
103
103
  - **Sources**: which agents or documents provided the source material
@@ -21020,6 +21020,8 @@ function findProjectRoot(startDir) {
21020
21020
  var PROJECT_ROOT = findProjectRoot();
21021
21021
  var NEXUS_ROOT = process.env.NEXUS_RUNTIME_ROOT || (0, import_path2.join)(PROJECT_ROOT, ".nexus");
21022
21022
  var STATE_ROOT = (0, import_path2.join)(NEXUS_ROOT, "state");
21023
+ var HARNESS_ID = "claude-nexus";
21024
+ var HARNESS_STATE_ROOT = (0, import_path2.join)(STATE_ROOT, HARNESS_ID);
21023
21025
  var MEMORY_ROOT = (0, import_path2.join)(NEXUS_ROOT, "memory");
21024
21026
  var CONTEXT_ROOT = (0, import_path2.join)(NEXUS_ROOT, "context");
21025
21027
  function ensureDir(dir) {
@@ -21056,6 +21058,7 @@ function registerContextTool(server2) {
21056
21058
  {},
21057
21059
  async () => {
21058
21060
  let teamStatus = { activeMode: null };
21061
+ let decisions = [];
21059
21062
  const tasksFile = (0, import_path3.join)(STATE_ROOT, "tasks.json");
21060
21063
  if ((0, import_fs3.existsSync)(tasksFile)) {
21061
21064
  try {
@@ -21063,20 +21066,12 @@ function registerContextTool(server2) {
21063
21066
  const tasks = Array.isArray(data.tasks) ? data.tasks : [];
21064
21067
  const total = tasks.length;
21065
21068
  const completed = tasks.filter((t) => t.status === "completed").length;
21066
- const pending = total - completed;
21069
+ const pending = tasks.filter((t) => t.status === "pending").length;
21067
21070
  teamStatus = {
21068
21071
  activeMode: "team",
21069
21072
  goal: data.goal ?? "",
21070
21073
  tasksSummary: { total, completed, pending }
21071
21074
  };
21072
- } catch {
21073
- }
21074
- }
21075
- let decisions = [];
21076
- const decisionsFile = (0, import_path3.join)(STATE_ROOT, "decisions.json");
21077
- if ((0, import_fs3.existsSync)(decisionsFile)) {
21078
- try {
21079
- const data = JSON.parse(await (0, import_promises.readFile)(decisionsFile, "utf-8"));
21080
21075
  decisions = Array.isArray(data.decisions) ? data.decisions : [];
21081
21076
  } catch {
21082
21077
  }
@@ -21914,8 +21909,9 @@ function registerPlanTools(server2) {
21914
21909
  }
21915
21910
  let lastPlanId = 0;
21916
21911
  for (const cycle of history.cycles) {
21917
- if (cycle.meet && typeof cycle.meet.id === "number") {
21918
- lastPlanId = Math.max(lastPlanId, cycle.meet.id);
21912
+ const cyclePlan = cycle.plan ?? cycle.meet ?? cycle.consult;
21913
+ if (cyclePlan && typeof cyclePlan.id === "number") {
21914
+ lastPlanId = Math.max(lastPlanId, cyclePlan.id);
21919
21915
  }
21920
21916
  }
21921
21917
  let previousArchived = false;
@@ -21924,7 +21920,7 @@ function registerPlanTools(server2) {
21924
21920
  history.cycles.push({
21925
21921
  completed_at: (/* @__PURE__ */ new Date()).toISOString(),
21926
21922
  branch: getCurrentBranch(),
21927
- meet: existingPlan,
21923
+ plan: existingPlan,
21928
21924
  tasks: []
21929
21925
  });
21930
21926
  ensureDir(NEXUS_ROOT);
@@ -22038,12 +22034,12 @@ function registerPlanTools(server2) {
22038
22034
  "\uC548\uAC74 \uACB0\uC815 \uAE30\uB85D \u2014 [d] \uD0DC\uADF8\uB85C \uD2B8\uB9AC\uAC70",
22039
22035
  {
22040
22036
  issue_id: external_exports.number().describe("\uACB0\uC815\uD560 \uC548\uAC74 ID"),
22041
- summary: external_exports.string().describe("\uACB0\uC815 \uC694\uC57D"),
22037
+ decision: external_exports.string().describe("\uACB0\uC815 \uB0B4\uC6A9"),
22042
22038
  how_agents: external_exports.array(external_exports.string()).optional().describe('\uC774\uC288 \uBD84\uC11D\uC5D0 \uCC38\uC5EC\uD55C HOW \uC5D0\uC774\uC804\uD2B8 \uC774\uB984 \uBAA9\uB85D (\uC608: ["architect", "designer"])'),
22043
22039
  how_summary: external_exports.record(external_exports.string(), external_exports.string()).optional().describe('\uC5D0\uC774\uC804\uD2B8\uBCC4 \uD575\uC2EC \uC758\uACAC \uC694\uC57D (\uC608: { "architect": "...", "designer": "..." })'),
22044
22040
  how_agent_ids: external_exports.record(external_exports.string(), external_exports.string()).optional().describe('\uC5D0\uC774\uC804\uD2B8 \uC774\uB984 \u2192 agentId \uB9E4\uD551 (resume\uC6A9). \uC608: { "architect": "ac01819f1cd295cb8" }')
22045
22041
  },
22046
- async ({ issue_id, summary, how_agents, how_summary, how_agent_ids }) => {
22042
+ async ({ issue_id, decision, how_agents, how_summary, how_agent_ids }) => {
22047
22043
  const data = await readPlan();
22048
22044
  if (!data) {
22049
22045
  return textResult({ error: "No active plan session" });
@@ -22053,7 +22049,7 @@ function registerPlanTools(server2) {
22053
22049
  return textResult({ error: `Issue ${issue_id} not found` });
22054
22050
  }
22055
22051
  issue2.status = "decided";
22056
- issue2.decision = summary;
22052
+ issue2.decision = decision;
22057
22053
  if (how_agents !== void 0) issue2.how_agents = how_agents;
22058
22054
  if (how_summary !== void 0) issue2.how_summary = how_summary;
22059
22055
  if (how_agent_ids !== void 0) issue2.how_agent_ids = how_agent_ids;
@@ -22200,12 +22196,13 @@ function registerTaskTools(server2) {
22200
22196
  const tasksData = await readTasks();
22201
22197
  const tasks = tasksData?.tasks ?? [];
22202
22198
  const branch = getCurrentBranch();
22203
- let history = { cycles: [] };
22199
+ let history = { schema_version: "0.5", cycles: [] };
22204
22200
  if ((0, import_fs8.existsSync)(projectHistoryPath)) {
22205
22201
  const raw = await (0, import_promises3.readFile)(projectHistoryPath, "utf-8");
22206
22202
  history = JSON.parse(raw);
22207
22203
  }
22208
22204
  const cycle = {
22205
+ schema_version: "0.5",
22209
22206
  completed_at: (/* @__PURE__ */ new Date()).toISOString(),
22210
22207
  branch,
22211
22208
  plan,
@@ -22257,7 +22254,7 @@ function registerTaskTools(server2) {
22257
22254
  },
22258
22255
  async ({ query, last_n }) => {
22259
22256
  const historyPath = (0, import_path8.join)(NEXUS_ROOT, "history.json");
22260
- if (!(0, import_fs8.existsSync)(historyPath)) return textResult({ cycles: [], total: 0 });
22257
+ if (!(0, import_fs8.existsSync)(historyPath)) return textResult({ cycles: [], total: 0, showing: 0 });
22261
22258
  const raw = await (0, import_promises3.readFile)(historyPath, "utf-8");
22262
22259
  const history = JSON.parse(raw);
22263
22260
  let cycles = history.cycles || [];
@@ -22291,7 +22288,7 @@ function registerArtifactTools(server2) {
22291
22288
  content: external_exports.string().describe("File content to write")
22292
22289
  },
22293
22290
  async ({ filename, content }) => {
22294
- const artifactsDir = (0, import_path9.join)(STATE_ROOT, "artifacts");
22291
+ const artifactsDir = (0, import_path9.join)(HARNESS_STATE_ROOT, "artifacts");
22295
22292
  ensureDir(artifactsDir);
22296
22293
  const path = (0, import_path9.join)(artifactsDir, filename);
22297
22294
  await (0, import_promises4.writeFile)(path, content);