From 4ab36919bdec1e4d4e0b38650c3d0076a15e0f00 Mon Sep 17 00:00:00 2001 From: Benjamin Borbe Date: Sun, 16 Aug 2026 15:15:18 +0200 Subject: [PATCH] ungate the permission-mode precheck from the code-task heuristic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v0.110.0 put the precheck inside Phase 5, which only runs when the title matches fix|implement|refactor|add|bug|deploy|build. A task whose entire body is 'kubectl delete' matches none of those, so Phase 5 skipped wholesale and the precheck with it — every decommission / renew / rebuild / migrate task was silently excluded, which is precisely the ops work that needs the switch, while 'deploy X' would have been covered. Moved to Phase 5.5, which runs for all tasks and keys on the task's own commands (make apply/buca, kubectl writes, helm, ssh deploys, prod runbook steps) rather than on a title heuristic. Emits nothing for read-only or docs-only tasks. Caught by exercising v0.110.0 on 'Decommission MinIO on Hell' the same day it shipped: a permission note did appear, but from the global CLAUDE.md rule, not from the new line — which had never run. --- CHANGELOG.md | 4 +++ agents/work-on-task-assistant.md | 48 ++++++++++++++++++++++---------- 2 files changed, 37 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f107b49..c506609 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,10 @@ Please choose versions by [Semantic Versioning](http://semver.org/). - feat: `task complete` gains `--force`, bypassing the incomplete-checkbox guard. `commands/complete-task.md` has advertised the flag since it was written — `argument-hint` lists `[--force]`, and the abort path tells the operator to "re-run with `--force` to complete anyway" — but only `goal complete` implemented it (`cli.go`, "Complete even if open tasks are linked to this goal"). On the task path the advice was a dead end: the run failed with `incomplete subtasks: N pending` and the only way through was editing the task file to remove the checkboxes, which is lossy — out-of-scope follow-up items have to be relabelled as prose to satisfy a gate that was never meant to be absolute. Hit twice in one session on 2026-08-16, and first reported 2026-08-11. +## Unreleased + +- fix: the permission-mode precheck added in v0.110.0 never fired for ops tasks. It sat inside Phase 5, which is gated on the code-task heuristic (`fix|implement|refactor|add|bug|deploy|build`), so a task whose entire body is `kubectl delete` skipped Phase 5 wholesale and the precheck with it — every `decommission` / `renew` / `rebuild` / `migrate` task was silently excluded, which is exactly the ops work that needs the switch. Moved to its own Phase 5.5 that runs for all tasks and keys on the task's own commands. Caught by exercising v0.110.0 on "Decommission MinIO on Hell" the same day it shipped. + ## v0.110.0 - feat: `work-on-task-assistant` Phase 5 now prompts the `accept edits` permission-mode switch when the extracted workflow assigns cluster/deploy mutations to the operator. Stating the operator/agent split was not enough on its own — observed 2026-08-16, the block correctly said "the **operator** runs the cluster mutations" and the session still spent ~40 minutes handing back command blocks until the owner interrupted. The split says who may run the command; the new line makes the switch that lets the agent run it in-session. diff --git a/agents/work-on-task-assistant.md b/agents/work-on-task-assistant.md index 71180e7..aa62f7b 100644 --- a/agents/work-on-task-assistant.md +++ b/agents/work-on-task-assistant.md @@ -158,24 +158,42 @@ If code task: - Search vault for `*Development Guide.md` and read if found - Extract: branch strategy, test command, PR process, deploy steps - Present as "⚠️ **Development Workflow**" section in the report -- **Permission-mode precheck.** If the extracted workflow assigns cluster or deploy - mutations to the operator rather than the agent (`make apply`, `make buca`, - `kubectl` writes, `helm install/upgrade`, ssh deploys, prod runbook steps), append - this line verbatim to that section: - - > 🔐 **Permission mode:** this task's ops commands need `accept edits` — switch - > with Shift+Tab now, so they run in-session instead of being handed back as - > command blocks to paste. - - Stating the operator/agent split alone is not enough. Observed 2026-08-16: the - workflow block correctly said "the **operator** runs the cluster mutations", and - the session still spent ~40 minutes handing back command blocks until the owner - interrupted with "as always, I don't want to run any commands — you should - suggest switching to the edit mode". The split describes who *may* run the - command; this line makes the switch that lets the agent actually do it. If not a code task: skip. +## Phase 5.5: Permission-mode precheck (ALL tasks — never gated on Phase 5) + +**Runs for every task, code or not.** Scan the task's own `# Tasks` / body, plus any +workflow extracted in Phase 5, for operator-run mutations: + +`make apply` · `make buca` · `kubectl`/`kubectl` writes (`apply`, `delete`, +`annotate`, `patch`, `rollout restart`, `scale`) · `helm install/upgrade` · ssh +deploys · any prod runbook step. + +If any are present, append verbatim to the report: + +> 🔐 **Permission mode:** this task's ops commands need `accept edits` — switch +> with Shift+Tab now, so they run in-session instead of being handed back as +> command blocks to paste. + +If none are present, emit nothing — do not warn on read-only or docs-only tasks. + +**Why this is its own phase.** It shipped inside Phase 5 (v0.110.0) and was therefore +gated on the code-task heuristic — `fix|implement|refactor|add|bug|deploy|build`. +Exercising it the same day on "Decommission MinIO on Hell" showed the failure: a task +whose entire body is `kubectl delete` never matches those keywords, Phase 5 skipped +wholesale, and the precheck never ran. Every `decommission` / `renew` / `rebuild` / +`migrate` task — the ops work that most needs the switch — was silently excluded, +while `deploy X` would have been covered. Keying on the task's own commands rather +than on a code-task title heuristic is the fix. + +**Why the precheck exists at all.** Stating the operator/agent split is not enough. +Observed 2026-08-16: the workflow block correctly said "the **operator** runs the +cluster mutations", and the session still spent ~40 minutes handing back command +blocks until the owner interrupted with "as always, I don't want to run any commands +— you should suggest switching to the edit mode". The split describes who *may* run +the command; this line makes the switch that lets the agent actually do it. + ## Phase 6: Guides + runbooks — MANDATORY **MUST run at least one search per task. Never skip — even if title is short or description is minimal.**