diff --git a/README.md b/README.md index 8853c47..e5f2164 100644 --- a/README.md +++ b/README.md @@ -125,7 +125,7 @@ You find an interesting article │ │ │ │ │ writes│ │ │ │ Skills: │ │ SOUL.md │ │ │ │ │ /clip │ │ MEMORY.md │ ┌────┴────┐ │ -│ │ /auto-min │ │ DREAMS.md │ │ Cloud │ │ +│ │ /auto-mins │ │ DREAMS.md │ │ Cloud │ │ │ │ 30+ more │ │ daily/ │ │Schedule │ │ │ └──────────────┘ │ clips/ │ │ Tasks │ │ │ │ clients/ │ │ │ │ @@ -447,13 +447,13 @@ Add a cron job to your agent scheduler: │ └── user/ User profile │ ├── clips/ ← Clipped tweets & articles (auto + manual) -│ ├── x/ X bookmarks (auto-synced daily at 22:00) +│ ├── x/ X bookmarks (auto-synced every 4 hours) │ ├── articles/ Web articles (via /clip or Slack) │ ├── _index.md Clip index (auto-updated) │ └── tags.md Tag-based classification (Dataview) │ ├── clients/ ← Client knowledge (Karpathy pattern) -├── meetings/ ← Meeting summaries (auto from /auto-minutes) +├── meetings/ ← Meeting summaries (auto from /auto-mins) ├── decisions/ ← Decision log ├── insights/ ← Learnings + weekly Dreaming ├── templates/ ← daily-note, meeting, decision @@ -603,7 +603,7 @@ score: 74 | `weekly-sync.sh` | Weekly lint: broken links, orphan pages, stale content | | `git-pull-sync.sh` | Hourly git pull with stash handling | | `sync-agent-to-vault.sh` | Enriches daily notes from external agent JSON data | -| `sync-x-bookmarks.sh` | Auto-fetches X bookmarks + clips (cron 22:00) | +| `sync-x-bookmarks.sh` | Auto-fetches X bookmarks + clips (every 4 hours) | All scripts are macOS-compatible (no GNU extensions), reviewed for security (no shell injection, PID-based locking instead of flock). diff --git a/README_JP.md b/README_JP.md index b048901..a039106 100644 --- a/README_JP.md +++ b/README_JP.md @@ -431,7 +431,7 @@ vault/ ├── skills/ ← スキル一覧+個別ページ(SYNCED) ├── memory/ ← CC Memory個別ファイルミラー(SYNCED) ├── clips/ ← ツイート・記事のクリッピング(自動+手動) -│ ├── x/ Xブックマーク(毎日22:00自動同期) +│ ├── x/ Xブックマーク(4時間おき自動同期) │ ├── articles/ Web記事(/clip or Slack経由) │ ├── _index.md クリップ一覧(自動更新) │ └── tags.md タグ別分類(Dataview対応) @@ -527,7 +527,7 @@ gh repo create my-vault --private --source=. --push | `weekly-sync.sh` | 週次Lint: 壊れたリンク・孤立ページ・古いページ検出 | | `git-pull-sync.sh` | 毎時git pull(stash対応) | | `sync-agent-to-vault.sh` | 外部エージェントのJSONデータでdaily note充実化 | -| `sync-x-bookmarks.sh` | Xブックマーク自動取得+クリップ(cron 22:00) | +| `sync-x-bookmarks.sh` | Xブックマーク自動取得+クリップ(4時間おき) | 全スクリプトmacOS互換(GNU拡張なし)、セキュリティレビュー済み(PIDロック、インジェクション対策)。 diff --git a/vault-template/CLAUDE.md b/vault-template/CLAUDE.md index 8302bc6..0334297 100644 --- a/vault-template/CLAUDE.md +++ b/vault-template/CLAUDE.md @@ -1,3 +1,7 @@ +--- +type: schema +--- + # Obsidian Vault Schema > このファイルはLLMがvaultを読み書きする際のルール定義。 diff --git a/vault-template/clips/_index.md b/vault-template/clips/_index.md index 9d7c6ae..71fc14d 100644 --- a/vault-template/clips/_index.md +++ b/vault-template/clips/_index.md @@ -1,5 +1,5 @@ --- -date: 2026-04-08 +date: {{date}} type: index --- @@ -9,12 +9,10 @@ type: index ## Recent -- [[clips/x/2026-04-08_google-chrome-vertical-tabs]] — Chrome vertical tabs リリース (#chrome #ux) -- [[clips/x/2026-04-07_umiyuki-agent-harness]] — エージェントハーネスにクローズドソースは不適 (#ai #agent) -- [[clips/x/2026-03-01_masahirochaen-ai-brain-book]] — 初著書『AI脳』KADOKAWA出版 (#ai #book) + ## Stats -- Total: 3 -- X: 3 +- Total: 0 +- X: 0 - Articles: 0 diff --git a/vault-template/scripts/on-file-change.sh b/vault-template/scripts/on-file-change.sh index 837ec01..7a51e5f 100755 --- a/vault-template/scripts/on-file-change.sh +++ b/vault-template/scripts/on-file-change.sh @@ -17,7 +17,7 @@ try: d = json.load(sys.stdin) ti = d.get('tool_input', d) print(ti.get('file_path', ti.get('path', ''))) -except: +except (json.JSONDecodeError, AttributeError, TypeError, KeyError): print('') " 2>/dev/null || echo "") diff --git a/vault-template/scripts/on-session-end.sh b/vault-template/scripts/on-session-end.sh index 994d710..91e8ac7 100755 --- a/vault-template/scripts/on-session-end.sh +++ b/vault-template/scripts/on-session-end.sh @@ -39,7 +39,8 @@ import os f = os.environ["DAILY_FILE"] e = os.environ["ENTRY"] -lines = open(f).readlines() +with open(f) as fh: + lines = fh.readlines() out = [] in_log = False done = False @@ -57,7 +58,8 @@ for l in lines: if in_log and not done: out.append(e + "\n\n") -open(f, "w").writelines(out) +with open(f, "w") as fh: + fh.writelines(out) ' 2>/dev/null || echo "$ENTRY" >> "$DAILY_FILE" exit 0 diff --git a/vault-template/scripts/sync-x-bookmarks.sh b/vault-template/scripts/sync-x-bookmarks.sh index a4cff00..d217c16 100755 --- a/vault-template/scripts/sync-x-bookmarks.sh +++ b/vault-template/scripts/sync-x-bookmarks.sh @@ -53,7 +53,7 @@ USER_MAP=$(echo "$BOOKMARKS" | jq -r '[.includes.users[]? | {(.id): .username}] # 各ブックマークを処理 # スクリプト単体ではJSON出力のみ。要約・タグ生成はLLMが行う NEW_COUNT=0 -echo "$BOOKMARKS" | jq -c '.data[]' | while read -r tweet; do +while read -r tweet; do TWEET_ID=$(echo "$tweet" | jq -r '.id') TWEET_TEXT=$(echo "$tweet" | jq -r '.text // empty') AUTHOR_ID=$(echo "$tweet" | jq -r '.author_id // "unknown"') @@ -69,6 +69,6 @@ echo "$BOOKMARKS" | jq -c '.data[]' | while read -r tweet; do NEW_COUNT=$((NEW_COUNT + 1)) log "New bookmark: $TWEET_ID by @$AUTHOR" echo "{\"id\":\"$TWEET_ID\",\"text\":$(echo "$TWEET_TEXT" | jq -Rs .),\"author\":\"@$AUTHOR\"}" -done +done < <(echo "$BOOKMARKS" | jq -c '.data[]') log "Sync complete (new: $NEW_COUNT)"