Harness Setup
Configure the personal Harness by composing its existing setup skills. Do not
copy their shell procedures into this skill.
Read references/harness-contract.md for
the result shape and references/shelby-integration.md
only if Shelby tool names are available.
Configured-status mode
When a consumer invokes this skill with mode: status, run a read-only configuration
check and return immediately; do not enter Ordered setup and do not mutate files,
links, repositories, or remote state.
Invoke harness:sync with --dry-run. Require its report to establish the personal
agents repository, portable links, declared skills, MCP commands, and portability
checks without a pending repair.
Discover the current runtime capabilities with the same read-only command -v
inventory used by Ordered setup. Require python3, yq, and the resolver at
$harness/scripts/resolve-route.py, plus the adapter checker at
$harness/scripts/codex-app-server.py; a missing required script or dependency
is a blocker, not permission to infer configured status. command -v codex
is only a binary preflight: advertise codex as present only when this bounded
check exits 0 with {"status":"available"}:
"$harness/scripts/codex-app-server.py" check --codex-bin "$HARNESS_CODEX_BIN"
A {"status":"missing_executor"} result removes or refreshes codex from the
callable executor inventory without a timed circuit or dispatch attempt.
Resolve the rubric through scripts/rubric-path.sh --check. When it is set,
first require the Harness 0.7 completion markers: routing.orchestrator,
routing.default, routing.quick, and routing.review are present and every
completed model row's efficiency is an integer from 1 through 10. Then run
the canonical validator against the current native provider and callable
executors:
harness="${CLAUDE_PLUGIN_ROOT:-$(ls -d "$HOME"/.claude/plugins/cache/*/harness/*/ 2>/dev/null | sort -V | tail -1)}"; harness="${harness%/}"
"$harness/scripts/resolve-route.py" validate \
--rubric "$RUBRIC_PATH" \
--native-provider "$HARNESS_NATIVE_PROVIDER" \
--executors "$HARNESS_EXECUTORS" \
--authoring-providers "$HARNESS_AUTHORING_PROVIDERS"
Require exit 0 and {"status":"valid"}. The command never receives a
health-state path and must not create or update provider-health state. It
proves exact model rows, unique providers within chains, taste thresholds,
the persistent orchestrator-provider boundary, any named authoring-provider
exclusions in current Setup context, and current provider/executor reachability
without rewriting the rubric. A
rubric that satisfies only the pre-0.7 execute/review checks is not configured.
Return the complete HarnessResult defined by the Harness contract. Use
status: accepted with evidence.outcome: proven only when the Sync dry run and
current rubric/capability validation all pass. Otherwise use status: blocked with
evidence.outcome: unproven and name each missing or stale configuration element in
blockers. Record the validated agents-repository commit or configuration snapshot
as evidence.fixed_target and the decisive read-only checks in evidence.checks.
Installed skills alone never prove configured status. Optional Shelby absence remains
non-blocking, as in Ordered setup.
Ordered setup
Invoke harness:sync in full mode. It owns discovering, cloning, or safely
creating the personal agents repository from loose configuration, reconciling
portable links, and running its portability checks. If the repository is
absent, let Sync distinguish an existing private remote from loose local
configuration and preserve every backup, confirmation, privacy, and conflict
boundary it owns.
Finish the Sync link and portability reconciliation before capability
discovery. An unresolved destructive choice, authentication failure, or
divergence is a blocker; Setup does not decide it for the user.
Now discover runtime capabilities with command -v; do not install a runtime or
infer one from a config file. Check only executors and tools relevant to the
current rubric, plus the known supported agent runtimes:
for capability in claude gemini pi hermes; do
if command -v "$capability" >/dev/null 2>&1; then
printf '%s\tpresent\n' "$capability"
else
printf '%s\tabsent\n' "$capability"
fi
done
if command -v codex >/dev/null 2>&1 && \
"$harness/scripts/codex-app-server.py" check \
--codex-bin "$(command -v codex)" >/dev/null; then
printf '%s\tpresent\n' codex
else
printf '%s\tabsent\n' codex
fi
Invoke harness:model-rubric, passing the same native-provider and
callable-executor inventory used by configured-status validation, together
with the observed capabilities and any named authoring-provider exclusions,
as current setup context. That skill owns the
rubric path, interview, creation, refresh, validation, and audit mechanics.
Do not write or parse a second rubric here. It must reconcile the rubric's
capabilities with the observed inventory, rederive affected routes instead
of retaining a stale executor, and report a validated write only after its
temporary draft passes resolve-route.py validate with that inventory.
Invoke harness:sync again if the rubric changed inside the agents repository,
but only after Model Rubric reports a validated write, so the existing commit,
pull, push, and conflict mechanics publish that version-controlled change. A
blocked validation never authorizes Sync.
Inspect the runtime's callable tool names for Shelby only after the portable
setup is usable. When Shelby tool names are present, continue setup and return
only identifiers from successful Shelby calls. Resolve canonical project
scope, log this multi-phase setup run, and save only useful recovery
checkpoints before returning those identifiers. When Shelby tool names are
absent, continue setup and leave all optional shelby identifiers empty.
Shelby failure never changes route or authority and blocks only enrichment,
not correct setup.
Print the storage boundary:
- version-controlled: portable instructions, skill declarations,
manifests, shared settings, and the rubric when the agents repository owns
its config directory;
- local-only: credentials, secret-bearing profiles, resolved command
paths, capability availability, symlinks, approvals, temporary evidence,
and Shelby state.
Completion
Re-run the checks owned by Sync and Model Rubric that establish the setup state.
Record bounded JSON summaries from the actual calls rather than inventing
results:
- Sync: initial/final status and decisive checks, plus changed files;
- Model Rubric: status, whether the file was current, whether capabilities were
reconciled, whether it changed, decisive checks, and changed files;
- callable runtime tool names as a JSON string array;
- Shelby: status, checks, and only identifiers returned by successful calls.
Then run the deterministic result seam. It validates that even a current rubric
was reconciled, requires final Sync when the rubric changed, and handles Shelby
present, absent, or failed without fabricating identifiers:
harness="${CLAUDE_PLUGIN_ROOT:-$(ls -d "$HOME"/.claude/plugins/cache/*/harness/*/ 2>/dev/null | sort -V | tail -1)}"; harness="${harness%/}"
"$harness/scripts/setup-result.py" \
--sync-result "$SYNC_RESULT" \
--rubric-result "$RUBRIC_RESULT" \
--tool-names "$TOOL_NAMES" \
${SHELBY_RESULT:+--shelby-result "$SHELBY_RESULT"} \
--model "$HARNESS_MODEL" \
--effort "$HARNESS_EFFORT" \
--provider "$HARNESS_PROVIDER" \
--executor "$HARNESS_EXECUTOR" \
--fixed-target "$HARNESS_FIXED_TARGET" \
--proof "$HARNESS_PROOF"
Return the exact HarnessResult from
references/harness-contract.md. Use the
current runtime as the executor, record the agents-repository commit or config
snapshot in evidence.fixed_target, and include decisive setup checks. Only the
parent or accepting workflow may return status: accepted, after reproducing
those checks; it alone may pass --proof proven. A subordinate skill's success
report is a claim.
Populate every field: status, route.requested, route.actual_model,
route.effort, route.provider, route.executor, artifacts.files,
artifacts.report, evidence.fixed_target, evidence.checks,
evidence.outcome, telemetry.attempts, telemetry.elapsed,
telemetry.verification_failures, telemetry.token_or_quota_usage,
shelby.project_id, shelby.run_id, shelby.checkpoint_ids, and blockers.
For Setup, use route.requested: default and record the current session's model,
effort, provider, and runtime executor. Leave unavailable optional values empty
rather than omitting fields.
1---2name: setup-23description: Use when Harness has been installed but this developer still needs a personal agents-repo relationship, portable links, runtime capability discovery, a model rubric, or optional Shelby enrichment configured.4---56# Harness Setup78Configure the personal Harness by composing its existing setup skills. Do not9copy their shell procedures into this skill.1011Read [references/harness-contract.md](../../references/harness-contract.md) for12the result shape and [references/shelby-integration.md](../../references/shelby-integration.md)13only if Shelby tool names are available.1415## Configured-status mode1617When a consumer invokes this skill with `mode: status`, run a read-only configuration18check and return immediately; do not enter Ordered setup and do not mutate files,19links, repositories, or remote state.20211. Invoke `harness:sync` with `--dry-run`. Require its report to establish the personal22 agents repository, portable links, declared skills, MCP commands, and portability23 checks without a pending repair.242. Discover the current runtime capabilities with the same read-only `command -v`25 inventory used by Ordered setup. Require `python3`, `yq`, and the resolver at26 `$harness/scripts/resolve-route.py`, plus the adapter checker at27 `$harness/scripts/codex-app-server.py`; a missing required script or dependency28 is a blocker, not permission to infer configured status. `command -v codex`29 is only a binary preflight: advertise `codex` as present only when this bounded30 check exits 0 with `{"status":"available"}`:3132 ```bash33 "$harness/scripts/codex-app-server.py" check --codex-bin "$HARNESS_CODEX_BIN"34 ```3536 A `{"status":"missing_executor"}` result removes or refreshes `codex` from the37 callable executor inventory without a timed circuit or dispatch attempt.383. Resolve the rubric through `scripts/rubric-path.sh --check`. When it is set,39 first require the Harness 0.7 completion markers: `routing.orchestrator`,40 `routing.default`, `routing.quick`, and `routing.review` are present and every41 completed model row's `efficiency` is an integer from 1 through 10. Then run42 the canonical validator against the current native provider and callable43 executors:4445 ```bash46 harness="${CLAUDE_PLUGIN_ROOT:-$(ls -d "$HOME"/.claude/plugins/cache/*/harness/*/ 2>/dev/null | sort -V | tail -1)}"; harness="${harness%/}"47 "$harness/scripts/resolve-route.py" validate \48 --rubric "$RUBRIC_PATH" \49 --native-provider "$HARNESS_NATIVE_PROVIDER" \50 --executors "$HARNESS_EXECUTORS" \51 --authoring-providers "$HARNESS_AUTHORING_PROVIDERS"52 ```5354 Require exit 0 and `{"status":"valid"}`. The command never receives a55 health-state path and must not create or update provider-health state. It56 proves exact model rows, unique providers within chains, taste thresholds,57 the persistent orchestrator-provider boundary, any named authoring-provider58 exclusions in current Setup context, and current provider/executor reachability59 without rewriting the rubric. A60 rubric that satisfies only the pre-0.7 execute/review checks is not configured.614. Return the complete HarnessResult defined by the Harness contract. Use62 `status: accepted` with `evidence.outcome: proven` only when the Sync dry run and63 current rubric/capability validation all pass. Otherwise use `status: blocked` with64 `evidence.outcome: unproven` and name each missing or stale configuration element in65 `blockers`. Record the validated agents-repository commit or configuration snapshot66 as `evidence.fixed_target` and the decisive read-only checks in `evidence.checks`.6768Installed skills alone never prove configured status. Optional Shelby absence remains69non-blocking, as in Ordered setup.7071## Ordered setup72731. Invoke `harness:sync` in full mode. It owns discovering, cloning, or safely74 creating the personal agents repository from loose configuration, reconciling75 portable links, and running its portability checks. If the repository is76 absent, let Sync distinguish an existing private remote from loose local77 configuration and preserve every backup, confirmation, privacy, and conflict78 boundary it owns.792. Finish the Sync link and portability reconciliation before capability80 discovery. An unresolved destructive choice, authentication failure, or81 divergence is a blocker; Setup does not decide it for the user.823. Now discover runtime capabilities with `command -v`; do not install a runtime or83 infer one from a config file. Check only executors and tools relevant to the84 current rubric, plus the known supported agent runtimes:8586 ```bash87 for capability in claude gemini pi hermes; do88 if command -v "$capability" >/dev/null 2>&1; then89 printf '%s\tpresent\n' "$capability"90 else91 printf '%s\tabsent\n' "$capability"92 fi93 done94 if command -v codex >/dev/null 2>&1 && \95 "$harness/scripts/codex-app-server.py" check \96 --codex-bin "$(command -v codex)" >/dev/null; then97 printf '%s\tpresent\n' codex98 else99 printf '%s\tabsent\n' codex100 fi101 ```1021034. Invoke `harness:model-rubric`, passing the same native-provider and104 callable-executor inventory used by configured-status validation, together105 with the observed capabilities and any named authoring-provider exclusions,106 as current setup context. That skill owns the107 rubric path, interview, creation, refresh, validation, and audit mechanics.108 Do not write or parse a second rubric here. It must reconcile the rubric's109 `capabilities` with the observed inventory, rederive affected routes instead110 of retaining a stale executor, and report a validated write only after its111 temporary draft passes `resolve-route.py validate` with that inventory.1125. Invoke `harness:sync` again if the rubric changed inside the agents repository,113 but only after Model Rubric reports a validated write, so the existing commit,114 pull, push, and conflict mechanics publish that version-controlled change. A115 blocked validation never authorizes Sync.1166. Inspect the runtime's callable tool names for Shelby only after the portable117 setup is usable. When Shelby tool names are present, continue setup and return118 only identifiers from successful Shelby calls. Resolve canonical project119 scope, log this multi-phase setup run, and save only useful recovery120 checkpoints before returning those identifiers. When Shelby tool names are121 absent, continue setup and leave all optional `shelby` identifiers empty.122 Shelby failure never changes route or authority and blocks only enrichment,123 not correct setup.1247. Print the storage boundary:125126 - **version-controlled:** portable instructions, skill declarations,127 manifests, shared settings, and the rubric when the agents repository owns128 its config directory;129 - **local-only:** credentials, secret-bearing profiles, resolved command130 paths, capability availability, symlinks, approvals, temporary evidence,131 and Shelby state.132133## Completion134135Re-run the checks owned by Sync and Model Rubric that establish the setup state.136Record bounded JSON summaries from the actual calls rather than inventing137results:138139- Sync: initial/final status and decisive checks, plus changed files;140- Model Rubric: status, whether the file was current, whether capabilities were141 reconciled, whether it changed, decisive checks, and changed files;142- callable runtime tool names as a JSON string array;143- Shelby: status, checks, and only identifiers returned by successful calls.144145Then run the deterministic result seam. It validates that even a current rubric146was reconciled, requires final Sync when the rubric changed, and handles Shelby147present, absent, or failed without fabricating identifiers:148149```bash150harness="${CLAUDE_PLUGIN_ROOT:-$(ls -d "$HOME"/.claude/plugins/cache/*/harness/*/ 2>/dev/null | sort -V | tail -1)}"; harness="${harness%/}"151"$harness/scripts/setup-result.py" \152 --sync-result "$SYNC_RESULT" \153 --rubric-result "$RUBRIC_RESULT" \154 --tool-names "$TOOL_NAMES" \155 ${SHELBY_RESULT:+--shelby-result "$SHELBY_RESULT"} \156 --model "$HARNESS_MODEL" \157 --effort "$HARNESS_EFFORT" \158 --provider "$HARNESS_PROVIDER" \159 --executor "$HARNESS_EXECUTOR" \160 --fixed-target "$HARNESS_FIXED_TARGET" \161 --proof "$HARNESS_PROOF"162```163164Return the exact `HarnessResult` from165[references/harness-contract.md](../../references/harness-contract.md). Use the166current runtime as the executor, record the agents-repository commit or config167snapshot in `evidence.fixed_target`, and include decisive setup checks. Only the168parent or accepting workflow may return `status: accepted`, after reproducing169those checks; it alone may pass `--proof proven`. A subordinate skill's success170report is a claim.171172Populate every field: `status`, `route.requested`, `route.actual_model`,173`route.effort`, `route.provider`, `route.executor`, `artifacts.files`,174`artifacts.report`, `evidence.fixed_target`, `evidence.checks`,175`evidence.outcome`, `telemetry.attempts`, `telemetry.elapsed`,176`telemetry.verification_failures`, `telemetry.token_or_quota_usage`,177`shelby.project_id`, `shelby.run_id`, `shelby.checkpoint_ids`, and `blockers`.178For Setup, use `route.requested: default` and record the current session's model,179effort, provider, and runtime executor. Leave unavailable optional values empty180rather than omitting fields.