agent: builder model: opus max_turns: 120 budget_usd: 30 —

Brief: E12-2, a literal’s holes and the build-time tables into Nikaia (#125)

Score: self-hosting lane (docs/priorities.md, S 2): ~350 Rust lines replaced; C ~10 M (E12-1 moved ~470 lines in one Opus run, 654866b). The row and its risks are in docs/selfhosting-plan.md, C-7 rest and E12 (read it first; its line ranges are old, the ones below are re-grepped at 6920907).

The slice (row E12-2)

The prerequisite, settled

The table names R-6 or a walker probe. contracts/sync.rs::visit_expr (:305) is already Nikaia’s walk (tools/check_visit.nika: check_visit_children, check_visit_has_holes) plus literal_expressions for the holes. So the Nikaia side walks with check_visit, not emit_walk::visited_in_*; then it sees the same nodes by construction.

Known risks

To build (each its own commit, Part of #125)

  1. interpolated_holes, template_holes, hole_as_read, literal_expressions, literal_expressions_bound into emit_holes.nika, with the host hole; the Rust adapter stays; names_read goes, check/host.rs calls Nikaia.
  2. template_hole_tables, fold_callees, built_at_build_time into emit_holes.nika, with cached_holes, cached_kept_calls.

Done when

Both built; lower-std clean and byte-identical apart from the moved code, generated diff committed; nikaia test tests/compiler --both-settings; it filters template, interpolat, fold, build_time, sync, views_kept, and the guard set of .claude/agents/builder.md. Report the Rust lines removed (python3 scripts/self_hosting.py) under Tests:. Changelog: none unless a message text changes.

Stop and report if

A host method beyond the four named is needed, or an error in another agent’s file.

Read docs/builder-facts.md.

Rules (CLAUDE.md; this block is pasted into every brief, also a fix-forward)

Report (at most 15 lines, to exactly /home/user/Nikaia/docs/briefs/e12-2.md.report.md)

Fields of docs/architect.md, Briefs and reports: Result: done|noop|partial|blocked (the bare word alone on that line: Result: done, never a summary after it, which cuts the batch, b869a 2026-10-27; Owner: is a question for the owner or none, never a role), Files, Commit, Fixes, Pushed, Tests, Gate (green|red), Deviation, Found, Needs, Changelog, Owner, Disk freed. none where nothing, and then the bare word: Deviation: none (a note) cuts the batch (batch.nika compares exactly); a note goes into the commit message. Found: is only for a defect outside your change (it cuts the batch); how you solved your own step goes into the commit message. Deviation: is only a step of the brief built otherwise than written or not built (a choice the brief left to you, such as keep what X needs and say so, is no deviation: it goes into the commit message); how you verified (e.g. a test not run against the unfixed compiler) goes under Tests:. A noop says why under Tests: (what was probed), not under Deviation:. Final answer, one line: done <sha>, report <path> (or BLOCKED: ... / PUSH REJECTED ...).

Attribution: Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com Claude-Session: https://claude.ai/code/session_01GFeMqxRbtUMiGVyDMxsvEq

This site is open source. Improve this page.