ultraqa

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

UltraQA 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:
InvocationGoal TypeWhat to Check
/oh-my-claudecode:ultraqa --tests
testsAll test suites pass
/oh-my-claudecode:ultraqa --build
buildBuild succeeds with exit 0
/oh-my-claudecode:ultraqa --lint
lintNo lint errors
/oh-my-claudecode:ultraqa --typecheck
typecheckNo TypeScript errors
/oh-my-claudecode:ultraqa --custom "pattern"
customCustom success pattern in output
If no structured goal provided, interpret the argument as a custom goal.
从参数中解析目标。支持的格式:
调用方式目标类型检查内容
/oh-my-claudecode:ultraqa --tests
测试所有测试套件通过
/oh-my-claudecode:ultraqa --build
构建构建成功,退出码为0
/oh-my-claudecode:ultraqa --lint
代码检查无代码检查错误
/oh-my-claudecode:ultraqa --typecheck
类型检查无TypeScript错误
/oh-my-claudecode:ultraqa --custom "pattern"
自定义输出中包含自定义成功模式
如果未提供结构化目标,则将参数解释为自定义目标。

Cycle Workflow

循环工作流

Cycle N (Max 5)

第N次循环(最多5次)

  1. RUN QA: Execute verification based on goal type
    • --tests
      : Run the project's test command
    • --build
      : Run the project's build command
    • --lint
      : Run the project's lint command
    • --typecheck
      : Run the project's type check command
    • --custom
      : Run appropriate command and check for pattern
    • --interactive
      : Use qa-tester for interactive CLI/service testing:
      Task(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]")
  2. CHECK RESULT: Did the goal pass?
    • YES → Exit with success message
    • NO → Continue to step 3
  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.")
  4. 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.")
  5. REPEAT: Go back to step 1
  1. 执行QA:根据目标类型执行验证
    • --tests
      :运行项目的测试命令
    • --build
      :运行项目的构建命令
    • --lint
      :运行项目的代码检查命令
    • --typecheck
      :运行项目的类型检查命令
    • --custom
      :运行相应命令并检查指定模式
    • --interactive
      :使用qa-tester进行交互式CLI/服务测试:
      Task(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]")
  2. 检查结果:目标是否达成?
    • → 输出成功信息后退出
    • → 继续执行步骤3
  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.")
  4. 修复问题:应用架构师的建议
    Task(subagent_type="oh-my-claudecode:executor", model="sonnet", prompt="FIX:
    Issue: [architect diagnosis]
    Files: [affected files]
    Apply the fix precisely as recommended.")
  5. 重复:回到步骤1

Exit Conditions

退出条件

ConditionAction
Goal MetExit with success: "ULTRAQA COMPLETE: Goal met after N cycles"
Cycle 5 ReachedExit with diagnosis: "ULTRAQA STOPPED: Max cycles. Diagnosis: ..."
Same Failure 3xExit early: "ULTRAQA STOPPED: Same failure detected 3 times. Root cause: ..."
Environment ErrorExit: "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 cycles

State Tracking

状态跟踪

Track state in
.omc/ultraqa-state.json
:
json
{
  "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.json
中跟踪状态:
json
{
  "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
/oh-my-claudecode:cancel
which clears the state file.
用户可以使用
/oh-my-claudecode:cancel
命令取消,该命令会清除状态文件。

Important Rules

重要规则

  1. PARALLEL when possible - Run diagnosis while preparing potential fixes
  2. TRACK failures - Record each failure to detect patterns
  3. EARLY EXIT on pattern - 3x same failure = stop and surface
  4. CLEAR OUTPUT - User should always know current cycle and status
  5. CLEAN UP - Clear state file on completion or cancellation
  1. 尽可能并行处理 - 在准备潜在修复的同时运行诊断
  2. 跟踪失败情况 - 记录每次失败以检测模式
  3. 发现重复失败提前退出 - 连续3次相同失败则停止并反馈
  4. 输出清晰 - 用户应始终了解当前循环和状态
  5. 清理环境 - 在完成或取消时清除状态文件

STATE CLEANUP ON COMPLETION

完成时的状态清理

IMPORTANT: Delete state files on completion - do NOT just set
active: false
When goal is met OR max cycles reached OR exiting early:
bash
undefined
重要提示:完成时删除状态文件 - 不要仅将
active
设置为
false
当达成目标、达到最大循环次数或提前退出时:
bash
undefined

Delete 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次循环。