moai-harness-learner

Coordinates Tier 4 auto-update proposals and Apply/Rollback flows for harness learning.

1.2k|222|Updated Sep 16, 2025
One-click install
npx skills add https://github.com/modu-ai/moai-adk --skill moai-harness-learner
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: moai-harness-learner
Source: https://github.com/modu-ai/moai-adk/tree/main/internal/template/templates/.claude/skills/moai-harness-learner
Command: npx skills add https://github.com/modu-ai/moai-adk --skill moai-harness-learner

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Managing self-improving agent harnesses requires a controlled way to review, approve, and roll back automatically generated configuration updates without letting the CLI prompt users directly or modify protected files.

Core Features & Use Cases

  • Proposal Payload Generation: Runs moai harness apply to fetch Tier 4 auto-update proposals as structured JSON payloads for the orchestrator to surface via AskUserQuestion.
  • Apply/Rollback Orchestration: Coordinates approval decisions, executes approved updates through a 5-Layer Safety Pipeline, and restores snapshots via moai harness rollback.
  • Learning Lifecycle Control: Inspects tier distribution and rate limits with moai harness status, and disables learning via moai harness disable while preserving YAML formatting.
  • Use Case: When the harness observes repeated usage patterns and proposes updating a user-area skill's triggers, this skill fetches the proposal, hands it to the orchestrator for user approval, and applies or discards it safely.

Quick Start

Ask the agent to check harness learning status and review any pending auto-update proposals for approval or rollback.

Frequently Asked Questions about moai-harness-learner

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review pending harness auto-update proposals?

Run `moai harness status` to see pending proposals, then `moai harness apply` to fetch the next proposal as a JSON payload. The orchestrator surfaces it via AskUserQuestion with approve, reject, inspect, or defer options.

How do I roll back a harness learning auto-update?

List available snapshots in `.moai/harness/learning-history/snapshots/`, then run `moai harness rollback <timestamp>` with the project root. This restores the harness configuration to the selected snapshot state.

Which files can harness auto-updates modify?

Only user-area skills under `.claude/skills/hns-*/` (plus legacy harness skill directories) and agents under `.claude/agents/harness/` are valid targets. Frozen paths like `.claude/skills/moai-*/` and `.claude/rules/moai/**` are never auto-modified.

What safety checks protect harness auto-updates?

A 5-Layer Safety Pipeline guards every update: Frozen Guard blocks protected paths, Canary Check blocks effectiveness drops over 0.10, Contradiction Detector blocks trigger conflicts, Rate Limiter caps updates at 3 per week, and Human Oversight requires user approval.

How do I disable harness learning entirely?

Run `moai harness disable --project-root <project_root>`. This sets `learning.enabled: false` in `.moai/config/sections/harness.yaml` while preserving comments and key ordering through YAML round-trip.