workflow-lite-test-review
БесплатноБез исполняемых скриптовНе проверенPost-execution test review and fix - chain from workflow-lite-execute or standalone. Reviews implementation against plan, runs tests, auto-fixes failures.
от catlog22★ 2 110 звёзд на GitHubОб этом скилле
Workflow-Lite-Test-Review
Test review and fix engine for workflow-lite-execute chain or standalone invocation.
Project Context: Run ccw spec load --category test for test framework conventions, coverage targets, and fixtures.
Usage
<session-path|--last> Session path or auto-detect last session (required for standalone)
| Flag | Description |
|---|---|
--in-memory |
Mode 1: Chain from workflow-lite-execute via testReviewContext global variable |
--skip-fix |
Review only, do not auto-fix failures |
Input Modes
Mode 1: In-Memory Chain (from workflow-lite-execute)
Trigger: --in-memory flag or testReviewContext global variable available
Input Source: testReviewContext global variable set by workflow-lite-execute Step 4
Behavior: Skip session discovery, inherit convergenceReviewTool from execution chain, proceed directly to TR-Phase 1.
Note: workflow-lite-execute Step 5 is the chain gate. Mode 1 invocation means execution + code review are complete — proceed with convergence verification + tests.
Mode 2: Standalone
Trigger: User calls with session path or --last
Behavior: Discover session → load plan + tasks → convergenceReviewTool = 'agent' → proceed to TR-Phase 1.
let sessionPath, plan, taskFiles, convergenceReviewTool
if (testReviewContext) {
// Mode 1: from workflow-lite-execute chain
sessionPath = testReviewContext.session.folder
plan = testReviewContext.planObject
taskFiles = testReviewContext.taskFiles.map(tf => JSON.parse(Read(tf.path)))
convergenceReviewTool = testReviewContext.convergenceReviewTool || 'agent'
} else {
// Mode 2: standalone — find last session or use provided path
sessionPath = resolveSessionPath($ARGUMENTS) // Glob('.workflow/.lite-plan/*/plan.json'), take last
plan = JSON.parse(Read(`${sessionPath}/plan.json`))
taskFiles = plan.task_ids.map(id => JSON.parse(Read(`${sessionPath}/.task/${id}.json`)))
convergenceReviewTool = 'agent'
}
const skipFix = $ARGUMENTS?.includes('--skip-fix') || false
Phase Summary
| Phase | Core Action | Output |
|---|---|---|
| TR-Phase 1 | Detect test framework + gather changes | testConfig, changedFiles |
| TR-Phase 2 | Convergence verification against plan criteria | reviewResults[] |
| TR-Phase 3 | Run tests + generate checklist | test-checklist.json |
| TR-Phase 4 | Auto-fix failures (iterative, max 3 rounds) | Fixed code + updated checklist |
| TR-Phase 5 | Output report + chain to session:sync | test-review.md |
TR-Phase 0: Initialize
Set sessionId from sessionPath. Create TodoWrite with 5 phases (Phase 1 = in_progress, rest = pending).
TR-Phase 1: Detect Test Framework & Gather Changes
Test framework detection (check in order, first match wins):
| File | Framework | Command |
|---|---|---|
package.json with scripts.test |
jest/vitest | npm test |
package.json with scripts['test:unit'] |
jest/vitest | npm run test:unit |
pyproject.toml |
pytest | python -m pytest -v --tb=short |
Cargo.toml |
cargo-test | cargo test |
go.mod |
go-test | go test ./... |
Gather git changes: git diff --name-only HEAD~5..HEAD → changedFiles[]
Output: testConfig = { command, framework, type } + changedFiles[]
// TodoWrite: Phase 1 → completed, Phase 2 → in_progress
TR-Phase 2: Convergence Verification
Skip if: convergenceReviewTool === 'skip' — set all tasks to PASS, proceed to Phase 3.
Verify each task's convergence criteria are met in the implementation and identify test gaps.
Agent Convergence Review (convergenceReviewTool === 'agent', default):
For each task in taskFiles:
- Extract
convergence.criteria[]from the task - Match
task.files[].pathagainstchangedFilesto find actually-changed files - Read each matched file, verify each convergence criterion with file:line evidence
- Check test coverage gaps:
- If
task.test.unitdefined but no matching test files in changedFiles → mark as test gap - If
task.test.integrationdefined but no integration test in changedFiles → mark as test gap
- If
- Build
reviewResult = { taskId, title, criteria_met[], criteria_unmet[], test_gaps[], files_reviewed[] }
Verdict logic:
- PASS = all
convergence.criteriamet + no test gaps - PARTIAL = some criteria met OR has test gaps
- FAIL = no criteria met
CLI Convergence Review (convergenceReviewTool === 'gemini' or 'codex'):
const reviewId = `${sessionId}-convergence`
const taskCriteria = taskFiles.map(t => `${t.id}: [${(t.convergence?.criteria || []).join(' | ')}]`).join('\n')
Bash(`ccw cli -p "PURPOSE: Convergence verification — check each task's completion criteria against actual implementation
TASK: • For each task below, verify every convergence criterion is satisfied in the changed files • Mark each criterion as MET (with file:line evidence) or UNMET (with what's missing
Установить workflow-lite-test-review в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
SkillAgentAskUserQuestionTodoWriteReadWriteEditBashGlobGrepFAQ
Что делает скилл workflow-lite-test-review?
Post-execution test review and fix - chain from workflow-lite-execute or standalone. Reviews implementation against plan, runs tests, auto-fixes failures.
Как установить скилл workflow-lite-test-review?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл workflow-lite-test-review запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic