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: skiptype-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/XXXany、@ts-ignore/@ts-nocheckeslint-disable- Oversized files (>400 lines)
B. Test signals (Harness Checks)
Focus points:
- Test file/source file ratio
npm run type-checkresultsnpm run testresultsnpm run coverage -- --reporter=json-summaryresults 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:
- Root directory report:
docs/IHS.md - Clear conclusion:
- Repository status:
好 / 坏 - Trend judgment:
变好 / 变坏 / 持平(compared withHEAD~1)
- Repository status:
- 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-checksto quickly produce a static trend, then execute the full check as needed