add: 都道府県当てクイズbot#1208
Draft
hakatashi wants to merge 1 commit into
Draft
Conversation
Wikipedia・Chakuwiki等の複数ソースからAIがヒントを生成し、 progressiveに公開しながら都道府県を当てるSlackクイズbotを追加する。 - `prefecture-quiz/`: メインbot実装 - AteQuizサブクラスで1人3回制限・ヒント後問題メッセージ更新を実装 - gpt-4o-miniで5つのヒントを生成(簡単→難しい順で生成しコードで反転) - 都道府県名・旧国名・市区町村名をマスク処理 - 市区町村リストをCSVから動的フェッチ(localgovlistjp) - Wikipedia・Chakuwiki・Wikitravel・コトバンク・todo-ranからソース収集 - `atequiz/index.ts`: `isValidAnswer()`・`onHintPosted()`フックを追加 - `lib/openai.ts`: dev環境でFirestore db=nullの場合のnull安全性を修正 - `achievements/achievements.ts`: prefecture-quizカテゴリの実績を4つ追加 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
|
えへ~ ありがとう! レビューさせてもらうにゃ! |
|
Contributor
|
🤖 I'm sorry @hakatashi, but I was unable to process your request. Please see the logs for more details. |
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.




概要
Wikipedia・Chakuwiki等の複数ソースからAIがヒントを自動生成し、progressiveに公開しながら都道府県を当てるSlackクイズbotを追加します。
主な機能
都道府県当てクイズとメッセージを送るとクイズ開始変更ファイル
新規 (
prefecture-quiz/)index.ts— メインbot (PrefectureQuizBot extends ChannelLimitedBot)PrefectureAteQuiz.ts—AteQuizサブクラス(3回制限・問題メッセージ更新)answers.ts— 正解リスト生成・バリデーション・マスク処理answers.test.ts— ユニットテスト(15件)hints.ts— gpt-4o-mini によるAIヒント生成(簡単順で生成→逆順出力)municipalities.ts— 市区町村リストを localgovlistjp CSVからフェッチ・キャッシュoldProvinces.ts— 旧国名マッピング(47都道府県分)sources.ts— Wikipedia・Chakuwiki・Wikitravel・コトバンク・todo-ranからソース収集wikipedia.ts— MediaWiki API ユーティリティ(レート制限対策済み)既存ファイルの変更
atequiz/index.ts—isValidAnswer()/onHintPosted()フックを追加(後方互換)lib/openai.ts— dev環境でFirestoredb=nullの場合のnull安全性を修正achievements/achievements.ts—prefecture-quizカテゴリの実績を4つ追加index.ts—productionBotsにprefecture-quizを追加Test plan
npm test -- prefecture-quizでユニットテストが通ることを確認#sandboxで都道府県当てクイズを送信してクイズが起動することを確認〇〇にマスクされることを確認🤖 Generated with Claude Code