feat(#1135): migrate planning hooks to capabilities (#1141)

* feat(#1135): migrate planning hooks to capabilities

* chore(#1135): add phase 6 planning capabilities changeset

* fix(#1135): satisfy lint for agent hook rendering
This commit is contained in:
Tom Boucher
2026-06-12 19:51:54 -04:00
committed by GitHub
parent fd01e7a12e
commit 4ab5c7b3f2
20 changed files with 1025 additions and 176 deletions

View File

@@ -643,6 +643,27 @@ describe('renderLoopHooks', () => {
assert.match(rendered, /skip/);
});
test('step hook renders agent ref and inline prompt fragment', () => {
const registry = makeRegistry({
point: 'plan:pre',
steps: [{
capId: 'research',
point: 'plan:pre',
ref: { agent: 'gsd-phase-researcher' },
fragment: { inline: 'Research the phase before planning.' },
produces: ['RESEARCH.md'],
consumes: ['CONTEXT.md'],
onError: 'skip',
}],
});
const resolved = resolveLoopHooks({ point: 'plan:pre', registry, config: {} });
assert.deepEqual(resolved.activeHooks[0].fragment, { inline: 'Research the phase before planning.' });
const rendered = renderLoopHooks(resolved);
assert.match(rendered, /agent:gsd-phase-researcher/);
assert.match(rendered, /Research the phase before planning\./);
});
test('contribution hook renders into role', () => {
const resolved = {
point: 'plan:pre',