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-escape-hatch.md
View on GitHub---
title: No way to interrupt, redirect, or undo agent action
slug: control-no-escape-hatch
category: control
defaultTier: release-blocker
surfaces: agent-chat, agent-tool-execution
ax-pattern: Escape Hatch
detection: hybrid
related: control-no-approval-gate, trust-no-escalation-path, comm-no-intent-handshake
---
## No way to interrupt, redirect, or undo agent action
Agent starts a long response or multi-step workflow. User realizes it's wrong but there's no stop, undo, or "go back": they watch it do the wrong thing and can't intervene. Autonomy without exit is coercion.
## What goes wrong
User asks the agent to refactor a module. It begins a 12-step migration; at step 3 the user sees it's wrong. No stop button: it runs to completion, leaving the codebase in an unwanted state. Manual revert takes longer than doing it themselves.
## Detection
**Surfaces:** agent-chat, agent-tool-execution
**Auditability:** hybrid
**Static signals:**
1. Find agent execution UI (chat panels, action panels, tool execution views).
2. Check for cancel/stop during execution (`onCancel`, `AbortController`).
3. Check for undo/revert after completion. Flag flows with neither.
**Concrete commands:**
```bash
rg -l 'AbortController|onCancel|stopGenerat' --type=ts src/
rg -A 10 'isGenerating|isStreaming|isPending' --type=ts src/ | rg -v 'cancel|stop|abort'
```
**Judgment signals:**
- A cancel button not wired to `AbortController.abort()` is a false affordance, worse than nothing.
**False-positive guards:**
- Skip `// ax-audit-ignore:control-no-escape-hatch`, test, and Storybook files.
## Fix
During execution: stop button wired to `AbortController`. After completion: undo/revert for reversible actions. For irreversible actions, the approval gate (`control-no-approval-gate`) is the pre-execution escape hatch.
## Examples
**Anti-pattern (fails):**
```tsx
<div>
{messages.map((m) => <Message key={m.id} {...m} />)}
{isGenerating && <Spinner />}
{/* no stop button, no undo */}
</div>
```
**Applied (passes):**
```tsx
<div>
{messages.map((m) => <Message key={m.id} {...m} />)}
{isGenerating && (
<>
<Spinner />
<Button onClick={onStop} aria-label="Stop generating">Stop</Button>
</>
)}
{!isGenerating && <Button onClick={onUndo} variant="ghost">Undo</Button>}
</div>
```
## 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-escape-hatch, single status check, completes in <1s */}
<StatusCheckResult result={result} />
```
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 |