@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,119 +0,0 @@
|
|
|
1
|
-
# Memory Lifecycle Contract
|
|
2
|
-
|
|
3
|
-
This document defines the canonical operating principles for the `.nexus/memory/` layer. It sits alongside `vocabulary/memory_policy.yml`, which is the machine-readable form of the same rules. Where `memory_policy.yml` states principles as structured data for consumer tooling to parse, this document provides authoritative prose for implementers. The boundary between canonical and consumer-local is consistent across both: nexus-core owns the principles; consumers own all thresholds, formats, and enforcement mechanics.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 1. Canonical Principles
|
|
8
|
-
|
|
9
|
-
### 1.1 Read-Event Observation
|
|
10
|
-
|
|
11
|
-
An agent observes a memory file at the moment it reads that file's contents. That read event — and only that event — is the unit of observation for access tracking.
|
|
12
|
-
|
|
13
|
-
Write events, directory scans (glob, grep), and path mentions in prose are not observation events. An agent that lists `.nexus/memory/` to decide which file to read has not yet observed anything. The observation is recorded when the file is opened and its content is consumed.
|
|
14
|
-
|
|
15
|
-
This distinction matters because memory is meant to capture what has actually been used, not what has been found or referenced. Stale detection and gc decisions depend on a signal that reflects genuine use, not incidental proximity.
|
|
16
|
-
|
|
17
|
-
### 1.2 Three Information Types Accumulated
|
|
18
|
-
|
|
19
|
-
For each memory file, three pieces of information are accumulated across read events: (1) the wall-clock time of the most recent read, (2) the cumulative count of reads observed since tracking began, and (3) the identity of the most recent reader.
|
|
20
|
-
|
|
21
|
-
These three values constitute the access record for a file. They are stored in `.nexus/state/{harness_id}/memory-access.jsonl` — one JSONL line per file, upserted on each observation. The canonical field names and types are defined in `conformance/state-schemas/memory-access.schema.json`; that schema is the authoritative source for storage format. Value domains for the reader identity field are harness-local.
|
|
22
|
-
|
|
23
|
-
Together, these three values give consumers the signals they need to reason about whether a memory file remains actively useful or has drifted into disuse.
|
|
24
|
-
|
|
25
|
-
### 1.3 Manual Gate as Default
|
|
26
|
-
|
|
27
|
-
Automatic deletion is off by default. The normal path for removing stale memory files is the `[m:gc]` tag, which the user invokes manually. User intent is the final arbiter of what gets removed.
|
|
28
|
-
|
|
29
|
-
Automatic deletion is an opt-in capability. A consumer may enable it, but must do so explicitly. No consumer should assume automatic deletion is active unless they have deliberately configured it.
|
|
30
|
-
|
|
31
|
-
This default reflects a conservative stance: the cost of accidentally losing a still-relevant memory file is higher than the cost of retaining an unused one. Manual gc preserves human judgment in the loop.
|
|
32
|
-
|
|
33
|
-
### 1.4 Three-Signal Intersection for Automatic Deletion
|
|
34
|
-
|
|
35
|
-
When a consumer enables automatic deletion, the policy must require the simultaneous satisfaction of at least three independent signals before a file is eligible for removal. No single signal, however strong, is sufficient on its own.
|
|
36
|
-
|
|
37
|
-
The three signals should be drawn from independent dimensions — for example: elapsed time since last access, number of work cycles completed since last read, and cumulative access count since tracking began. Requiring intersection across independent dimensions reduces the risk of false positives caused by a single anomalous period (a long vacation, an unusually dense sprint, an early-lifecycle file that has never yet been needed).
|
|
38
|
-
|
|
39
|
-
The specific thresholds for each signal are consumer-local, calibrated to the project's cycle cadence and team working patterns. nexus-core specifies the structural requirement — three independent signals — not the magnitudes.
|
|
40
|
-
|
|
41
|
-
### 1.5 Git-Backed Recoverable Deletion
|
|
42
|
-
|
|
43
|
-
Every memory file deletion must be recorded as a git commit. Deletion without a corresponding commit is not permitted.
|
|
44
|
-
|
|
45
|
-
The commit should include enough information in its message that a reader can reconstruct the recovery path — for example, the git command needed to restore the file from history. Including an explicit recovery path in the commit message is recommended; it reduces the cognitive load on anyone who later discovers the deletion was premature. The exact format of the commit message is consumer-local.
|
|
46
|
-
|
|
47
|
-
This requirement ensures that no memory deletion is silent. The project history serves as a safety net, and the act of committing forces an intentional moment before content is removed from the active workspace.
|
|
48
|
-
|
|
49
|
-
### 1.6 Merge-Before-Create
|
|
50
|
-
|
|
51
|
-
When a new memory save candidate substantively overlaps an existing file in topic and category, the existing file should be extended rather than a new file created. Proliferation of near-duplicate files degrades the utility of the memory layer: duplicates force readers to reconcile redundant content and make gc harder to reason about.
|
|
52
|
-
|
|
53
|
-
The concrete criteria for deciding whether two topics overlap — keyword thresholds, semantic distance, structural similarity — are consumer-local. nexus-core requires the preference for merging; it does not specify the matching algorithm.
|
|
54
|
-
|
|
55
|
-
---
|
|
56
|
-
|
|
57
|
-
## 2. Category Boundaries
|
|
58
|
-
|
|
59
|
-
Memory files are organized into three categories defined in `vocabulary/memory_policy.yml`. Each category has a `prefix-` naming convention that makes the file's type visible in directory listings.
|
|
60
|
-
|
|
61
|
-
### 2.1 `empirical-`
|
|
62
|
-
|
|
63
|
-
Files in this category contain empirically verified findings: observations and measurements the project has confirmed through its own experimentation. Examples include runtime behavior observations, testing-derived structural facts, and operational measurements that cannot be inferred from documentation alone.
|
|
64
|
-
|
|
65
|
-
Empirical memory captures what the project has learned by doing. It is distinct from external references (what others have said) and from patterns (what the project has found effective as procedure).
|
|
66
|
-
|
|
67
|
-
### 2.2 `external-`
|
|
68
|
-
|
|
69
|
-
Files in this category contain external constraints and references: requirements imposed by upstream dependencies, third-party API limits, vendor documentation quotations, and knowledge that originates outside the project.
|
|
70
|
-
|
|
71
|
-
External memory may become stale if the upstream source changes. This is the category most likely to require periodic review against current upstream state.
|
|
72
|
-
|
|
73
|
-
### 2.3 `pattern-`
|
|
74
|
-
|
|
75
|
-
Files in this category contain tactical operational patterns: recurring cycle-level recipes, routing heuristics, and procedural knowledge developed through work on the project.
|
|
76
|
-
|
|
77
|
-
The scope of this category is explicitly tactical. Architectural or design-level patterns do not belong here. If a finding rises to the level of architectural principle or design rationale — something that shapes how the project is structured rather than how day-to-day work is executed — it belongs in `.nexus/context/`, not in `memory/`.
|
|
78
|
-
|
|
79
|
-
### 2.4 Relation to `context/` and `rules/`
|
|
80
|
-
|
|
81
|
-
`.nexus/memory/` and `.nexus/context/` serve different purposes and should not be confused.
|
|
82
|
-
|
|
83
|
-
`memory/` holds project-accumulated working knowledge: empirical findings, external references, and tactical patterns that agents draw on during active work. These files are created via `[m]` and managed via `[m:gc]`. They are subject to the gc lifecycle defined in this document.
|
|
84
|
-
|
|
85
|
-
`.nexus/context/` holds design principles, architectural philosophy, and onboarding materials — documents that define the project's enduring structure and intent. Primer-style documents (documents that introduce the project's goals, vocabulary, or design decisions to a new reader) belong in `context/`, not in `memory/`. The gc lifecycle does not apply to `context/` files; they are maintained by `[sync]` and represent stable project knowledge rather than accumulated working observations.
|
|
86
|
-
|
|
87
|
-
`.nexus/rules/` holds enforceable project rules. These are not memory entries and are not subject to this lifecycle.
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## 3. Consumer Responsibility
|
|
92
|
-
|
|
93
|
-
The principles in §1 are canonical. Everything below is consumer-local — decisions that each consumer makes independently, calibrated to their own project, harness, and team cadence. nexus-core does not prescribe values for any of the following items.
|
|
94
|
-
|
|
95
|
-
Consumers determine:
|
|
96
|
-
|
|
97
|
-
- The specific threshold for each signal used in automatic deletion (for example: how much time elapsed, how many cycles completed, what access count constitutes "unused")
|
|
98
|
-
- File and directory size criteria, if any, used in gc decisions
|
|
99
|
-
- The frequency or trigger conditions for `[m:gc]` invocations in normal workflow
|
|
100
|
-
- The git commit message format for deletion commits, beyond the recommendation that a recovery path be included
|
|
101
|
-
- Whether access counts are re-incremented in resumed sessions (i.e., whether a resumed context that re-reads a file adds to the count or not)
|
|
102
|
-
- The keyword overlap threshold, semantic distance measure, or other matching criteria used to decide whether merge-before-create applies
|
|
103
|
-
- Whether additional filename prefix categories beyond the canonical three are introduced for project-specific use
|
|
104
|
-
|
|
105
|
-
Consumers may configure automatic deletion, but must not treat it as active unless they have explicitly opted in. All other gc path decisions remain under user control by default.
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
## 4. Reference
|
|
110
|
-
|
|
111
|
-
Related vocabulary and files:
|
|
112
|
-
|
|
113
|
-
- `vocabulary/memory_policy.yml` — machine-readable canonical form of the principles in this document
|
|
114
|
-
- `vocabulary/tags.yml` — `[m]` and `[m:gc]` tag definitions
|
|
115
|
-
- `vocabulary/invocations.yml` — `memory_read_observation` primitive
|
|
116
|
-
- `conformance/state-schemas/memory-access.schema.json` — access log schema (canonical field names and types)
|
|
117
|
-
- `docs/nexus-outputs-contract.md §Shared filename convention` — `memory-access.jsonl` registration and location convention
|
|
118
|
-
- `docs/behavioral-contracts.md` — other behavioral contracts in nexus-core
|
|
119
|
-
- `.nexus/context/boundaries.md` — why specific thresholds are not canonical (거절 근거 및 Authoring layer 정체성)
|
package/docs/nexus-layout.md
DELETED
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
# .nexus/ Directory Layout
|
|
2
|
-
|
|
3
|
-
This document is the canonical reference for the `.nexus/` directory structure used by all Nexus harnesses. Harnesses read this layout to know where to write, read, and archive runtime state.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Directory Tree
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
.nexus/
|
|
11
|
-
├── state/ ← session/branch-scoped (ephemeral)
|
|
12
|
-
│ ├── plan.json
|
|
13
|
-
│ ├── tasks.json
|
|
14
|
-
│ ├── tool-log.jsonl
|
|
15
|
-
│ ├── artifacts/
|
|
16
|
-
│ ├── claude-nexus/ ← harness-namespaced directory (example)
|
|
17
|
-
│ │ ├── agent-tracker.json
|
|
18
|
-
│ │ ├── edit-tracker.json
|
|
19
|
-
│ │ └── reopen-tracker.json
|
|
20
|
-
│ └── opencode-nexus/ ← harness-namespaced directory (example)
|
|
21
|
-
│ ├── agent-tracker.json
|
|
22
|
-
│ ├── edit-tracker.json
|
|
23
|
-
│ └── reopen-tracker.json
|
|
24
|
-
├── history.json ← project-scoped (git-tracked, append-only)
|
|
25
|
-
├── memory/ ← project-scoped (git-tracked)
|
|
26
|
-
│ └── *.md
|
|
27
|
-
├── context/ ← project-scoped (git-tracked, nx-sync managed)
|
|
28
|
-
│ └── *.md
|
|
29
|
-
├── rules/ ← project-scoped (git-tracked, user-defined)
|
|
30
|
-
│ └── *.md
|
|
31
|
-
└── .gitignore
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## Entry Reference
|
|
37
|
-
|
|
38
|
-
### `state/`
|
|
39
|
-
|
|
40
|
-
**Purpose.** Holds all runtime state for the current session or branch. Contents are ephemeral and not meaningful across sessions.
|
|
41
|
-
|
|
42
|
-
**Scope.** Session-scoped.
|
|
43
|
-
|
|
44
|
-
**Git tracking.** Ignored via `.gitignore`.
|
|
45
|
-
|
|
46
|
-
**Lifecycle.** Created when the first plan or run cycle begins. Cleared or reset when a new cycle starts or when the session ends. Individual files within `state/` may be archived to `history.json` at cycle close (see `task_close`).
|
|
47
|
-
|
|
48
|
-
**Owner.** Harness runtime, via lifecycle hooks.
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
#### `state/plan.json`
|
|
53
|
-
|
|
54
|
-
**Purpose.** Active plan for the current cycle. Contains issues and their decision status.
|
|
55
|
-
|
|
56
|
-
**Scope.** Session-scoped (one plan per cycle).
|
|
57
|
-
|
|
58
|
-
**Git tracking.** Ignored.
|
|
59
|
-
|
|
60
|
-
**Lifecycle.** Created by `nx-plan` skill at cycle start. Archived into `history.json` at `task_close`. Deleted or overwritten when a new cycle begins.
|
|
61
|
-
|
|
62
|
-
**Owner.** `nx-plan` skill; updated by plan lifecycle tools.
|
|
63
|
-
|
|
64
|
-
---
|
|
65
|
-
|
|
66
|
-
#### `state/tasks.json`
|
|
67
|
-
|
|
68
|
-
**Purpose.** Task list for the current cycle. Tracks task status, ownership, dependencies, and agent configuration for each unit of work.
|
|
69
|
-
|
|
70
|
-
**Scope.** Session-scoped.
|
|
71
|
-
|
|
72
|
-
**Git tracking.** Ignored.
|
|
73
|
-
|
|
74
|
-
**Lifecycle.** Created alongside `plan.json` at cycle start. Archived to `history.json` at `task_close`.
|
|
75
|
-
|
|
76
|
-
**Owner.** `nx-run` skill; updated by task lifecycle tools.
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
#### `state/{harness-id}/agent-tracker.json`
|
|
81
|
-
|
|
82
|
-
**Purpose.** Records which subagents have been spawned in the current session, their assigned tasks, and their resume-tier classification. Each harness writes into its own subdirectory under `state/` (for example, `state/claude-nexus/` or `state/opencode-nexus/`), keeping agent-tracker records isolated across harness namespaces.
|
|
83
|
-
|
|
84
|
-
**Scope.** Session-scoped.
|
|
85
|
-
|
|
86
|
-
**Git tracking.** Ignored.
|
|
87
|
-
|
|
88
|
-
**Lifecycle.** Created when the first subagent is spawned in the session. The harness creates the `{harness-id}/` subdirectory if it does not already exist. Cleared at session end.
|
|
89
|
-
|
|
90
|
-
**Owner.** Harness agent-management layer.
|
|
91
|
-
|
|
92
|
-
---
|
|
93
|
-
|
|
94
|
-
#### `state/tool-log.jsonl`
|
|
95
|
-
|
|
96
|
-
**Purpose.** Append-only log of tool invocations made during the current session. Used for auditing, debugging, and post-session analysis.
|
|
97
|
-
|
|
98
|
-
**Scope.** Session-scoped.
|
|
99
|
-
|
|
100
|
-
**Git tracking.** Ignored.
|
|
101
|
-
|
|
102
|
-
**Lifecycle.** Appended to throughout the session. Discarded or rotated at session end.
|
|
103
|
-
|
|
104
|
-
**Owner.** Harness tool-invocation layer.
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
#### `state/{harness-id}/edit-tracker.json`
|
|
109
|
-
|
|
110
|
-
**Purpose.** Tracks which files have been edited in the current session. Used by the bounded resume tier to detect intervening edits before allowing agent reuse.
|
|
111
|
-
|
|
112
|
-
**Scope.** Session-scoped.
|
|
113
|
-
|
|
114
|
-
**Git tracking.** Ignored.
|
|
115
|
-
|
|
116
|
-
**Lifecycle.** Created on first file edit. Cleared at session end by the consumer harness session hook.
|
|
117
|
-
|
|
118
|
-
**Owner.** Consumer harness session hook. Not managed by any nexus-core MCP tool.
|
|
119
|
-
|
|
120
|
-
---
|
|
121
|
-
|
|
122
|
-
#### `state/{harness-id}/reopen-tracker.json`
|
|
123
|
-
|
|
124
|
-
**Purpose.** Records tasks or plan issues that have been reopened within the current cycle, to prevent infinite reopen loops.
|
|
125
|
-
|
|
126
|
-
**Scope.** Session-scoped.
|
|
127
|
-
|
|
128
|
-
**Git tracking.** Ignored.
|
|
129
|
-
|
|
130
|
-
**Lifecycle.** Created on first reopen event. Cleared at cycle end by the consumer harness session hook.
|
|
131
|
-
|
|
132
|
-
**Owner.** Consumer harness session hook. Not managed by any nexus-core MCP tool.
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
#### `state/artifacts/`
|
|
137
|
-
|
|
138
|
-
**Purpose.** Stores intermediate and final deliverables produced by subagents during the current cycle (e.g., reports, synthesized documents, analysis outputs).
|
|
139
|
-
|
|
140
|
-
**Scope.** Session-scoped.
|
|
141
|
-
|
|
142
|
-
**Git tracking.** Ignored.
|
|
143
|
-
|
|
144
|
-
**Lifecycle.** Files are written here by subagents during a run cycle. The directory persists for the session; individual files may be promoted to project-level locations by Lead before the cycle closes.
|
|
145
|
-
|
|
146
|
-
**Owner.** Subagents writing deliverables; Lead controls promotion.
|
|
147
|
-
|
|
148
|
-
---
|
|
149
|
-
|
|
150
|
-
### `history.json`
|
|
151
|
-
|
|
152
|
-
**Purpose.** Append-only archive of completed plan and task cycles. Each completed cycle contributes one record. Used to reconstruct project history and provide context for future plans.
|
|
153
|
-
|
|
154
|
-
**Scope.** Project-scoped.
|
|
155
|
-
|
|
156
|
-
**Git tracking.** Tracked (committed to the repository).
|
|
157
|
-
|
|
158
|
-
**Lifecycle.** Created on first `task_close`. Records are appended at each subsequent `task_close`. Never truncated or overwritten; only appended.
|
|
159
|
-
|
|
160
|
-
**Owner.** `task_close` lifecycle tool.
|
|
161
|
-
|
|
162
|
-
---
|
|
163
|
-
|
|
164
|
-
### `memory/`
|
|
165
|
-
|
|
166
|
-
**Purpose.** Stores lessons learned, reference notes, and durable observations captured with the `[m]` tag. Each note is a standalone Markdown file.
|
|
167
|
-
|
|
168
|
-
**Scope.** Project-scoped.
|
|
169
|
-
|
|
170
|
-
**Git tracking.** Tracked.
|
|
171
|
-
|
|
172
|
-
**Lifecycle.** Files are created when Lead or a subagent records a memory entry. They persist indefinitely. Stale entries are merged or removed via `[m:gc]`.
|
|
173
|
-
|
|
174
|
-
**Owner.** Memory-store inline action; garbage-collected by `[m:gc]`.
|
|
175
|
-
|
|
176
|
-
---
|
|
177
|
-
|
|
178
|
-
### `context/`
|
|
179
|
-
|
|
180
|
-
**Purpose.** Holds design documents and architecture philosophy that describe the project's principles and current state. Managed by the `nx-sync` skill, which keeps these documents current with the actual codebase.
|
|
181
|
-
|
|
182
|
-
**Scope.** Project-scoped.
|
|
183
|
-
|
|
184
|
-
**Git tracking.** Tracked.
|
|
185
|
-
|
|
186
|
-
**Lifecycle.** Files are created or updated by `[sync]`. They should be refreshed whenever the project's architecture or design intent changes significantly.
|
|
187
|
-
|
|
188
|
-
**Owner.** `nx-sync` skill.
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
### `rules/`
|
|
193
|
-
|
|
194
|
-
**Purpose.** Contains user-defined project rules created with the `[rule]` tag. Rules constrain agent behavior for this specific project and take precedence over default behavior.
|
|
195
|
-
|
|
196
|
-
**Scope.** Project-scoped.
|
|
197
|
-
|
|
198
|
-
**Git tracking.** Tracked.
|
|
199
|
-
|
|
200
|
-
**Lifecycle.** Files are created by the rule-store inline action and persist indefinitely. Users are responsible for removing obsolete rules.
|
|
201
|
-
|
|
202
|
-
**Owner.** Rule-store inline action (`[rule]`); maintained by users.
|
|
203
|
-
|
|
204
|
-
---
|
|
205
|
-
|
|
206
|
-
### `.gitignore`
|
|
207
|
-
|
|
208
|
-
**Purpose.** Ensures that ephemeral session state is not committed to the repository while project-scoped files remain tracked.
|
|
209
|
-
|
|
210
|
-
**Scope.** Project-scoped.
|
|
211
|
-
|
|
212
|
-
**Git tracking.** Tracked.
|
|
213
|
-
|
|
214
|
-
**Lifecycle.** Created during project initialization. Updated when new ephemeral paths are added to `state/`.
|
|
215
|
-
|
|
216
|
-
**Owner.** Nexus initialization tooling.
|
|
217
|
-
|
|
218
|
-
**Convention.** The `.gitignore` inside `.nexus/` must ignore the `state/` directory and all its contents. The following entries must be tracked and must not appear in `.gitignore`: `memory/`, `context/`, `rules/`, `history.json`.
|
|
219
|
-
|
|
220
|
-
Minimal required content:
|
|
221
|
-
|
|
222
|
-
```
|
|
223
|
-
state/
|
|
224
|
-
```
|