feat(agent): Ralph sleep-wake daemon — native Zig binary#50
Merged
Conversation
…aude CLI spawn 8 Zig modules (~500 LOC): - main.zig: entry point, env vars, CLI args - agent_loop.zig: WAKE→WORK→SLEEP cycle - identity.zig: load .ralph/IDENTITY.md - context_builder.zig: assemble structured prompt - github_poller.zig: fetch pending issues via HTTP - claude_runner.zig: spawn `claude` CLI as child process - handover.zig: read/write .ralph/HANDOVER.md - state.zig: file-based key-value persistence Build: `zig build agent` / `zig build agent -- --single-shot` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
gHashTag
pushed a commit
that referenced
this pull request
Mar 15, 2026
…asking cmd_verify rewritten to properly compare readback vs .bit file: - Find FDRI write command in .bit → extract frame data at correct offset - Skip 1 pad frame in readback (101 words = 404 bytes) - Mask ECC word (word #50 per frame) — volatile on readback - Track BRAM content frames separately — volatile after startup - Report logic vs BRAM vs ECC mismatches independently - PASS if logic mismatches < 1% (without .rbd/.msd, some volatile bits expected) Also corrects 5 stale experience entries (FPGA-001/006/007/008/009) that incorrectly blamed CPLD 0xFFFE as dead hardware — real bug was bitrev(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
gHashTag
pushed a commit
that referenced
this pull request
Mar 15, 2026
Cherry-picked 3 fixes from feat/fpga-dlc10-breakthrough: - bitrev() in CFG_OUT reads (STAT 0x02089E3F → 0x401079FC, DONE=YES) - bitrev() in readback (raw TDO byte reversal) - UG470-compliant verify: pad frame skip, ECC word #50 mask, BRAM tracking Added `tri fpga jtag` CLI wrapper (write/readback/verify/status/idcode/dna/reg/probe/debug). All 9 JTAG commands PASS on XC7A100T via DLC-10 Platform Cable USB II. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
gHashTag
pushed a commit
that referenced
this pull request
Mar 15, 2026
Replaced naive byte-by-byte comparison with proper UG470 verify: - Parse FDRI write command to find frame data offset - Skip pad frame in readback (101 words) - Mask ECC word #50 per frame (volatile on readback) - Track BRAM content frames separately (volatile after startup) - Report logic vs BRAM vs ECC mismatches independently - PASS if logic mismatches < 1% (without .rbd/.msd mask files) Results on hslm_full_top.bit: 3753 frames compared, 2106 clean, ECC=3021 (expected), BRAM=1768 (expected), logic=61728 (4% — needs FDRI multi-range parsing for full accuracy, STAT CRC=OK confirms correct programming). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
gHashTag
added a commit
that referenced
this pull request
Mar 18, 2026
… canvas wave [Golden Chain #50] - TVCCorpus.initHeap(allocator): eliminates 2.15 GB stack frame, Debug builds work - Provider health wired to llmCascade(): recordSuccess/recordFailure with real latency - Circuit breaker: skip providers with 3+ consecutive failures - Canvas wave ring modulated by g_last_wave_state (source hue, confidence pulse, learning glow) - 2947/2954 tests pass (+4 new v2.1 tests) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
gHashTag
added a commit
that referenced
this pull request
Mar 18, 2026
…aude CLI spawn (#50) 8 Zig modules (~500 LOC): - main.zig: entry point, env vars, CLI args - agent_loop.zig: WAKE→WORK→SLEEP cycle - identity.zig: load .ralph/IDENTITY.md - context_builder.zig: assemble structured prompt - github_poller.zig: fetch pending issues via HTTP - claude_runner.zig: spawn `claude` CLI as child process - handover.zig: read/write .ralph/HANDOVER.md - state.zig: file-based key-value persistence Build: `zig build agent` / `zig build agent -- --single-shot` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Antigravity Agent <antigravity@vibee.org> Co-authored-by: Claude <noreply@anthropic.com>
gHashTag
pushed a commit
that referenced
this pull request
Mar 18, 2026
…asking cmd_verify rewritten to properly compare readback vs .bit file: - Find FDRI write command in .bit → extract frame data at correct offset - Skip 1 pad frame in readback (101 words = 404 bytes) - Mask ECC word (word #50 per frame) — volatile on readback - Track BRAM content frames separately — volatile after startup - Report logic vs BRAM vs ECC mismatches independently - PASS if logic mismatches < 1% (without .rbd/.msd, some volatile bits expected) Also corrects 5 stale experience entries (FPGA-001/006/007/008/009) that incorrectly blamed CPLD 0xFFFE as dead hardware — real bug was bitrev(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
gHashTag
pushed a commit
that referenced
this pull request
Mar 18, 2026
Cherry-picked 3 fixes from feat/fpga-dlc10-breakthrough: - bitrev() in CFG_OUT reads (STAT 0x02089E3F → 0x401079FC, DONE=YES) - bitrev() in readback (raw TDO byte reversal) - UG470-compliant verify: pad frame skip, ECC word #50 mask, BRAM tracking Added `tri fpga jtag` CLI wrapper (write/readback/verify/status/idcode/dna/reg/probe/debug). All 9 JTAG commands PASS on XC7A100T via DLC-10 Platform Cable USB II. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
gHashTag
pushed a commit
that referenced
this pull request
Mar 18, 2026
Replaced naive byte-by-byte comparison with proper UG470 verify: - Parse FDRI write command to find frame data offset - Skip pad frame in readback (101 words) - Mask ECC word #50 per frame (volatile on readback) - Track BRAM content frames separately (volatile after startup) - Report logic vs BRAM vs ECC mismatches independently - PASS if logic mismatches < 1% (without .rbd/.msd mask files) Results on hslm_full_top.bit: 3753 frames compared, 2106 clean, ECC=3021 (expected), BRAM=1768 (expected), logic=61728 (4% — needs FDRI multi-range parsing for full accuracy, STAT CRC=OK confirms correct programming). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
assign:ralph,status:pending), builds context from IDENTITY + HANDOVER + state, spawns Claude CLI, manages handover between sessionszig build agent/zig build agent -- --single-shotstd.http.Client,std.process.Child.run,std.debug.printArchitecture
Test plan
zig buildcompiles without errorszig fmt --checkpasses🤖 Generated with Claude Code