From 99586984bf89346c000b9a5ff073cedb2012ae58 Mon Sep 17 00:00:00 2001 From: Mathias Date: Fri, 3 Jul 2026 22:47:37 +0200 Subject: [PATCH] docs(file_write_branch): clarify direct-to-main + PR-flow in descriptor (#35) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tool already commits directly to any existing branch (BranchExists→upsert, no create — covered by TestFileWriteBranchSkipsCreateWhenBranchExists), so `branch:"main"` is a one-call direct-to-main write. The descriptor said "feature branch", understating it. pr_create/pr_merge/repo_list already exist, closing the other two #35 gaps (PR loop + owner repo listing). Descriptor now states both paths. Co-Authored-By: Claude Opus 4.8 (1M context) --- internal/tools/file_write_branch.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/tools/file_write_branch.go b/internal/tools/file_write_branch.go index 8362d49..76c038f 100644 --- a/internal/tools/file_write_branch.go +++ b/internal/tools/file_write_branch.go @@ -23,7 +23,7 @@ func NewFileWriteBranch(c *gitea.Client, a *allowlist.Allowlist) *FileWriteBranc func (t *FileWriteBranch) Descriptor() registry.ToolDescriptor { return registry.ToolDescriptor{ Name: "file_write_branch", - Description: "Create or update a file on a feature branch. Branch is created from base if it doesn't exist.", + Description: "Create or update a file on the given branch. Pass an existing branch — e.g. the default branch `main` — to commit directly to it (trunk-based); a branch that doesn't exist yet is created from `base` first (PR flow). Pair with pr_create/pr_merge for the branch→PR→merge path.", InputSchema: json.RawMessage(`{ "type":"object", "properties":{