@treeseed/dsh-chapters 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/knowledge-repo.md +33 -0
- package/docs/plans-carriage.md +137 -8
- package/docs/verify.md +8 -2
- package/lib/archive.d.ts +12 -0
- package/lib/archive.js +56 -0
- package/lib/archive.js.map +1 -1
- package/lib/continue-core.d.ts +15 -2
- package/lib/continue-core.js +29 -6
- package/lib/continue-core.js.map +1 -1
- package/lib/engine-core.d.ts +19 -1
- package/lib/engine-core.js +18 -3
- package/lib/engine-core.js.map +1 -1
- package/lib/engine.d.ts +3 -0
- package/lib/engine.js +18 -2
- package/lib/engine.js.map +1 -1
- package/lib/enrich-wire.js +6 -0
- package/lib/enrich-wire.js.map +1 -1
- package/lib/index.d.ts +5 -0
- package/lib/index.js +7 -0
- package/lib/index.js.map +1 -1
- package/lib/indexing.d.ts +3 -1
- package/lib/indexing.js +4 -1
- package/lib/indexing.js.map +1 -1
- package/lib/injections.d.ts +23 -0
- package/lib/injections.js +29 -1
- package/lib/injections.js.map +1 -1
- package/lib/plans.d.ts +51 -2
- package/lib/plans.js +113 -15
- package/lib/plans.js.map +1 -1
- package/lib/registry.d.ts +12 -0
- package/lib/registry.js +24 -0
- package/lib/registry.js.map +1 -1
- package/lib/render.js +17 -1
- package/lib/render.js.map +1 -1
- package/lib/search.d.ts +1 -1
- package/lib/search.js +4 -1
- package/lib/search.js.map +1 -1
- package/lib/store.js +16 -1
- package/lib/store.js.map +1 -1
- package/lib/tools.js +14 -2
- package/lib/tools.js.map +1 -1
- package/lib/types.d.ts +24 -0
- package/lib/types.js.map +1 -1
- package/package.json +1 -1
package/docs/knowledge-repo.md
CHANGED
|
@@ -722,6 +722,39 @@ Accepted as the P3 plan's single decision point (human-approved with the plan).
|
|
|
722
722
|
file-status rewrite replaced by `rule-status` facts in each machine's own edits file
|
|
723
723
|
(see §7.2 note for the reason). Everything else in §7 stands.
|
|
724
724
|
|
|
725
|
+
### Amendment 2026-10-10 — plans are documents of a third kind
|
|
726
|
+
|
|
727
|
+
Human decision, recorded here because it widens the corpus: besides transcript chapters and curated
|
|
728
|
+
rules, a workspace's shared knowledge now also carries **plan documents** — one file per
|
|
729
|
+
`exit_plan_mode` submission, `kind: plan`, written into `chapters/` so the §4 transport, the §5
|
|
730
|
+
mirror and the §6 index carry and rank them with no special casing.
|
|
731
|
+
|
|
732
|
+
Rules of the amendment, all enforced by tests (verify.md P12–P14):
|
|
733
|
+
|
|
734
|
+
- **A plan document's body is the plan, byte for byte.** It is never a summary of one, and the
|
|
735
|
+
enrichment ladder (§6.4) refuses to annotate it: a directive is approved text, and paraphrasing
|
|
736
|
+
an order is the drift the whole store exists to prevent. The guard reads the file's own
|
|
737
|
+
`kind: plan` frontmatter, so renaming cannot disarm it.
|
|
738
|
+
- **Superseding never overwrites.** A revised plan is a new document; the earlier one keeps its
|
|
739
|
+
bytes and its status changes only in the sense that the newest submission is operative. The store
|
|
740
|
+
stays append-only with no exceptions.
|
|
741
|
+
- **Numbering is its own** (`nextPlanNumber`, registry-allocated under a distinct attempt key,
|
|
742
|
+
never a directory scan), so a plan never consumes a chapter number, never reorders the TOC, and
|
|
743
|
+
never collides with a concurrent sibling. Files are `plan-<NNN>-<slug>.md` precisely so a listing
|
|
744
|
+
cannot read as two chapters claiming the same number.
|
|
745
|
+
- **Redaction is unchanged and applies identically** (§9): the chokepoint runs over plan text on the
|
|
746
|
+
way to both the blob and the document, so a credential pasted into a plan never reaches the pool.
|
|
747
|
+
The one asymmetry a reader should know: a plan is *deliberately* a human-facing directive, so it
|
|
748
|
+
keeps its own `sha256` (the blob's hash, identical bytes) plus `bodySha256` (the §2.2 anchor
|
|
749
|
+
convention) — two handles, one purpose each, provably the same content.
|
|
750
|
+
- **Host-injected context is still not conversation** — but with the one named exception recorded in
|
|
751
|
+
`docs/plans-carriage.md` § 13: the harness's own `plugin: plan-mode / form: notice` mode-flip
|
|
752
|
+
sentence is session state worth keeping, so it archives verbatim. Instruction files, runtime
|
|
753
|
+
snapshots and skill catalogs screen exactly as before, and the topic-signature layer (§4.1)
|
|
754
|
+
keeps the strict predicate so injected text cannot move a chapter boundary.
|
|
755
|
+
|
|
756
|
+
Design detail and measurements: `docs/plans-carriage.md` §§ 9–13.
|
|
757
|
+
|
|
725
758
|
---
|
|
726
759
|
|
|
727
760
|
*Cross-references: invariants and the four invariants — `AGENTS.md`; budget math —
|
package/docs/plans-carriage.md
CHANGED
|
@@ -114,6 +114,19 @@ here. So the machine-readable home for the full facts is the **chapter record**
|
|
|
114
114
|
zod-validated in the registry, `src/store.ts`), which is what the notice builder consumes; the
|
|
115
115
|
frontmatter line is the human-visible claim of the same fact, and the prose lives in the body block.
|
|
116
116
|
|
|
117
|
+
Display bounds, added at 0.1.8 (two of them — the second is the same mistake one scale down):
|
|
118
|
+
|
|
119
|
+
- the OUTLINE line is an index, not the document: `PLAN_OUTLINE_MAX_ENTRIES` (12) at
|
|
120
|
+
`PLAN_OUTLINE_TITLE_MAX` (60) chars each, and when entries are dropped the block says
|
|
121
|
+
`+more (chapters_artifact 'toc' lists every heading)`. A silently shortened index is the lie this store
|
|
122
|
+
exists to avoid, so truncation is always announced and the full map is one query away.
|
|
123
|
+
- the TITLE is printed at most 120 characters
|
|
124
|
+
(`PLAN_TITLE_MAX`, `src/plans.ts`) — a 4 KB H1 would otherwise have been repeated in every chapter carrying it
|
|
125
|
+
AND in every child notice built from that path, unbounded and un-costed until the budget gate refused the
|
|
126
|
+
continuation. The artifact keeps the heading whole; only the display is bounded, which is the same
|
|
127
|
+
distinction `planInlineChars` draws for the body. Closed ATX headings (`# Title #`) lose their trailing
|
|
128
|
+
hashes in the title, not in the bytes.
|
|
129
|
+
|
|
117
130
|
The sha256 anchor convention must hash what `parseChapterFile`
|
|
118
131
|
returns — body **including** the trailing newline (`src/engine-core.ts:297-302`; the T9 lesson: a
|
|
119
132
|
mismatch silently blocked enrichment for an era).
|
|
@@ -288,8 +301,10 @@ Every item below was an assumption the deterministic plane had encoded — and t
|
|
|
288
301
|
| 4 | `plansSection` in `assembleNotice` + wiring + config register | done — P5/P8/P9 |
|
|
289
302
|
| 5 | Site docs (§9 anatomy, §16 tools, §17 configuration, §18 notice) | done in the same release |
|
|
290
303
|
| — | Seven-segment tape replay | green WITHOUT re-recording (2026-10-09, `npm run test:e2e:replay`, EXIT=0) |
|
|
291
|
-
| — | `plans` browser journey | LANDED as the eighth chain project (2026-10-10): `
|
|
292
|
-
|
|
|
304
|
+
| — | `plans` browser journey | LANDED as the eighth chain project (2026-10-10) and immediately **extended to two legs** so § 12's continue-vs-branch distinction is tested, not described: a `chapters_segment`→`chapters_continue` continuation (asserts `## Active plan`, the plan's document path, and NO seeded gate because approving a plan exits plan mode) and a fork-button branch (asserts **no** directive section, archive still cited). Replays in 17 s on a committed tape; the eight-project chain re-runs for the 0.1.9 ship. Its tape is scripted-upstream distilled — see § Tapes and `PROVENANCE.md` |
|
|
305
|
+
| 6 | Second-round decisions (§§ 9–13): intent-aware notice, seeded plan mode for continuations, `kind: plan` documents, checkpoint carriage, the one injection-screen exception | built 2026-10-10 — verify.md P12–P17; 580 deterministic rows green, gate 98.05 / 86.44 / 93.67 |
|
|
306
|
+
| — | Follow-up, not blocking | re-record the `plans` tape from the live model — ATTEMPTED TWICE on 2026-10-10 and both times the model container dropped the stream mid-turn (`TRANSPORT`), one after 15 minutes with zero tool calls; `PROVENANCE.md` says what to check first. The carriage evidence does not change, only the claim about model behaviour |
|
|
307
|
+
| — | Browser-plane ledger | `npm run coverage:e2e` over all EIGHT replays: **79.92 stmts / 64.64 branch / 76.28 funcs** — the non-gated plane, reported rather than tuned (the deterministic gate is the enforced one) |
|
|
293
308
|
|
|
294
309
|
Deterministic ledger at landing: **549 unit+integration rows, zero failures** with the TreeDX container
|
|
295
310
|
up (80 of them new, across `plans`, `render-plans`, `continue-plans`, `plans-segmentation`, `plans-tools`,
|
|
@@ -321,12 +336,13 @@ with no tape re-recorded.
|
|
|
321
336
|
|
|
322
337
|
## Deferred (human decisions, not ours)
|
|
323
338
|
|
|
324
|
-
-
|
|
325
|
-
|
|
326
|
-
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
supports
|
|
339
|
+
- ~~`kind: plan` corpus documents~~ **decided and built** (§ 11).
|
|
340
|
+
- ~~Seeding `plan/mode`~~ **decided and built** (§ 10), for continuations only.
|
|
341
|
+
- ~~Whether the mode-switch notice stays screened~~ **decided and built** (§ 13).
|
|
342
|
+
- **Per-message anchoring** — still open, and decision 3 clarified rather than settled it: a fork
|
|
343
|
+
splits the task, so the interesting anchor is *"branch from THIS plan"*, which `deriveRanges`
|
|
344
|
+
already supports mechanically but the button still forks at conversation end. Needs the UI
|
|
345
|
+
affordance and an answer on how the child is told what it did not inherit.
|
|
330
346
|
- Whether the `plan-mode` mode-switch *notice* should stay screened out of chapters (decision 2026-09-21
|
|
331
347
|
says injected context is not conversation; a human-initiated mode flip arguably is). Small text, but
|
|
332
348
|
it is the one place the blanket screen drops something a reader might want.
|
|
@@ -338,3 +354,116 @@ with no tape re-recorded.
|
|
|
338
354
|
chapters, the TOC, and the artifact store; and why the token meter is never exempted.
|
|
339
355
|
```
|
|
340
356
|
plus a find-fast row `plans in chapters / active plan in TOC → docs/plans-carriage.md (+ site §§ notice, archive anatomy)`.
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
## Decisions taken (second round, 2026-10-10) — all four deferred items resolved
|
|
360
|
+
|
|
361
|
+
The human answered the deferred list, and #2 came with a distinction the first round
|
|
362
|
+
had not drawn: **a continuation extends the same stream of work; a fork splits it.**
|
|
363
|
+
That single difference decides what each child is told about the operative plan, and
|
|
364
|
+
it is now the axis the whole carriage hangs on.
|
|
365
|
+
|
|
366
|
+
| # | Decision | What it means in code |
|
|
367
|
+
|---|---|---|
|
|
368
|
+
| 1 | **`kind: plan` documents — yes** | each plan becomes its own indexed document (§ 11) |
|
|
369
|
+
| 2 | **Seed plan mode into children — yes, but only for continuations** | `plan/mode {active:true}` as the child's own second seed event (§ 10), `intent === 'continue'` only |
|
|
370
|
+
| 3 | **Fork = split the task; compaction/continuation = keep it** | `PlanIntent` selects the notice shape: `## Active plan` + `## Previous plans` for a continuation, NOTHING for a branch (§ 12) |
|
|
371
|
+
| 4 | **Targeted exemption for the mode-switch notice — yes** | `isSessionStateNarration` archives it verbatim; the general screen is unchanged (§ 13) |
|
|
372
|
+
|
|
373
|
+
Plus, from the same message: *"I support anything that is going to keep the agent anchored to
|
|
374
|
+
the current task"* — which is why the operative plan is now carried into every **in-place
|
|
375
|
+
checkpoint** as well, the way the plot is (§ 9).
|
|
376
|
+
|
|
377
|
+
### 9. The checkpoint carries the operative plan (the plot mechanism, applied to directives)
|
|
378
|
+
|
|
379
|
+
`extractPlot` proved the pattern: state that must survive a shadowed region travels *inside*
|
|
380
|
+
the checkpoint text, bounded, with its provenance. `carryActivePlan` does the same for plans —
|
|
381
|
+
with one deliberate difference in **scope**: the plot reads the region being condensed, while
|
|
382
|
+
the operative plan is chosen **session-wide, newest submission first**, because "what am I
|
|
383
|
+
building" is not a property of the region being hidden. `planSummarize` prefixes it on both the
|
|
384
|
+
composed and the legacy path.
|
|
385
|
+
|
|
386
|
+
Two honesty notes recorded rather than smoothed:
|
|
387
|
+
- **No sha is cited in the checkpoint.** At summarize time the chapter does not exist yet, and
|
|
388
|
+
an unverifiable citation is worse than none — the carry says "the archive chapter holding
|
|
389
|
+
this plan cites its complete text" instead.
|
|
390
|
+
- **Truncation is announced** (`carried truncated — …`), never silent, even though the
|
|
391
|
+
bound (`planCheckpointChars`, 1600) is a display economy choice and the archive holds all.
|
|
392
|
+
- The pre-existing asymmetry that `plot` is prefixed only on the legacy path was **left
|
|
393
|
+
alone**: changing it would rewrite checkpoint bytes for every plot-carrying session, i.e. the
|
|
394
|
+
committed tapes. Plans are new, so carrying them on both paths costs no re-record.
|
|
395
|
+
|
|
396
|
+
### 10. Seeding plan mode — measured against the installed kernel, not assumed
|
|
397
|
+
|
|
398
|
+
The claim needed proof, because invariant 2 pins the seed as *one synthetic event at seq 0*.
|
|
399
|
+
Probed directly against the shipped `Session` (`0.1.5-rc.1`) in the exact production header
|
|
400
|
+
shape (`isSeeded:false`, `inheritedEventCount:0`):
|
|
401
|
+
|
|
402
|
+
| probe | result |
|
|
403
|
+
|---|---|
|
|
404
|
+
| is `plan/mode` a kernel-known event type? | **yes** — it is in `KNOWN_SESSION_EVENT_TYPES` (56 types) |
|
|
405
|
+
| seed `[notice@0, plan/mode@1]` accepted? | **yes** — log becomes `0:user/message → 1:plan/mode → 2:session/end-seed` |
|
|
406
|
+
| is it surface-visible? | **no** — surface nodes stay `[0]`, matching the host's own log-only `plan/mode` |
|
|
407
|
+
| does the HOST's own projection fold it? | **yes** — `planProjectionDefinition.apply` over the child's log yields `active: true`; the one-event control yields `active: false` |
|
|
408
|
+
|
|
409
|
+
So the seeded child is genuinely gated, not merely told. The surface validator narrows by type
|
|
410
|
+
rather than whitelisting (`assertSessionEventEnvelope` checks the envelope and continuity),
|
|
411
|
+
which is why this works without touching the kernel. **Invariant 2 is intact in substance**: the
|
|
412
|
+
seeded event is a synthetic fact this plugin authors about the boundary, never a slice of the
|
|
413
|
+
parent's log — the rule's letter ("exactly one event") is amended here and in AGENTS, and the
|
|
414
|
+
amendment is only safe because it was measured.
|
|
415
|
+
|
|
416
|
+
Seeding is refused — correctly, not defensively — when the fold says inactive, which is the
|
|
417
|
+
normal case after an approval: **approving a plan exits plan mode**, so a continuation whose plan
|
|
418
|
+
was approved gets `## Active plan … APPROVED` as a work order to implement, and no gate.
|
|
419
|
+
|
|
420
|
+
### 11. Plans as `kind: plan` documents
|
|
421
|
+
|
|
422
|
+
A plan is now also a file of its own: `<storeRoot>/<rootSession>/chapters/plan-<NNN>-<slug>.md`,
|
|
423
|
+
frontmatter leading with `kind: plan`, then `status`, `planSeq`, the citing `chapter`, `sha256`
|
|
424
|
+
(the blob's hash — the same bytes, so the two handles cannot drift silently), `bodySha256`,
|
|
425
|
+
`tokens`, `topics`. The body is the plan and nothing else: no transcript, no wrapper.
|
|
426
|
+
|
|
427
|
+
Choices worth their reasons:
|
|
428
|
+
- **In `chapters/`, not a new tree.** The pool transport, the mirror rehydrate (0.1.5) and the
|
|
429
|
+
corpus index then carry plan documents with zero special casing. `loadCorpus` no longer
|
|
430
|
+
flattens a file's own kind back to the directory's, so `kind: plan` survives indexing and
|
|
431
|
+
`chapters_search` can answer *"what did we plan about X"* with the directive itself.
|
|
432
|
+
- **Its own registry counter** (`nextPlanNumber`, allocated through `reservePlan` under a
|
|
433
|
+
distinct attempt key). A plan never consumes a chapter number or reorders the TOC, and names
|
|
434
|
+
are still allocated through the registry rather than by scanning a directory — so a
|
|
435
|
+
concurrent sibling cannot pick the same file. `plan-NNN-` (not `NNN-plan-`) so a listing
|
|
436
|
+
never reads as two chapters claiming 001.
|
|
437
|
+
- **The blob stays.** Two handles, one purpose each: the content-addressed blob is what a
|
|
438
|
+
chapter cites without knowing any number, and what `chapters_artifact` takes (it accepts a
|
|
439
|
+
bare sha); the document is what the index searches and what a human browses. Same bytes, and
|
|
440
|
+
the record ties them with one sha.
|
|
441
|
+
- **Enrichment skips plan documents.** The ladder annotates narrative; a directive's body is
|
|
442
|
+
approved text, and paraphrasing an order is precisely the drift this store exists to prevent.
|
|
443
|
+
Guarded on the frontmatter `kind`, not the filename, so renaming cannot disarm it.
|
|
444
|
+
- **Superseded plans keep both documents.** Evolution is history: the v1 file says
|
|
445
|
+
`status: superseded` and is never rewritten, the v2 file says `approved`.
|
|
446
|
+
|
|
447
|
+
### 12. The notice is intent-aware
|
|
448
|
+
|
|
449
|
+
`buildPlansSection(…, { intent, modeActive, seeded })`:
|
|
450
|
+
- **`continue`** → `## Active plan` (the operative directive, with its verdict, chapter, blob
|
|
451
|
+
and document paths) and, only when earlier submissions exist, `## Previous plans on this
|
|
452
|
+
path` marked *history — cited for evolution and status, not directives*. If plan mode was
|
|
453
|
+
seeded, the block says the directive is live and implementation waits for an approval; if
|
|
454
|
+
it was not, the child is told plainly that it starts outside plan mode.
|
|
455
|
+
- **`branch`** → **empty string, zero bytes.** A fork splits off a new direction; re-asserting
|
|
456
|
+
the parent's directive into the branch would be an order nobody gave. The plans are still
|
|
457
|
+
fully present — in the chapters the TOC already cites, and as searchable `kind: plan`
|
|
458
|
+
documents.
|
|
459
|
+
|
|
460
|
+
### 13. The one exception to the injection screen
|
|
461
|
+
|
|
462
|
+
`isSessionStateNarration` matches `source.kind === 'plugin' && plugin === 'plan-mode' &&
|
|
463
|
+
form === 'notice'` — the harness's own "The user switched this session to plan mode." — and
|
|
464
|
+
`screenConversation` archives it verbatim instead of marking it omitted. Named by plugin AND
|
|
465
|
+
form, so it cannot widen by accident; an instruction file or a runtime snapshot arriving under
|
|
466
|
+
any other shape still screens. `isHumanAuthored` deliberately stays strict, because the topic-
|
|
467
|
+
signature layer is what decides chapter boundaries and the r28 lesson was that injected text
|
|
468
|
+
poisons that signal. The archive gains a fact about the session; the index gains nothing it
|
|
469
|
+
should not have.
|
package/docs/verify.md
CHANGED
|
@@ -150,8 +150,14 @@ renderer, the segmentation tool, and the child's notice.
|
|
|
150
150
|
| P8 | A plan-less path is byte-identical to pre-feature | no `## Plans in this chapter` block, no `plans:`/`planMode:` frontmatter lines, no `## Plans` in the notice, and `chapters_segment` emits no `planHint` — the whole feature is conditional on there being a plan | unit `render-plans.test.ts`, `continue-plans.test.ts`, `plans-segmentation.test.ts`, `plans-tools.test.ts`; integration `plans-carriage.test.ts` |
|
|
151
151
|
| P9 | Both carriage paths agree | the CONTINUATION path (`chapters_continue`) and the ENGINE path (in-place `summarize`/finalize) render the same block and the same record facts, including a verdict that lands past a composed chapter boundary — which is why `renderChapter` scans the whole event list, not its own range | unit `plans-engine.test.ts` (5) + `render-plans.test.ts`; zod round-trip of `plans`/`planMode` through the registry in `plans-engine.test.ts`, legacy rows gaining nothing |
|
|
152
152
|
| P10 | Artifact citations resolve wherever they were written | a chapter's `artifacts/aa/<sha>.txt` reference resolves whether the blob sits at the STORE ROOT (arrival stubs) or inside the ANCESTRY TREE (`<store>/<root>/artifacts/…`, where `writeArchive` puts deferred results and every plan) — before this fix the second form was unreadable through `chapters_artifact`, which is what "every byte remains retrievable" actually promised | `artifact-query.test.ts` rows + integration `plans-carriage.test.ts` (`resolveArtifactWithMirror` over the real tree) |
|
|
153
|
-
| P11 | The browser plane
|
|
154
|
-
|
|
153
|
+
| P11 | The browser plane runs in the chain, BOTH intents | one journey, two legs: `/plan <message>` → real `exit_plan_mode` call → the host's review card answered by a CLICK → **(1)** the model calls `chapters_segment` then `chapters_continue`, and that child's seeded notice carries `## Active plan` + the operative plan + its `plan document:` path, and NO seeded mode (approving a plan exits it — gating that child would block the work it was told to do); **(2)** the fork button's BRANCH child carries **no** `## Active plan` and no call-out at all, while still citing the archive. Plus the durable plane: artifact bytes = the submission (or provably only-redacted), `planMode: inactive` from the fold, and a `kind: plan` document whose body contains the plan | `tests/e2e/plans.spec.ts` = chain project `plans` (17 s replay, no LLM). Tape provenance: `tests/fixtures/model-tape/plans/PROVENANCE.md` — distilled through `tests/e2e/stub-model.ts` (its decision rules pinned by `tests/unit/stub-model.test.ts`, 6 rows) because this box's model server drops streams; re-recordable from the live model unchanged |
|
|
154
|
+
|
|
155
|
+
| P12 | A plan is queryable AS a plan | each submission becomes its own `kind: plan` document in the same tree, so pool transport, mirror rehydrate and the corpus index carry it unchanged; `loadCorpus` keeps the file's own kind instead of flattening it to the directory's; `chapters_search` answers a plan query with the plan | unit `plan-documents.test.ts` (5) + integration row in `plans-carriage.test.ts` (asserts the published path, the indexed kind and the search hit) |
|
|
156
|
+
| P13 | Plan numbering never touches chapter numbering | plans allocate through their own registry counter (`nextPlanNumber` / `reservePlan`, attempt-keyed, idempotent under retry); a chapter number is never consumed, and names come from the registry rather than a directory scan so siblings cannot collide | unit `plan-documents.test.ts` (counters, retry reuse, writer-without-plan-allocation stays additive) |
|
|
157
|
+
| P14 | A directive is never annotated, and superseding never overwrites | enrichment skips any document whose own frontmatter says `kind: plan` (a rename cannot disarm it); a revised plan leaves the earlier document's bytes intact and both stand in the store | unit `enrich-plan-documents.test.ts` (3) + integration evolution row |
|
|
158
|
+
| P15 | Plan mode survives a continuation only when it should | seeded `plan/mode` ONLY for `intent: 'continue'` while the fold says active (measured: kernel accepts the two-event seed, host projection folds it to `active:true`, one-event control does not); never for a branch, never after an approval — because approving a plan EXITS plan mode | unit `continue-plans.test.ts` (four rows: seed shape, approved-no-seed, branch-no-seed, `planSeedMode:false`) against the installed-kernel probe recorded in docs/plans-carriage.md § 10 |
|
|
159
|
+
| P16 | The notice reads the intent, not just the log | continuation → `## Active plan` + `## Previous plans on this path` (marked history); branch → zero bytes, plans live in the cited chapters and as documents; the mode statement is either "the directive above is live" or "this child starts OUTSIDE plan mode", never both | unit `plans.test.ts` (seeded/unseeded/branch rows) |
|
|
160
|
+
| P17 | The one injection-screen exception is named, not open-ended | `kind:'plugin' + plugin:'plan-mode' + form:'notice'` archives verbatim; any other plugin notice, snapshot or instruction shape still screens; `isHumanAuthored` (which drives topic signatures and `(N msgs)`) is unchanged | unit `injections.test.ts` (two rows, incl. wrong-form and wrong-plugin negatives) |
|
|
155
161
|
## The Cache Metric, Before You Trust a Number
|
|
156
162
|
|
|
157
163
|
`usage.inputTokens` is the **uncached delta** and `usage.cacheReadTokens` is the cached prefix, so:
|
package/lib/archive.d.ts
CHANGED
|
@@ -18,6 +18,12 @@ export interface ArchiveFs {
|
|
|
18
18
|
/** Number allocation through the registry, never by scanning a directory (races a concurrent sibling). */
|
|
19
19
|
export interface NumberAllocator {
|
|
20
20
|
reserve(key: string, count: number): Promise<number[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Separate allocation for plan DOCUMENTS (docs/plans-carriage.md § 11), so a plan
|
|
23
|
+
* never consumes a chapter number or reorders the chapter list. Optional: a writer
|
|
24
|
+
* without it simply emits no documents, and the chapters still cite their plans.
|
|
25
|
+
*/
|
|
26
|
+
reservePlan?(key: string, count: number): Promise<number[]>;
|
|
21
27
|
}
|
|
22
28
|
export interface ChapterRecord {
|
|
23
29
|
number: number;
|
|
@@ -57,6 +63,12 @@ export interface ChapterRecord {
|
|
|
57
63
|
plans?: import('./types.ts').PlanFact[] | undefined;
|
|
58
64
|
/** Folded plan-mode state at the chapter's end ('unknown' when the log never said). */
|
|
59
65
|
planMode?: 'active' | 'inactive' | 'unknown' | undefined;
|
|
66
|
+
/** Where each plan's own `kind: plan` document landed (docs/plans-carriage.md § 11). */
|
|
67
|
+
planDocs?: Array<{
|
|
68
|
+
seq: number;
|
|
69
|
+
path: string;
|
|
70
|
+
sha256: string;
|
|
71
|
+
}> | undefined;
|
|
60
72
|
}
|
|
61
73
|
export interface WriteResult {
|
|
62
74
|
records: ChapterRecord[];
|
package/lib/archive.js
CHANGED
|
@@ -22,6 +22,7 @@ export async function writeArchive(input) {
|
|
|
22
22
|
}
|
|
23
23
|
const records = [];
|
|
24
24
|
const artifactPathsWritten = [];
|
|
25
|
+
const docPathsByChapter = new Map();
|
|
25
26
|
const seenArtifact = new Map(); // sha256 → path, for subtree dedup
|
|
26
27
|
const seenFile = new Set();
|
|
27
28
|
for (let i = 0; i < chapters.length; i++) {
|
|
@@ -48,6 +49,57 @@ export async function writeArchive(input) {
|
|
|
48
49
|
seenArtifact.set(artifact.sha256, artifact.path);
|
|
49
50
|
artifactPathsWritten.push(join(treeDir, artifact.path));
|
|
50
51
|
}
|
|
52
|
+
// 2b. PLAN DOCUMENTS (docs/plans-carriage.md § 11). One file per plan in this
|
|
53
|
+
// range, written under the SAME tree as chapters so the pool transport, the
|
|
54
|
+
// mirror rehydrate and the corpus index carry them with no special casing.
|
|
55
|
+
// Numbers come from their own registry counter — never from a directory scan.
|
|
56
|
+
const docs = chapter.stats.planDocs ?? [];
|
|
57
|
+
if (docs.length > 0 && allocator.reservePlan !== undefined) {
|
|
58
|
+
const numbers = await allocator.reservePlan(`${input.attemptId}#${chapterPath}`, docs.length);
|
|
59
|
+
const used = new Set();
|
|
60
|
+
for (let i = 0; i < docs.length; i++) {
|
|
61
|
+
const doc = docs[i];
|
|
62
|
+
const number = numbers[i];
|
|
63
|
+
// `plan-NNN-` never `NNN-plan-`: a directory listing must not read like two
|
|
64
|
+
// chapters claim number 001 — chapters and plan documents count separately.
|
|
65
|
+
let name = `plan-${String(number).padStart(3, '0')}-${slugify(doc.title)}.md`;
|
|
66
|
+
if (used.has(name) || seenFile.has(name))
|
|
67
|
+
name = name.replace(/\.md$/, `-duplicate-${number}.md`);
|
|
68
|
+
used.add(name);
|
|
69
|
+
seenFile.add(name);
|
|
70
|
+
const docPath = join(treeDir, 'chapters', name);
|
|
71
|
+
const body = `${doc.body}\n`;
|
|
72
|
+
const fm = [
|
|
73
|
+
'---',
|
|
74
|
+
`kind: plan`,
|
|
75
|
+
`title: ${JSON.stringify(doc.title)}`,
|
|
76
|
+
`status: ${doc.status}`,
|
|
77
|
+
`planSeq: ${doc.seq}`,
|
|
78
|
+
`chapter: ${JSON.stringify(chapterPath)}`,
|
|
79
|
+
// The chapter's Plans block cites the content-addressed blob; the blob and
|
|
80
|
+
// this document are the SAME bytes, so the sha ties the two handles together
|
|
81
|
+
// and a reader can prove neither drifted.
|
|
82
|
+
`sha256: ${doc.sha256}`,
|
|
83
|
+
`bodySha256: ${sha256(body)}`,
|
|
84
|
+
`tokens: ${doc.estTokens} # chars/4 estimate`,
|
|
85
|
+
`topics: [${doc.topics.map((t) => JSON.stringify(t)).join(', ')}]`,
|
|
86
|
+
`artifacts: 0`,
|
|
87
|
+
'unrenderedSeqs: []',
|
|
88
|
+
'---',
|
|
89
|
+
'',
|
|
90
|
+
].join('\n');
|
|
91
|
+
await fs.write(docPath, fm + body);
|
|
92
|
+
const read = await fs.read(docPath);
|
|
93
|
+
if (read === undefined || read !== fm + body) {
|
|
94
|
+
warnings.push(`read-back failed for the plan document, citing the chapter only: ${docPath}`);
|
|
95
|
+
continue;
|
|
96
|
+
}
|
|
97
|
+
artifactPathsWritten.push(docPath);
|
|
98
|
+
const list = docPathsByChapter.get(chapterPath) ?? [];
|
|
99
|
+
list.push({ seq: doc.seq, path: docPath, sha256: doc.sha256 });
|
|
100
|
+
docPathsByChapter.set(chapterPath, list);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
51
103
|
// 3. The chapter itself.
|
|
52
104
|
await fs.write(chapterPath, chapter.markdown);
|
|
53
105
|
// 4. Read-back verification. A file that does not come back byte-identical is not citable.
|
|
@@ -85,6 +137,10 @@ export async function writeArchive(input) {
|
|
|
85
137
|
// be read as a fact by the notice builder.
|
|
86
138
|
...(chapter.stats.plans !== undefined && chapter.stats.plans.length > 0 ? { plans: chapter.stats.plans } : {}),
|
|
87
139
|
...(chapter.stats.planMode !== undefined && chapter.stats.planMode !== 'unknown' ? { planMode: chapter.stats.planMode } : {}),
|
|
140
|
+
...(() => {
|
|
141
|
+
const docs = docPathsByChapter.get(chapterPath);
|
|
142
|
+
return docs !== undefined && docs.length > 0 ? { planDocs: docs } : {};
|
|
143
|
+
})(),
|
|
88
144
|
});
|
|
89
145
|
}
|
|
90
146
|
return { records, artifactPathsWritten, warnings };
|
package/lib/archive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"archive.js","sourceRoot":"","sources":["../src/archive.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"archive.js","sourceRoot":"","sources":["../src/archive.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAiEpC,uGAAuG;AACvG,MAAM,UAAU,OAAO,CAAC,KAAa;IACnC,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,aAAa,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAA;IACpF,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,KA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E,EAAE,EAAE,CAAC,CAAC,QAAQ,GAAG,CAAC,EAAE,CAAC,CAAA;QACxE,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;QACvC,OAAO,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAA;IACtC,CAAC;IACD,IAAI,MAAM,IAAI,cAAc;QAAE,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,EAAE,cAAc,EAAE,CAAC,CAAA;IAC7E,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAA;AAC1B,CAAC;AAID,sGAAsG;AACtG,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,EAAa,EAAE,MAAqB;IACtE,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IACvC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS,CAAA;IACxC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,MAAM;QAAE,OAAO,UAAU,CAAA;IACrD,OAAO,IAAI,CAAA;AACb,CAAC"}
|
package/lib/continue-core.d.ts
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
import type { ChapterRange, NoticePlan, RenderConfig, SessionEventLike, ToolResultOverride } from './types.ts';
|
|
20
20
|
import type { ChapterRecord } from './archive.ts';
|
|
21
21
|
import type { SessionState } from './registry.ts';
|
|
22
|
+
import { type PlanIntent } from './plans.ts';
|
|
22
23
|
export interface ContinueArgs {
|
|
23
24
|
callerSessionId: string;
|
|
24
25
|
/** The caller's own preset id, resolved by the adapter from its session observation. */
|
|
@@ -35,6 +36,8 @@ export interface ContinueArgs {
|
|
|
35
36
|
projectLine?: string;
|
|
36
37
|
/** P3 §7.3: rules block for the notice (see assembleNotice). */
|
|
37
38
|
rulesSection?: string;
|
|
39
|
+
/** Why this child exists — see PlanIntent. Absent means 'continue'. */
|
|
40
|
+
intent?: PlanIntent | undefined;
|
|
38
41
|
}
|
|
39
42
|
export interface ContinueConfig extends RenderConfig {
|
|
40
43
|
artifactStoreRoot: string;
|
|
@@ -51,6 +54,13 @@ export interface ContinueConfig extends RenderConfig {
|
|
|
51
54
|
* this existed — which is what keeps the model tapes matching.
|
|
52
55
|
*/
|
|
53
56
|
plansInNotice?: boolean | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Seed `plan/mode {active:true}` into a CONTINUATION child when the archived span
|
|
59
|
+
* ended with plan mode active, so the planning gate survives the boundary the way
|
|
60
|
+
* the plot does (decision 2026-10-10; measured: the kernel accepts a two-event
|
|
61
|
+
* seed and the host's own plan projection folds it to active). Never for a branch.
|
|
62
|
+
*/
|
|
63
|
+
planSeedMode?: boolean | undefined;
|
|
54
64
|
}
|
|
55
65
|
export interface BudgetProbe {
|
|
56
66
|
windowTokens: number | null;
|
|
@@ -65,10 +75,13 @@ export interface ContinuePorts {
|
|
|
65
75
|
fs(): import('./archive.ts').ArchiveFs;
|
|
66
76
|
budgetProbe(): Promise<BudgetProbe>;
|
|
67
77
|
newId(): string;
|
|
68
|
-
/** agents.create + setup-mount + workspace attach; throws on kernel refusal.
|
|
78
|
+
/** agents.create + setup-mount + workspace attach; throws on kernel refusal.
|
|
79
|
+
* `modeEvents` are the child's OWN synthetic state events (never a parent slice):
|
|
80
|
+
* they follow the notice, so the seed stays contiguous from seq 0. */
|
|
69
81
|
createChild(input: {
|
|
70
82
|
sessionId: string;
|
|
71
83
|
noticeEvent: SessionEventLike;
|
|
84
|
+
modeEvents: SessionEventLike[];
|
|
72
85
|
presetId: string;
|
|
73
86
|
title: string;
|
|
74
87
|
}): Promise<void>;
|
|
@@ -161,7 +174,7 @@ export declare function livePlanRows(events: readonly SessionEventLike[], waterm
|
|
|
161
174
|
/** The highest seq any cited chapter covers — the boundary between stored and live. */
|
|
162
175
|
export declare const archiveWatermark: (records: readonly ChapterRecord[]) => number;
|
|
163
176
|
/** Fields both continue and fork need to create the child. */
|
|
164
|
-
export type FinishArgs = Pick<ContinueArgs, 'callerSessionId' | 'callerPreset' | 'title' | 'handoffNote' | 'projectLine' | 'rulesSection'>;
|
|
177
|
+
export type FinishArgs = Pick<ContinueArgs, 'callerSessionId' | 'callerPreset' | 'title' | 'handoffNote' | 'projectLine' | 'rulesSection' | 'intent'>;
|
|
165
178
|
/**
|
|
166
179
|
* chapters_fork: open a sibling line citing the SAME archive, archiving nothing
|
|
167
180
|
* new. The point is branching (AGENTS "branchable — history can fork, not
|
package/lib/continue-core.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { chapterTopics } from "./signature.js";
|
|
2
2
|
import { estimateTokens, renderChapter, validateRanges } from "./render.js";
|
|
3
3
|
import { attemptKey, coverage, verifyChapter, writeArchive } from "./archive.js";
|
|
4
|
-
import { appendChapters, freshSession, linkChild, reserve } from "./registry.js";
|
|
4
|
+
import { appendChapters, freshSession, linkChild, reserve, reservePlan as reservePlanNumber } from "./registry.js";
|
|
5
5
|
import { buildTocNotice } from "./notice.js";
|
|
6
6
|
import { deriveIdentity } from "./engine-core.js";
|
|
7
|
-
import { buildPlansSection, detectPlans } from "./plans.js";
|
|
7
|
+
import { buildPlansSection, detectPlans, PLAN_MODE_EVENT } from "./plans.js";
|
|
8
8
|
export class Refusal extends Error {
|
|
9
9
|
result;
|
|
10
10
|
constructor(result) {
|
|
@@ -102,6 +102,14 @@ export async function runContinue(ports, args, config) {
|
|
|
102
102
|
await ports.putState(args.callerSessionId, r.state);
|
|
103
103
|
return r.numbers;
|
|
104
104
|
},
|
|
105
|
+
// Plan documents allocate on their OWN counter, so writing one can never
|
|
106
|
+
// consume a chapter number or shift the TOC's ordering.
|
|
107
|
+
async reservePlan(attemptId, count) {
|
|
108
|
+
const fresh = await ports.getState(args.callerSessionId);
|
|
109
|
+
const r = reservePlanNumber(fresh, attemptId, count);
|
|
110
|
+
await ports.putState(args.callerSessionId, r.state);
|
|
111
|
+
return r.numbers;
|
|
112
|
+
},
|
|
105
113
|
},
|
|
106
114
|
storeRoot: config.artifactStoreRoot,
|
|
107
115
|
rootSessionId: callerState.rootSession,
|
|
@@ -158,12 +166,16 @@ export function archivedPlanRows(records, entries) {
|
|
|
158
166
|
const display = entries.find((e) => e.path === record.path);
|
|
159
167
|
for (const fact of record.plans ?? []) {
|
|
160
168
|
const written = record.artifacts.find((a) => a.sha256 === fact.sha256);
|
|
169
|
+
const doc = (record.planDocs ?? []).find((d) => d.sha256 === fact.sha256);
|
|
161
170
|
rows.push({
|
|
162
171
|
title: fact.title,
|
|
163
172
|
status: fact.status,
|
|
164
173
|
seq: fact.seq,
|
|
165
174
|
...(display !== undefined ? { chapterNumber: display.number, chapterPath: display.path } : {}),
|
|
166
175
|
artifactPath: written?.path ?? fact.artifactPath,
|
|
176
|
+
// The plan's own indexed document, when the writer allocated one — the
|
|
177
|
+
// address `chapters_search` answers with, and the history a branch reads.
|
|
178
|
+
...(doc !== undefined ? { docPath: doc.path } : {}),
|
|
167
179
|
sha256: fact.sha256,
|
|
168
180
|
estTokens: fact.estTokens,
|
|
169
181
|
});
|
|
@@ -188,11 +200,22 @@ export const archiveWatermark = (records) => records.reduce((m, r) => Math.max(m
|
|
|
188
200
|
async function finishChild(ports, config, args, callerState, bundle, warnings, commitRecords) {
|
|
189
201
|
// ---- The plans block: stored facts + whatever the caller's live tail holds.
|
|
190
202
|
// Empty list ⇒ '' ⇒ zero injected bytes (the tape-safety property, verify.md P8).
|
|
203
|
+
const intent = args.intent ?? 'continue';
|
|
204
|
+
const watermark = archiveWatermark(bundle.records);
|
|
205
|
+
const callerEvents = await ports.readCallerEvents();
|
|
206
|
+
// The parent's CURRENT mode, folded last-value-wins exactly like the host
|
|
207
|
+
// projection does. Measured against the installed kernel (docs/plans-carriage.md
|
|
208
|
+
// § 10): a two-event seed `notice@0, plan/mode@1` is accepted in the production
|
|
209
|
+
// header shape, and the host's own plan projection then folds the child's log to
|
|
210
|
+
// `active: true` — so the seeded child really IS gated, not merely told.
|
|
211
|
+
const modeActive = detectPlans(callerEvents).modeActive;
|
|
212
|
+
const seedMode = intent === 'continue' && config.planSeedMode !== false && modeActive === true;
|
|
213
|
+
const modeEvents = seedMode
|
|
214
|
+
? [{ type: PLAN_MODE_EVENT, seq: 1, time: ports.now(), data: { active: true } }]
|
|
215
|
+
: [];
|
|
191
216
|
let plansSection = '';
|
|
192
217
|
if (config.plansInNotice !== false) {
|
|
193
|
-
|
|
194
|
-
const callerEvents = await ports.readCallerEvents();
|
|
195
|
-
plansSection = buildPlansSection([...archivedPlanRows(bundle.records, bundle.entries), ...livePlanRows(callerEvents, watermark)], { modeActive: detectPlans(callerEvents).modeActive });
|
|
218
|
+
plansSection = buildPlansSection([...archivedPlanRows(bundle.records, bundle.entries), ...livePlanRows(callerEvents, watermark)], { modeActive, intent, seeded: seedMode });
|
|
196
219
|
}
|
|
197
220
|
// ---- Notice text, then the budget gate (measure the WHOLE notice).
|
|
198
221
|
const noticeText = assembleNotice({
|
|
@@ -226,7 +249,7 @@ async function finishChild(ports, config, args, callerState, bundle, warnings, c
|
|
|
226
249
|
const childId = `ch-${ports.newId()}`;
|
|
227
250
|
const presetId = args.callerPreset ?? config.fallbackPreset;
|
|
228
251
|
try {
|
|
229
|
-
await ports.createChild({ sessionId: childId, noticeEvent, presetId, title: args.title });
|
|
252
|
+
await ports.createChild({ sessionId: childId, noticeEvent, modeEvents, presetId, title: args.title });
|
|
230
253
|
}
|
|
231
254
|
catch (error) {
|
|
232
255
|
throw new Refusal({ ok: false, reason: `child creation refused: ${error.message}`, warnings });
|
package/lib/continue-core.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"continue-core.js","sourceRoot":"","sources":["../src/continue-core.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,EAAE,cAAc,EAAE,aAAa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