ultraqa
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUltraQA Skill
UltraQA Skill
[ULTRAQA ACTIVATED - AUTONOMOUS QA CYCLING]
[ULTRAQA ACTIVATED - AUTONOMOUS QA CYCLING]
Overview
概述
You are now in ULTRAQA mode - an autonomous QA cycling workflow that runs until your quality goal is met.
Cycle: qa-tester → architect verification → fix → repeat
您现在处于ULTRAQA模式——这是一个自主QA循环工作流,会持续运行直至达成质量目标。
循环流程:qa-tester → 架构师验证 → 修复 → 重复
Goal Parsing
目标解析
Parse the goal from arguments. Supported formats:
| Invocation | Goal Type | What to Check |
|---|---|---|
| tests | All test suites pass |
| build | Build succeeds with exit 0 |
| lint | No lint errors |
| typecheck | No TypeScript errors |
| custom | Custom success pattern in output |
If no structured goal provided, interpret the argument as a custom goal.
从参数中解析目标。支持的格式:
| 调用方式 | 目标类型 | 检查内容 |
|---|---|---|
| 测试 | 所有测试套件通过 |
| 构建 | 构建成功,退出码为0 |
| 代码检查 | 无代码检查错误 |
| 类型检查 | 无TypeScript错误 |
| 自定义 | 输出中包含自定义成功模式 |
如果未提供结构化目标,则将参数解释为自定义目标。
Cycle Workflow
循环工作流
Cycle N (Max 5)
第N次循环(最多5次)
-
RUN QA: Execute verification based on goal type
- : Run the project's test command
--tests - : Run the project's build command
--build - : Run the project's lint command
--lint - : Run the project's type check command
--typecheck - : Run appropriate command and check for pattern
--custom - : Use qa-tester for interactive CLI/service testing:
--interactiveTask(subagent_type="oh-my-claudecode:qa-tester", model="sonnet", prompt="TEST: Goal: [describe what to verify] Service: [how to start] Test cases: [specific scenarios to verify]")
-
CHECK RESULT: Did the goal pass?
- YES → Exit with success message
- NO → Continue to step 3
-
ARCHITECT DIAGNOSIS: Spawn architect to analyze failure
Task(subagent_type="oh-my-claudecode:architect", model="opus", prompt="DIAGNOSE FAILURE: Goal: [goal type] Output: [test/build output] Provide root cause and specific fix recommendations.") -
FIX ISSUES: Apply architect's recommendations
Task(subagent_type="oh-my-claudecode:executor", model="sonnet", prompt="FIX: Issue: [architect diagnosis] Files: [affected files] Apply the fix precisely as recommended.") -
REPEAT: Go back to step 1
-
执行QA:根据目标类型执行验证
- :运行项目的测试命令
--tests - :运行项目的构建命令
--build - :运行项目的代码检查命令
--lint - :运行项目的类型检查命令
--typecheck - :运行相应命令并检查指定模式
--custom - :使用qa-tester进行交互式CLI/服务测试:
--interactiveTask(subagent_type="oh-my-claudecode:qa-tester", model="sonnet", prompt="TEST: Goal: [describe what to verify] Service: [how to start] Test cases: [specific scenarios to verify]")
-
检查结果:目标是否达成?
- 是 → 输出成功信息后退出
- 否 → 继续执行步骤3
-
架构师诊断:启动架构师角色分析失败原因
Task(subagent_type="oh-my-claudecode:architect", model="opus", prompt="DIAGNOSE FAILURE: Goal: [goal type] Output: [test/build output] Provide root cause and specific fix recommendations.") -
修复问题:应用架构师的建议
Task(subagent_type="oh-my-claudecode:executor", model="sonnet", prompt="FIX: Issue: [architect diagnosis] Files: [affected files] Apply the fix precisely as recommended.") -
重复:回到步骤1
Exit Conditions
退出条件
| Condition | Action |
|---|---|
| Goal Met | Exit with success: "ULTRAQA COMPLETE: Goal met after N cycles" |
| Cycle 5 Reached | Exit with diagnosis: "ULTRAQA STOPPED: Max cycles. Diagnosis: ..." |
| Same Failure 3x | Exit early: "ULTRAQA STOPPED: Same failure detected 3 times. Root cause: ..." |
| Environment Error | Exit: "ULTRAQA ERROR: [tmux/port/dependency issue]" |
| 条件 | 操作 |
|---|---|
| 达成目标 | 输出成功信息后退出:"ULTRAQA COMPLETE: Goal met after N cycles" |
| 达到第5次循环 | 输出诊断信息后退出:"ULTRAQA STOPPED: Max cycles. Diagnosis: ..." |
| 连续3次相同失败 | 提前退出:"ULTRAQA STOPPED: Same failure detected 3 times. Root cause: ..." |
| 环境错误 | 退出:"ULTRAQA ERROR: [tmux/port/dependency issue]" |
Observability
可观测性
Output progress each cycle:
[ULTRAQA Cycle 1/5] Running tests...
[ULTRAQA Cycle 1/5] FAILED - 3 tests failing
[ULTRAQA Cycle 1/5] Architect diagnosing...
[ULTRAQA Cycle 1/5] Fixing: auth.test.ts - missing mock
[ULTRAQA Cycle 2/5] Running tests...
[ULTRAQA Cycle 2/5] PASSED - All 47 tests pass
[ULTRAQA COMPLETE] Goal met after 2 cycles每次循环输出进度:
[ULTRAQA Cycle 1/5] Running tests...
[ULTRAQA Cycle 1/5] FAILED - 3 tests failing
[ULTRAQA Cycle 1/5] Architect diagnosing...
[ULTRAQA Cycle 1/5] Fixing: auth.test.ts - missing mock
[ULTRAQA Cycle 2/5] Running tests...
[ULTRAQA Cycle 2/5] PASSED - All 47 tests pass
[ULTRAQA COMPLETE] Goal met after 2 cyclesState Tracking
状态跟踪
Track state in :
.omc/ultraqa-state.jsonjson
{
"active": true,
"goal_type": "tests",
"goal_pattern": null,
"cycle": 1,
"max_cycles": 5,
"failures": ["3 tests failing: auth.test.ts"],
"started_at": "2024-01-18T12:00:00Z",
"session_id": "uuid"
}在中跟踪状态:
.omc/ultraqa-state.jsonjson
{
"active": true,
"goal_type": "tests",
"goal_pattern": null,
"cycle": 1,
"max_cycles": 5,
"failures": ["3 tests failing: auth.test.ts"],
"started_at": "2024-01-18T12:00:00Z",
"session_id": "uuid"
}Cancellation
取消操作
User can cancel with which clears the state file.
/oh-my-claudecode:cancel用户可以使用命令取消,该命令会清除状态文件。
/oh-my-claudecode:cancelImportant Rules
重要规则
- PARALLEL when possible - Run diagnosis while preparing potential fixes
- TRACK failures - Record each failure to detect patterns
- EARLY EXIT on pattern - 3x same failure = stop and surface
- CLEAR OUTPUT - User should always know current cycle and status
- CLEAN UP - Clear state file on completion or cancellation
- 尽可能并行处理 - 在准备潜在修复的同时运行诊断
- 跟踪失败情况 - 记录每次失败以检测模式
- 发现重复失败提前退出 - 连续3次相同失败则停止并反馈
- 输出清晰 - 用户应始终了解当前循环和状态
- 清理环境 - 在完成或取消时清除状态文件
STATE CLEANUP ON COMPLETION
完成时的状态清理
IMPORTANT: Delete state files on completion - do NOT just set
active: falseWhen goal is met OR max cycles reached OR exiting early:
bash
undefined重要提示:完成时删除状态文件 - 不要仅将设置为
activefalse当达成目标、达到最大循环次数或提前退出时:
bash
undefinedDelete ultraqa state file
Delete ultraqa state file
rm -f .omc/state/ultraqa-state.json
This ensures clean state for future sessions. Stale state files with `active: false` should not be left behind.
---
Begin ULTRAQA cycling now. Parse the goal and start cycle 1.rm -f .omc/state/ultraqa-state.json
这确保未来会话有干净的状态。不应留下标记为`active: false`的过期状态文件。
---
立即开始ULTRAQA循环。解析目标并启动第1次循环。