Status check
CommandGate in core/toolRegistry.ts:133 hard-blocks a fixed denylist. Global /permissions ask mode requires approval for all destructive ops. No middle ground: per-command inline confirmation before executing a specific command that looks risky but isn't on the hard-block list (e.g. rm specific-file.txt, git reset --hard).
Description
Users want to allow most shell commands but still get a confirmation prompt for anything that deletes or overwrites files. The current binary (block vs allow) is too coarse. A risk-scoring layer that intercepts medium-risk commands and asks "run this? y/n" before execution would cover the gap without requiring full /permissions ask mode.
Acceptance criteria
- Risk scorer identifies medium-risk patterns (delete specific file, overwrite, git destructive ops)
- Inline confirmation prompt shown in CLI before execution
- User can say
y, n, or always (suppress future prompts for same pattern)
- Hard-block list (
CommandGate) unchanged — this adds a soft-confirm layer above it
- Non-interactive / headless mode auto-declines or auto-confirms based on env var
Pointers
core/toolRegistry.ts:133–200 — CommandGate; extend with a MEDIUM_RISK_PATTERNS set
cli/aiden.ts — prompt/confirm UI; @inquirer/prompts is already a dep
core/agentLoop.ts — tool dispatch; intercept before shell_exec / run_python calls
Effort
M
Status check
CommandGateincore/toolRegistry.ts:133hard-blocks a fixed denylist. Global/permissions askmode requires approval for all destructive ops. No middle ground: per-command inline confirmation before executing a specific command that looks risky but isn't on the hard-block list (e.g.rm specific-file.txt,git reset --hard).Description
Users want to allow most shell commands but still get a confirmation prompt for anything that deletes or overwrites files. The current binary (block vs allow) is too coarse. A risk-scoring layer that intercepts medium-risk commands and asks "run this? y/n" before execution would cover the gap without requiring full
/permissions askmode.Acceptance criteria
y,n, oralways(suppress future prompts for same pattern)CommandGate) unchanged — this adds a soft-confirm layer above itPointers
core/toolRegistry.ts:133–200—CommandGate; extend with aMEDIUM_RISK_PATTERNSsetcli/aiden.ts— prompt/confirm UI;@inquirer/promptsis already a depcore/agentLoop.ts— tool dispatch; intercept beforeshell_exec/run_pythoncallsEffort
M