audit: list every agent-reachable override and workaround on the CLI and MCP #878

Open
opened 2026-10-23 04:02:52 +00:00 by hexajon · 0 comments
Owner

madtea exists to narrow what an agent can do, with no override the agent can reach (docs/decisions/0009, docs/decisions/0029, docs/decisions/0046). Every time I dig into one tool, I find another escape that works against that:

  • finish takes no_close, close_linked, and closes=, so a caller can merge work with its issue left open, or close an issue with no dependency check.
  • finish dir= on a worktree of the same repo silently acts on the primary checkout, and madt_adr takes no dir= at all.
  • Four names cover one idea, a repo on the forge: owner_repo, repo, repository, and --owner-repo.
  • MADTEA_CALLER_REPO is an env value that steers a guard.

These turned up one at a time. I want the whole class in one list, so I can rule on each item once.

What to do

A read-only audit of the CLI and MCP surfaces. It writes one report and changes no code. Each finding names:

  • the parameter, flag, env var, or fallthrough, with file and line;
  • what it lets a caller do that a guard or a record would otherwise stop;
  • the record it works against;
  • whether a test or a parity guard covers it today.

Acceptance criteria

  • The report covers every MCP tool parameter, every CLI flag, and every env var that madtea reads.
  • Each finding carries file:line evidence from the Go code, not from docs.
  • Each finding names the record it works against, or says that no record covers it.
  • The report lists each same-repo dir= fallthrough, where a tool ignores dir= or acts on the start folder.
  • The report is committed under docs/design/ and linked from an existing doc.
madtea exists to narrow what an agent can do, with no override the agent can reach (docs/decisions/0009, docs/decisions/0029, docs/decisions/0046). Every time I dig into one tool, I find another escape that works against that: - `finish` takes `no_close`, `close_linked`, and `closes=`, so a caller can merge work with its issue left open, or close an issue with no dependency check. - `finish dir=` on a worktree of the same repo silently acts on the primary checkout, and `madt_adr` takes no `dir=` at all. - Four names cover one idea, a repo on the forge: `owner_repo`, `repo`, `repository`, and `--owner-repo`. - `MADTEA_CALLER_REPO` is an env value that steers a guard. These turned up one at a time. I want the whole class in one list, so I can rule on each item once. ## What to do A read-only audit of the CLI and MCP surfaces. It writes one report and changes no code. Each finding names: - the parameter, flag, env var, or fallthrough, with file and line; - what it lets a caller do that a guard or a record would otherwise stop; - the record it works against; - whether a test or a parity guard covers it today. ## Acceptance criteria - [ ] The report covers every MCP tool parameter, every CLI flag, and every env var that madtea reads. - [ ] Each finding carries file:line evidence from the Go code, not from docs. - [ ] Each finding names the record it works against, or says that no record covers it. - [ ] The report lists each same-repo `dir=` fallthrough, where a tool ignores `dir=` or acts on the start folder. - [ ] The report is committed under docs/design/ and linked from an existing doc.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sixfold-space/madtea#878
No description provided.