madt_branch_create/madt_branch_delete: rename name= → branch= (git-plane operand vocabulary) #58
Labels
No labels
breaking
bug
documentation
enhancement
epic
good first issue
help wanted
refactoring
resolution/duplicate
resolution/invalid
resolution/wontfix
security
severity/critical
severity/high
severity/low
severity/medium
status/abandoned
status/blocked
status/needs-decision
status/needs-info
status/needs-verification
testing
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sixfold-space/madtea#58
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The branch-tool family uses two different names for the same concept:
madt_branch_create(name=),madt_branch_delete(name=), butmadt_finish(branch=)andmadt_worktrees(branch=). Coming off a finish/worktree flow,branch=is the natural reach, and it hard-errors:Ask: accept
branch=onmadt_branch_create/madt_branch_delete(alias ofname=, or make it canonical) so the branch tools share one parameter vocabulary and the obvious first call succeeds.Hit 2026-07-14 deleting a merged worktree branch immediately after
madt_finish(branch=...)- same concept, different required param name.Proposed resolution: rename
name=→branch=(canonical, no alias) onmadt_branch_create/madt_branch_delete. ADR 0005's recipe step 1 resolves this — the canonical name should align to the external vocabulary, and here it doesn't.Upstream vocabulary. No direct CLI precedent exists: gh has no branch-management command, and git/tea take the branch as a positional (git's docs say
<branchname>), so no upstream CLI ever names a flag for "which branch". But everywhere upstream must name this parameter, the word isbranch:--branchwherever a branch is an argument (gh browse -b/--branch,gh codespace create --branch,gh repo edit --default-branch) — never--name.DELETE /repos/{owner}/{repo}/branches/{branch}— the path param is literallybranch. (nameis only a field on the branch object; create's body field isnew_branch_name.)The internal split is drawn in the wrong place.
name(s)is the ADR 0020 identifier convention for the forge branches resource (madt_branches_remote:name/names/new_name), whilebranch=is the operand vocabulary of the git-plane flow tools (finish,worktrees,pull,push, plus thebranch=context params onfiles/gitobjects/repos).branch_create/branch_deleteare git-plane flow tools — they sit in the same session sequence asfinish(branch=)— but inherited the resource-identifier vocabulary. The boundary should run along the git-plane/forge-resource seam, not through the middle of the git plane. After the rename the split is principled: git-plane operations saybranch=; forge branch-resource CRUD keys byname(s)(ADR 0020 untouched).Why not the alternatives:
view↔get, ADR 0016 #1874).finish(branch=)call, which no description re-read prevents.branch,name) is far past the ceiling of 2, neither token contains the other, and widening the synonym classes is exactly what ADR 0005 forbids.Change shape:
madt_branch_create:name→branch(alongside existingbase=,dir=).madt_branch_delete:name→branch.removedArgHintsentries forname=on both tools (the bounded-redirect pattern from theall=removals, #1964/#1995) so old callers get an actionable redirect, not a bare rejection.madt_branches_remoteunchanged.Caveat to confirm before landing: tea's branch operations taking positionals (i.e. tea never names this as a flag either) is from memory, not verified against a tea checkout.