Skip to content

bar-fmt 3/3: LLM layer — type-triage pipeline and the generation capstone - #4

Closed
keithharvey wants to merge 10 commits into
bar-fmt-02-integrationfrom
bar-fmt-03-llm
Closed

bar-fmt 3/3: LLM layer — type-triage pipeline and the generation capstone#4
keithharvey wants to merge 10 commits into
bar-fmt-02-integrationfrom
bar-fmt-03-llm

Conversation

@keithharvey

@keithharvey keithharvey commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Layer 3 of the bar-fmt stack, on top of the layer-2 PR.

The LLM layer: llm-type-triage.sh + worker (parallel claude --print or the openai backend), the codemod-prereq rulebook (error pattern → idempotent fix recipe), cross-repo agent context, and the generation pipeline — bar::migrate::stylua-cleanup-generate ([private]: generation stays out of the listing) fronting generate-branches.sh, which rebuilds fmt / mig-* / mig / fmt-llm deterministically with PR-body generation and the $CREDENTIALS_RUNNER credential wrapper for the triage workers.

Generated PR bodies now reference the migrate:: recipe names, so the first --update-prs run after this merges rewrites the published upstream PR bodies to match; the tracking issue (beyond-all-reason/Beyond-All-Reason#7408) needs the same one-time body edit, since the pipeline doesn't own it.

Stack tip is content-identical to bar-fmt-emmylua rebased onto master, plus exactly the migrate:: rename set — verified by diff during the restack.

🤖 Generated with Claude Code

keithharvey and others added 10 commits July 22, 2026 19:34
llm-type-triage.sh chunks emmylua_check errors and dispatches parallel
LLM workers (claude --print, or the openai worker via BACKEND=openai —
hence python3-pip in bar-dev) that fix annotations per file. The
codemod-prereq SKILL.md is the categorization rulebook: error pattern ->
idempotent fix recipe, first match wins. claude/claude.md carries the
cross-repo agent context.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
generate-branches.sh deterministically rebuilds fmt, the mig-* leaves,
the mig rollup, and the fmt-llm capstone (env layer + gen(llm) commit),
with PR-body generation, the museum table, and stacked-PR base
overrides. bar::migrate::stylua-cleanup-generate fronts it ([private] —
generation stays out of the listing), wrapping execution in
$CREDENTIALS_RUNNER so the triage workers inherit LLM-backend
credentials; the tracking-issue template ties the PR stack together.
Generated PR bodies now point at the migrate:: names, so the next
--update-prs run rewrites the published bodies to match.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Same discovery as the replay recipe: mapgenerator/mapinfo_template.lua
(a ${}-placeholder template, not valid Lua) was kept off disk by a
local skip-worktree bit, which upstream's touch of the file silently
dropped — resurfacing it as a parse failure that aborts generation.
CODEMOD_EXCLUDES mirrors .styluaignore (vendored utils, .lux,
recoil-lua-library, mapgenerator) in the three transform runners and
their PR-body command docs. Verified: both the full_moon baseline
binary and the emmylua binary report 2,166 scanned / 0 errors with the
skip set — the baseline run's exact scan count.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
link_gh_stack used plain gh, which the bar-dev container doesn't have —
the extension check always failed inside distrobox and stack linking
silently skipped. Route it through resolve_host_gh/host_exec like every
other gh call (the 916e302 hardening missed this one).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
GitHub's native stacked PRs reject fork-headed PRs, and the whole
fmt -> mig -> fmt-llm-source -> fmt-llm chain was fork-headed. The
branches already live on the canonical repo, so the chain PRs are
recreated same-repo (#8395/#8396/#8397/#8398) and the fork originals
(#7199/#7229/#7447/#8235) closed with cross-links. Constants follow.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
No fork-headed PRs anywhere — native stacked PRs reject them and
reviewers live upstream. The fork keeps mirror pushes only.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Completes the no-fork-PRs convention: bracket/rename/detach leaves and
the two carried leaves recreated with heads on beyond-all-reason
(#8401/#8402/#8403/#8404/#8405); fork originals (#7287/#7288/#7289/
#7437/#7438) closed with cross-links.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
GitHub rejects --base on PRs in a native stack even as a no-op — the
stack owns the base. edit_pr checks the current base and only sends
--base when it needs to move.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Chain links move to #8395–#8398 (the fmt-llm line still pointed at the
pre-#8235 capstone). The tooling line links the three-layer devtools
stack with org beyond-all-reason#17 as the entry point — keithharvey has no push access
to beyond-all-reason/BAR-Devtools, so the devtools stack hosts on the
fork and beyond-all-reason#17 stays the org-visible umbrella. DEVTOOLS_PR points at the
generation layer (3/3).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@keithharvey

Copy link
Copy Markdown
Owner Author

Consolidating: bar-fmt reviews as one PR for now — the tip rollup at beyond-all-reason#57.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant