Skip to content
SprecherEast
Issue 715

documentation: Pilot the knowledge note on the events module, and measure whether it helps

Back to our plan
Done
documentationfrontendcmstoolingpriority: high

Type

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

  1. 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 through cms/, the mapper and a component).
  2. Write the note src/modules/events/README.md from the template in docs/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 (the events and categories collections, 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 revalidateEvent expires, 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 events content type and never repeats its fields.
  3. Verify every sentence against the code. A statement that can't be traced to a file is removed.
  4. Make the note load by itself (decision 0019, §2 and §5): add docs/knowledge/map.json with the events entry (src/modules/events/** → src/modules/events/README.md); extend scripts/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 to docs/knowledge/index.md; and import the index in CLAUDE.md, keeping session start within the 300-line budget.
  5. 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: main before #144 (aa0bd3d), and main with 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.
  6. 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.md exists, 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.md lists it, and CLAUDE.md imports the index; npm run agent-context passes within the budget.
  • Not done: docs/knowledge/map.json has the events entry, and the generated rule for the note loads when a file under src/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

See it on GitHub, opens in a new tab