一键导入
vdt-loop
Assess, route, fix, and verify in a loop until tests pass. Demonstrates Pattern 5: Conditional + Loop.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Assess, route, fix, and verify in a loop until tests pass. Demonstrates Pattern 5: Conditional + Loop.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Brainstorm solutions with trade-off analysis and brutal honesty. Use for ideation, architecture decisions, technical debates, feature exploration, feasibility assessment, design discussions.
Implement features, plans, and fixes with structured workflow. Use for feature development, plan execution, code implementation pipelines.
Analyze codebase and manage project documentation. Use for doc initialization, updates, summaries, codebase analysis.
Fix bugs with single-agent reasoning loop. Demonstrates Pattern 1: Single Agent Architecture.
Git operations with conventional commits. Use for staging, committing, pushing, PRs, merges. Auto-splits commits by type/scope. Security scans for secrets.
Plan implementations, design architectures, create technical roadmaps with detailed phases. Use for feature planning, system design, solution architecture, implementation strategy, phase documentation.
| name | vdt:loop |
| description | Assess, route, fix, and verify in a loop until tests pass. Demonstrates Pattern 5: Conditional + Loop. |
| user-invocable | true |
| when_to_use | Invoke when tests are failing and need iterative fix-verify cycles. |
| category | utilities |
| keywords | ["conditional","loop","incident-response","self-healing","pattern-5"] |
| argument-hint | [issue description] |
| metadata | {"author":"vdt-demo","version":"1.0.0"} |
Iterative fix cycle: ASSESS → ROUTE → EXECUTE → VERIFY → LOOP (max 3 iterations).
/vdt:loop "Tests are failing. Fix until all tests pass."
Run the test suite and capture the failure:
npm test 2>&1
Parse the output: error type, file, line number, stack trace.
Classify the error and pick a fix strategy:
| Error Type | Strategy | Agent |
|---|---|---|
| Null/undefined reference | Add null check, early return | debugger |
| Type mismatch | Fix type casting or validation | debugger |
| Missing import/module | Add import statement | (self) |
| Logic error | Rewrite logic block | debugger |
| Test assertion wrong | Fix test expectation | tester |
| Config/env issue | Fix configuration | (self) |
Apply the fix based on the routed strategy:
Run test suite again:
npm test
🔍 ASSESS: npm test → "TypeError: Cannot read property 'email' of null"
🧠 ROUTE: Null reference → add null check strategy
🔧 EXECUTE: Add early return if user is null
🧪 VERIFY: npm test → ✅ All pass!
✅ DONE (1 iteration)
Or multi-iteration:
🔍 ASSESS: npm test → 2 failures
🧠 ROUTE: Null ref + missing validation
🔧 EXECUTE: Fix null check
🧪 VERIFY: npm test → 1 still failing
🔄 LOOP (iteration 2)
🔍 ASSESS: "ValidationError: email format invalid"
🧠 ROUTE: Validation error → fix input sanitization
🔧 EXECUTE: Add email validation
🧪 VERIFY: npm test → ✅ All pass!
✅ DONE (2 iterations)