mirror of
https://github.com/garrytan/gstack.git
synced 2026-05-02 11:45:20 +02:00
test(routing): assert slash-prefixed skills + new policy + current names
Align gen-skill-docs.test.ts routing assertions with the remediated routing-injection output: - Expect '/office-hours' slash-prefixed form (matches SKILL.md.tmpl style) - Add test asserting /context-save + /context-restore references (guards against stale '/checkpoint' name regression) - Add test asserting "When in doubt, invoke the skill" soft policy (guards against "Do NOT answer directly" hard policy regression) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1361,10 +1361,21 @@ describe('preamble routing injection', () => {
|
||||
});
|
||||
|
||||
test('routing section content includes key routing rules', () => {
|
||||
expect(shipContent).toContain('invoke office-hours');
|
||||
expect(shipContent).toContain('invoke investigate');
|
||||
expect(shipContent).toContain('invoke ship');
|
||||
expect(shipContent).toContain('invoke qa');
|
||||
expect(shipContent).toContain('invoke /office-hours');
|
||||
expect(shipContent).toContain('invoke /investigate');
|
||||
expect(shipContent).toContain('invoke /ship');
|
||||
expect(shipContent).toContain('invoke /qa');
|
||||
});
|
||||
|
||||
test('routing section uses renamed checkpoint skills (not stale /checkpoint)', () => {
|
||||
expect(shipContent).toContain('invoke /context-save');
|
||||
expect(shipContent).toContain('invoke /context-restore');
|
||||
expect(shipContent).not.toContain('invoke checkpoint');
|
||||
});
|
||||
|
||||
test('routing section uses soft "when in doubt" policy, not hard "ALWAYS invoke"', () => {
|
||||
expect(shipContent).toContain('When in doubt, invoke the skill');
|
||||
expect(shipContent).not.toContain('Do NOT answer directly');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user