instar 1.3.1111 → 1.3.1113
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 +1 -0
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +54 -2
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/core/TopicAwareness.d.ts +134 -0
- package/dist/core/TopicAwareness.d.ts.map +1 -0
- package/dist/core/TopicAwareness.js +454 -0
- package/dist/core/TopicAwareness.js.map +1 -0
- package/dist/core/TopicIntent.d.ts +25 -1
- package/dist/core/TopicIntent.d.ts.map +1 -1
- package/dist/core/TopicIntent.js +92 -4
- package/dist/core/TopicIntent.js.map +1 -1
- package/dist/core/TopicIntentBriefing.d.ts +4 -0
- package/dist/core/TopicIntentBriefing.d.ts.map +1 -1
- package/dist/core/TopicIntentBriefing.js +37 -2
- package/dist/core/TopicIntentBriefing.js.map +1 -1
- package/dist/core/TopicIntentCapture.d.ts.map +1 -1
- package/dist/core/TopicIntentCapture.js +9 -3
- package/dist/core/TopicIntentCapture.js.map +1 -1
- package/dist/core/TopicIntentExtractor.d.ts +17 -1
- package/dist/core/TopicIntentExtractor.d.ts.map +1 -1
- package/dist/core/TopicIntentExtractor.js +115 -12
- package/dist/core/TopicIntentExtractor.js.map +1 -1
- package/dist/core/cartographerDetect.d.ts +7 -1
- package/dist/core/cartographerDetect.d.ts.map +1 -1
- package/dist/core/cartographerDetect.js +73 -2
- package/dist/core/cartographerDetect.js.map +1 -1
- package/dist/data/standards-guard-index.json +1 -1
- package/dist/data/standards-guard-index.meta.json +2 -2
- package/dist/data/standards-registry.meta.json +1 -1
- package/dist/server/routes.d.ts.map +1 -1
- package/dist/server/routes.js +4 -1
- package/dist/server/routes.js.map +1 -1
- package/dist/server/topicIntentRoutes.d.ts.map +1 -1
- package/dist/server/topicIntentRoutes.js +16 -2
- package/dist/server/topicIntentRoutes.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +65 -65
- package/src/data/standards-guard-index.json +1 -1
- package/src/data/standards-guard-index.meta.json +2 -2
- package/src/data/standards-registry.meta.json +1 -1
- package/src/templates/hooks/compaction-recovery.sh +19 -0
- package/src/templates/hooks/telegram-topic-context.sh +3 -2
- package/upgrades/1.3.1112.md +25 -0
- package/upgrades/1.3.1113.md +54 -0
- package/upgrades/side-effects/cartographer-non-git-structural-snapshot.md +84 -0
- package/upgrades/side-effects/topic-awareness-three-levels.md +303 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Fixed Cartographer boot population for agent homes that are filesystem roots containing one or more worktrees but are not themselves Git repositories. The freshly scaffolded hierarchy now remains publishable when Git metadata is unavailable: health reports the real structural node count, labels the detect state `structural-only`, and leaves summary freshness unknown. The cost-bearing summary sweep still refuses without Git and remains explicitly disabled unless the operator enables it.
|
|
9
|
+
|
|
10
|
+
## What to Tell Your User
|
|
11
|
+
|
|
12
|
+
Cartographer can now map an agent home even when that top-level folder is not a Git checkout. It reports the real local hierarchy without claiming its summaries are fresh, making a model call, sending data elsewhere, or enabling paid summary maintenance.
|
|
13
|
+
|
|
14
|
+
## Summary of New Capabilities
|
|
15
|
+
|
|
16
|
+
- Non-Git project roots publish usable structural snapshots instead of collapsing a completed scaffold to zero nodes.
|
|
17
|
+
- `lastDetectStatus: structural-only` distinguishes filesystem truth from Git-backed staleness analysis.
|
|
18
|
+
- Summary freshness stays `null` when Git cannot verify it; authored summaries are never falsely called fresh or stale.
|
|
19
|
+
- The semantic authoring sweep retains its strict Git requirement and its existing explicit opt-in.
|
|
20
|
+
|
|
21
|
+
## Evidence
|
|
22
|
+
|
|
23
|
+
- Unit coverage exercises a mixed authored/un-authored index at a non-Git root and verifies real counts, null freshness, zero author candidates, and byte-for-byte index non-mutation.
|
|
24
|
+
- Route integration coverage verifies the structural-only snapshot is served as present, current, and honestly unscored.
|
|
25
|
+
- The focused Cartographer unit, integration, and end-to-end set passed 31 tests.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: minor -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Long-running Telegram topics now carry three simultaneous orientation views:
|
|
9
|
+
the whole topic, the most-recent conversational arc, and the work happening
|
|
10
|
+
right now. Each view names its goal, trend, and themes. The whole-topic view
|
|
11
|
+
keeps the earliest user-grounded goal as a durable landmark while allowing a
|
|
12
|
+
separate evolving goal to change as the conversation legitimately moves.
|
|
13
|
+
|
|
14
|
+
The projection is stored beside Topic Intent's confidence-scored evidence, so
|
|
15
|
+
it does not create authority or decay with ordinary goal notes. New arc
|
|
16
|
+
boundaries require exact words from a user; subtle boundaries need two
|
|
17
|
+
consistent user turns. Out-of-order background completions cannot roll the
|
|
18
|
+
projection backward or let a later turn claim to be the initial anchor. A
|
|
19
|
+
bounded reorder journal also inserts delayed earlier boundaries at the right
|
|
20
|
+
turn and re-homes later-created refs, while both the journal and retained arc
|
|
21
|
+
history remain hard-capped.
|
|
22
|
+
|
|
23
|
+
The awareness briefing is delivered both on a new Telegram prompt and after
|
|
24
|
+
compaction recovery. Existing installations receive the same hook behavior as
|
|
25
|
+
clean installs. When extraction misses more than two user turns, the briefing
|
|
26
|
+
says it is stale instead of presenting old orientation as current.
|
|
27
|
+
|
|
28
|
+
## What to Tell Your User
|
|
29
|
+
|
|
30
|
+
- “In a long Telegram conversation, your agent can now keep the original goal,
|
|
31
|
+
the latest chapter, and the immediate work visible at the same time. Each
|
|
32
|
+
level shows its goal, direction, and themes, and stale background tracking is
|
|
33
|
+
called out plainly.”
|
|
34
|
+
- “No setup is required. Existing agents receive the briefing delivery update
|
|
35
|
+
automatically.”
|
|
36
|
+
|
|
37
|
+
## Summary of New Capabilities
|
|
38
|
+
|
|
39
|
+
| Capability | How to Use |
|
|
40
|
+
|-----------|-----------|
|
|
41
|
+
| Whole-topic orientation with a durable opening landmark | Automatic on substantive user turns |
|
|
42
|
+
| Guarded recent-arc transitions | State a clear change of phase, or establish the subtler shift across two user turns |
|
|
43
|
+
| Independent current-work view | Automatic in the Topic Intent briefing |
|
|
44
|
+
| Honest freshness and out-of-order protection | Automatic; stale state is labelled and older completions are refused |
|
|
45
|
+
| Prompt and compaction delivery parity | Automatic on clean installs and upgrades |
|
|
46
|
+
|
|
47
|
+
## Evidence
|
|
48
|
+
|
|
49
|
+
Focused unit, integration, and end-to-end tests cover complete-field refusal,
|
|
50
|
+
anchor durability beyond ordinary goal decay, explicit and implicit arc
|
|
51
|
+
transitions, agent-only refusal, out-of-order boundary insertion and ref
|
|
52
|
+
re-homing, state caps, stale-turn counting, briefing rendering, capture metrics,
|
|
53
|
+
and executed canonical/generated hook success/failure parity. The TypeScript
|
|
54
|
+
check and repository lint suite pass.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Side-Effects Review — Cartographer Non-Git Structural Snapshot
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `cartographer-non-git-structural-snapshot`
|
|
4
|
+
**Date:** `2026-08-01`
|
|
5
|
+
**Author:** `instar-codey`
|
|
6
|
+
**Second-pass reviewer:** `not required`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
Zero-cost boot population now preserves the freshly scaffolded filesystem hierarchy when the configured project root has no Git HEAD. That snapshot is explicitly labeled `structural-only`, carries real node and never-authored counts, and reports summary freshness as unknown. The normal detect and cost-bearing author sweep retain the existing named Git refusal.
|
|
11
|
+
|
|
12
|
+
## Decision-point inventory
|
|
13
|
+
|
|
14
|
+
- `snapshotOnly Git failure` — modify — return a usable structural aggregate instead of replacing a completed scaffold with empty refusal counts.
|
|
15
|
+
- `ordinary/sweep Git failure` — pass-through — still refuses as `detect-git-error`; no author candidates or paid work can be produced.
|
|
16
|
+
- `snapshot route classification` — modify — `structural-only` is a present hierarchy, while genuine timeout/start/index/Git failures remain `detect-failing`.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## 1. Over-block
|
|
21
|
+
|
|
22
|
+
**What legitimate inputs does this change reject that it shouldn't?**
|
|
23
|
+
|
|
24
|
+
No block/allow surface — over-block not applicable. Snapshot-only population accepts one additional honest result shape; the semantic sweep's refusal contract is unchanged.
|
|
25
|
+
|
|
26
|
+
## 2. Under-block
|
|
27
|
+
|
|
28
|
+
**What failure modes does this still miss?**
|
|
29
|
+
|
|
30
|
+
The structural fallback cannot recover a scaffold that itself fails, an unreadable/oversized index, or a worker timeout/start failure; those remain named failures. A root with unreadable Git metadata is intentionally limited to structure: it cannot classify an authored summary as fresh or stale, and it cannot produce author candidates.
|
|
31
|
+
|
|
32
|
+
## 3. Level-of-abstraction fit
|
|
33
|
+
|
|
34
|
+
**Is this at the right layer?**
|
|
35
|
+
|
|
36
|
+
Yes. The generic detect worker already owns the conversion from a freshly scaffolded index into a bounded read snapshot. Preserving filesystem counts there keeps all consumers on the existing cached-snapshot path. The HTTP layer only classifies the explicit result status; it does not repeat index or Git analysis.
|
|
37
|
+
|
|
38
|
+
## 4. Signal vs authority compliance
|
|
39
|
+
|
|
40
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
41
|
+
|
|
42
|
+
- [x] No — this change has no block/allow surface.
|
|
43
|
+
|
|
44
|
+
This change publishes an observe-only structural signal. It does not gate user intent, messages, dispatch, provider selection, or paid work. The semantic sweep's existing Git refusal remains its own hard data-integrity floor.
|
|
45
|
+
|
|
46
|
+
## 4b. Judgment-point check (Judgment Within Floors standard)
|
|
47
|
+
|
|
48
|
+
No new static heuristic at a competing-signals decision point. The result is a mechanically enumerable state: the index was freshly scaffolded and can be counted, while Git-backed freshness is unavailable and therefore remains `null`.
|
|
49
|
+
|
|
50
|
+
## 5. Interactions
|
|
51
|
+
|
|
52
|
+
- **Shadowing:** none; Git-backed snapshots remain authoritative when Git is available.
|
|
53
|
+
- **Races/double-fire:** unchanged; the one boot population promise still owns scaffold then snapshot publication.
|
|
54
|
+
- **Feedback loops:** none; the snapshot is read-only and schedules no retry or author work.
|
|
55
|
+
- **Failure recovery:** timeout, worker-start, unreadable-index, and oversized-index behavior is unchanged. Only the expected no-Git shape gains a bounded structural result.
|
|
56
|
+
|
|
57
|
+
## 6. External surfaces
|
|
58
|
+
|
|
59
|
+
Health, stale, and compact-tree reads expose the additive `structural-only` status. Existing agents gain a corrected machine-local snapshot after update and restart. The change writes only the existing Cartographer index/snapshot state, depends on no conversation timing, and has no network, provider, LLM, billing, notification, or operator-action path.
|
|
60
|
+
|
|
61
|
+
## 6b. Operator-surface quality (Operator-Surface Quality standard)
|
|
62
|
+
|
|
63
|
+
No operator surface — not applicable. The existing read APIs expose more honest state but add no dashboard form, approval surface, or operator action.
|
|
64
|
+
|
|
65
|
+
## 7. Multi-machine posture (Cross-Machine Coherence)
|
|
66
|
+
|
|
67
|
+
Machine-local by design. The snapshot describes one host's filesystem root and may differ across machines. No replication or one-voice messaging is involved.
|
|
68
|
+
|
|
69
|
+
It emits no user-facing notices, holds no topic-transferable durable state, and generates no URLs. Each machine should report its own filesystem hierarchy rather than replicate another machine's map.
|
|
70
|
+
|
|
71
|
+
## 8. Rollback cost
|
|
72
|
+
|
|
73
|
+
- **Hot-fix release:** revert the code change and publish the next patch.
|
|
74
|
+
- **Data migration:** none; the snapshot schema already carries a string detect status.
|
|
75
|
+
- **Agent state repair:** none; the next boot rewrites the cached snapshot.
|
|
76
|
+
- **User visibility:** rollback would restore the prior false zero/detect-failing report at non-Git roots until the correction is reapplied.
|
|
77
|
+
|
|
78
|
+
## Conclusion
|
|
79
|
+
|
|
80
|
+
The correction preserves structural truth without weakening the authoring sweep's Git safety floor. Part A remains local and zero-cost; Part B remains disabled and untouched.
|
|
81
|
+
|
|
82
|
+
## Class-Closure Declaration (display-only mirror)
|
|
83
|
+
|
|
84
|
+
No agent-authored-artifact defect — not applicable. The correction does not add or modify a self-triggered controller; it changes the bounded result produced by the existing one-shot boot population and introduces no retry, restart, notification, or autonomous action.
|
|
@@ -0,0 +1,303 @@
|
|
|
1
|
+
# Side-Effects Review — Three temporal awareness levels
|
|
2
|
+
|
|
3
|
+
**Version / slug:** `topic-awareness-three-levels`
|
|
4
|
+
**Date:** `2026-08-01`
|
|
5
|
+
**Author:** `codey`
|
|
6
|
+
**Second-pass reviewer:** `Kant`
|
|
7
|
+
|
|
8
|
+
## Summary of the change
|
|
9
|
+
|
|
10
|
+
This change adds a bounded temporal projection beside Topic Intent's existing
|
|
11
|
+
confidence-scored refs. `TopicAwareness.ts`, the extractor, store, capture
|
|
12
|
+
funnel, briefing, routes, source hook templates, and `PostUpdateMigrator`
|
|
13
|
+
together preserve three simultaneous goal/trend/themes views: whole topic,
|
|
14
|
+
most-recent arc, and current work. The initial user-grounded goal is stored as a
|
|
15
|
+
non-decaying orientation landmark, while the whole-topic view evolves. The
|
|
16
|
+
projection is delivered on inbound Telegram prompts and after compaction. It is
|
|
17
|
+
orientation only and cannot grant authority or block an action.
|
|
18
|
+
|
|
19
|
+
## Decision-point inventory
|
|
20
|
+
|
|
21
|
+
- `normalizeAwarenessDraft` — **add** — accepts only bounded, complete
|
|
22
|
+
goal/trend/themes triples for all three temporal scopes. This decides whether
|
|
23
|
+
derived cache data is persisted, not whether a user message or agent action
|
|
24
|
+
proceeds.
|
|
25
|
+
- `applyAwarenessUpdate` arc transition — **add** — changes derived arc identity
|
|
26
|
+
only after an exact current-user quote with explicit shift language, or two
|
|
27
|
+
similar user-grounded implicit candidates.
|
|
28
|
+
- `applyAwarenessUpdate` freshness fence — **add** — refuses an older background
|
|
29
|
+
completion from replacing a newer projection; an earlier user turn may only
|
|
30
|
+
correct the immutable anchor monotonically backward. A bounded reorder
|
|
31
|
+
journal separately refolds arc boundaries and new-ref placement by
|
|
32
|
+
conversation turn.
|
|
33
|
+
- Telegram prompt and compaction hooks — **modify** — pass the rendered
|
|
34
|
+
orientation briefing into agent context. Server failure degrades open and
|
|
35
|
+
preserves existing recent-history injection.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 1. Over-block
|
|
40
|
+
|
|
41
|
+
No user-message or agent-action block/allow surface is added. At the derived
|
|
42
|
+
cache boundary, a model response that supplies two complete levels but omits a
|
|
43
|
+
goal, trend, or theme from the third is refused in full. That deliberately
|
|
44
|
+
discards potentially useful partial orientation rather than persisting a shape
|
|
45
|
+
that falsely appears to satisfy all three levels. A genuine explicit arc shift
|
|
46
|
+
whose quoted words do not match the bounded shift-language vocabulary will not
|
|
47
|
+
switch immediately; it must earn the two-user-turn implicit path instead.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## 2. Under-block
|
|
52
|
+
|
|
53
|
+
The structural checks cannot prove that a fluent model summary is semantically
|
|
54
|
+
correct. An exact quote proves grounding in the current user's words, not that
|
|
55
|
+
the proposed arc label is the best interpretation. The two-signal similarity
|
|
56
|
+
check can still join two lexically similar but meaningfully different goals, or
|
|
57
|
+
delay two semantically identical goals phrased with disjoint vocabulary.
|
|
58
|
+
|
|
59
|
+
Freshness lag exposes skipped or failed extraction after capture sees a user
|
|
60
|
+
turn, but it cannot diagnose a missing capture callback that never increments
|
|
61
|
+
the topic turn. A machine with no local Topic Intent cache has no historical
|
|
62
|
+
three-level projection until a substantive turn is extracted; raw Telegram
|
|
63
|
+
history remains the fallback context. No pre-upgrade awareness is backfilled.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## 3. Level-of-abstraction fit
|
|
68
|
+
|
|
69
|
+
The projection belongs beside `TopicIntentStore`, not inside its refs and not
|
|
70
|
+
in `ContextHierarchy`. Topic Intent already owns the single per-turn semantic
|
|
71
|
+
extraction pass and the briefing; extending that one response avoids a second
|
|
72
|
+
LLM call and preserves the existing evidence pipeline. Keeping the opening
|
|
73
|
+
anchor outside refs also avoids ref-kind decay and the derived-evidence
|
|
74
|
+
authority clamp without weakening either confidence safeguard.
|
|
75
|
+
|
|
76
|
+
The projection is a context-rich signal producer. Existing confidence tiers
|
|
77
|
+
still answer how strongly a proposition is supported; the three temporal
|
|
78
|
+
levels answer which horizon the agent is viewing. No parallel authority model
|
|
79
|
+
is introduced.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## 4. Signal vs authority compliance
|
|
84
|
+
|
|
85
|
+
**Required reference:** [docs/signal-vs-authority.md](../../docs/signal-vs-authority.md)
|
|
86
|
+
|
|
87
|
+
- [x] No — this change has no block/allow surface.
|
|
88
|
+
- [ ] No — this change produces a signal consumed by an existing smart gate.
|
|
89
|
+
- [ ] Yes — but the logic is a smart gate with full conversational context.
|
|
90
|
+
- [ ] ⚠️ Yes, with brittle logic — STOP.
|
|
91
|
+
|
|
92
|
+
The model-authored projection is explicitly labelled “orientation, not
|
|
93
|
+
authority.” It cannot alter ref confidence, create an authoritative decision,
|
|
94
|
+
invoke tools, send messages, or block outbound content. The deterministic
|
|
95
|
+
validators only protect the shape and ordering of the derived cache. ArcCheck
|
|
96
|
+
remains a separate downstream authority surface and is not changed here.
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 4b. Judgment-point check (Judgment Within Floors standard)
|
|
101
|
+
|
|
102
|
+
No new static heuristic decides between competing live signals for an action.
|
|
103
|
+
The quote vocabulary and lexical similarity threshold govern bounded derived
|
|
104
|
+
state identity only. They cannot authorize or refuse work, override evidence,
|
|
105
|
+
or prevent a conversation from evolving; a missed explicit classification
|
|
106
|
+
falls to the slower two-user-turn path.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## 5. Interactions
|
|
111
|
+
|
|
112
|
+
- **Shadowing:** the temporal block renders before existing Active Task Frame,
|
|
113
|
+
Settled, Tentative, and Open Threads sections, but does not remove or promote
|
|
114
|
+
any of them. If no awareness exists, existing briefing behavior remains.
|
|
115
|
+
- **Double-fire:** no second extraction call is added. The same structured
|
|
116
|
+
response updates refs and awareness once under the Topic Intent topic lock.
|
|
117
|
+
- **Races:** capture remains fire-and-forget. User-turn order, speaker order,
|
|
118
|
+
and event time fence stale topic/current-work completions. A 64-event reorder
|
|
119
|
+
journal refolds the arc dimension: delayed explicit/implicit boundaries are
|
|
120
|
+
inserted at their conversational turn, delayed intervening user turns can
|
|
121
|
+
withdraw a false implicit pair, and creation-turn metadata re-homes newer
|
|
122
|
+
refs to the corrected arc. The initial + 63 latest arcs are retained; older
|
|
123
|
+
closed arcs become an additive archive count.
|
|
124
|
+
- **Feedback loops:** prior awareness is included only inside a bounded untrusted
|
|
125
|
+
prompt block. Model output cannot quote itself to mint a user-grounded arc
|
|
126
|
+
transition.
|
|
127
|
+
- **Shared intelligence capacity:** the existing extractor call keeps its
|
|
128
|
+
60-second budget and its existing queue/rate limits; `maxTokens` rises from
|
|
129
|
+
600 to 1000 for the structured projection. No ArcCheck timeout or caller
|
|
130
|
+
behavior changes in this work.
|
|
131
|
+
- **Delivery parity:** clean-install and migrator-generated hooks now fetch the
|
|
132
|
+
same briefing at prompt and compaction seams. `curl -f` keeps HTTP error
|
|
133
|
+
bodies out of context while preserving degrade-open recent history. Tests
|
|
134
|
+
execute all four hooks against success and HTTP-error fixtures. Protected
|
|
135
|
+
briefing and topic-context reads carry the agent token and identity headers;
|
|
136
|
+
the fake server rejects either protected surface if either header is absent.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
## 6. External surfaces
|
|
141
|
+
|
|
142
|
+
Agents receive a new bounded briefing block during Telegram prompt construction
|
|
143
|
+
and compaction recovery. Users do not see a new message, command, notification,
|
|
144
|
+
or setting. The persistent Topic Intent JSON gains an optional `awareness`
|
|
145
|
+
block and additive counters; old binaries ignore it. Diagnostics and capture
|
|
146
|
+
metrics expose the current arc, freshness lag, invalid updates, refusals,
|
|
147
|
+
transitions, stale completions, anchor corrections, archived-arc count, and
|
|
148
|
+
delivered briefings.
|
|
149
|
+
|
|
150
|
+
Runtime timing remains outside full control because extraction is asynchronous
|
|
151
|
+
and LLM-backed. That is why stale state is labelled, old completions are fenced,
|
|
152
|
+
and hook delivery fails open. Existing installations receive the generated hook
|
|
153
|
+
update automatically.
|
|
154
|
+
|
|
155
|
+
No operator-facing actions are added. There is no dashboard, approval, secret,
|
|
156
|
+
grant, or laptop-only workflow.
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## 6b. Operator-surface quality (Operator-Surface Quality standard)
|
|
161
|
+
|
|
162
|
+
No operator surface — not applicable.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## 7. Multi-machine posture (Cross-Machine Coherence)
|
|
167
|
+
|
|
168
|
+
**Machine-local BY DESIGN:** this awareness block stays inside the existing
|
|
169
|
+
registered `TopicIntentStore` derived cache
|
|
170
|
+
(`uncertain-topic-intent-store`, `scope: derived-cache`, `transport: none`,
|
|
171
|
+
`grandfathered: true`). It is a nondeterministic, advisory projection over the
|
|
172
|
+
conversation, not a new source of user intent or durable authority. Replicating
|
|
173
|
+
one machine's model summary as truth would give derived prose more weight than
|
|
174
|
+
the underlying conversation and introduce conflict semantics that this feature
|
|
175
|
+
does not own.
|
|
176
|
+
|
|
177
|
+
On a topic transfer, the prior machine relays up to 50 raw Telegram messages to
|
|
178
|
+
orient the receiving session. The rolling TopicMemory summary is also
|
|
179
|
+
machine-local (`transport: none`) and is not claimed as a cross-machine source.
|
|
180
|
+
The local awareness block may therefore be absent until the next valid
|
|
181
|
+
substantive extraction, and it may differ transiently from another machine's
|
|
182
|
+
projection. Diagnostics and the stale marker make that cache state visible. No
|
|
183
|
+
user decision, evidence ref, action, notice, or permission is stranded by the
|
|
184
|
+
awareness block. It emits no user-facing notice, so one-voice gating is not
|
|
185
|
+
needed, and it generates no URLs.
|
|
186
|
+
|
|
187
|
+
This does not claim that the existing Topic Intent cache is cross-machine
|
|
188
|
+
coherent. It preserves the registry's current derived-cache boundary rather
|
|
189
|
+
than silently promoting the new projection to a coherent durable store.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## 8. Rollback cost
|
|
194
|
+
|
|
195
|
+
- **Hot-fix release:** revert the code and ship the next patch.
|
|
196
|
+
- **Data migration:** none. The `awareness` block and counters are additive and
|
|
197
|
+
optional; old code ignores them.
|
|
198
|
+
- **Agent state repair:** none required. Existing ref evidence, pending
|
|
199
|
+
confirmations, and the legacy first arc remain readable.
|
|
200
|
+
- **User visibility:** during rollback agents lose the three-level briefing and
|
|
201
|
+
return to the existing evidence-tiered briefing; no user data or action is
|
|
202
|
+
removed.
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Conclusion
|
|
207
|
+
|
|
208
|
+
The review changed the implementation in nine material ways: the opening goal
|
|
209
|
+
was separated from decaying/confidence-clamped refs; completion-order races got
|
|
210
|
+
a stale-write fence plus monotonic earlier-anchor correction; the independent
|
|
211
|
+
review's lost-boundary reproduction produced a bounded conversation-order
|
|
212
|
+
refold and creation-turn ref repair; arc history gained a hard cap; agent replies
|
|
213
|
+
no longer erase two-user transition hysteresis; a final pre-anchor inversion
|
|
214
|
+
reproduction made the retained initial arc rebase from the monotonic anchor
|
|
215
|
+
before history is frozen; every user turn advances freshness before
|
|
216
|
+
prefilter/rate/shedding; generated hooks gained executable authenticated
|
|
217
|
+
success/error parity tests; and failed briefing fetches no longer inject HTTP
|
|
218
|
+
error bodies. The multi-machine claim was narrowed to the actual raw-history
|
|
219
|
+
relay, with no claim that TopicMemory or the projection replicates. Independent
|
|
220
|
+
compaction review concurs with the corrected result.
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Second-pass review (required)
|
|
225
|
+
|
|
226
|
+
**Reviewer:** Kant
|
|
227
|
+
**Independent read of the artifact:** concur
|
|
228
|
+
|
|
229
|
+
The first pass reproduced lost out-of-order boundaries, identified unbounded
|
|
230
|
+
arc history, found assertion-only generated-hook tests, and narrowed an
|
|
231
|
+
overstated multi-machine claim. The corrected refold, caps, executable fixtures,
|
|
232
|
+
and machine-local prose then exposed two final adversarial cases: an initial arc
|
|
233
|
+
created by turn 3 could freeze out a late turn-2 boundary after turn 1 corrected
|
|
234
|
+
the anchor, and the generated compaction hook fetched protected raw topic
|
|
235
|
+
context without authentication. The implementation now rebases the sequence-1
|
|
236
|
+
arc from the monotonic anchor before freezing history and reuses the agent token
|
|
237
|
+
and identity for that protected read. The fixture refuses missing credentials.
|
|
238
|
+
Kant independently reran the corrected package and concurred with the temporal
|
|
239
|
+
ordering, bounded-history, historical-ref, delivery, multi-machine, and
|
|
240
|
+
signal/authority analysis.
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Evidence pointers
|
|
245
|
+
|
|
246
|
+
- `tests/unit/TopicAwareness.test.ts` — complete-shape refusal, anchor
|
|
247
|
+
durability, explicit/implicit transitions, agent interruption, stale writes,
|
|
248
|
+
delayed boundary insertion/withdrawal, state caps, and completion-order
|
|
249
|
+
anchor correction.
|
|
250
|
+
- `tests/unit/TopicIntent-extractor.test.ts` and
|
|
251
|
+
`tests/unit/TopicIntentCapture.test.ts` — one-call structured extraction,
|
|
252
|
+
legacy compatibility, ref re-homing by creation turn, all-turn freshness, and
|
|
253
|
+
concurrent capture.
|
|
254
|
+
- `tests/unit/TopicIntent-briefing.test.ts` — three-level rendering and stale
|
|
255
|
+
labels.
|
|
256
|
+
- `tests/integration/topic-intent-capture-routes.test.ts` — observable counters,
|
|
257
|
+
current arc, and lag.
|
|
258
|
+
- `tests/e2e/compaction-telegram-context.test.ts` — executes canonical and
|
|
259
|
+
generated prompt/compaction hooks on successful briefing and HTTP-error
|
|
260
|
+
degrade-open paths, with protected endpoints refusing missing authentication.
|
|
261
|
+
- First review evidence: 82/82 green before review; reviewer reproduced the
|
|
262
|
+
completion-order boundary loss and identified the unbounded arc list and
|
|
263
|
+
overstated cross-machine/hook claims. Those findings drove the refold, caps,
|
|
264
|
+
executable hook tests, and corrected prose above.
|
|
265
|
+
- Final evidence: 102/102 focused tests green after the pre-anchor inversion and
|
|
266
|
+
generated-compaction authentication fixes; TypeScript, `git diff --check`,
|
|
267
|
+
repository lint, and build all pass. The lint command reports only its
|
|
268
|
+
pre-existing report-only controller/parser inventory notices; the local
|
|
269
|
+
build reports only the expected missing release-signing key warning.
|
|
270
|
+
- CI follow-through: the first run exposed `TopicAwareness` as undocumented in
|
|
271
|
+
the structural docs inventory, lowering class coverage below its ratcheted
|
|
272
|
+
floor. The public North Star explanation and subsystem inventory now both
|
|
273
|
+
name and explain the class; the same coverage gate passes locally without
|
|
274
|
+
weakening its floor.
|
|
275
|
+
- The same run exposed a rolling-upgrade parser regression in the unchanged
|
|
276
|
+
live-capture lifecycle test. A legacy array begins with `[` but contains `{`,
|
|
277
|
+
and the new parser tried the inner object first, converting a valid signal
|
|
278
|
+
into an empty structured result. A 500 ms control still failed, ruling out
|
|
279
|
+
added latency. The parser now chooses the first JSON container, with a direct
|
|
280
|
+
legacy-array regression test and the original 50 ms lifecycle test restored.
|
|
281
|
+
- The rerun also exercised the repository's silent-fallback ratchet. Malformed
|
|
282
|
+
v2 model JSON deliberately degrades to an empty structured analysis so ingress
|
|
283
|
+
remains available; that outcome is not silent because `ingest()` classifies it
|
|
284
|
+
as `awarenessInvalid` for capture metrics. The catch now carries the required
|
|
285
|
+
in-block justification, and the focused ratchet returns to its 495 baseline.
|
|
286
|
+
- That parser marker made the file-level LLM convergence ledger correctly reject
|
|
287
|
+
`TopicIntentExtractor` as a stale advisory entry. The actual provider-failure
|
|
288
|
+
boundary now has its own LLM-specific marker beside the existing `onDegrade`
|
|
289
|
+
metric, and the redundant ledger entry is removed. The marker therefore
|
|
290
|
+
documents the LLM degradation it exempts instead of borrowing an unrelated
|
|
291
|
+
parser annotation elsewhere in the file.
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
## Class-Closure Declaration (display-only mirror)
|
|
296
|
+
|
|
297
|
+
- **`defectClass`** — `generated-artifact-path-contract-drift`.
|
|
298
|
+
- **`closure`** — `gap`. The added end-to-end assertions close this briefing
|
|
299
|
+
delivery instance, but the registered class is still unconfirmed and cannot
|
|
300
|
+
honestly claim class-wide guard closure.
|
|
301
|
+
- **`guardEvidence`** — not applicable for gap closure.
|
|
302
|
+
- **`gap`** — `ACT-245`, the existing high-priority standards-gap action for a
|
|
303
|
+
class-level generated-artifact contract lint.
|