Files
learnharness/src/agent/prompts/README.md
T
amosblomqvist 28ccc76594 fix: README.md leaked into the teacher's system prompt
composeInstructions loaded EVERY .md in src/agent/prompts — including
README.md, the directory's human documentation, which rode into the
system prompt as its own section (visible in OpenRouter logs, old POC
paths and all).

The loader now enforces the documented convention: only numeric-prefix
fragments (\d+-*.md) compose. README.md stays in the directory as docs
and can never reach the model again. README's rule text updated to
match; composeInstructions exported for tests; regression test asserts
the README never leaks and every numeric fragment composes verbatim.
2026-09-02 03:19:03 +03:00

815 B

Prompt fragments

The teacher's system prompt is composed at agent creation:

  1. src/agent/system-prompt.md — the base (owned by the orchestrator; do not edit from a worker).
  2. Every numeric-prefix *.md fragment in this directory, in sorted filename order, joined with --- separators. The loader enforces the numeric prefix (\d*-*.md) — other files (like this README) never enter the model's prompt.

Rules for adding a fragment:

  • Name it with a numeric order prefix: 10-plan-tree.md, 20-jobs.md, 30-phases.md.
  • One fragment per workstream — your brief tells you which filename you own.
  • Document YOUR tools/behaviors exactly; reference tool input field names verbatim (they must match the zod schemas).
  • Keep it tight: fragments are always in context. No restating the base prompt.