SuperAPI AI Directory

ihs-repo-harness

Coding & development

View repository

Updated 10-15 16:47

About this skill

IHS Repo Harness

Goal: Drawing on the ideas of OpenAI Harness Engineering (constraints + evaluation + regression), make the technical debt brought by rapid AI development "visualizable, quantifiable, and trackable".


1) When to trigger

Trigger this skill when you need to answer the following questions:

  • Is the current repository health getting better or worse?
  • Have recent iterations introduced hidden technical debt?
  • Are tests and documentation keeping up with the pace of code changes?

Recommended trigger words:

  • 运行 IHS 评估
  • 检查仓库是否变好还是变坏
  • 生成 IHS 报告

2) Trigger command (standard)

Execute in the repository root directory:

python3 .claude/skills/ihs-repo-harness/scripts/generate_ihs_report.py --output docs/IHS.md

Optional parameters:

  • --skip-runtime-checks: skip type-check / test / coverage(static analysis only)
  • --history-window <N>: customize the documentation alignment analysis window (default 40 commits)

3) Evaluation dimensions (IHS)

IHS total score = 代码腐化度(40%) + 测试信号(35%) + 文档对齐(25%)

A. Code Entropy

Focus points:

  • TODO/FIXME/HACK/XXX
  • any、@ts-ignore/@ts-nocheck
  • eslint-disable
  • Oversized files (>400 lines)

B. Test signals (Harness Checks)

Focus points:

  • Test file/source file ratio
  • npm run type-check results
  • npm run test results
  • npm run coverage -- --reporter=json-summary results and coverage summary

C. Docs alignment

Focus points:

  • Whether key documents exist (AGENTS.md、docs/、README、SUPABASE_COOKBOOK)
  • "code commits vs documentation commits" alignment rate within the recent window
  • Documentation freshness (<=120 days)

4) Output contract

After execution is complete, the following must be produced:

  1. Root directory report:docs/IHS.md
  2. Clear conclusion:
    • Repository status:好 / 坏
    • Trend judgment:变好 / 变坏 / 持平(compared with HEAD~1)
  3. Actionable improvement suggestions (sorted by priority)

5) Judgment criteria (default)

  • Total score >= 70: status is judged as good
  • Total score < 70: status is judged as bad
  • Compared with the static trend score of HEAD~1 :
    • Δ > 1 => getting better
    • Δ < -1 => getting worse
    • other => flat

6) Recommended execution cadence

  • Execute once before each relatively large feature merge
  • Execute once at a fixed time every week to continuously track the technical debt trend
  • In CI, you can first use --skip-runtime-checks to quickly produce a static trend, then execute the full check as needed