052 — tp idea roadmap lands its line on the base branch in one run (#262)
Why
tp idea roadmap ends an interview with "not now": it relabels the
issue roadmap on the forge and appends its line to ROADMAP.md in
the checkout it is run in. The label is immediate. The line is an
uncommitted edit, usually on main, and at level 3 nothing moves
main but a pull request: #256's line had to be committed on another
story's branch to get there, and until that story lands the file and
the forge disagree.
A roadmap line is a change like any other and should reach the base
branch the way a story does: its own branch in its own worktree, the
checks, a pull request, the merge. What it does not need is a second
conversation. The human decided in the interview, and tp writes the
one line, so once the command is started the rest is automatic.
What changes
tp idea roadmap N [--epic NAME] [TEXT...]: in one run it cutsroadmap/<N>from the remote base branch in a worktree of its own, appends the line there, commits it, and lands it by the stepstp story landtakes (the checks, the push, the pull request, the merge); then it relabels the issueroadmapand removes the worktree and the branch. The checkout it is run in is not written to.- No
defined, fragment or review is asked of a roadmap line: its change is the one linetpwrote, and the interview is its acceptance. docs/idea.md(Not now: a roadmap item) anddocs/roadmap.md.
Acceptance
tp idea roadmap N at maturity.code: 3. The epic is looked for in
the remote base branch's ROADMAP.md, not the checkout's.
| Issue N | Run from | The landing | Outcome |
|---|---|---|---|
open, labelled idea |
the base branch, clean | checks pass, the forge merges | - [ ] #N TEXT under the epic on the remote base; the issue relabelled roadmap; the worktree and roadmap/<N> gone, local and remote; prints #N url, the epic, and the pull request merged |
open, labelled idea |
a story branch, or a tree with uncommitted changes | the same | the same; the branch checked out, its tree and its ROADMAP.md are as they were |
open, labelled idea |
any | the epic named is not in the remote base's ROADMAP.md |
error naming the epic; no branch, no worktree, the issue still idea |
open, labelled idea |
any | a check fails | error giving the check; nothing pushed; the issue still idea; the worktree removed |
open, labelled idea |
any | the forge refuses the merge | error naming the pull request, which stays open; the issue still idea |
open, labelled idea |
any | the line merged, the forge refusing the label | error naming the issue and the label; the line stays |
open, labelled idea, a pull request from roadmap/<N> open from a run that stopped |
any | the forge merges | carries on from that pull request: merged, the issue relabelled; no second line |
not labelled idea; closed; does not exist |
any | — | the errors of story 043; nothing cut |
After a run that lands, tp roadmap check on the remote base passes:
the label is written only once the line is there.
Out of scope
tp wt's own commands at level 3 (#193): this story uses a worktree cut from the remote base, which is what #193 gives a story, and should be built on it.tp idea storywriting the story in a worktree (#193).- A roadmap line moved or reworded later, and a tick:
tp releasewrites those. - Fast-forwarding the local base branch after the merge.
tp roadmap addbelow level 3, which writes the checkout as today.
Decisions
None.
Done when
- tests express the acceptance table and pass
- spec updated
- changelog entry
- issue closed with a link to the release