per-turn reminder: turn-composition protocol as its own system chunk after every GM turn, one live copy elided like the papers; handbook cut follows (short turns)

This commit is contained in:
2026-11-14 22:00:04 +00:00
parent 5956e44f7a
commit 89a2c161b3
13 changed files with 156 additions and 31 deletions
+11 -7
View File
@@ -267,13 +267,17 @@ route('POST', '/api/packages', async ({ body, user }) => {
return { package: JSON.parse(r.out) };
});
// the repo-fed prompts, read-only: per-project opening + guards and
// substrate invariants — never copied into a run, so the editor shows
// them as context, not as something to edit
route('GET', '/api/prompts', async () => ({
system: fs.readFileSync(path.join(ROOT, 'system.md'), 'utf8').trim(),
invariants: fs.readFileSync(path.join(ROOT, 'invariants.md'), 'utf8').trim(),
}));
// the repo-fed prompts, read-only: per-project opening + guards,
// substrate invariants, and the per-turn reminder — never copied into
// a run, so the editor shows them as context, not as something to edit
route('GET', '/api/prompts', async () => {
const readOpt = (f) => (fs.existsSync(path.join(ROOT, f)) ? fs.readFileSync(path.join(ROOT, f), 'utf8').trim() : null);
return {
system: readOpt('system.md'),
invariants: readOpt('invariants.md'),
reminder: readOpt('reminder.md'),
};
});
// the clerk's list, enriched with what the server already knows: the
// open window, the pending ask, and the housekeeping bookkeeping. A