Harness Master
Audit AI harness configuration quality, usage posture, and ecosystem options, then apply approved config fixes in the same session.
NOT for: creating agents (agent-conventions), building MCP servers (mcp-creator), generic application telemetry (observability-advisor), or generic code review without harness/config focus (review).
Input: harness names, level, or natural language. Modes:
Audit,
Discover (gap + bounded research),
Usage,
Apply/Install,
Journal. Run
scripts/discovery/classify_intent.py --args "$ARGUMENTS" --json
when mode is ambiguous.
Dispatch
| Mode | First move |
|---|
| Intake | Ask for harnesses or , then ask for , , or |
| Intake | Ask only for level |
| / | Audit | Dry-run all supported harnesses in deterministic order |
| Intake | Resolve one or more harnesses, then ask only for missing level |
| Intake | Resolve level, then ask only for missing harnesses |
| / | Audit | Run dry-run review for the selected harnesses and level |
| Apply Approved | Apply the last matching dry-run batch only if the user already approved it in this session |
apply <harness...> <level>
/ apply <level> <harness...>
| Apply Approved | Apply only if the same scope was already reviewed and approved in this session; otherwise rerun audit first |
| Install Guidance | Show exact commands only; do not edit configs |
| Discover full | W0 scans → scouts → ideate → report per references/discovery-pipeline.md
|
| / | Discover W0 | Gap report only; no scouts |
| / | Journal | Load or list ~/.agents/harness-master/discovery/
sessions |
usage <harness|all> [level] [days]
| Usage Review | Collect safe aggregate usage/cost/token/tool signals; read-only |
| NL: missing skills / expand / find best X for harness | Discover (inferred) | Depth: full, focused, candidate, or compare — see discovery-pipeline.md |
| Natural language: "review/audit/check/tune <harness> config" | Audit | Normalize harnesses + level, then run dry-run review |
| Natural language: "review/analyze usage/cost/tokens/tools for <harness>" | Usage Review | Normalize harnesses + level, collect safe metadata only, and report optimization lanes |
| Natural language: "find/latest/best plugins/extensions/MCPs/skills for <harness>" | Discover focused | W0 + category scouts + ; read-only |
| Natural language approval like "approved", "do it", "apply those changes" | Apply Approved | Continue only if the immediately preceding review matches the scope and is still current |
| Requests to create agents or MCP servers | Refuse + redirect | Redirect to the correct specialized skill |
| Unsupported harness names | Refuse + clarify | List supported harnesses and ask the user to choose from that set |
Empty-Args Handler
If the user invokes
with no arguments:
- Ask which harnesses to review or whether to use .
- Ask for , , or .
- Explain that the first pass is always dry-run only.
Input Normalization
- Supported harnesses: , , , , , , , , , ,
- Supported levels: , ,
- Supported research categories: , , , , ,
- Supported usage windows: positive day counts such as , , , or ; default to when absent
- Harness aliases:
- , ->
- ->
- , , ->
- ->
- , , , , , , ->
- , , , , ->
- , , ->
- , ->
- , , ->
- , , , ->
- , , ->
- Level aliases:
- Split multiple harnesses on commas and whitespace.
- If the user supplies both and named harnesses, ask which form they want.
- Deterministic order: , , , , , , , , , ,
- Unknown tokens are never guessed. Ask one focused clarification question.
Grok Build ()
- Instruction entry: ->
instructions/grok-global.md
->
- Policy template: merged into via repo Grok platform adapter sync
- Ownership: replace-owned (, , , , ) vs blend-owned (, , , , , , )
- Skills: no native Skills CLI adapter; install/sync uses alias + mirror to ; inventory also scans repo (project scope)
- Plannotator: CLI + skills + hooks (no Grok npm plugin). Install: (repo CLI). Policy:
config/grok-plannotator-hooks.json
-> ~/.grok/hooks/plannotator.json
; home shim maps -> . Curated in docs/src/authoring/skills/*.mdx
. Contrast OpenCode @plannotator/opencode@latest
.
- Env (not in TOML): , , , — document in ; verify with
- Cross-harness delegate: — native headless / / worktrees / leader for Codex/OpenCode task graphs (not config sync)
- Isolated sync: repo stack sync with
--platforms grok --targets home
(skips other harness home merges; includes Plannotator hook refresh)
Cursor Agent CLI ()
- Binary: (also ). Skills CLI adapter remains ().
- Instruction entry: + + +
instructions/cursor-cli-global.md
(thin .cursor/rules/cursor-cli.mdc
pointer)
- Shared SSOT with editor: , , , ,
~/.cursor/{hooks,mcp,skills,agents}
— rendered once by the Cursor adapter ()
- CLI-only: project permissions; user-owned
~/.cursor/cli-config.json
(sync SHALL NOT write it). Doctor: repo CLI
- Plugins: and (operator-opt-in; never sync-add)
- ACP / worktrees / worker: cite ; ; is out of repo sync
- Hooks: consume shared hooks.json + plugin hooks. Do not add to hook-registry render lists
Classification Gate
- Parse into harnesses, level, , install intent, apply intent, and unresolved tokens.
- If unresolved tokens remain, ask a single clarification question before continuing.
- If the request is , gap/missing/expand intent, or find-best-for-harness NL, run Discover (infer depth via or discovery-pipeline.md).
- If the request is , run Usage Review only.
- If the request is , run Install Guidance only.
- If ad-hoc "find skill for X", redirect to or . If systematic skill/MCP expansion, stay in Discover. If create skill, redirect to skill-creator. If open-ended non-harness research, redirect to .
- If the request is or an approval phrase, run Apply Approved only if the matching dry-run review already exists in this session. Otherwise rerun audit first.
- If the request includes unsupported harnesses, refuse cleanly and list the supported set.
- If harnesses are missing and was not supplied (audit/usage), ask only for harnesses or .
- If the level is missing (audit/usage), ask only for , , or .
- Otherwise run Audit in dry-run mode.
Classification Logic
- Route explicit mode tokens first: , , , , , .
- Route gap/missing/expand/find-best NL to Discover depths (not Audit).
- Route complete harness/level scopes to Audit when config tune/fix intent and no discover signal.
- Route usage/cost/token NL to Usage Review.
- Route approvals to Apply Approved only when the immediately preceding dry-run audit matches the requested scope.
Workflow
Mode A: Audit (default, dry-run first)
-
Gate 0 — Discover surfaces
- Run:
bash
uv run python scripts/discover_surfaces.py --repo-root . --level <level> --harness <canonical-harness> [--harness ...]
- Parse the JSON output and classify each surface as , , , , , or .
- If the script cannot run, fall back to manual discovery with , , and .
-
Gate 1 — Inspect project context before recommending fixes
- Read the repo's intent and operating model first: , , harness-facing project files, key manifests, CI/workflow signals, and repo-native orchestration logic when present.
- In this repository, treat the repo-level harness sync script together with
config/tooling-policy.json
and config/sync-manifest.json
as canonical context for managed/generated/merged harness surfaces.
-
Gate 2 — Refresh latest official guidance
- Read
references/latest-doc-sources.md
.
- Use first when available, then first-party docs, then canonical vendor repo docs, then web fallback only if needed.
- If official docs are unavailable, enter degraded mode and lower confidence.
-
Gate 3 — Audit each selected harness independently
- Load
references/harness-surfaces.md
, references/harness-checklists.md
, and references/evidence-boundaries.md
selectively for the selected harnesses only.
- For , compare project/global precedence before recommending edits.
- Mark generated surfaces explicitly. Prefer fixing the canonical source over directly editing generated output.
- Treat missing native surfaces as evidence to assess, not automatic failure.
-
Gate 4 — Report dry-run findings
- Use the structure in
references/output-format.md
.
- Every finding must include severity, affected surface, evidence tag, why it matters for this project, and the correct home for the fix.
- Show concrete patch previews when the correct change is clear.
- Stop after the dry-run report and wait for explicit user approval.
Mode B: Apply Approved
- Apply only after an explicit approval gate.
- Approval is valid only when the immediately preceding dry-run review in the same session already covered the same harness set and level.
- If the reviewed scope is stale, missing, ambiguous, or contradicted by new evidence, rerun Audit before editing.
- Restate the approved batch before making changes.
- Apply the smallest approved batch only. Do not broaden scope silently.
- If the approved remediation is an install step, use the exact guidance from
references/install-guidance.md
.
- After edits, rerun surface discovery and targeted dry-run checks for the touched harnesses, then summarize remaining gaps.
Mode C: Discover
Read-only gap expansion and harness-bounded research. Load
references/discovery-pipeline.md
and
references/discovery/coordinator-contract.md
.
- Classify depth (full, focused, candidate, compare, w0only, ideate, journal).
- Run W0 scripts before any scouts when depth requires gaps.
- Use and inside W2/W2b — not as separate user-facing modes.
- Block apply/install until user confirms; config fixes require Audit + .
Mode D: Usage Review
Use this mode for
or natural-language requests to review token cost, quota, tool friction, MCP use, skill fit, plugin fit, context health, session attribution, or harness telemetry posture.
- Treat the entire mode as read-only. Do not edit files, install packages, create jobs, export raw sessions, print raw prompts, print raw traces, or mutate harness configs.
- Normalize harnesses, level, and usage window. Default missing window to days.
- Run surface discovery plus the safe usage probe:
bash
uv run python scripts/usage_probe.py --repo-root . --harness <canonical-harness> --level <level> --days <days> --json
- Load
references/usage-review.md
, references/evidence-boundaries.md
, and references/output-format.md
.
- Use runtime tools such as , , , , , , , , and only when they match the requested harness and privacy class.
- Normalize findings into usage signals and score source coverage, privacy safety, cost/token posture, tool efficiency, MCP hygiene, skill fit, plugin fit, context health, approval safety, and recommendation actionability.
- Report recommendation lanes: , , , , , , , , or .
- If the user asks to apply a Usage Review recommendation, block the apply step and require a matching dry-run Audit plus explicit approval first.
Scaling Strategy
| Scope | Strategy |
|---|
| small | 1 harness and 1 level: inline review with one per-harness report |
| medium | 2-3 harnesses or one scope: review each harness independently, then add a short synthesis |
| large | 4+ harnesses or : batch discovery where possible, keep per-harness sections strict, then finish with cross-harness synthesis and ranked cleanup order |
| Discover (full/focused) | Use Pattern F semantics: explore sources, score candidates, synthesize evidence, and stop before apply |
| Team-capable Discover | Use Pattern E or nested waves for source-family scouts, with accounting for every dispatched scout |
| Usage review | Prefer aggregate probes and runtime summaries first; avoid raw transcripts, raw traces, secret files, and message-table reads |
Latest-Doc Lookup Policy
Use the most current authoritative guidance available:
- or equivalent official index
- First-party docs pages for config, instructions, rules, MCP, and permissions
- Canonical vendor repo docs if first-party product docs are incomplete
- Web fallback only when the above are unavailable
Never claim
without evidence from a current source.
Per-Harness Review Contract
- Review each harness independently before writing any synthesis.
- Tag every finding as , , , or .
- Surface the authoritative, secondary, generated, and merged config surfaces for the selected level.
- For , report project/global conflicts before recommending changes.
- If a harness-specific native surface is not observable from the current session, mark it as a blind spot instead of inventing behavior.
Install Guidance Contract
- Load
references/install-guidance.md
only when the user asks how to install , or when missing skill availability is the actual root cause.
- Default surfaced form:
bash
npx skills add <source> --skill harness-master -y -g --agent claude-code --agent codex --agent crush --agent cursor --agent opencode
- Do not recommend install commands for native config problems.
- Do not suggest project-local install by default. Mention
python scripts/install_skills.py --local --execute
only if the user explicitly asks for project-local installation.
Validation Contract
After changing this skill, run:
bash
python scripts/check.py
uv run python scripts/usage_probe.py --repo-root . --harness opencode --level both --days 14 --json
uv run python scripts/discover_surfaces.py --repo-root . --level both --harness claude-code --harness claude-desktop --harness chatgpt --harness codex --harness cursor --harness cursor-cli --harness grok-build --harness opencode --harness perplexity-desktop --harness cherry-studio --harness lm-studio
Completion criteria:
- metadata and eval manifests validate
- packaging remains portable
- surface discovery smoke-check accepts every canonical harness
- dry-run/apply behavior still requires approval before edits
- Discover remains read-only and blocks apply until a matching audit is approved
- usage review remains read-only, redacts sensitive sources, and blocks apply until a matching audit is approved
Cross-Harness Synthesis Contract
After all per-harness reviews, synthesize:
- Shared issues across harnesses
- Conflicting conventions or precedence rules
- Duplicated instruction sources or MCP definitions
- Generated-vs-canonical drift patterns
- Highest-leverage cleanup order if the user wants a follow-up apply batch
Output Contract
Every per-harness report must include:
- Harness
- Level
- Files Reviewed
- Docs Checked
- Project Context Summary
- Blind Spots
- Scorecard
- Findings
- Recommended Changes
- Proposed Patch Preview
- Confidence
Then add a cross-harness synthesis section when 2+ harnesses were reviewed.
Reference File Index
| File | Content | Read When |
|---|
| Gate-by-gate audit/apply workflow, precedence rules, degraded mode, and approval gate details | Audit, Apply Approved |
references/latest-doc-sources.md
| Official and docs URLs per harness, plus fallback order | Latest-doc refresh |
references/harness-surfaces.md
| Project/global surfaces, precedence, install agent names, generated/merged notes | Surface interpretation |
references/harness-checklists.md
| Per-harness audit checklist and edge cases | Per-harness review |
references/evidence-boundaries.md
| Evidence tags, blind-spot handling, and contradiction policy | Reporting findings |
references/install-guidance.md
| Exact commands, when to surface them, and anti-patterns | Install Guidance |
references/output-format.md
| Per-harness and cross-harness report templates | Final output |
references/discovery-pipeline.md
| W0–W4 discover waves, depth inference, evidence vs contracts, redirects | Discover |
| Coordinator contract, scout templates, output formats, research integration | Discover scouts and reports |
references/ecosystem-research.md
| Legacy source-family notes; prefer discovery-pipeline.md for dispatch | Discover W2 source planning |
references/source-profiles.md
| Source families, programmatic access, confidence roles, and degraded-source behavior | Discover W2 source planning |
references/usage-review.md
| Read-only usage sources, privacy classes, scorecard, signal schema, and recommendation lanes | Usage Review |
data/research-sources.json
| Machine-readable source registry for source planning and probe scripts | Discover W2 source planning |
Read only the references needed for the active step. Do not preload all references.
Progressive Disclosure
Load reference files as indicated by the active mode. Do not load all references at once; use the dispatch table, source plan, and final output needs to choose the smallest relevant set.
Canonical Vocabulary
These terms are canonical for
reports and should be used exactly.
Use these terms exactly throughout:
| Term | Meaning | NOT |
|---|
| One supported agent/runtime target | , |
| , , or scope for the review | |
| Repo-local file or generated artifact used by a harness | |
| User-level harness config outside the repo | |
| Findings + patch preview only; no edits | |
| Explicit user consent required before edits | |
| A surface or behavior that is not observable in the current session | |
| Behavior inferred from the current codebase's real harness wiring | |
| Proposed diff or snippet shown before edits | |
| The file or config that should be changed instead of a generated output | |
| Read-only list of sources, URLs/commands, env vars, evidence fields, and failure modes | |
| Normalized evidence bundle for one ecosystem candidate | |
| Adoption readiness class backed by evidence and validation state | |
| Candidate class for credential, proxy, destructive, offensive, or broad-permission risk | |
| Sanitized aggregate evidence about token, cost, quota, tool, MCP, skill, plugin, or workflow behavior | |
| Sensitivity class that determines whether a source can be collected, summarized, or must stay manual-only | |
Critical Rules
- Every new run starts in dry-run audit mode.
- Never edit before explicit user approval.
- is valid only after a matching dry-run review in the current session.
- Ask only for missing inputs. Never re-ask resolved harnesses or levels.
- Always inspect project context before recommending harness changes.
- Always refresh latest official guidance before claiming a configuration is current or stale.
- Mark blind spots explicitly. Do not guess hidden or UI-only settings.
- Prefer edits to canonical sources over generated or merged outputs when this is clear from evidence.
- Every finding must carry an evidence tag: , , , or .
- Show concrete patch previews whenever the correct edit is clear.
- Use only when installation is genuinely the right next step.
- Unsupported harnesses must be refused cleanly with the supported set listed.
- Ecosystem research is advisory and read-only. Never apply from a research report alone.
- Credentialed APIs are optional enrichments. Missing credentials lower confidence but do not block baseline source planning.
- GitHub GraphQL enriches known candidate repositories; use REST/search or code/file lookup for broad discovery.
- Usage Review is advisory and read-only. Never apply config changes, install tools, export raw sessions, or print raw prompts/traces from usage findings alone.
- Usage Review may use aggregate-safe and sanitized metadata sources, but secret files, credential values, raw transcripts, raw traces, and raw message-table bodies are out of scope.