evgeniy-mikhailove/rlm-claude-code-os/loop-build

Claude Code and agent skill by evgeniy-mikhailove/rlm-claude-code-os

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

Self-correcting build loop: spec -> build -> adversarial review -> fix -> repeat until review passes clean. Combines spec-driven-development with adversarial verification in an automated cycle. Threshold: 95%.

Install

npx vskill@latest install evgeniy-mikhailove/rlm-claude-code-os/loop-build

SKILL.md

The same SKILL.md was published earlier as evgeniy-mikhailove/rlm-claude-code-os/loop-build.

Loop Build - Self-Correcting Build Cycle

Inspired by: MAMA MOZG "Petlya" methodology, adapted for adversarial multi-agent architecture.

Core Idea

Build from spec, review against spec with a SEPARATE agent (blind review), fix failures, repeat. Stop when review passes clean or diminishing returns detected.

When to Use

  • Building features from a spec (spec-driven-development output)
  • Any build task with >3 requirements to verify
  • Multi-file implementations where drift is likely
  • When you want to "fire and forget" - launch and get clean result

Skip for: single-file fixes, typos, config changes, tasks under 10 min.

Prerequisites

A spec file must exist at specs/<name>.md (created by spec-driven-development or manually). If no spec exists, prompt user to run /spec-driven-development first or provide requirements inline.

The Loop Protocol

PHASE 1: BUILD
Read specs/<name>.md
Build exactly what it describes
Output: checklist of covered requirements
PHASE 2: REVIEW (adversarial, separate agent)
Spawn review agent with ONLY:
- The spec file
- The current code/output
- NO access to build reasoning
Review agent checks requirement-by-requirement
Output: PASS (all met) or FAIL (list of gaps with spec item references)
PHASE 3: FIX (if FAIL)
Read review agent's gap list
Fix each gap, referencing specific spec item
Return to PHASE 2
STOP CONDITIONS (any triggers exit):
- Review returns PASS (all requirements met)
- Score >= 95% of spec items satisfied AND remaining are cosmetic
- 5 iterations reached (hard cap - report what's left)
- Score delta < 3% between iterations (diminishing returns)

Implementation

Step 1: Read Spec
spec_file = specs/<name>.md
Parse into discrete, checkable requirements
Number each requirement: R1, R2, R3...
Step 2: Build
Build strictly from spec.
NO features beyond spec.
NO refactoring of unrelated code.
After build, self-report:
COVERED: R1, R2, R3, R5
SKIPPED: R4 (reason)
ADDED: nothing (if anything added - flag as scope creep)
Step 3: Adversarial Review (SEPARATE AGENT)
Spawn Agent with:
description: "Blind spec review - iteration N"
prompt: |
You are a strict QA reviewer. You have never seen the build reasoning.
SPEC (source of truth):
<paste spec content>
CURRENT BUILD (what to review):
<paste code/files/output>
For each requirement in the spec:
1. State the requirement (quote it)
2. Check if the build satisfies it: PASS / PARTIAL / FAIL
3. If not PASS: describe exactly what's missing or wrong
Final verdict:
- SCORE: X/Y requirements passed (percentage)
- VERDICT: PASS (all met) or FAIL (list gaps)
- FIXES NEEDED: numbered list of specific changes
Step 4: Fix or Finish
IF verdict == PASS or score >= 95%:
Report to user:
LOOP COMPLETE after N iterations
Score trajectory: 60% -> 80% -> 95%
Final state: <summary>
IF verdict == FAIL and iterations < 5:
Apply fixes from review
Go to Step 3
IF iterations == 5:
Report to user:
LOOP STOPPED at iteration 5
Current score: X%
Remaining gaps: <list>
Recommendation: manual review needed for <specific items>

Output Format

After loop completion, always report:

LOOP-BUILD COMPLETE
Spec: specs/<name>.md
Iterations: N/5
Score trajectory: X% -> Y% -> Z%
Final score: Z%
Status: PASSED / STOPPED (max iterations) / STOPPED (diminishing returns)
Gaps remaining: none / <list>

Integration Points

SkillHow it connects
spec-driven-developmentProduces the spec that loop-build consumes
code-reviewReview agent uses code-review checklist as additional layer
doubt-driven-developmentApplied inside review agent for architectural decisions
verification-before-completionFinal check after loop exits
test-driven-developmentTests serve as additional PASS/FAIL signal in the loop

Anti-Patterns

  • Don't self-review: always use a SEPARATE agent for review. Self-review has confirmation bias.
  • Don't exceed spec: if build adds features not in spec, that's a FAIL even if the feature is good.
  • Don't skip diminishing returns check: if score goes 92% -> 93% -> 93%, stop. The last 2% isn't worth another iteration.
  • Don't run on trivial tasks: the overhead of 2-5 iterations is only justified for substantial builds.

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/evgeniy-mikhailove/rlm-claude-code-os/loop-build/badge)](https://verified-skill.com/skills/evgeniy-mikhailove/rlm-claude-code-os/loop-build)

Something wrong with this skill or its page? Tell us.