documentation: Pilot the knowledge note on the events module, and measure whether it helps
Back to our planType
documentation
Summary
Write the first knowledge note, for the events module, and measure whether it helps: does an agent with the note find its way faster and get the task right, compared with the same agent without it? The rollout to the other modules happens only if the numbers say yes.
Problem
Notes cost effort to write and to keep in sync, and a study found that descriptive context files often don't help (ETH Zurich, opens in a new tab). Nobody has measured it on this repo. The owner agreed on 2026-11-06 (recorded on the epic) to pilot one module and decide from the result.
Proposed fix
- Write the eval tasks first (the owner's lighter eval, 2026-11-06, recorded on #712), before any note exists, and post them as a comment on this issue so the notes can't be shaped to fit them: 8 tasks (at least 5 on the events module, the rest on content types the generated reference from #714 covers), each with a known answer or a test that grades it (for example "where does the events page's 'this week' list come from", a rule change in a
domain/file with its test, a new field throughcms/, the mapper and a component). - Write the note
src/modules/events/README.mdfrom the template indocs/knowledge/note-template.md, at most 80 lines. It covers:- the screens:
/events,/events/category/[category], the paged lists under/events/list/and/events/category/[category]/list/,/events/[slug], the "this week" block on CMS pages, and the sidebar list; and for each, where its data comes from (theeventsandcategoriescollections, hardcoded text, or shared code); - behaviors the config doesn't show: the rule for "upcoming", the list scopes, official meetings, category filters as pages (decision 0015), what
revalidateEventexpires, suggestions from agents held as drafts, search indexing, live preview, structured data; - the shared pieces it uses, the rules with the test that protects each, its entry files, and links to its decision records.
It links to the generated page for the
eventscontent type and never repeats its fields.
- the screens:
- Verify every sentence against the code. A statement that can't be traced to a file is removed.
- Make the note load by itself (decision 0019, §2 and §5): add
docs/knowledge/map.jsonwith the events entry (src/modules/events/**→src/modules/events/README.md); extendscripts/agent-context.mjs, tests first, to read the map and generate a path-scoped rule for each entry, as it does for the guidelines; add the note's line todocs/knowledge/index.md; and import the index inCLAUDE.md, keeping session start within the 300-line budget. - Measure. Run each task twice per condition in a fresh session at the standard model and medium effort, in a throwaway worktree that is never pushed:
mainbefore #144 (aa0bd3d), andmainwith the knowledge layer (about 32 runs). Record for each run: correct or not, tokens used, tool calls and files read before the first correct edit, and any wrong turn. Keep the task set and a small script so the eval can be run again after later changes. - Decide. Post the table under a
### [DECISION]header. The rollout goes ahead only if correctness doesn't drop and tokens fall on most tasks. If not, revise the template once and measure again, or stop and report to the owner.
Acceptance criteria
- Not done: The 8 tasks, with how each is graded, are posted on this issue before the note's first commit.
- Not done:
src/modules/events/README.mdexists, follows the template, is at most 80 lines and repeats no field list or props table. - Not done: Every statement in it names or links the file or test it comes from.
- Not done:
docs/knowledge/index.mdlists it, andCLAUDE.mdimports the index;npm run agent-contextpasses within the budget. - Not done:
docs/knowledge/map.jsonhas the events entry, and the generated rule for the note loads when a file undersrc/modules/events/is read (checked in a live session). - Not done: Every run's numbers are posted in one table (2 runs per task per condition), with the decision and the reason.
- Not done: Decision 0019 §8 is updated to this eval.
- Not done: No code under
src/changes in the PR (the note is the only new file there); the throwaway worktrees are deleted.
Files likely touched
src/modules/events/README.md (new), docs/knowledge/index.md, docs/knowledge/map.json (new), scripts/agent-context.mjs and its tests, .claude/rules/generated/ (one new copy), CLAUDE.md (one import line), docs/architecture/decisions/0019-knowledge-layer.md (§8).
Must not touch
Any code under src/, AGENTS.md other than one pointer to the index in "Where knowledge lives" (decision 0019 §2), .agents/, .claude/ other than the generated copy, .github/, docs/guidelines/, docs/process/.
Open questions
None for the owner. The go or no-go threshold above is a working default; he can change it with a comment.
Area
cms, frontend, tooling
Priority
high
Generated by Claude Code, opens in a new tab