mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-16 09:55:29 +02:00
feat(auq-format): proactive SESSION_KIND=spawned rule ordered above the Conductor rule (#2733)
The spawned classification previously existed only in the failure-fallback branch — a spawned session was invited to call AskUserQuestion and reach auto-choose via the deny/error detour, and a spawned session inside a Conductor workspace hit the Conductor prose-STOP rule first. The Tool resolution list now leads with the spawned rule (auto-choose recommended, never prose, never BLOCKED, destructive gates resolve conservative), the self-check carries the never-reach-this-checklist clause, and all tier>=2 SKILL.md renders are regenerated. Context-budget fixture refreshed in the same commit per the ratchet protocol (the AUQ section is eager in every tier>=2 skill). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
791eb870c2
commit
0c1b50441d
@@ -231,6 +231,27 @@ describe('generateAskUserFormat — runtime-failure prose fallback', () => {
|
||||
expect(out).toMatch(/not writing prose — unless `CONDUCTOR_SESSION: true`[\s\S]*OR the documented failure fallback applies/);
|
||||
});
|
||||
|
||||
// #2733: proactive spawned rule — spawned outranks Conductor. Without it a
|
||||
// spawned session's AUQ handling exists only as a failure-reaction path, and
|
||||
// a spawned subagent inside a Conductor workspace prose-STOPs with no reader.
|
||||
test('Spawned: proactive do-not-call rule present and ordered ABOVE the Conductor rule', () => {
|
||||
const spawnedRule = out.indexOf('`SESSION_KIND: spawned` echoed');
|
||||
const conductorRule = out.indexOf('`CONDUCTOR_SESSION: true` echoed');
|
||||
expect(spawnedRule).toBeGreaterThan(0);
|
||||
expect(conductorRule).toBeGreaterThan(0);
|
||||
expect(spawnedRule, 'spawned rule must outrank (precede) the Conductor rule').toBeLessThan(conductorRule);
|
||||
expect(out).toMatch(/never prose, never BLOCKED/);
|
||||
expect(out).toMatch(/outranks the Conductor rule/);
|
||||
});
|
||||
|
||||
test('Spawned: destructive-gate carve-out present (conservative-continue, never prose-STOP)', () => {
|
||||
expect(out).toMatch(/never auto-choose a destructive or irreversible option[\s\S]{0,80}conservative/);
|
||||
});
|
||||
|
||||
test('Spawned: self-check carries the never-reach-this-checklist clause', () => {
|
||||
expect(out).toMatch(/in `SESSION_KIND: spawned` you should never reach this checklist/);
|
||||
});
|
||||
|
||||
// Conductor-default-prose contract (the proactive path, distinct from the
|
||||
// failure fallback). Guards the Tool-resolution rule + self-check wording.
|
||||
test('Conductor: do-not-call rule present in Tool resolution', () => {
|
||||
|
||||
Reference in New Issue
Block a user