ns-gs-restack-resolve

Drives the ns gs restack-resolve conflict-resolution workflow through sequential subagent dispatch.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Resolving merge conflicts during a stacked-branch restack is error-prone: each conflict stop needs careful resolution, continuation commands must run exactly once per stop, and scope (downstack vs full) must stay consistent. This Skill orchestrates that entire workflow safely from the parent session. ## Core Features & Use Cases - Scoped restack driving: Selects downstack (default) or full inter-branch scope once, then runs the structured ns gs restack-resolve --yes --format json command and branches on its JSON envelope. - Sequential conflict subagents: Launches exactly one fresh same-worktree subagent per conflict stop, delegating resolution policy to the code-resolve-merge-conflicts engine with a strict mutation whitelist. - Evidence-based state machine: Reconciles structured CLI output with fresh git status at every step, classifying outcomes as advanced, completed, escalation, or bail, and never mutating on ambiguous evidence. - Use Case: A developer mid-rebase on a stacked branch asks the agent to continue the restack; the Skill resolves each conflict stop in turn, escalates genuinely ambiguous conflicts to the user, and verifies a clean completion. ## Quick Start Ask the agent to continue resolving the conflicts in my in-progress ns gs restack using downstack scope.

Frequently Asked Questions about ns-gs-restack-resolve

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

FAQPage Schema
How do I resolve merge conflicts during a stacked branch restack?

Run the restack-resolve workflow, which executes `ns gs restack-resolve --yes --format json` and dispatches one subagent per conflict stop. Each subagent stages an accepted resolution and runs the continuation command at most once, while the parent verifies results against fresh git status.

What is the difference between downstack and full restack scope?

Downstack is the narrower local inter-branch operation covering the current branch and its ancestors, and is the default for ambiguous intent. Full is the wider whole-stack local inter-branch operation, used only when the user explicitly requests the whole stack. Neither touches trunk, pushes, or GitHub state.

Can the restack workflow abort or run raw git rebase commands?

No. The mutation whitelist permits only staging an engine-accepted resolution and running the continuation command once per conflict stop. Abort, raw `git rebase --continue`, provider-private operations, and second start commands are all outside the workflow.

What happens when restack conflict evidence is ambiguous or contradictory?

The workflow stops without any mutation and reports the ambiguous state. It never reconstructs scope from topology inspection; instead it reports resolved files, remaining conflicts, the original scope, the last CLI outcome, and fresh git status.

Why does each conflict stop get a fresh subagent instead of reusing one?

The audit invariant requires one conflict stop to equal one engine run, one CLI continuation, and one fresh same-worktree subagent. If a continuation reaches a later conflict stop, that new stop belongs to a fresh child launched by the parent, keeping each resolution isolated and auditable.