chore: add disaster recovery section and settings.json backup
- CLAUDE.md: add disaster recovery section with restore procedure for new machine setup (clone posimai-root + claude-memory, restore settings) - claude-settings.json: backup of ~/.claude/settings.json (permissions config) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9c892e723a
commit
cab06ec681
55
CLAUDE.md
55
CLAUDE.md
|
|
@ -10,6 +10,61 @@
|
||||||
2. **memory/ ディレクトリを確認する** — `C:\Users\maita\.claude\projects\c--Users-maita-posimai-project\memory\MEMORY.md` にプロジェクト固有の記憶がある
|
2. **memory/ ディレクトリを確認する** — `C:\Users\maita\.claude\projects\c--Users-maita-posimai-project\memory\MEMORY.md` にプロジェクト固有の記憶がある
|
||||||
3. **`posimai-dashboard/src/data/projects.json` を確認する** — 全アプリの一覧・ステータス・技術スタックがここにある
|
3. **`posimai-dashboard/src/data/projects.json` を確認する** — 全アプリの一覧・ステータス・技術スタックがここにある
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## ディザスタリカバリ(PC 完全消失時の復元手順)
|
||||||
|
|
||||||
|
### バックアップリポジトリ
|
||||||
|
|
||||||
|
| リポジトリ | Gitea(ローカル) | GitHub(クラウド) | 内容 |
|
||||||
|
|-----------|-----------------|-----------------|------|
|
||||||
|
| `posimai-root` | `http://100.76.7.3:3000/mai/posimai-root` | `https://github.com/posimai/posimai-root` (private) | CLAUDE.md / _template / server.js / scripts / deploy-server.sh / claude-settings.json |
|
||||||
|
| `claude-memory` | `http://100.76.7.3:3000/mai/claude-memory` | `https://github.com/posimai/claude-memory` (private) | ~/.claude/memory 以下の全記憶ファイル |
|
||||||
|
|
||||||
|
### 新マシンでの復元手順
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 1. GitHub CLI 認証
|
||||||
|
gh auth login
|
||||||
|
|
||||||
|
# 2. posimai-root を clone(CLAUDE.md・設定類を復元)
|
||||||
|
git clone https://github.com/posimai/posimai-root.git "C:/Users/maita/posimai-project"
|
||||||
|
cd "C:/Users/maita/posimai-project"
|
||||||
|
git remote add gitea http://100.76.7.3:3000/mai/posimai-root.git
|
||||||
|
|
||||||
|
# 3. Claude Code settings を復元
|
||||||
|
cp "C:/Users/maita/posimai-project/claude-settings.json" "C:/Users/maita/.claude/settings.json"
|
||||||
|
|
||||||
|
# 4. claude-memory を clone(AI 記憶を復元)
|
||||||
|
git clone https://github.com/posimai/claude-memory.git "C:/Users/maita/.claude/projects/c--Users-maita-posimai-project/memory"
|
||||||
|
cd "C:/Users/maita/.claude/projects/c--Users-maita-posimai-project/memory"
|
||||||
|
git remote add gitea http://100.76.7.3:3000/mai/claude-memory.git
|
||||||
|
|
||||||
|
# 5. 各アプリを必要に応じて clone
|
||||||
|
# git clone https://github.com/posimai/[app-name].git "C:/Users/maita/posimai-project/[app-name]"
|
||||||
|
# cd [app-name] && git remote add gitea http://100.76.7.3:3000/mai/[app-name].git
|
||||||
|
```
|
||||||
|
|
||||||
|
### posimai-root の更新方法(CLAUDE.md・server.js 等を変更した後)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd C:/Users/maita/posimai-project
|
||||||
|
git add CLAUDE.md claude-settings.json _template/ deploy-server.sh scripts/ server.js
|
||||||
|
git commit -m "chore: update ..."
|
||||||
|
git push gitea main && git push github main
|
||||||
|
```
|
||||||
|
|
||||||
|
### claude-memory の更新方法(AI が記憶を更新した後)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd "C:/Users/maita/.claude/projects/c--Users-maita-posimai-project/memory"
|
||||||
|
git add .
|
||||||
|
git commit -m "chore: update memory"
|
||||||
|
git push gitea main && git push github main
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
### AI が絶対に守るべきルール(違反時は即修正)
|
### AI が絶対に守るべきルール(違反時は即修正)
|
||||||
|
|
||||||
| 禁止事項 | 理由 |
|
| 禁止事項 | 理由 |
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,63 @@
|
||||||
|
{
|
||||||
|
"permissions": {
|
||||||
|
"defaultMode": "acceptEdits",
|
||||||
|
"allow": [
|
||||||
|
"Bash(*)",
|
||||||
|
"Read",
|
||||||
|
"Glob",
|
||||||
|
"Grep",
|
||||||
|
"WebSearch",
|
||||||
|
"WebFetch",
|
||||||
|
"Bash(git *)",
|
||||||
|
"Bash(npm *)",
|
||||||
|
"Bash(npx *)",
|
||||||
|
"Bash(node *)",
|
||||||
|
"Bash(python3 *)",
|
||||||
|
"Bash(flutter *)",
|
||||||
|
"Bash(vercel *)",
|
||||||
|
"Bash(gh *)",
|
||||||
|
"Bash(curl *)",
|
||||||
|
"Bash(scp *)",
|
||||||
|
"Bash(ssh *)",
|
||||||
|
"Bash(ls*)",
|
||||||
|
"Bash(find *)",
|
||||||
|
"Bash(mkdir *)",
|
||||||
|
"Bash(mv *)",
|
||||||
|
"Bash(cp *)",
|
||||||
|
"Bash(rm -f *)",
|
||||||
|
"Bash(rm -r *)",
|
||||||
|
"Bash(chmod *)",
|
||||||
|
"Bash(cat *)",
|
||||||
|
"Bash(grep *)",
|
||||||
|
"Bash(head *)",
|
||||||
|
"Bash(tail *)",
|
||||||
|
"Bash(sed *)",
|
||||||
|
"Bash(awk *)",
|
||||||
|
"Bash(echo *)",
|
||||||
|
"Bash(printf *)",
|
||||||
|
"Bash(wc *)",
|
||||||
|
"Bash(xargs *)",
|
||||||
|
"Bash(unzip *)",
|
||||||
|
"Bash(bash *)",
|
||||||
|
"Bash(keytool *)",
|
||||||
|
"Bash(yes)",
|
||||||
|
"Bash(for *)",
|
||||||
|
"Bash(do *)",
|
||||||
|
"Bash(done*)"
|
||||||
|
],
|
||||||
|
"deny": [
|
||||||
|
"Bash(rm -rf *)",
|
||||||
|
"Bash(git reset --hard *)",
|
||||||
|
"Bash(git push --force *)",
|
||||||
|
"Bash(git clean *)",
|
||||||
|
"Bash(sudo *)"
|
||||||
|
],
|
||||||
|
"additionalDirectories": [
|
||||||
|
"c:\\Users\\maita\\posimai-project\\_template",
|
||||||
|
"c:\\Users\\maita\\posimai-project\\posimai-analytics\\src\\app\\(galaxy)",
|
||||||
|
"c:\\Users\\maita\\.claude\\projects\\c--Users-maita-posimai-project\\memory",
|
||||||
|
"c:\\Users\\maita\\posimai-project",
|
||||||
|
"/tmp"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue