instar 1.3.171 → 1.3.172
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/dist/monitoring/MentorStageA.d.ts +11 -0
- package/dist/monitoring/MentorStageA.d.ts.map +1 -1
- package/dist/monitoring/MentorStageA.js +40 -3
- package/dist/monitoring/MentorStageA.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/upgrades/1.3.172.md +47 -0
- package/upgrades/side-effects/mentor-agenda-coverage.md +44 -0
|
@@ -66,6 +66,17 @@ export interface ConversationSurface {
|
|
|
66
66
|
* passive-observe default). Sourced from `mentor.onboardingAgenda` config.
|
|
67
67
|
*/
|
|
68
68
|
onboardingAgenda?: string[];
|
|
69
|
+
/**
|
|
70
|
+
* Agenda items the mentor has ALREADY driven recently (matched against its own
|
|
71
|
+
* recent sent prompts). Stage A judges "already covered" only from the bounded
|
|
72
|
+
* `threadlineHistory` window, so once an assignment scrolls out the item looks
|
|
73
|
+
* fresh again and the mentor re-drives it — making the mentee re-verify the same
|
|
74
|
+
* capabilities on a loop (low-yield). This compact list survives the window so
|
|
75
|
+
* Stage A can PREFER not-yet-driven items, and choose observe-only when the whole
|
|
76
|
+
* agenda is recently covered (rather than mindlessly re-cycling). Surface-legitimate
|
|
77
|
+
* (the mentor's own assignment history) → included in surfaceText.
|
|
78
|
+
*/
|
|
79
|
+
recentlyDrivenAgenda?: string[];
|
|
69
80
|
}
|
|
70
81
|
export interface LeakResult {
|
|
71
82
|
/** True if Stage A referenced an internal it could not have seen from the surface. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentorStageA.d.ts","sourceRoot":"","sources":["../../src/monitoring/MentorStageA.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAEjE;;;;;GAKG;AACH,eAAO,MAA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BAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,eAAe,EAAE,CAkBvF;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,eAAe,CAYrG"}
|
|
@@ -87,6 +87,14 @@ export function buildStageAContext(surface) {
|
|
|
87
87
|
const agendaLines = hasAgenda
|
|
88
88
|
? surface.onboardingAgenda.map((t) => ` - ${t}`).join('\n')
|
|
89
89
|
: '';
|
|
90
|
+
// Coverage: which agenda items were already driven recently (survives the
|
|
91
|
+
// bounded history window). Lets Stage A prefer fresh items and stop re-cycling.
|
|
92
|
+
const recentlyDriven = surface.recentlyDrivenAgenda ?? [];
|
|
93
|
+
const hasRecentlyDriven = recentlyDriven.length > 0;
|
|
94
|
+
const recentlyDrivenLines = hasRecentlyDriven
|
|
95
|
+
? recentlyDriven.map((t) => ` - ${t}`).join('\n')
|
|
96
|
+
: '';
|
|
97
|
+
const allAgendaCovered = hasAgenda && surface.onboardingAgenda.every((t) => recentlyDriven.includes(t));
|
|
90
98
|
// Bound the conversation history so the assembled Stage-A prompt can never
|
|
91
99
|
// exceed tmux's `new-session` command-line limit (~12-16KB). The prompt is
|
|
92
100
|
// passed as a command-line ARGUMENT to the spawned compose session, so an
|
|
@@ -121,9 +129,17 @@ export function buildStageAContext(surface) {
|
|
|
121
129
|
``,
|
|
122
130
|
`You have an onboarding agenda below. If the mentee is idle — no task in flight,`,
|
|
123
131
|
`said they're done, or nothing actionable in the conversation — choose assign-next`,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
132
|
+
...(hasRecentlyDriven
|
|
133
|
+
? [
|
|
134
|
+
`and give them one concrete agenda item that is NOT in the "Recently driven"`,
|
|
135
|
+
`list below (prefer items not yet covered). Do NOT re-assign a recently-driven`,
|
|
136
|
+
`item — the mentee already verified it; re-driving it wastes their time. If`,
|
|
137
|
+
`EVERY agenda item is already in the Recently driven list, choose observe-only`,
|
|
138
|
+
`instead of re-cycling.`,
|
|
139
|
+
]
|
|
140
|
+
: [`and give them the next agenda item, phrased as one concrete task.`]),
|
|
141
|
+
`Also choose observe-only if they are mid-task. If they're blocked or asked`,
|
|
142
|
+
`something, unblock/answer first.`,
|
|
127
143
|
]
|
|
128
144
|
: []),
|
|
129
145
|
``,
|
|
@@ -139,6 +155,13 @@ export function buildStageAContext(surface) {
|
|
|
139
155
|
...(hasAgenda
|
|
140
156
|
? [``, `--- Your onboarding agenda (suggested next tasks, in order) ---`, agendaLines]
|
|
141
157
|
: []),
|
|
158
|
+
...(hasRecentlyDriven
|
|
159
|
+
? [
|
|
160
|
+
``,
|
|
161
|
+
`--- Recently driven (already covered — prefer items NOT here; observe-only if EVERY agenda item is here${allAgendaCovered ? ' — which is the case now' : ''}) ---`,
|
|
162
|
+
recentlyDrivenLines,
|
|
163
|
+
]
|
|
164
|
+
: []),
|
|
142
165
|
].join('\n');
|
|
143
166
|
}
|
|
144
167
|
/**
|
|
@@ -169,6 +192,20 @@ export function buildConversationSurface(input) {
|
|
|
169
192
|
};
|
|
170
193
|
if (input.onboardingAgenda && input.onboardingAgenda.length) {
|
|
171
194
|
surface.onboardingAgenda = input.onboardingAgenda;
|
|
195
|
+
// Which agenda items has the mentor recently DRIVEN? Match each item's leading
|
|
196
|
+
// stem (the part before any "(" — e.g. "Verify the Project Map") against the
|
|
197
|
+
// mentor's recent sent prompts. This compact coverage list survives the bounded
|
|
198
|
+
// conversation window, so Stage A won't re-assign an item just because its
|
|
199
|
+
// assignment scrolled out of `threadlineHistory` (the re-cycling bug).
|
|
200
|
+
const sentText = (input.mentorSent ?? []).map((m) => m.message).join('\n');
|
|
201
|
+
if (sentText) {
|
|
202
|
+
const driven = input.onboardingAgenda.filter((item) => {
|
|
203
|
+
const stem = item.split('(')[0].trim();
|
|
204
|
+
return stem.length >= 8 && sentText.includes(stem);
|
|
205
|
+
});
|
|
206
|
+
if (driven.length)
|
|
207
|
+
surface.recentlyDrivenAgenda = driven;
|
|
208
|
+
}
|
|
172
209
|
}
|
|
173
210
|
const lastTs = recent.length ? recent[recent.length - 1].ts : undefined;
|
|
174
211
|
if (typeof lastTs === 'number') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MentorStageA.js","sourceRoot":"","sources":["../../src/monitoring/MentorStageA.ts"],"names":[],"mappings":"AAiCA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAsB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"MentorStageA.js","sourceRoot":"","sources":["../../src/monitoring/MentorStageA.ts"],"names":[],"mappings":"AAiCA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAsB,EAAE,CAAC;AAmD3D,+EAA+E;AAC/E,4EAA4E;AAC5E,mFAAmF;AACnF,MAAM,iBAAiB,GAAa;IAClC,kBAAkB,EAAE,oBAAoB;IACxC,4DAA4D,EAAE,0BAA0B;IACxF,qBAAqB,EAAE,qBAAqB;IAC5C,qBAAqB,EAAE,eAAe;IACtC,gBAAgB,EAAE,gBAAgB;IAClC,cAAc,EAAE,oCAAoC;IACpD,qBAAqB,EAAE,WAAW;CACnC,CAAC;AAEF,SAAS,mBAAmB,CAAC,IAAY;IACvC,MAAM,KAAK,GAAG,IAAI,GAAG,EAAU,CAAC;IAChC,KAAK,MAAM,EAAE,IAAI,iBAAiB,EAAE,CAAC;QACnC,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC;QACjB,IAAI,CAAyB,CAAC;QAC9B,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;YACpC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAChB,IAAI,CAAC,CAAC,KAAK,KAAK,EAAE,CAAC,SAAS;gBAAE,EAAE,CAAC,SAAS,E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AAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;YAAE,SAAS;QACnC,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE;YAAE,SAAS;QACrE,GAAG,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACzC,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,aAAa,CAAC,SAAiB,EAAE,MAAkB,EAAE,MAAe;IAClF,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAClD,OAAO;QACL,MAAM,EAAE,wBAAwB;QAChC,KAAK,EAAE,sEAAsE;QAC7E,QAAQ,EAAE,GAAG,SAAS,gBAAgB;QACtC,SAAS,EAAE,wBAAwB;QACnC,QAAQ,EAAE,MAAM;QAChB,kGAAkG;QAClG,QAAQ,EAAE,QAAQ,MAAM,IAAI,KAAK,iBAAiB,MAAM,GAAG;QAC3D,UAAU,EAAE,MAAM,IAAI,SAAS;KAChC,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-05-
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-05-31T14:21:38.279Z",
|
|
5
|
+
"instarVersion": "1.3.172",
|
|
6
6
|
"entryCount": 193,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What to Tell Your User
|
|
7
|
+
|
|
8
|
+
If your agent mentors another agent, it will stop making the mentee re-do the same
|
|
9
|
+
checklist items over and over — it moves through the checklist and then observes,
|
|
10
|
+
re-checking only periodically. Nothing to configure.
|
|
11
|
+
|
|
12
|
+
## Summary of New Capabilities
|
|
13
|
+
|
|
14
|
+
- The mentor Stage-A composer now receives a `recentlyDrivenAgenda` coverage list
|
|
15
|
+
(derived in `buildConversationSurface` from the mentor's recent sent prompts) and
|
|
16
|
+
steers task selection by it: prefer not-yet-driven agenda items, and choose
|
|
17
|
+
observe-only when every item is recently covered, instead of re-cycling. When
|
|
18
|
+
nothing has been driven, behavior is unchanged. The two-hats leak detector is
|
|
19
|
+
untouched.
|
|
20
|
+
|
|
21
|
+
## Evidence
|
|
22
|
+
|
|
23
|
+
- Observed live while driving the codex mentee: the mentor cycled the same 6 agenda
|
|
24
|
+
items repeatedly (one item assigned 14 times), so the mentee kept re-verifying
|
|
25
|
+
already-checked capabilities with almost no new findings.
|
|
26
|
+
- Cause: Stage A judged "already covered" only from the bounded recent-conversation
|
|
27
|
+
window; once an assignment scrolled out, the item looked fresh and was re-driven.
|
|
28
|
+
- The fix derives a durable coverage list from the mentor's own recent prompts and
|
|
29
|
+
steers Stage A to prefer fresh items / observe-only when all are covered.
|
|
30
|
+
- Unit tests, tests/unit/MentorStageA.test.ts: the coverage list flags driven (and
|
|
31
|
+
not undriven) items; the prompt prefers fresh ones; all-covered steers to
|
|
32
|
+
observe-only; the no-coverage case is unchanged. All 31 tests pass.
|
|
33
|
+
|
|
34
|
+
## What Changed — The mentor stops re-assigning checklist items the mentee already did
|
|
35
|
+
|
|
36
|
+
If you run your agent as a mentor to another agent, it walks the mentee through a
|
|
37
|
+
checklist of things to verify. It decided what was "already done" by looking back
|
|
38
|
+
over the recent conversation — but it only kept a short window in view, so once an
|
|
39
|
+
assignment scrolled off the top, the mentor forgot it and assigned the same item
|
|
40
|
+
again. In practice it kept re-assigning the same handful of items in a loop, so the
|
|
41
|
+
mentee re-verified things it had already checked and rarely found anything new.
|
|
42
|
+
|
|
43
|
+
Now the mentor keeps a short, durable list of what it has recently driven (built
|
|
44
|
+
from its own recent messages, so it doesn't scroll away). It prefers items not on
|
|
45
|
+
that list, and if the whole checklist is already covered it simply observes instead
|
|
46
|
+
of pointlessly re-assigning. Old items quietly become eligible again over time, so
|
|
47
|
+
it still re-checks periodically to catch regressions — just not every single time.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Side-effects — Mentor agenda coverage (stop re-cycling)
|
|
2
|
+
|
|
3
|
+
## 1. What files/state does this touch at runtime?
|
|
4
|
+
`src/monitoring/MentorStageA.ts` only: `buildConversationSurface` computes a new
|
|
5
|
+
`recentlyDrivenAgenda` field on the surface (from the `mentorSent` it already
|
|
6
|
+
receives), and `buildStageAContext` reads it to steer task selection. New optional
|
|
7
|
+
field on the `ConversationSurface` interface. No new state, config, schema,
|
|
8
|
+
endpoint, or runner wiring.
|
|
9
|
+
|
|
10
|
+
## 2. Does it change any functional behavior?
|
|
11
|
+
Only which agenda item Stage A prefers. When some items are recently driven, the
|
|
12
|
+
prompt steers the compose LLM to prefer not-yet-driven items and to observe-only
|
|
13
|
+
when ALL are covered. When nothing is driven (or no agenda), behavior is unchanged.
|
|
14
|
+
|
|
15
|
+
## 3. What happens on failure / weird config?
|
|
16
|
+
Pure string/array logic; cannot throw. If `mentorSent` is empty/absent,
|
|
17
|
+
`recentlyDrivenAgenda` is simply absent and the prompt uses the original steering.
|
|
18
|
+
The matching is a substring check on the item stem — a non-match just means the item
|
|
19
|
+
is treated as not-yet-driven (fail-toward-driving, never toward silence).
|
|
20
|
+
|
|
21
|
+
## 4. Migration parity — do existing agents get it?
|
|
22
|
+
Yes, via the normal release — code-only, compiled into `dist`. No agent-installed
|
|
23
|
+
file / config / template change → no `PostUpdateMigrator` pass.
|
|
24
|
+
|
|
25
|
+
## 5. Could it spam / flood / burn resources?
|
|
26
|
+
The opposite — it REDUCES waste: it stops the mentor from re-driving the same
|
|
27
|
+
already-verified agenda items every tick (each re-drive spends a mentee cycle + the
|
|
28
|
+
mentor's Stage-A/Stage-B LLM work). No new I/O, timers, or LLM calls; the coverage
|
|
29
|
+
list is computed from data already read.
|
|
30
|
+
|
|
31
|
+
## 6. Rollback / off-switch?
|
|
32
|
+
Revert the `recentlyDrivenAgenda` computation + the prompt branch + the type field.
|
|
33
|
+
No data, no migration, no flag. Behavior returns to window-only coverage.
|
|
34
|
+
|
|
35
|
+
## 7. Concurrency / ordering?
|
|
36
|
+
None — both functions are pure + synchronous. The coverage list is computed before
|
|
37
|
+
the prompt is assembled; ordering of the rest of the surface/prompt is unchanged.
|
|
38
|
+
|
|
39
|
+
## Blast radius
|
|
40
|
+
Small + mentor-only. One pure function gains a derived field; one prompt gains a
|
|
41
|
+
conditional block + revised steering. `recentlyDrivenAgenda ⊆ onboardingAgenda`, so
|
|
42
|
+
`surfaceText` already covers it → the two-hats leak detector + canary are untouched
|
|
43
|
+
and enforcement strength is unchanged. Affects only mentor-enabled agents (mentor
|
|
44
|
+
ships dark elsewhere), and only the task-selection wording.
|