Skip to content
SprecherEast
Issue 801

documentation: Trial the knowledge layer across modules, screens and content types before calling it done

Back to our plan
Done
documentationtoolingpriority: medium

Type

documentation

Summary

Before the knowledge layer is called done, prove it helps. Run one controlled trial across the modules, the screens and the Payload content types: the same few dozen tasks with the notes and without them. The layer passes when agents answer faster, with fewer tool calls and tokens, get the answers right, and never have to work out from the code how fields relate.

Filed at the owner's request (2026-11-07, relayed by the Claude Code session that filed this).

Problem

Blocked by the note issues #781 to #792: it runs once they have merged.

The pilot (#715) measured one module with 8 tasks. The rollout adds a note for every other module and shared area (#781 to #792). Each note issue checks its own note with a few tasks, but nobody has checked the layer as a whole: whether the notes together help on tasks that cross modules, screens and content types, or whether they only add tokens.

Proposed fix

  1. Reuse the eval harness in scripts/knowledge-eval/ (run.mjs, analyze.mjs, tasks.json; read its README first). Don't build a second one.
  2. Extend the task set to a few dozen tasks: each module and shared area, several screens (where a page's data comes from), and several content types (access, hooks, links between fields). Mix questions and small changes, as the pilot did. Each question task names the facts it needs, and at least some tasks hinge on a link between fields (a value one field feeds into another, a hook that copies a value, a mapper's input and the prop it becomes).
  3. Two conditions on the same tasks: a commit with the notes against one without them, or the earlier baseline the pilot used. At least two runs per task and condition, as the harness defaults.
  4. Measure per task: time to answer, tokens, tool calls and accuracy. The transcript already records the duration (durationMs in transcript.mjs); add it to analyze.mjs's tables if it isn't shown.
  5. Check for reverse engineering: read the transcripts of the tasks that depend on a link between fields. With the notes, the agent should find the link in the note and not have to open a chain of files to rebuild it. Count the runs where it still had to.
  6. Judge the result:
    • Good: with the notes, answers are at least as accurate on every task, quicker and with fewer tool calls and tokens on most tasks, and no run had to reverse-engineer a link the notes should state.
    • Poor (any of: lower accuracy on a task, more tokens or calls on most tasks, or reverse engineering where a note should have answered): find which notes caused it, fix them in their own PRs (a missing field link, a wrong statement, a note too long to read quickly), then rerun the affected tasks. Repeat until the result is good, or record on this issue why a part can't be fixed and what is done instead.
  7. Record the results on this issue as a ### [DECISION] comment: the tables from analyze.mjs, the reverse-engineering count, what was fixed between runs, and the verdict.

Acceptance criteria

  • Not done: The trial uses scripts/knowledge-eval/, with a task set covering every module and shared area that has a note, several screens and several content types, a few dozen tasks in all.
  • Not done: Both conditions run on the same tasks, at least twice each.
  • Not done: Results per task: time to answer, tokens, tool calls and accuracy, with and without the notes.
  • Not done: The field-link tasks' transcripts are read, and the number of runs that had to reverse-engineer a link is recorded.
  • Not done: The verdict is good by the definition above, or the notes were fixed and the trial rerun until it was (or the issue records why not and what follows).
  • Not done: The results are posted on this issue, and the epic (#712) links them.
  • Not done: Any harness change has tests and passes the required checks.

Files likely touched

  • scripts/knowledge-eval/tasks.json (new tasks)
  • scripts/knowledge-eval/analyze.mjs and report.mjs (time in the tables), with their tests
  • scripts/knowledge-eval/README.md (the larger task set)
  • Notes under src/modules/*/README.md and src/platform/*/README.md, only in follow-up PRs that fix what the trial finds

Must not touch

  • The always-loaded files and the budget check.
  • Code under src/ other than the notes.

Open questions

  • Cost: a few dozen tasks, two conditions and two runs each is many sessions of the owner's Claude usage, run on his computer (never in CI). If that cost is too high when the work starts, run a representative subset first and say so here.
  • Size: not set; a cloud session can't read the board. Suggested: L.

Area

tooling

Priority

medium


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab