Files
rose-ash/plans/sx-review/writeback.sxsrc
giles 72e461cf2c scripts: forge write-back — close the git→gitea→agentic loop
The forge already DRIVES sessions (briefing → tmux launch, sx-fix-up.sh).
This records what comes BACK, making the forge a true system of record:

- sx-fix-writeback.sh <forge-agent> [kind] [base-ref]: reads new commits on
  loops/sx-<slug>, appends a record per commit to writeback.sxsrc (idempotent,
  matched by sha), then rebuilds the forge + replays them as agentic-sx
  commit!s on agents/<forge-agent> and re-dumps forge.sxdata.
- forge-build.sxsrc: fb-writeback-records / fb-replay-writeback / fb-do-writeback
  — each real-git commit becomes an agentic-sx commit whose tree is a small
  commit.sx pointer (sha/branch/message/files); real git holds the code, the
  forge holds the index, so the CID stays small.
- writeback.sxsrc: the append-only record log (source of truth for what's
  been recorded); replayed chronologically so agent branch heads advance right.

Verified live: the sx-gate loop's first real commit (f09368e1, "pin K18
expt-overflow float-promotion") is now recorded as a test-kind agentic-sx
commit on agents/ws-W14 (session log: spawn → finding → writeback), its
commit.sx pointing back at the real-git sha.

Loop closed: forge → tmux (drive) and tmux → real-git → forge (record).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 22:36:59 +00:00

12 lines
858 B
Plaintext

; writeback.sxsrc — real-git commits recorded into the forge as agentic-sx commits.
; APPENDED by scripts/sx-fix-writeback.sh; OVERRIDES fb-writeback-records defined
; (empty) in forge-build.sxsrc, then replayed by (fb-do-writeback). Order is
; chronological (oldest first) so each agent branch head advances correctly.
;
; Each record: {:agent "<forge-agent>" :kind "<agentic-kind>" :sha "<short-sha>"
; :branch "<git-branch>" :message "<subject>" :files "<space-sep paths>"}
(define fb-writeback-records (list
{:agent "ws-W14" :kind "test" :sha "f09368e1" :branch "loops/sx-ws-w14" :message "W14: pin K18 expt-overflow float-promotion (test-only) + bootstrap gate briefing " :files "plans/agent-briefings/sx-gate-loop.md spec/tests/test-gate-pins.sx"}
;;; END-RECORDS (scripts/sx-fix-writeback.sh inserts new records before this line)
))