Summary
On sr submit, render a marker-delimited stack overview into each pushed PR's description (not a comment), so reviewers see where the PR sits in the stack.
Placement — why the description, not a comment
The block goes in the PR body, delimited by <!-- stackr:stack --> … <!-- /stackr:stack -->. Rationale: a PR comment is owned by the identity that posted it, so on a collaborative stack a second person's sr submit couldn't edit the first person's comment (author-restricted) → failed upsert or duplicate comments. The PR description is editable by the author and anyone with write access, so whoever submits can rewrite the block via gh pr edit --body.
Ownership
Machine-owned: the marked region is fully regenerated on every refresh; content outside the markers (the author's real description) is always preserved. In-marker human edits are not preserved by design.
Content
Vertical list, top→down, current PR marked, trunk at the base; each entry links its PR (number + title). Forked upstack shown as an indented tree. No live CI status (goes stale; not stackr's data).
### Stack
- #103 Add C tests
- **#102 Add B API ◀ this PR**
- #101 Add A models
- `main`
Trigger / scope
- Runs as part of
sr submit, rewriting the block on the PRs submit actually pushes (downstack always; upstack when included). PRs elsewhere self-heal on their next submit.
- Opt-out via config /
--no-stack-comment (name TBD).
Acceptance criteria
Design settled via a grill-me session. Related: sr land (companion issue) consumes these same PRs.
Summary
On
sr submit, render a marker-delimited stack overview into each pushed PR's description (not a comment), so reviewers see where the PR sits in the stack.Placement — why the description, not a comment
The block goes in the PR body, delimited by
<!-- stackr:stack --> … <!-- /stackr:stack -->. Rationale: a PR comment is owned by the identity that posted it, so on a collaborative stack a second person'ssr submitcouldn't edit the first person's comment (author-restricted) → failed upsert or duplicate comments. The PR description is editable by the author and anyone with write access, so whoever submits can rewrite the block viagh pr edit --body.Ownership
Machine-owned: the marked region is fully regenerated on every refresh; content outside the markers (the author's real description) is always preserved. In-marker human edits are not preserved by design.
Content
Vertical list, top→down, current PR marked, trunk at the base; each entry links its PR (number + title). Forked upstack shown as an indented tree. No live CI status (goes stale; not stackr's data).
Trigger / scope
sr submit, rewriting the block on the PRs submit actually pushes (downstack always; upstack when included). PRs elsewhere self-heal on their next submit.--no-stack-comment(name TBD).Acceptance criteria
sr submitinserts the marked block into a PR body that lacks it, preserving existing description text.sr submitupdates the same block (write-access edit path).Design settled via a grill-me session. Related:
sr land(companion issue) consumes these same PRs.