agent: builder model: sonnet max_turns: 120 budget_usd: 20 —

Brief: #867, emit/seeds.rs moves to tools/emit_seeds.nika (writer half first)

Score: S=2 (951 Rust lines, the writer about 330), O=0.5 M, C=10 M (E11-4b part 2, b857), self-hosting lane 1 (docs/priorities.md; bugs lane has #665 before it).

Facts

crates/nikaia/src/emit/seeds.rs (951 lines, 0 calls into tools::) writes a map position’s hidden seed parameters (__S0, ADR-010 D9) into the text of a written type, and reads which pub items hold maps. It has two halves:

Callers: emit/host.rs 311-444 (place.borrow_mut()..., Seeds::declared), emit/mod.rs 802, 1071, 1077, 1246, 1603, contracts/maps.rs:35; Nikaia side tools/emit_function.nika 269/814 through host seeds_begin/seeds_end (tools/emit_host.nika:105).

To build

  1. The writer half moves to crates/nikaia-std/src/tools/emit_seeds.nika (prefix emit_seeds_): EmitSeedsPlace, EmitSeedsShape, the seed tables the writer reads (calls, shapes, …) as a Nikaia struct the Rust Seeds holds as one field; seeds.rs keeps the reader and calls nikaia_std::tools::emit_seeds::*. Output of lower-std unchanged outside the slice’s files.
  2. If turns remain: the reader half, leaves first (last, is_map, bare, count, distinct, key); a walk that cannot move yet stays Rust.
  3. Tests: none new unless a defect is met (then a tests/compiler/ test, own commit); cargo test --profile fast -p nikaia --test it -- seeds maps sysroot, nikaia test --both-settings --project tests/compiler. Row in scripts/self_hosting.py.

Generated by Claude Code

Steps

  1. Read docs/builder-facts.md and CLAUDE.md Moving Rust into Nikaia. Pattern: tools/libraries.nika + libraries.rs; a new .nika needs one lower-std run with the old binary before cargo build.
  2. rs2nika draft first (crates/rs2nika/convert, --profile emit --prefix emit_seeds_); report rs2nika: kept N of M.
  3. Commit after each step; last commit Fixes #867 only if both halves moved, else Part of #867 and say what is left under Tests:. Add seeds writer switched to docs/selfhosting-plan.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/b867-seeds-writer.md.report.md)

Fields of docs/architect.md, Briefs and reports: Result: done|noop|partial|blocked (the bare word first; 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. 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.