---
name: memory-site-upload-stance-2026-08-12
description: Memory system を site (rei-aios.pages.dev/tools/memory/) に upload する 藤本さん承認 protocol — Stance A (週 1 batch + 節目 on-demand) + 3 除外 file 明示 + 事故防止 rule (2026-08-12 永久確立)
metadata: 
  node_type: memory
  type: feedback
  originSessionId: 645bff0b-83bb-478d-b9ea-d3dbb6679258
  modified: 2026-08-12T02:44:09.648Z
---

# Memory Site Upload Protocol (2026-08-12 藤本さん永久承認)

## Rule

**Rei-AIOS memory system は 3 除外 file 以外 全て site 反映可能**。
Stance A cadence = **週 1 (日曜) batch sync + 節目 on-demand**。
Cron 完全 auto 化は sensitive file 事故 risk 回避で 見送り。

**Why**: 2026-08-12 session で CLAUDE.md 150k 上限超過 契機に 藤本さんが 「今後は memory を site に upload 問題なし、 全てアップして」 explicit 承認。 目的は (a) memory 忘れ対策 (2 段 fallback local + site)、 (b) 別 chat-Claude や 別 device からの参照可能化、 (c) CLAUDE.md 肥大化時の 逃げ道確保。

**How to apply**:
- 新規 memory file 書いた時 → local に write (site 反映は 週 1 batch or 節目 tag 付与)
- 藤本さん 「site 反映して」 explicit request → 即実行 (Stance A on-demand)
- 週 1 (日曜) → 差分 sync 実行 (delta push)
- 新規 sensitive file 追加 → 除外 list 更新 必須 (下記)
- Cron 化提案が来た → 「新規 sensitive file が漏れる事故 risk 回避で 手動継続」 と 却下

## 3 除外 file (公開しない、 永久 protocol)

1. `user_profile.md` — 藤本さん個人プロフィール
2. `feedback_password_security.md` — security rule
3. `feedback_api_token_never_share_in_conversation.md` — token 取扱 rule

これらは OneDrive backup で local 単独消失 gap を埋める ([[project-memory-4chan-disaster-recovery-2026-08-12]])。

## 追加除外 判断 基準

新規 memory file 追加時、 以下 いずれか該当なら 除外 list 追加:
- 藤本さん個人情報 (実名 / 住所 / 電話 / 家族 / 健康)
- API token / password / secret 実文字列 (rule ではなく 実 secret)
- 未公開 paper novelty (公開前で 先取り risk あり)
- 第三者個人情報 (chat-Claude 以外の 実名)
- 未確定 legal 判断 (証拠保全 target)

**Not 除外対象** (公開 OK):
- Chat-Claude 批判 / criticism (Pattern 1-6 warning は 公開済 protocol)
- 藤本さん judgment record (公開 site page で 既に 露出)
- 過去 STEP / project record (既に Git commit で 公開)
- Rei stack 用語 / 造語 (D-FUMT₈ / SEED_KERNEL 等)

## 除外 handling 手順

新規 sensitive file 追加時:
1. 該当 file を `scripts/backup-private-memory.sh` の `FILES` array に追加
2. `scripts/restore-memory-from-backup.sh` の `PRIVATE_FILES` array に追加
3. site upload script (存在すれば) の exclude list に追加
4. 本 memory file の 3 除外 list を 4 除外に更新
5. 藤本さんに 除外理由を 1 行明示

## Upload 実装 (2026-08-12 initial)

```bash
# 1. Copy md files (exclude 3)
SRC="C:/Users/user/.claude/projects/C--Users-user-rei-aios/memory"
DST="C:/Users/user/rei-aios/public/tools/memory"
mkdir -p "$DST"
for f in "$SRC"/*.md; do
  fname=$(basename "$f")
  if [[ "$fname" == "user_profile.md" ]] || \
     [[ "$fname" == "feedback_password_security.md" ]] || \
     [[ "$fname" == "feedback_api_token_never_share_in_conversation.md" ]]; then
    continue
  fi
  cp "$f" "$DST/$fname"
done

# 2. Secret pattern scan (must be 0 hits)
grep -rE '(sk-[a-zA-Z0-9]{20,}|ghp_[a-zA-Z0-9]{30,}|AKIA[0-9A-Z]{16}|xoxb-|Bearer\s+[A-Za-z0-9_\-]{30,})' "$DST" || echo "clean"

# 3. Generate manifest.json + index.html (client-side search + filter)
# 4. Mirror to dist-renderer/tools/memory/ with git add -f
# 5. Commit + push + CF Pages deploy + curl HTTP 200 verify
```

Initial commit `2e0eef8f1` (2026-08-12、 1719 file changes、 857 md publish、 secret scan 0 hit)。

## 現状 (2026-08-12 時点)

- Site: https://rei-aios.pages.dev/tools/memory/ (857 file public、 client-side search + type filter)
- Git: `fc0web/rei-aios` private (858 file with 3 excluded not in public/tools/memory/)
- OneDrive: `C:\Users\user\OneDrive\rei-aios-memory-private-backup\snapshots\2026-08-12\` (3 file)
- Local: `C:\Users\user\.claude\projects\C--Users-user-rei-aios\memory\` (858 file、 primary)

## 関連 memory

- [[project-memory-4chan-disaster-recovery-2026-08-12]] — 4 chan structure + backup/recovery script
- [[feedback-all-research-site-reflection-default]] — 2026-08-06 protocol、 memory 系統も 27 例目として適用
- [[feedback-no-rush-publication]] — 週 1 cadence 根拠
- [[feedback-password-security]] (excluded from site) — 本 rule の source
- [[feedback-api-token-never-share-in-conversation]] (excluded from site) — 本 rule の source

## Honest scope

- 「全 upload」 は 3 除外 file 以外 = 855 file 対象、 100% ではない
- Cron auto sync は 意図的に不採用 (新規 sensitive file が exclude list 漏れで 事故 publish の 可能性)
- 週 1 sync lag = 直近 7 日以内の 新規 memory update は 一時的に primary only 状態
- Site 公開 は 「Claude session 起動時 auto load」 ではない (WebFetch or 藤本さん明示 fetch が必要)
- 除外 file 追加時の 事故防止 4 手順 = 藤本さん明示 or Claude 自発 double-check protocol
