CommandMate: Command for Claude Code

.claude/commands/uat-fix-loop.md

uat-fix-loop is a command for Claude Code from Kewton/CommandMate. It costs 32 tokens per session (3,952 once invoked), scanned A, original, MIT.

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

Written for Claude Code: installed under .claude/. Also seen: model in frontmatter; names the TodoWrite tool; mentions Codex.

This is Kewton/CommandMate's own configuration. It tells Claude Code how to work on CommandMate itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything CommandMate configures →

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is node scripts/orchestrate/run-log.mjs append --run-dir "$RUN_DIR" --issues "$RUN_ISSUES" \.

Reuse

Borrowing it

Nothing to install: this file belongs to Kewton/CommandMate. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/Kewton/CommandMate/main/.claude/commands/uat-fix-loop.md
Clone the repo
git clone --depth 1 https://github.com/Kewton/CommandMate

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for uat-fix-loop

README.md
[![agentmods](https://agentmods.dev/badge/commands/kewton/commandmate/uat-fix-loop/github.svg)](https://agentmods.dev/commands/kewton/commandmate/uat-fix-loop)
Your own site
<a href="https://agentmods.dev/commands/kewton/commandmate/uat-fix-loop"><img src="https://agentmods.dev/badge/commands/kewton/commandmate/uat-fix-loop/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for uat-fix-loop

Your own site · 80×15
<a href="https://agentmods.dev/commands/kewton/commandmate/uat-fix-loop"><img src="https://agentmods.dev/badge/commands/kewton/commandmate/uat-fix-loop.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 3,952 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00032 $0.03952
Opus 5.5 $0.00013 $0.01581
Sonnet 5.5 $0.00006 $0.00790
Haiku 4.5 $0.00003 $0.00395

Measured 18d ago against content hash e1f33f23bdc6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 18d 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 · 360 lines

How it starts

The opening of the file, as written. The whole thing — 360 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 · 360 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. 18d ago Changed · +3 lines e1f33f23bdc6
  2. 23d ago Changed · +18 lines 6f3419aa23f0
  3. 1mo 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 (44 stars, last pushed today), licensed MIT. It adds 32 tokens to every session and 3,952 once invoked, about $0.0001 per session on Opus 5.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.

Related

Other commands, from other repositories

test-feature

Test a React Native feature on the running simulator/emulator. Verifies UI, user flows, and internal state. Generates a persistent Maestro test file.

Lykhoyda/rn-dev-agent · 30 tokens

ux-grill

Use when a running web app's UX has to be audited reproducibly rather than by feel — a deterministic mechanical pass over routes and viewports (axe, target size, horizontal overflow, page title, scripted journeys) followed by a screenshot-grounded interrogation of the operator, journey by journey, with two persona…

Kanevry/session-orchestrator · 121 tokens

test-audit

Use when writing, reviewing, or pruning tests. Three modes, one value bar: a four-question gate before any new test is written, a focused audit of one scope, and a campaign over a whole repo or subsystem that removes the least useful tests under a coverage guard. Every delete, merge, or repair carries written evidence…

Kanevry/session-orchestrator · 107 tokens

bug

Reproduce then TDD-fix a ready-for-agent bug ticket in this checkout. Web bugs get a browser repro first.

Kripu77/software-factory · 27 tokens

tests

Test coverage quality analysis — behavioral coverage, critical gap identification, test resilience evaluation.

racecraft-lab/Paddock · 16 tokens

aitask-run-gates

Run a task's declared gates — the conversational front of the headless gate orchestrator engine. Dispatches unlocked machine-gate verifiers within their retry budgets, observes human gates without self-signalling, and reports.

beyondeye/aitasks · 43 tokens