1仕組みと動作原理
完全な指示ベースのスキル(スクリプトゼロ):すべてのメカニズムは SKILL.md 本文に記述されており、その価値は「ドキュメントが劣化する理由」の分類体系とそれに対応する対処ワークフローにあります。実行者はエージェント自身です。
They trace to one root cause: **a fact was written down in more places than it was defined.** Everything below follows from fixing that.
コア判定器は Drift Test の3つの問い(順次評価し最初に該当した時点で停止):既存の詳細から計算可能か→derived(記述しない);計算不可だが他に権威ある定義があるか→copy(リンクに置換);それ以外で「特定時点の事実の記録」か→記述可(ドリフトとして削除してはならない)。
ask these three questions **in order, and stop at the first hit**: **1. Can this be computed from details already recorded here or in the authoritative source?**
Mode 1(変更後ガバナンス)は7段階の手順で実行され、その順序自体が論理的根拠を構成:変更から影響を受ける事実を列挙→SSOTの確定→実装とドキュメントの乖離を解決→各ドキュメントの処分(更新またはアーカイブ)を決定→変更前にリポジトリ全体で各事実のコピーを検索→ついでに derived 値を整理→固定構造で報告。
**2. Identify the authoritative source (SSOT) for each affected fact.** Which file *defines* this port / path / procedure — as opposed to mentioning it?
削除は規律ある儀式として構成:アーカイブ=履歴を保持したまま読者の導線から外す(git mv で _archive/ へ移動し、すべての被リンクを張り替え)。status: deprecated のまま配置放置することは禁止され、未確認のまま他者管理のドキュメントをアーカイブすることも禁じられています。
"Archive" means: out of the reader's path, still in history. Concretely: look for a convention the project already has (`_archive/`, `archive/`, `deprecated/`, or whatever it uses) and follow it; if there is none, create `_archive/` at the same level as the file. Either way move it with `git mv` so history follows
Mode 2(統合・収縮)のコンテンツ欠落防止ゲート:書き換え前に「耐力項目リスト」(結果節、症状→原因のマッピング、順序制約、スコープ修飾子、閾値の個別抽出)を逐条作成し、削除前のこのリストが書き換え後の検証仕様となります。
**The consequence clause.** "Roll back before retrying" is an instruction; "retrying on a half-applied migration corrupts the `events` table and there is nothing that repairs it automatically" is the reason anyone obeys it.
検証コマンドには実測に基づく落とし穴の記録が多数記載:rg はパス未指定時に stdin を検索する、リテラル・複数行マッチには -F/-U が必須、--no-ignore --hidden と -g '!.git' のトレードオフ、git grep は追跡中ファイルのみ対象、lychee の '0 Total' は成功とみなさないなど。
`rg` skips VCS-ignored files *and* hidden ones by default, and `.github/` — full of documented commands — is hidden. A search without them is looking at a strict subset of the docs (measured: 4 files instead of 6).
機能境界の内蔵:単一ファイルの過大化に対する「階層的圧縮」は claude-md-progressive-disclosurer(daymade-claude-code スイート)に委ね、本スキルは正確性の維持と重複排除のみを担当します。
That is what daymade-claude-code's `claude-md-progressive-disclosurer` skill is built for; prefer it when the problem is size and layering rather than truth or duplication.
2コア機能
3外部依存関係
| Kind | Dependency / Endpoint |
|---|---|
| cli | ripgrep (rg) |
| cli | lychee(可选外链检查器,brew/cargo install) |
| cli | git(git grep / git mv / git show 归档与恢复) |
4推奨統制措置と判定根拠
- scripts/: ローカルスクリプトまたはコマンドの実行: スキル自体にスクリプトはなし。SKILL.md はエージェントに対し、ホスト環境で rg/git grep/lychee などの読み取り専用検索と git mv/ファイル書き換えを実行するよう指示。
- 网络端点: 外部ネットワークアクセスの宣言: デフォルトではなし。lychee を --offline なしで実行した場合、ドキュメント内の外部URLへリクエストを送信(ドキュメントに 'also checks external URLs' と明記)。
- 本地工作目录: ファイルの読み書きと成果物出力: Phase 3 計画に従ってドキュメントファイルを修正/統合/削除;git mv による _archive/ へのアーカイブ移動;CLAUDE.md/AGENTS.md などのガバナンスファイルも同様の管理対象として書き換え。
5二重目の独立検証
- [ok] 纯指令无脚本(资产面) — glob 全量文件:SKILL.md + references/value_analysis_template.md,无 scripts/ 目录。
- [ok] Drift Test 三问与顺序规则 — 原文 'in order, and stop at the first hit' 与 Q1/Q2/Q3 全在;第 3 问优先级说明亦逐字存在。
- [ok] Mode 1 七步与 SSOT 判定 — 步骤编号 1-7 与 SSOT 'defines vs mentioning' 判据原文在。
- [ok] 归档纪律(git mv + 不就地 deprecated) — 'out of the reader's path, still in history'、'git mv'、'do **not** settle for adding status: deprecated frontmatter' 均命中。
- [ok] 删除需人门 / 无人值守停手 — 'Present the Phase 3 plan and get agreement before step 3' 与 'Running unattended and cannot ask: leave the document untouched and report it' 存在。
- [ok] preservation check 防 recall 不防 judgment 的自评缺口 — 'It catches *recall* failures ... It cannot catch *judgment* failures' 原文在,未见自我拔高。
- [ok] 搜索命令面防坑(rg/lychee) — pathless-rg/stdin 陷阱、-F -U、--no-ignore --hidden、lychee '0 Total' 各段均在,附 measured 数字。
- [ok] 网络面仅 lychee 外链可选检查 — 代码零命中;唯一网络点是 SKILL 对 lychee 非 --offline 模式的说明,且推荐先 --offline。
6結論
91fa2a6f6082c893…