rule-promote-audit
Skill0 starsChanged 4 months agoMITView on GitHub
docs/ の自然言語ルールを棚卸しし、common-mistakes.md の advisory 記述から H3(blocking 検証)への昇格候補を機械的に抽出する。トリガー語彙: 自然言語ルール棚卸し, rule-promote audit, ルール行数集計, ルール昇格監査, H3 検証昇格候補, rule promote
In this repository46 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- a11y-standardsSkill
- a11y-static-gateSkill
- adversarial-refute-voteSkill
- antigravity-buildSkill
- architecture-parity-gateSkill
- ci-required-check-installerSkill
- codex-buildSkill
- codex-imagegenSkill
- codex-spark-delegateSkill
- commit-convention-gateSkill
- commit-msg-quality-scoreSkill
- consumer-finding-ledgerSkill
- context-bloat-trackerSkill
- coverage-floor-lockSkill
- destructive-env-guardSkill
- dev-standardsSkill
- eval-dataset-buildSkill
- eval-regression-guardSkill
- fanout-verify-synthSkill
- gate-forgeSkill
- hallucination-rate-meterSkill
- harness-kpi-ledgerSkill
- judge-rubric-voteSkill
- knowledge-citation-coverageSkill
- knowledge-dedup-scanSkill
- knowledge-index-guardSkill
- live-state-verify-guardSkill
- maker-checker-relaySkill
- memory-distillSkill
- mistake-rule-distillSkill
- oneshotSkill
- prompt-ab-evalSkill
- report-shapeSkill
- retry-failure-classifierSkill
- review-finding-reproSkill
- rule-dedup-scanSkill
- rule-promotion-extractSkill
- secret-scan-hardeningSkill
- self-heal-ciSkill
- session-length-compact-auditSkill
- startSkill
- subagent-usage-analyzerSkill
- task-success-rate-trackSkill
- token-codegen-gateSkill
- trigger-vocab-dedupSkill
The file
Files
rule-promote-audit(自然言語ルール棚卸し + H3 昇格候補抽出)
harness-lint.py rule-promoteサブコマンドの skill ラッパ。月次/harness-reviewの一次資料になる観測 skill。 常駐ルール(docs/*.md)は自然言語で書かれ、放置すると肥大・形骸化する。 どのファイルに何行の自然言語ルールがあるかを機械集計し、common-mistakes.mdの advisory 記述のうち再発語を含むものを H3(BLOCK フック等の決定論検証)への 昇格候補として列挙する(原則 P1 自己申告禁止・決定論ゲート)。
目的
docs/*.mdの箇条書き(自然言語ルール行)をファイル別に集計し常駐総量を可視化common-mistakes.mdの advisory bullet のうち再発語(再発 / 繰り返 / 習慣 / 毎回 / 何度も 等)を 含むものを H3 昇格候補 として抽出する(習慣化した逸脱は決定論検証に格上げすべき証拠)- rules dir 欠如は「対象無・観測継続」として exit0(欠如は失敗ではない・空≠ゼロ件)
姉妹 skill との棲み分け
- 本 skill(rule-promote-audit): 入力 =
docs/*.md(静的ルール文書)。ルール行の棚卸し + common-mistakes.md の advisory 記述からの昇格候補。 - rule-promotion-extract: 入力 =
.claude/logs/advisory-fires.jsonl(advisory フックの発火ログ)。実発火の再発回数集計。 - 両者は入力源が異なる(文書 vs ランタイムログ)。両方を突合すると「文書に書いた advisory」と「実際に何度も発火した advisory」の両面から昇格候補を検証できる。
実行手順
python3 scripts/harness-lint.py rule-promoteを実行し人間可読サマリを確認- 出力: rule 行総数 / ファイル別行数 / H3 昇格候補(advisory×再発)
--jsonで機械可読出力(total_rule_lines/per_file[]/items[]/violations)--root DIR/--rules-dir DIRで対象差し替え可
- 昇格候補が出たら、月次
/harness-reviewの B 項で以下を検討:- H3(BLOCK)フック化:
.claude/hooks/に fail-closed(exit2)ガードを追加 +test-hooks.shに block/pass 両ケース - もしくは rule 文言の強化 / 決定論ゲート(
--checkを CI/routine に組込み)
- H3(BLOCK)フック化:
- rule 行総数が増え続ける場合は resident-slim(同 CLI)と併せて常駐圧縮を検討
決定論 --check(コマンドと exit の意味)
python3 scripts/harness-lint.py rule-promote --self-test- exit 0 = self-test PASS: hermetic temp fixture(advisory×再発 bullet 1 件=候補1 / 通常 bullet=非候補 / rules dir 欠如=観測継続 exit0)で抽出ロジックが期待通り。
- exit 非0 = 抽出ロジックが期待とずれている(assertion 失敗を stderr に列挙)。
通常運用の gate は python3 scripts/harness-lint.py rule-promote --check(対象あり かつ 昇格候補>0 で exit1・対象欠如は exit0)。self-test は実源に一切触れず temp fixture のみで検証し、fixture は実行後に削除する。
参照
- 実装:
scripts/harness-lint.py(run_rule_promote/render_rule_promote/selftest_rule_promote・サブコマンドrule-promote) - 入力:
docs/*.md(常駐ルール)/docs/incidents.md(advisory 記述) - 昇格先:
.claude/hooks/(H3 BLOCK フック)/docs/incidents.md//harness-review - 姉妹 skill: rule-promotion-extract(
scripts/rule-promotion.py・advisory-fires.jsonl ベース) - 設計原則: 原則 P1(自己申告禁止・決定論ゲート)/ 空≠ゼロ件
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

