@moreih29/nexus-core 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -63
- package/assets/agents/architect/body.ko.md +177 -0
- package/{agents → assets/agents}/architect/body.md +16 -0
- package/assets/agents/designer/body.ko.md +125 -0
- package/{agents → assets/agents}/designer/body.md +16 -0
- package/assets/agents/engineer/body.ko.md +106 -0
- package/{agents → assets/agents}/engineer/body.md +14 -0
- package/assets/agents/lead/body.ko.md +70 -0
- package/assets/agents/lead/body.md +70 -0
- package/assets/agents/postdoc/body.ko.md +122 -0
- package/{agents → assets/agents}/postdoc/body.md +16 -0
- package/assets/agents/researcher/body.ko.md +137 -0
- package/{agents → assets/agents}/researcher/body.md +15 -0
- package/assets/agents/reviewer/body.ko.md +138 -0
- package/{agents → assets/agents}/reviewer/body.md +15 -0
- package/assets/agents/strategist/body.ko.md +116 -0
- package/{agents → assets/agents}/strategist/body.md +16 -0
- package/assets/agents/tester/body.ko.md +195 -0
- package/{agents → assets/agents}/tester/body.md +15 -0
- package/assets/agents/writer/body.ko.md +122 -0
- package/{agents → assets/agents}/writer/body.md +14 -0
- package/assets/capability-matrix.yml +198 -0
- package/assets/hooks/agent-bootstrap/handler.test.ts +368 -0
- package/assets/hooks/agent-bootstrap/handler.ts +119 -0
- package/assets/hooks/agent-bootstrap/meta.yml +10 -0
- package/assets/hooks/agent-finalize/handler.test.ts +368 -0
- package/assets/hooks/agent-finalize/handler.ts +76 -0
- package/assets/hooks/agent-finalize/meta.yml +10 -0
- package/assets/hooks/capability-matrix.yml +313 -0
- package/assets/hooks/post-tool-telemetry/handler.test.ts +302 -0
- package/assets/hooks/post-tool-telemetry/handler.ts +49 -0
- package/assets/hooks/post-tool-telemetry/meta.yml +11 -0
- package/assets/hooks/prompt-router/handler.test.ts +801 -0
- package/assets/hooks/prompt-router/handler.ts +261 -0
- package/assets/hooks/prompt-router/meta.yml +11 -0
- package/assets/hooks/session-init/handler.test.ts +274 -0
- package/assets/hooks/session-init/handler.ts +30 -0
- package/assets/hooks/session-init/meta.yml +9 -0
- package/assets/lsp-servers.json +55 -0
- package/assets/schema/lsp-servers.schema.json +67 -0
- package/assets/skills/nx-init/body.ko.md +197 -0
- package/{skills → assets/skills}/nx-init/body.md +11 -0
- package/assets/skills/nx-plan/body.ko.md +361 -0
- package/{skills → assets/skills}/nx-plan/body.md +13 -0
- package/assets/skills/nx-run/body.ko.md +161 -0
- package/{skills → assets/skills}/nx-run/body.md +11 -0
- package/assets/skills/nx-sync/body.ko.md +92 -0
- package/{skills → assets/skills}/nx-sync/body.md +10 -0
- package/assets/tools/tool-name-map.yml +353 -0
- package/dist/hooks/opencode-mount.d.ts +35 -0
- package/dist/hooks/opencode-mount.d.ts.map +1 -0
- package/dist/hooks/opencode-mount.js +332 -0
- package/dist/hooks/opencode-mount.js.map +1 -0
- package/dist/hooks/runtime.d.ts +37 -0
- package/dist/hooks/runtime.d.ts.map +1 -0
- package/dist/hooks/runtime.js +274 -0
- package/dist/hooks/runtime.js.map +1 -0
- package/dist/hooks/types.d.ts +196 -0
- package/dist/hooks/types.d.ts.map +1 -0
- package/dist/hooks/types.js +85 -0
- package/dist/hooks/types.js.map +1 -0
- package/dist/lsp/cache.d.ts +9 -0
- package/dist/lsp/cache.d.ts.map +1 -0
- package/dist/lsp/cache.js +216 -0
- package/dist/lsp/cache.js.map +1 -0
- package/dist/lsp/client.d.ts +24 -0
- package/dist/lsp/client.d.ts.map +1 -0
- package/dist/lsp/client.js +166 -0
- package/dist/lsp/client.js.map +1 -0
- package/dist/lsp/detect.d.ts +77 -0
- package/dist/lsp/detect.d.ts.map +1 -0
- package/dist/lsp/detect.js +116 -0
- package/dist/lsp/detect.js.map +1 -0
- package/dist/mcp/server.d.ts +5 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +34 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/tools/artifact.d.ts +4 -0
- package/dist/mcp/tools/artifact.d.ts.map +1 -0
- package/dist/mcp/tools/artifact.js +36 -0
- package/dist/mcp/tools/artifact.js.map +1 -0
- package/dist/mcp/tools/history.d.ts +3 -0
- package/dist/mcp/tools/history.d.ts.map +1 -0
- package/dist/mcp/tools/history.js +29 -0
- package/dist/mcp/tools/history.js.map +1 -0
- package/dist/mcp/tools/lsp.d.ts +13 -0
- package/dist/mcp/tools/lsp.d.ts.map +1 -0
- package/dist/mcp/tools/lsp.js +225 -0
- package/dist/mcp/tools/lsp.js.map +1 -0
- package/dist/mcp/tools/plan.d.ts +3 -0
- package/dist/mcp/tools/plan.d.ts.map +1 -0
- package/dist/mcp/tools/plan.js +317 -0
- package/dist/mcp/tools/plan.js.map +1 -0
- package/dist/mcp/tools/task.d.ts +3 -0
- package/dist/mcp/tools/task.d.ts.map +1 -0
- package/dist/mcp/tools/task.js +252 -0
- package/dist/mcp/tools/task.js.map +1 -0
- package/dist/shared/invocations.d.ts +74 -0
- package/dist/shared/invocations.d.ts.map +1 -0
- package/dist/shared/invocations.js +247 -0
- package/dist/shared/invocations.js.map +1 -0
- package/dist/shared/json-store.d.ts +37 -0
- package/dist/shared/json-store.d.ts.map +1 -0
- package/dist/shared/json-store.js +163 -0
- package/dist/shared/json-store.js.map +1 -0
- package/dist/shared/mcp-utils.d.ts +3 -0
- package/dist/shared/mcp-utils.d.ts.map +1 -0
- package/dist/shared/mcp-utils.js +6 -0
- package/dist/shared/mcp-utils.js.map +1 -0
- package/dist/shared/paths.d.ts +21 -0
- package/dist/shared/paths.d.ts.map +1 -0
- package/dist/shared/paths.js +81 -0
- package/dist/shared/paths.js.map +1 -0
- package/dist/shared/tool-log.d.ts +8 -0
- package/dist/shared/tool-log.d.ts.map +1 -0
- package/dist/shared/tool-log.js +22 -0
- package/dist/shared/tool-log.js.map +1 -0
- package/dist/types/state.d.ts +862 -0
- package/dist/types/state.d.ts.map +1 -0
- package/dist/types/state.js +66 -0
- package/dist/types/state.js.map +1 -0
- package/docs/consuming/codex-lead-merge.md +106 -0
- package/docs/plugin-guide.md +360 -0
- package/docs/plugin-template/claude/.github/workflows/build.yml +60 -0
- package/docs/plugin-template/claude/README.md +110 -0
- package/docs/plugin-template/claude/package.json +16 -0
- package/docs/plugin-template/codex/.github/workflows/build.yml +51 -0
- package/docs/plugin-template/codex/README.md +147 -0
- package/docs/plugin-template/codex/package.json +17 -0
- package/docs/plugin-template/opencode/.github/workflows/build.yml +61 -0
- package/docs/plugin-template/opencode/README.md +121 -0
- package/docs/plugin-template/opencode/package.json +25 -0
- package/package.json +21 -21
- package/scripts/build-agents.test.ts +1279 -0
- package/scripts/build-agents.ts +978 -0
- package/scripts/build-hooks.test.ts +1385 -0
- package/scripts/build-hooks.ts +584 -0
- package/scripts/cli.test.ts +367 -0
- package/scripts/cli.ts +547 -0
- package/agents/architect/meta.yml +0 -13
- package/agents/designer/meta.yml +0 -13
- package/agents/engineer/meta.yml +0 -11
- package/agents/postdoc/meta.yml +0 -13
- package/agents/researcher/meta.yml +0 -12
- package/agents/reviewer/meta.yml +0 -12
- package/agents/strategist/meta.yml +0 -13
- package/agents/tester/meta.yml +0 -12
- package/agents/writer/meta.yml +0 -11
- package/conformance/README.md +0 -311
- package/conformance/examples/plan.extension.schema.example.json +0 -25
- package/conformance/lifecycle/README.md +0 -48
- package/conformance/lifecycle/agent-complete.json +0 -44
- package/conformance/lifecycle/agent-resume.json +0 -43
- package/conformance/lifecycle/agent-spawn.json +0 -36
- package/conformance/lifecycle/memory-access-record.json +0 -27
- package/conformance/lifecycle/session-end.json +0 -48
- package/conformance/scenarios/full-plan-cycle.json +0 -147
- package/conformance/scenarios/task-deps-ordering.json +0 -95
- package/conformance/schema/fixture.schema.json +0 -354
- package/conformance/state-schemas/agent-tracker.schema.json +0 -63
- package/conformance/state-schemas/history.schema.json +0 -134
- package/conformance/state-schemas/memory-access.schema.json +0 -36
- package/conformance/state-schemas/plan.schema.json +0 -77
- package/conformance/state-schemas/tasks.schema.json +0 -98
- package/conformance/tools/artifact-write.json +0 -97
- package/conformance/tools/context.json +0 -172
- package/conformance/tools/history-search.json +0 -219
- package/conformance/tools/plan-decide.json +0 -139
- package/conformance/tools/plan-start.json +0 -81
- package/conformance/tools/plan-status.json +0 -127
- package/conformance/tools/plan-update.json +0 -341
- package/conformance/tools/task-add.json +0 -156
- package/conformance/tools/task-close.json +0 -161
- package/conformance/tools/task-list.json +0 -177
- package/conformance/tools/task-update.json +0 -167
- package/docs/behavioral-contracts.md +0 -145
- package/docs/consumer-implementation-guide.md +0 -840
- package/docs/memory-lifecycle-contract.md +0 -119
- package/docs/nexus-layout.md +0 -224
- package/docs/nexus-outputs-contract.md +0 -344
- package/docs/nexus-state-overview.md +0 -170
- package/docs/nexus-tools-contract.md +0 -438
- package/manifest.json +0 -448
- package/schema/README.md +0 -69
- package/schema/agent.schema.json +0 -23
- package/schema/common.schema.json +0 -17
- package/schema/manifest.schema.json +0 -78
- package/schema/memory-policy.schema.json +0 -98
- package/schema/skill.schema.json +0 -54
- package/schema/task-exceptions.schema.json +0 -40
- package/schema/vocabulary.schema.json +0 -167
- package/scripts/.gitkeep +0 -0
- package/scripts/conformance-coverage.ts +0 -466
- package/scripts/import-from-claude-nexus.ts +0 -403
- package/scripts/lib/frontmatter.ts +0 -71
- package/scripts/lib/lint.ts +0 -348
- package/scripts/lib/structure.ts +0 -159
- package/scripts/lib/validate.ts +0 -796
- package/scripts/validate.ts +0 -90
- package/skills/nx-init/meta.yml +0 -8
- package/skills/nx-plan/meta.yml +0 -10
- package/skills/nx-run/meta.yml +0 -8
- package/skills/nx-sync/meta.yml +0 -7
- package/vocabulary/capabilities.yml +0 -65
- package/vocabulary/categories.yml +0 -11
- package/vocabulary/invocations.yml +0 -147
- package/vocabulary/memory_policy.yml +0 -88
- package/vocabulary/resume-tiers.yml +0 -11
- package/vocabulary/tags.yml +0 -60
- package/vocabulary/task-exceptions.yml +0 -29
|
@@ -1,840 +0,0 @@
|
|
|
1
|
-
# Nexus Consumer Implementation Guide
|
|
2
|
-
|
|
3
|
-
**Version:** nexus-core 0.2.0
|
|
4
|
-
**Audience:** Developers building a Nexus consumer harness from scratch.
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Table of Contents
|
|
9
|
-
|
|
10
|
-
1. [Overview](#1-overview)
|
|
11
|
-
2. [Prerequisites](#2-prerequisites)
|
|
12
|
-
3. [Component Map and Build Order](#3-component-map-and-build-order)
|
|
13
|
-
4. [State File Management](#4-state-file-management)
|
|
14
|
-
5. [MCP Tool Implementation](#5-mcp-tool-implementation)
|
|
15
|
-
6. [Capability Handling](#6-capability-handling)
|
|
16
|
-
7. [Agent Catalog Construction](#7-agent-catalog-construction)
|
|
17
|
-
8. [Skill Activation Architecture](#8-skill-activation-architecture)
|
|
18
|
-
9. [Hook Event Lifecycle](#9-hook-event-lifecycle)
|
|
19
|
-
10. [Subagent Orchestration Model](#10-subagent-orchestration-model)
|
|
20
|
-
11. [Conformance Verification](#11-conformance-verification)
|
|
21
|
-
12. [Minimum Viable Consumer](#12-minimum-viable-consumer)
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## 1. Overview
|
|
26
|
-
|
|
27
|
-
A **Nexus consumer** is an execution-layer harness that reads nexus-core and orchestrates agents on behalf of the user. nexus-core is the authoring layer: it defines prompts, metadata, vocabulary, schemas, conformance fixtures, and documentation. The consumer is the runtime layer: it implements tool execution, spawns agents, enforces capability gates, and manages session state.
|
|
28
|
-
|
|
29
|
-
### What nexus-core provides
|
|
30
|
-
|
|
31
|
-
- **Agent prompts** — `agents/{id}/body.md`, harness-neutral behavioral specifications for each agent role
|
|
32
|
-
- **Skill prompts** — `skills/{id}/body.md`, full behavioral specifications for each skill
|
|
33
|
-
- **Metadata** — `agents/{id}/meta.yml` and `skills/{id}/meta.yml`, structured descriptions of each agent and skill
|
|
34
|
-
- **Manifest** — `manifest.json`, a single-file snapshot of all agents, skills, and vocabulary for the current version
|
|
35
|
-
- **Vocabulary** — `vocabulary/capabilities.yml`, `tags.yml`, `resume-tiers.yml`, `categories.yml`, abstract definitions of the Nexus semantic model
|
|
36
|
-
- **Schemas** — `schema/*.json`, JSON Schema definitions for all data structures
|
|
37
|
-
- **Conformance fixtures** — `conformance/tools/*.json` and `conformance/scenarios/*.json`, declarative behavioral tests
|
|
38
|
-
- **Documentation** — `docs/`, normative specifications for tools, state files, layout, and behavioral contracts
|
|
39
|
-
|
|
40
|
-
### What the consumer builds
|
|
41
|
-
|
|
42
|
-
- **Runtime orchestration** — session start/end logic, cycle management, state file creation and cleanup
|
|
43
|
-
- **Tool implementation** — concrete implementations of the 11 abstract Nexus tools
|
|
44
|
-
- **Hook system** — lifecycle event handlers that fire at well-defined points in the session
|
|
45
|
-
- **Capability mapping** — a local file that translates abstract capability IDs to concrete disallowed tools in your harness
|
|
46
|
-
- **Agent catalog** — your harness's agent registration, populated from nexus-core agent definitions
|
|
47
|
-
- **Skill dispatcher** — tag detection and skill body injection
|
|
48
|
-
- **Subagent orchestration** — spawn, context injection, resume evaluation, result collection
|
|
49
|
-
- **UI integration** — your harness's plugin registration, command system, and inter-process communication
|
|
50
|
-
|
|
51
|
-
### How to use this guide
|
|
52
|
-
|
|
53
|
-
Read this guide cover to cover before writing any code. The sections are ordered by build dependency: later sections assume the structures established by earlier ones. Jumping ahead and implementing subagent orchestration before state file management or tool implementation is defined will produce integration failures that are difficult to diagnose.
|
|
54
|
-
|
|
55
|
-
Cross-reference the normative specifications linked throughout. This guide describes what to build and in what order; the linked documents define the precise contracts your implementation must satisfy.
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## 2. Prerequisites
|
|
60
|
-
|
|
61
|
-
### Package installation
|
|
62
|
-
|
|
63
|
-
Install nexus-core as a development dependency. It is not shipped to end users — it is consumed at build time by your harness.
|
|
64
|
-
|
|
65
|
-
```
|
|
66
|
-
npm install --save-dev @moreih29/nexus-core
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
After installation, the package is available at `node_modules/@moreih29/nexus-core/`. All paths in this guide referencing nexus-core files resolve from that root.
|
|
70
|
-
|
|
71
|
-
### Knowledge prerequisites
|
|
72
|
-
|
|
73
|
-
Before building a consumer, you must be familiar with:
|
|
74
|
-
|
|
75
|
-
1. **Your harness's plugin system** — how to register tools that the LLM can call, how hooks are declared and fire, and how to inject content into the LLM's context (system prompt, tool response, or user message prefix).
|
|
76
|
-
2. **Your harness's agent/subprocess model** — how to spawn an isolated LLM session, how to pass initial context, and how to receive the result.
|
|
77
|
-
3. **JSON and YAML** — all nexus-core metadata files are YAML or JSON; all state files are JSON.
|
|
78
|
-
|
|
79
|
-
### Primary entry points
|
|
80
|
-
|
|
81
|
-
Begin your implementation by reading these files in order:
|
|
82
|
-
|
|
83
|
-
1. `manifest.json` — the complete catalog of agents, skills, and vocabulary for the installed version. This is your primary lookup source; most implementation tasks start here.
|
|
84
|
-
2. `docs/nexus-tools-contract.md` — normative specifications for all 11 tools: parameters, return values, side effects, and error conditions. Read this before implementing any tool.
|
|
85
|
-
3. `docs/nexus-state-overview.md` — lifecycle and tool access table for every state file.
|
|
86
|
-
4. `docs/nexus-layout.md` — the canonical `.nexus/` directory structure your harness must create.
|
|
87
|
-
5. `docs/behavioral-contracts.md` — state machines, permission model, resume tier semantics, and the `manual_only` contract.
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## 3. Component Map and Build Order
|
|
92
|
-
|
|
93
|
-
A complete Nexus consumer comprises nine components. They have hard dependencies: some components cannot be implemented until others are in place. Build them in the order shown.
|
|
94
|
-
|
|
95
|
-
### Components
|
|
96
|
-
|
|
97
|
-
| # | Component | Description |
|
|
98
|
-
|---|-----------|-------------|
|
|
99
|
-
| 1 | `.nexus/` Directory Initialization | Create the required directory tree and `.gitignore` at session start |
|
|
100
|
-
| 2 | State File Management | Read/write plan.json, tasks.json, history.json, agent-tracker.json |
|
|
101
|
-
| 3 | MCP Tool Implementation | Concrete implementations of the 11 abstract Nexus tools |
|
|
102
|
-
| 4 | Capability Mapping | Local file translating abstract capability IDs to concrete disallowed tools |
|
|
103
|
-
| 5 | Agent Catalog | Load nexus-core agents, apply capability-map, register with harness |
|
|
104
|
-
| 6 | Skill Dispatcher | Detect bracket tags, load skill body.md, inject into LLM context |
|
|
105
|
-
| 7 | Hook/Gate System | Lifecycle event handlers: session_start, user_message, pre_tool_use, etc. |
|
|
106
|
-
| 8 | Subagent Orchestration | Spawn isolated LLM sessions, pass context, collect results, evaluate resume |
|
|
107
|
-
| 9 | Conformance Verification | Run fixtures against your tool implementations to verify interoperability |
|
|
108
|
-
|
|
109
|
-
### Dependency graph
|
|
110
|
-
|
|
111
|
-
```
|
|
112
|
-
Directory Init → State File Mgmt → MCP Tools → Capability Mapping
|
|
113
|
-
→ Agent Catalog → Skill Dispatcher
|
|
114
|
-
→ Hook/Gate System → Subagent Orchestration
|
|
115
|
-
→ Conformance Verification
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
**Directory Init** must precede everything: state files cannot be written if the directory does not exist.
|
|
119
|
-
|
|
120
|
-
**State File Management** must precede tool implementation: tools read and write specific files at specific paths. Without knowing the file layout, tool implementation cannot be completed.
|
|
121
|
-
|
|
122
|
-
**MCP Tools** must precede Capability Mapping, Agent Catalog, and Hook/Gate: the capability-map is only useful once the tools it restricts are implemented; the agent catalog is validated against the tool set; hooks reference both.
|
|
123
|
-
|
|
124
|
-
**Capability Mapping** must precede Agent Catalog: effective capabilities are computed by merging canonical capabilities with consumer additions, and that merge requires the capability-map to be defined.
|
|
125
|
-
|
|
126
|
-
**Agent Catalog** must precede Skill Dispatcher: the dispatcher injects skill body alongside agent context; the agent registration format must exist first.
|
|
127
|
-
|
|
128
|
-
**Hook/Gate System** must precede Subagent Orchestration: hooks fire during agent spawn and completion; the hook contracts must be defined before the orchestration logic can reference them.
|
|
129
|
-
|
|
130
|
-
**Subagent Orchestration** must precede Conformance Verification: end-to-end scenario fixtures test the full lifecycle, including agent spawning.
|
|
131
|
-
|
|
132
|
-
### Build order within components
|
|
133
|
-
|
|
134
|
-
Within MCP Tools, implement in this recommended order:
|
|
135
|
-
|
|
136
|
-
1. `plan_start`, `plan_decide` — the core planning pair; all planning workflows depend on them
|
|
137
|
-
2. `plan_status`, `plan_update` — planning query and mutation
|
|
138
|
-
3. `task_add`, `task_list`, `task_update`, `task_close` — execution lifecycle
|
|
139
|
-
4. `history_search`, `context`, `artifact_write` — support and reporting
|
|
140
|
-
|
|
141
|
-
This order matches the dependency chain within the planning/execution lifecycle. Implement and test each tool against its conformance fixtures before moving to the next.
|
|
142
|
-
|
|
143
|
-
---
|
|
144
|
-
|
|
145
|
-
## 4. State File Management
|
|
146
|
-
|
|
147
|
-
Nexus state is split into two categories with different scopes, persistence, and git-tracking rules. Your implementation must respect these boundaries exactly.
|
|
148
|
-
|
|
149
|
-
### Two-category model
|
|
150
|
-
|
|
151
|
-
**Session-scoped state** lives in `.nexus/state/`. It is created at session start, updated throughout the session, and deleted at session end or cycle close. It must never be git-tracked. Your `.nexus/.gitignore` must contain `state/` to enforce this.
|
|
152
|
-
|
|
153
|
-
**Project-scoped content** lives directly under `.nexus/` (outside `state/`). It persists across sessions and git branches. It is git-tracked and committed to the repository.
|
|
154
|
-
|
|
155
|
-
### Directory tree
|
|
156
|
-
|
|
157
|
-
```
|
|
158
|
-
.nexus/
|
|
159
|
-
├── state/ ← session-scoped (not git-tracked)
|
|
160
|
-
│ ├── plan.json
|
|
161
|
-
│ ├── tasks.json
|
|
162
|
-
│ ├── tool-log.jsonl
|
|
163
|
-
│ ├── artifacts/
|
|
164
|
-
│ └── {harness-id}/ ← harness namespace (see §Harness-local State Extension)
|
|
165
|
-
│ └── agent-tracker.json
|
|
166
|
-
├── history.json ← project-scoped (git-tracked, append-only)
|
|
167
|
-
├── memory/ ← project-scoped (git-tracked)
|
|
168
|
-
│ └── *.md
|
|
169
|
-
├── context/ ← project-scoped (git-tracked, nx-sync managed)
|
|
170
|
-
│ └── *.md
|
|
171
|
-
├── rules/ ← project-scoped (git-tracked, user-defined)
|
|
172
|
-
│ └── *.md
|
|
173
|
-
└── .gitignore
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### Initialization sequence
|
|
177
|
-
|
|
178
|
-
At session start, your harness must:
|
|
179
|
-
|
|
180
|
-
1. Create `.nexus/` if it does not exist.
|
|
181
|
-
2. Create `.nexus/state/` if it does not exist.
|
|
182
|
-
3. Write `.nexus/.gitignore` with content `state/` if the file does not exist.
|
|
183
|
-
4. Create `.nexus/state/{harness-id}/` if it does not exist, then initialize `.nexus/state/{harness-id}/agent-tracker.json` as an empty array `[]`. (`{harness-id}` is the last segment of your npm package name; see [nexus-outputs-contract.md §Shared filename convention](./nexus-outputs-contract.md) for the namespace convention.)
|
|
184
|
-
5. Check for stale state files from a prior crashed session. If `plan.json` or `tasks.json` exist without a running session, warn the user that a previous session may not have closed cleanly.
|
|
185
|
-
|
|
186
|
-
### Key state files
|
|
187
|
-
|
|
188
|
-
| File | Scope | Git-tracked | Created by | Deleted by |
|
|
189
|
-
|------|-------|------------|------------|------------|
|
|
190
|
-
| `state/plan.json` | Session | No | `plan_start` tool | `task_close` tool |
|
|
191
|
-
| `state/tasks.json` | Session | No | `task_add` tool (first call) | `task_close` tool |
|
|
192
|
-
| `state/{harness-id}/agent-tracker.json` | Session | No | session_start hook | session_end hook |
|
|
193
|
-
| `state/tool-log.jsonl` | Session | No | post_tool_use hook | session_end hook |
|
|
194
|
-
| `history.json` | Project | Yes | `plan_start` or `task_close` (first archive) | Never |
|
|
195
|
-
|
|
196
|
-
### Schema validation
|
|
197
|
-
|
|
198
|
-
JSON Schema definitions for all state files are available in `conformance/state-schemas/`. The schemas cover `plan.json`, `tasks.json`, `history.json`, and `agent-tracker.json`. Validate state files against these schemas in your test suite.
|
|
199
|
-
|
|
200
|
-
For full lifecycle and tool access details, see [nexus-state-overview.md](./nexus-state-overview.md) and [nexus-layout.md](./nexus-layout.md).
|
|
201
|
-
|
|
202
|
-
---
|
|
203
|
-
|
|
204
|
-
## 5. MCP Tool Implementation
|
|
205
|
-
|
|
206
|
-
The 11 Nexus abstract tools are the interface between the LLM and Nexus state. Your harness implements each one concretely. nexus-core specifies behavior; you choose the registration name, prefix, and implementation mechanism.
|
|
207
|
-
|
|
208
|
-
### The 11 abstract tool names
|
|
209
|
-
|
|
210
|
-
| Abstract name | Function |
|
|
211
|
-
|---------------|----------|
|
|
212
|
-
| `plan_start` | Create a new planning session |
|
|
213
|
-
| `plan_status` | Query the current plan state |
|
|
214
|
-
| `plan_update` | Add, remove, edit, or reopen plan issues |
|
|
215
|
-
| `plan_decide` | Record a decision on a plan issue |
|
|
216
|
-
| `task_add` | Add a task to the active task list |
|
|
217
|
-
| `task_list` | List tasks with dependency-aware ready set |
|
|
218
|
-
| `task_update` | Update a task's status |
|
|
219
|
-
| `task_close` | Archive the current cycle to history.json and delete session state files |
|
|
220
|
-
| `history_search` | Search past cycles in history.json |
|
|
221
|
-
| `context` | Read active session context (branch, task summary, decisions) |
|
|
222
|
-
| `artifact_write` | Write a named artifact file to the session artifact directory |
|
|
223
|
-
|
|
224
|
-
### Tool naming
|
|
225
|
-
|
|
226
|
-
nexus-core uses abstract names only. Your harness chooses its own registration names. For example, a harness might register `plan_start` as `nx_plan_start`, or a plugin system might prefix it as `mcp__plugin_name_nx__plan_start`. The name you use internally is your decision. The behavioral contract — parameters, return values, side effects, error conditions — is fixed by nexus-core and must not vary.
|
|
227
|
-
|
|
228
|
-
### Implementation contract
|
|
229
|
-
|
|
230
|
-
For every tool, implement exactly the parameter schema, return shape, and side effects documented in [nexus-tools-contract.md](./nexus-tools-contract.md). Do not add undocumented parameters or return fields that callers may depend on. Do not omit required return fields.
|
|
231
|
-
|
|
232
|
-
Specific requirements to enforce:
|
|
233
|
-
|
|
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.
|
|
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.
|
|
236
|
-
- `artifact_write`: create `.nexus/state/artifacts/` on demand if it does not exist. Do not require the directory to pre-exist.
|
|
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.
|
|
238
|
-
|
|
239
|
-
### Implementation order
|
|
240
|
-
|
|
241
|
-
Implement in this sequence:
|
|
242
|
-
|
|
243
|
-
1. `plan_start`, `plan_decide` — validates state file management; these are the most frequently tested tools
|
|
244
|
-
2. `plan_status`, `plan_update` — complete the planning surface
|
|
245
|
-
3. `task_add`, `task_list`, `task_update`, `task_close` — execution lifecycle; `task_close` is the cleanup path
|
|
246
|
-
4. `history_search`, `context`, `artifact_write` — support tools; implement after the core tools are passing conformance
|
|
247
|
-
|
|
248
|
-
After each tool pair, run the relevant fixtures from `conformance/tools/` before continuing.
|
|
249
|
-
|
|
250
|
-
For full parameter schemas, return value shapes, and error conditions, see [nexus-tools-contract.md](./nexus-tools-contract.md).
|
|
251
|
-
|
|
252
|
-
---
|
|
253
|
-
|
|
254
|
-
## 6. Capability Handling
|
|
255
|
-
|
|
256
|
-
Capabilities restrict which tools a subagent may call. nexus-core defines capabilities in abstract semantic terms. Your harness translates them into concrete tool blocklists.
|
|
257
|
-
|
|
258
|
-
### Canonical capability definitions
|
|
259
|
-
|
|
260
|
-
Read `vocabulary/capabilities.yml`. Each capability has:
|
|
261
|
-
|
|
262
|
-
- `id` — the canonical identifier (e.g., `no_file_edit`)
|
|
263
|
-
- `intent` — a machine-readable semantic class (e.g., `workspace_write_denial`)
|
|
264
|
-
- `blocks_semantic_classes` — the list of semantic operation classes this capability forbids
|
|
265
|
-
- `prose_guidance` — a human-readable description of exactly which tool behaviors are blocked and which are not
|
|
266
|
-
|
|
267
|
-
The four canonical capabilities in nexus-core 0.2.0:
|
|
268
|
-
|
|
269
|
-
| ID | Intent | Blocks |
|
|
270
|
-
|----|--------|--------|
|
|
271
|
-
| `no_file_edit` | `workspace_write_denial` | `file_creation`, `file_modification`, `file_deletion`, `partial_file_edit`, `structured_document_edit` |
|
|
272
|
-
| `no_task_create` | `task_pipeline_append_denial` | `nexus_task_creation` |
|
|
273
|
-
| `no_task_update` | `task_pipeline_mutate_denial` | `nexus_task_state_transition`, `nexus_task_metadata_modification` |
|
|
274
|
-
| `no_shell_exec` | `shell_execution_denial` | `shell_command_exec`, `subprocess_spawn`, `interactive_shell_session` |
|
|
275
|
-
|
|
276
|
-
### Local capability-map
|
|
277
|
-
|
|
278
|
-
Create a consumer-owned capability-map file that translates each capability ID and semantic class to the concrete tool names in your harness. The format is your choice; the following YAML structure is a workable pattern:
|
|
279
|
-
|
|
280
|
-
```yaml
|
|
281
|
-
# capability-map.yml (consumer-owned, not part of nexus-core)
|
|
282
|
-
no_file_edit:
|
|
283
|
-
disallowed_tools:
|
|
284
|
-
- YourEditTool
|
|
285
|
-
- YourWriteTool
|
|
286
|
-
- YourDeleteTool
|
|
287
|
-
- YourPatchTool
|
|
288
|
-
- YourNotebookCellEditTool
|
|
289
|
-
mapped_classes:
|
|
290
|
-
- file_creation
|
|
291
|
-
- file_modification
|
|
292
|
-
- file_deletion
|
|
293
|
-
- partial_file_edit
|
|
294
|
-
- structured_document_edit
|
|
295
|
-
|
|
296
|
-
no_task_create:
|
|
297
|
-
disallowed_tools:
|
|
298
|
-
- YourTaskAddTool # your harness's concrete registration name for task_add
|
|
299
|
-
mapped_classes:
|
|
300
|
-
- nexus_task_creation
|
|
301
|
-
|
|
302
|
-
no_task_update:
|
|
303
|
-
disallowed_tools:
|
|
304
|
-
- YourTaskUpdateTool # your harness's concrete registration name for task_update
|
|
305
|
-
- YourTaskCloseTool # your harness's concrete registration name for task_close
|
|
306
|
-
mapped_classes:
|
|
307
|
-
- nexus_task_state_transition
|
|
308
|
-
- nexus_task_metadata_modification
|
|
309
|
-
|
|
310
|
-
no_shell_exec:
|
|
311
|
-
disallowed_tools:
|
|
312
|
-
- YourShellTool
|
|
313
|
-
- YourSubprocessTool
|
|
314
|
-
mapped_classes:
|
|
315
|
-
- shell_command_exec
|
|
316
|
-
- subprocess_spawn
|
|
317
|
-
- interactive_shell_session
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
### Effective capability computation
|
|
321
|
-
|
|
322
|
-
When building an agent's effective restriction set, apply the additive-only merge rule defined in [behavioral-contracts.md §4](./behavioral-contracts.md):
|
|
323
|
-
|
|
324
|
-
```
|
|
325
|
-
effective_capabilities(agent) = canonical_capabilities(agent) ∪ consumer_additions(agent)
|
|
326
|
-
```
|
|
327
|
-
|
|
328
|
-
- `canonical_capabilities` is the `capabilities` array in `agents/{id}/meta.yml` (the nexus-core definition).
|
|
329
|
-
- `consumer_additions` is a harness-local set you define for agents where you want stricter restrictions.
|
|
330
|
-
|
|
331
|
-
**You may add capabilities. You must not remove canonical capabilities.** Removing `no_file_edit` from an agent that carries it canonically violates the nexus-core design intent. If nexus-core later adds a capability that your consumer already applies locally, the overlap is harmless — the union is idempotent.
|
|
332
|
-
|
|
333
|
-
### Applying the capability-map
|
|
334
|
-
|
|
335
|
-
When registering an agent for a subagent session:
|
|
336
|
-
|
|
337
|
-
1. Read the agent's `capabilities` array from `manifest.json` or `agents/{id}/meta.yml`.
|
|
338
|
-
2. Merge with any consumer additions for that agent ID.
|
|
339
|
-
3. For each capability in the merged set, look up `disallowed_tools` in your capability-map.
|
|
340
|
-
4. Build the union of all disallowed tools across all capabilities.
|
|
341
|
-
5. Pass this union to your harness's agent-registration mechanism as the set of tools the agent may not call.
|
|
342
|
-
|
|
343
|
-
### CI coverage assertion
|
|
344
|
-
|
|
345
|
-
In your test suite, verify that every `blocks_semantic_classes` value across all entries in `vocabulary/capabilities.yml` has at least one mapped tool in your capability-map. This catches omissions when nexus-core adds new semantic classes in a future version.
|
|
346
|
-
|
|
347
|
-
---
|
|
348
|
-
|
|
349
|
-
## 7. Agent Catalog Construction
|
|
350
|
-
|
|
351
|
-
The agent catalog is your harness's internal registry of all Nexus agent roles, populated from nexus-core agent definitions and augmented with harness-specific context.
|
|
352
|
-
|
|
353
|
-
### Reading agent definitions
|
|
354
|
-
|
|
355
|
-
Start with `manifest.json`. The `agents` array contains one entry per agent role with these fields:
|
|
356
|
-
|
|
357
|
-
| Field | Type | Description |
|
|
358
|
-
|-------|------|-------------|
|
|
359
|
-
| `id` | string | Canonical agent identifier (e.g., `engineer`) |
|
|
360
|
-
| `name` | string | Display name |
|
|
361
|
-
| `description` | string | One-line role description |
|
|
362
|
-
| `category` | `"how" \| "do" \| "check"` | Role category |
|
|
363
|
-
| `resume_tier` | `"persistent" \| "bounded" \| "ephemeral"` | Session persistence behavior |
|
|
364
|
-
| `model_tier` | `"high" \| "standard"` | Abstract model selection signal |
|
|
365
|
-
| `capabilities` | `string[]` | Canonical capability IDs |
|
|
366
|
-
| `body_hash` | string | SHA-256 hash of body.md for integrity verification |
|
|
367
|
-
|
|
368
|
-
For full metadata, read `agents/{id}/meta.yml`. For the agent's prompt content, read `agents/{id}/body.md`.
|
|
369
|
-
|
|
370
|
-
### Transformation pipeline
|
|
371
|
-
|
|
372
|
-
For each agent in `manifest.json`:
|
|
373
|
-
|
|
374
|
-
1. **Read body.md** from `agents/{id}/body.md`. This is the prompt you will inject into the agent's LLM context.
|
|
375
|
-
2. **Compute effective_capabilities** by merging canonical capabilities with your consumer additions (see §6).
|
|
376
|
-
3. **Resolve disallowed tools** by applying your capability-map to `effective_capabilities`.
|
|
377
|
-
4. **Map model_tier** to a concrete model identifier: `high` → your harness's high-capability model, `standard` → your harness's standard model. This mapping is consumer-owned.
|
|
378
|
-
5. **Register** the agent in your harness's agent system with the resolved prompt, model, and tool restrictions.
|
|
379
|
-
|
|
380
|
-
### Neutral body + harness context synthesis
|
|
381
|
-
|
|
382
|
-
`body.md` is deliberately harness-neutral. It says things like "report to Lead" without specifying the concrete mechanism. This is intentional: the same body works across claude-nexus and opencode-nexus because each harness injects the mechanism alongside the body.
|
|
383
|
-
|
|
384
|
-
Your harness must inject harness-specific tool awareness when activating an agent. Concretely:
|
|
385
|
-
|
|
386
|
-
- body.md says: "report to Lead"
|
|
387
|
-
- Your harness injects alongside it: "To report to Lead, use [your harness's inter-agent communication tool]."
|
|
388
|
-
|
|
389
|
-
- body.md says: "save your output using the artifact tool"
|
|
390
|
-
- Your harness injects alongside it: "The artifact tool in this harness is registered as [your concrete tool name]."
|
|
391
|
-
|
|
392
|
-
The `harness_docs_refs` field in `skills/{id}/meta.yml` signals which harness-specific topics should be surfaced when injecting context for that skill. For example, `nx-plan` and `nx-run` both declare `harness_docs_refs: [resume_invocation]` — meaning your harness should inject documentation about how agent resume works in your specific system when those skills are active.
|
|
393
|
-
|
|
394
|
-
### Nine agent roles
|
|
395
|
-
|
|
396
|
-
nexus-core 0.2.0 defines these nine agents:
|
|
397
|
-
|
|
398
|
-
| ID | Category | Resume tier | Canonical capabilities |
|
|
399
|
-
|----|----------|-------------|------------------------|
|
|
400
|
-
| `architect` | how | persistent | no_file_edit, no_task_create, no_task_update |
|
|
401
|
-
| `designer` | how | persistent | no_file_edit, no_task_create, no_task_update |
|
|
402
|
-
| `postdoc` | how | persistent | no_file_edit, no_task_create, no_task_update |
|
|
403
|
-
| `strategist` | how | persistent | no_file_edit, no_task_create, no_task_update |
|
|
404
|
-
| `engineer` | do | bounded | no_task_create |
|
|
405
|
-
| `writer` | do | bounded | no_task_create |
|
|
406
|
-
| `researcher` | do | persistent | no_file_edit, no_task_create |
|
|
407
|
-
| `tester` | check | ephemeral | no_file_edit, no_task_create |
|
|
408
|
-
| `reviewer` | check | ephemeral | no_file_edit, no_task_create |
|
|
409
|
-
|
|
410
|
-
All nine roles must be registered in your catalog. A consumer that omits an agent prevents Lead from using that role in plans and run cycles.
|
|
411
|
-
|
|
412
|
-
---
|
|
413
|
-
|
|
414
|
-
## 8. Skill Activation Architecture
|
|
415
|
-
|
|
416
|
-
Skills are behavioral specifications that change how Lead operates. Skill activation transforms the LLM's operating mode by injecting a new body.md as its primary instruction set. The activation flow has six stages.
|
|
417
|
-
|
|
418
|
-
### Full activation flow
|
|
419
|
-
|
|
420
|
-
```
|
|
421
|
-
User types "[plan] analyze the architecture"
|
|
422
|
-
|
|
|
423
|
-
v
|
|
424
|
-
1. Tag Detection
|
|
425
|
-
- The consumer's user_message hook (or equivalent) intercepts the message
|
|
426
|
-
- Scan the message text for bracket tag patterns defined in vocabulary/tags.yml
|
|
427
|
-
- "[plan]" matches: id=plan, type=skill, skill=nx-plan
|
|
428
|
-
|
|
|
429
|
-
v
|
|
430
|
-
2. Routing by type
|
|
431
|
-
- type=skill → proceed to skill body loading (step 3)
|
|
432
|
-
- type=inline_action → call the handler tool directly; do not load a skill body
|
|
433
|
-
Example: "[d]" → call plan_decide tool immediately
|
|
434
|
-
|
|
|
435
|
-
v
|
|
436
|
-
3. Skill Body Loading
|
|
437
|
-
- Read skills/{skill_id}/body.md from the nexus-core package
|
|
438
|
-
- This file is the skill's complete behavioral specification
|
|
439
|
-
- Also read skills/{skill_id}/meta.yml to check for harness_docs_refs
|
|
440
|
-
|
|
|
441
|
-
v
|
|
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.
|
|
455
|
-
- Also inject harness-specific context for any harness_docs_refs declared in meta.yml
|
|
456
|
-
- The body.md content BECOMES the LLM's operating instructions for this skill
|
|
457
|
-
|
|
|
458
|
-
v
|
|
459
|
-
5. Skill Active State
|
|
460
|
-
- Skill remains active until one of:
|
|
461
|
-
a. Session ends — all skills deactivate
|
|
462
|
-
b. Another skill is activated — replacement (e.g., [plan] → [run] transition)
|
|
463
|
-
c. The skill's own deactivation condition is met
|
|
464
|
-
Example: nx-plan completes (all issues decided) → user types [run] to transition
|
|
465
|
-
- While active, the skill's body governs Lead's behavior
|
|
466
|
-
|
|
|
467
|
-
v
|
|
468
|
-
6. manual_only Handling
|
|
469
|
-
- Before exposing skills to LLM natural-language detection, check meta.yml
|
|
470
|
-
- If manual_only=true: NEVER include in auto-detection candidate list
|
|
471
|
-
- Only activate on explicit user trigger: slash command or bracket tag typed by user
|
|
472
|
-
- Applies to: nx-init, nx-setup in nexus-core 0.2.0
|
|
473
|
-
- See: behavioral-contracts.md §6
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
### Tag variants
|
|
477
|
-
|
|
478
|
-
Tags may include variant suffixes. The `variants` field in `vocabulary/tags.yml` lists valid variant tokens for each tag.
|
|
479
|
-
|
|
480
|
-
Example: `plan` has `variants: ["auto"]`. This means `[plan:auto]` is a valid trigger that activates the same `nx-plan` skill but passes `auto` as a mode flag. Your consumer must:
|
|
481
|
-
|
|
482
|
-
1. Detect `[plan:auto]` as a variant of the `plan` tag.
|
|
483
|
-
2. Activate the same `nx-plan` skill body.
|
|
484
|
-
3. Pass the variant string (`auto`) to the skill activation logic as an argument or injected parameter.
|
|
485
|
-
|
|
486
|
-
The `rule` tag has `variants: ["*"]`, meaning any suffix is valid: `[rule:frontend]`, `[rule:testing]`, etc. Capture the suffix and pass it to the `rule_store` handler.
|
|
487
|
-
|
|
488
|
-
### Inline actions
|
|
489
|
-
|
|
490
|
-
Tags with `type=inline_action` do not load a skill body. They trigger a direct tool call.
|
|
491
|
-
|
|
492
|
-
| Tag | Handler | Effect |
|
|
493
|
-
|-----|---------|--------|
|
|
494
|
-
| `[d]` | `nx_plan_decide` | Immediately calls plan_decide with the user's decision text |
|
|
495
|
-
| `[m]` | `memory_store` | Stores the current lesson to `.nexus/memory/` |
|
|
496
|
-
| `[m:gc]` | `memory_gc` | Garbage-collects `.nexus/memory/` |
|
|
497
|
-
| `[rule]` | `rule_store` | Stores a rule to `.nexus/rules/` |
|
|
498
|
-
|
|
499
|
-
For inline actions, extract the relevant content from the user's message (the text following the tag) and pass it as the tool parameter. No skill body is loaded; no LLM mode change occurs.
|
|
500
|
-
|
|
501
|
-
### Natural-language trigger detection
|
|
502
|
-
|
|
503
|
-
Natural-language trigger detection — recognizing that a user's message implies a skill activation even without a bracket tag — is **consumer-owned**. nexus-core does not define, distribute, or maintain natural-language pattern lists.
|
|
504
|
-
|
|
505
|
-
The canonical trigger for every tag is the explicit bracket form in `vocabulary/tags.yml`. Any other activation form (recognizing "let's plan this" as equivalent to `[plan]`) is a consumer extension. Different consumers may implement different patterns. This divergence is explicitly acceptable per [behavioral-contracts.md §7](./behavioral-contracts.md).
|
|
506
|
-
|
|
507
|
-
---
|
|
508
|
-
|
|
509
|
-
## 9. Hook Event Lifecycle
|
|
510
|
-
|
|
511
|
-
Hooks are the consumer's mechanism for responding to lifecycle events. nexus-core defines 8 abstract events. The names are harness-neutral; each harness maps them to its own event API.
|
|
512
|
-
|
|
513
|
-
### Relationship to harness-native knowledge surfaces
|
|
514
|
-
|
|
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.
|
|
516
|
-
|
|
517
|
-
### Event mapping examples
|
|
518
|
-
|
|
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.
|
|
520
|
-
|
|
521
|
-
### 8 lifecycle events
|
|
522
|
-
|
|
523
|
-
#### `session_start`
|
|
524
|
-
|
|
525
|
-
**When it fires:** A new agent session begins (harness runtime may expose this as `SessionStart`, `session.created`, an init hook, or equivalent).
|
|
526
|
-
|
|
527
|
-
**Expected consumer behavior:**
|
|
528
|
-
- **SHOULD** create `.nexus/` and `.nexus/state/` directories if they do not exist.
|
|
529
|
-
- **SHOULD** write `.nexus/.gitignore` with `state/` if it does not exist.
|
|
530
|
-
- **MUST** create `.nexus/state/{harness-id}/` if it does not exist, then initialize `.nexus/state/{harness-id}/agent-tracker.json` as `[]`. `agent-tracker.json` is a shared-purpose session file whose path is namespaced per harness to prevent cross-harness collisions (see [nexus-outputs-contract.md §Shared filename convention](./nexus-outputs-contract.md)).
|
|
531
|
-
- On v0.7.0+, harnesses **SHOULD** silently remove any legacy `.nexus/state/agent-tracker.json` (root) at session start. The file is session-scoped and legacy records are safely discarded.
|
|
532
|
-
|
|
533
|
-
---
|
|
534
|
-
|
|
535
|
-
#### `user_message`
|
|
536
|
-
|
|
537
|
-
**When it fires:** The user submits a message and it is about to be processed (harness runtime may expose this as `UserPromptSubmit`, `message.received`, an on-input hook, or equivalent).
|
|
538
|
-
|
|
539
|
-
**Expected consumer behavior:**
|
|
540
|
-
- **SHOULD** scan the message text for bracket tags. Match against all triggers defined in `vocabulary/tags.yml`.
|
|
541
|
-
- For each matched tag:
|
|
542
|
-
- **SHOULD** activate the skill if `type=skill` (see §8, steps 3–5). Do not proceed with normal message handling for that tag.
|
|
543
|
-
- **SHOULD** inject contextual guidance into Lead's available context before LLM inference begins:
|
|
544
|
-
- Current plan status: if `plan.json` exists, summarize pending vs. decided issues.
|
|
545
|
-
- Task progress: if `tasks.json` exists, summarize total/completed/pending counts and the ready-task set.
|
|
546
|
-
- **SHOULD** pass the message to Lead without modification if no tags are matched.
|
|
547
|
-
|
|
548
|
-
---
|
|
549
|
-
|
|
550
|
-
#### `subagent_spawn`
|
|
551
|
-
|
|
552
|
-
**When it fires:** A subagent is created and about to begin execution (harness runtime may expose this as `SubagentStart`, `agent.spawned`, a subagent-init hook, or equivalent).
|
|
553
|
-
|
|
554
|
-
**Expected consumer behavior:**
|
|
555
|
-
- **MUST** record the new agent entry in `.nexus/state/{harness-id}/agent-tracker.json`: `{ harness_id, agent_name, agent_id, started_at }`.
|
|
556
|
-
- **SHOULD** inject the knowledge index into the subagent's initial context: the list of files in `.nexus/memory/`, `.nexus/context/`, and `.nexus/rules/` so the agent knows what project knowledge is available.
|
|
557
|
-
- **SHOULD** apply capability restrictions: resolve `effective_capabilities` for this agent type and configure the subagent's tool access accordingly (see §6).
|
|
558
|
-
- **SHOULD** apply the resume evaluation: check `owner_reuse_policy` on the task and the agent's `resume_tier` to determine whether to spawn fresh or resume a prior session (see §10).
|
|
559
|
-
|
|
560
|
-
---
|
|
561
|
-
|
|
562
|
-
#### `subagent_complete`
|
|
563
|
-
|
|
564
|
-
**When it fires:** A subagent finishes its assigned work and returns control (harness runtime may expose this as `SubagentStop`, `agent.completed`, a subagent-exit hook, or equivalent).
|
|
565
|
-
|
|
566
|
-
**Expected consumer behavior:**
|
|
567
|
-
- **MUST** update `.nexus/state/{harness-id}/agent-tracker.json`: set `status=completed`, record `stopped_at` timestamp.
|
|
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.
|
|
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.
|
|
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.
|
|
571
|
-
|
|
572
|
-
---
|
|
573
|
-
|
|
574
|
-
#### `pre_tool_use`
|
|
575
|
-
|
|
576
|
-
**When it fires:** A tool call has been issued and is about to execute (harness runtime may expose this as `PreToolUse`, `tool.before`, a pre-call interceptor, or equivalent).
|
|
577
|
-
|
|
578
|
-
**Expected consumer behavior:**
|
|
579
|
-
- **SHOULD** enforce a gate for unplanned file edits: if `tasks.json` does not exist and the tool is a file-editing tool, block the call and return an error explaining that edits outside of a planned task cycle are disallowed. This prevents unplanned workspace changes.
|
|
580
|
-
- **Capability invariant (MUST)**: disallowed tools MUST NOT execute. **Enforcement layer (consumer choice)**: The abstract invariant holds regardless of enforcement layer. Consumers may enforce at the hook, in static agent config (frontmatter/TOML/disallowedTools), at a framework-level gate, or any combination — the choice is consumer-local. What nexus-core requires is the invariant, not the enforcement mechanism.
|
|
581
|
-
- **MAY** apply any other pre-condition checks your harness requires (rate limits, sandbox policies, etc.).
|
|
582
|
-
|
|
583
|
-
> **SHOULD note on block reason**: When a tool call is blocked, the `reason` field returned to the LLM is consumed as operational guidance for the next action. Consumers SHOULD compose the `reason` as actionable, directive text rather than a generic error message.
|
|
584
|
-
|
|
585
|
-
Read-only tools (query tools, status reads) are never blocked by capability gates. Only tools with primary write effects are subject to capability restrictions.
|
|
586
|
-
|
|
587
|
-
---
|
|
588
|
-
|
|
589
|
-
#### `post_tool_use`
|
|
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).
|
|
592
|
-
|
|
593
|
-
**Expected consumer behavior:**
|
|
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
|
-
- **MAY** record the error in the log for diagnostic purposes if the tool result indicates an error. Do not suppress error results.
|
|
596
|
-
|
|
597
|
-
---
|
|
598
|
-
|
|
599
|
-
#### `session_end`
|
|
600
|
-
|
|
601
|
-
**When it fires:** The session is terminating (harness runtime may expose this as `Stop`, `session.end`, a shutdown hook, or equivalent).
|
|
602
|
-
|
|
603
|
-
**Expected consumer behavior:**
|
|
604
|
-
- **SHOULD** warn the user if `tasks.json` exists and contains incomplete tasks (status `pending` or `in_progress`), that the session is ending with unfinished work and suggest calling `task_close` to archive before exiting.
|
|
605
|
-
- **SHOULD** delete `.nexus/state/{harness-id}/agent-tracker.json` (a session-scoped file that has no value beyond the session).
|
|
606
|
-
- **MAY** rotate or archive `tool-log.jsonl` if your harness supports log retention.
|
|
607
|
-
- **MUST NOT** delete `history.json`, `memory/`, `context/`, or `rules/` — these are project-scoped and must persist across sessions.
|
|
608
|
-
- **SHOULD** prompt or block with an "all tasks completed — call `task_close` to archive" reminder when `tasks.json` shows all tasks completed but the cycle has not been archived via `task_close`. Run-cycle closure is a recoverability boundary.
|
|
609
|
-
|
|
610
|
-
---
|
|
611
|
-
|
|
612
|
-
#### `context_compact`
|
|
613
|
-
|
|
614
|
-
**When it fires:** The runtime compresses the context window (harness runtime may expose this as `PostCompact`, `context.compacted`, a post-compact hook, or equivalent).
|
|
615
|
-
|
|
616
|
-
**Expected consumer behavior:**
|
|
617
|
-
- **SHOULD** re-inject the critical session snapshot that was lost in compression:
|
|
618
|
-
- Active skill/mode: which skill is currently active (plan, run, sync, or none).
|
|
619
|
-
- Plan status: if `plan.json` exists, re-inject the issue list with pending/decided status.
|
|
620
|
-
- Task progress: if `tasks.json` exists, re-inject the task list with status and ready-task set.
|
|
621
|
-
- Knowledge file index: re-inject the list of files in `.nexus/memory/`, `.nexus/context/`, `.nexus/rules/`.
|
|
622
|
-
- Active agent list: re-inject which subagents are currently tracked in `.nexus/state/{harness-id}/agent-tracker.json`.
|
|
623
|
-
- **SHOULD** restore state from the state files on disk. Context compaction is a context loss event; the LLM cannot reconstruct session state from its compressed context alone.
|
|
624
|
-
- **SHOULD** read state files fresh from disk — do not rely on in-memory caches that may also have been cleared.
|
|
625
|
-
|
|
626
|
-
---
|
|
627
|
-
|
|
628
|
-
## 10. Subagent Orchestration Model
|
|
629
|
-
|
|
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.
|
|
631
|
-
|
|
632
|
-
### Spawn model
|
|
633
|
-
|
|
634
|
-
When Lead assigns a task to an agent, the consumer:
|
|
635
|
-
|
|
636
|
-
1. Creates an isolated LLM session for the agent. The isolation mechanism is implementation-specific: a subprocess, an API call to a sandboxed session, a parallel conversation thread, or any other approach your harness supports.
|
|
637
|
-
2. Injects the agent's `body.md` as the agent's system prompt or initial context. This is the agent's identity and behavioral specification.
|
|
638
|
-
3. Applies tool restrictions derived from `effective_capabilities` (see §6). The agent session must not have access to tools in its disallowed set.
|
|
639
|
-
4. Passes the task's structured context as the agent's working prompt.
|
|
640
|
-
5. Waits for the agent to complete and collects the result.
|
|
641
|
-
|
|
642
|
-
### Context passing
|
|
643
|
-
|
|
644
|
-
Pass task context to the agent in this structured format:
|
|
645
|
-
|
|
646
|
-
```
|
|
647
|
-
TASK: {task.title}
|
|
648
|
-
|
|
649
|
-
CONTEXT:
|
|
650
|
-
{task.context}
|
|
651
|
-
|
|
652
|
-
APPROACH:
|
|
653
|
-
{task.approach}
|
|
654
|
-
|
|
655
|
-
ACCEPTANCE:
|
|
656
|
-
{task.acceptance}
|
|
657
|
-
```
|
|
658
|
-
|
|
659
|
-
Omit sections whose fields are absent (not all tasks have `approach` or `acceptance` defined). The `task_list` tool returns the full task structure including all optional fields.
|
|
660
|
-
|
|
661
|
-
Also inject:
|
|
662
|
-
- The knowledge index: file paths in `.nexus/memory/`, `.nexus/context/`, `.nexus/rules/`
|
|
663
|
-
- Harness-specific tool name mapping: which of your harness's concrete tool names correspond to the abstract nexus operations the agent's body.md may reference
|
|
664
|
-
- Any `harness_docs_refs` from the active skill's meta.yml
|
|
665
|
-
|
|
666
|
-
### Result collection
|
|
667
|
-
|
|
668
|
-
The agent produces output: file changes, artifact files, reports, or analysis. How the result is returned to Lead is consumer-decided. Common patterns:
|
|
669
|
-
|
|
670
|
-
- **Return value** — the subagent session's final message is returned as a string; Lead reads it directly.
|
|
671
|
-
- **Shared filesystem** — the agent writes to `.nexus/state/artifacts/` via the `artifact_write` tool; Lead reads the file.
|
|
672
|
-
- **Message passing** — the agent sends a structured message to Lead via your harness's inter-agent communication mechanism; Lead receives and acts on it.
|
|
673
|
-
|
|
674
|
-
The body.md of each agent specifies that it should "report to Lead" — whatever concrete mechanism you implement, ensure that the agent's output reaches Lead before the subagent session closes.
|
|
675
|
-
|
|
676
|
-
Lead is the only coordinator. Subagents do not communicate directly with each other. All inter-agent communication flows through Lead.
|
|
677
|
-
|
|
678
|
-
### Resume model
|
|
679
|
-
|
|
680
|
-
Before spawning an agent, evaluate whether to spawn fresh or resume a prior session. The evaluation follows three inputs:
|
|
681
|
-
|
|
682
|
-
**1. `owner_reuse_policy` from `tasks.json`** (per-task override, highest priority):
|
|
683
|
-
|
|
684
|
-
| Value | Effect |
|
|
685
|
-
|-------|--------|
|
|
686
|
-
| `fresh` | Always spawn fresh; ignore resume_tier |
|
|
687
|
-
| `resume_if_same_artifact` | Resume only if same agent, same target files, no intervening edits |
|
|
688
|
-
| `resume` | Always resume if a prior session is available |
|
|
689
|
-
| absent | Fall back to the agent's default resume_tier |
|
|
690
|
-
|
|
691
|
-
**2. Agent `resume_tier` from `manifest.json`** (default behavior):
|
|
692
|
-
|
|
693
|
-
| Tier | Behavior |
|
|
694
|
-
|------|----------|
|
|
695
|
-
| `ephemeral` | Always spawn fresh. Independent verification requires no prior context. Applies to: tester, reviewer. |
|
|
696
|
-
| `bounded` | Resume only when: same owner identity, same target files, no intervening edits by others. Re-read target files at session start. Applies to: engineer, writer. |
|
|
697
|
-
| `persistent` | Resume by default within the same run session. Cross-task reuse allowed. Applies to: architect, designer, postdoc, strategist, researcher. |
|
|
698
|
-
|
|
699
|
-
**3. Resume gating**:
|
|
700
|
-
|
|
701
|
-
Before attempting to resume, verify that your harness supports the resume mechanism for the current context. If the mechanism is unavailable (the harness cannot reopen a prior session, or no session ID was recorded for this agent), fall back to a fresh spawn silently. Do not surface a resume failure as an error to the user.
|
|
702
|
-
|
|
703
|
-
For `bounded` agents evaluating resume eligibility:
|
|
704
|
-
- Check `.nexus/state/{harness-id}/agent-tracker.json` for the prior agent ID assigned to this task.
|
|
705
|
-
- 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.
|
|
706
|
-
- 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.
|
|
707
|
-
|
|
708
|
-
Full resume tier definitions are in [behavioral-contracts.md §3](./behavioral-contracts.md).
|
|
709
|
-
|
|
710
|
-
### Inter-agent communication boundary
|
|
711
|
-
|
|
712
|
-
Subagents communicate results to Lead. Lead is responsible for all coordination. No direct subagent-to-subagent communication is defined or permitted by the nexus-core model.
|
|
713
|
-
|
|
714
|
-
If your harness exposes an inter-agent communication tool, it must be available to Lead and may be made available to subagents for the purpose of reporting back to Lead. Subagents must not use it to route work to other subagents — that is Lead's responsibility.
|
|
715
|
-
|
|
716
|
-
---
|
|
717
|
-
|
|
718
|
-
## 11. Conformance Verification (Required)
|
|
719
|
-
|
|
720
|
-
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.
|
|
721
|
-
|
|
722
|
-
### Fixture types
|
|
723
|
-
|
|
724
|
-
**Tool fixtures** (`conformance/tools/*.json`) — single-action tests for individual tools. Each fixture specifies:
|
|
725
|
-
- `precondition` — which state files must exist or must not exist before the test
|
|
726
|
-
- `action` — the tool name and parameters to call
|
|
727
|
-
- `postcondition` — assertions on the return value and state file contents after the call
|
|
728
|
-
|
|
729
|
-
**Scenario fixtures** (`conformance/scenarios/*.json`) — multi-step tests for end-to-end lifecycle flows. Each fixture specifies a sequence of steps, each with an action and assertions. Scenarios cover flows such as a full plan cycle and dependency-ordered task execution.
|
|
730
|
-
|
|
731
|
-
Available fixture files in nexus-core 0.2.0:
|
|
732
|
-
|
|
733
|
-
| File | Coverage |
|
|
734
|
-
|------|----------|
|
|
735
|
-
| `conformance/tools/plan-start.json` | `plan_start` happy path and edge cases |
|
|
736
|
-
| `conformance/tools/plan-decide.json` | `plan_decide` decision recording |
|
|
737
|
-
| `conformance/tools/task-add.json` | `task_add` creation and first-time initialization |
|
|
738
|
-
| `conformance/tools/task-close.json` | `task_close` archiving and state file deletion |
|
|
739
|
-
| `conformance/scenarios/full-plan-cycle.json` | Complete plan → decide → task → close lifecycle |
|
|
740
|
-
| `conformance/scenarios/task-deps-ordering.json` | Dependency-ordered task readiness computation |
|
|
741
|
-
|
|
742
|
-
### Writing a test runner
|
|
743
|
-
|
|
744
|
-
A conformance test runner:
|
|
745
|
-
|
|
746
|
-
1. Loads a fixture JSON file.
|
|
747
|
-
2. Establishes the precondition: writes or deletes state files as specified.
|
|
748
|
-
3. Calls your harness's implementation of the named tool with the fixture's parameters.
|
|
749
|
-
4. Evaluates postconditions using JSONPath assertions against the return value and state files.
|
|
750
|
-
5. Reports pass/fail per `test_id`.
|
|
751
|
-
|
|
752
|
-
Assertion keys in postconditions are JSONPath expressions. A `null` value at a file path key means the file must not exist. A `null` value at a JSONPath key means that field must be `null`.
|
|
753
|
-
|
|
754
|
-
The fixture format schema is at `conformance/schema/fixture.schema.json`.
|
|
755
|
-
|
|
756
|
-
For runner implementation patterns and a TypeScript sketch, see [conformance/README.md](../conformance/README.md).
|
|
757
|
-
|
|
758
|
-
### CI integration
|
|
759
|
-
|
|
760
|
-
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.
|
|
761
|
-
|
|
762
|
-
Conformance verification is distinct from your harness's own unit tests. Run both.
|
|
763
|
-
|
|
764
|
-
---
|
|
765
|
-
|
|
766
|
-
## 12. Minimum Viable Consumer
|
|
767
|
-
|
|
768
|
-
The smallest working Nexus session requires exactly these components. Build this first, verify it works end to end, then expand incrementally.
|
|
769
|
-
|
|
770
|
-
### Tools (4 minimum)
|
|
771
|
-
|
|
772
|
-
| Abstract name | Purpose |
|
|
773
|
-
|---------------|---------|
|
|
774
|
-
| `plan_start` | Create a planning session |
|
|
775
|
-
| `plan_decide` | Record decisions on plan issues |
|
|
776
|
-
| `task_add` | Add tasks to the execution list |
|
|
777
|
-
| `task_close` | Archive the cycle and clean up session state |
|
|
778
|
-
|
|
779
|
-
This set covers the complete plan → decide → add tasks → close cycle. Implement these four tools first, run their conformance fixtures, and verify the full cycle before adding more tools.
|
|
780
|
-
|
|
781
|
-
### Agent (1 minimum)
|
|
782
|
-
|
|
783
|
-
Register the `engineer` agent:
|
|
784
|
-
|
|
785
|
-
- **body.md**: `agents/engineer/body.md`
|
|
786
|
-
- **resume_tier**: `bounded`
|
|
787
|
-
- **capabilities**: `no_task_create`
|
|
788
|
-
- **model_tier**: `standard`
|
|
789
|
-
|
|
790
|
-
Engineer is the execution agent. With engineer alone, Lead can delegate implementation tasks and collect results.
|
|
791
|
-
|
|
792
|
-
### Skill (1 minimum)
|
|
793
|
-
|
|
794
|
-
Activate `nx-plan` when the user types `[plan]`:
|
|
795
|
-
|
|
796
|
-
- **body.md**: `skills/nx-plan/body.md`
|
|
797
|
-
- **trigger**: `[plan]` (from `vocabulary/tags.yml`)
|
|
798
|
-
- **type**: `skill`
|
|
799
|
-
|
|
800
|
-
Implement tag detection in your `user_message` hook. When `[plan]` is detected, load `skills/nx-plan/body.md` and inject it into Lead's context.
|
|
801
|
-
|
|
802
|
-
### Hook events (3 minimum)
|
|
803
|
-
|
|
804
|
-
| Event | Minimum required behavior |
|
|
805
|
-
|-------|--------------------------|
|
|
806
|
-
| `session_start` | Create `.nexus/state/{harness-id}/` directory; initialize `agent-tracker.json` as `[]` |
|
|
807
|
-
| `user_message` | Detect `[plan]` tag; load `skills/nx-plan/body.md`; inject into Lead's context |
|
|
808
|
-
| `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. |
|
|
809
|
-
|
|
810
|
-
### State files (3 minimum)
|
|
811
|
-
|
|
812
|
-
| File | Why it is required |
|
|
813
|
-
|------|--------------------|
|
|
814
|
-
| `plan.json` | Written by `plan_start`; read by `plan_decide` |
|
|
815
|
-
| `tasks.json` | Written by `task_add`; archived by `task_close` |
|
|
816
|
-
| `history.json` | Written by `task_close`; the permanent project record |
|
|
817
|
-
|
|
818
|
-
### What this gives you
|
|
819
|
-
|
|
820
|
-
A minimum viable consumer supports this complete cycle:
|
|
821
|
-
|
|
822
|
-
1. User types `[plan] let's plan the feature` → `nx-plan` skill activates
|
|
823
|
-
2. Lead runs a planning session, calls `plan_start`, calls `plan_decide` for each issue
|
|
824
|
-
3. Lead calls `task_add` to create implementation tasks
|
|
825
|
-
4. Lead spawns engineer subagent with task context
|
|
826
|
-
5. Engineer completes the work
|
|
827
|
-
6. Lead calls `task_close` to archive the cycle
|
|
828
|
-
|
|
829
|
-
### Incremental expansion path
|
|
830
|
-
|
|
831
|
-
Add components in this order after verifying the MVC:
|
|
832
|
-
|
|
833
|
-
1. **`[run]` skill + `nx-run` body** — adds structured execution orchestration; Lead gets the full delegation protocol for parallel task assignment
|
|
834
|
-
2. **Remaining 7 agents** — researcher, architect, postdoc, strategist, designer, writer, tester, reviewer; adds parallel analysis and verification roles
|
|
835
|
-
3. **Remaining 7 tools** — `plan_status`, `plan_update`, `task_list`, `task_update`, `history_search`, `context`, `artifact_write`; completes the full tool surface
|
|
836
|
-
4. **All 8 hook events** — adds `subagent_spawn`, `subagent_complete`, `pre_tool_use`, `post_tool_use`, `context_compact` for full lifecycle management
|
|
837
|
-
5. **Conformance suite** — run all fixtures in `conformance/tools/` and `conformance/scenarios/` before marking the harness production-ready
|
|
838
|
-
6. **`[sync]` skill** — adds `nx-sync` for keeping `.nexus/context/` synchronized with project state
|
|
839
|
-
|
|
840
|
-
Do not add the `[sync]`, `nx-init`, or `nx-setup` skills until the core planning and execution lifecycle is verified. These skills depend on the project state infrastructure built by the earlier components.
|