branch-context-impl

Loads an attached branch-context plan from Branch Memory and implements it as the source of truth.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When a plan was captured earlier for a branch, context is lost between sessions and agents re-derive decisions or drift from agreed scope. This Skill reloads the attached branch-context plan and implements from it as the authoritative source, with explicit STOP conditions when reality diverges from the plan. ## Core Features & Use Cases - Plan Loading: Runs ns branch-context exec load to fetch the attached plan from Branch Memory, with automatic key selection when exactly one entry exists and fallback to saved session plans or the local plan store. - Contract Enforcement: Applies the branch-context plan contract protocol, comparing current-state excerpts, scope boundaries, and verification gates against live repo state before executing, and stopping on mismatches. - Deviation Discipline: Documents minimal adaptations, treats plan-ruled-out options as open questions when expanding scope, and reports validation results, deviations, and unresolved follow-ups. - Use Case: After a teammate attaches an implementation plan to a feature branch, you check out the branch and ask the agent to implement from the branch context; it loads the plan, verifies anchors, implements step by step, and reports any STOP conditions instead of guessing. ## Quick Start Ask the agent to implement the attached branch-context plan on the current branch and follow its scope and verification gates.

Frequently Asked Questions about branch-context-impl

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

FAQPage Schema
How do I implement from an attached branch-context plan?

Check out the implementation branch and invoke the skill; it runs ns branch-context exec load to fetch the attached plan from Branch Memory, reads the generated prompt file, and implements the plan step by step while honoring its scope and verification gates.

What happens when multiple branch-context plans are attached to a branch?

The loader auto-selects only when exactly one supported named Markdown entry exists in the branch-context namespace. With multiple entries, you must pass an explicit key, which is treated as an exact Branch Memory key selector.

Can I use branch-context-impl on the trunk or a detached HEAD?

No. If the current branch is trunk, default, or detached, the skill stops and asks for the intended implementation branch, since plans are attached to specific non-trunk branches in Branch Memory.

What happens if the plan no longer matches the current code?

The skill compares plan excerpts and anchors against live repo state before executing. A mismatch is a STOP condition: it reports observed versus expected state and the failed gate instead of guessing, except for stale branch names with agreeing loader evidence.

What if no branch-context plan is attached to the branch?

The loader falls back to the current session's saved plan evidence, then the latest Markdown file in the local plan store. If both fail, it reports both failures and asks whether to run branch-context-from-plan, switch branches, or pass an explicit saved plan.