Repository navigation
feat(sc-gh-stack): stacked-PR skill from field lessons + sc-gh-stack-view (0.1.0) - #109
Merged
Merged
Conversation
…ack-view (0.1.0) Fresh package replacing the managing-gh-stacks attempt (PR #101). Two skills: - sc-gh-stack: progressive-disclosure table of contents over references/ for the append-only stack model, lifecycle workflow, preconditions distilled from five production phases (link --base, frozen layers, one stack writer, QA/CI on the top, trunk freeze, no red-bottom-alone merges, full branches[] before scoped merges), and recipes for cut-layer, link, restack (insert, remove red layer, collapse bottom), land (atomic merge, merge-async and non-linear fallbacks) and stale per-worktree tracking; the gh stack v0.1.0 command guide, troubleshooting signatures and stack-design guidance carried over from the retired generic gh-stack skill; a phase-model worked example. - sc-gh-stack-view: atm-core's gh_stack_view.py ported (default view now shows every open stack on any trunk) with its regression tests. Scripts are stdlib-only and read-only: gh_stack_view.py, gh_stack_chain_check.py (pre-link linear-ancestry / PR-base / clean-merge check that prints the exact link command), gh_stack_shared.py (timeouts, actionable hints, never-a-traceback guard). 46 unit tests; registries regenerated at 0.1.0. Also: pytest.ini collects the package tests; requirements-dev.txt gains pypdf so the docling suite collects; ai-cli hook test fixtures call python3. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Blocking: chain check printed PR numbers as `#N` (a shell comment), now bare
numbers and no `next:` line unless LINKABLE; develop-stack recipe left PRs
unrebased (non-linear, unlandable), now chains with one merge-forward per
layer and runs the chain check; three inconsistent `link` rules unified
(full `--base` list is canonical, `link <stack#> <pr#>` appends only);
"out-of-date with base" remedy no longer suggests `gh stack sync`.
Should-fix: red layer is removed, never "landed as a pair"; fix tasks on
frozen layers route to a new top layer; land by stack number; insert requires
containment + chain check; collapse resets the rebased child; `--no-track`
on worktree add; `{owner}/{repo}` in gh api paths; stack-number recovery via
`gh stack checkout <pr#>`; view skill gets the full installation doc and
`$CLAUDE_PLUGIN_ROOT` script paths.
Scripts: skipped (unreadable) worktrees now exit 1 with LANDING unjudged;
unresolved PRs render as unknown instead of stale; fetch timeouts degrade to
unknown; behind-a-moved-trunk gets its own icon and downgrades needsRebase to
a note; pool capped at 4; actionable hints for rate-limit/auth/network; real
temporary-repo tests for merge-tree/is-ancestor and a shell round-trip test
for the link command (55 tests).
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
randlee
added a commit
that referenced
this pull request
Sep 23, 2026
The nuget/.claude-plugin registries were stale post-merge (sc-ci-automation still showed 0.12.0 despite its manifest being at 0.13.0, and sc-gh-stack was missing after landing via PR #109). Regenerated from current manifests with no manifest version changes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fresh
sc-gh-stackpackage built from the atm-core gh-stack playbook (five production phases, stacks of 2 to 21 PRs). Replaces the earliermanaging-gh-stacksattempt on #101, whose rules contradicted the field lessons; #101 and #107 are left for Rand to close.Two skills in one package (one install guarantees the status tool is present):
sc-gh-stack(/sc-gh-stack): progressive-disclosure table of contents overreferences/:model.md,workflow.md,preconditions.md: append-only linear stack on a named trunk, frozen layers, one writer per branch and one stack writer, QA/CI on the top only, every known failure encoded as a check with its incident.recipe-cut-layer,recipe-link(--base+ full list; append shortcut),recipe-restack(insert, remove a red layer whose fix lives above, collapse the bottom),recipe-land(atomicgh stack merge <stack#> --yes --merge, merge-async fallback with the full 40-char SHA, non-linear fallback),recipe-stale-tracking(unstack --local+checkout).commands.md,troubleshooting.md,stack-design.md,installation-and-troubleshooting.md: the gh stack v0.1.0 command guide carried over from the retired generic/gh-stackskill, with field-verified overrides and failure signatures.phase-model-example.md: phase-bc as the worked example.sc-gh-stack-view(/sc-gh-stack-view): atm-core'sgh_stack_view.pyported; default view shows every open stack on any trunk.Scripts are stdlib-only and read-only (one
git fetch, skippable):gh_stack_view.py,gh_stack_chain_check.py(pre-link linear-ancestry / PR-base / clean-merge check that prints the exact link command),gh_stack_shared.py(timeouts, actionable hints for rate-limit/auth/network, never-a-traceback guard). Exit codes 0/1/2 everywhere.Also in this PR:
pytest.inicollects the package tests;requirements-dev.txtgainspypdfso the docling suite collects locally; ai-cli hook test fixtures callpython3.Review process
Three repo review agents (architecture, implementation, metadata) plus a hostile Opus final review against
docs/claude-code-skills-agents-guidelines.mdv0.7. All blocking findings fixed in the second commit (shell-unsafe#Nlink command, non-linear develop-stack recipe, inconsistentlinkrules,gh stack syncas an out-of-date remedy). Deliberate exceptions: skill names aresc-gh-stack/sc-gh-stack-viewrather than gerunds (chosen name; matches thesc-git-worktreedirectory precedent); no[Unreleased]changelog heading for a first release.Test plan
python3 -m pytest packages/sc-gh-stack/tests -q: 55 passed (mocked, real temporary-repo git, shell round-trip of the link command)python3 scripts/validate-all.py: 9/9 validators pass;validate-hook-paths.pyclean for this packagepython3 -m pytest tests/ -q(CI job): 1392 passedgh_stack_view.pyandgh_stack_chain_check.pyrun against atm-core's live stacks (integrate/phase-bc), including an error path returning one actionable line with exit 2sc-installand run/sc-gh-stack-viewonce on a real stack (first-use validation after merge)🤖 Generated with Claude Code