@dall337/lore 0.0.0-stage → 0.1.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/License.md +21 -0
- package/README.md +210 -2
- package/bin/lore.mjs +187 -0
- package/hud/dist/client/assets/index-BA5GHj6l.css +1 -0
- package/hud/dist/client/assets/index-C1P2dBAT.js +7 -0
- package/hud/dist/client/assets/jetbrains-mono-cyrillic-400-normal-BEIGL1Tu.woff2 +0 -0
- package/hud/dist/client/assets/jetbrains-mono-cyrillic-400-normal-ugxPyKxw.woff +0 -0
- package/hud/dist/client/assets/jetbrains-mono-cyrillic-600-normal-8K4wrrwR.woff +0 -0
- package/hud/dist/client/assets/jetbrains-mono-cyrillic-600-normal-EVf6-Yzo.woff2 +0 -0
- package/hud/dist/client/assets/jetbrains-mono-greek-400-normal-B9oWc5Lo.woff +0 -0
- package/hud/dist/client/assets/jetbrains-mono-greek-400-normal-C190GLew.woff2 +0 -0
- package/hud/dist/client/assets/jetbrains-mono-greek-600-normal-H7WoG9Et.woff2 +0 -0
- package/hud/dist/client/assets/jetbrains-mono-greek-600-normal-mc2nkWzM.woff +0 -0
- package/hud/dist/client/assets/jetbrains-mono-latin-400-normal-6-qcROiO.woff +0 -0
- package/hud/dist/client/assets/jetbrains-mono-latin-400-normal-V6pRDFza.woff2 +0 -0
- package/hud/dist/client/assets/jetbrains-mono-latin-600-normal-BfsvjouI.woff +0 -0
- package/hud/dist/client/assets/jetbrains-mono-latin-600-normal-C8RAYTDA.woff2 +0 -0
- package/hud/dist/client/assets/jetbrains-mono-latin-ext-400-normal-Bc8Ftmh3.woff2 +0 -0
- package/hud/dist/client/assets/jetbrains-mono-latin-ext-400-normal-fXTG6kC5.woff +0 -0
- package/hud/dist/client/assets/jetbrains-mono-latin-ext-600-normal-BfB_LPfz.woff2 +0 -0
- package/hud/dist/client/assets/jetbrains-mono-latin-ext-600-normal-DObL3zCW.woff +0 -0
- package/hud/dist/client/assets/jetbrains-mono-vietnamese-400-normal-CqNFfHCs.woff +0 -0
- package/hud/dist/client/assets/jetbrains-mono-vietnamese-600-normal-OWROknRo.woff +0 -0
- package/hud/dist/client/index.html +17 -0
- package/hud/dist/client/licenses/JetBrainsMono-OFL.txt +93 -0
- package/hud/dist/server/main.js +1287 -0
- package/package.json +52 -4
- package/suite/AGENTS.md +228 -0
- package/suite/CLAUDE.md +19 -0
- package/suite/claude-settings-additions.json +16 -0
- package/suite/gitignore-additions.txt +17 -0
- package/suite/memory/INDEX.md +41 -0
- package/suite/policies/adversarial-check.md +169 -0
- package/suite/policies/board.md +103 -0
- package/suite/policies/creative.md +92 -0
- package/suite/policies/documentation.md +100 -0
- package/suite/policies/git.md +105 -0
- package/suite/policies/implementation.md +100 -0
- package/suite/policies/memory.md +453 -0
- package/suite/policies/orchestration.md +184 -0
- package/suite/policies/release.md +56 -0
- package/suite/policies/research.md +133 -0
- package/suite/policies/reserved/failure-and-recovery.md +6 -0
- package/suite/policies/reserved/migration.md +6 -0
- package/suite/policies/reserved/planning.md +6 -0
- package/suite/policies/reserved/review.md +6 -0
- package/suite/policies/reserved/test-authoring.md +6 -0
- package/suite/policies/security.md +85 -0
- package/suite/policies/tooling.md +153 -0
- package/suite/policies/verification.md +60 -0
- package/suite/scripts/agents-md-budget.mjs +71 -0
- package/suite/scripts/memory-lint.mjs +117 -0
- package/suite/scripts/provider-memory.mjs +298 -0
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
# Memory Usage Policy
|
|
2
|
+
|
|
3
|
+
Scoped agent-governance procedure (AGENTS.md §1/§2). Load on first contact
|
|
4
|
+
with the repository and whenever configuring, reading, or writing its
|
|
5
|
+
operational memory. Resolve the chosen entry point from AGENTS.md §5.
|
|
6
|
+
|
|
7
|
+
## 0. Configured Memory
|
|
8
|
+
|
|
9
|
+
> **Addendum (2026-10-02, owner-directed memory adaptation):** The bundled
|
|
10
|
+
> web is an available backend. A project may instead point to existing
|
|
11
|
+
> agent-native memory, a company memory system, or another approved
|
|
12
|
+
> location. This section governs selection. Sections 1–7 describe the
|
|
13
|
+
> bundled web; their layout, identity files, content rules, append-only
|
|
14
|
+
> formatting, and git conventions apply when that backend is selected.
|
|
15
|
+
|
|
16
|
+
> **Erratum (2026-10-02, owner clarification of the web):** The navigable
|
|
17
|
+
> map and progressively specific rings in §§1–2 apply across storage
|
|
18
|
+
> providers. The earlier qualification of §§1–7 makes their storage-specific
|
|
19
|
+
> file layout, identity files, and mutation conventions conditional; it
|
|
20
|
+
> does not make the web's navigation model optional.
|
|
21
|
+
|
|
22
|
+
### Preserve the Navigable Rings
|
|
23
|
+
|
|
24
|
+
Give agents a discoverable repository hub, then a route through categories
|
|
25
|
+
that match the actual repository. The first ring names broad areas or
|
|
26
|
+
concerns. Each deeper ring narrows to a subsystem, workflow, feature, or
|
|
27
|
+
other working scope until the agent reaches the node that points to the
|
|
28
|
+
relevant code, decisions, task evidence, and current status.
|
|
29
|
+
|
|
30
|
+
For example, a route might be: repository hub → data storage → writes →
|
|
31
|
+
retry behavior → the owning code and journal. The categories follow the
|
|
32
|
+
repository; there is no universal taxonomy or prescribed number of rings.
|
|
33
|
+
Create narrower nodes as the work and information require them, and add
|
|
34
|
+
cross-links where another area matters to the current task.
|
|
35
|
+
|
|
36
|
+
Keep navigation nodes small: scope, the next useful links, and concise
|
|
37
|
+
status or pointers to status. Walk only the relevant branch and follow its
|
|
38
|
+
references to authoritative detail. Avoid loading every ring or all stored
|
|
39
|
+
memory to answer a question about one area. An agent that already knows
|
|
40
|
+
the appropriate node can resume there and use parent or cross-links when
|
|
41
|
+
the task broadens.
|
|
42
|
+
|
|
43
|
+
This structure can live in the bundled files, a provider's categories and
|
|
44
|
+
linked records, or another supported representation. If an existing
|
|
45
|
+
agent/company memory cannot expose a usable walk, configure a thin
|
|
46
|
+
navigation index elsewhere that points into that memory and the repository.
|
|
47
|
+
The index supplies routes; the existing records retain their authority and
|
|
48
|
+
content conventions. Record how the route maps to provider references or
|
|
49
|
+
scoped queries in AGENTS.md §5 so another agent can follow it too.
|
|
50
|
+
|
|
51
|
+
### Select the Existing Home First
|
|
52
|
+
|
|
53
|
+
Before creating a memory directory or registry, read the memory
|
|
54
|
+
configuration in [AGENTS.md §5](../AGENTS.md#memory-configuration), or the
|
|
55
|
+
configuration document it points to. Inspect established project and
|
|
56
|
+
company memory instructions. Use the selected system and its repository
|
|
57
|
+
scope. If its entry point already exposes the repository web, an agent can
|
|
58
|
+
orient there directly. Otherwise configure the navigation mapping or a
|
|
59
|
+
thin index that leads to its records; a replacement memory module is
|
|
60
|
+
unnecessary.
|
|
61
|
+
|
|
62
|
+
When no choice has been made, help the owner record one. The choices are
|
|
63
|
+
the bundled link web, an existing agent/company memory system, or another
|
|
64
|
+
location such as a shared file, document, or service. Identify how agents
|
|
65
|
+
find, read, and update the chosen home. Keep a discoverable pointer in
|
|
66
|
+
AGENTS.md even when the memory itself lives elsewhere.
|
|
67
|
+
|
|
68
|
+
An existing company's access, content, history, and retention conventions
|
|
69
|
+
continue to govern its system. Do not replace them with the bundled web's
|
|
70
|
+
folder layout or append-only file rules, migrate its records, or create a
|
|
71
|
+
competing copy of its knowledge without an owner decision. A pointer index
|
|
72
|
+
can provide the web's navigation while leaving those records in place.
|
|
73
|
+
A later backend change is recorded in the configuration and the chosen
|
|
74
|
+
decision record. The evolution process in §6 still applies, using the
|
|
75
|
+
configured locations.
|
|
76
|
+
|
|
77
|
+
### Keep the Repository Knowledge Findable
|
|
78
|
+
|
|
79
|
+
For the repository's operational records, preserve the useful role of
|
|
80
|
+
memory: find current status, the relevant artifacts, and enough dated
|
|
81
|
+
context to distinguish a current decision from one it superseded. Use the
|
|
82
|
+
provider's own representation for those records. Canonical code,
|
|
83
|
+
documentation, and task evidence remain authoritative; memory should
|
|
84
|
+
point to them and identify the status it records.
|
|
85
|
+
|
|
86
|
+
An agent's memory may also hold other material under that agent's or
|
|
87
|
+
company's conventions. LORE's link-web content rules describe the bundled
|
|
88
|
+
module, not every record an existing provider maintains. Research detail
|
|
89
|
+
continues to live in its task journal under [research policy](research.md),
|
|
90
|
+
with a link or reference from the chosen memory when it supports one.
|
|
91
|
+
|
|
92
|
+
### Match Coordination to Actual Visibility
|
|
93
|
+
|
|
94
|
+
Check who can see the chosen records, whether they survive a session, and
|
|
95
|
+
which agents can write them. Personal agent memory can aid its own
|
|
96
|
+
orientation while a separate shared record handles claims and handoffs.
|
|
97
|
+
Record that coordination location in AGENTS.md §5 and follow
|
|
98
|
+
[orchestration policy §0](orchestration.md#0-configured-coordination).
|
|
99
|
+
Do not assume a private memory, unsynced clone, or provider inaccessible to
|
|
100
|
+
another agent is a shared coordination channel.
|
|
101
|
+
|
|
102
|
+
When memory is unavailable or read-only, record that limit in the task
|
|
103
|
+
journal and use a configured fallback when available. Continue authorized
|
|
104
|
+
work that does not depend on unavailable knowledge or an unconfirmed
|
|
105
|
+
claim. Do not silently manufacture another store and treat it as the
|
|
106
|
+
configured source. Overlapping writes require a visible coordination
|
|
107
|
+
record or explicit sequencing through the owner.
|
|
108
|
+
|
|
109
|
+
### Coexist with Provider-Native Memory
|
|
110
|
+
|
|
111
|
+
> **Addendum (2026-10-17, owner-directed provider memory):** Agent
|
|
112
|
+
> harnesses keep memory of their own whether or not a project selects
|
|
113
|
+
> it. This subsection governs coexistence. Owner rulings: the provider's
|
|
114
|
+
> conventions win inside its store, except the shape of an index the
|
|
115
|
+
> agent writes; LORE writes only pointers there; that index is a
|
|
116
|
+
> links-only hub over areas named for the policies, reserved scopes
|
|
117
|
+
> included; and the platform registry (§3) stays as coordination
|
|
118
|
+
> identity.
|
|
119
|
+
|
|
120
|
+
A harness's native memory, whether notes the agent writes for itself or
|
|
121
|
+
memory the harness generates from past sessions, is that harness's
|
|
122
|
+
**private layer**. It runs alongside the configured backend and becomes
|
|
123
|
+
the backend only when the configuration selects it. Keeping it does not
|
|
124
|
+
break the rule above against manufacturing another store; that rule
|
|
125
|
+
covers a substitute treated as the configured source.
|
|
126
|
+
|
|
127
|
+
**The provider's conventions govern inside its store.** Its record
|
|
128
|
+
format, load limits, update and deletion rules, and its own judgment of
|
|
129
|
+
what is worth keeping apply as the provider defines them. LORE adds one
|
|
130
|
+
requirement where the agent writes the index: the hub shape below. The
|
|
131
|
+
web's identity files (§3) and append-only discipline (§4) stop at the
|
|
132
|
+
store's boundary.
|
|
133
|
+
|
|
134
|
+
**Keep the layers separate.** The private layer holds what the provider
|
|
135
|
+
keeps for the agent's own later use, such as the owner's working
|
|
136
|
+
preferences and corrections. Anything another agent needs belongs in
|
|
137
|
+
the shared layer: status, claims, releases, handoffs, decisions, and the
|
|
138
|
+
routes to them live in the configured web, its coordination location, a
|
|
139
|
+
task journal, or the repository. The shared layer never depends on a
|
|
140
|
+
private memory for something another agent must know. When a private
|
|
141
|
+
note turns out to matter beyond its harness, promote it: record it in
|
|
142
|
+
the shared layer, or draft it as a rule through the accumulation loop
|
|
143
|
+
(AGENTS.md §3).
|
|
144
|
+
|
|
145
|
+
**LORE writes pointers, nothing more.** Where a provider lets the agent
|
|
146
|
+
write its memory, the agent may record routes into LORE: the web entry
|
|
147
|
+
point, a node it works from, a journal, the memory configuration. A
|
|
148
|
+
pointer never restates, supersedes, or owns a repository or web record.
|
|
149
|
+
When a pointer and its target disagree, the target is current and the
|
|
150
|
+
pointer is corrected under the provider's rules. A pointer also follows
|
|
151
|
+
the provider's guidance on what to save; a route the project's
|
|
152
|
+
instruction files already give needs no second copy. Where the provider
|
|
153
|
+
generates its memory itself, LORE writes nothing into it, and the
|
|
154
|
+
instruction file the harness reads is the pointer channel. The hub and
|
|
155
|
+
area indexes below are pointers of this kind.
|
|
156
|
+
|
|
157
|
+
**The index is a hub, not a memory.** Providers load a capped index at
|
|
158
|
+
session start; Claude Code, for one, reads the first 200 lines or 25KB
|
|
159
|
+
of its `MEMORY.md`. Where the agent writes that index, it holds
|
|
160
|
+
headings and links to area indexes, and nothing else: no prose, no
|
|
161
|
+
status, no individual memories. Each area index holds headings, one
|
|
162
|
+
scope line, and links to the topic files that hold the memories, or to
|
|
163
|
+
sub-areas once the area gets crowded. Every topic file is reachable from
|
|
164
|
+
the hub through an area. The cap then bounds the number of areas rather
|
|
165
|
+
than the number of memories, and nothing has to be condensed or cut to
|
|
166
|
+
fit.
|
|
167
|
+
|
|
168
|
+
**Areas follow the dispatch table.** Each policy has an area named for
|
|
169
|
+
it, such as `area_research.md` for `policies/research.md`, and so does
|
|
170
|
+
each reserved scope in `policies/reserved/`, so the hub shows an agent
|
|
171
|
+
every scope before it has rules. A lesson filed in a reserved area is a
|
|
172
|
+
candidate for that scope's first rule (AGENTS.md §3). An owner area
|
|
173
|
+
holds who the owner is and how they work, and repository areas are
|
|
174
|
+
added as memories about parts of the code need them. When the dispatch
|
|
175
|
+
table loads a policy, open its area as well; open the owner area on
|
|
176
|
+
first contact. When a policy is added, renamed, or removed, its area
|
|
177
|
+
follows, and the check reports an area that has fallen out of step.
|
|
178
|
+
|
|
179
|
+
**What must apply every session is an instruction, not a memory.** A
|
|
180
|
+
hub link is a route; it does not guarantee a read. A rule that has to
|
|
181
|
+
hold in every session belongs in the instruction files the harness
|
|
182
|
+
always loads, or in a policy through the accumulation loop.
|
|
183
|
+
|
|
184
|
+
**Form is guard-enforced.** `scripts/provider-memory.mjs init` seeds the
|
|
185
|
+
hub and areas from the policy files and never overwrites a file.
|
|
186
|
+
`check` validates the hub and areas, reachability, link targets, the
|
|
187
|
+
areas' coverage of the policies, and the hub's size against half the
|
|
188
|
+
provider's cap. Its `hook` mode runs after each memory write in Claude
|
|
189
|
+
Code (`claude-settings-additions.json`) and returns findings to the
|
|
190
|
+
agent at once. An index that predates this shape is migrated before the
|
|
191
|
+
hook is enabled, and the migration is an owner decision. Where the
|
|
192
|
+
provider generates its memory itself, LORE neither seeds nor checks it.
|
|
193
|
+
|
|
194
|
+
**Recall is not coordination.** A private memory of having claimed or
|
|
195
|
+
finished something establishes neither; the shared record does (§3
|
|
196
|
+
self-recognition, [orchestration policy §0](orchestration.md#0-configured-coordination)).
|
|
197
|
+
Native memory is usually local to one machine and readable only by its
|
|
198
|
+
own harness, and its scope may be one repository or every project the
|
|
199
|
+
harness touches. Record each harness's location, scope, and LORE's use
|
|
200
|
+
of it in the [provider memory table](../AGENTS.md#provider-memory).
|
|
201
|
+
|
|
202
|
+
### Apply the Matching Checks
|
|
203
|
+
|
|
204
|
+
The bundled `scripts/memory-lint.mjs` validates the bundled web's file
|
|
205
|
+
format at its supplied repository root. It does not validate an
|
|
206
|
+
agent-native or external store. The project's standard check suite
|
|
207
|
+
(`verification.md` Rule 1) names the applicable provider checks, if any,
|
|
208
|
+
and distinguishes unchecked capabilities from verified ones. The shipped
|
|
209
|
+
template guard can still check the template without making it the active
|
|
210
|
+
memory backend.
|
|
211
|
+
|
|
212
|
+
## 1. What Memory Is
|
|
213
|
+
|
|
214
|
+
The repository is the truth. Memory is the **map** — a shared, persistent,
|
|
215
|
+
walkable web of links with a status overlay. An agent (or sub-agent) walks
|
|
216
|
+
the web from the hub outward, each hop growing more specific, until it
|
|
217
|
+
arrives at the place that says what needs work versus what is done, and
|
|
218
|
+
where the details live.
|
|
219
|
+
|
|
220
|
+
Memory never contains the specifics of a given edit, creation, or feature.
|
|
221
|
+
It contains **links** — to repo paths, docs, ADRs, plans, journals,
|
|
222
|
+
branches, PRs — and **status**. The moment a node starts explaining *how*
|
|
223
|
+
something works instead of pointing at where that's recorded, it has
|
|
224
|
+
drifted into being a second copy of the repo, and second copies rot.
|
|
225
|
+
|
|
226
|
+
## 2. Shape — the Web
|
|
227
|
+
|
|
228
|
+
```
|
|
229
|
+
memory/
|
|
230
|
+
INDEX.md ← the hub. Every walk starts here.
|
|
231
|
+
agents/
|
|
232
|
+
<agent-id>.md ← one per primary agent (§3)
|
|
233
|
+
<area>.md ← first-ring nodes: broad areas of the repo
|
|
234
|
+
<area>/
|
|
235
|
+
<subarea>.md ← deeper rings: increasingly specific
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
- **The hub** (`memory/INDEX.md`) links every first-ring node, the agent
|
|
239
|
+
registry, and any structural decisions about memory itself (§6). It
|
|
240
|
+
carries no repo detail of its own.
|
|
241
|
+
- **Area nodes** cover a broad concern — a domain, a subsystem, a
|
|
242
|
+
long-running arc. Each links deeper nodes, the owning repo paths, and
|
|
243
|
+
the governing docs.
|
|
244
|
+
- **Leaf nodes** are the most specific: a feature, a migration, a
|
|
245
|
+
component family. This is where status lives at working granularity.
|
|
246
|
+
|
|
247
|
+
Each node carries, in order:
|
|
248
|
+
|
|
249
|
+
1. A one-line scope statement — what this node maps.
|
|
250
|
+
2. A **link table** — where the relevant truth lives.
|
|
251
|
+
3. A **status ledger** — dated entries (§4).
|
|
252
|
+
4. A **claims section** — active and released claims
|
|
253
|
+
(`policies/orchestration.md`).
|
|
254
|
+
|
|
255
|
+
Node granularity follows need, not symmetry. Rings grow when a node's
|
|
256
|
+
ledger gets crowded enough that walkers can't find things — that crowding
|
|
257
|
+
is the signal to split, by appending links to new child nodes.
|
|
258
|
+
|
|
259
|
+
## 3. Identity, Registration, and Who Writes
|
|
260
|
+
|
|
261
|
+
> **Erratum (2026-10-17, owner ruling on the registry):** The platform
|
|
262
|
+
> registry records coordination identity: the exact full id used each
|
|
263
|
+
> session, the model in use, claims, journal links, and sub-agent ids.
|
|
264
|
+
> Its "longitudinal ledger" below is the lineage of that identity, not
|
|
265
|
+
> the platform's continuity store. What an agent keeps for its own later
|
|
266
|
+
> use belongs in its provider memory (§0); the state of a piece of work
|
|
267
|
+
> resumes from its node and journal (`policies/orchestration.md` §5).
|
|
268
|
+
> The self-recognition rule below still holds where a harness keeps
|
|
269
|
+
> native memory: a claim is yours only by the exact id registered this
|
|
270
|
+
> session, never because a private memory recalls taking it.
|
|
271
|
+
|
|
272
|
+
**Identity is the platform — the harness, not the model.** Claude Code,
|
|
273
|
+
Codex, Grok: whatever agent harness is running is the identity. Models
|
|
274
|
+
swap inside a harness mid-session; the model in use is session metadata
|
|
275
|
+
in the registry entry, never an identity segment, so a model change
|
|
276
|
+
cannot orphan live claims.
|
|
277
|
+
|
|
278
|
+
**Identity is a path, deepened only as uniqueness demands** — the same
|
|
279
|
+
granularity principle as the web's rings. A discriminator's only job is
|
|
280
|
+
uniqueness among *live* agents:
|
|
281
|
+
|
|
282
|
+
- One live instance of a platform: the platform name is the whole id —
|
|
283
|
+
`claude-code`.
|
|
284
|
+
- Multiple live instances of the same platform: each takes a
|
|
285
|
+
discriminator segment — **by assigned area when the work is
|
|
286
|
+
partitioned** (`claude-code/frontend`, `claude-code/backend`), **by
|
|
287
|
+
session date otherwise** (`claude-code/2026-08-30-a`). Area
|
|
288
|
+
discriminators are self-documenting but can drift if scope moves
|
|
289
|
+
mid-session; if an instance's work leaves its named area, coordinate
|
|
290
|
+
and re-register rather than working under a misleading name.
|
|
291
|
+
- **Sub-agents carry the parent id plus their assigned task,** deepening
|
|
292
|
+
area → focus → file only as needed to be unique among live siblings:
|
|
293
|
+
`claude-code/research--frontend`, and only if two research subs share
|
|
294
|
+
an area, `claude-code/research--frontend--auth-forms`. Sub-agent ids
|
|
295
|
+
appear in journal names and the parent's session entry — never as
|
|
296
|
+
registry files.
|
|
297
|
+
|
|
298
|
+
**One registry file per platform, not per instance:**
|
|
299
|
+
`memory/agents/<platform>.md`. Sessions are dated appended entries, each
|
|
300
|
+
recording the full id used that session (with any discriminator), the
|
|
301
|
+
model in use, claims taken, journal links, and sub-agents spawned with
|
|
302
|
+
their ids. The platform file is a longitudinal ledger of everything that
|
|
303
|
+
platform has done in this repository — worth more than a directory of
|
|
304
|
+
one-session fragments.
|
|
305
|
+
|
|
306
|
+
**Self-recognition rule.** Agents have no memory across context windows.
|
|
307
|
+
At session start, a primary appends its session entry **before its first
|
|
308
|
+
claim**; thereafter, a claim is yours only if it carries the exact full
|
|
309
|
+
id you registered this session. "That's my platform, so it's probably
|
|
310
|
+
mine" is not recognition — a claim signed by your platform under a
|
|
311
|
+
different or missing discriminator belongs to a sibling until
|
|
312
|
+
coordination proves otherwise.
|
|
313
|
+
|
|
314
|
+
- **The web itself is shared.** All primary agents append to the same hub
|
|
315
|
+
and nodes. There is no per-agent fork of the map.
|
|
316
|
+
- A primary agent entering a repository with no web **bootstraps it** as
|
|
317
|
+
part of orientation: create the hub, register itself, and lay down
|
|
318
|
+
first-ring nodes for the areas it can already name. A sparse honest web
|
|
319
|
+
beats a speculative complete one — rings grow as work reaches them.
|
|
320
|
+
- **Sub-agents read the web freely but do not register and do not claim.**
|
|
321
|
+
Their findings route through the parent agent, which appends on their
|
|
322
|
+
behalf under its own identity.
|
|
323
|
+
|
|
324
|
+
## 4. Append-Only Discipline
|
|
325
|
+
|
|
326
|
+
**No edits. No deletions. Ever.** The web's history is part of its value —
|
|
327
|
+
a future agent reading a node should be able to see not just what is true
|
|
328
|
+
but what used to be believed.
|
|
329
|
+
|
|
330
|
+
- **Deprecation, not removal.** When a link or entry stops being true,
|
|
331
|
+
strike it through and stamp it, then append the replacement **in the
|
|
332
|
+
same slot, immediately adjacent** — never at the bottom of the file:
|
|
333
|
+
|
|
334
|
+
```
|
|
335
|
+
- ~~[Write manager](src/fs/writeManager.js)~~ — deprecated 2026-08-30,
|
|
336
|
+
superseded by split below
|
|
337
|
+
- [Write pipeline](src/fs/pipeline/) — appended 2026-08-30
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Current truth must be findable where the old truth was. Making devs or
|
|
341
|
+
agents scroll to the bottom to discover the live link is a policy
|
|
342
|
+
violation, not a style choice.
|
|
343
|
+
|
|
344
|
+
- **Status changes are new ledger lines,** dated, never rewrites of old
|
|
345
|
+
ones:
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
- 2026-08-12 — in-progress — claimed, branch feat/example (agent-a)
|
|
349
|
+
- 2026-08-19 — done — merged PR #41, journal .research/2026-08-12-example.md
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
- Status vocabulary: `planned` · `in-progress` · `blocked` · `done` ·
|
|
353
|
+
`deprecated`. Extend it per repo if needed — by an appended dated note
|
|
354
|
+
in the hub, so every walker shares one vocabulary.
|
|
355
|
+
|
|
356
|
+
**Node retirement — the entropy release valve.** Append-only means struck
|
|
357
|
+
content accumulates, and a node whose dead weight drowns its live signal
|
|
358
|
+
has stopped being a map. When a walker can no longer find current truth
|
|
359
|
+
at a glance:
|
|
360
|
+
|
|
361
|
+
1. **Spawn a successor node** carrying only the live links and the open
|
|
362
|
+
tail of the ledger, opening with a birth line:
|
|
363
|
+
`Successor of <old-node>, retired YYYY-MM-DD — full history there.`
|
|
364
|
+
2. **Retire the old node with a banner at the TOP** — dated, pointing
|
|
365
|
+
forward to the successor — and never append to it again. It stays in
|
|
366
|
+
place as the archive.
|
|
367
|
+
3. **Re-point the parents:** strike-and-stamp every hub and parent link
|
|
368
|
+
to the retired node, replacement in-slot pointing at the successor.
|
|
369
|
+
|
|
370
|
+
Nothing is deleted; retirement is archival, so the append-only discipline
|
|
371
|
+
holds. Note that splitting a crowded node into children (§2) is not a
|
|
372
|
+
substitute — splitting copies the crowding into the children. Retirement
|
|
373
|
+
is how dead weight actually leaves the walking path.
|
|
374
|
+
|
|
375
|
+
**Form is guard-enforced.** `scripts/memory-lint.mjs` checks the
|
|
376
|
+
mechanics this section defines — dated ledger lines, stamped strikes,
|
|
377
|
+
well-formed claims and releases — and flags multiple live claims in one
|
|
378
|
+
node. The script is the enforcement of record for the formats it checks
|
|
379
|
+
(AGENTS.md §1); run it per `policies/verification.md`. What it cannot
|
|
380
|
+
check is append-only itself: a stateless lint sees form, not history.
|
|
381
|
+
That discipline remains on the agent.
|
|
382
|
+
|
|
383
|
+
## 5. Git Status
|
|
384
|
+
|
|
385
|
+
**Gitignored by default** (`memory/` in `.gitignore`), unless the owner
|
|
386
|
+
says differently — that call is the owner's, made once and recorded in
|
|
387
|
+
the hub.
|
|
388
|
+
|
|
389
|
+
The tradeoff to surface when asking: ignored memory is invisible to other
|
|
390
|
+
clones. The web coordinates only agents who can see it. Same working tree,
|
|
391
|
+
no problem. Agents operating from separate clones or machines need the web
|
|
392
|
+
committed (or otherwise synced) before parallel work starts —
|
|
393
|
+
`policies/orchestration.md` §6.
|
|
394
|
+
|
|
395
|
+
**Deciding late is the expensive direction.** The ignored→committed flip
|
|
396
|
+
is retroactive and irreversible in one motion: every entry ever written
|
|
397
|
+
becomes public simultaneously, and append-only means the back-history
|
|
398
|
+
cannot be removed afterward — only struck, which leaves the text in
|
|
399
|
+
place. Agents write into an ignored web with the working assumption that
|
|
400
|
+
it is local operational state, so it accumulates internal names, machine
|
|
401
|
+
paths, unreleased project names, and candid status notes at a standard
|
|
402
|
+
no one set for publication.
|
|
403
|
+
|
|
404
|
+
Therefore: **make this call before the web has a history, not after.** If
|
|
405
|
+
the decision is deferred, treat the web as if it were already public
|
|
406
|
+
while it stays undecided. And if a flip to committed is made on a web
|
|
407
|
+
that already has depth, it is a review, not a toggle — read the whole
|
|
408
|
+
web first, and treat anything unpublishable as a reason to keep it
|
|
409
|
+
ignored rather than a thing to quietly restate.
|
|
410
|
+
|
|
411
|
+
**Git worktrees are a special trap.** Worktree-per-agent is a common
|
|
412
|
+
parallel-agent pattern, and each worktree is a separate working tree — a
|
|
413
|
+
gitignored `memory/` does NOT propagate between worktrees of the same
|
|
414
|
+
repository. Two agents working in sibling worktrees will each see (or
|
|
415
|
+
each create) a private web while believing they share one, which defeats
|
|
416
|
+
every coordination guarantee in `policies/orchestration.md`. Before
|
|
417
|
+
parallel worktree work starts, one of: symlink `memory/` into every
|
|
418
|
+
worktree from a single canonical location, commit the web, or don't run
|
|
419
|
+
the agents in parallel. Owner call, recorded in the hub.
|
|
420
|
+
|
|
421
|
+
## 6. Convention Evolution
|
|
422
|
+
|
|
423
|
+
> **Addendum (2026-10-17, vendor memory has shipped):** Common harnesses
|
|
424
|
+
> now ship first-party memory, and the alongside case below is the
|
|
425
|
+
> standing arrangement: §0's provider-native subsection governs that
|
|
426
|
+
> memory as a private layer. Making a provider's memory the shared
|
|
427
|
+
> backend, or widening what LORE writes into it beyond pointers, remains
|
|
428
|
+
> an owner decision recorded per §0.
|
|
429
|
+
|
|
430
|
+
Memory conventions are lab-shaped and will keep changing. If a platform
|
|
431
|
+
vendor (Anthropic, Cursor, or whoever) ships a first-party memory
|
|
432
|
+
convention:
|
|
433
|
+
|
|
434
|
+
- The new convention **may be discussed and adopted, or declined.** The
|
|
435
|
+
discussion happens with the owner; agents do not migrate memory
|
|
436
|
+
unilaterally.
|
|
437
|
+
- The decision is **structural and locked per repo**: a dated entry in the
|
|
438
|
+
hub records what was adopted or declined and why.
|
|
439
|
+
- A new convention may live as a **separate memory space alongside the
|
|
440
|
+
web** rather than replacing it. The web remains the authoritative map
|
|
441
|
+
until a dated hub decision says otherwise. Bridges between spaces (a
|
|
442
|
+
link from the hub into the new space) are cheap and preferred over
|
|
443
|
+
migration until the new convention has proven itself.
|
|
444
|
+
|
|
445
|
+
## 7. What Memory Is Not
|
|
446
|
+
|
|
447
|
+
- **Not a research journal.** Investigation state lives in `.research/`
|
|
448
|
+
per `policies/research.md`; nodes *link* journals.
|
|
449
|
+
- **Not repo documentation.** ADRs, plans, and briefs live in `docs/` per
|
|
450
|
+
`policies/documentation.md`; nodes *link* them.
|
|
451
|
+
- **Not a changelog.** Git history is the changelog.
|
|
452
|
+
- **Not a scratchpad.** Nothing exploratory; the web records what has been
|
|
453
|
+
established and where to find it.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# Orchestration Policy
|
|
2
|
+
|
|
3
|
+
Scoped agent-governance procedure (AGENTS.md §1/§2). Load whenever more
|
|
4
|
+
than one agent may touch this repository in overlapping time, whenever
|
|
5
|
+
starting or ending a session in a shared repository, and whenever work is
|
|
6
|
+
being split across agents or handed off between them.
|
|
7
|
+
|
|
8
|
+
**The coordination substrate is the memory web** (`policies/memory.md`).
|
|
9
|
+
Claims live at memory nodes; there is no separate coordination board. One
|
|
10
|
+
substrate serves as both map and ledger: an orchestrating agent assigns
|
|
11
|
+
areas by writing claims at nodes, and a working agent walks to its node
|
|
12
|
+
and sees scope, neighbors, status, and what is already done — in one
|
|
13
|
+
place. If this unification stops fitting a project, the owner and agents
|
|
14
|
+
may split the substrates; that is a structural decision recorded in the
|
|
15
|
+
memory hub.
|
|
16
|
+
|
|
17
|
+
> **Addendum (2026-10-17, owner-directed board):** The LORE board can be
|
|
18
|
+
> configured as the work-status record (AGENTS.md §5,
|
|
19
|
+
> `policies/board.md`). It is not the coordination board ruled out
|
|
20
|
+
> above: it carries no claims. Claims, releases, and handoffs stay at the
|
|
21
|
+
> configured coordination location, and a card may link the record that
|
|
22
|
+
> holds its claim.
|
|
23
|
+
|
|
24
|
+
## 0. Configured Coordination
|
|
25
|
+
|
|
26
|
+
> **Erratum (2026-10-02, owner-directed memory adaptation):** Resolve the
|
|
27
|
+
> coordination location in AGENTS.md §5 before using the web-specific
|
|
28
|
+
> procedures below. Memory and coordination may share a provider or live
|
|
29
|
+
> in separate places. The earlier single-web description is the bundled
|
|
30
|
+
> default; a configured agent or company memory remains governed by its
|
|
31
|
+
> own conventions.
|
|
32
|
+
|
|
33
|
+
Use the configured shared location for sessions, scope claims, releases,
|
|
34
|
+
dependencies, and handoff pointers. "Node" and "hub" refer to the web's
|
|
35
|
+
logical navigation across providers; the concrete registry files and paths
|
|
36
|
+
below describe the bundled implementation. Use the configured navigation
|
|
37
|
+
mapping to find another provider's corresponding project area and records.
|
|
38
|
+
Preserve exact claimant identity, scope, confirmation of the claim, visible
|
|
39
|
+
release, and handoff evidence;
|
|
40
|
+
the provider's supported representation governs the storage format.
|
|
41
|
+
|
|
42
|
+
All participating agents must be able to see the same coordination state
|
|
43
|
+
and confirm their claims there. Private agent memory, a read-only memory
|
|
44
|
+
provider, or separate unsynced memories can still help orientation; record
|
|
45
|
+
claims in the separately configured shared location. A project note or
|
|
46
|
+
shared file can provide that location without a dedicated memory module.
|
|
47
|
+
|
|
48
|
+
If no accessible shared location exists, sequence overlapping work through
|
|
49
|
+
the owner. Do not infer another agent's agreement from a private claim.
|
|
50
|
+
The configured provider's visibility and confirmation are what establish
|
|
51
|
+
coordination; merely having a memory module does not establish them.
|
|
52
|
+
|
|
53
|
+
> **Addendum (2026-10-02, navigation clarification):** A separate shared
|
|
54
|
+
> coordination record is linked from the relevant working node in the web.
|
|
55
|
+
> Walking from broad scope to specific work should reveal its claim and
|
|
56
|
+
> handoff location even when that record and the memory use different stores.
|
|
57
|
+
|
|
58
|
+
## 1. Roles
|
|
59
|
+
|
|
60
|
+
- **Owner** — the human. Final authority on scope disputes, merge order,
|
|
61
|
+
and everything else.
|
|
62
|
+
- **Orchestrator** — an optional coordinating agent. May partition work,
|
|
63
|
+
write claims on behalf of workers, and sequence merges. An orchestrator
|
|
64
|
+
is a convenience, not a requirement; the claim rules below work
|
|
65
|
+
peer-to-peer without one.
|
|
66
|
+
- **Primary agents** — registered in `memory/agents/<platform>.md` under
|
|
67
|
+
the identity scheme of memory policy §3: platform-rooted path ids,
|
|
68
|
+
discriminated (by area or session date) only when multiple instances of
|
|
69
|
+
the same platform are live. Claim, work, release — always under the
|
|
70
|
+
exact full id registered this session.
|
|
71
|
+
- **Sub-agents** — act under their parent's claim and identity. They never
|
|
72
|
+
claim, never register, and report findings to the parent, who appends to
|
|
73
|
+
the web on their behalf. Sub-agents DO keep their own research journals
|
|
74
|
+
(`policies/research.md` Rule 1) — a journal is lineage-named work
|
|
75
|
+
product, not registration.
|
|
76
|
+
|
|
77
|
+
## 2. Claims
|
|
78
|
+
|
|
79
|
+
A primary's session entry (memory policy §3) must exist **before its
|
|
80
|
+
first claim** — every claim carries the exact full id registered for this
|
|
81
|
+
session, and self-recognition depends on it.
|
|
82
|
+
|
|
83
|
+
Before working an area:
|
|
84
|
+
|
|
85
|
+
1. **Walk the web** to the most specific node that covers the intended
|
|
86
|
+
work.
|
|
87
|
+
2. **Check the claims section** of that node and its parent ring.
|
|
88
|
+
3. **Write a claim** — an appended, dated entry, timestamped to the
|
|
89
|
+
minute (claim ordering may need to be decided by it, step 4):
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
- CLAIM 2026-08-30T14:02 — claude-code/frontend — scope: retry logic
|
|
93
|
+
in <path> — branch: feat/example — deliverable: PR
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
4. **Re-read the node and confirm the claim survived.** Checking and
|
|
97
|
+
writing are separate operations on a shared file: two agents can both
|
|
98
|
+
see a node unclaimed and both write, and one write can clobber the
|
|
99
|
+
other. After appending, read the node back and verify your claim is
|
|
100
|
+
present AND is the only live claim on that scope.
|
|
101
|
+
- Your claim is missing → the other write won the file. Do not
|
|
102
|
+
re-append; coordinate before touching the scope.
|
|
103
|
+
- Two live claims on the same scope → the earlier timestamp holds;
|
|
104
|
+
the later claimant strikes its own claim with a dated note and
|
|
105
|
+
yields. Identical or ambiguous timestamps → both stop and escalate
|
|
106
|
+
(§3).
|
|
107
|
+
- A detected conflict is the system working. A silent clobber is the
|
|
108
|
+
failure. This confirmation step is what converts one into the
|
|
109
|
+
other.
|
|
110
|
+
|
|
111
|
+
5. Work. On completion or session end, **append a release**:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
- RELEASE 2026-08-31 — claude-code/frontend — done, PR #52;
|
|
115
|
+
remainder noted in ledger
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
Claims obey the memory policy's append-only discipline: released and
|
|
119
|
+
superseded claims are struck and stamped, never deleted.
|
|
120
|
+
|
|
121
|
+
**Claim the most specific node that covers the work.** A claim at an area
|
|
122
|
+
node when the work touches one leaf blocks neighbors for no reason;
|
|
123
|
+
matching claim granularity to node granularity is what lets parallel work
|
|
124
|
+
happen at all.
|
|
125
|
+
|
|
126
|
+
## 3. Conflicts
|
|
127
|
+
|
|
128
|
+
- **Recognition is by exact full id** (memory policy §3). A claim signed
|
|
129
|
+
by your platform under a different or missing discriminator is a
|
|
130
|
+
*sibling's* claim, not yours — treat it as any other agent's active
|
|
131
|
+
claim until coordination proves otherwise.
|
|
132
|
+
- **An active claim on your target means you do not work it.** Coordinate
|
|
133
|
+
with the claim holder (through the owner or orchestrator if there is no
|
|
134
|
+
direct channel), or take adjacent unclaimed work.
|
|
135
|
+
- **Overlapping claims:** proceed only if the work is file-disjoint and
|
|
136
|
+
both claims note the overlap. Otherwise the later claimant yields.
|
|
137
|
+
- **Agents never silently resolve scope disputes between themselves.**
|
|
138
|
+
Escalate to the owner or orchestrator with both claims stated plainly.
|
|
139
|
+
- **Stale claims:** a claim with no ledger activity past the project's
|
|
140
|
+
threshold *(adopt-time slot — suggested default: one session or 24
|
|
141
|
+
hours, whichever the owner prefers)* may be flagged and superseded —
|
|
142
|
+
with a dated note naming the staleness, never silently. The prior
|
|
143
|
+
claimant's work-in-progress branch is left untouched; supersession takes
|
|
144
|
+
over the *scope*, not the branch.
|
|
145
|
+
|
|
146
|
+
## 4. Partitioning
|
|
147
|
+
|
|
148
|
+
- **Partition along architecture boundaries, not file lists.** Domains,
|
|
149
|
+
modules, subsystems — seams the codebase already respects. File-list
|
|
150
|
+
partitions leak the moment an interface changes.
|
|
151
|
+
- **One unit of work, one branch, one agent** (`policies/git.md`). Two
|
|
152
|
+
agents on one branch is a merge accident with extra steps.
|
|
153
|
+
- **Cross-claim dependencies get sequenced explicitly.** If B's work needs
|
|
154
|
+
A's merged first, that ordering is appended at the hub or a coordination
|
|
155
|
+
node — not held in anyone's context window.
|
|
156
|
+
|
|
157
|
+
## 5. Handoff (absorbed scope)
|
|
158
|
+
|
|
159
|
+
This policy owns the former standalone handoff scope. Ending a session
|
|
160
|
+
mid-work:
|
|
161
|
+
|
|
162
|
+
1. Append status to the owning node's ledger: what is done, what remains,
|
|
163
|
+
next actions in order.
|
|
164
|
+
2. Link the research journal (`policies/research.md` — the journal is
|
|
165
|
+
where the detail lives; the node just points).
|
|
166
|
+
3. Release the claim, or annotate it if the same agent expects to resume.
|
|
167
|
+
|
|
168
|
+
A successor agent resumes from **node + journal, never from scratch**. If
|
|
169
|
+
a successor cannot reconstruct the state of work from those two artifacts,
|
|
170
|
+
the handoff was defective — codify what was missing as a rule here.
|
|
171
|
+
|
|
172
|
+
## 6. Visibility Assumptions
|
|
173
|
+
|
|
174
|
+
The web coordinates only agents who can see it.
|
|
175
|
+
|
|
176
|
+
- **Default assumption: one shared working tree** (or clones on the same
|
|
177
|
+
machine sharing the `memory/` directory).
|
|
178
|
+
- **Separate clones or machines:** the web must be committed or otherwise
|
|
179
|
+
synced before parallel work starts — see `policies/memory.md` §5. This
|
|
180
|
+
is an owner call. Running parallel agents against invisible-to-each-
|
|
181
|
+
other memory is how two agents claim the same scope in good faith.
|
|
182
|
+
- Branch discipline (`policies/git.md`) is the backstop: even when
|
|
183
|
+
coordination fails, one-unit-one-branch keeps collisions reviewable
|
|
184
|
+
instead of destructive.
|