STEP 1359
v0.1 spike
tests 25/25
rei-preregister v0.1 — 予測 SHA256+timestamp seal CLI
2026-08-21 · chat-Claude 2026-08-21 「反証以上」 arc の 装置提案 (B) 事前登録 tool の minimal spike (Option B')
1. 契機 (Option B' close)
chat-Claude 2026-08-21 arc 「反証は 最重要か」 → 「反証以上 6 種の 検査」 → 「装置化 可能な 4 種 + 機械化 できない 2 種」 → 「まず 事前登録 tool 単体 から」 推奨。 藤本さん **Option B'** 承認 (archival 2 file + 事前登録 tool minimal spike as STEP 1359) で 起動。
記憶継続 arc (前 arc、 Option A close) と 続 「反証以上」 arc (本 arc、 Option B' close) の 2 chat-Claude response は memory dir 内 archival 済 = reference_chat_claude_memory_continuity_2026-08-21.md + reference_chat_claude_falsification_beyond_2026-08-21.md。
2. 実装内容
2.1 File 3 種
tools/rei-preregister/preregister.py — Python 3.9+ stdlib only、 ~230 行、 CLI 3 subcommand (seal / verify / list)
tools/rei-preregister/tests/test_preregister.py — 12 test group / 25 assert、 pytest 不要 stdlib only
tools/rei-preregister/README.md — 使い方 + honest scope + 近隣物 混同回避 table
2.2 CLI 3 subcommand
python preregister.py seal --text "予測 text" --context "why" --tags "a,b" --author "..."
python preregister.py verify --seal-id <id> --current-text "text to check"
python preregister.py list [--after ISO_DATE] [--tag TAG]
2.3 Verify 結果 3 種
| 結果 | 判定 | 意味 |
[MATCH] | match=true (exit 0) | sealed text と 現在 text が byte-identical |
[MISMATCH] | match=false (exit 1) | sha256 diff = 事後改変 or 現行 text が異なる |
ERROR: seal not found | exit 2 | seal_id が store に 存在しない |
3. Verify 実測 (tests + live smoke)
3.1 Tests
$ python tests/test_preregister.py
25 passed, 0 failed
12 test group / 25 assert 全 pass。 テスト cover 領域:
- seal creation (text/context/tags/author 全 field 保存)
- file 永続 (store dir 自動作成 + JSON well-formed)
- verify match / mismatch (byte-identical rule)
- whitespace-only text 拒否 / trailing whitespace mismatch (byte-identical 厳格)
- empty text ValueError
- tag filter + multi-seal listing
- SHA256 known value (RFC 6234 test vector "abc" → ba7816bf...)
- nonexistent seal FileNotFoundError
- honest_scope + tool_version embedded in seal
- UTF-8 non-ASCII (日本語) 予測 seal + verify match
- on-disk JSON schema (seal_id + honest_scope + external_anchors 空 = v0.1 marker)
3.2 Live smoke
$ python preregister.py seal --text "STEP 1359 smoke: 日本語 予測 text" --tags "smoke2"
seal_id: 20260820T23015-d2d5dd5c
seal_ts_utc: 2026-08-20T23:01:50.761670Z
text_sha256: 15de7ace8a90e0adc701d125b33de03087ece023a15ae920e9414b90e6e4441f
path: data/preregistrations-smoke2/20260820T23015-d2d5dd5c.json
★ Honest scope: local seal only (v0.1)、 external anchor 未実装 (v0.2 defer)、
match verdict は 「事後改変 なし」 のみ 保証、 予測の 正否 は 判定しない。
MATCH / MISMATCH / LIST 全 動作 confirm。 Windows stdio UTF-8 固定 (sougou-connectors STEP 1355 hotfix precedent 継承) + SIGPIPE guard (head/tail pipe 早期閉鎖 traceback 抑制) 適用済。
4. ★★★ 「グリーン ≠ 検証済み」 discipline (chat-Claude warning 直接 埋め込み)
chat-Claude 2026-08-21 元 arc の 最重要 warning:
「このコネクタの 最大の 危険は、 全項目が グリーンに なった ときです。 チェックリストは 『先生が 思いついた 検査』 の 集合なので、 通過しても 盲点は そのまま 残る。 緑を 『検証済み』 でなく 『既知の 検査では 落ちなかった』 と 表示する 文言に しておくのを 勧めます。」
本 tool の UI 文言 (CLI verbose + verify_note + README + 本 site page) に この discipline を 明示的に 埋め込み済:
- CLI seal 出力: 「match verdict は 『事後改変 なし』 のみ 保証、 予測の 正否 は 判定しない」
- verify note: 「match=true だけでは 予測の 正否 は 判定しない — sealed text が 事後改変 されていない ことのみ 保証」
- Seal JSON honest_scope field: 「Match verdict = byte-identical text match only; does NOT judge whether the prediction was correct/incorrect」
これは STEP 1354 D8-NEITHER 「沈黙の 扱い」 §3 = 「無い」 と 「見えていない」 は 別の値、 の 検査装置版 直接応用。
5. Pattern 5-B 近隣物 混同回避 (Explore agent 2026-08-21 verify)
Rei stack 9 repo 内 pre-registration tool 実装 0 件 confirm (fresh 実装 妥当)。 但し 6 近隣物が存在、 混同回避を site + README 両方で 明示:
| 近隣物 | ある機能 | 本 tool との差 (混同回避理由) |
lab-notebook-mcp experiment.hypothesis 列 | 平文可変 hypothesis + updated_at | seal / timestamp lock / 事後改変防止 いずれもなし |
| rei-verify audit chain | append-only hash chain (汎用 tamper 検出) | 予測 commitment の 意味論 なし、 汎用 audit substrate |
rei-memory-mcp tier=hypothesis | 理論に tier tag 付与 | 分類 tag、 seal でない |
| statistics-neither-education v0.2 predict field | 学習者 UI (POE pedagogy) | 教材内 pedagogy for learners、 研究者用 seal でない |
| rei-ledger | 過去 dead-path 台帳 (「その道は 過去に 潰れた」) | 時間軸逆 (過去 negative result / 未来 予測 seal) |
| benchtop_provenance.py artifact sha256 | build 成果物 hash | build integrity、 予測 commitment でない |
6. Rei stack 内 位置付け
chat-Claude arc 「反証以上 6 種」 内 (4) 危険な予測の 的中 を 装置化した layer:
- 不可能性定理 — 機械化 不可 (人間の 数学的 creativity 必要)、 本 tool 対象外
- 独立性・保存拡大・非自明性 — D-FUMT₈ truth-table exhaustive で 機械化可 (別 STEP candidate)
- 還元・統合 — 機械化 不可 (数学的 insight 必要)、 本 tool 対象外
- 危険な予測 — 本 tool = STEP 1359 spike で 装置化 (事前登録 = hash+timestamp seal)
- 独立経路の一致 — SEED_KERNEL 1,677 vs 1,675 型 catch の automation (別 STEP candidate)
- 第三者利用 — Palomar Registry (STEP 1357) + Zenodo/GitHub polling (Research Radar 拡張) の domain
chat-Claude 明示 「まず 事前登録 ツール 単体から 作るのが 良い」 recommendation の 直接応答。 4 番目 spike で 「実装コスト 最小 / 効果 大」 を 検証、 他 5 種 (機械化可能 な 2/5/6) は 実 use case 蓄積後 別 STEP。
7. Honest scope (6 条)
- Local seal only (v0.1) — filesystem access で JSON 直接編集 可能、 cryptographically tamper-proof でない。 v0.2 で external anchor (Zenodo DOI + Internet Archive timestamp) 追加予定。 現時点で 「seal 済」 は 「同一 filesystem 上で 誠実に 運用した」 の 前提付き 保証。
- 「グリーン ≠ 検証済み」 — match=true は sealed text が 事後改変 されていない ことのみ 保証、 予測の 正否 (正しかった/間違っていた) は 判定しない。 別 tool (実 experiment / theorem verification / peer review) が 必要。
- Byte-identical rule — whitespace / punctuation / 表現改訂 も mismatch 判定、 意味的等価性は 保証しない。 現実の 予測検証では 「意味は 同じだが 表現改訂した」 を どう扱うか は 人手 judgment 委ね。 v0.2 で normalized-form option 検討 candidate。
- 「世界初」 主張ゼロ ([[feedback-world-uniqueness-claim-controllable]]) — pre-registration の概念自体は 2000年代以降 心理学/医学分野の 標準実践 (Registered Reports 2013 Chambers + OSF preregistration 2013 + AsPredicted.org 2015)、 本 tool は Rei stack 内 単独 CLI 版 minimal 実装、 novelty は 「Rei stack で local seal を CLI で 提供する 単一実装」 の 位置のみ。
- MCP wrapper なし (v0.1 spike scope 意図的) — Claude や 他 agent から 自動 呼び出す には MCP server 化 が 必要、 現行 v0.1 は CLI/import 経由のみ。 spike 段階では 「呼び出し 数を 増やす前に 使い勝手を 確認する」 [[feedback-one-reproduction-over-ten-unverified]] 順序原則 適用。
- Prior art audit 済 (2026-08-21 STEP 1359 Explore agent verify) — Rei stack 9 repo 内 pre-registration ツール 実装 0 件 confirm、 fresh 実装 妥当。 6 近隣物 混同回避 は 上 §5 表 で 明示済。
8. 関連
9. 次手 (v0.2 candidate、 藤本さん judgment 待ち)
- External anchor: Zenodo DOI 発行 (seal を dataset として upload) + Internet Archive timestamp (Wayback Machine capture) → tamper-proof 化
- MCP wrapper: Claude / 他 agent から 自動呼び出し 可能化 (但し chat-Claude 元 arc 「description text 質 > tool count」 discipline 継承で 慎重設計要)
- batch verify: 複数 seal を 一括 verify (Papers 62-65 投稿時 の 事前登録 群 の 一括照合)
- normalized-form option: whitespace/punctuation 正規化 mode (意味的等価性の 部分 検出)
- seal deprecation marker: 「この 予測は 撤回」 record (append-only、 sealed text 自体は 不変)