Best for
- Building complete applications from a one-line prompt
- Frontend design tasks requiring high visual quality
- Full-stack projects that need working features, not just code
affaan-m/ECC/skills/gan-style-harness/SKILL.md
GAN-inspired Generator-Evaluator agent harness for building high-quality applications autonomously. Based on Anthropic's March 2026 harness design paper.
Decision brief
Inspired by Anthropic's Harness Design for Long-Running Application Development (March 24, 2026)
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Declared | Source record | Install path and trigger |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/affaan-m/ECC --skill "skills/gan-style-harness"Inspect the Agent Skill "gan-style-harness" from https://github.com/affaan-m/ECC/blob/4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38/skills/gan-style-harness/SKILL.md at commit 4e973d3eaf92d97f8d2e2d8abb39d8bdc8711b38. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Review the “Usage” section in the pinned source before continuing.
./scripts/gan-harness.sh "Build a music streaming dashboard"
claude -p --model opus "You are a Product Planner. Read PLANNERPROMPT.md. Expand this brief into a full product spec: 'Build a Kanban board app'. Write spec to spec.md"
claude -p --model opus "You are a Generator. Read spec.md. Implement Sprint 1. Start the dev server on port 3000."
claude -p --model opus --allowedTools "Read,Bash,mcpplaywright" "You are an Evaluator. Read EVALUATORPROMPT.md. Test the live app at http://localhost:3000. Score against the rubric. Write feedback to feedback-001.md"
Permission review
The documentation includes network, browsing, or remote request actions.
claude -p --model opus --allowedTools "Read,Bash,mcp__playwright__*" "You are an Evaluator. Read EVALUATOR_PROMPT.md. Test the live app at http://localhost:3000. Score against the rubric. Write feedback to feedback-001.md"The documentation asks the agent to run terminal commands or scripts.
| `GAN_DEV_SERVER_CMD` | `npm run dev` | Command to start dev server |Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 92/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 234,327 | Source | Repository attention, not individual Skill quality |
| Compatibility | 1 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Inspired by Anthropic's Harness Design for Long-Running Application Development (March 24, 2026)
A multi-agent harness that separates generation from evaluation, creating an adversarial feedback loop that drives quality far beyond what a single agent can achieve.
When asked to evaluate their own work, agents are pathological optimists — they praise mediocre output and talk themselves out of legitimate issues. But engineering a separate evaluator to be ruthlessly strict is far more tractable than teaching a generator to self-critique.
This is the same dynamic as GANs (Generative Adversarial Networks): the Generator produces, the Evaluator critiques, and that feedback drives the next iteration.
claude -p) ┌─────────────┐
│ PLANNER │
│ (Opus 4.6) │
└──────┬──────┘
│ Product Spec
│ (features, sprints, design direction)
▼
┌────────────────────────┐
│ │
│ GENERATOR-EVALUATOR │
│ FEEDBACK LOOP │
│ │
│ ┌──────────┐ │
│ │GENERATOR │--build-->│──┐
│ │(Opus 4.6)│ │ │
│ └────▲─────┘ │ │
│ │ │ │ live app
│ feedback │ │
│ │ │ │
│ ┌────┴─────┐ │ │
│ │EVALUATOR │<-test----│──┘
│ │(Opus 4.6)│ │
│ │+Playwright│ │
│ └──────────┘ │
│ │
│ 5-15 iterations │
└────────────────────────┘
Role: Product manager — expands a brief prompt into a full product specification.
Key behaviors:
Model: Opus 4.6 (needs deep reasoning for spec expansion)
Role: Developer — implements features according to the spec.
Key behaviors:
Model: Opus 4.6 (needs strong coding capability)
Role: QA engineer — tests the live running application, not just code.
Key behaviors:
Model: Opus 4.6 (needs strong judgment + tool use)
The default four criteria, each scored 1-10:
## Evaluation Rubric
### Design Quality (weight: 0.3)
- 1-3: Generic, template-like, "AI slop" aesthetics
- 4-6: Competent but unremarkable, follows conventions
- 7-8: Distinctive, cohesive visual identity
- 9-10: Could pass for a professional designer's work
### Originality (weight: 0.2)
- 1-3: Default colors, stock layouts, no personality
- 4-6: Some custom choices, mostly standard patterns
- 7-8: Clear creative vision, unique approach
- 9-10: Surprising, delightful, genuinely novel
### Craft (weight: 0.3)
- 1-3: Broken layouts, missing states, no animations
- 4-6: Works but feels rough, inconsistent spacing
- 7-8: Polished, smooth transitions, responsive
- 9-10: Pixel-perfect, delightful micro-interactions
### Functionality (weight: 0.2)
- 1-3: Core features broken or missing
- 4-6: Happy path works, edge cases fail
- 7-8: All features work, good error handling
- 9-10: Bulletproof, handles every edge case
# Full three-agent harness
/project:gan-build "Build a project management app with Kanban boards, team collaboration, and dark mode"
# With custom config
/project:gan-build "Build a recipe sharing platform" --max-iterations 10 --pass-threshold 7.5
# Frontend design mode (generator + evaluator only, no planner)
/project:gan-design "Create a landing page for a crypto portfolio tracker"
# Basic usage
./scripts/gan-harness.sh "Build a music streaming dashboard"
# With options
GAN_MAX_ITERATIONS=10 \
GAN_PASS_THRESHOLD=7.5 \
GAN_EVAL_CRITERIA="functionality,performance,security" \
./scripts/gan-harness.sh "Build a REST API for task management"
# Step 1: Plan
claude -p --model opus "You are a Product Planner. Read PLANNER_PROMPT.md. Expand this brief into a full product spec: 'Build a Kanban board app'. Write spec to spec.md"
# Step 2: Generate (iteration 1)
claude -p --model opus "You are a Generator. Read spec.md. Implement Sprint 1. Start the dev server on port 3000."
# Step 3: Evaluate (iteration 1)
claude -p --model opus --allowedTools "Read,Bash,mcp__playwright__*" "You are an Evaluator. Read EVALUATOR_PROMPT.md. Test the live app at http://localhost:3000. Score against the rubric. Write feedback to feedback-001.md"
# Step 4: Generate (iteration 2 — reads feedback)
claude -p --model opus "You are a Generator. Read spec.md and feedback-001.md. Address all issues. Improve the scores."
# Repeat steps 3-4 until pass threshold met
The harness should simplify as models improve. Following Anthropic's evolution:
Key principle: Every harness component encodes an assumption about what the model can't do alone. When models improve, re-test those assumptions. Strip away what's no longer needed.
| Variable | Default | Description |
|---|---|---|
GAN_MAX_ITERATIONS | 15 | Maximum generator-evaluator cycles |
GAN_PASS_THRESHOLD | 7.0 | Weighted score to pass (1-10) |
GAN_PLANNER_MODEL | opus | Model for planning agent |
GAN_GENERATOR_MODEL | opus | Model for generator agent |
GAN_EVALUATOR_MODEL | opus | Model for evaluator agent |
GAN_EVAL_CRITERIA | design,originality,craft,functionality | Comma-separated criteria |
GAN_DEV_SERVER_PORT | 3000 | Port for the live app |
GAN_DEV_SERVER_CMD | npm run dev | Command to start dev server |
GAN_PROJECT_DIR | . | Project working directory |
GAN_SKIP_PLANNER | false | Skip planner, use spec directly |
GAN_EVAL_MODE | playwright | playwright, screenshot, or code-only |
| Mode | Tools | Best For |
|---|---|---|
playwright | Browser MCP + live interaction | Full-stack apps with UI |
screenshot | Screenshot + visual analysis | Static sites, design-only |
code-only | Tests + linting + build | APIs, libraries, CLI tools |
Evaluator too lenient — If the evaluator passes everything on iteration 1, your rubric is too generous. Tighten scoring criteria and add explicit penalties for common AI patterns.
Generator ignoring feedback — Ensure feedback is passed as a file, not inline. The generator should read feedback-NNN.md at the start of each iteration.
Infinite loops — Always set GAN_MAX_ITERATIONS. If the generator can't improve past a score plateau after 3 iterations, stop and flag for human review.
Evaluator testing superficially — The evaluator must use Playwright to interact with the live app, not just screenshot it. Click buttons, fill forms, test error states.
Evaluator praising its own fixes — Never let the evaluator suggest fixes and then evaluate those fixes. The evaluator only critiques; the generator fixes.
Context exhaustion — For long sessions, use Claude Agent SDK's automatic compaction or reset context between major phases.
Based on Anthropic's published results:
| Metric | Solo Agent | GAN Harness | Improvement |
|---|---|---|---|
| Time | 20 min | 4-6 hours | 12-18x longer |
| Cost | $9 | $125-200 | 14-22x more |
| Quality | Barely functional | Production-ready | Phase change |
| Core features | Broken | All working | N/A |
| Design | Generic AI slop | Distinctive, polished | N/A |
The tradeoff is clear: ~20x more time and cost for a qualitative leap in output quality. This is for projects where quality matters.
Alternatives
affaan-m/ECC
Use it for engineering and design tasks; the detail page covers purpose, installation, and practical steps.
affaan-m/ECC
Patterns and architectures for autonomous Claude Code loops — from simple sequential pipelines to RFC-driven multi-agent DAG systems.
affaan-m/ECC
Garbage collection for your Claude Code configuration. Periodically scans ~/.claude (skills, memory, hooks, permissions, MCP servers, caches) for redundant, stale, orphaned, or low-value items, then walks the user through a confirm-each-deletion cleanup. Use when the user says "clean up my config", "config GC", "too many skills", "audit my setup", "my .claude is bloated", or asks for a periodic config review.
nexu-io/open-design
Create video compositions, animations, title cards, overlays, captions, voiceovers, audio-reactive visuals, and scene transitions in HyperFrames HTML. Use when asked to build any HTML-based video content, add captions or subtitles synced to audio, generate text-to-speech narration, create audio-reactive animation (beat sync, glow, pulse driven by music), add animated text highlighting (marker sweeps, hand-drawn circles, burst lines, scribble, sketchout), or add transitions between scenes (crossf