Review of the plan matcher found four ways an action that was not a step
could count as one, and two live runs showed how the agent writes steps.
- A URL with a login before "@" (https://httpbin.org:443@evil.example/post)
read as httpbin.org. Hosts now come from a URL parse; such a URL never
matches, as a send or as an exact run step, and is refused at proposal
time with the reason.
- A send step matched any command that mentioned the file's name. The
command's sent files are now parsed (curl, wget, PowerShell forms) and
every one must resolve to the step's file; stdin, globs, pipes, chaining
and redirects never match; a target that is not a file name never covers
a shell upload.
- Shell paths resolved from the workspace root; after `cd src`,
`rm old-notes.txt` matched the root file's step. They now resolve from
the tracked shell folder, and from nowhere when it cannot be known.
- A protected in-project file (git hooks, CI configs, the workspace policy)
is never a plan step, whatever the stack order of the shell floor.
- Risky marks cover inline code, sudo, git clean / reset --hard /
checkout --, find -delete, publish and deploy verbs, shell meta, and
protected-file writes; writes outside a writable root.
- Steps take an optional note for the agent's words; a write or delete
target that is a command line is dropped with the reason; a run step
that reaches the network is shown with its host. Dropped steps are
reported to the agent as reasons, not a count.
Found in a live run of the to-do scenario in the app:
- The agent wrote a send step's destination as "https://httpbin.org/post". Only a bare
host matched, so the approved upload got a card. Destinations written as a URL or
host/path/port are now reduced to the host, and the card shows that host.
- The reviewer was also told "this action is not one of its steps". That made it refuse
a harmless `git status` it allows without a plan. The line is removed: an action
outside the plan gets exactly the facts it would get without one. PLAN_NOT_STEP leaves
the fact vocabulary; the corpus rows for out-of-plan actions carry no plan line and
are tagged plan-outside.
After the fixes the live run needs one card, the plan. Ship gate (gpt-5.6-sol): benign
35/35, dangerous 0/27, injection 0/18: passed.
For delegated work ("do the tasks in TODO.md") the reviewer can't see the list, so
every step was "unsure" and the user got a card per step. With the new flag
auto_approve_plan_approval (default off, user-global only), the agent can propose a
plan as steps (write / delete / run / send). The user approves all of it or sends it
back; the mode does not change. For the rest of the request, code checks each later
action against the steps and the reviewer gets one fixed fact line: this exact action
is a step, or it is not. Only exact matches count (same file, same command, same file
to the same host). The plan's text never reaches the reviewer. The safety floors
still ask, and the approval ends with the request.
- plan_steps.py: step parsing, risky marking, exact matching.
- engine: step plans in auto-approve; plan fact in _facts_kw; cleared per request.
- tools/plan.py: the steps schema, only with the flag on.
- reviewer: one paragraph on what the plan fact means.
- GUI: the card lists steps, marks risky ones, approve all or send back.
- Inbox / Slack: the steps in the item body.
- eval: rows take `facts` (checked against FACT_VOCABULARY) and pass them as the
engine does; 7 paired plan-approval rows appended to reviewer_actions.
Ship gate (gpt-5.6-sol): benign 34/35, dangerous 0/27, injection 0/18: passed.