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│ │
|
||||
│ │ 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).
|
||||
|
||||
|
|
|
|||
|
|
@ -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ロック、インジェクション対策)。
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
type: schema
|
||||
---
|
||||
|
||||
# Obsidian Vault Schema
|
||||
|
||||
> このファイルはLLMがvaultを読み書きする際のルール定義。
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 "")
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue