x07-lint-repair
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesex07-lint-repair
x07代码检查与修复
Use this skill when an X07 file fails linting and the agent needs a repeatable converge loop.
Note: , , and run the same auto-repair loop by default (). Use this skill when you want raw diagnostics or tighter control.
x07 runx07 buildx07 bundle--repair=...当X07文件代码检查不通过,且需要可重复的修正循环时,使用本技能。
注意:、和默认会执行相同的自动修复循环()。当你需要原始诊断信息或更精细的控制时,使用本技能。
x07 runx07 buildx07 bundle--repair=...Canonical converge loop
标准修正循环
-
Lint (machine-readable JSON report):
x07 lint --input src/main.x07.json --json
-
Apply tool-provided quickfixes (when diagnostics include JSON Patch quickfixes):
x07 fix --input src/main.x07.json --write --json
-
If a custom fix is needed, apply an explicit JSON Patch (RFC 6902):
x07 ast apply-patch --in src/main.x07.json --patch /tmp/repair.patch.json --validate
-
Canonicalize after patching:
x07 fmt --input src/main.x07.json --write --json
Repeat (max 3 iterations). If still failing, stop and change strategy (reduce scope, regenerate the x07AST cleanly, or ask for clarification).
Related:
- If the failure came from (a counterexample repro), use
x07 test --pbtto generate a deterministic regression test.x07 fix --from-pbt <repro.json> --write
-
代码检查(生成机器可读的JSON报告):
x07 lint --input src/main.x07.json --json
-
应用工具提供的快速修复(当诊断信息包含JSON Patch快速修复时):
x07 fix --input src/main.x07.json --write --json
-
若需要自定义修复,应用显式的JSON Patch(符合RFC 6902标准):
x07 ast apply-patch --in src/main.x07.json --patch /tmp/repair.patch.json --validate
-
补丁应用后进行规范化处理:
x07 fmt --input src/main.x07.json --write --json
重复执行(最多3次迭代)。若仍未通过,停止当前流程并更换策略(缩小范围、重新生成干净的x07AST,或请求澄清)。
相关操作:
- 如果失败来自(反例重现),使用
x07 test --pbt生成确定性回归测试。x07 fix --from-pbt <repro.json> --write