feat(0.21.7): bstack skills graduate — crystallize Tier-2 migration pattern (Phase 6b)#60
Conversation
…attern (Phase 6b) New `bstack skills graduate <name>` subcommand automating the skill-graduation pattern that ran 8 times manually on 2026-05-25/26 (Phases 2-4f). P16 crystallization — rule-of-three exceeded ~8x. ## What it does Automates: clone source + monorepo → copy canonical content (excl. .git, dot-mirror dirs, LICENSE, skills-lock.json) → append README Tier-2 row → commit + push + PR on monorepo → (--stub) redirect-stub PR on source → (--merge) merge → cleanup. Registry update is printed (copy-paste), not auto-applied (needs coordinated version bump review). ## Files - NEW scripts/skill-graduate.sh (~230 lines) — the engine; env-overridable gh/git/tmpdir/dry-run hooks for hermetic testing - NEW tests/skill-graduate.test.sh — 9 offline tests (arg-parse, dry-run, rename detection, stub-gh/git execution with copy+exclude verification, no-SKILL.md error path). All 9 pass. - CHANGED bin/bstack-skills — graduate) dispatch + usage - CHANGED bin/bstack — top-level usage entry - VERSION 0.21.6 → 0.21.7 ## Validation (P11) - 9/9 hermetic tests pass (offline, stub gh/git) - dry-run verified against real skill names (rename detection: omnivoice-skill → omnivoice) - top-level dispatch `bstack skills graduate --help` routes correctly - invalid-name + missing-name + unknown-option all exit 2; no-SKILL.md exits 1 ## Provenance 8 manual instances: broomva/skills PRs #2-#9 + broomva/bstack PRs #53-#59. The next graduation is one command instead of a full manual cycle.
|
Warning Review limit reached
More reviews will be available in 33 minutes and 42 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
P20 cross-review (Strata B) returned NEEDS-WORK (7/10) with 2 blockers + 2 nits + a test-coverage gap. All addressed: 1. [BLOCKER] Word-splitting in copy loop — `for item in $(ls -A)` broke on spaced/globbed filenames (reproduced by reviewer; aborts under set -e mid-copy). Replaced with null-delimited `find -print0 | while read -d ''`. 2. [BLOCKER] Header lie — step 3 claimed "Append a row to the monorepo README Tier-2 table" but no such code existed. Removed the false claim; README row is now correctly documented as a printed manual follow-up (alongside the registry entry), since category placement needs judgment. 3. [idempotency] Re-run safety — added a pre-flight `gh pr list --head` check that bails cleanly if an open PR for the branch already exists, instead of failing opaquely inside the push/PR subshell on the 2nd run. 4. [merge masking] `--merge` no longer swallows genuine merge failures — captures the dual-attempt result and WARNs (red CI / conflicts / gate) instead of `|| true` blackholing. 5. [test gap] T8 now inspects the COPIED TREE (asserts references/ + scripts/ present, .claude/ + LICENSE + skills-lock.json absent) via the new BSTACK_GRADUATE_NO_CLEANUP test hook — previously only checked exit code. Added T10: spaced/globbed-filename regression test (the exact gap that let blocker #1 through a green suite). 9 → 10 tests, all pass. Validation: 10/10 hermetic tests pass. T10 fails against the pre-fix loop (confirmed the regression guard is real).
…onorepo path) Residual nit from P20 round-2 re-review (verdict PASS 9/10): the source redirect-stub merge still had `|| true`, asymmetric with the monorepo path's fix. Now warns on genuine merge failure instead of swallowing. Cosmetic — low-stakes (redirect stub, not canonical content) — but closes the asymmetry the reviewer flagged. 10/10 tests still pass.
P20 Cross-Review — PASS (9/10)Strata B fresh-context adversarial review, 2 rounds. Round 1 → NEEDS-WORK (7/10): 2 BLOCKERs (word-splitting copy loop reproduced live; false README header claim) + 2 nits (idempotency, merge-failure masking) + test-coverage gap. Round 1 fixes (commit c3270f2): null-delimited copy loop + T10 spaced-filename regression; header claim corrected; idempotency pre-flight; merge-rc surfaced; T8 now inspects copied tree. Round 2 → PASS (9/10): all blockers + nits RESOLVED; basename exclude-logic verified correct (incl. hidden-parent edge case); 10/10 tests pass. One residual cosmetic asymmetry (stub-merge Round 2 fix (this commit): stub-merge now surfaces failures too — asymmetry closed. Verdict: PASS, mergeable. |
Summary
New
bstack skills graduate <name>subcommand — the P16 crystallization of the Tier-2 skill-graduation pattern that ran 8 times manually on 2026-05-25/26 (Phases 2–4f).What it automates
skills/<target>/(excludes.git, dot-mirror dirs,LICENSE,skills-lock.json)--stub(default ON): redirect-stub PR on source repo--merge(default OFF): merge PRsRegistry update is printed (copy-paste ready), not auto-applied — needs a coordinated bstack version bump a human reviews.
Files
scripts/skill-graduate.shtests/skill-graduate.test.shbin/bstack-skillsgraduate)dispatch + usagebin/bstackVERSIONCHANGELOG.mdTest plan
bstack skills graduate --helproutes correctlyProvenance
8 manual instances:
broomva/skillsPRs #2–#9 +broomva/bstackPRs #53–#59. Crystallization closes the loop — next graduation is one command.