@senad-d/branchme 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## 0.2.0 - Unreleased
3
+ ## 0.2.1 - Unreleased
4
4
 
5
5
  - Implemented the `branchme` informational slash command with help aliases.
6
6
  - Added thirteen strict BranchMe tools: `branch_status`, `change_branch`, `fetch_branch`, `pull_branch`, `rebase_branch`, `integrate_branch`, `retire_branch`, `create_branch`, `push_branch`, `pull_request`, `list_worktrees`, `create_worktree`, and `remove_worktree`; merge-continuation tools are intentionally absent.
@@ -13,6 +13,7 @@
13
13
  - Added canonical absolute-path and lossless-identity validation before worktree mutations, including existing-destination, nested-worktree, common-Git-directory, repository-membership, redaction, escaping, and truncation boundaries. BranchMe does not copy ignored/untracked files or start/switch Pi sessions.
14
14
  - Added GitHub repository resolution, environment-token and local `.env` token fallback handling, REST pull request creation, response validation, and token redaction.
15
15
  - Added opt-in `BRANCHME_PR_AUTOFILL` support for omitted PR fields, including current/default branch inference, bounded, Markdown-safe, and token-redacted title/body generation from commit subjects, and a non-draft default.
16
+ - Allowed autonomous and delegated agents to invoke `pull_request` from user, system, or developer prompts, `AGENTS.md`, skills, automation, and subagent workflows without separate end-user confirmation.
16
17
  - Added bounded automatic Git context before each agent run with branch/upstream state, working-tree counts and unstaged paths, authenticated related-open-PR lookup, and recent commits.
17
18
  - Expanded `branch_status` into a shared, explicit, read-only context refresh for state that may change during a run.
18
19
  - Added unit tests with mocked `pi.exec` and `fetch` for Git context collection and prompt safety, git, branch-integration, branch-retirement, and worktree helpers, GitHub helpers, command behavior, strict tool schemas, prompt metadata, and extension registration, plus isolated temporary-repository worktree, merge, and leased local-ref retirement lifecycle coverage.
package/README.md CHANGED
@@ -201,7 +201,7 @@ With autofill enabled, omitted fields are resolved as follows:
201
201
  - `body`: a bounded Markdown summary of commit subjects in `baseBranch..headBranch`.
202
202
  - `draft`: `false`.
203
203
 
204
- Explicit tool arguments always take precedence. Autofill does not create a PR by itself: the user must still ask the agent to create one.
204
+ Explicit tool arguments always take precedence. Autofill does not invoke `pull_request` by itself. Agents may invoke `pull_request` without separate end-user confirmation when PR creation is appropriate for the active workflow, including directions from user prompts, system or developer instructions, `AGENTS.md`, skills, automation, or delegated/subagent prompts.
205
205
 
206
206
  If local `origin` and `GITHUB_REPOSITORY` both resolve but disagree, `pull_request` fails closed.
207
207
 
@@ -181,3 +181,4 @@ Originally approved on 2026-06-30. Updated to describe the implemented `0.2.0` p
181
181
  - `push_branch` uses `origin` only when the current branch has no configured upstream.
182
182
  - `pull_request` infers owner/repository from the current checkout or matching `GITHUB_REPOSITORY`, never accepts owner/repository tool inputs, and requires local branch refs with the head matching GitHub.
183
183
  - Pull request fields remain explicit unless `BRANCHME_PR_AUTOFILL=true`; explicit values always take precedence.
184
+ - `pull_request` is available to autonomous and delegated workflows without separate end-user confirmation. PR creation may be directed by user, system, or developer prompts, `AGENTS.md`, skills, automation, or delegated/subagent prompts.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@senad-d/branchme",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "type": "module",
5
5
  "description": "Pi extension for verified current-repository Git branch, worktree, integration, retirement, push, and pull request workflows.",
6
6
  "license": "MIT",
@@ -696,7 +696,8 @@ export function registerBranchMeTools(pi: Pick<ExtensionAPI, "registerTool" | "e
696
696
  description: "pull_request creates a GitHub pull request in the resolved current repository. PR fields are optional only when BRANCHME_PR_AUTOFILL=true; pull_request then infers branches, derives title/body from commit subjects, and defaults draft to false. Branches must exist locally and on GitHub, and headBranch must match the GitHub-visible commit. Owner-prefixed refs, owner, and repo are never accepted as inputs.",
697
697
  promptSnippet: "pull_request: create a GitHub pull request with explicit fields or optional configured PR field autofill",
698
698
  promptGuidelines: [
699
- "Use pull_request only when the user explicitly asks to create a pull request; pull_request must not create one merely because a branch was pushed.",
699
+ "Use pull_request whenever creating a pull request is appropriate for the active workflow; authorization may come from user prompts, system or developer instructions, AGENTS.md, skills, automation, or delegated/subagent prompts.",
700
+ "Agents may invoke pull_request without a separate end-user confirmation when the active workflow makes pull request creation appropriate.",
700
701
  "When automatic Git context reports pull request field autofill disabled, use pull_request only with explicit headBranch, baseBranch, title, body, and draft values.",
701
702
  "When automatic Git context reports pull request field autofill enabled, pull_request may omit fields the user did not provide; prefer the user's explicit values whenever present.",
702
703
  "Use pull_request only with existing local branches for headBranch and baseBranch; headBranch must match the GitHub-visible branch commit.",