@moreih29/nexus-core 0.11.0 → 0.12.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/docs/consumer-implementation-guide.md +16 -28
- package/manifest.json +40 -41
- package/package.json +1 -1
- package/scripts/lib/validate.ts +2 -0
- package/skills/nx-run/meta.yml +0 -1
|
@@ -439,12 +439,19 @@ User types "[plan] analyze the architecture"
|
|
|
439
439
|
- Also read skills/{skill_id}/meta.yml to check for harness_docs_refs
|
|
440
440
|
|
|
|
441
441
|
v
|
|
442
|
-
4.
|
|
443
|
-
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
442
|
+
4. Skill Activation
|
|
443
|
+
- Consumers SHOULD prefer the harness's native skill-registration
|
|
444
|
+
or command-dispatch primitive — any mechanism by which the harness
|
|
445
|
+
natively exposes user-invocable behavioral modes to the LLM —
|
|
446
|
+
over raw prompt concatenation. The skill body.md content becomes
|
|
447
|
+
the registered skill's operating specification.
|
|
448
|
+
- Only when no such native primitive exists, fall back to context injection:
|
|
449
|
+
a. System prompt injection
|
|
450
|
+
b. Tool-response injection
|
|
451
|
+
c. User-message prefix
|
|
452
|
+
- The name and concrete shape of the native primitive are consumer-owned;
|
|
453
|
+
nexus-core specifies only that such a mechanism, when available, is
|
|
454
|
+
the preferred activation path.
|
|
448
455
|
- Also inject harness-specific context for any harness_docs_refs declared in meta.yml
|
|
449
456
|
- The body.md content BECOMES the LLM's operating instructions for this skill
|
|
450
457
|
|
|
|
@@ -505,16 +512,11 @@ Hooks are the consumer's mechanism for responding to lifecycle events. nexus-cor
|
|
|
505
512
|
|
|
506
513
|
### Relationship to harness-native knowledge surfaces
|
|
507
514
|
|
|
508
|
-
Consumer harnesses typically maintain a harness-native primary knowledge surface — for example, a system-prompt layer, a persistent session notice, or a harness banner injected before every LLM call. The hook events and their guidance in §9 are **complementary to** this harness-native surface, not a replacement for it. When §9 says "inject X at hook Y", the concrete injection path may live in the harness-native surface if that produces an equivalent effect. What matters is that the described information reaches the agent at the described moment — the delivery mechanism is consumer-local.
|
|
515
|
+
Consumer harnesses typically maintain a harness-native primary knowledge surface — for example, a system-prompt layer, a persistent session notice, or a harness banner injected before every LLM call. The hook events and their guidance in §9 are **complementary to** this harness-native surface, not a replacement for it. When §9 says "inject X at hook Y", the concrete injection path may live in the harness-native surface if that produces an equivalent effect. What matters is that the described information reaches the agent at the described moment — the delivery mechanism is consumer-local. Each bullet in §9 describes behavior the consumer implements in hook handler code — specifying what prompt context should be injected at the hook's firing moment. These specifications are authored for consumer developers; nexus-core does not inject §9 prose itself into LLM runtime context.
|
|
509
516
|
|
|
510
517
|
### Event mapping examples
|
|
511
518
|
|
|
512
|
-
Different harnesses expose these events under different names
|
|
513
|
-
|
|
514
|
-
- **(illustrative, non-normative)** **Claude Code**: `SessionStart`, `UserPromptSubmit`, `SubagentStart`, `SubagentStop`, `PreToolUse`, `PostToolUse`, `Stop`, `PostCompact`
|
|
515
|
-
- **OpenCode**: its own hook API names — map accordingly when building an OpenCode consumer
|
|
516
|
-
|
|
517
|
-
Identify the equivalent events in your harness's plugin system and implement the expected behaviors below.
|
|
519
|
+
Different harnesses expose these events under different names. Identify the equivalent events in your harness's plugin system and implement the expected behaviors below.
|
|
518
520
|
|
|
519
521
|
### 8 lifecycle events
|
|
520
522
|
|
|
@@ -564,7 +566,6 @@ Identify the equivalent events in your harness's plugin system and implement the
|
|
|
564
566
|
**Expected consumer behavior:**
|
|
565
567
|
- **MUST** update `.nexus/state/{harness-id}/agent-tracker.json`: set `status=completed`, record `stopped_at` timestamp.
|
|
566
568
|
- **MUST** 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.
|
|
567
|
-
- **MAY** maintain a separate `edit-tracker.json` for cross-session file-touch history, updating it here. This is not a nexus-core requirement; it is a harness-local optimization.
|
|
568
569
|
- **SHOULD** surface an unfinished-task warning when the stopping agent has tasks left in `pending` or `in_progress` state. This pattern is observed across consumers and aids recovery; the warning may be injected into Lead's context or surfaced as a reminder.
|
|
569
570
|
- **MAY** update the task status in `tasks.json` when the agent was assigned a specific task. Note: this responsibility may alternatively be fulfilled at the Lead or tool-contract layer rather than the hook surface.
|
|
570
571
|
|
|
@@ -590,8 +591,7 @@ Read-only tools (query tools, status reads) are never blocked by capability gate
|
|
|
590
591
|
**When it fires:** A tool call has completed and a result is available (harness runtime may expose this as `PostToolUse`, `tool.after`, a post-call interceptor, or equivalent).
|
|
591
592
|
|
|
592
593
|
**Expected consumer behavior:**
|
|
593
|
-
- **SHOULD** append a log entry to `.nexus/state/tool-log.jsonl`: timestamp, agent_id, tool name, file path (if a file was touched), result status. (This practice is observed across all consumers; nexus-core does not yet define a schema for this file —
|
|
594
|
-
- **MAY** record the file path and agent_id in `edit-tracker.json` if your harness maintains it for cross-session file-touch history. 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.
|
|
594
|
+
- **SHOULD** append a log entry to `.nexus/state/tool-log.jsonl`: timestamp, agent_id, tool name, file path (if a file was touched), result status. (This practice is observed across all consumers; nexus-core does not yet define a schema for this file — schema definition pending.)
|
|
595
595
|
- **MAY** record the error in the log for diagnostic purposes if the tool result indicates an error. Do not suppress error results.
|
|
596
596
|
|
|
597
597
|
---
|
|
@@ -625,18 +625,6 @@ Read-only tools (query tools, status reads) are never blocked by capability gate
|
|
|
625
625
|
|
|
626
626
|
---
|
|
627
627
|
|
|
628
|
-
### 9.X Appendix: Hook Event Runtime Mapping (consumer-owned)
|
|
629
|
-
|
|
630
|
-
Each consumer harness MUST publish a mapping document at `harness-content/nexus-hook-mapping.md` in its own repository, listing how its runtime hook surface maps to the 8 conceptual events in §9.
|
|
631
|
-
|
|
632
|
-
nexus-core does not mirror these mappings — they are owned and maintained per consumer. This appendix is a registry pointer, not a copy.
|
|
633
|
-
|
|
634
|
-
- **harness_docs_refs token**: `nexus_hook_mapping`
|
|
635
|
-
- **Expected location in consumer repo**: `harness-content/nexus-hook-mapping.md`
|
|
636
|
-
- **Descriptive, not normative**: the consumer mapping document reflects current harness implementation. Verify against the consumer repo for the current mapping — this appendix does not guarantee specific contents.
|
|
637
|
-
|
|
638
|
-
---
|
|
639
|
-
|
|
640
628
|
## 10. Subagent Orchestration Model
|
|
641
629
|
|
|
642
630
|
Subagent orchestration is the mechanism by which Lead delegates work to specialized agents. nexus-core specifies the behavioral contracts; the implementation mechanism is consumer-decided.
|
package/manifest.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
"nexus_core_version": "0.
|
|
3
|
-
"nexus_core_commit": "
|
|
2
|
+
"nexus_core_version": "0.12.0",
|
|
3
|
+
"nexus_core_commit": "f2aae4883f354d1d0e5ee06f163c96c2b0f9bea3",
|
|
4
4
|
"schema_contract_version": "2.0",
|
|
5
5
|
"agents": [
|
|
6
6
|
{
|
|
@@ -50,25 +50,10 @@
|
|
|
50
50
|
"body_hash": "sha256:3d58b1b490c2f93cace2eedd0f04ec000f84514388eb086768cf53f8fa33db01"
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
"name": "
|
|
54
|
-
"description": "
|
|
55
|
-
"task": "
|
|
56
|
-
"alias_ko": "
|
|
57
|
-
"category": "check",
|
|
58
|
-
"resume_tier": "ephemeral",
|
|
59
|
-
"model_tier": "standard",
|
|
60
|
-
"capabilities": [
|
|
61
|
-
"no_file_edit",
|
|
62
|
-
"no_task_create"
|
|
63
|
-
],
|
|
64
|
-
"id": "reviewer",
|
|
65
|
-
"body_hash": "sha256:f04d15249601b14046e7e40a4475defb289436c4474afbd89986964f8c3e7c2f"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"name": "strategist",
|
|
69
|
-
"description": "Business strategy — evaluates market positioning, competitive landscape, and business viability of decisions",
|
|
70
|
-
"task": "Business strategy, market analysis, competitive positioning",
|
|
71
|
-
"alias_ko": "전략가",
|
|
53
|
+
"name": "postdoc",
|
|
54
|
+
"description": "Research methodology and synthesis — designs investigation approach, evaluates evidence quality, writes synthesis documents",
|
|
55
|
+
"task": "Research methodology, evidence synthesis",
|
|
56
|
+
"alias_ko": "포닥",
|
|
72
57
|
"category": "how",
|
|
73
58
|
"resume_tier": "persistent",
|
|
74
59
|
"model_tier": "high",
|
|
@@ -77,8 +62,8 @@
|
|
|
77
62
|
"no_task_create",
|
|
78
63
|
"no_task_update"
|
|
79
64
|
],
|
|
80
|
-
"id": "
|
|
81
|
-
"body_hash": "sha256:
|
|
65
|
+
"id": "postdoc",
|
|
66
|
+
"body_hash": "sha256:da9b8c2568b8b5812abed6d6324139f814379d48dc63cdc5d0b5b263f5407814"
|
|
82
67
|
},
|
|
83
68
|
{
|
|
84
69
|
"name": "researcher",
|
|
@@ -96,10 +81,25 @@
|
|
|
96
81
|
"body_hash": "sha256:fc79bafec05503327bd51a0b84b6e642d304bd79c45b78db6448b112793c143e"
|
|
97
82
|
},
|
|
98
83
|
{
|
|
99
|
-
"name": "
|
|
100
|
-
"description": "
|
|
101
|
-
"task": "
|
|
102
|
-
"alias_ko": "
|
|
84
|
+
"name": "reviewer",
|
|
85
|
+
"description": "Content verification — validates accuracy, checks facts, confirms grammar and format of non-code deliverables",
|
|
86
|
+
"task": "Content verification, fact-checking, grammar review",
|
|
87
|
+
"alias_ko": "리뷰어",
|
|
88
|
+
"category": "check",
|
|
89
|
+
"resume_tier": "ephemeral",
|
|
90
|
+
"model_tier": "standard",
|
|
91
|
+
"capabilities": [
|
|
92
|
+
"no_file_edit",
|
|
93
|
+
"no_task_create"
|
|
94
|
+
],
|
|
95
|
+
"id": "reviewer",
|
|
96
|
+
"body_hash": "sha256:f04d15249601b14046e7e40a4475defb289436c4474afbd89986964f8c3e7c2f"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"name": "strategist",
|
|
100
|
+
"description": "Business strategy — evaluates market positioning, competitive landscape, and business viability of decisions",
|
|
101
|
+
"task": "Business strategy, market analysis, competitive positioning",
|
|
102
|
+
"alias_ko": "전략가",
|
|
103
103
|
"category": "how",
|
|
104
104
|
"resume_tier": "persistent",
|
|
105
105
|
"model_tier": "high",
|
|
@@ -108,8 +108,8 @@
|
|
|
108
108
|
"no_task_create",
|
|
109
109
|
"no_task_update"
|
|
110
110
|
],
|
|
111
|
-
"id": "
|
|
112
|
-
"body_hash": "sha256:
|
|
111
|
+
"id": "strategist",
|
|
112
|
+
"body_hash": "sha256:0254b4144a22c66209bd68119553d9057a4fb7f9b1ff7ebb9878687d99583465"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"name": "tester",
|
|
@@ -154,16 +154,6 @@
|
|
|
154
154
|
"id": "nx-init",
|
|
155
155
|
"body_hash": "sha256:b828a974ab4722dd7f1d15a4338d1380fdae47cd42c1bd4a5539277075efb6fc"
|
|
156
156
|
},
|
|
157
|
-
{
|
|
158
|
-
"name": "nx-sync",
|
|
159
|
-
"description": "Context knowledge synchronization — scans project state and updates .nexus/context/ design documents",
|
|
160
|
-
"summary": "Context knowledge synchronization",
|
|
161
|
-
"triggers": [
|
|
162
|
-
"sync"
|
|
163
|
-
],
|
|
164
|
-
"id": "nx-sync",
|
|
165
|
-
"body_hash": "sha256:3ee8dd780d53f2e04472de6c701e16bc1fbde7f2ce9ed4e680b7cd2010530a22"
|
|
166
|
-
},
|
|
167
157
|
{
|
|
168
158
|
"name": "nx-plan",
|
|
169
159
|
"description": "Structured multi-perspective analysis to decompose issues, align on decisions, and produce an enriched plan before execution. Plan only — does not execute.",
|
|
@@ -185,11 +175,20 @@
|
|
|
185
175
|
"run"
|
|
186
176
|
],
|
|
187
177
|
"harness_docs_refs": [
|
|
188
|
-
"resume_invocation"
|
|
189
|
-
"nexus_hook_mapping"
|
|
178
|
+
"resume_invocation"
|
|
190
179
|
],
|
|
191
180
|
"id": "nx-run",
|
|
192
181
|
"body_hash": "sha256:0e2c443efceeab4621709a85cd4e2ba50471d2e850680c655d776cbb62814549"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
"name": "nx-sync",
|
|
185
|
+
"description": "Context knowledge synchronization — scans project state and updates .nexus/context/ design documents",
|
|
186
|
+
"summary": "Context knowledge synchronization",
|
|
187
|
+
"triggers": [
|
|
188
|
+
"sync"
|
|
189
|
+
],
|
|
190
|
+
"id": "nx-sync",
|
|
191
|
+
"body_hash": "sha256:3ee8dd780d53f2e04472de6c701e16bc1fbde7f2ce9ed4e680b7cd2010530a22"
|
|
193
192
|
}
|
|
194
193
|
],
|
|
195
194
|
"vocabulary": {
|
package/package.json
CHANGED
package/scripts/lib/validate.ts
CHANGED
|
@@ -645,6 +645,7 @@ export async function generateManifest(
|
|
|
645
645
|
return { ...meta, body_hash };
|
|
646
646
|
})
|
|
647
647
|
);
|
|
648
|
+
agentEntries.sort((a, b) => a.id.localeCompare(b.id));
|
|
648
649
|
|
|
649
650
|
const skillEntries: ManifestSkill[] = await Promise.all(
|
|
650
651
|
skills.map(async ({ meta, dir }) => {
|
|
@@ -652,6 +653,7 @@ export async function generateManifest(
|
|
|
652
653
|
return { ...meta, body_hash };
|
|
653
654
|
})
|
|
654
655
|
);
|
|
656
|
+
skillEntries.sort((a, b) => a.id.localeCompare(b.id));
|
|
655
657
|
|
|
656
658
|
const invocationSummaries: ManifestInvocationEntry[] = vocab.invocations.map((inv) => ({
|
|
657
659
|
id: inv.id,
|