no-mistakes
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseno-mistakes
no-mistakes
no-mistakesno-mistakes axiWhen the user invokes , report the outcome at the end. If the user
asks for something specific, translate that request into the matching
flags yourself - for example, "skip the lint step" becomes . Run
to see the available flags.
/no-mistakesaxi run--skip=lintno-mistakes axi run --helpno-mistakesno-mistakes axi当用户调用 时,请在最后报告结果。如果用户有特定要求,请将其转换为对应的 参数——例如,“跳过lint步骤”对应 。运行 可查看可用参数。
/no-mistakesaxi run--skip=lintno-mistakes axi run --helpTwo ways to invoke
两种调用方式
/no-mistakes- Validate-only - bare (optionally with flag-style requests like "skip the lint step"). The user's code changes are already committed; validate them and report the outcome.
/no-mistakes - Task-first - , e.g.
/no-mistakes <task>. First carry out the task yourself, then validate the result through the pipeline:/no-mistakes add a --json flag to the status command- Check scope. Inspect before you change or commit anything. Preserve unrelated pre-existing uncommitted changes, and when you commit, commit only the changes that belong to the user's task.
git status - Do the work. Make the changes the task describes, then commit them on a feature branch. If the user is on the repository's default branch, create a feature branch first - the gate validates committed history on a non-default branch, so the work must land there before you run.
- Then validate, passing the user's task as your . The task text is exactly what the user set out to accomplish, in their own words, so it is the intent - pass it through, enriched with the decisions and tradeoffs you made while doing the work (see Intent is required).
--intent
- Check scope. Inspect
Everything below - preconditions, intent, the validate-and-decide loop - applies
the same way once the work is committed on a feature branch.
/no-mistakes- 仅验证模式 - 直接使用 (可附带类似“跳过lint步骤”的参数式请求)。此时用户的代码变更已提交,只需验证并报告结果即可。
/no-mistakes - 先执行任务模式 - ,例如
/no-mistakes <任务内容>。先自行完成任务,再通过流水线验证结果:/no-mistakes 为status命令添加--json参数- 检查范围。在进行任何修改或提交前,先查看 。保留无关的未提交变更,提交时仅提交与用户任务相关的变更。
git status - 执行任务。按照任务描述进行修改,然后在特性分支(feature branch)上提交。如果用户当前在仓库的默认分支上,请先创建一个特性分支——把关工具会验证非默认分支上的提交历史,因此必须先将工作内容提交到特性分支才能运行验证。
- 进行验证,将用户的任务内容作为 参数传入。任务文本是用户明确要完成的目标,用他们自己的表述即可,这就是意图——直接传入即可,同时可补充您在执行任务过程中做出的决策和权衡(详见必须传入意图部分)。
--intent
- 检查范围。在进行任何修改或提交前,先查看
后续内容——前置条件、意图、验证与决策循环——在工作内容提交到特性分支后均适用。
Before you start
开始前的准备
- The work you want validated must be committed on a branch. The gate validates committed history, not your uncommitted working tree.
- You must be on a feature branch, not the repository's default branch.
- The repository must already be initialized with .
no-mistakes init
If any of these is not met, returns an with the exact command
to fix it - read it and act on it (commit your work, or create a branch). If the
repository is not initialized, run first; if the
command itself is missing or misbehaving, reports what is
wrong. Before starting, a quick (home view) shows whether a
run is already active - resume or it rather than starting a second
run on top of it.
axi runerror:no-mistakes initno-mistakesno-mistakes doctorno-mistakes axiaxi abort- 待验证的工作内容必须已提交到某个分支。把关工具验证的是提交历史,而非未提交的工作区内容。
- 您必须处于特性分支上,而非仓库的默认分支。
- 仓库必须已通过 完成初始化。
no-mistakes init
如果以上任一条件未满足, 会返回 并给出具体的修复命令——请阅读并执行(提交工作内容,或创建分支)。如果仓库未初始化,请先运行 ;如果 命令本身缺失或异常, 会报告问题所在。开始前,运行 (主视图)可查看是否已有正在运行的任务——请恢复任务或运行 终止任务,避免在已有任务的基础上启动新任务。
axi runerror:no-mistakes initno-mistakesno-mistakes doctorno-mistakes axiaxi abortIntent is required
必须传入意图
When you start a run you must pass : what the user set out to
accomplish - the goal or request behind this work, in their terms. This is not
a description of the diff or the files you changed; it is the objective the
change is meant to achieve. You know it from the conversation, so pass it
directly - no-mistakes uses it verbatim instead of inferring it from local agent
transcripts (slower and flakier).
--intentErr on the side of completeness, not brevity. The review step uses
to tell a deliberate decision apart from a mistake, so a thin one-line summary
makes it flag things the user already chose. Capture the nuance: the user's
goal, the specific decisions and tradeoffs they made along the way, any
constraints or approaches they ruled in or out, and anything they explicitly
asked for that might otherwise look surprising in the diff. A few sentences to a
short paragraph is normal - write down what you learned from the conversation
that a reviewer reading only the diff would not know.
--intent启动任务时必须传入 参数:用户想要完成的目标——即本次工作背后的需求或请求,用用户的表述即可。这不是对代码差异或修改文件的描述,而是变更要实现的目标。您可从对话中获取该信息,直接传入即可——no-mistakes会直接使用该文本,而不是从本地代理记录中推断(速度慢且不稳定)。
--intent宁可详细,不要简略。审查步骤会使用 来区分故意决策和错误,因此过于简短的摘要可能会将用户已选择的内容标记为问题。请捕捉细节:用户的目标、执行过程中做出的具体决策和权衡、排除的约束或方案,以及任何用户明确要求但在代码差异中可能显得异常的内容。通常写几句话到一小段即可——写下您从对话中了解到的、仅查看代码差异的审查者无法知晓的信息。
--intentValidate and decide
验证与决策
Run the pipeline and decide on its findings as they come up:
-
Start the run. It blocks until the first decision point or the end:sh
no-mistakes axi run --intent "<what the user set out to accomplish>"and everyaxi runblock synchronously - the review, test, and CI steps can each take several minutes, so a single call may not return for a while. That is normal; allow a long timeout and do not cancel or re-issue the command because it seems slow. To check progress without disturbing the run, useaxi respondfrom a separate call.no-mistakes axi status -
If the output contains aobject, the pipeline is waiting on you. Read its
gate:table. Each finding has anfindings,id,severity,file, and andescriptionthat tells you how the pipeline classified it:action- - mechanical and low-risk; you can authorize the fix on your own judgment by responding with
auto-fix.--action fix - - informational only; nothing to do.
no-op - - the finding challenges the user's deliberate intent or touches product behavior. This is a call only the user can make - see Escalate
ask-userfindings below.ask-user
Choose one response:sh# accept the step as-is and continue no-mistakes axi respond --action approve # have the pipeline fix specific findings, then continue no-mistakes axi respond --action fix --findings <id1,id2> --instructions "<optional guidance>" # skip this step no-mistakes axi respond --action skipWhile a run is active, never fix findings by editing the code yourself - the pipeline owns both the findings and the fixes. Your job at a gate is to decide and respond;has the pipeline apply the fix and re-review the result.--action fixEachblocks until the nextrespond,gate:decision point, or final outcome.checks-passedTwo extra flags are available onwhen you need them:respond- (with
--add-finding '<json>') folds a finding you spotted yourself - one the pipeline did not surface - into the fix round, as a JSON finding object. Use it for a problem you noticed that is not in the gate's own--action fixtable.findings - responds to a specific step instead of the one currently awaiting approval. You rarely need this; omit it to answer the active gate.
--step <name>
-
Repeat step 2 until the output has aninstead of a
outcome:. The outcomes are:gate:- - the change is validated and CI is green, but the PR is not merged yet. You are done driving the pipeline. Do not wait for the merge: tell the user the PR is ready and ask them to review and merge it (the PR link is in the
checks-passedline). no-mistakes keeps monitoring the PR in the background, so a human can watch it in the TUI.help - - the changes cleared the gate and the PR was merged or closed.
passed - or
failed- they did not; read the output and address it. Fix whatever the output points at (a failing test, a lint error, a finding you skipped), commit the fix on the same feature branch, then drive the pipeline again -cancelledstarts a fresh run, orno-mistakes axi run --intent "..."re-runs the pipeline for the current branch. Do not leave the user at ano-mistakes rerunoutcome without either retrying or explaining what blocks it.failed
The CI step deliberately watches the PR until it is merged or closed, so
returns the moment checks are green rather than
blocking on the human merge. Never poll or re-run waiting for the merge yourself.
axi runchecks-passedOn a successful outcome ( or ), close the loop with the
user: summarize what happened during the pipeline in a concise, easily readable
format - what was validated and what was found. If the output includes a
table, the pipeline fixed findings your original change missed:
acknowledge those misses and explicitly list each fix so the user can easily
review them.
checks-passedpassedfixes运行流水线并根据结果做出决策:
-
启动任务。任务会阻塞直到第一个决策点或结束:sh
no-mistakes axi run --intent "<用户想要完成的目标>"和所有axi run命令都会同步阻塞——审查、测试和CI步骤可能各需数分钟,因此单次调用可能不会立即返回。这是正常现象,请设置较长的超时时间,不要因看似缓慢而取消或重新发起命令。如需在不干扰任务的情况下查看进度,请在单独的调用中使用axi respond。no-mistakes axi status -
如果输出包含对象,则流水线正在等待您的决策。请阅读其
gate:表格。每条结果包含findings、id(严重程度)、severity(文件)、file(描述)和description(操作建议),用于说明流水线对该结果的分类:action- - 机械性且低风险的问题;您可自行判断并通过
auto-fix授权修复。--action fix - - 仅为信息提示;无需操作。
no-op - - 该结果挑战了用户的故意意图或涉及产品行为变更。这只能由用户做出决策——详见下文上报ask-user类结果。
ask-user
选择以下响应之一:sh# 接受当前步骤并继续 no-mistakes axi respond --action approve # 让流水线修复指定结果,然后继续 no-mistakes axi respond --action fix --findings <id1,id2> --instructions "<可选指导>" # 跳过此步骤 no-mistakes axi respond --action skip当任务正在运行时,请勿自行编辑代码修复问题——流水线负责结果的发现和修复。您在把关环节的职责是做出决策并响应;会让流水线应用修复并重新审查结果。--action fix每次都会阻塞直到下一个respond、gate:决策点或最终结果。checks-passed当需要时,命令还有两个额外参数:respond- (需搭配
--add-finding '<json>')可将您自己发现的、流水线未识别的问题以JSON结果对象的形式加入修复环节,用于处理把关环节--action fix表格中未列出的问题。findings - 可响应特定步骤,而非当前等待批准的步骤。您很少需要使用此参数;省略该参数即可响应当前活跃的把关环节。
--step <name>
-
重复步骤2,直到输出显示而非
outcome:。结果包括:gate:- - 变更已通过验证且CI状态为绿色,但PR尚未合并。您的流水线操作已完成。无需等待合并:告知用户PR已准备就绪,请他们审查并合并(PR链接在
checks-passed行中)。no-mistakes会在后台持续监控PR,用户可在TUI中查看。help - - 变更已通过把关环节,PR已合并或关闭。
passed - 或
failed- 变更未通过;请阅读输出并处理问题。修复输出指出的问题(如测试失败、lint错误、跳过的结果),在同一特性分支上提交修复,然后重新运行流水线——cancelled会启动新任务,或no-mistakes axi run --intent "..."会重新运行当前分支的流水线。请勿让用户停留在no-mistakes rerun结果而不重试或解释阻塞原因。failed
CI步骤会特意监控PR直到其合并或关闭,因此会在检查通过后立即返回,而非等待人工合并。请勿自行轮询或重新运行以等待合并。
axi runchecks-passed当结果成功时( 或 ),请向用户反馈:以简洁易读的格式总结流水线运行过程——验证了哪些内容,发现了哪些问题。如果输出包含 表格,说明流水线修复了您原始变更中遗漏的问题:请确认这些遗漏,并明确列出每个修复,以便用户轻松查看。
checks-passedpassedfixesEscalate ask-user
findings
ask-user上报ask-user类结果
A gate whose findings are all or is safe to drive on your
own judgment: respond with or as
appropriate. But a finding marked
is a decision that belongs to the user, not you - the pipeline
flagged it because it challenges their deliberate intent or changes product
behavior. Do not approve, fix, or skip it on your own. Instead, stop and bring
it to the user before you respond:
auto-fixno-op--action fix--action approveask-user- Relay each finding to them as the pipeline wrote it - its
ask-user,id, and fullfileverbatim. Do not paraphrase, summarize away the detail, or pre-judge the answer.description - Ask how they want to proceed, then translate their decision into the matching
call:
respond(pass their guidance through--action fix),--instructions, or--action approve.--action skip
The one exception is (below): it is the user's standing consent to
drive every gate unattended, so under you resolve
findings automatically instead of stopping to ask.
--yes--yesask-userIf you have clear consent to drive the run automatically, pass to
or . It treats every actionable finding - and
alike - as consent to fix it, selects every current finding for one
fix round, accepts the resulting fix review, and approves gates with only
findings. Only use it when the user has asked you to drive the whole
run without checking back.
--yesaxi runaxi respondauto-fixask-userno-op如果把关环节的结果均为 或 ,您可自行判断并响应:根据情况使用 或 。但标记为 的结果只能由用户决策,而非您——流水线标记它是因为它挑战了用户的故意意图或涉及产品行为变更。请勿自行批准、修复或跳过该结果。相反,请在响应前暂停并将其告知用户:
auto-fixno-op--action fix--action approveask-user- 按照流水线的原始表述,将每个 结果的
ask-user、id和完整file原封不动地转告用户。请勿 paraphrase、省略细节或预先判断答案。description - 询问用户如何处理,然后将他们的决策转换为对应的 调用:
respond(通过--action fix传入用户的指导)、--instructions或--action approve。--action skip
唯一的例外是 (如下):这是用户授权您自动处理所有把关环节的同意指令,因此在使用 时,您可自动处理 结果,无需暂停询问。
--yes--yesask-user如果您获得了明确的自动运行授权,请在 或 中传入 参数。它会将所有可操作结果——包括 和 ——视为同意修复,选择当前所有结果进行一轮修复,接受修复后的审查结果,并批准仅包含 结果的把关环节。仅当用户要求您全程自动运行任务而无需反馈时使用此参数。
axi runaxi respond--yesauto-fixask-userno-opInspecting state
查看状态
sh
no-mistakes axi # home view: active run, recent runs, next steps
no-mistakes axi status # full detail of the active (or most recent) run
no-mistakes axi logs --step <name> --full # full log output of one step
no-mistakes axi abort # cancel the active runsh
no-mistakes axi # 主视图:活跃任务、最近任务、下一步操作
no-mistakes axi status # 活跃(或最近)任务的详细信息
no-mistakes axi logs --step <name> --full # 某一步骤的完整日志输出
no-mistakes axi abort # 取消活跃任务Reading the output
解读输出
- Output is TOON: pairs,
key: valuetables, andname[N]{cols}:hints.help[N]: - The list at the bottom of most responses tells you the next commands to run.
help - Errors are printed as on stdout with a
error: ...list; act on the suggestion.help - Exit codes: success, no-op, or normal decision gates,
0failed or cancelled final outcomes,1bad usage.2
A waiting on you looks roughly like this - a line naming the
step, a table with one row per finding, and a
list of next commands:
gate:gate:findings[N]{...}:help[N]:gate: review
findings[2]{id,severity,file,description,action}:
r1,medium,internal/pipeline/executor.go,Error from os.Remove is ignored,auto-fix
r2,high,cmd/no-mistakes/main.go,New --force flag bypasses the confirm prompt,ask-user
help[2]:
no-mistakes axi respond --action fix --findings r1
no-mistakes axi respond --action approveRead the column per row: decide (auto-fix) on your own
judgment - hands it to the pipeline to
fix - but stop and escalate (ask-user) to the user before responding. A
final state
instead shows with no
table. Field names and exact columns can vary by step and version,
so read the actual header rather than assuming this layout.
actionr1respond --action fix --findings r1r2outcome: <checks-passed|passed|failed|cancelled>findingsfindings- 输出采用TOON格式:键值对、
key: value表格和name[N]{cols}:提示。help[N]: - 大多数响应底部的 列表会告知您下一步要运行的命令。
help - 错误信息会以 的形式输出到标准输出,并附带
error: ...列表;请按照建议操作。help - 退出码:表示成功、无操作或正常决策环节,
0表示最终结果为失败或取消,1表示使用错误。2
等待您决策的 大致如下——一行 标明步骤,一个 表格包含每条结果,还有一个 列表显示下一步命令:
gate:gate:findings[N]{...}:help[N]:gate: review
findings[2]{id,severity,file,description,action}:
r1,medium,internal/pipeline/executor.go,Error from os.Remove is ignored,auto-fix
r2,high,cmd/no-mistakes/main.go,New --force flag bypasses the confirm prompt,ask-user
help[2]:
no-mistakes axi respond --action fix --findings r1
no-mistakes axi respond --action approve请逐行查看 列:自行判断处理 (auto-fix)——运行 让流水线修复——但在响应前需暂停并将 (ask-user)上报给用户。最终状态会显示 ,且无 表格。字段名称和具体列可能因步骤和版本而异,请以实际的 表头为准。
actionr1respond --action fix --findings r1r2outcome: <checks-passed|passed|failed|cancelled>findingsfindings