Run a generator/evaluator build loop for implementation tasks with bounded iterations and scoring.
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-ecc-05b60c6d3ba9 ,按照其中的说明把「gan-build」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Parse the following from $ARGUMENTS:
brief — the user's one-line description of what to build--max-iterations N — (optional, default 15) maximum generator-evaluator cycles--pass-threshold N — (optional, default 7.0) weighted score to pass--skip-planner — (optional) skip planner, assume spec.md already exists--eval-mode MODE — (optional, default "playwright") one of: playwright, screenshot, code-onlyThis command orchestrates a three-agent build loop inspired by Anthropic's March 2026 harness design paper.
gan-harness/ directory in project rootgan-harness/feedback/, gan-harness/screenshots/Unless --skip-planner is set:
gan-planner agent via Task tool with the user's briefgan-harness/spec.md and gan-harness/eval-rubric.mditeration = 1
while iteration <= max_iterations:
# GENERATE
Launch gan-generator agent via Task tool:
- Read spec.md
- If iteration > 1: read feedback/feedback-{iteration-1}.md
- Build/improve the application
- Ensure dev server is running
- Commit changes
# Wait for generator to finish
# EVALUATE
Launch gan-evaluator agent via Task tool:
- Read eval-rubric.md and spec.md
- Test the live application (mode: playwright/screenshot/code-only)
- Score against rubric
- Write feedback to feedback/feedback-{iteration}.md
# Wait for evaluator to finish
# CHECK SCORE
Read feedback/feedback-{iteration}.md
Extract weighted total score
if score >= pass_threshold:
Log "PASSED at iteration {iteration} with score {score}"
Break
if iteration >= 3 and score has not improved in last 2 iterations:
Log "PLATEAU detected — stopping early"
Break
iteration += 1
iteration 1: 4.2 → iteration 2: 5.8 → ... → iteration N: 7.5## GAN Harness Build Report
**Brief:** [original prompt]
**Result:** PASS/FAIL
**Iterations:** N / max
**Final Score:** X.X / 10
### Score Progression
| Iter | Design | Originality | Craft | Functionality | Total |
|------|--------|-------------|-------|---------------|-------|
| 1 | ... | ... | ... | ... | X.X |
| 2 | ... | ... | ... | ... | X.X |
| N | ... | ... | ... | ... | X.X |
### Remaining Issues
- [Any issues from final evaluation]
### Files Created
- gan-harness/spec.md
- gan-harness/eval-rubric.md
- gan-harness/feedback/feedback-001.md through feedback-NNN.md
- gan-harness/generator-state.md
- gan-harness/build-report.md
Write the full report to gan-harness/build-report.md.