mirror of
https://github.com/garrytan/gstack.git
synced 2026-09-17 18:32:19 +02:00
feat(codex): carve the three mutually exclusive modes into sections
Review/Challenge/Consult mode bodies (34.7KB where at most one ever runs) load on demand: skeleton 81.0KB -> 55.2KB, union 1.04x the monolith. The mode dispatch, filesystem boundary, and a new always-loaded 'Synthesis recommendation (REQUIRED) — all modes' block stay skeleton-side (the AUQ per-skill pins pass unchanged); the plan-file report + exit gate render after the last section pointer per the gateAfterStop pattern. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
3a78bf7c1d
commit
87589961a4
@@ -56,6 +56,17 @@ describe('deprecated codex web-search flag is gone (#2525)', () => {
|
||||
expect(rendered).not.toContain('{{CODEX_WEB_SEARCH_FLAG}}');
|
||||
});
|
||||
|
||||
test('rendered codex mode sections resolve the token at every invocation site', () => {
|
||||
// The mode bodies (and their codex invocations) are carved into
|
||||
// codex/sections/*-mode.md (T9) — each generated section must carry the
|
||||
// live flag, never the unresolved token.
|
||||
for (const file of ['review-mode.md', 'challenge-mode.md', 'consult-mode.md']) {
|
||||
const rendered = fs.readFileSync(path.join(ROOT, 'codex', 'sections', file), 'utf-8');
|
||||
expect(rendered, `${file} lost the web-search flag`).toContain(CODEX_WEB_SEARCH_FLAG);
|
||||
expect(rendered).not.toContain('{{CODEX_WEB_SEARCH_FLAG}}');
|
||||
}
|
||||
});
|
||||
|
||||
test('rendered autoplan skill resolves the token at every inline site', () => {
|
||||
const rendered = fs.readFileSync(path.join(ROOT, 'autoplan', 'SKILL.md'), 'utf-8');
|
||||
const count = rendered.split(CODEX_WEB_SEARCH_FLAG).length - 1;
|
||||
|
||||
Reference in New Issue
Block a user