HK-hub/AgentSkills / ax-audit
ax-audit
VerifiedAudits agentic applications for architecture and trust: tool parity, tool granularity, context injection, completion signals, approval gates, confidence cues, escape hatches, intent handshakes, memory visibility, and adaptive canvases. Produces a ship-readiness verdict plus an AX Relationship Summary. Use when reviewing agentic feature PRs or asking "is this agent-native", "AX review", "critique this AI feature", "does this earn user trust", or "audit this for AX". For traditional frontend UX use ui-audit.
rules-ax/control-no-approval-gate.md
View on GitHub---
title: Autonomous agent action without stakes-appropriate approval
slug: control-no-approval-gate
category: control
defaultTier: release-blocker
surfaces: agent-tool-execution, agent-chat
ax-pattern: Escape Hatch (pre-execution dimension)
detection: hybrid
related: control-no-escape-hatch, trust-no-escalation-path, comm-no-approval-gate
---
## Autonomous agent action without stakes-appropriate approval
Agent sends an email, posts to Slack, or deletes data without asking. Or it asks confirmation for every trivial action. Either extreme breaks trust. The approval model must match the stakes and reversibility of the action.
## What goes wrong
Scenario A: User says "clean up my calendar." Agent deletes meetings including one with the VP. No confirmation. Scenario B: Agent asks "Move report.pdf? [Yes/No]" for 40 files. User gives up at file 12. Both are approval mismatches.
## Detection
**Surfaces:** agent-tool-execution, agent-chat
**Auditability:** hybrid
**Static signals:**
1. Find agent-initiated side effects (send, delete, create, publish).
2. Classify by stakes and reversibility. Check whether approval precedes high-stakes actions.
3. Flag mismatches in both directions.
**Concrete commands:**
```bash
rg -l 'sendEmail|sendMessage|deleteAccount|publishPost|processPayment' --type=ts src/
rg -B 10 'sendEmail|delete|publish' --type=ts src/ | rg 'confirm|approval|modal'
```
**Judgment signals:**
- "User-requested" vs. "agent-initiated" matters. "Clean up my inbox" per-email = user-requested. Agent proactively acting = agent-initiated.
- A single "Are you sure?" for 50 actions is insufficient.
**False-positive guards:**
- Skip `// ax-audit-ignore:control-no-approval-gate`, test, and Storybook files.
## Fix
Implement the stakes x reversibility matrix. Low/easy: auto-apply. Low/hard: quick confirm. High/easy: show diff. High/hard: explicit modal approval.
## Examples
**Anti-pattern (fails):**
```tsx
async function handleSendEmail(draft: EmailDraft) {
await emailClient.send(draft);
return { status: "sent", message: `Email sent to ${draft.to}` };
}
```
**Applied (passes):**
```tsx
async function handleSendEmail(draft: EmailDraft, ctx: AgentContext) {
const approved = await ctx.modalApproval({
title: `Send email to ${draft.to}?`,
preview: <EmailPreview draft={draft} />,
actions: ["Send", "Edit", "Cancel"],
});
if (!approved) return { status: "cancelled" };
await emailClient.send(draft);
return { status: "sent" };
}
```
## Default tier and overrides
**Defaults to:** `release-blocker`
| Surface | Tier |
|---|---|
| Agent tool execution | release-blocker |
| Agent chat | release-blocker |
| Agent config | fix-this-sprint |
| Agent dashboard | fix-this-sprint |
## Suppression
```tsx
{/* ax-audit-ignore:control-no-approval-gate, user opted into auto-apply mode */}
<AutoApplyToggle enabled={userPreference.autoApply} />
```
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics. | Stars: 472k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |