# STEP 1926: 孤立度計 (orphan gauge) device v0.1 実装

**日時**: 2026-09-10T09:00 JST
**Tab**: rei-aios-20 [98b6cd]
**Commit**: (本 commit で 記録)
**Route decision**: chat-Claude 判定 3 択 option 2 (別装置、swap 可能性 open のまま prototype)

## 一行 summary

STEP 1909 の chat-Claude 会話成果物 (simulator HTML) が 示す 2 軸 4 値 (LIVE/ORPHAN/RUIN/DEAD) を、 real project artifact に 適用する 装置 (工具 prototype) を `src/aios/orphan-gauge/` + `scripts/orphan-gauge.ts` として 実装。 test 29/29 PASS、 実 repo smoke run で RUIN 107 件 (invention/*.json 系列) を 検出。

## 主要 finding / evidence

- **module**: `src/aios/orphan-gauge/{types,consumption-mode,reference-graph,classify,collect,index}.ts` (6 file)
- **CLI**: `scripts/orphan-gauge.ts` = argv 解釈 + report render
- **test**: `test/step1926-orphan-gauge-test.ts` = 29 assertion, 29 PASS
- **package.json**: `test:step1926` script 登録
- **実 repo smoke** (targets=data,src,scripts,test / days=30 / minRefs=1 / limit=3000):
  - total in-scope 2675 (scoped-out 325 = human-read)
  - LIVE 67 (2.5%) / ORPHAN 364 (13.6%) / **RUIN 107 (4.0%)** ← 疑わしい印 / DEAD 2137 (79.9%)
  - RUIN top 群 = `data/invention/invention-2026-05-*.json` (110-130 日 stale + 2-3 refs 残)
  - ORPHAN top 群 = 本日更新 `data/{crypto,daily-reports,harness-sync}` 系 (auto-gen で 内部参照 なし)
- **honest scope 4 項目** (report.honestScope):
  - 参照 axis は explicit-path literal 出現 lower bound (semantic reference 拾わない)
  - 更新 axis は mtime 依存、 rebase autostash / snapshot restore で 誤 LIVE 化 の 可能性
  - consumption mode は heuristic 分類、 較正機械 (chat-Claude 判定) 未着手
  - RUIN 判定 = 実害 で は ない (単に 疑わしい 印)

## Honest scope

### 主張する
- 更新 axis (mtime + threshold) × 参照 axis (explicit-path lower bound) の 交差 4 象限 分類 machine
- RUIN quadrant を 拾う ability (STEP 1798 「11 日 stale 遠隔配備」 の class の 疑わしい印 を re-detect する 一つの route)
- consumption mode heuristic filter で 「人が読む」 artifact を default で out-of-scope 化 (simulator scope toggle の 実装)
- test 29/29 PASS で classifier + report + filter + reference-graph の end-to-end 動作 evidence

### 主張しない
- **chat-Claude CM-0 の 装置化 で は ない** (option 2 route、 CM-0 との swap 可能性 は open のまま維持)
- 「読む義務」 metric へ の 拡張 で は ない (「読む義務」 の 定義 未 authored、 藤本さん 判断 領域)
- semantic reference (「あの spec に 従う」 のような 明示 path のない 参照) は 拾わない = false RUIN が 出うる
- consumption mode heuristic は 較正未着手 = 誤分類 の 可能性 (path prefix + suffix + filename pattern の 静的 rule のみ)
- RUIN 判定 = 実害 (11 日 stale sitedeploy 等) と は 直結 しない、 further audit 必要

## Failure mode (未来 Claude 用 dataset)

### Anti-pattern (k) simulator を 装置と 誤読 する drift
STEP 1909 は simulator archive (人が触って挙動を確認する)、 v0.1 device は 「real project に 適用 して 疑わしい印 を 抽出 する 工具」 で 別 layer。 混同 する と CM-0 shape 比較 gate を skip した という 誤帰属 が 発生 (chat-Claude 側 が 「装置化」 と 誤解 する pattern)。 **予防**: v0.1 の frame + notepad + memory hook で 全て 「swap 可能性 open」 明示。

### Anti-pattern (l) reference-graph lower-bound を 完全 と 誤伝
extractReferences は explicit-path literal のみ 拾う lower bound。 false RUIN 側 に 偏る (semantic reference 拾わないため、 「参照 なし」 が 実際は 「literal path 参照 なし」 の意味)。 これ を 「参照グラフ 完成」 と 別 tab や 未来 Claude が 誤伝すると、 削除判断 の 根拠 に なりうる。 **予防**: report.honestScope[0] に 明示、 CLI output の Honest scope 表示に literal 出現 lower bound を 常時 print。

### Anti-pattern (m) consumption mode heuristic を 較正 と 誤認
consumption-mode.ts は path pattern の 静的 rule (docs/notepad/*.md → human-read etc.)。 「較正機械 が 別途要る場所」 と simulator は 明示、 device 側 は heuristic であり 較正 では ない。 **予防**: ArtifactVerdict.mode を 常に expose、 誤分類 の 傾向 を 藤本さん judgment で 検出可能。

## Related STEP / memory

- **STEP 1909** = simulator archive (chat-Claude verbatim artifact、 2 軸 4 値 の 起源)
- **STEP 1798** = comparator census 起点、 11 日 stale 遠隔配備 = 実害 anchor (RUIN 判定 の 動機)
- **STEP 1608** = source_freshness v0.4 schema (別 装置 layer、 本 STEP は 併走)
- **STEP 1054** = Pattern 5 「既存実装 audit してから提案」 = 本 device が CM-0 装置化 で ある と 誤読 されない 予防
- **CM-0** = chat-Claude 2026-09-06 提案 (未 file 化) — 本 device の swap target 候補、 判定 3 択 は 継続 open

## chat-Claude 判定 3 択 (STEP 1909 で 提示、 STEP 1926 で も 継続 open)

1. CM-0 abstract shape 「reach: X → Y」 として 仕様化 → orphan gauge は internal-corpus instance として swap で 成立
2. CM-0 が 数学 → 自然科学 固有量 として 定義 → orphan gauge は 別装置、 本 STEP 1926 相当 の 独立 起票 (= 本 STEP は この route)
3. まだ 判定 できない → 追加要件明示

**本 STEP は route 2 を 「工具 prototype」 として 実装、 CM-0 判定 と の 独立 決定**。 route 1 が 選ばれた場合 は orphan gauge を internal-corpus instance として swap 可能 (types.ts の Quadrant + config を 抽象化 する 余地 は 残してある)。

## Attribution

- **Directive source**: 藤本さん explicit go 2026-09-10 発話 「此方を見て頂き…全て進めて頂けますか？孤立度計の制作も先に進めて下さい」
- **Design origin**: [via 藤本さん / orig: chat-Claude simulator (STEP 1909, 2026-09-09)]
- **Implementation author**: Claude Code (rei-aios-20) via STEP 1926, 2026-09-10
- **Not authored by**: chat-Claude directly (simulator は chat-Claude、 device 実装 は 私 側)
- Marker source separation (SAC-5 discipline): directive vs design-origin vs implementation-author を 分離 明示

## Follow-up candidates (別 STEP、 本 STEP で 着手 しない)

- v0.2: semantic reference 拾い (Markdown reference-style link, wikilink 記法 `[[name]]`, source `import from` パス解決)
- v0.3: RUIN quadrant per-artifact に "疑わしさスコア" (age × refCount × mode-weight) の tie-break
- v0.4: chat-Claude CM-0 判定 3 択 が 決着したら、 abstract shape 対応表 or 別装置 起票
- HTML viewer: 実 repo scan output を canvas 4 象限 で 可視化 (STEP 1909 simulator と shape 揃え、 別 STEP)
