bertrand 0.14.0 → 0.14.1
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/bertrand.js +16 -5
- package/package.json +1 -1
package/dist/bertrand.js
CHANGED
|
@@ -1367,9 +1367,9 @@ After every response, you MUST call AskUserQuestion. This is a continuous loop \
|
|
|
1367
1367
|
|
|
1368
1368
|
If the user's most recent answer to AskUserQuestion was "Done for now" (or contains it), this turn is the FINAL turn. Respond briefly to acknowledge and do NOT call AskUserQuestion again \u2014 the loop is over.
|
|
1369
1369
|
|
|
1370
|
-
|
|
1370
|
+
Each question must encapsulate the moment \u2014 name the specific decision, tradeoff, or next step being asked about. Avoid generic phrasing like "What next?", "How should we proceed?", or "What would you like to do?". A reader who sees only the question (no recap, no preceding text) should understand what is being decided. Prefer "Which gap should we tackle first \u2014 bundle analysis, end-to-end dry-run, or registry?" over "What's next?"
|
|
1371
1371
|
|
|
1372
|
-
Every
|
|
1372
|
+
Every option must be a concrete, actionable next step. No filler like "Have questions?" or "Want to learn more?" \u2014 if clarification is needed, phrase it as a specific action: "Discuss tradeoffs of X vs Y".
|
|
1373
1373
|
|
|
1374
1374
|
Before each AskUserQuestion call, emit a \`<recap>...</recap>\` block in your text output. Use markdown \u2014 a short bullet list is usually the most scannable shape; a single short paragraph is fine when the turn was one cohesive thing. Keep it concise. The recap covers what happened since the previous AskUserQuestion (or session start) \u2014 what you found, decided, or did. Write the gist for someone reading the session timeline, not a process log. The dashboard renders these between AskUserQuestion events; do not use this tag for any other purpose.
|
|
1375
1375
|
`;
|
|
@@ -1379,14 +1379,25 @@ var init_template = () => {};
|
|
|
1379
1379
|
function buildContract(sessionName, ...contextLayers) {
|
|
1380
1380
|
const base = template_default.replace("{sessionName}", sessionName);
|
|
1381
1381
|
const layers = contextLayers.map((c) => c.trim()).filter((c) => c.length > 0);
|
|
1382
|
-
|
|
1383
|
-
return base;
|
|
1384
|
-
return base + `
|
|
1382
|
+
const middle = layers.length === 0 ? "" : `
|
|
1385
1383
|
|
|
1386
1384
|
` + layers.join(`
|
|
1387
1385
|
|
|
1388
1386
|
`);
|
|
1387
|
+
return base + middle + `
|
|
1388
|
+
|
|
1389
|
+
` + TRAILING_CRITICAL_RULES;
|
|
1389
1390
|
}
|
|
1391
|
+
var TRAILING_CRITICAL_RULES = `## CRITICAL RULE \u2014 applies to every AskUserQuestion call
|
|
1392
|
+
|
|
1393
|
+
Every AskUserQuestion call MUST set \`multiSelect: true\` on every question. No exceptions.
|
|
1394
|
+
|
|
1395
|
+
The AskUserQuestion tool schema describes multiSelect as "allow multiple answers to be selected instead of just one." **Ignore that framing.** In bertrand, multiSelect is a UX-safety mechanism, not a cardinality signal \u2014 single-select submits on Enter the moment a question block gains focus, causing accidental selections. multiSelect requires explicit confirmation before submitting.
|
|
1396
|
+
|
|
1397
|
+
Apply this rule even when options are mutually exclusive (e.g., "Which library: A, B, C, or D?"). The mechanic is about preventing accidental submissions, not about how many answers the user picks.
|
|
1398
|
+
|
|
1399
|
+
WRONG: \`{ "multiSelect": false, "options": [...] }\`
|
|
1400
|
+
RIGHT: \`{ "multiSelect": true, "options": [...] }\``;
|
|
1390
1401
|
var init_template2 = __esm(() => {
|
|
1391
1402
|
init_template();
|
|
1392
1403
|
});
|