Logo Moai Meta Harness

Moai Meta Harness

Tổ chứcPhổ biến
modu-ai
moai-meta-harness

DEPRECATED — legacy 7-Phase meta-harness. Redirects to the v4 harness Builder (/moai:harness <natural-language request>) which replaces the static 7-Phase workflow with an orchestrator-direct 4-phase Builder (ANALYZE / PLAN / GENERATE / ACTIVATE) + a manifest-driven dynamic-workflow Runner. Retained as the redirect source for backward-compat invocation paths; the 7-Phase body below is preserved as historical reference, NOT for new harness creation.

Add to TypingMind

Tổng quan

Nhà phát hànhmodu-ai
Kho mãmoai-adk
Tên kỹ năngmoai-meta-harness
Sao
1.2K
Bản fork
226
Tệp đi kèm
4
Giấy phépApache-2.0
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 4 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được modu-ai công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Moai Meta Harness trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-meta-harness
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/modu-ai/moai-adk.git /tmp/moai-adk
mkdir -p .claude/skills
cp -r /tmp/moai-adk/.claude/skills/moai-meta-harness .claude/skills/moai-meta-harness
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Moai Meta Harness trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Moai Meta Harness ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Moai Meta Harness với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

moai-meta-harness (DEPRECATED — redirect to v4)

DEPRECATION NOTICE — This legacy 7-Phase meta-harness is superseded by the v4 harness Builder (/moai:harness <natural-language request>). The v4 design replaces the static 7-Phase workflow with:

  • An orchestrator-direct 4-phase Builder (ANALYZE -> PLAN -> GENERATE -> ACTIVATE) that holds the plan in Claude's session context and can call AskUserQuestion at the PLAN->GENERATE approval gate (first-class boundary).
  • A manifest-driven dynamic-workflow Runner (hns-<name>-run.js) that reads manifest.json and dispatches specialists per their declared primitive (sub-agent / dynamic-workflow / worktree / /moai goal / adversarial-fan-out) — no heuristic re-derivation.
  • Conditional sub-agent-granular worktree isolation (no mandatory top-level worktree; worktree only for conflict-prone parallel generation).
  • Signal-driven phase synthesis (not a fixed pipeline); the evaluator is conditional (skipped for tasks within the model's solo reliable range).

To create a new harness: issue /moai:harness <natural-language request> (e.g., /moai:harness build a harness for my-project's API development). The orchestrator runs Context-First Discovery on the request, derives a harness <name>, and enters the Builder. Do NOT use the 7-Phase workflow below for new harness creation.

What is preserved here: the 7-Phase body below is retained as the redirect source for backward-compat — so existing invocation paths that reference the legacy workflow land on a deprecation notice + redirect rather than a dead link. The 7-Phase content is historical reference material, NOT active workflow. The revfactory 7-Phase residual grep excludes this body precisely because it IS the redirect source.

Apache 2.0 Attribution: Adapted from revfactory/harness (Apache License 2.0). The 7-Phase workflow below is a MoAI adaptation of the upstream 6-Phase + Evolution Mechanism. See .claude/rules/moai/NOTICE.md for the full third-party notices and the harness policy for derivation history. The v4 Builder (the replacement) is documented in ~/.claude/skills/moai/workflows/harness-builder.md.


v4 Redirect (the active path)

New harness creation: /moai:harness <natural-language request>

This routes to the v4 Builder (orchestrator-direct). The Builder:

  1. Context-First Discovery on the request (extract domain / goal / constraints / scope).
  2. AskUserQuestion Socratic rounds if clarity <100%; derives harness <name> from confirmed intent.
  3. Explicit approval gate (AskUserQuestion, PLAN->GENERATE boundary).
  4. ANALYZE / PLAN / GENERATE / ACTIVATE as orchestrator-direct phases.
  5. Emits 5 artifact types: entry command, Runner Workflow, specialists, companion skills, manifest.json.

Harness lifecycle (list / edit / remove): /moai:harness list|edit|remove <name>.

Harness execution: /harness:<name> (auto-generated thin-wrapper command -> the harness's Runner Workflow).

See harness-builder.md (companion workflow under moai/workflows/) for the full Builder contract and .claude/rules/moai/workflow/dynamic-workflows.md for the Runner's dynamic-workflow primitive.


Legacy 7-Phase Body (HISTORICAL REFERENCE — redirect source, NOT active)

The content below this separator is the original 7-Phase workflow, preserved verbatim as the redirect source. It is NOT the active harness-creation path. New harness creation MUST use /moai:harness <NL request> (v4) above. The revfactory 7-Phase residual grep excludes this body because it IS the legacy source being redirected away from.

Meta-factory skill that architects and generates project-specific agent teams. Adapts the revfactory/harness 7-Phase workflow to MoAI's agent ecosystem. Produces hns-* skills and agent definitions tailored to each project's domain.

Upstream: revfactory/harness (Apache-2.0) — "A meta-skill that designs domain-specific agent teams, defines specialized agents, and generates the skills they use." (2905 stars, 420 forks, created 2026-03-26)

Effectiveness data (design target): +60% avg quality score (49.5 → 79.3), 15/15 win rate, −32% variance (n=15, author-measured A/B, third-party replications pending). Source: Hwang, M. (2026). "Harness: Structured Pre-Configuration for Enhancing LLM Code Agent Output Quality." revfactory/claude-code-harness.


Quick Reference

When to Use

  • /moai project Phase 5+ runs and detects an absent .moai/harness/main.md
  • AGENTS.md contains <!-- moai:harness-start --> markers (installed by the project-harness generation policy, not this skill)
  • User explicitly requests harness generation for their project domain

Key Outputs

ArtifactLocationOwner
Harness config.moai/harness/main.md + extension filesthis skill
Agent definitions.claude/agents/harness/*.mdthis skill
Domain skills.claude/skills/hns-*/SKILL.mdthis skill

All generated artifacts use the hns- prefix — never moai-* (which is template-managed). The moai-harness-* prefix specifically denotes template-managed harness builders (moai-meta-harness, moai-harness-learner) and is NOT used by this generator's emissions.

6 Architectural Patterns (upstream)

Pipeline, Fan-out/Fan-in, Expert Pool, Producer-Reviewer, Supervisor, Hierarchical Delegation.

See phase walkthrough detail for pattern semantics and selection guidance.


Implementation Guide

7-Phase Workflow — Source Mapping

Each MoAI phase maps to upstream revfactory/harness phases (ref: https://github.com/revfactory/harness#workflow):

MoAI PhaseUpstream Harness PhaseOwning AgentInputsOutputs
1. DiscoveryPhase 0 (audit) + Phase 1 domain analysis (Socratic)manager-specUser requestanswers.yaml
2. AnalysisPhase 1 domain analysis (codebase scan)manager-specanswers.yaml + repo stateAnalysis report
3. SynthesisPhase 2 team architecture designmanager-specAnalysis reportSPEC doc with EARS
4. SkeletonPhase 3 agent definition generationmeta-harness (this skill)SPEC doc.moai/harness/main.md + extensions
5. CustomizationPhase 4 skill generationmeta-harness (this skill)Skeleton.claude/agents/harness/*.md + .claude/skills/hns-*/SKILL.md
6. EvaluationPhase 5 integration + Phase 6 validationsync-auditorGenerated artifactsSprint Contract score
7. IterationHarness Evolution Mechanism + Phase 7-5 opsthe harness-learning policy (separate SPEC)Scoring deltasFactory feedback (out of scope)

Phase Summaries

  • Phase 1 (Discovery): manager-spec conducts 16-question Socratic interview (owned by the project-harness generation policy). Output: .moai/harness/answers.yaml
  • Phase 2 (Analysis): manager-spec scans repo (file structure, existing agents/skills, dependency files, test coverage) — strategic analysis is absorbed into manager-spec
  • Phase 3 (Synthesis): manager-spec produces SPEC with EARS requirements selecting one of 6 architectural patterns, defining agent roles, skill categories, acceptance criteria
  • Phase 4 (Skeleton): This skill generates harness skeleton — main.md, agents.md, skills.md extensions, agent definition stubs
  • Phase 5 (Customization): This skill fills the skeleton with domain-specific content referencing the retained MoAI agents (manager-*, builder-harness, sync-auditor) plus per-spawn Agent(general-purpose) domain delegations for domain-specific work
  • Phase 6 (Evaluation): sync-auditor runs Sprint Contract protocol (design constitution §11.5) — 4 dimensions, pass threshold 0.75 (FROZEN floor 0.60)
  • Phase 7 (Iteration): Owned by the harness-learning policy (out of scope for this skill)

See Phase 1-7 detailed walkthrough + agent involvement for full per-phase activity, inputs, outputs, and cross-reference notes.

MoAI Agent Cross-References

This skill orchestrates but does NOT replace existing agents. All named agents are retained MoAI agents — no new agents are introduced; domain-specific work is delegated via per-spawn Agent(general-purpose) with domain instructions. Categories: Planning & Strategy (manager-spec, plan-auditor), Implementation (manager-develop, plus per-spawn Agent(general-purpose) domain delegations), Builders (builder-harness with artifact_type=agent|skill|plugin), Workflow Managers (manager-develop, manager-docs, manager-git; quality gate via /moai gate or the sync-phase-quality-gate.sh Stop hook), Quality (sync-auditor).

See agent cross-references full inventory for per-agent role and phase mapping.

Generated Harness Validation

After Phase 5 (Customization) emits new hns-* skills, this meta-harness automatically hands off to sync-auditor using the Sprint Contract protocol (design constitution §11.5).

4-Dimension Sprint Contract Assessment:

DimensionWhat is Checked
FunctionalityAgent definitions execute their stated purpose; skills have valid trigger conditions
SecurityNo credentials in generated files; tool permissions follow least-privilege
CraftYAML frontmatter valid (CSV allowed-tools, quoted metadata); progressive disclosure configured
ConsistencyDomain alignment with answers.yaml; naming follows the hns-* convention

Scoring:

  • Pass threshold: 0.75 default (configurable via design.yaml pass_threshold)
  • FROZEN floor: 0.60 (design constitution §2, immutable)
  • Scoring rubric: sync-auditor rubric anchoring (design constitution §12, Mechanism 1)

For Phase 3b — Hierarchical Scoring (when harness.yaml sets evaluator_mode: hierarchical), see hierarchical scoring detail.

Design Target Reference: The +60% effectiveness figure from Hwang (2026) — 49.5 → 79.3 in a 15-run A/B study (author-measured, third-party replications pending) — is the design intent for this validation hook. The governing requirement explicitly states this does not require runtime measurement.


Namespace Separation

[HARD] The Skills and Agents namespace splits cleanly into distributed and user-generated halves.

Distributed (template-managed)

The moai-* namespace — every prefix under it (moai-foundation-*, moai-workflow-*, moai-domain-*, moai-ref-*, moai-meta-*, moai-harness-*) — ships with moai-adk. moai update syncs it by removing and reinstalling, so any direct user edit is overwritten on the next update.

Harness assets in this namespace:

  • moai-meta-harness (this skill — 7-Phase generator)
  • moai-harness-learner (project-agnostic lifecycle-management builder)

User-Generated (this meta-harness emits)

The hns-* namespace and the .claude/agents/harness/ directory are user-owned. This meta-harness creates them during the /moai project Phase 5+ interview, tailored to the user's project domain. harness-* and my-harness-* are earlier generations of the same namespace; tooling still recognizes them as user-owned, but new artifacts use hns-*.

User-generated artifacts:

  • .claude/skills/hns-<domain>/SKILL.md — domain-specific skill (e.g., hns-trading, hns-llm-cascade)
  • .claude/agents/harness/<role>.md — agent definition (e.g., .claude/agents/harness/trading-specialist.md)
  • .moai/harness/main.md — harness entry point + extensions

Contract

  • [HARD] This meta-harness MUST emit user-generated skills with the hns- prefix ONLY. Emitting a moai-* (including moai-harness-*) prefixed file during Phase 4 or 5 is a contract violation.
  • [HARD] moai update MUST NOT delete, modify, or sync user-owned skills or .claude/agents/harness/* files. Backup before update is mandatory.
  • [HARD] The template tree MUST NOT contain user-owned skills or .claude/agents/harness/*-specialist.md files. Leak detection triggers a cleanup chore.
  • [HARD] Distinguishing user-owned hns-* / harness-* from the template builder moai-harness-* requires an exact startsWith comparison. A *harness-* substring pattern is prohibited — it matches moai-harness-* too and produces false positives.
  • [HARD] New artifacts carry hns-. Tooling also recognizes the earlier harness- and my-harness- prefixes as user-owned, so harnesses generated before the rename keep working; they are not rewritten automatically.

Generated-Agent Self-Activation Contract

[HARD] Each generated .claude/agents/harness/<role>.md agent MUST be emitted with both of the following frontmatter fields so the generated harness self-activates when the agent is delegated:

  • A skills: frontmatter entry preloading the agent's companion harness-<domain>-* skill. This makes the domain skill load deterministically when the agent runs, rather than relying on auto-discovery which fails silently when the companion skill is absent from the agent's context.
  • A non-empty, trigger-shaped description frontmatter field naming the domain + the observable task-shape, so the orchestrator's .moai/harness/main.md Task-Shape Routing table can dispatch to it.

Both fields are enforced at runtime by the Phase-6 post-generation smoke gate (moai doctor harness, see the project/meta-harness.md workflow Phase 7): a generated agent with an empty description, a dangling skills: reference (pointing at a non-existent hns-* dir), or NO skills: key at all causes the gate to FAIL. A skills:-less agent must not pass silently — that is the auto-discovery failure mode this contract closes. Full emission template + example: project/meta-harness.md § 6.4.1.

Storage Roots

Namespace / PathLocationSourcemoai update behavior
moai-* skills (incl. moai-harness-* builders)~/.claude/skills/moai-*/templateRemoved and reinstalled (overwrite)
hns-* skills (legacy: harness-*, my-harness-*).claude/skills/hns-*/user project (this meta-harness emits — intent declaration)Never deleted or modified; backed up
MoAI agents (retained catalog, FLAT)~/.claude/agents/templateRemoved and reinstalled (overwrite)
Generated harness agents.claude/agents/harness/user project (this meta-harness emits)Never deleted or modified; backed up
Harness config.moai/harness/user projectNever deleted; backed up

Cross-References

  • ~/.claude/skills/moai-meta-harness/SKILL.md § Namespace Separation (this file — canonical generator-side namespace contract)
  • .claude/rules/moai/development/skill-authoring.md § Skills Namespace Policy
  • .claude/rules/moai/development/agent-authoring.md § Agent Directory Convention

Trigger Mechanics

Auto-load Conditions:

  1. /moai project Phase 5+ runs and .moai/harness/main.md is absent
  2. AGENTS.md contains <!-- moai:harness-start --> markers. These markers are installed by the project-harness generation policy during project initialization; this skill does not install them.

Frontmatter Triggers:

This skill loads when any of the following match:

  • Keywords: harness, project-init, meta-skill, agent-team, harness-evolve
  • Agents: manager-spec, sync-auditor
  • Phases: plan, run, sync

Deferred Execution Contract:

This skill provides the workflow recipe and agent cross-references. It does NOT execute /moai project Phase 5+ logic — that invocation is owned by the project-harness generation policy. The separation is intentional:

  • This skill = capability (what to do and how)
  • the project-harness generation policy = invocation wiring (when to do it)

Out of Scope

The following capabilities are explicitly NOT implemented by this skill:

  • 5-layer integration mechanism — owned by the project-harness generation policy. The integration with /moai project phases, hook installation, and AGENTS.md marker management are all delegated to that SPEC.
  • 16-question Socratic interview — owned by the project-harness generation policy. The manager-spec conducts the interview under that SPEC's control.
  • Auto-evolution loop — owned by the harness-learning policy. The learning feedback mechanism (Phase 7) and delta capture are separate work items outside Wave A.
  • Modification of .claude/agents/{moai,harness}/ or static moai-* skills — this meta-harness generates only hns-* prefixed artifacts and has no write access to MoAI's own agent/skill directories.

Works Well With

  • moai-foundation-core — SPEC-First DDD and TRUST 5 quality gates
  • moai-foundation-cc — Claude Code skill/agent authoring standards
  • manager-spec — Conducts Discovery and Synthesis phases
  • sync-auditor — Sprint Contract evaluation in Phase 6
  • builder-harness (artifact_type=agent|skill|plugin) — Artifact generation helper

Upstream: revfactory/harness (Apache-2.0) | MoAI adaptation: the harness policy | v4 supersession: the v4 harness Builder redesign See .claude/rules/moai/NOTICE.md for full Apache 2.0 attribution.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Moai Meta Harness làm được gì?

DEPRECATED — legacy 7-Phase meta-harness. Redirects to the v4 harness Builder (/moai:harness <natural-language request>) which replaces the static 7-Phase workflow with an orchestrator-direct 4-phase Builder (ANALYZE / PLAN / GENERATE / ACTIVATE) + a manifest-driven dynamic-workflow Runner. Retained as the redirect source for backward-compat invocation paths; the 7-Phase body below is preserved as historical reference, NOT for new harness creation.

Vì sao nên dùng Moai Meta Harness trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Moai Meta Harness là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Moai Meta Harness trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/modu-ai/moai-adk/tree/main/.claude/skills/moai-meta-harness. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Moai Meta Harness?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Moai Meta Harness với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Moai Meta Harness với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Moai Meta Harness có miễn phí không?

Có. Kỹ năng này được modu-ai phát hành trên GitHub theo giấy phép Apache-2.0. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇