mcpField
H
harness-creator

harness-creator

github.com/fanlw0816Agent workflows1158 installsUpdated 29w ago
Repository

About harness-creator

harness-creator generates a customized Claude Code harness for new or existing projects. It analyzes project structure and domain templates, then creates a multi-agent setup that separates planning, implementation, and evaluation.

Key features

  1. 01Project structure and stack analysis
  2. 02Domain template detection
  3. 03Planner, Generator, and Evaluator roles
  4. 04Domain-specific specialist agents
  5. 05Sprint contracts and evaluation criteria
  6. 06Structured context handoffs

Use cases

  1. 01Set up a harness for a new project
  2. 02Configure agents for an existing codebase
  3. 03Define evaluable criteria before implementation
  4. 04Organize long-running agent tasks with handoffs

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/fanlw0816/harness-creator --skill harness-creator

After installing, type/harness-creatorin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

README.md
README_CN.md
docs/
fusion-architecture-design.md
references/base/core/agents/
evaluator.md
planner.md
generator.md
references/base/core/docs/
multi-agent-architecture.md
references/base/core/templates/
evaluation-report.md
sprint-contract.md
references/base/evaluator/docs/
evaluation-standards.md
references/base/evaluator/templates/
bug-report.md
evaluation-criteria.md
references/base/multi-project/agents/
api-gateway-manager.md
service-coordinator.md
references/base/multi-project/docs/
multi-project-coordination.md
references/base/multi-project/templates/
api-contract.md
service-registry.md
service-boundaries.md
references/base/progress/docs/
context-management.md
references/base/progress/hooks/
pre-compact.sh
session-start.sh
session-stop.sh
references/base/progress/templates/
active-session.md
handoff-artifact.md
checkpoint.md
references/base/safety/docs/
safety-standards.md
references/base/safety/hooks/
secret-detection.sh
validate-push.sh
references/base/settings/
settings.base.json
references/brainstorm/
phase-2-vision.md

Details

From the project README

Harness Creator

Generate a customized Claude Code harness framework for your project with Fusion Architecture: GAN-inspired multi-agent system + Domain Specialists.

Quick Start

/harness-creator [target-dir]
  • With argument: Use specified directory
  • Without argument: Ask for target directory
  • New project (0→1): Full brainstorm flow
  • Existing project (1→N): Auto-analyze and quick setup

Fusion Architecture

Core Pattern: GAN-Inspired Multi-Agent
┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│   Planner   │ ──► │  Generator  │ ──► │  Evaluator  │
│  (Plans)    │     │ (Implements)│     │  (Grades)   │
└─────────────┘     └──────┬──────┘     └─────────────┘
                           │
                    spawns specialists
                           │
              ┌────────────┼────────────┐
              ▼            ▼            ▼
        ┌──────────┐ ┌──────────┐ ┌──────────┐
        │ frontend │ │   api    │ │ database │
        │   -dev   │ │   -dev   │ │   -dev   │
        └──────────┘ └──────────┘ └──────────┘

Why separate agents? Models cannot reliably evaluate their own work. They praise mediocre output and skip edge cases. Separation enables objective quality assessment.

Three Layers
LayerAgentsResponsibility
DecisionPlanner, architect-leadProduct & Architecture decisions
ExecutionGenerator, [domain]-devImplement features
EvaluationEvaluatorTest and grade implementation
Key Components
ComponentPurpose
Sprint ContractNegotiate "done" criteria before implementation
Domain SpecialistsSpecialized implementation agents per domain
Evaluation CriteriaConvert subjective judgments to gradable standards
Context ResetStructured handoffs for long-running tasks

Workflow

1. Parse Arguments
  • Validate target path
  • Ask user if not provided:
    Where should I generate the harness?
    A) Current directory: .
    B) Specify path: [input]
    C) Create new project: [name]
    
2. Analyze Target Directory

Auto-detect:

  • Project type: package.json → Node.js, pyproject.toml → Python
  • Architecture: services/ → microservices, apps/ + packages/ → monorepo
  • Tech stack: Read dependencies from config files
  • Module boundaries: Detect src/, apps/, packages/
  • Domain type: Match against domain templates

Generate analysis report → User confirms or adjusts

3. Domain Detection (NEW in v2.0)
Analyze project structure
        │
        ▼
┌─────────────────────────────────────┐
│ Match against domain templates:     │
│                                     │
│ • web-development   (frontend+api+db)│
│ • game-development  (gameplay+gfx+audio)│
│ • data-science      (ml+data+analysis)│
│ • mobile-app        (ios+android)│
│ • ...                               │
└─────────────────────────────────────┘
        │
        ├─────────────┬─────────────┐
        ▼             ▼             ▼
   Matchfound    No match      User specifies
        │             │             │
        ▼             ▼             ▼
   Use template   Dynamic gen   Custom config
4. Specialist Selection
检测到项目类型: Game Development (Unity)

推荐的配置:

核心 Agents (固定):
  Planner        - 产品规划
  Generator      - 协调执行 (+Agent工具)
  Evaluator      - 评估实现
  architect-lead - 架构决策

Specialists (可调整):
  [√] gameplay-dev    游戏逻辑、机制、AI
  [√] graphics-dev    渲染、shader、特效
  [√] audio-dev       音效、音乐系统
  [ ] physics-dev     物理模拟、碰撞检测
  [√] ui-dev          游戏UI、HUD、菜单

操作:
  A) 直接使用推荐
  B) 调整选择
  C) 添加自定义 specialist
  D) 查看详情
5. Generate Harness (Parallel Execution)

Use subagents to generate components in parallel for speed:

User confirms generation│
        ├─► Subagent 1: Core agents (planner, generator, evaluator, architect-lead)
        │
        ├─► Subagent 2: Domain specialists (from template or dynamic)
        │
        ├─► Subagent 3: Evaluation system (skills, templates, docs)
        │
        ├─► Subagent 4: Progress system (skills, hooks, templates)
        │
        ├─► Subagent 5: Safety system (hooks, rules, docs)
        │
        ├─► Subagent 6: Domain-specific skills and rules
        │
        └─► Main thread: Integrate results + generate settings.json
6. Post-Generation Guidance
✅ Harness generated at [target-dir]/.claude/

Next steps:
1. cd [target-dir]
2. claude
3. Run /start

Domain Template System

Template Location
domain-templates/
├── web-development/      # Web应用模板│   ├── template.yaml
│   └── specialists/
│       ├── frontend-dev.yaml
│       ├── api-dev.yaml
│       ├── database-dev.yaml
│       └── devops-dev.yaml
│
├── game-development/     # 游戏开发模板
│   ├── template.yaml
│   └── specialists/
│       ├── gameplay-dev.yaml
│       ├── graphics-dev.yaml
│       ├── audio-dev.yaml
│       └── ui-dev.yaml
│
├── data-science/         # 数据科学模板│   └── ...
│
└── _dynamic/             # 动态生成│   ├── specialist-template.yaml
    └── detection-rules.yaml
Template Structure (template.yaml)
template:
  name: game-development
  version: 1.0.0
  
  # Detection rules
  detection:
    files: ["*.unity", "*.gd"]
    directories: ["Assets/", "Scripts/"]
    keywords: ["game", "unity"]
  
  # Core agents (fixed)
  core_agents:
    - planner
    - generator
    - evaluator
    - architect-lead
  
  # Domain specialists
  specialists:
    - name: gameplay-dev
      source: ./specialists/gameplay-dev.yaml
    - name: graphics-dev
      source: ./specialists/graphics-dev.yaml
Specialist Definition
name: gameplay-dev
description: "Specialist for gameplay logic"

delegation:
  mode: spawned_by_generator
  contract_required: true

domain_scope:
  directories:
    - "Scripts/Gameplay/"
    - "Scripts/AI/"responsibilities:
  - Implement game mechanics
  - Create state machines
  - Implement AI behavior

anti_patterns:
  - "Don't put rendering code in gameplay scripts"

Generated Harness Structure

<target-dir>/
├── .claude/
│   ├── settings.json
│   ├── agents/
│   │   ├── planner.md
│   │   ├── generator.md          # + Agent 工具
│   │   ├── evaluator.md
│   │   ├── architect-lead.md
│   │   └── [domain]-dev.md        # 领域 specialist
│   ├── skills/
│   │   ├── start/
│   │   ├── checkpoint/
│   │   ├── resume/
│   │   ├── sprint-contract/
│   │   └── [domain-specific]/     # 领域特定 skills
│   ├── hooks/
│   ├── rules/
│   ├── evaluation/
│   └── docs/
├── production/
│   ├── session-state/
│   └── session-logs/
└── CLAUDE.md

Key Principles

  1. Generator-Evaluator Separation: Never the same agent
  2. Sprint Contract First: Negotiate "done" before building
  3. Domain Specialists: Delegated by Generator, specialized implementation
  4. Context Reset: Use handoff artifacts for long tasks
  5. Concrete Criteria: Convert subjective to gradable

Reference

Design based on Anthropic: Harness Design for Long-Running Apps

Comments

Markdown supported