@moreih29/nexus-core 0.1.2 → 0.2.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 +3 -3
- package/agents/architect/body.md +7 -6
- package/agents/designer/body.md +3 -3
- package/agents/engineer/body.md +8 -8
- package/agents/postdoc/body.md +4 -4
- package/agents/researcher/body.md +4 -4
- package/agents/reviewer/body.md +2 -2
- package/agents/strategist/body.md +4 -4
- package/agents/tester/body.md +2 -2
- package/agents/writer/body.md +1 -1
- package/conformance/README.md +125 -0
- package/conformance/scenarios/full-plan-cycle.json +132 -0
- package/conformance/scenarios/task-deps-ordering.json +83 -0
- package/conformance/schema/fixture.schema.json +224 -0
- package/conformance/state-schemas/agent-tracker.schema.json +58 -0
- package/conformance/state-schemas/history.schema.json +124 -0
- package/conformance/state-schemas/plan.schema.json +72 -0
- package/conformance/state-schemas/runtime.schema.json +25 -0
- package/conformance/state-schemas/tasks.schema.json +93 -0
- package/conformance/tools/plan-decide.json +70 -0
- package/conformance/tools/plan-start.json +67 -0
- package/conformance/tools/task-add.json +73 -0
- package/conformance/tools/task-close.json +98 -0
- package/docs/behavioral-contracts.md +145 -0
- package/docs/consumer-implementation-guide.md +844 -0
- package/docs/nexus-layout.md +234 -0
- package/docs/nexus-state-overview.md +185 -0
- package/docs/nexus-tools-contract.md +427 -0
- package/manifest.json +126 -113
- package/package.json +5 -1
- package/schema/common.schema.json +0 -4
- package/schema/skill.schema.json +16 -1
- package/schema/vocabulary.schema.json +14 -9
- package/skills/nx-init/body.md +6 -9
- package/skills/nx-init/meta.yml +1 -0
- package/skills/nx-plan/body.md +14 -11
- package/skills/nx-plan/meta.yml +3 -0
- package/skills/nx-run/body.md +4 -4
- package/skills/nx-run/meta.yml +3 -0
- package/skills/nx-setup/body.md +9 -9
- package/skills/nx-setup/meta.yml +1 -0
- package/skills/nx-sync/meta.yml +1 -0
- package/vocabulary/capabilities.yml +58 -25
|
@@ -0,0 +1,234 @@
|
|
|
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
|
+
│ ├── runtime.json
|
|
15
|
+
│ ├── agent-tracker.json
|
|
16
|
+
│ ├── tool-log.jsonl
|
|
17
|
+
│ ├── edit-tracker.json
|
|
18
|
+
│ ├── reopen-tracker.json
|
|
19
|
+
│ └── artifacts/
|
|
20
|
+
├── history.json ← project-scoped (git-tracked, append-only)
|
|
21
|
+
├── memory/ ← project-scoped (git-tracked)
|
|
22
|
+
│ └── *.md
|
|
23
|
+
├── context/ ← project-scoped (git-tracked, nx-sync managed)
|
|
24
|
+
│ └── *.md
|
|
25
|
+
├── rules/ ← project-scoped (git-tracked, user-defined)
|
|
26
|
+
│ └── *.md
|
|
27
|
+
└── .gitignore
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Entry Reference
|
|
33
|
+
|
|
34
|
+
### `state/`
|
|
35
|
+
|
|
36
|
+
**Purpose.** Holds all runtime state for the current session or branch. Contents are ephemeral and not meaningful across sessions.
|
|
37
|
+
|
|
38
|
+
**Scope.** Session-scoped.
|
|
39
|
+
|
|
40
|
+
**Git tracking.** Ignored via `.gitignore`.
|
|
41
|
+
|
|
42
|
+
**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`).
|
|
43
|
+
|
|
44
|
+
**Owner.** Harness runtime, via lifecycle hooks.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
#### `state/plan.json`
|
|
49
|
+
|
|
50
|
+
**Purpose.** Active plan for the current cycle. Contains issues and their decision status.
|
|
51
|
+
|
|
52
|
+
**Scope.** Session-scoped (one plan per cycle).
|
|
53
|
+
|
|
54
|
+
**Git tracking.** Ignored.
|
|
55
|
+
|
|
56
|
+
**Lifecycle.** Created by `nx-plan` skill at cycle start. Archived into `history.json` at `task_close`. Deleted or overwritten when a new cycle begins.
|
|
57
|
+
|
|
58
|
+
**Owner.** `nx-plan` skill; updated by plan lifecycle tools.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
#### `state/tasks.json`
|
|
63
|
+
|
|
64
|
+
**Purpose.** Task list for the current cycle. Tracks task status, ownership, dependencies, and agent configuration for each unit of work.
|
|
65
|
+
|
|
66
|
+
**Scope.** Session-scoped.
|
|
67
|
+
|
|
68
|
+
**Git tracking.** Ignored.
|
|
69
|
+
|
|
70
|
+
**Lifecycle.** Created alongside `plan.json` at cycle start. Archived to `history.json` at `task_close`.
|
|
71
|
+
|
|
72
|
+
**Owner.** `nx-run` skill; updated by task lifecycle tools.
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
#### `state/runtime.json`
|
|
77
|
+
|
|
78
|
+
**Purpose.** Harness-internal session state that does not belong in plan or task records (e.g., active agent registrations, session-level flags).
|
|
79
|
+
|
|
80
|
+
**Scope.** Session-scoped.
|
|
81
|
+
|
|
82
|
+
**Git tracking.** Ignored.
|
|
83
|
+
|
|
84
|
+
**Lifecycle.** Created at session start. Discarded at session end.
|
|
85
|
+
|
|
86
|
+
**Owner.** Harness runtime.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
|
|
90
|
+
#### `state/agent-tracker.json`
|
|
91
|
+
|
|
92
|
+
**Purpose.** Records which subagents have been spawned in the current session, their assigned tasks, and their resume-tier classification.
|
|
93
|
+
|
|
94
|
+
**Scope.** Session-scoped.
|
|
95
|
+
|
|
96
|
+
**Git tracking.** Ignored.
|
|
97
|
+
|
|
98
|
+
**Lifecycle.** Created when the first subagent is spawned. Cleared at session end.
|
|
99
|
+
|
|
100
|
+
**Owner.** Harness agent-management layer.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
#### `state/tool-log.jsonl`
|
|
105
|
+
|
|
106
|
+
**Purpose.** Append-only log of tool invocations made during the current session. Used for auditing, debugging, and post-session analysis.
|
|
107
|
+
|
|
108
|
+
**Scope.** Session-scoped.
|
|
109
|
+
|
|
110
|
+
**Git tracking.** Ignored.
|
|
111
|
+
|
|
112
|
+
**Lifecycle.** Appended to throughout the session. Discarded or rotated at session end.
|
|
113
|
+
|
|
114
|
+
**Owner.** Harness tool-invocation layer.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
#### `state/edit-tracker.json`
|
|
119
|
+
|
|
120
|
+
**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.
|
|
121
|
+
|
|
122
|
+
**Scope.** Session-scoped.
|
|
123
|
+
|
|
124
|
+
**Git tracking.** Ignored.
|
|
125
|
+
|
|
126
|
+
**Lifecycle.** Created on first file edit. Cleared at session end.
|
|
127
|
+
|
|
128
|
+
**Owner.** Harness file-edit hooks.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
#### `state/reopen-tracker.json`
|
|
133
|
+
|
|
134
|
+
**Purpose.** Records tasks or plan issues that have been reopened within the current cycle, to prevent infinite reopen loops.
|
|
135
|
+
|
|
136
|
+
**Scope.** Session-scoped.
|
|
137
|
+
|
|
138
|
+
**Git tracking.** Ignored.
|
|
139
|
+
|
|
140
|
+
**Lifecycle.** Created on first reopen event. Cleared at cycle end.
|
|
141
|
+
|
|
142
|
+
**Owner.** Task and plan lifecycle tools.
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
#### `state/artifacts/`
|
|
147
|
+
|
|
148
|
+
**Purpose.** Stores intermediate and final deliverables produced by subagents during the current cycle (e.g., reports, synthesized documents, analysis outputs).
|
|
149
|
+
|
|
150
|
+
**Scope.** Session-scoped.
|
|
151
|
+
|
|
152
|
+
**Git tracking.** Ignored.
|
|
153
|
+
|
|
154
|
+
**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.
|
|
155
|
+
|
|
156
|
+
**Owner.** Subagents writing deliverables; Lead controls promotion.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
### `history.json`
|
|
161
|
+
|
|
162
|
+
**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.
|
|
163
|
+
|
|
164
|
+
**Scope.** Project-scoped.
|
|
165
|
+
|
|
166
|
+
**Git tracking.** Tracked (committed to the repository).
|
|
167
|
+
|
|
168
|
+
**Lifecycle.** Created on first `task_close`. Records are appended at each subsequent `task_close`. Never truncated or overwritten; only appended.
|
|
169
|
+
|
|
170
|
+
**Owner.** `task_close` lifecycle tool.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
### `memory/`
|
|
175
|
+
|
|
176
|
+
**Purpose.** Stores lessons learned, reference notes, and durable observations captured with the `[m]` tag. Each note is a standalone Markdown file.
|
|
177
|
+
|
|
178
|
+
**Scope.** Project-scoped.
|
|
179
|
+
|
|
180
|
+
**Git tracking.** Tracked.
|
|
181
|
+
|
|
182
|
+
**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]`.
|
|
183
|
+
|
|
184
|
+
**Owner.** Memory-store inline action; garbage-collected by `[m:gc]`.
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
### `context/`
|
|
189
|
+
|
|
190
|
+
**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.
|
|
191
|
+
|
|
192
|
+
**Scope.** Project-scoped.
|
|
193
|
+
|
|
194
|
+
**Git tracking.** Tracked.
|
|
195
|
+
|
|
196
|
+
**Lifecycle.** Files are created or updated by `[sync]`. They should be refreshed whenever the project's architecture or design intent changes significantly.
|
|
197
|
+
|
|
198
|
+
**Owner.** `nx-sync` skill.
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
### `rules/`
|
|
203
|
+
|
|
204
|
+
**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.
|
|
205
|
+
|
|
206
|
+
**Scope.** Project-scoped.
|
|
207
|
+
|
|
208
|
+
**Git tracking.** Tracked.
|
|
209
|
+
|
|
210
|
+
**Lifecycle.** Files are created by the rule-store inline action and persist indefinitely. Users are responsible for removing obsolete rules.
|
|
211
|
+
|
|
212
|
+
**Owner.** Rule-store inline action (`[rule]`); maintained by users.
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
### `.gitignore`
|
|
217
|
+
|
|
218
|
+
**Purpose.** Ensures that ephemeral session state is not committed to the repository while project-scoped files remain tracked.
|
|
219
|
+
|
|
220
|
+
**Scope.** Project-scoped.
|
|
221
|
+
|
|
222
|
+
**Git tracking.** Tracked.
|
|
223
|
+
|
|
224
|
+
**Lifecycle.** Created during project initialization. Updated when new ephemeral paths are added to `state/`.
|
|
225
|
+
|
|
226
|
+
**Owner.** Nexus initialization tooling.
|
|
227
|
+
|
|
228
|
+
**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`.
|
|
229
|
+
|
|
230
|
+
Minimal required content:
|
|
231
|
+
|
|
232
|
+
```
|
|
233
|
+
state/
|
|
234
|
+
```
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# Nexus State File Overview
|
|
2
|
+
|
|
3
|
+
This document is the normative specification for all files and directories that constitute Nexus runtime and project state. It defines each file's purpose, lifecycle, git-tracking status, and the tools that read or write it.
|
|
4
|
+
|
|
5
|
+
The Nexus state layout is divided into two categories:
|
|
6
|
+
|
|
7
|
+
- **Session-scoped state** — created and deleted within a single planning/execution cycle; not git-tracked.
|
|
8
|
+
- **Project-scoped content** — persists across cycles; git-tracked as part of the repository.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## State File Reference
|
|
13
|
+
|
|
14
|
+
### `.nexus/state/plan.json`
|
|
15
|
+
|
|
16
|
+
| Attribute | Value |
|
|
17
|
+
|-----------|-------|
|
|
18
|
+
| Scope | Session |
|
|
19
|
+
| Git-tracked | No |
|
|
20
|
+
| Created by | `plan_start` |
|
|
21
|
+
| Deleted by | `plan_start` (auto-archive of prior session), `task_close` |
|
|
22
|
+
|
|
23
|
+
**Purpose.** Holds the active planning session. Contains the plan `id`, `topic`, `research_summary`, `created_at`, and the ordered list of `PlanIssue` objects. Each issue records its `id`, `title`, `status` (`"pending"` or `"decided"`), and — once decided — the `decision` summary along with optional `how_agents`, `how_summary`, and `how_agent_ids` fields.
|
|
24
|
+
|
|
25
|
+
**Creation trigger.** `plan_start` writes this file after archiving any existing session. The `id` is set to one greater than the highest plan `id` found in `history.json`.
|
|
26
|
+
|
|
27
|
+
**Deletion trigger.** `task_close` archives the file's contents into `history.json` and then deletes it. `plan_start` also deletes a pre-existing `plan.json` when starting a new session (archiving it first).
|
|
28
|
+
|
|
29
|
+
**Tool access.**
|
|
30
|
+
|
|
31
|
+
| Tool | Access |
|
|
32
|
+
|------|--------|
|
|
33
|
+
| `plan_start` | Write (creates) |
|
|
34
|
+
| `plan_status` | Read |
|
|
35
|
+
| `plan_update` | Read + Write |
|
|
36
|
+
| `plan_decide` | Read + Write |
|
|
37
|
+
| `task_close` | Read + Delete |
|
|
38
|
+
| `context` | None |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
### `.nexus/state/tasks.json`
|
|
43
|
+
|
|
44
|
+
| Attribute | Value |
|
|
45
|
+
|-----------|-------|
|
|
46
|
+
| Scope | Session |
|
|
47
|
+
| Git-tracked | No |
|
|
48
|
+
| Created by | `task_add` (on first call) |
|
|
49
|
+
| Deleted by | `task_close` |
|
|
50
|
+
|
|
51
|
+
**Purpose.** Holds the active task list. Contains a top-level `goal` string, a `decisions` string array (key decisions from the plan session), and a `tasks` array. Each task records `id`, `title`, `context`, optional `approach`, `acceptance`, `risk`, `status`, `deps`, `plan_issue`, `owner`, `owner_agent_id`, `owner_reuse_policy`, and `created_at`.
|
|
52
|
+
|
|
53
|
+
**Creation trigger.** `task_add` initializes this file with `{ goal: "", decisions: [], tasks: [] }` when it does not yet exist, then immediately appends the first task.
|
|
54
|
+
|
|
55
|
+
**Deletion trigger.** `task_close` archives the task list into `history.json` and deletes this file.
|
|
56
|
+
|
|
57
|
+
**Tool access.**
|
|
58
|
+
|
|
59
|
+
| Tool | Access |
|
|
60
|
+
|------|--------|
|
|
61
|
+
| `task_add` | Write (creates if absent) |
|
|
62
|
+
| `task_list` | Read |
|
|
63
|
+
| `task_update` | Read + Write |
|
|
64
|
+
| `task_close` | Read + Delete |
|
|
65
|
+
| `context` | Read |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
### `.nexus/history.json`
|
|
70
|
+
|
|
71
|
+
| Attribute | Value |
|
|
72
|
+
|-----------|-------|
|
|
73
|
+
| Scope | Project |
|
|
74
|
+
| Git-tracked | Yes |
|
|
75
|
+
| Created by | `plan_start` or `task_close` (on first archive) |
|
|
76
|
+
| Deleted by | Never |
|
|
77
|
+
|
|
78
|
+
**Purpose.** Append-only ledger of completed planning and execution cycles. Each entry (a "cycle") captures `completed_at`, `branch`, the full `plan` object (or `null`), and the full `tasks` array at time of closure.
|
|
79
|
+
|
|
80
|
+
**Creation trigger.** Created automatically by `plan_start` when it archives a prior session, or by `task_close` when it archives the current cycle. If the file already exists, new cycles are appended to the `cycles` array.
|
|
81
|
+
|
|
82
|
+
**Deletion trigger.** Never deleted. This file is the permanent project record.
|
|
83
|
+
|
|
84
|
+
**Tool access.**
|
|
85
|
+
|
|
86
|
+
| Tool | Access |
|
|
87
|
+
|------|--------|
|
|
88
|
+
| `plan_start` | Read + Write (archive pre-existing plan) |
|
|
89
|
+
| `task_close` | Read + Write (archive current cycle) |
|
|
90
|
+
| `history_search` | Read |
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
### `.nexus/state/runtime.json`
|
|
95
|
+
|
|
96
|
+
| Attribute | Value |
|
|
97
|
+
|-----------|-------|
|
|
98
|
+
| Scope | Session |
|
|
99
|
+
| Git-tracked | No |
|
|
100
|
+
| Created by | Session start (harness hook) |
|
|
101
|
+
| Deleted by | Session end (harness hook) |
|
|
102
|
+
|
|
103
|
+
**Purpose.** Holds session-level runtime metadata established when the harness initializes (e.g., session identifiers, harness version, environment properties). This file is managed entirely by the harness layer; no Nexus MCP tool writes to it.
|
|
104
|
+
|
|
105
|
+
**Creation trigger.** Written by the harness during session initialization before any tool is called.
|
|
106
|
+
|
|
107
|
+
**Deletion trigger.** Removed by the harness upon session teardown.
|
|
108
|
+
|
|
109
|
+
**Tool access.** Read-only by the harness infrastructure. No Nexus MCP tool listed in this specification reads or writes this file directly.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
### `.nexus/state/agent-tracker.json`
|
|
114
|
+
|
|
115
|
+
| Attribute | Value |
|
|
116
|
+
|-----------|-------|
|
|
117
|
+
| Scope | Session |
|
|
118
|
+
| Git-tracked | No |
|
|
119
|
+
| Created by | Session start (harness hook) |
|
|
120
|
+
| Deleted by | Session end (harness hook) |
|
|
121
|
+
|
|
122
|
+
**Purpose.** Tracks agent instance activity during the session — which agents were spawned, their instance IDs, and what artifacts they touched. Used by the harness to evaluate `owner_reuse_policy` on subsequent `task_add` calls and to support agent resume.
|
|
123
|
+
|
|
124
|
+
**Creation trigger.** Initialized by the harness at session start.
|
|
125
|
+
|
|
126
|
+
**Deletion trigger.** Removed by the harness upon session teardown.
|
|
127
|
+
|
|
128
|
+
**Tool access.** Managed exclusively by harness hooks. No Nexus MCP tool listed in this specification writes to this file; `task_add` reads the `owner_agent_id` field from tasks to inform the harness, but does not access `agent-tracker.json` directly.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
### `.nexus/state/artifacts/`
|
|
133
|
+
|
|
134
|
+
| Attribute | Value |
|
|
135
|
+
|-----------|-------|
|
|
136
|
+
| Scope | Session |
|
|
137
|
+
| Git-tracked | No |
|
|
138
|
+
| Created by | `artifact_write` |
|
|
139
|
+
| Deleted by | Session end (harness cleanup) or manual removal |
|
|
140
|
+
|
|
141
|
+
**Purpose.** Stores named artifact files produced by agents during a session — research outputs, synthesis documents, analysis reports, and similar deliverables. Each file is written by a single call to `artifact_write` and may be overwritten by subsequent calls with the same filename.
|
|
142
|
+
|
|
143
|
+
**Creation trigger.** The directory is created on demand by the first `artifact_write` call in a session.
|
|
144
|
+
|
|
145
|
+
**Deletion trigger.** Session-scoped; not archived by `task_close`. Persistence beyond the session is the caller's responsibility.
|
|
146
|
+
|
|
147
|
+
**Tool access.**
|
|
148
|
+
|
|
149
|
+
| Tool | Access |
|
|
150
|
+
|------|--------|
|
|
151
|
+
| `artifact_write` | Write (creates directory if absent, writes file) |
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Content File Conventions
|
|
156
|
+
|
|
157
|
+
The following directories hold project-scoped knowledge files. All are git-tracked and persist across sessions and cycles.
|
|
158
|
+
|
|
159
|
+
### `.nexus/memory/*.md`
|
|
160
|
+
|
|
161
|
+
**Purpose.** Stores lessons learned, reference notes, and factual anchors accumulated during project work. Each file is a discrete note tagged with the `[m]` convention. Files are authored and updated by the Lead agent in response to `[m]` tags in conversation.
|
|
162
|
+
|
|
163
|
+
**Lifecycle.** Created manually or by Lead; updated incrementally. Stale entries are garbage-collected via the `[m:gc]` convention. No Nexus MCP tool writes to this directory.
|
|
164
|
+
|
|
165
|
+
**Format.** Plain Markdown. An optional `<!-- tags: tag1, tag2, tag3 -->` comment may appear as the first line to support filtering. No required frontmatter schema.
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
### `.nexus/context/*.md`
|
|
170
|
+
|
|
171
|
+
**Purpose.** Stores design principles, architecture philosophy, and structural decisions that define how the project should evolve. These files represent the canonical design record and are the primary input for the `nx-sync` skill.
|
|
172
|
+
|
|
173
|
+
**Lifecycle.** Created and updated by the `nx-sync` skill, which scans the current project state and reconciles it with existing context documents. Human authors may also edit these files directly. No Nexus MCP tool writes to this directory during normal execution.
|
|
174
|
+
|
|
175
|
+
**Format.** Plain Markdown. An optional `<!-- tags: tag1, tag2, tag3 -->` comment may appear as the first line. No required frontmatter schema.
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
### `.nexus/rules/*.md`
|
|
180
|
+
|
|
181
|
+
**Purpose.** Stores user-defined rules that govern agent behavior, coding conventions, and process constraints specific to this project. Rules are authored by the user via the `[rule]` and `[rule:*]` tag conventions.
|
|
182
|
+
|
|
183
|
+
**Lifecycle.** Created by the Lead agent when the user asserts a rule via the `[rule]` tag. Rules persist indefinitely unless explicitly removed or superseded. No Nexus MCP tool writes to this directory.
|
|
184
|
+
|
|
185
|
+
**Format.** Plain Markdown. An optional `<!-- tags: tag1, tag2, tag3 -->` comment may appear as the first line to support categorization. No required frontmatter schema.
|