What is gan-style-harness?
受GAN启发的生成器-评估器代理框架,用于自主构建高质量应用。基于Anthropic 2026年3月的框架设计论文。
affaan-m/ECC
受GAN启发的生成器-评估器代理框架,用于自主构建高质量应用。基于Anthropic 2026年3月的框架设计论文。
npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/gan-style-harness"Quick start
Install it or open the source, trigger it with a clear task, then follow the source workflow.
npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/gan-style-harness"Use gan-style-harness to help me with: [describe your task]. Before you begin, tell me what input you need, the steps you will follow, and the expected output.
No structured workflow was detected; follow the original SKILL.md below.
Continue to the workflowDirect answers
受GAN启发的生成器-评估器代理框架,用于自主构建高质量应用。基于Anthropic 2026年3月的框架设计论文。
It is relevant to workflows involving Engineering, Design.
SkillSignal detected this source-specific command: npx skills add https://github.com/affaan-m/ECC --skill "docs/zh-CN/skills/gan-style-harness". Inspect the repository and command before running it.
claude code
Static analysis detected network signals. Review the cited source lines before installing; these signals are not a security audit.
This page combines upstream documentation with deterministic repository, quality, and static-risk signals. It is not described as a manual test or security review.
SkillSignal brief
受GAN启发的生成器-评估器代理框架,用于自主构建高质量应用。基于Anthropic 2026年3月的框架设计论文。
Useful in these contexts
Core capabilities
Quality breakdown
Based on traceable docs and repository signals; stars are not treated as quality.
Compare before choosing
These links are selected from shared tasks, functions, stacks, platforms, and same-name variants. Compare the source owner, documentation, permissions, and maintenance signals.
GAN-inspired Generator-Evaluator agent harness for building high-quality applications autonomously. Based on Anthropic's March 2026 harness design paper.
Patterns and architectures for autonomous Claude Code loops — from simple sequential pipelines to RFC-driven multi-agent DAG systems.
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.
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
GUI control for macOS apps via mediar-ai's mcp-server-macos-use. Click, type, scroll, key-press, open apps — driven by accessibility tree, works in non-interactive Claude Code mode. Use this for any Sutando task that needs to drive another macOS application (Safari, Zoom, Mail, Finder, etc.).
灵感来源于 Anthropic 的长时间运行应用开发编排设计(2026年3月24日)
一种多智能体编排,将生成与评估分离,形成对抗性反馈循环,推动质量远超单个智能体所能达到的水平。
当要求评估自身工作时,智能体是病态的乐观主义者——它们会赞美平庸的输出,并说服自己忽略真正的问题。但设计一个独立的评估器并使其极度严格,远比教会生成器自我批评要容易得多。
这与 GAN(生成对抗网络)的机制相同:生成器负责产出,评估器负责批评,这种反馈驱动下一轮迭代。
claude -p) ┌─────────────┐
│ 规划器 │
│ (Opus 4.6) │
└──────┬──────┘
│ 产品规格
│ (功能、冲刺、设计方向)
▼
┌────────────────────────┐
│ │
│ 生成器-评估器 │
│ 反馈循环 │
│ │
│ ┌──────────┐ │
│ │ 生成器 │--构建-->│──┐
│ │(Opus 4.6)│ │ │
│ └────▲─────┘ │ │
│ │ │ │ 实时应用
│ 反馈 │ │
│ │ │ │
│ ┌────┴─────┐ │ │
│ │ 评估器 │<-测试---│──┘
│ │(Opus 4.6)│ │
│ │+Playwright│ │
│ └──────────┘ │
│ │
│ 5-15 次迭代 │
└────────────────────────┘
角色: 产品经理——将简短的提示扩展为完整的产品规格。
关键行为:
模型: Opus 4.6(需要深度推理进行规格扩展)
角色: 开发者——根据规格实现功能。
关键行为:
模型: Opus 4.6(需要强大的编码能力)
角色: QA 工程师——测试实时运行的应用,而不仅仅是代码。
关键行为:
模型: Opus 4.6(需要强大的判断力 + 工具使用能力)
默认四个标准,每个评分 1-10:
## 评估标准
### 设计质量(权重:0.3)
- 1-3分:模板化、千篇一律的"AI生成"美学
- 4-6分:合格但平庸,遵循常规设计
- 7-8分:独特且连贯的视觉识别
- 9-10分:可媲美专业设计师作品
### 原创性(权重:0.2)
- 1-3分:默认配色、模板布局,缺乏个性
- 4-6分:部分自定义选择,整体仍属常规模式
- 7-8分:清晰的创意构思,独特的设计手法
- 9-10分:令人惊喜、愉悦,真正新颖
### 工艺水平(权重:0.3)
- 1-3分:布局错乱,状态缺失,无动画效果
- 4-6分:功能可用但粗糙,间距不统一
- 7-8分:精致流畅,过渡平滑,响应式设计
- 9-10分:像素级完美,令人愉悦的微交互
### 功能性(权重:0.2)
- 1-3分:核心功能损坏或缺失
- 4-6分:主流程可用,边缘情况处理失败
- 7-8分:所有功能正常,错误处理良好
- 9-10分:无懈可击,覆盖所有边缘情况
# 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
编排应随模型改进而简化。遵循 Anthropic 的演进路径:
关键原则: 编排的每个组件都编码了一个关于模型无法独立完成什么的假设。当模型改进时,重新测试这些假设。剥离不再需要的部分。
| 变量 | 默认值 | 描述 |
|---|---|---|
GAN_MAX_ITERATIONS | 15 | 最大生成器-评估器循环次数 |
GAN_PASS_THRESHOLD | 7.0 | 通过所需的加权分数(1-10) |
GAN_PLANNER_MODEL | opus | 规划智能体的模型 |
GAN_GENERATOR_MODEL | opus | 生成器智能体的模型 |
GAN_EVALUATOR_MODEL | opus | 评估器智能体的模型 |
GAN_EVAL_CRITERIA | design,originality,craft,functionality | 逗号分隔的标准 |
GAN_DEV_SERVER_PORT | 3000 | 实时应用的端口 |
GAN_DEV_SERVER_CMD | npm run dev | 启动开发服务器的命令 |
GAN_PROJECT_DIR | . | 项目工作目录 |
GAN_SKIP_PLANNER | false | 跳过规划器,直接使用规格 |
GAN_EVAL_MODE | playwright | playwright、screenshot 或 code-only |
| 模式 | 工具 | 最适合 |
|---|---|---|
playwright | 浏览器 MCP + 实时交互 | 带 UI 的全栈应用 |
screenshot | 截图 + 视觉分析 | 静态网站、纯设计 |
code-only | 测试 + 代码检查 + 构建 | API、库、CLI 工具 |
评估器过于宽松——如果评估器在第一次迭代就通过所有内容,你的评分标准过于慷慨。收紧评分标准,并为常见的 AI 模式添加明确惩罚。
生成器忽略反馈——确保反馈以文件形式传递,而非内联。生成器应在每次迭代开始时读取 feedback-NNN.md。
无限循环——始终设置 GAN_MAX_ITERATIONS。如果生成器在 3 次迭代后无法突破分数平台,停止并标记为人工审查。
评估器测试流于表面——评估器必须使用 Playwright 交互实时应用,而不仅仅是截图。点击按钮、填写表单、测试错误状态。
评估器赞美自己的修复——绝不允许评估器建议修复后再评估这些修复。评估器只负责批评;生成器负责修复。
上下文耗尽——对于长时间会话,使用 Claude Agent SDK 的自动压缩或在主要阶段之间重置上下文。
基于 Anthropic 已发布的结果:
| 指标 | 单智能体 | GAN 编排 | 改进 |
|---|---|---|---|
| 时间 | 20 分钟 | 4-6 小时 | 12-18 倍更长 |
| 成本 | 9 美元 | 125-200 美元 | 14-22 倍更多 |
| 质量 | 勉强可用 | 生产就绪 | 质变 |
| 核心功能 | 有缺陷 | 全部工作 | 不适用 |
| 设计 | 通用 AI 垃圾 | 独特、精致 | 不适用 |
权衡很明确: 约 20 倍的时间和成本,换来输出质量的质的飞跃。这适用于质量至关重要的项目。