feat: gen_weekly を LLM ベースで復活(期間限定メニュー対応)#34
Open
whywaita wants to merge 1 commit into
Open
Conversation
旧 gen_weekly(Twitter API + Cloud Vision OCR、2023-07 の API 有料化で 停止)を LLM ベースで再実装する。 - gen_weekly/: weekly.csv / limited.csv へ検証付きで追記する Go CLI (月曜チェック・価格検証・重複 skip。テスト付き) - .opencode/command/gen-menu.md: ツイート取得と画像読み取りの手順書。 週替わり定食に加え、冷やし中華などの期間限定メニュー告知にも対応。 .claude/commands/gen-menu.md は Claude Code 用の薄いラッパー - .github/workflows/post.yaml: 毎週月曜 13:00 JST に opencode (OpenCode Go、secret OPENCODE_API_KEY)で実行し、変更があれば PR 作成 - .github/workflows/ci.yaml: actionlint + go vet / go test prompt: 以前合った gen_weekly を復活させたい。gen_weeklyは週代わりだけだったが、冷やし中華など固定(期間限定)メニューもツイートで告知されたりするので、それも対応できるようにしておいてほしい ---- 旧実装は Twitter API 依存のため復活不可。LLM ベースの三層構成(CSV 追記用 Go CLI / gen-menu 手順書 / 週次 workflow)で再構築。limited サブコマンドで期間限定メニューに対応し、TDD でテスト 15 ケースを整備した。 ---- prompt: OpenCode GoのSubscriptionを使いたいから、opencodeベースで実装して ---- post.yaml を opencode run ベースに変更(OPENCODE_API_KEY、モデルはリポジトリ変数 OPENCODE_MODEL で変更可、デフォルト opencode/kimi-k2.6)。手順書を .opencode/command/ に移し、Claude Code 用ラッパーを残して単一ソース化した。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
変更点
gen_weekly/:weekly.csv/limited.csvへ検証付きで追記する Go CLI(標準ライブラリのみ)weeklyサブコマンド: 月曜日チェック、YYYYMMDD09/15の ID 自動生成、9番なしの週(2026-01〜03 に実績あり)にも対応limitedサブコマンド: 同一開始日内の連番 ID 生成、同名・同開始日の重複は skip.opencode/command/gen-menu.md: ツイート取得(nitter + headed ブラウザ)と画像読み取り(マルチモーダル、OCR 不要)の手順書。.claude/commands/gen-menu.mdはこれを参照する Claude Code 用ラッパー.github/workflows/post.yaml: 毎週月曜 13:00 JST にopencode runで手順書を実行し、変更があれば PR を作成.github/workflows/ci.yaml: actionlint +gen_weeklyの go vet / go testAGENTS.md: 現状の構成に合わせて更新テスト方法
go -C gen_weekly test ./...CLI 単体は実データのコピーに対して動作確認済み(新規追記・既存 skip・連番付与)。workflow は merge 後に workflow_dispatch で手動実行して確認する。
備考
OPENCODE_API_KEY(OpenCode Go / Zen、https://opencode.ai/auth で発行)の登録が必要OPENCODE_MODELで変更可能(デフォルトopencode/kimi-k2.6)。貼り紙画像を読むため vision 対応モデルであること