fix: resolve all errors from full repository audit
- README/README_JP: fix X bookmark schedule "22:00" → "every 4 hours" - README: standardize skill name /auto-min → /auto-mins - sync-x-bookmarks.sh: fix subshell variable scope (NEW_COUNT always 0) Use process substitution instead of pipe to preserve counter - CLAUDE.md: add missing frontmatter (violated own schema rules) - clips/_index.md: replace personal test data with clean template - on-file-change.sh: replace bare except with specific exceptions - on-session-end.sh: use context managers for file handles Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0d1545b62e
commit
2c2343e081
7 changed files with 21 additions and 17 deletions
|
|
@ -125,7 +125,7 @@ You find an interesting article
|
||||||
│ │ │ │ │ writes│ │
|
│ │ │ │ │ writes│ │
|
||||||
│ │ Skills: │ │ SOUL.md │ │ │
|
│ │ Skills: │ │ SOUL.md │ │ │
|
||||||
│ │ /clip │ │ MEMORY.md │ ┌────┴────┐ │
|
│ │ /clip │ │ MEMORY.md │ ┌────┴────┐ │
|
||||||
│ │ /auto-min │ │ DREAMS.md │ │ Cloud │ │
|
│ │ /auto-mins │ │ DREAMS.md │ │ Cloud │ │
|
||||||
│ │ 30+ more │ │ daily/ │ │Schedule │ │
|
│ │ 30+ more │ │ daily/ │ │Schedule │ │
|
||||||
│ └──────────────┘ │ clips/ │ │ Tasks │ │
|
│ └──────────────┘ │ clips/ │ │ Tasks │ │
|
||||||
│ │ clients/ │ │ │ │
|
│ │ clients/ │ │ │ │
|
||||||
|
|
@ -447,13 +447,13 @@ Add a cron job to your agent scheduler:
|
||||||
│ └── user/ User profile
|
│ └── user/ User profile
|
||||||
│
|
│
|
||||||
├── clips/ ← Clipped tweets & articles (auto + manual)
|
├── 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)
|
│ ├── articles/ Web articles (via /clip or Slack)
|
||||||
│ ├── _index.md Clip index (auto-updated)
|
│ ├── _index.md Clip index (auto-updated)
|
||||||
│ └── tags.md Tag-based classification (Dataview)
|
│ └── tags.md Tag-based classification (Dataview)
|
||||||
│
|
│
|
||||||
├── clients/ ← Client knowledge (Karpathy pattern)
|
├── clients/ ← Client knowledge (Karpathy pattern)
|
||||||
├── meetings/ ← Meeting summaries (auto from /auto-minutes)
|
├── meetings/ ← Meeting summaries (auto from /auto-mins)
|
||||||
├── decisions/ ← Decision log
|
├── decisions/ ← Decision log
|
||||||
├── insights/ ← Learnings + weekly Dreaming
|
├── insights/ ← Learnings + weekly Dreaming
|
||||||
├── templates/ ← daily-note, meeting, decision
|
├── templates/ ← daily-note, meeting, decision
|
||||||
|
|
@ -603,7 +603,7 @@ score: 74
|
||||||
| `weekly-sync.sh` | Weekly lint: broken links, orphan pages, stale content |
|
| `weekly-sync.sh` | Weekly lint: broken links, orphan pages, stale content |
|
||||||
| `git-pull-sync.sh` | Hourly git pull with stash handling |
|
| `git-pull-sync.sh` | Hourly git pull with stash handling |
|
||||||
| `sync-agent-to-vault.sh` | Enriches daily notes from external agent JSON data |
|
| `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).
|
All scripts are macOS-compatible (no GNU extensions), reviewed for security (no shell injection, PID-based locking instead of flock).
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -431,7 +431,7 @@ vault/
|
||||||
├── skills/ ← スキル一覧+個別ページ(SYNCED)
|
├── skills/ ← スキル一覧+個別ページ(SYNCED)
|
||||||
├── memory/ ← CC Memory個別ファイルミラー(SYNCED)
|
├── memory/ ← CC Memory個別ファイルミラー(SYNCED)
|
||||||
├── clips/ ← ツイート・記事のクリッピング(自動+手動)
|
├── clips/ ← ツイート・記事のクリッピング(自動+手動)
|
||||||
│ ├── x/ Xブックマーク(毎日22:00自動同期)
|
│ ├── x/ Xブックマーク(4時間おき自動同期)
|
||||||
│ ├── articles/ Web記事(/clip or Slack経由)
|
│ ├── articles/ Web記事(/clip or Slack経由)
|
||||||
│ ├── _index.md クリップ一覧(自動更新)
|
│ ├── _index.md クリップ一覧(自動更新)
|
||||||
│ └── tags.md タグ別分類(Dataview対応)
|
│ └── tags.md タグ別分類(Dataview対応)
|
||||||
|
|
@ -527,7 +527,7 @@ gh repo create my-vault --private --source=. --push
|
||||||
| `weekly-sync.sh` | 週次Lint: 壊れたリンク・孤立ページ・古いページ検出 |
|
| `weekly-sync.sh` | 週次Lint: 壊れたリンク・孤立ページ・古いページ検出 |
|
||||||
| `git-pull-sync.sh` | 毎時git pull(stash対応) |
|
| `git-pull-sync.sh` | 毎時git pull(stash対応) |
|
||||||
| `sync-agent-to-vault.sh` | 外部エージェントのJSONデータでdaily note充実化 |
|
| `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ロック、インジェクション対策)。
|
全スクリプトmacOS互換(GNU拡張なし)、セキュリティレビュー済み(PIDロック、インジェクション対策)。
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
|
---
|
||||||
|
type: schema
|
||||||
|
---
|
||||||
|
|
||||||
# Obsidian Vault Schema
|
# Obsidian Vault Schema
|
||||||
|
|
||||||
> このファイルはLLMがvaultを読み書きする際のルール定義。
|
> このファイルはLLMがvaultを読み書きする際のルール定義。
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
date: 2026-04-08
|
date: {{date}}
|
||||||
type: index
|
type: index
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -9,12 +9,10 @@ type: index
|
||||||
|
|
||||||
## Recent
|
## 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
|
## Stats
|
||||||
|
|
||||||
- Total: 3
|
- Total: 0
|
||||||
- X: 3
|
- X: 0
|
||||||
- Articles: 0
|
- Articles: 0
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ try:
|
||||||
d = json.load(sys.stdin)
|
d = json.load(sys.stdin)
|
||||||
ti = d.get('tool_input', d)
|
ti = d.get('tool_input', d)
|
||||||
print(ti.get('file_path', ti.get('path', '')))
|
print(ti.get('file_path', ti.get('path', '')))
|
||||||
except:
|
except (json.JSONDecodeError, AttributeError, TypeError, KeyError):
|
||||||
print('')
|
print('')
|
||||||
" 2>/dev/null || echo "")
|
" 2>/dev/null || echo "")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,8 @@ import os
|
||||||
f = os.environ["DAILY_FILE"]
|
f = os.environ["DAILY_FILE"]
|
||||||
e = os.environ["ENTRY"]
|
e = os.environ["ENTRY"]
|
||||||
|
|
||||||
lines = open(f).readlines()
|
with open(f) as fh:
|
||||||
|
lines = fh.readlines()
|
||||||
out = []
|
out = []
|
||||||
in_log = False
|
in_log = False
|
||||||
done = False
|
done = False
|
||||||
|
|
@ -57,7 +58,8 @@ for l in lines:
|
||||||
if in_log and not done:
|
if in_log and not done:
|
||||||
out.append(e + "\n\n")
|
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"
|
' 2>/dev/null || echo "$ENTRY" >> "$DAILY_FILE"
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ USER_MAP=$(echo "$BOOKMARKS" | jq -r '[.includes.users[]? | {(.id): .username}]
|
||||||
# 各ブックマークを処理
|
# 各ブックマークを処理
|
||||||
# スクリプト単体ではJSON出力のみ。要約・タグ生成はLLMが行う
|
# スクリプト単体ではJSON出力のみ。要約・タグ生成はLLMが行う
|
||||||
NEW_COUNT=0
|
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_ID=$(echo "$tweet" | jq -r '.id')
|
||||||
TWEET_TEXT=$(echo "$tweet" | jq -r '.text // empty')
|
TWEET_TEXT=$(echo "$tweet" | jq -r '.text // empty')
|
||||||
AUTHOR_ID=$(echo "$tweet" | jq -r '.author_id // "unknown"')
|
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))
|
NEW_COUNT=$((NEW_COUNT + 1))
|
||||||
log "New bookmark: $TWEET_ID by @$AUTHOR"
|
log "New bookmark: $TWEET_ID by @$AUTHOR"
|
||||||
echo "{\"id\":\"$TWEET_ID\",\"text\":$(echo "$TWEET_TEXT" | jq -Rs .),\"author\":\"@$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)"
|
log "Sync complete (new: $NEW_COUNT)"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue