prompts: the shared formatting guide composes for practice too
The practice agent wrote wrong LaTeX delimiters — 40-formatting.md (the \(...\)/\[...\) delimiter law, markdown, mermaid) lived in shared/, which practice deliberately excluded. Owner ruling: formatting applies in every setting. Practice now composes its own directory plus a CURATED shared allowlist (40-formatting.md only — the question/ confidence/file mechanics stay out, practice has no such tools); the composition test pins the appendix and the order.
This commit is contained in:
@@ -153,8 +153,8 @@ describe("the practice agent", () => {
|
||||
|
||||
// ── the prompt composition ──────────────────────────────────────────────────
|
||||
|
||||
describe("practice prompt composition (own directory alone)", () => {
|
||||
it("composes base + doctrine — never the teaching base or shared fragments", () => {
|
||||
describe("practice prompt composition (own directory + the formatting appendix)", () => {
|
||||
it("composes base + doctrine — never the teaching base or question/confidence mechanics", () => {
|
||||
const prompt = composeInstructions("practice");
|
||||
// The base's voice section and the doctrine's spine are present…
|
||||
assert.match(prompt, /Everything in this section deletes a default/);
|
||||
@@ -167,6 +167,13 @@ describe("practice prompt composition (own directory alone)", () => {
|
||||
assert.doesNotMatch(prompt, /predict/i);
|
||||
});
|
||||
|
||||
it("the SHARED formatting guide composes (owner, 2026-10-04 late): LaTeX delimiters in every setting", () => {
|
||||
const prompt = composeInstructions("practice");
|
||||
// The delimiter law — practice must write \(...\)/\[...\] too.
|
||||
assert.match(prompt, /NEVER `\$` or `\$\$`/);
|
||||
assert.ok(prompt.indexOf("# The practice session") < prompt.indexOf("## Formatting"), "formatting rides as the appendix");
|
||||
});
|
||||
|
||||
it("base precedes doctrine (00- sorts before 10-)", () => {
|
||||
const prompt = composeInstructions("practice");
|
||||
assert.ok(prompt.indexOf("The agent") < prompt.indexOf("# The practice session"));
|
||||
|
||||
Reference in New Issue
Block a user