.opencode/commands/harness-audit.md
Run a deterministic repository harness audit and return a prioritized scorecard.
/harness-audit [scope] [--format text|json] [--root path]
scope (optional): repo (default), hooks, skills, commands, agents--format: output style (text default, json for automation)--root: audit a specific path instead of the current working directoryAlways run:
node scripts/harness-audit.js <scope> --format <text|json> [--root <path>]
This script is the source of truth for scoring and checks. Do not invent additional dimensions or ad-hoc points.
Rubric version: 2026-03-30.
The script computes 7 fixed categories (0-10 normalized each):
Scores are derived from explicit file/rule checks and are reproducible for the same commit. The script audits the current working directory by default and auto-detects whether the target is the ECC repo itself or a consumer project using ECC.
Return:
overall_score out of max_score (70 for repo; smaller for scoped audits)top_actions)--format json is requested, return the script JSON unchanged.checks[] and top_actions[].Harness Audit (repo): 66/70
- Tool Coverage: 10/10 (10/10 pts)
- Context Efficiency: 9/10 (9/10 pts)
- Quality Gates: 10/10 (10/10 pts)
Top 3 Actions:
1) [Security Guardrails] Add prompt/tool preflight security guards in hooks/hooks.json. (hooks/hooks.json)
2) [Tool Coverage] Sync commands/harness-audit.md and .opencode/commands/harness-audit.md. (.opencode/commands/harness-audit.md)
3) [Eval Coverage] Increase automated test coverage across scripts/hooks/lib. (tests/)
$ARGUMENTS:
repo|hooks|skills|commands|agents (optional scope)--format text|json (optional output format)