Install any skill in seconds. Free to start, no credit card required.
Get Started Free →반복적 디자인 품질 개선을 위한 빌더-평가자 GAN 루프 워크플로. 스프린트 컨트랙트 협상, 4차원 평가(디자인 품질·오리지널리티·완결성·기능성), 정체 감지, 에스컬레이션 프로토콜을 구현합니다. design.yaml에서 파라미터를 읽습니다.
.claude/skills/modu-ai-design-iteration-loop/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 253% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 109% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 84% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 137% | 0% |
> ⚠️ 개발 런타임 전용 — 이 스킬은 MoAI-ADK(Claude Code) 환경을 전제한다. Claude Cowork(Desktop)에서는 .moai/config 의존으로 동작하지 않을 수 있다. Desktop 사용자는 자체 체크리스트 기반 QC(예: moai-story:story-webtoon-qc 같은 자체 QC 경로)를 사용한다.
Implements the Builder-Evaluator GAN loop for iterative design quality improvement. Absorbed from the retired v2.x design constitution Section 11 and Section 12 (per the design constitution absorption policy). Integrates Sprint Contract Protocol, 4-dimension scoring, stagnation detection, and Evaluator Leniency Prevention.
All loop parameters are read from .moai/config/sections/design.yaml. Do not hardcode thresholds.
design.gan_loop:
max_iterations: 5 # Maximum Builder-Evaluator cycles
pass_threshold: 0.75 # Score >= this value to exit loop
escalation_after: 3 # Escalate to user after N iterations without passing
improvement_threshold: 0.05 # Minimum score delta per iteration
strict_mode: false # If true, each dimension must pass individually
sprint_contract:
enabled: true
required_harness_levels: [thorough]
optional_harness_levels: [standard]
artifact_dir: ".moai/sprints"
max_negotiation_rounds: 2| Dimension | Weight | Description | | --- | --- | --- | | Design Quality | 30% | Visual consistency, brand token compliance, WCAG AA | | Originality | 25% | Not generic, not AI-slop, unique brand expression | | Completeness | 25% | All BRIEF sections present, copy matches contract | | Functionality | 20% | Responsive, accessible, all interactions work |
Overall score = weighted average of all four dimensions.
Pass condition: overall_score >= pass_threshold AND (if strict_mode: true) each dimension score >= pass_threshold.
Phase 1: Sprint Contract (when required by harness level)
Required when harness_level == thorough. Optional when harness_level == standard and user opts in. Skipped when harness_level == minimal.
Sprint Contract generation:
acceptance_checklist: concrete, testable criteria for this iterationpriority_dimension: which of the 4 dimensions to focus ontest_scenarios: specific verification stepspass_conditions: minimum score per criterionmax_negotiation_rounds rounds)design.gan_loop.sprint_contract.artifact_dir/sprint-N.jsonConstraint: Evaluator must not score on criteria outside the Sprint Contract. Builder must not claim criteria as met without evidence.
Phase 2: Builder Execution
Builder implements based on:
design-copywritingdesign-brand-system or design-workflow (Path A handler)Builder outputs: code files, rendered previews (if Playwright available), implementation notes.
Phase 3: Evaluator Scoring
Evaluator scores against the 4 dimensions using the Evaluator Leniency Prevention mechanisms:
Output: evaluation-report-N.json in sprint_contract.artifact_dir.
Phase 4: Loop Decision
if overall_score >= pass_threshold:
EXIT LOOP → proceed to next phase
elif iteration >= max_iterations:
ESCALATE → present failure report to user
elif stagnation_detected:
ESCALATE → present stagnation options
else:
ITERATE → pass feedback to Builder, increment NPhase 5: Iteration Feedback
If looping back:
Stagnation is detected when the score improvement between consecutive iterations is below improvement_threshold for 2 or more iterations.
Tracking:
{iteration: N, score: X} in the sprint artifact.delta = score[N] - score[N-1].delta < improvement_threshold for the last 2 iterations, flag stagnation.When stagnation is detected, escalate to user via AskUserQuestion with three options:
The escalation trigger at escalation_after iterations applies independently: if 3 iterations pass without a PASS score, escalate regardless of stagnation state.
The following 5 mechanisms prevent score inflation and must be applied on every evaluation:
Mechanism 1: Rubric Anchoring
Score descriptions for each dimension:
Always state which rubric level applies and why before assigning a numeric score.
Mechanism 2: Must-Pass Firewall
The following conditions cause immediate FAIL regardless of other scores:
copy.json or BRIEF copy sectionMechanism 3: Anti-Pattern Penalty
Known anti-patterns that cap dimension score at 0.50:
alt attributes on non-decorative images (Functionality capped)Mechanism 4: Evidence Requirement
Each dimension score must cite specific evidence:
Mechanism 5: Regression Baseline
If a previous iteration passed a criterion, the current iteration must maintain that criterion. Regression from a previously passed criterion triggers an automatic score reduction in the relevant dimension.
Sprint Contract document format (sprint-N.json):
json{ "sprint_id": "sprint-N", "iteration": N, "priority_dimension": "Design Quality | Originality | Completeness | Functionality", "acceptance_checklist": [ { "id": "AC-01", "criterion": "Hero headline contrast ratio >= 4.5:1", "verification": "Check color pair with contrast calculator", "status": "pending | passed | failed" } ], "test_scenarios": [ { "id": "TS-01", "description": "Mobile viewport renders without horizontal scroll", "tool": "Playwright | visual inspection", "command": "playwright test --viewport 375x667" } ], "pass_conditions": { "Design Quality": 0.75, "Originality": 0.70, "Completeness": 0.80, "Functionality": 0.75 }, "negotiation_history": [], "created_at": "ISO-8601" }
When strict_mode: true in design.yaml:
pass_threshold.Every 5th project triggers an independent re-evaluation:
sprint_contract.artifact_dir/calibration-log.json.When claude-in-chrome MCP or Playwright is available, the Evaluator uses automated testing:
When testing tools are unavailable, fall back to static code analysis only, and note the limitation in the evaluation report.
design-brand-system: Provides design tokens that Evaluator validates in Design Quality dimensiondesign-copywriting: Copy JSON is the reference for Completeness dimensionmoai)의 sync-auditor가 함께 설치된 환경에서는 해당 agent로 평가를 보강할 수 있습니다.design-workflow: Extracted tokens (Path A) serve as the design reference baselineSource: Absorbed from the retired v2.x design constitution per the design constitution absorption policy (Section 11 GAN Loop Contract, Section 12 Evaluator Leniency Prevention). REQ coverage: (internal provenance omitted) Version: 0.1.0
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 32,323 | 26,496 | -18% | 1 | 1 | 0% | 4,798 | 7,139 | +49% | 0 | 0 | — |
case-02 | fail→fail | 30,727 | 25,249 | -18% | 1 | 1 | 0% | 4,549 | 5,999 | +32% | 0 | 0 | — |
case-03 | fail→fail | 37,029 | 7,928 | -79% | 1 | 1 | 0% | 5,726 | 3,150 | -45% | 0 | 0 | — |
case-04 | pass→pass | 16,655 | 15,600 | -6% | 1 | 1 | 0% | 2,034 | 4,327 | +113% | 0 | 0 | — |
case-05 | pass→pass | 21,691 | 22,370 | +3% | 1 | 1 | 0% | 2,761 | 5,638 | +104% | 0 | 0 | — |
case-06 | fail→pass | 11,203 | 6,085 | -46% | 1 | 1 | 0% | 959 | 3,389 | +253% | 0 | 0 | — |
case-07 | fail→pass | 14,097 | 10,108 | -28% | 1 | 1 | 0% | 1,732 | 3,620 | +109% | 0 | 0 | — |
case-08 | fail→pass | 17,791 | 6,821 | -62% | 1 | 1 | 0% | 2,055 | 3,791 | +84% | 0 | 0 | — |
case-09 | pass→pass | 12,972 | 10,796 | -17% | 1 | 1 | 0% | 1,147 | 3,537 | +208% | 0 | 0 | — |
case-10 | fail→pass | 15,129 | 6,926 | -54% | 1 | 1 | 0% | 1,586 | 3,762 | +137% | 0 | 0 | — |
case-11 | pass→pass | 15,235 | 9,006 | -41% | 1 | 1 | 0% | 1,786 | 3,230 | +81% | 0 | 0 | — |
case-12 | fail→pass | 16,323 | 7,735 | -53% | 1 | 1 | 0% | 1,785 | 2,992 | +68% | 0 | 0 | — |
case-13 | fail→pass | 15,371 | 2,184 | -86% | 1 | 1 | 0% | 1,608 | 2,918 | +81% | 0 | 0 | — |
case-14 | fail→pass | 12,125 | 10,367 | -14% | 1 | 1 | 0% | 1,365 | 3,732 | +173% | 0 | 0 | — |
case-15 | pass→pass | 3,378 | 6,383 | +89% | 1 | 1 | 0% | 656 | 3,749 | +471% | 0 | 0 | — |
case-16 | pass→pass | 3,688 | 4,730 | +28% | 1 | 1 | 0% | 745 | 3,489 | +368% | 0 | 0 | — |
case-17 | fail→pass | 11,737 | 8,611 | -27% | 1 | 1 | 0% | 1,164 | 3,219 | +177% | 0 | 0 | — |
case-18 | fail→pass | 14,369 | 10,252 | -29% | 1 | 1 | 0% | 1,558 | 3,456 | +122% | 0 | 0 | — |
case-19 | fail→pass | 17,227 | 6,038 | -65% | 1 | 1 | 0% | 1,842 | 3,539 | +92% | 0 | 0 | — |
case-20 | fail→pass | 15,231 | 7,321 | -52% | 1 | 1 | 0% | 1,667 | 2,895 | +74% | 0 | 0 | — |
case-21 | pass→pass | 16,871 | 12,721 | -25% | 1 | 1 | 0% | 1,919 | 3,993 | +108% | 0 | 0 | — |
case-22 | pass→pass | 12,217 | 13,843 | +13% | 1 | 1 | 0% | 1,845 | 3,420 | +85% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +55 percentage points is the difference between those two pass rates over the 21 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.