Date: 2026-08-23
Validated from the repository checkout with no discovered extensions enabled.
npm run typecheck
npm run format:check
npm run test
npm run smoke:pi
npm run check:pack
npm run smoke:worktree-handoff
npm run validate
npm run smoke:pi:packed
npm run release:check
printf '/branchme help\n/quit\n' | pi --no-extensions -e .
pi --no-extensions -e .npm run smoke:pifirst runs isolated checkout Pi processes from a temporary non-Git working directory: one withpi --no-extensions -e <package> -e <temporary verifier>and/branchmeverify verify, then one withpi --no-extensions -e <package>and/branchme help.- The temporary command verifier calls
pi.getAllTools()after BranchMe loads and confirms exactly thirteen tools—branch_status,change_branch,create_branch,create_worktree,fetch_branch,integrate_branch,list_worktrees,pull_branch,pull_request,push_branch,rebase_branch,remove_worktree, andretire_branch—are each registered exactly once and active with strict schemas, named prompt guidelines, descriptions, and extension source metadata. It also provescontinue_mergeandabort_mergeare absent. - Runtime schema inspection verifies that
integrate_branchhas exactly the requiredsourceBranchandtargetBranchfields and thatretire_branchhas exactly the requiredbranchName,expectedHead,targetBranch, andforcefields withadditionalProperties: false. It also verifies thatbranch_statushas only an optional top-levelancestryobject whose required nestedsourceBranchandtargetBranchfields reject additional nested or top-level properties. - A second temporary verifier registers a deterministic local smoke model, blocks
fetch, and runs normal prompts through real Pi lifecycle handling. It verifies automatic no-tool Git context in a temporary repository, one realbranch_statustool refresh after a verifier-created local change, safe credential-free related-PR status with no request, and non-Git startup fallback. It expects all thirteen tools but forbidsretire_branch,integrate_branch, and every remote or worktree mutation tool from executing. - The Pi runtime smoke validates worktree, integration, and retirement tool registration, strict schemas, and prompt contracts only; it never creates or removes a worktree, runs a merge, or retires a branch. Real-Git lifecycle coverage runs under
npm run testin isolated temporary local repositories with no remote contact. - Isolated real-Git integration tests cover
already_integrated,fast_forward, exact two-parentmerge_commit, and conflict-path capture followed by verified automatic abort/restoration. They also cover target mismatch, dirty control state, rejection of branch-specific target merge options, unrelated histories, ignored-file overwrite protection, preserved repository hooks, and a committed source ref checked out in another dirty linked worktree. The recorded merge argv proves autostash and rerere are disabled, ignored-file protection is enabled, and--no-verifyis absent. - Isolated real-Git retirement tests cover merged and explicitly forced-unmerged local-ref deletion, stale expected-
HEADrejection, current and linked-worktree occupancy, dirty unrelated worktrees, non-current targets, and preservation of target refs, remote-tracking refs, worktrees, working-tree files, andbranch.<name>.*configuration without contacting a remote. Recorded argv proves retirement usesupdate-ref --no-deref -dwith the captured expected commit and never usesgit branch -d/-D, fetch, push, or a remote ref target. npm run smoke:worktree-handoffloads only BranchMe into a deterministic extension host backed by real local Git, creates a new-branch linked worktree through the registeredcreate_worktreetool, and launches a separate Node verification process with the returned absolutehandoff.cwd. That process verifies its cwd, branch, fullHEAD, and lack of remotes. The smoke then calls the registeredremove_worktreetool, verifies the directory is absent, verifies the retained local branch remains at the original commit, and asserts thatretire_branchwas never invoked.- The handoff smoke uses only a freshly created temporary source repository and sibling worktree, an empty Git config, a minimal credential-free environment, no remotes, offline Pi flags, and a fetch guard that fails on any network request. Cleanup recursively removes the isolated temporary root even on failure.
npm run validateincludes the isolated handoff smoke after package-content checks.- The checkout command smoke accepts either
/branchme helptext or the read-only BranchMe status fallback as equivalent non-mutating command output. npm run smoke:pi:packedcreates an npm tarball under a temporary directory, installs that tarball into a separate temporary package withnpm install --omit=dev, and runs pi against the installed package instead of the source checkout.npm run release:checkis the canonical release gate: it runsnpm run validateand thennpm run smoke:pi:packed. Bothnode scripts/publish-npm.mjsand the GitHubPublish to npmworkflow run it before npm publication; a packed install/load failure stops publication and the workflow's Git tag step. Everydaynpm run validatekeeps the faster checkout smoke.- Both Pi smoke runs disable discovered extensions, skills, prompt templates, themes, context files, persistent sessions, telemetry, startup network checks, and GitHub token environment variables.
- Both Pi smoke runs are credential-free, allow documented credential variable names in help text, reject credential value patterns, do not call BranchMe mutation or remote tools, and do not contact GitHub.
- Pi's documented
getAllTools()metadata exposes parameter schemas, descriptions, prompt guidelines, and source metadata, while command context exposes activepromptSnippetvalues throughgetSystemPromptOptions().toolSnippets; the runtime verifier checks both surfaces. The deterministic local smoke model exercisesbranch_statusthrough Pi's normal model tool-call loop without provider or GitHub network access. - Set
BRANCHME_SKIP_PI_SMOKE=1to skip intentionally, orBRANCHME_PI_BIN=/path/to/pito test a specific Pi binary for the checkout smoke. - If no Pi binary is available, the checkout smoke script prints an explicit skip message; default CI installs the Pi dev dependency, so
npm run validateexercises the real Pi loading path.
npm run typecheck,npm run format:check,npm run test,npm run smoke:pi,npm run check:pack,npm run validate, andnpm run smoke:pi:packedpassed.npm run smoke:worktree-handoffreturnedok: true, an absolute ready cwd, the expectedfeature/isolated-handoff-smokebranch and full commit ID from a separate process,branchRetained: trueafter force-free removal,retireBranchInvoked: false, zero network requests, and an isolated empty credential source.npm run smoke:piloaded BranchMe through Pi, verified exactly thirteen BranchMe tools (including strictintegrate_branch,retire_branch, and nestedbranch_status.ancestryschemas), proved merge-continuation tools absent, and confirmed non-mutating BranchMe command output.- The isolated Git-context prompt smoke observed the
before_agent_startsnapshot, answered branch and dirty-tree state without a tool call, refreshed a verifier-created local change through one realbranch_statuscall, returned safe unavailable context without credentials or outside Git, and attempted no network request. npm run smoke:pi:packedpacked BranchMe outside the repository, installed the artifact in a temporary production workspace, loaded the installed package through Pi, and confirmed non-mutating BranchMe command output.npm run check:packconfirmed the package contents are limited to public docs (including worktree, local integration, leased local branch-retirement, and security boundaries), images, source, license, package metadata,.env.example, andtsconfig.json; private planning specs and generated files remain excluded.- The isolated Pi smoke command loaded BranchMe and displayed BranchMe help or status output instead of template behavior.
- The bare
pi --no-extensions -e .smoke command exited cleanly in this non-interactive validation environment. - No template command or template tool output was observed.
The piped pi --no-extensions -e . form was also used so the smoke test could exit without leaving an interactive TUI session open.