code-smush

Repackages a Graphite stack into Decision PRs and Span PRs with local-only slicing and squashing.

2|Updated Apr 2, 2026
One-click install
npx skills add https://github.com/nseng-ai/ns --skill code-smush-nseng-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-smush
Source: https://github.com/nseng-ai/ns/tree/main/skills/internal/code/code-smush
Command: npx skills add https://github.com/nseng-ai/ns --skill code-smush-nseng-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Large, monolithic feature branches are hard to review because high-impact design decisions get buried inside long commit sequences. This Skill restructures an existing Graphite stack into reviewable slices — Decision PRs that isolate each high-leverage choice and Span PRs that hold the consequence-executing commits between them — without ever touching remotes or pull requests. ## Core Features & Use Cases - Decision-first classification: Builds a Decision Inventory from narrated commit messages, runs a coupling pass to group inseparable decisions, and demotes consequence commits into spans. - Deterministic construction paths: Automatically selects in-place reshaping for fresh runs or replacement-stack construction (with generation tokens like -st2) for previously packaged or PR-associated stacks. - Safety contract: Local-only operation with no git push, gh, or gt submit; requires explicit ratification of the proposed Slice Map, timestamped backup branches before any mutation, and per-boundary validation in temporary worktrees. - Use Case: You have a 20-commit feature branch mixing three major design choices with implementation fallout. Invoke smush to get a ratified Slice Map, then a validated stack of grammar-named branches like retry-budgets--02d-per-call-budgets ready for you to submit yourself. ## Quick Start Ask the agent to smush the current Graphite stack into Decision and Span PRs, selecting an owning Objective when prompted.

Frequently Asked Questions about code-smush

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I split a large Graphite stack into reviewable PRs?

Invoke smush explicitly on the stack; it classifies commits into Decision PRs and Span PRs from narrated commit messages, proposes a Slice Map, and after your ratification creates grammar-named slice branches locally. Submission to GitHub remains your responsibility afterward.

What is the difference between a Decision PR and a Span PR?

A Decision PR encodes one high-impact choice plus the minimal commits needed to judge it in isolation. A Span PR holds a maximal stretch of consequence-executing commits between decisions and gets squashed into one commit with a narration digest.

Does smush push branches or modify pull requests on GitHub?

No. Smush is strictly local-only: it never runs git push, gh, or gt submit, and never creates, updates, or closes pull requests. It reports the old stack as close candidates, but every PR decision belongs to the user.

Can I repackage a stack that was already submitted or reviewed?

Yes, via replacement construction. Smush builds a new stack alongside the old one with a generation token like -st2 in branch names, leaving the original branches, Graphite metadata, and PR associations untouched.

What happens if a slice boundary fails validation?

Smush first moves the cut to a nearby commit that validates, then tries fixing forward into the slice with gt modify, and finally escalates to you. Every slice boundary must pass the repository validation entrypoint in a temporary worktree.

What are the limitations of smush v1?

Cuts land only on commit boundaries, so a too-coarse commit cannot be split. Squashed span interiors are unrecoverable except through the narration digest, and submitted replacement stacks re-run CI across the full new stack.