ax-audit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAX Audit
AX 审计
Feature-level reviewer for apps where an agent acts for the user. One question: does it earn trust, and where does it break?
- IS: rules-based audit of agentic surfaces (chat, tool execution, config, dashboards) across architecture () and trust (
rules-arch/), ending in a ship-readiness verdict plus an AX Relationship Summary.rules-ax/ - IS NOT: traditional frontend UX (use Audit mode); developer-facing API, CLI, or type ergonomics (use
ui-design); agent instruction files (usedx-audit); what the product should do before it exists (useagents-md).product-design
No agentic features in scope? Stop. AX rules against forms and lists are noise.
针对由Agent代表用户操作的应用的功能级审查工具。核心问题:它是否能赢得用户信任,又在哪些环节失去信任?
- 适用场景:基于规则对Agent交互界面(聊天、工具执行、配置、仪表盘)进行架构()和信任体验(
rules-arch/)审计,最终给出发布就绪判定结果及AX关系摘要。rules-ax/ - 不适用场景:传统前端UX(请使用审计模式);面向开发者的API、CLI或类型ergonomics(请使用
ui-design);Agent指令文件(请使用dx-audit);产品未成型前的需求设计(请使用agents-md)。product-design
如果没有Agent相关功能,请停止审计。针对表单和列表的AX规则会产生无效结果。
Contents
目录
Audit workflow
审计流程
text
AX Audit progress:
- [ ] Step 1: Scope, via the diff against the PR base merge-base (PR mode) or explicit path (full sweep)
- [ ] Step 2: Detect agentic features per references/feature-playbooks.md
- [ ] Step 3: Run each detected feature's playbook in order, plus the diff-wide checks (PR mode only)
- [ ] Step 4: For each check, load the rule file and follow its detection recipe
- [ ] Step 5: Tier each finding per references/ship-readiness.md (rule override table wins)
- [ ] Step 6: Render verdict + findings + AX Relationship Summary per references/output-format.md
- [ ] Step 7: Run the audit self-check and report its evidence countsPR-mode scope is the diff plus the tool definitions and orchestrator it touches. Findings in untouched files belong in a full sweep, not this verdict. Playbook annotations are a scan copy; the rule file is authoritative. runs on every PR-mode audit and never in a full sweep, where there is no diff for it to read.
parity-orphan-ui-actionRule greps name the most common identifiers, not every framework's spelling. When a grep misses in code that plainly does the thing (a gate, a stream, a tool result), check for the stack's name for it before recording .
references/framework-signals.mdunknowntext
AX Audit progress:
- [ ] Step 1: Scope, via the diff against the PR base merge-base (PR mode) or explicit path (full sweep)
- [ ] Step 2: Detect agentic features per references/feature-playbooks.md
- [ ] Step 3: Run each detected feature's playbook in order, plus the diff-wide checks (PR mode only)
- [ ] Step 4: For each check, load the rule file and follow its detection recipe
- [ ] Step 5: Tier each finding per references/ship-readiness.md (rule override table wins)
- [ ] Step 6: Render verdict + findings + AX Relationship Summary per references/output-format.md
- [ ] Step 7: Run the audit self-check and report its evidence countsPR模式的范围是代码差异及其涉及的工具定义和编排器。未改动文件中的问题应在全面扫描中排查,而非本次判定结果。剧本注释仅为扫描副本,规则文件具有权威性。仅在PR模式审计中运行,全面扫描模式下因无代码差异可读取,不会执行该操作。
parity-orphan-ui-action规则中的grep命令仅列出最常见的标识符,并非覆盖所有框架的写法。当grep在明确包含相关功能(如网关、流、工具结果)的代码中未命中时,请先查看中对应技术栈的命名方式,再记录为。
references/framework-signals.mdunknownTwo rule layers
两层规则体系
| Layer | Folder | Rules | Load when a playbook names |
|---|---|---|---|
| 1: Architecture | | 12 | |
| 2: Experience | | 15 | |
Categories: arch = parity, granularity, context, comm; ax = trust, control, context, comm. Shared prefixes are different rules: (no gate on the execution path) is not (gate exists, stakes are wrong).
rules-arch/comm-no-approval-gate.mdrules-ax/control-no-approval-gate.mdRun Layer 1 / and Layer 2 / first. They hold the blockers. Category map: , .
commparitycontroltrustrules-arch/_sections.mdrules-ax/_sections.md| Priority | Layer | Category | Prefix | Rules |
|---|---|---|---|---|
| 1 | arch | Communication | | 3 |
| 2 | arch | Parity | | 4 |
| 3 | ax | Control | | 4 |
| 4 | ax | Trust | | 4 |
| 5 | arch | Context | | 3 |
| 6 | ax | Communication | | 4 |
| 7 | ax | Context | | 3 |
| 8 | arch | Granularity | | 2 |
| 层级 | 文件夹 | 规则数量 | 加载时机 |
|---|---|---|---|
| 1: 架构层 | | 12 | 当剧本指定 |
| 2: 体验层 | | 15 | 当剧本指定 |
分类说明:架构层包含一致性、粒度、上下文、通信;体验层包含信任、控制、上下文、通信。前缀相同的规则为不同规则:(执行路径无网关)与(网关存在,但风险等级不匹配)并非同一规则。
rules-arch/comm-no-approval-gate.mdrules-ax/control-no-approval-gate.md优先运行架构层的「通信」/「一致性」规则和体验层的「控制」/「信任」规则,这些规则涉及发布阻塞项。分类映射可查看和。
rules-arch/_sections.mdrules-ax/_sections.md| 优先级 | 层级 | 分类 | 前缀 | 规则数量 |
|---|---|---|---|---|
| 1 | 架构层 | 通信 | | 3 |
| 2 | 架构层 | 一致性 | | 4 |
| 3 | 体验层 | 控制 | | 4 |
| 4 | 体验层 | 信任 | | 4 |
| 5 | 架构层 | 上下文 | | 3 |
| 6 | 体验层 | 通信 | | 4 |
| 7 | 体验层 | 上下文 | | 3 |
| 8 | 架构层 | 粒度 | | 2 |
Tiers and verdict
分级标准与判定结果
Three tiers. Full trigger lists and the generic surface bump live in .
references/ship-readiness.mdPrecedence: the rule's own surface-override table > the generic bump > . Apply at most one adjustment.
defaultTierVerdict: ✅ READY (0 blockers, ≤3 sprint) · ⚠️ READY WITH FOLLOW-UP (0 blockers, ≥4 sprint) · ❌ NOT READY (≥1 blocker) · 🚫 INCOMPLETE (self-check failed).
Blockers outrank an incomplete audit. With ≥1 release-blocker and a failed self-check, report ❌ NOT READY and note the self-check failure beneath it: the blockers are established findings and stay actionable, while 🚫 reads as "nothing was learned" and sends the reader away. Reserve 🚫 for an audit with no blockers whose coverage you cannot vouch for.
分为三个等级。完整触发条件和通用等级调整规则请查看。
references/ship-readiness.md优先级:规则自身的覆盖表 > 通用等级调整 > 。最多仅应用一次调整。
defaultTier判定结果:✅ 就绪(0个阻塞项,≤3个待办 sprint) · ⚠️ 需跟进后就绪(0个阻塞项,≥4个待办 sprint) · ❌ 未就绪(≥1个阻塞项) · 🚫 不完整(自检未通过)。
阻塞项的优先级高于不完整的审计结果。当存在≥1个发布阻塞项且自检未通过时,需报告❌ 未就绪,并在下方注明自检失败原因:阻塞项是已确认的问题,仍需处理;而🚫 会被解读为「未获取有效信息」,导致读者忽略问题。仅当审计无阻塞项但无法保证覆盖范围时,才使用🚫 不完整的判定。
AX Relationship Summary
AX关系摘要
Render after findings when any agentic feature was detected. Findings serve engineers; this serves designers and PMs. Four fields: evolution stage (behavior, not a label), trust signal (high/moderate/low plus one-line reason), key gap (one actionable sentence), trust question (one question only research can answer).
当检测到任何Agent相关功能时,需在问题排查结果后生成该摘要。问题排查结果面向工程师,该摘要面向设计师和产品经理。包含四个字段:演进阶段(行为描述,而非标签)、信任信号(高/中/低+一句话说明)、核心差距(一句可落地的改进描述)、信任疑问(仅需一个需通过研究解答的问题)。
Reference files
参考文件
| File | Read when |
|---|---|
| Steps 2-3: detection heuristics, per-feature ordered checks, diff-wide checks |
| Step 4, when the code uses AI SDK, MCP, the Claude Agent SDK, or AG-UI: where the gate, the stream, the completion signal, and the structured result live in each, with the spec defaults the rules lean on |
| Step 5: tier triggers, precedence, verdict logic |
| Step 6: findings JSON schema, summary schema, terminal rendering |
| A Layer 1 finding needs grounding the rule file does not carry |
| Writing the AX Relationship Summary: stage, action depth, costume vs intelligence |
| Grounding for structured tool output, approval payload, access scope, unprompted action; also the arguments that stay in |
| When changing this skill. Never loads during a user audit |
| Layer 1 categories, default tiers, co-firing pairs |
| Layer 2 categories, default tiers, co-firing pairs |
| 文件 | 读取时机 |
|---|---|
| 步骤2-3:检测启发式规则、按功能排序的检查项、全差异检查(仅PR模式) |
| 步骤4,当代码使用AI SDK、MCP、Claude Agent SDK或AG-UI时:查看各技术栈中网关、流、完成信号、结构化结果的位置,以及规则依赖的规范默认值 |
| 步骤5:分级触发条件、优先级、判定逻辑 |
| 步骤6:问题排查结果JSON schema、摘要schema、终端渲染格式 |
| 架构层问题排查结果需补充规则文件未包含的依据 |
| 撰写AX关系摘要:阶段、操作深度、外在表现vs智能能力 |
| 结构化工具输出、审批负载、访问范围、主动操作的依据;同时用于确定「核心差距」中的内容 |
| 修改本技能时使用。用户审计过程中不会加载该文件 |
| 架构层分类、默认等级、关联规则组 |
| 体验层分类、默认等级、关联规则组 |
Gotchas
注意事项
- Scope before rules. Running all 27 rules repo-wide on a 3-file PR buries a new release-blocker under pre-existing backlog noise; the verdict stops meaning "can this PR merge."
- The rule's override table is authoritative. defaults to
comm-no-intent-handshakebut its table saysfix-this-sprinton tool execution. Stacking the generic "+1 tier on tool execution" bump on an explicit override double-upgrades backlog findings into blockers.release-blocker - A stop button not wired to is a false affordance.
AbortController.abort()still fails: verify thecontrol-no-escape-hatchcall, not the button label, or the audit passes a UI that lies to users.abort() - A client that only closes the stream leaves the executor running.
stop()aborts the fetch. Unless the route passesuseChat().stop()intoreq.signaland toolstreamText({ abortSignal })reads it, the server finishes every remaining tool call after the user pressed Stop. Trace the signal to the loop, not to the button.execute - Tool annotations are hints, not stakes. MCP tells clients to treat from untrusted servers as untrusted; a gate that auto-approves on a third-party server's
annotationshas handed the gate to that server.readOnlyHint: truefails it. The spec defaults (comm-no-approval-gate,destructiveHint: true) are the fail-closed baseline.readOnlyHint: false - A framework approval flag is the gate's input, not the gate. AI SDK emits a
toolApproval: "user-approval"part and waits. A UI that never renderstool-approval-request, or answers it withstate === "approval-requested"on arrival, has a gate in the type system and none for the user. Check the renderer and the response call, not the option.addToolApprovalResponse({ approved: true }) - Absence checks need a recorded file list. "Find components lacking X" greps return nothing both when everything passes and when nothing was scanned. List candidate files first (), check each for the counter-pattern, and cite the file list as evidence.
rg -l <feature-pattern> - rules cannot fail on grep evidence alone.
detection: observational,granularity-static-api-mapping,trust-no-uncertainty-markers, andcontrol-over-conversationalneed interaction-flow judgment; on static evidence alone, returncomm-no-generative-momentumwith a reason, notunknown.fail - Gates fail in three separate places. Absent from the path (), present but mismatched to the stakes (
comm-no-approval-gate), or correct and unreadable (control-no-approval-gate). Report the first that holds and fix in that order.control-thin-approval-payload - Interactive gates do not cover unattended runs. Cron, webhook, and queue entry points reach the same executor with nobody to prompt. audits that path; evidence names the entry point, not the executor.
comm-unrequested-action-no-consent - comments count as
ax-audit-ignore:<slug>, notsuppressed. Report the count in the verdict block; a suppression with no reason is itself apass.warn - Don't inflate tiers. and
comm-no-generative-momentumdefault togranularity-static-api-mapping. One finding promoted tobacklogflips the whole PR to ❌ NOT READY, so promoting cosmetic ones trains the team to ignore the verdict entirely.release-blocker - Don't duplicate Audit mode findings. "Missing loading state" and "form clears on error" are its territory; duplicating them trains engineers to dismiss the whole AX report.
ui-design - A Personally Intelligent agent that only ever suggests has plateaued. Memory stage is not trust. Name the highest action rung in or the summary flatters a polite chatbot.
evolutionStage.behavior
- 先确定范围,再执行规则。针对仅改动3个文件的PR,在全仓库运行27条规则会导致新的发布阻塞项被淹没在既有待办问题中,使得判定结果失去「该PR是否可合并」的参考意义。
- 规则的覆盖表具有权威性。默认等级为「fix-this-sprint」,但其覆盖表显示在工具执行场景下为「release-blocker」。若在明确覆盖的基础上再叠加通用的「工具执行场景下等级+1」调整,会将待办问题错误升级为阻塞项。
comm-no-intent-handshake - 未绑定的停止按钮属于虚假交互。
AbortController.abort()规则仍会判定失败:需验证control-no-escape-hatch调用是否存在,而非仅检查按钮标签,否则审计会通过一个向用户撒谎的UI。abort() - 仅关闭流的客户端会导致执行器继续运行。
stop()会终止请求。除非路由将useChat().stop()传入req.signal,且工具streamText({ abortSignal })读取该信号,否则用户点击停止后,服务器仍会完成所有剩余工具调用。需追踪信号至循环逻辑,而非仅检查按钮。execute - 工具注释仅为提示,而非风险判定依据。MCP要求客户端将来自不可信服务器的视为不可信;若网关根据第三方服务器的
annotations自动批准请求,则相当于将网关权限交给了该服务器。readOnlyHint: true规则会判定失败。规范默认值(comm-no-approval-gate、destructiveHint: true)为安全基线。readOnlyHint: false - 框架的审批标记是网关的输入,而非网关本身。AI SDK的会发送
toolApproval: "user-approval"消息并等待响应。若UI从未渲染tool-approval-request状态,或在收到请求时自动调用state === "approval-requested",则仅在类型系统中存在网关,对用户而言并无实际网关。需检查渲染逻辑和响应调用,而非仅查看配置项。addToolApprovalResponse({ approved: true }) - 缺失检查需记录文件列表。「查找缺少X的组件」的grep命令在所有组件都符合要求或未扫描任何组件时,都会返回空结果。需先列出候选文件(),再逐个检查反模式,并将文件列表作为证据引用。
rg -l <feature-pattern> - 规则无法仅通过grep证据判定失败。
detection: observational、granularity-static-api-mapping、trust-no-uncertainty-markers和control-over-conversational规则需要交互流程判断;仅靠静态证据时,需返回comm-no-generative-momentum并说明原因,而非unknown。fail - 网关会在三个不同环节失效:执行路径中缺失网关()、网关存在但与风险不匹配(
comm-no-approval-gate)、网关配置正确但不可读(control-no-approval-gate)。需报告最先出现的问题,并按顺序修复。control-thin-approval-payload - 交互式网关无法覆盖无人值守运行场景。定时任务(Cron)、Webhook和队列入口会直接触发执行器,无用户可进行提示。规则会审计该路径;证据需注明入口点,而非执行器。
comm-unrequested-action-no-consent - 注释标记为
ax-audit-ignore:<slug>,而非suppressed。需在判定结果块中报告该数量;无理由的抑制本身会被标记为pass。warn - 不要随意提升等级。和
comm-no-generative-momentum默认等级为「backlog」。若将一个此类问题提升为「release-blocker」,会导致整个PR判定为❌ 未就绪,因此将 cosmetic 问题升级会让团队忽略判定结果的严肃性。granularity-static-api-mapping - 不要重复审计模式的结果。「缺少加载状态」和「表单错误时清空内容」属于
ui-design的范畴;重复报告这些问题会让工程师忽略整个AX报告。ui-design - 仅提供建议的Personal Intelligent Agent已达瓶颈。记忆阶段不等同于信任。需在中注明最高操作层级,否则摘要会错误地美化一个仅能礼貌聊天的机器人。
evolutionStage.behavior
Audit self-check
审计自检
Flag the audit if any of these hold, and include the counts as evidence (planned vs. run rules per playbook, unknown rate, suppressed count):
INCOMPLETE- Fewer rules ran than the playbooks planned
- More than 30% of rules returned . Count only
unknownhere, neverunknown: a rule whose layer is absent from the scope you were given was answered correctly, and a narrow diff is the scope Step 1 asks for. Marking a correctly scoped audit INCOMPLETE buries its real blockers under a verdict that reads as "we learned nothing".out-of-scope - Any /
failfinding lackswarnevidence or a fix snippetfile:line - Every finding landed in the same tier (suspect blanket assignment)
- AX Relationship Summary is missing despite detected agentic features
若出现以下任一情况,需标记审计为「不完整」,并将相关计数作为证据(剧本计划运行的规则数vs实际运行数、未知结果占比、抑制项数量):
- 实际运行的规则数少于剧本计划的数量
- 超过30%的规则返回。此处仅统计
unknown,不统计unknown:若规则所属层级不在给定范围内,则判定正确,且范围缩小是步骤1的要求。将正确范围的审计标记为不完整,会导致真正的阻塞项被「未获取有效信息」的判定结果掩盖。out-of-scope - 任何/
fail结果缺少warn证据或修复代码片段file:line - 所有结果都属于同一等级(怀疑存在批量赋值)
- 检测到Agent相关功能但未生成AX关系摘要
Related skills
相关技能
- Audit mode: traditional frontend UX around agentic surfaces; run both on agentic feature PRs
ui-design - : same files, different reader. This skill asks whether an agent can operate and recover;
dx-auditasks whether a human adopting the API, CLI, or types finds it ergonomicdx-audit - : what the agentic feature should do, before this audit
product-design - : CLAUDE.md / AGENTS.md instruction files
agents-md
Maintenance only: contains regression scenarios for changes to this skill; it does not load during a user task.
evals/evals.json- 审计模式:Agent交互界面的传统前端UX;在Agent功能PR中需同时运行两种审计
ui-design - :针对相同文件,面向不同受众。本技能关注Agent是否能操作和恢复;
dx-audit关注人类开发者使用API、CLI或类型时的ergonomicsdx-audit - :Agent功能的需求设计,在本次审计之前进行
product-design - :CLAUDE.md / AGENTS.md指令文件
agents-md
仅维护使用:包含本技能的回归测试场景;用户任务过程中不会加载该文件。",
evals/evals.json