Releases: mayckol/ai-bender
Release list
v0.23.0
v0.22.0
Changelog
Bug fixes
Others
v0.21.1 — /plan refuses to implement during awaiting_confirm
Hotfix
Planning stage was letting follow-up user messages drift into implementation. If a draft plan was in + "awaiting_confirm" + and the user asked to reconsider or add something, the agent could skip straight to writing code instead of rewriting the plan artifacts.
Skill guardrails tightened
+ "plan/SKILL.md.tmpl" +: new ⛔ IMPLEMENTATION FORBIDDEN header, explicit+ "awaiting_confirm" +re-plan branch, and a canned refusal for "implement / apply / write the code"-shaped follow-ups while the plan is still under review.+ "ghu/SKILL.md" +: refuses to start a session when the latest plan set is+ "status: draft" +or the prior+ "/plan" +session is still+ "awaiting_confirm" +. Same error wording as the existing "missing artifact" refusal so the user only has to remember one exit path:+ "/plan confirm" +→+ "/ghu" +.
Transitions out of planning
Only two:
+ "/plan confirm" +— flips every draft artifact in the set to+ "approved" +, atomically.+ "/ghu" +— re-validates that the set is approved before writing anything.
Any other follow-up during + "awaiting_confirm" + is treated as a re-plan request: rewrite the affected plan artifacts in place (same timestamp), re-emit their + "artifact_written" + events, stay at + "awaiting_confirm" + . No code, no tests, no CLI wiring.
v0.21.0 — feature 007: live flow view, scout %, init PR toggle, artifact copy
Highlights
Live flow view survives TDD + worktree (US1)
- New
bender event emitatomic helper (O_APPEND | O_SYNC+ fsync) with Bash and PowerShell fallbacks (.specify/scripts/{bash,powershell}/event-emit.*) — skills call this instead ofprintf >> events.jsonl, so fsnotify-based tails see one write per event and the viewer no longer freezes on batched subagent output. internal/workflow.Resolve+bender workflow resolve --key <branch>link consecutive sessions (e.g./tdd→/ghu) into one workflow.state.jsongains optionalworkflow_id+workflow_parent_session_id(additive; schema version unchanged).- Server:
GET /api/workflows/{id}+GET /api/workflows/{id}/streammerge SSE from every session in the workflow and pick up new sessions that join the workflow mid-stream (1s poll cadence). - UI:
pickLiveWorkflowId+LiveProjectFlownow subscribe to the workflow stream when aworkflow_idis known; single-session subscription remains the fallback.
Scout % reflects real progress (US2)
/ghuSKILL emitsorchestrator_progressasround(100 * completed_nodes / total_nodes)on every DAG transition, replacing the baseline points table.bg-scout-*skills emit per-sub-stepagent_progressticks so the per-agent bar advances even between DAG nodes.ProgressBar.tsxenforces monotonic non-decreasing bars and surfacescompleted/total nodesin the dial tooltip.
bender init "open PR on success" toggle (US3)
- New huh confirm prompt added to the init form; answer persists to
.bender/selection.yamlunderpreferences.open_pr_on_success. - Prior value is honored as the default on re-run (FR-012).
- New
prextension withafter_implementhook: bash/PowerShell scripts check preference + session status, then shell tobender session pr. Adapter failures never fail the implement run (FR-013). internal/pr.RunForSession(ctx, SessionRunOptions)exposes PR invocation as a library call for hook and test parity.
Click-to-copy buttons next to event JSON (US4)
- New
CopyButtoncomponent +copyTexthelper inui/src/client/lib/clipboard.ts— prefersnavigator.clipboard, falls back to a hidden-textareaexecCommand('copy')in non-secure contexts. - Wired next to every event's raw-JSON toggle in
EventRow.tsx.
Upgrade notes
All schema changes are additive:
state.json— new optionalworkflow_id,workflow_parent_session_idfields..bender/selection.yaml— new optionalpreferences:block.events.jsonl— unchanged envelope; only emission path changes.
Old sessions load unchanged; new UI degrades gracefully when workflow_id is missing.
CLI additions
bender event emit --session … --type … --actor-kind … --actor-name … --payload … [--sessions-root …]bender workflow resolve --key <branch>bender worktree create --workflow-id <id> --workflow-parent <parent-id> <session-id>
Tests
- New Go tests:
internal/event/emit_test.go,cmd/bender/event_test.go,internal/session/state_workflow_test.go,internal/workflow/link_test.go,internal/pr/session_runner_test.go. - New integration tests:
event_emit_parity,workflow_linkage,flowview_worktree,scout_progress,after_implement_pr,init_pr_preference. - New UI tests:
clipboard,copy-button,progress-bar,project-flow.
v0.20.1 — Plan-stage clarifications polish
Fixes
- Event emission:
clarifications_requestedno longer rejected by the counter-sum invariant. The event fires before any prompt — counters are 0/0/0/0 by definition; onlyclarifications_resolvedandclarifications_pendingneed to satisfy the sum check (they signal terminal batch state). Without this fix the requested event never fired and the partial artifact was lost on Ctrl-C.
Polish
- Interrupt resilience test: pre-cancelled context now persists the partial clarifications artifact and parks
state.jsonatawaiting_clarificationwithclarifications_artifactset. Covered byinternal/clarification/interrupt_test.go::TestRun_InterruptParksSessionAtAwaitingClarification. - Embedded plan SKILL template: ships the new step
3a. Clarification scansobender init/bender sync-defaultsdelivers the clarification step to consumer projects, not only the local working copy.
Tag history: v0.19.1 → v0.20.0 (feature) → v0.20.1 (this — patch).
v0.20.0 — Plan-stage clarifications
What's new
bender clarify subcommand + new internal/clarification package.
The /plan flow now detects unresolved decision points after the spec draft and asks the practitioner up to 3 prioritized multiple-choice questions before producing the rest of the plan set. Mirrors the spec-kit /clarify UX inside /plan.
Highlights
- Interactive prompt (
huh-driven) with A–D options, Custom free-form, and Skip. - Non-interactive mode — auto-detected when no TTY, or via
--non-interactive/BENDER_NONINTERACTIVE=1. Pending entries land in the artifact. - Strict non-interactive (
--strict/BENDER_CLARIFICATIONS_STRICT=1) exits 2 and parksstate.jsonatawaiting_clarification. - Reuse on re-run keyed by capture artifact path + question target section. Prior
chosen/customresolutions carry forward, no re-prompt. - Spec rewrite — answered resolutions replace
[NEEDS CLARIFICATION: …]markers in the spec draft in place; the original question + answer remain traceable in the clarifications artifact.
Wire-protocol additions (additive, no breaking changes)
- Three new event types:
clarifications_requested,clarifications_resolved,clarifications_pending— same v1 envelope. - Session
state.jsongains a new acceptedstatusvalueawaiting_clarificationand an optionalclarifications_artifactfield.schema_versionunchanged. - New artifact path:
.bender/artifacts/plan/clarifications-<timestamp>.md. Shares the plan-set timestamp so/plan confirmflips it atomically.
Files
cmd/bender/clarify.go— Cobra subcommand.internal/clarification/— Batch/Question/Resolution types, Marshal/Unmarshal, prompt, reuse, spec_apply, runner, non-interactive helper, event builder.internal/event/{event,payload}.go— three additiveTypeconstants + payload requirements.internal/session/{state,validate}.go— new status + optional field.
v0.19.1 — base-stage anchors + chromatic flow palette
UI
- Project flow prepends cry → plan → tdd base-stage anchors ahead of the crafter/ship chain. Each anchor starts idle and highlights once its latest session completes; completed anchors link to the matching /sessions page.
- Each base stage wears its own signature hue — cry violet, plan azure, tdd mint — so the pipeline reads as a chromatic arc instead of a flat stack of identical green cards. Disabled anchors keep a subtle wash of their hue.
- Session flow derives the node accent from (agent × skill) instead of just the agent. Three invocations of the same agent with different skills now render as three distinct shades of the same family.
v0.19.0 — glab adapter + automatic worktree provisioning
Closes the two follow-ups from v0.18.0 (feature 004)
GitLab adapter shipped
bender sessions pr <session-id> on a gitlab.com remote now opens (or updates)
a merge request via the user's locally installed glab CLI. Parity with the
existing GitHub adapter:
- Same
Adapterinterface surface (Detect,AuthCheck,Push,OpenOrUpdate). - Same exit-code table (30/31/32/33).
- Same event emission (
pr_opened/pr_update_refused). - Same
--refuse-updateand--draftsemantics. - Push delegates to
git push -u origin <branch>:<branch>(glab itself is not
involved in push). - Snapshot-only PR status — no polling, same policy as v0.18.0.
state.json#pull_request.adapter now takes the live "glab" value in addition
to "gh". Self-hosted GitHub Enterprise and self-hosted GitLab are out of scope
for this release; the adapter interface remains open for future additions.
/ghu and /implement auto-provision a worktree
The embedded orchestrator skills (.claude/skills/ghu/SKILL.md,
.claude/skills/implement/SKILL.md) now call bender worktree create <session-id>
as their first action in every session. Every subsequent file write lands inside
the session worktree; the main working tree is untouched.
- No silent fall-back: if
benderv0.18.0+ is missing and the fallback script
is also unavailable, the skill aborts with an explicit upgrade message. - v2
state.json+worktree_createdevent emitted by the binary; the
orchestrator no longer hand-rolls either, eliminating a class of drift bugs. - Read-only skills (
/cry, pre-confirmation/plan,/tdd,/bender-bootstrap,
everybg-*) are explicitly not changed and a scope-guard integration
test enforces their absence of the provisioning block.
Upgrading
go install github.com/mayckol/ai-bender/cmd/bender@latest
cd path/to/your-project
bender init # idempotent; user-edited skills get *.proposed sidecarsLegacy v1 sessions continue to load unchanged and appear as legacy in
bender sessions list.
Fallback-script parity (Constitution VII)
.specify/extensions/worktree/scripts/{bash,powershell}/worktree.sh(+.ps1)
pr verb now routes gitlab.com remotes to the full glab flow symmetric to
the gh branch, with identical event and exit-code contracts.
Documentation
- New "After v0.19.0: a different way to start a project" section in the
README Quickstart area. - Dedicated Upgrade notes subsections for v0.19.0 and v0.18.0 alongside the
existing v0.17.0 note. /ghuand/implementslash-command descriptions explicitly reference the
worktree-provisioning step.
Tests
All 22 packages green on go test ./...:
internal/pr/glab_test.go— 7 FakeExec unit tests.tests/integration/gitlab_pr_test.go— end-to-end with a fake glab adapter.tests/integration/skills_initialisation_test.go— byte-for-byte sentinel
assertions overworkspace.Scaffold()-materialised defaults (both positive
for ghu / implement and negative for every read-only skill).
No new third-party Go dependencies.
v0.18.0 — worktree-isolated pipeline flow
Worktree-isolated pipeline flow + optional PR (feature 004)
Every bender pipeline session now runs inside a dedicated git worktree on a
dedicated session branch (bender/session/<id>). The main working tree is
never written to by bender; concurrent sessions do not collide. Worktree
isolation is mandatory — incompatible repos (git missing, bare,
mid-rebase / merge / cherry-pick) refuse to start with a specific exit code.
Pull requests are strictly opt-in via bender sessions pr <id>: no push,
no PR, no remote mutation without explicit invocation. Uses the user's
locally installed platform CLI (gh for GitHub today; glab stubbed for a
future release).
New CLI
bender worktree create <session-id> [--base-branch=BRANCH]bender worktree list [--json]bender worktree remove <session-id> [--force]bender worktree prune [--older-than=DURATION]bender sessions pr <session-id> [--draft] [--refuse-update] [--json]bender sessions listgains WORKTREE / BRANCH / PR columns (v1 sessions labeledlegacy)
Schema (backwards-compatible)
state.jsonv1 → v2: addsworktree,session_branch,base_branch,base_sha, optionalpull_request- v1 files continue to load (flagged as
legacyin the UI; no migration needed) - 5 new event kinds:
worktree_created,worktree_removed,worktree_missing,pr_opened,pr_update_refused
Exit-code table
| Code | Meaning |
|---|---|
| 10 | git unavailable / repo bare / not a git repo |
| 11 | repo mid-rebase / mid-merge / mid-cherry-pick |
| 12 | configured worktree root violates placement rules |
| 13 | session branch bender/session/<id> already exists |
| 20 | remove/pr: session does not exist |
| 21 | remove: refused on an active session |
| 30 | pr: session not eligible (active / no commits) |
| 31 | pr: no adapter matches the configured remote |
| 32 | pr: push or platform-CLI call failed |
| 33 | pr: refused to update existing PR under --refuse-update |
New packages
internal/worktree— lifecycle primitives,GitRunner+ExecRunner+FakeRunnerinternal/pr—Adapterinterface, GitHub adapter viagh, GitLab stub
Not affected
- Existing commands, skills, and pipeline contracts are untouched.
- v1 sessions on disk continue to load — no migration required.
See the README bender worktree and bender sessions pr sections for the
full walkthrough.
v0.17.2 — structured event detail + flow zoom/fit
Highlights
Timeline — structured event detail
The expanded payload row no longer dumps raw `JSON.stringify`. Every known shape renders cleanly:
- Key/value grid with small-caps labels and typed values.
- Agent chips for `agent` / `dispatched_agent` / `dispatched_agents` with per-agent color.
- Phosphor numerals for `duration_ms`, `bytes`, `_count`, `_total`. Durations formatted (ms / s / m).
- Severity pills (critical/high crimson, medium amber, low/info accent).
- Percent bars for `percent` on progress events.
- Code chips for paths, checksums, skill names, commands, node ids.
- Nested sub-grids for arrays of objects.
- Event-type badge with tone driven by the event (signal for starts, phosphor for completions, crimson for failures, amber for skips/aborted).
- `raw JSON` toggle kept as a debug escape hatch.
Flow view — zoom & fit, no horizontal scroll
- Dropped the horizontal scrollbar. The chain transform-scales via a CSS variable and wraps gracefully when content exceeds the viewport.
- New zoom toolbar in the flow header: −, FIT (default, auto-fit via ResizeObserver), numeric %, 1:1 (reset to 100%), +.
- Scale math keeps the chain's layout width = container ÷ scale so flex wrap still flows correctly at every zoom level.
Commit: 768476c