Harness Design logo

Harness Design

Community
AnastasiyaW
harness-design

Design a scoped multi-agent harness for a requested long-running AI workflow. Preserve the user-approved product boundary while using Generator-Evaluator separation, testable sprint contracts, context management, and task-appropriate validation. Based on Anthropic Engineering patterns. Use when: "build a harness", "multi-agent architecture", "agent orchestration", "generator-evaluator", "long-running app", "harness design", "agent pipeline", "quality evaluation loop", "sprint contract", "build app with agents", "Claude Agent SDK architecture", or when building complex full-stack apps that need planning → generation → evaluation cycles. Also use when discussing context degradation, self-evaluation bias, or assumption testing in AI workflows. Do NOT use to stress-test or critique an already-written plan document; use plan-swarm-review for that (this skill designs the harness, it does not review plans).

Overview

PublisherAnastasiyaW
Repositorycodex-claude-code-config
Skill nameharness-design
Stars
212
Forks
32
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by AnastasiyaW on GitHub. Read the source before you install it.

Installation

Install the Harness Design AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/architecture/harness-design
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnastasiyaW/codex-claude-code-config.git /tmp/codex-claude-code-config
mkdir -p .claude/skills
cp -r /tmp/codex-claude-code-config/skills/architecture/harness-design .claude/skills/harness-design
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Harness Design in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Harness Design on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Harness Design is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Multi-Agent Harness Design

Источники:

  • Anthropic Engineering — "Harness design for long-running apps"
  • OpenClaw-RL paper (arxiv 2603.10165) — personal agent verification
  • DenisSergeevitch/repo-task-proof-loop — execution protocol with durable proof

См. также: references/proof-loop-research.md — детали paper + repo mapping

Когда нужен harness, а когда хватит solo agent

СигналSolo agentHarness
ScopeОдна фича, bug fix, refactorFull-stack app, multi-feature product
ДлительностьBounded work with direct evidenceWork that needs durable state, resumes, or independent evaluation
КачествоBaseline достаточноНужен polish, originality, craft
СтоимостьВ рамках явного бюджета задачиБюджет и stop condition фиксируются для этой задачи
ПроверкаПрямой task-appropriate proofНезависимая проверка и runtime proof, если требуются контрактом

Правило: Evaluator оправдан когда задача за пределами reliable solo performance. Не фиксированное yes/no — зависит от complexity tier.


Архитектура: Three-Agent System

1. Planner (Планировщик)

  • Превращает запрос пользователя в детальную, проверяемую спецификацию
  • Сохраняет утверждённый scope, явные non-goals и существующие границы продукта
  • Не добавляет AI-фичи, миграции стека или новые deliverables без запроса пользователя либо подтверждённой причинной необходимости
  • НЕ over-specify реализацию — только what, не how
  • Если AI-фичи уже входят в утверждённый scope, вписывает их в продукт органично

2. Generator (Генератор)

  • Реализует фичи итеративно
  • Включает self-evaluation перед handoff (но она ненадёжна — см. ниже)
  • Работает в рамках Sprint Contract

3. Evaluator (Оценщик)

  • Независимый от генератора — отдельный контекст, отдельный промпт
  • Выбирает проверку по acceptance contract: unit/integration/runtime probe для сервисов, browser/UI проверку только для затронутого пользовательского пути
  • Откалиброван через few-shot примеры
  • Ловит то, что self-evaluation пропускает

Sprint Contract Pattern

Перед каждой итерацией:

1. Planner определяет фичу и user story
2. Generator и Evaluator ДОГОВАРИВАЮТСЯ о:
   - Что значит "done" для этой фичи
   - Конкретные testable success criteria
   - Что НЕ входит в scope
3. Generator реализует
4. Evaluator валидирует по контракту
5. Если конкретный критерий не пройден → конкретный feedback → повтор с п.3 только для этого критерия

Контракт = мост между user stories и implementation. Без него evaluator судит по своим критериям, generator не знает что проверять.

Останавливай цикл, когда все утверждённые criteria имеют требуемое доказательство. Не назначай число раундов заранее; продолжай только при наблюдаемом незакрытом критерии или новом опровергающем evidence.


Generator-Evaluator: Почему раздельно

Self-evaluation bias

Модели уверенно хвалят свою работу — даже когда качество посредственное. Это не баг модели, а свойство: генератор оптимизирован на producing, не на judging.

Решение: Independent evaluator

  • Другой system prompt с calibrated skepticism
  • Few-shot примеры с детальными score breakdowns
  • Проверяет исполнимую поверхность acceptance contract: browser только для затронутого UI journey; native/API/worker задачи — их unit, integration, CLI или runtime probe, а не browser по умолчанию
  • Конкретные failure criteria, а не общие "looks good"

Калибровка оценщика (QA Tuning Loop)

1. Evaluator выдаёт оценку
2. Ты проверяешь: согласен ли с оценкой?
3. Расхождение → обновляешь QA промпт
4. Типичные проблемы:
   - Superficial testing, пропускает edge cases
   - Premature approval посредственной работы
   - Слишком строгие критерии → бесконечные итерации
5. Повторяешь пока evaluator judgment ≈ твой judgment

Quality Criteria Framework (для фронтенда)

4 измерения, каждое 0-10:

1. Design Quality — Целостность

Дизайн ощущается как единое целое, а не коллекция частей?

  • Интеграция color, typography, layout, imagery
  • Consistent visual language

2. Originality — Уникальность

Штраф за:

  • Template layouts, library defaults
  • AI slop patterns: purple gradients over white cards
  • "Telltale signs of AI generation"
  • Cookie-cutter структуры

3. Craft — Техническое мастерство

  • Typography hierarchy
  • Spacing consistency
  • Color harmony, contrast ratios
  • Pixel-perfect alignment

4. Functionality — Работоспособность

Пользователь завершает задачу без угадывания?

  • Все интерактивные элементы работают
  • Нет stub features
  • Error states обработаны

Влияние формулировок на генерацию

Фразы в criteria прямо влияют на вывод генератора:

  • "museum quality" → visual convergence к одному стилю
  • "best designs" → перфекционизм за счёт creativity
  • Тестируй формулировки — они стируют модель ДО оценки

Контекст-менеджмент

Context Degradation

Модели теряют coherence по мере заполнения context window.

Context reset > Compaction:

  • Compaction сохраняет continuity, но не даёт чистый лист
  • Reset + structured handoff artifact = лучший баланс
  • Handoff artifact = документ с state, decisions, progress

Context Anxiety

Модели могут сворачивать работу раньше времени из-за роста контекста.

  • Решение: clean context resets, когда они уменьшают риск потери важных ограничений

Structured Handoff

При context reset передавать:

- Что уже сделано (с конкретными файлами/строками)
- Какие решения приняты и почему
- Что осталось сделать
- Текущие проблемы и blockers
- Sprint contract для текущей итерации

Assumption Testing

"Every component in a harness encodes an assumption about what the model can't do on its own"

Принцип: предположения устаревают

  • Возможности моделей меняются, поэтому необходимость каждого harness-компонента должна подтверждаться наблюдаемым риском
  • Стратегия: при наличии безопасного измеримого эксперимента убирать компоненты по одному, измерять влияние и откатывать ухудшение

Simplification Loop

1. Текущий harness работает? Да →
2. Убери один компонент (напр. sprint decomposition)
3. Качество упало? Да → верни. Нет →
4. Повтори с другим компонентом
5. Остановись на минимальном harness для текущей задачи

Реальные failure modes (пойманные evaluator'ом)

  • Rectangle fill tool ставит тайлы только на endpoints drag, вместо заполнения области
  • Delete key handler требует два условия, когда нужно одно
  • FastAPI route matching: "reorder" матчится как integer frame_id
  • Audio recording: stub без mic capture
  • Missing clip resize/split operations
  • Effect visualizations как числовые слайдеры вместо графики
  • Display-only features без интерактивности
  • Missing instrument panels
  • Unimplemented recording functionality

Инструментарий

Claude Agent SDK

  • Handles agent orchestration + compaction автоматически
  • Manages context growth across long sessions
  • Рекомендуемый стек для production harnesses

Проверочные инструменты

  • Для UI: browser automation и screenshots проверяют реальный затронутый user journey
  • Для API, очередей и данных: contract/integration tests, health/runtime probes и проверка нужных persistent states
  • Используй инструменты, уже поддержанные проектом; не меняй стек ради соответствия этой skill

Иллюстративные технологии

React/Vite, Nuxt/Vue, FastAPI/Fastify, SQLite/PostgreSQL и Playwright — примеры веб-проектов на момент написания, а не default, требование или инструкция к миграции. Выбирай технологии по существующей архитектуре, пользовательскому запросу и текущей документации.


Gotchas

  • Language shapes output: формулировки в criteria сдвигают генератор ДО обратной связи от оценщика. "Museum quality" → convergence, "experimental" → divergence
  • Не обосновывай продолжение цикла номером итерации: новая итерация нужна только при незакрытом criterion или новом evidence
  • Cost/time figures are dated examples, not gates: если бюджет нужен, согласуй task-specific limit и не понижай acceptance ради формального PASS
  • Evaluator may need tuning: меняй QA prompt только в ответ на конкретный false positive/negative и повторно проверяй затронутый criterion
  • Self-evaluation is seductive: генератор БУДЕТ говорить "всё отлично" — не верь, проверяй через independent evaluator

Troubleshooting

СимптомПричинаРешение
Evaluator всё одобряетПромпт слишком мягкийДобавь few-shot с detailed score breakdowns, конкретные failure criteria
Generator не улучшаетсяFeedback слишком абстрактныйEvaluator должен давать конкретные файлы/строки/проблемы
Бесконечные итерацииCriteria невыполнимы или feedback не связан с нимиПересмотри контракт; сохраняй требуемую safety/runtime планку, а несовместимый scope split только с явным решением пользователя
Context degradationДлинная сессия без resetStructured handoff + clean context reset
Все итерации выглядят одинаковоCriteria слишком узкиеРасширь пространство, убери "museum quality" формулировки
Evaluator ловит мелочи, пропускает крупноеWrong priority в промптеRestructure: critical → high → medium → cosmetic

Frequently asked questions

What does the Harness Design AI skill do?

Design a scoped multi-agent harness for a requested long-running AI workflow. Preserve the user-approved product boundary while using Generator-Evaluator separation, testable sprint contracts, context management, and task-appropriate validation. Based on Anthropic Engineering patterns. Use when: "build a harness", "multi-agent architecture", "agent orchestration", "generator-evaluator", "long-running app", "harness design", "agent pipeline", "quality evaluation loop", "sprint contract", "build app with agents", "Claude Agent SDK architecture", or when building complex full-stack apps that n...

Why use Harness Design on TypingMind?

Because you install it once and use it with any model. Harness Design is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Harness Design in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/AnastasiyaW/codex-claude-code-config/tree/main/skills/architecture/harness-design. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Harness Design?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Harness Design?

As many as you like. As long as a model supports skills, you can use Harness Design with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Harness Design AI skill free?

Yes. It is published on GitHub by AnastasiyaW under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇