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:
+11
-7
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user