uat-fix-loop

A command that repeats the fix-and-test process for issues that fail user acceptance testing, or UAT—the checks that confirm a feature works for its intended users.

In plain words
What is it for?
Use it on the develop branch after a failed UAT, when the affected feature worktrees and the required CommandMate server are available.
Why use it?
It coordinates fixes, pull requests, merges, and another UAT run until the tests pass or the retry limit is reached.

Command for Claude Code

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/kewton/commandmate/uat-fix-loop
Clone the repo
git clone --depth 1 https://github.com/Kewton/CommandMate

Made for: Claude Code.

Per session 32 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,897 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00032 $0.02897
Opus 5 $0.00016 $0.01448
Sonnet 5 $0.00006 $0.00579
Haiku 4.5 $0.00003 $0.00290

Measured 2d ago against content hash 30d4dc23c88b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

uat-fix-loop scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/commands/uat-fix-loop.md · 339 lines

How it starts

The opening of the file, as written. The whole thing — 339 lines — stays where its author put it; the contents beside it link to each section on GitHub.

UAT修正ループ

概要

受入テスト(UAT)で不合格となったIssueについて、featureブランチでの修正→再PR→再マージ→再UATのサイクルを自動化します。全テストがPASSするか、最大リトライ回数に達するまでループを繰り返します。

使用方法

  • /uat-fix-loop [Issue番号1] [Issue番号2] ...
  • /uat-fix-loop [Issue番号] --max-retry 5 (最大リトライ回数を指定)

前提条件

  • developブランチ上で実行すること
  • 直前に /uat が実行済みで、FAILしたテスト項目があること
  • FAILしたIssueのfeatureブランチ worktreeが存在すること
  • CommandMateサーバーが稼働していること

実行内容

あなたはQAマネージャーとして、UAT不合格項目の修正サイクルを統括します。

パラメータ

  • issue_numbers: 修正対象のIssue番号(スペース区切り)
  • --max-retry: 最大リトライ回数(デフォルト: 3)

Step 0: 初期設定

TodoWriteツールで作業計画を作成:

- [ ] Step 1: UAT結果の分析
- [ ] Step 2: 修正指示の送信
- [ ] Step 3: 修正完了待ち・品質確認
- [ ] Step 4: 再PR・再マージ
- [ ] Step 5: 再UAT
- [ ] Step 6: 結果判定(→ ループ or 完了)

Step 1: UAT結果の分析

1-1. 直前のUATレポートを読み込む

各Issueについて、最新のUATレポートからFAIL項目を抽出:

for issue_num in {issue_numbers}; do
  # UATレポートを確認
  ls dev-reports/issue/${issue_num}/uat/
  cat dev-reports/issue/${issue_num}/uat/test-results.json 2>/dev/null
done

1-2. FAIL項目の整理

各FAIL項目について以下を記録:

  • テストID: テスト項目の識別子
  • テスト項目名: 何をテストしたか
  • 期待結果: 何が期待されていたか
  • 実際の結果: 何が起きたか
  • エビデンス: テスト出力の関連部分

1-3. 修正対象のworktree特定

for issue_num in {issue_numbers}; do
  WT_ID=$(commandmatedev ls --branch "feature/${issue_num}" --quiet)
  echo "Issue #${issue_num} → Worktree: ${WT_ID}"
done

worktreeが見つからない場合はエラー報告して中断。


Step 2: 修正指示の送信

各FAILしたIssueのワーカーに修正指示を送信。

2-1. 修正指示メッセージの構築

FAIL項目の情報を具体的に含めた修正指示を構築する:

受入テスト(UAT)で以下のテスト項目がFAILしました。修正してください。

## FAIL項目

### {テストID}: {テスト項目名}
- 期待結果: {期待されていた動作}
- 実際の結果: {実際に起きた動作}
- エビデンス: {テスト出力の関連部分}
- 推定原因: {ログから推定される原因}

## 修正後の確認事項

修正が完了したら、以下を順に実行してください:
1. npm run lint
2. npx tsc --noEmit
3. npm run test:unit
4. 修正内容をコミット
5. git push

2-2. 送信

for each fail_issue:
  commandmatedev send <worktree-id> "{修正指示メッセージ}" \
    --auto-yes --duration 2h

修正指示が並列送信可能な場合(独立したIssueのFAIL)は並列で送信する。


Step 3: 修正完了待ち・品質確認

3-1. 完了待機

for each worktree:
  commandmatedev wait <worktree-id> --timeout 7200
  EXIT=$?
  if [ "$EXIT" -eq 10 ]; then
    # プロンプト検出 → 内容確認して応答
    commandmatedev respond <worktree-id> "yes"
    commandmatedev wait <worktree-id> --timeout 7200
  fi

Read the full file on GitHub · 339 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 339 lines · 32 tokens per session scan A 30d4dc23c88b

Subscribe to this mod's changes

uat-fix-loop is a command published in the GitHub repository Kewton/CommandMate (39 stars, last pushed 2d ago), licensed MIT. It adds 32 tokens to every session and 2,897 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.