ClaudeMods
☰
JA
● 0 人がオンライン ・閲覧 0 回
スポンサー作品を投稿
GitHub リポジトリ · 投稿者 STRML

autodream-focus

各プロンプトと返信の右上に `+ autodream focus` ボタンを置く Claude Code mod。押すとそのターンにタグが付き、次回の nightly autodream run が詳しく確認します。オプション機能で `autodream-band` とは別に動作するため、明示的に求めない限りインストールも読み込みも行いません。

STRML@STRML

STRML/autodream/tree/main/mods/autodream-focus

翻訳済み

この mod について

各プロンプトとアシスタントの返信の右上に + autodream focus ボタンを追加する Claude Code mod です。ボタンを押したターンはタグ付けされ、次回の nightly autodream run でレビューされます。押すと $AUTODREAM_DIR/tags.jsonl(既定値は ~/.claude/autodream/tags.jsonl)に JSON の行を追加します。そこには session、row uuid、role、上限を設けた turn text、cwd、UTC timestamp が入ります。その後 bin/vault-notes.sh が未読タグを ## note: focus-… ブロックとして findings/<date>/operator-notes.md に取り込みます。inbox notes と同じ archive gates の下で処理し、tags-consumed.txt の台帳も更新します。インストールは、セッションごとに claude --plugin-dir でオプトインするか、フォルダーを CLAUDE_CODE_PLUGIN_DIRS に追加します。制限事項は、Claude Code transcripts のみであること、tags.jsonl が無制限に増えること(Claude Code は 4 MiB を超える mod ファイルを読みません)、書き込みがアトミックでないこと、mod API が row-id への依存を保証しないことです。テストには claude plugin validate と claude plugin test を使います。

インストール

まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。

claude plugin marketplace add STRML/autodream
claude plugin install autodream-focus
原文 / README

autodream-focus

A Claude Code mod that puts a + autodream focus button at the top right of every prompt and reply. Press it to tag that turn, and the next nightly autodream run takes a close look at it. It is optional and separate from autodream-band: nothing installs or loads it unless you ask.

> why is the build red?                          + autodream focus
  The lockfile is stale. Run npm ci, then ...
  • The button appears while the pointer is over a row. Press it and it becomes ✓ autodream focus and stays, so a glance down the transcript finds what you marked. Press it again to take the tag back.
  • It sits on the right, drawn over the row rather than beside it, so nothing reflows and a narrow split pane loses no width.
  • Only what you typed gets one (at the terminal or from the phone), plus the assistant's text. A task notification or another session's message is not yours to tag.
  • Clicks reach the transcript in fullscreen mode ("tui": "fullscreen"). On the main screen the rows are already in scrollback and cannot be pressed.

Install

Opt in per session:

claude --plugin-dir /path/to/cc-autodream/mods/autodream-focus

Or add the folder to CLAUDE_CODE_PLUGIN_DIRS (colon-separated, next to autodream-band if you use it) to load it in every session. install.sh does not touch this mod.

What a tag does

Pressing the button adds one line to $AUTODREAM_DIR/tags.jsonl (default ~/.claude/autodream/tags.jsonl):

{"id":"<session>:<row>","session":"…","uuid":"<row>","role":"user|assistant","text":"…","cwd":"…","taggedAt":"2026-10-04T22:15:00.000Z"}

text is the turn, capped at 2,000 characters. taggedAt is UTC and the only clock in the line: the mod has no timezone to speak of, so bin/vault-notes.sh decides which local day a tag belongs to. An evening tag is in that day's report, not the next one's.

bin/vault-notes.sh reads that file as a third capture surface, next to notes.md and the vault inbox. Each tag that was made on or before the date being reported, and that no earlier report has read, becomes a ## note: focus-… block in findings/<date>/operator-notes.md: the quoted turn, the speaker, the project, the session id and the transcript's path, with an instruction to read the turn in context and report on it. L2 already reads that file and has the Read tool, so the prompt needed no change.

A tag is consumed only after a complete report, under the same gates as an inbox note (archive, not collect): a failed run, or a rebuild of an old date, leaves it pending. Consumed tags (id, report date and taggedAt) go in tags-consumed.txt, a ledger this script writes and the mod never does, so a session open at 03:15 cannot race the run. vault-notes.sh status shows both counts.

vault-notes.sh needs jq for this. Without it the tags are reported as UNREADABLE in the operator notes and nothing is consumed.

Where it looks

| Variable | Default | | --- | --- | | AUTODREAM_DIR | ~/.claude/autodream (where tags.jsonl is) | | AUTODREAM_TAGS_FILE | $AUTODREAM_DIR/tags.jsonl (moves the file itself, as it does for bin/vault-notes.sh) |

A value set only in $AUTODREAM_DIR/config is invisible to the mod, because the mod cannot source a shell file. Export it in the environment Claude Code starts from if you moved the install.

Limits

  • Claude Code transcripts only. OMP sessions have no focus button.
  • tags.jsonl only grows, at most about 2 KB a tag, and Claude Code will not read a file over 4 MiB for a mod. Past that the button says it cannot read the file and changes nothing, rather than rewriting it from empty. Prune it by hand (and tags-consumed.txt with it) long before then.
  • Every press rewrites the file from what is on disk, so two open sessions mostly keep each other's tags, but the write is not an atomic rename and the gap between its read and its write is not closed.
  • Whether a row's id is the transcript's own uuid is not guaranteed by the mod API, so a note points at the session and quotes the turn instead of relying on the id to find it.

Tests

claude plugin validate mods/autodream-focus
claude plugin test mods/autodream-focus

The vault-notes.sh side is covered by the test_focus_tag_* cases in tests/run-all.sh. For tsc -p mods/autodream-focus Claude Code has to have loaded the mod once: it writes the type definitions into .claude-plugin/types/, which is git-ignored. CI does not run the mod's tests, because they need Claude Code itself.

関連作品