Salvages the useful harness-audit scoring work from #1989 while preserving the current hook registry and newer plugin install detection. Adds GitHub integration checks, conditional deploy-provider categories, dynamic applicable category metadata, and CODEOWNERS coverage.
3.0 KiB
description
| description |
|---|
| Run a deterministic repository harness audit and return a prioritized scorecard. |
Harness Audit Command
Run a deterministic repository harness audit and return a prioritized scorecard.
Usage
/harness-audit [scope] [--format text|json] [--root path]
scope(optional):repo(default),hooks,skills,commands,agents--format: output style (textdefault,jsonfor automation)--root: audit a specific path instead of the current working directory
Deterministic Engine
Always 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-05-19.
The script computes up to 12 fixed categories (0-10 normalized each). The first seven are always applicable; GitHub Integration is always applicable; deploy-target categories are applicable only when a matching marker is detected.
- Tool Coverage
- Context Efficiency
- Quality Gates
- Memory Persistence
- Eval Coverage
- Security Guardrails
- Cost Efficiency
- GitHub Integration
- Vercel Integration (when
vercel.jsonor.vercel/is present) - Netlify Integration (when
netlify.tomlor.netlify/is present) - Cloudflare Integration (when
wrangler.tomlorwrangler.jsoncis present) - Fly Integration (when
fly.tomlis present)
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.
Output Contract
Return:
overall_scoreout ofmax_score.max_scoredepends on which categories are applicable to the target; never assume a fixed total.applicable_categories[]andcategory_countdescribing which categories contributed.- Category scores and concrete findings.
- Failed checks with exact file paths.
- Top 3 actions from the deterministic output (
top_actions). - Suggested ECC skills to apply next.
Checklist
- Use script output directly; do not rescore manually.
- If
--format jsonis requested, return the script JSON unchanged. - If text is requested, summarize failing checks and top actions.
- Include exact file paths from
checks[]andtop_actions[].
Example Result
Harness Audit (repo, repo): 71/80
- Tool Coverage: 10/10 (10/10 pts)
- Context Efficiency: 9/10 (9/10 pts)
- Quality Gates: 10/10 (10/10 pts)
- GitHub Integration: 2/10 (2/10 pts)
Top 3 Actions:
1) [GitHub Integration] Add at least one workflow under .github/workflows/. (.github/workflows/)
2) [Security Guardrails] Add prompt/tool preflight security guards in hooks/hooks.json. (hooks/hooks.json)
3) [Eval Coverage] Increase automated test coverage across scripts/hooks/lib. (tests/)
Arguments
$ARGUMENTS:
repo|hooks|skills|commands|agents(optional scope)--format text|json(optional output format)