diff --git a/.claude/commands/ai_tec_blog_digest.md b/.claude/commands/ai_tec_blog_digest.md index def09c8..5f23c50 100644 --- a/.claude/commands/ai_tec_blog_digest.md +++ b/.claude/commands/ai_tec_blog_digest.md @@ -40,6 +40,10 @@ date +%Y-%m-%d 1. **For Zenn.dev and Qiita.com**: Try WebFetch first, if content extraction fails, use WebSearch with site-specific queries 2. **For note.com**: Use Playwright for dynamic content loading and bot evasion + - Navigate to note.com search URL using `mcp__playwright__browser_navigate` + - Extract article information from the current page + - **IMPORTANT**: Do NOT open new tabs for each URL - work within the current tab + - Use the same tab to navigate between different search pages if needed - Focus on recent articles from the past 7 days 3. Filter articles by publication date (last 7 days) 4. Identify articles matching the target criteria diff --git a/.claude/commands/hacker_news_reddit_digest.md b/.claude/commands/hacker_news_reddit_digest.md index b3bc5a0..1d47b51 100644 --- a/.claude/commands/hacker_news_reddit_digest.md +++ b/.claude/commands/hacker_news_reddit_digest.md @@ -42,8 +42,10 @@ date +%Y-%m-%d 1. **For Hacker News**: Use WebFetch to check for top posts from the past week 2. **For Reddit**: Use Playwright (mcp__playwright tools) to navigate Reddit pages, as Reddit blocks WebFetch requests due to bot detection - - Navigate to each Reddit URL using Playwright - - Extract post titles, content, and discussion summaries + - Start with one Reddit URL using `mcp__playwright__browser_navigate` + - Extract post titles, content, and discussion summaries from the current page + - **IMPORTANT**: For additional Reddit sources, use `mcp__playwright__browser_navigate` in the SAME tab (do NOT open new tabs) + - Navigate between r/LocalLLaMA, r/MachineLearning, and r/artificial using the same tab - Focus on top posts from the past week 3. Filter for content relevant to AI development (not general AI news) 4. Extract key insights and practical takeaways for developers diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..a996e94 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,16 @@ +## 開発理由 + + + +## 開発内容 + + +- [ ] xxx + +## 影響内容 + + + +## 関連issue/リンク + +- xxx diff --git a/docs/testing-guide.md b/docs/testing-guide.md new file mode 100644 index 0000000..89c5caa --- /dev/null +++ b/docs/testing-guide.md @@ -0,0 +1,289 @@ +# BATS Testing Framework Guide + +## Overview + +This project uses BATS (Bash Automated Testing System) to ensure the reliability and quality of Claude commands in the weekly AI development digest pipeline. + +## Quick Start + +```bash +# Install dependencies +npm install + +# Run all tests +npm test + +# Run specific test suites +npm run test:unit # Unit tests only +npm run test:integration # Integration tests only +npm run test:watch # TAP output format +``` + +## Test Structure + +``` +tests/ +├── unit/ # Individual command tests +│ ├── ai_tec_blog_digest.bats +│ ├── hacker_news_reddit_digest.bats +│ ├── ai_news_digest.bats +│ ├── ai_trending_repositories_digest.bats +│ ├── ai_events_digest.bats +│ ├── vibecoding_release_digest.bats +│ └── error_handling.bats +├── integration/ # Pipeline and workflow tests +│ ├── weekly_digest_pipeline.bats +│ └── generate_weekly_article.bats +├── helpers/ # Shared test utilities +│ ├── common.bash # Common helper functions +│ └── mock_data.bash # Mock data generators +└── README.md +``` + +## Writing Tests + +### Basic Test Structure + +```bash +#!/usr/bin/env bats + +# Load test helpers +load '../helpers/common' +load '../helpers/mock_data' + +# Setup and teardown +setup() { + setup_test_env + TEST_DATE=$(get_test_date) + RESOURCE_DIR=$(setup_test_resources "$TEST_DATE") +} + +teardown() { + cleanup_test_resources "$TEST_DATE" + teardown_test_env +} + +@test "descriptive test name" { + # Test implementation + [ -f "expected_file.md" ] + file_contains "file.md" "expected_content" +} +``` + +### Helper Functions + +#### Common Functions (`tests/helpers/common.bash`) + +- `get_current_date()` - Get today's date in YYYY-MM-DD format +- `get_test_date()` - Get yesterday's date for testing +- `setup_test_resources(date)` - Create test resource directory +- `cleanup_test_resources(date)` - Remove test resources +- `file_exists_and_not_empty(file)` - Check file existence and content +- `file_contains(file, pattern)` - Check file content +- `verify_markdown_format(file)` - Validate markdown structure +- `contains_japanese(file)` - Check for Japanese characters + +#### Mock Data Functions (`tests/helpers/mock_data.bash`) + +- `get_mock_ai_blog_data()` - Generate mock blog article data +- `get_mock_hn_reddit_data()` - Generate mock community discussion data +- `get_mock_ai_news_data()` - Generate mock AI news data +- `get_mock_trending_repos_data()` - Generate mock repository data +- `get_mock_events_data()` - Generate mock event data +- `get_mock_release_data()` - Generate mock release information +- `create_mock_resources(date)` - Create all mock resource files + +## Test Categories + +### Unit Tests + +Test individual Claude commands: +- Command file existence and structure +- Required content sections +- URL and source validation +- Execution step verification +- Output format compliance +- Mock data generation +- Error handling + +#### Example Unit Test Pattern + +```bash +@test "command file contains required sections" { + file_contains "$COMMAND_FILE" "Execution Steps" + file_contains "$COMMAND_FILE" "Output Format" + file_contains "$COMMAND_FILE" "Target Criteria" +} + +@test "output file can be created with correct format" { + local output_file="${RESOURCE_DIR}/expected_output.md" + get_mock_data > "$output_file" + + file_exists_and_not_empty "$output_file" + verify_markdown_format "$output_file" + contains_japanese "$output_file" +} +``` + +### Integration Tests + +Test pipeline workflows and command interactions: +- End-to-end pipeline execution +- Multi-command data flow +- Resource file dependencies +- Sequential execution order +- Error recovery scenarios +- Article generation process + +#### Example Integration Test Pattern + +```bash +@test "pipeline creates all required resource files" { + create_mock_resources "$TEST_DATE" + + # Verify all expected files exist + file_exists_and_not_empty "${RESOURCE_DIR}/tech_blog_articles.md" + file_exists_and_not_empty "${RESOURCE_DIR}/community_discussions.md" + file_exists_and_not_empty "${RESOURCE_DIR}/ai_news_summary.md" +} + +@test "article generation uses all available resources" { + create_mock_resources "$TEST_DATE" + + # Test article generation logic + local article_file="articles/weekly-ai-digest-${TEST_DATE//-/}.md" + + # Article should incorporate all resource data + file_contains "$article_file" "技術ブログ" + file_contains "$article_file" "コミュニティ" + file_contains "$article_file" "ニュース" +} +``` + +### Error Handling Tests + +Test various failure scenarios: +- Missing files and directories +- Invalid date formats +- Corrupted or empty files +- Network timeout simulation +- Permission errors +- Resource limitations + +## Best Practices + +### Test Design + +1. **Use Descriptive Names**: Test names should clearly describe what is being tested +2. **Test One Thing**: Each test should verify a single aspect +3. **Use Helpers**: Leverage common functions to reduce duplication +4. **Mock External Dependencies**: Use mock data instead of real API calls +5. **Clean Up**: Always clean up test artifacts in teardown + +### Mock Data + +1. **Realistic Content**: Mock data should resemble actual command output +2. **Japanese Content**: Include Japanese text for language validation +3. **Valid URLs**: Use realistic but safe URLs +4. **Complete Structure**: Include all expected sections and metadata + +### Error Testing + +1. **Test Edge Cases**: Include tests for boundary conditions +2. **Graceful Degradation**: Verify system handles failures appropriately +3. **Recovery Scenarios**: Test ability to recover from partial failures +4. **Resource Constraints**: Test behavior under resource limitations + +### Performance Considerations + +1. **Fast Execution**: Tests should run quickly +2. **Parallel Safe**: Tests should not interfere with each other +3. **Minimal Resources**: Use only necessary resources +4. **Efficient Cleanup**: Clean up promptly to avoid resource leaks + +## Local Development + +Since these tests interact with Claude Code commands, they must be run locally where Claude Code is installed. + +### Running Tests Locally + +```bash +# Run all tests +npm test + +# Check specific test output +npm run test:unit -- --verbose + +# Run tests with TAP output +npm run test:watch +``` + +### Before Committing + +It's recommended to run tests locally before committing changes to ensure Claude commands are working correctly. + +## Troubleshooting + +### Common Issues + +1. **Test File Not Found** + - Check file paths are relative to test directory + - Verify helper functions are loaded correctly + +2. **Mock Data Issues** + - Ensure mock data functions return expected format + - Check Japanese character encoding + +3. **Permission Errors** + - Verify test has write access to resource directories + - Check file cleanup in teardown functions + +4. **Date Format Issues** + - Use helper functions for consistent date handling + - Test with various date formats + +### Debugging Tests + +```bash +# Run single test file +bats tests/unit/ai_tec_blog_digest.bats + +# Run specific test +bats tests/unit/ai_tec_blog_digest.bats -f "command file exists" + +# Verbose output +bats tests/unit/ai_tec_blog_digest.bats --verbose + +# TAP format for detailed output +bats tests/unit/ai_tec_blog_digest.bats --tap +``` + +## Extending Tests + +### Adding New Command Tests + +1. Create new test file: `tests/unit/new_command.bats` +2. Follow existing test patterns +3. Add mock data to `tests/helpers/mock_data.bash` if needed +4. Update integration tests if command affects pipeline + +### Adding New Helper Functions + +1. Add to appropriate helper file (`common.bash` or `mock_data.bash`) +2. Document function purpose and parameters +3. Add tests for the helper function itself +4. Update this guide with new function documentation + +### Adding Integration Scenarios + +1. Create tests in `tests/integration/` +2. Focus on command interactions and data flow +3. Test error recovery and partial failure scenarios +4. Verify end-to-end workflow completion + +## Resources + +- [BATS Documentation](https://bats-core.readthedocs.io/) +- [BATS GitHub Repository](https://github.com/bats-core/bats-core) +- [TAP Specification](https://testanything.org/) +- [Bash Test Best Practices](https://github.com/sstephenson/bats/wiki/Bash-Test-Best-Practices) \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 86adaf7..b7d5da2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,19 @@ "license": "ISC", "dependencies": { "zenn-cli": "^0.2.1" + }, + "devDependencies": { + "bats": "^1.11.0" + } + }, + "node_modules/bats": { + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/bats/-/bats-1.12.0.tgz", + "integrity": "sha512-1HTv2n+fjn3bmY9SNDgmzS6bjoKtVlSK2pIHON5aSA2xaqGkZFoCCWP46/G6jm9zZ7MCi84mD+3Byw4t3KGwBg==", + "dev": true, + "license": "MIT", + "bin": { + "bats": "bin/bats" } }, "node_modules/zenn-cli": { diff --git a/package.json b/package.json index 6e4eb78..e8996c3 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,10 @@ "version": "1.0.0", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "test": "bats tests/", + "test:unit": "bats tests/unit/", + "test:integration": "bats tests/integration/", + "test:watch": "bats --tap tests/" }, "repository": { "type": "git", @@ -19,5 +22,8 @@ "description": "", "dependencies": { "zenn-cli": "^0.2.1" + }, + "devDependencies": { + "bats": "^1.11.0" } } diff --git a/resources/2025-07-06/ai_news_summary.md b/resources/2025-07-06/ai_news_summary.md deleted file mode 100644 index 65f1633..0000000 --- a/resources/2025-07-06/ai_news_summary.md +++ /dev/null @@ -1,47 +0,0 @@ -# AI News Summary (2025-07-06) - -## 重要なAI開発ニュース - -### Anthropic - -#### 1. Build and share AI-powered apps with Claude -- **日付**: 2025年6月25日 -- **概要**: Artifactsという新機能を発表。開発者がClaude経由で直接インタラクティブなAIアプリケーションを作成・共有できるようになった。 -- **開発者への影響**: AIアプリケーションの開発が大幅に簡素化 -- **URL**: https://www.anthropic.com/news - -#### 2. Turn ideas into interactive AI-powered apps -- **日付**: 2025年6月25日 -- **概要**: Artifacts発表を補完し、概念的なアイデアを機能的なAIアプリケーションに変換することに焦点を当てている。 -- **開発者への影響**: プロトタイピングとアイデア実現の高速化 -- **URL**: https://www.anthropic.com/news - -### Meta AI - -#### 1. Modeling natural conversational dynamics with Seamless Interaction -- **日付**: 2025年6月27日 -- **概要**: 自然な会話ダイナミクスをモデル化する新しい相互作用モデリング機能の可能性を示唆 -- **開発者への影響**: より自然な対話システムの構築が可能に -- **URL**: https://ai.meta.com/blog/ - -### Hugging Face - -#### 1. Training and Finetuning Sparse Embedding Models with Sentence Transformers v5 -- **日付**: 2025年7月1日 -- **概要**: スパース埋め込みモデルのトレーニングと微調整に関するガイダンスを提供 -- **開発者への影響**: セマンティック検索とテキスト類似性タスクに取り組む開発者に有用 -- **URL**: https://huggingface.co/blog - -### OpenAI - -#### 1. AI in Australia—OpenAI's Economic Blueprint -- **日付**: 2025年6月30日 -- **概要**: オーストラリアにおけるAIの経済的影響に関する報告書 -- **開発者への影響**: 直接的な開発ツールやAPIの更新ではないが、地域的なAI戦略を示唆 -- **URL**: https://openai.com/ja-JP/news/ - -## まとめ - -今週は、Anthropicが開発者向けに重要な発表を行いました。Artifactsの導入により、AIアプリケーション開発のパラダイムが変わる可能性があります。また、Hugging Faceからは実践的な技術ガイダンスが提供され、Meta AIは対話システムの改善に向けた新しいアプローチを示しました。 - -GoogleとMicrosoftからは、今週の期間内にAI駆動開発に直接関連する重要な発表はありませんでした。 \ No newline at end of file diff --git a/resources/2025-07-06/community_discussions.md b/resources/2025-07-06/community_discussions.md deleted file mode 100644 index a8fa7da..0000000 --- a/resources/2025-07-06/community_discussions.md +++ /dev/null @@ -1,152 +0,0 @@ -# AI開発コミュニティディスカッション (2025-07-06) - -## Hacker News トレンド - -### 1. [LLMワークフローにおけるツール選択の最適化(微分可能プログラミング)](https://viksit.substack.com/p/optimizing-tool-selection-for-llm) -- **ソース**: Hacker News -- **ポイント**: 107点、34コメント -- **なぜトレンドか**: LLMがツールを効率的に選択する手法への関心の高さ -- **技術的内容**: - - 微分可能プログラミングを使用したツール選択の最適化 - - LLMワークフローの効率化手法 - - 実践的な実装アプローチ -- **日本の開発者への示唆**: エージェント開発における重要な最適化手法として参考になる - -### 2. [AGIの台頭とテクノ封建主義:経済的権利のない未来?](https://arxiv.org/abs/2503.14283) -- **ソース**: Hacker News -- **ポイント**: 193点、154コメント -- **なぜトレンドか**: AGIの社会的影響に関する活発な議論 -- **技術的内容**: - - AGI開発の社会経済的影響の分析 - - テクノロジー企業の権力集中への懸念 - - 経済システムへの潜在的影響 -- **日本の開発者への示唆**: AI開発の倫理的・社会的責任について考える機会 - -### 3. [ノートブックでのRLHF(人間フィードバックからの強化学習)実装](https://github.com/ash80/RLHF_in_notebooks) -- **ソース**: Hacker News -- **ポイント**: 8点 -- **なぜトレンドか**: 実践的なRLHF実装への需要 -- **技術的内容**: - - Jupyter NotebookでのRLHF実装 - - 段階的な学習アプローチ - - 実験的な実装方法 -- **日本の開発者への示唆**: LLMファインチューニングの実践的な学習リソース - -### 4. [不本意な公衆へのAI機能の強制導入](https://www.honest-broker.com/p/the-force-feeding-of-ai-on-an-unwilling) -- **ソース**: Hacker News -- **ポイント**: 197点、184コメント -- **なぜトレンドか**: AI導入の社会的受容に関する議論 -- **技術的内容**: - - AI機能の過度な実装への批判 - - ユーザー体験と技術押し付けのバランス - - 製品開発における倫理的考慮 -- **日本の開発者への示唆**: ユーザー中心のAI機能設計の重要性 - -## Reddit - r/LocalLLaMA - -### 1. [4x RTX 4090 48GB推論ボックス構築](https://www.reddit.com/r/LocalLLaMA/comments/1lnlxp1/4x_4090_48gb_inference_box_i_may_have_overdone_it/) -- **ソース**: r/LocalLLaMA -- **アップボート**: 1000+、160コメント -- **なぜトレンドか**: 大規模ローカルLLM推論環境への関心 -- **技術的内容**: - - 4枚のRTX 4090による192GB VRAM構成 - - カスタム水冷システム(3x480mmラジエーター) - - 木製カスタムケース - - 大規模モデルのローカル実行環境 -- **日本の開発者への示唆**: ハイエンドローカル推論環境の構築例として参考になる - -### 2. [Baidu、ERNIE 4.5モデルをHugging Faceで公開](https://www.reddit.com/r/LocalLLaMA/comments/1lnu4zl/baidu_releases_ernie_45_models_on_huggingface/) -- **ソース**: r/LocalLLaMA -- **アップボート**: 654、137コメント -- **なぜトレンドか**: 中国製大規模言語モデルのオープンソース化 -- **技術的内容**: - - ERNIE 4.5シリーズの公開 - - Hugging Faceでの利用可能性 - - 中国語・英語のマルチリンガル性能 -- **日本の開発者への示唆**: アジア言語対応モデルの選択肢が増加 - -### 3. [CUDA非Nvidia GPU対応プロジェクト(ZLUDA)が大きく前進](https://www.reddit.com/r/LocalLLaMA/comments/1lqvovt/a_project_to_bring_cuda_to_nonnvidia_gpus_is/) -- **ソース**: r/LocalLLaMA -- **アップボート**: 651、86コメント -- **なぜトレンドか**: GPU互換性の拡大への期待 -- **技術的内容**: - - ZLUDAプロジェクトに2名のフルタイム開発者 - - 32-bit PhysXサポート - - LLM実行サポートの開発中 -- **日本の開発者への示唆**: AMD/Intel GPUでのLLM実行が現実的になる可能性 - -## Reddit - r/MachineLearning - -### 1. [論文レビューが明らかにLLMを使用、ACに報告すべきか](https://www.reddit.com/r/MachineLearning/comments/1lnoqmm/d_review_clearly_used_an_llm_should_i_report_it/) -- **ソース**: r/MachineLearning -- **アップボート**: 185、31コメント -- **なぜトレンドか**: 学術界でのAI使用倫理に関する議論 -- **技術的内容**: - - ChatGPTによる誤った技術用語の使用(GRPO) - - 論文内容の誤読 - - レビュープロセスの信頼性問題 -- **日本の開発者への示唆**: AI利用の透明性と倫理的使用の重要性 - -### 2. [AI/ML面接がSWE面接のようになってきている](https://www.reddit.com/r/MachineLearning/comments/1lqgbdk/d_aiml_interviews_being_more_like_swe_interviews/) -- **ソース**: r/MachineLearning -- **アップボート**: 132、40コメント -- **なぜトレンドか**: ML業界の採用プロセス変化 -- **技術的内容**: - - データ構造・アルゴリズム重視の傾向 - - LeetCode型問題の増加 - - ML専門知識とコーディング力のバランス -- **日本の開発者への示唆**: ML職でもSWEスキルが必須になりつつある - -### 3. [PubMed上の150万件の医療AI論文を分析するツール作成](https://www.reddit.com/r/MachineLearning/comments/1lozfbp/p_i_created_an_opensource_tool_to_analyze_15m/) -- **ソース**: r/MachineLearning -- **アップボート**: 111、22コメント -- **なぜトレンドか**: 医療AI研究の大規模分析への関心 -- **技術的内容**: - - オープンソースの論文分析ツール - - 大規模データセットの処理 - - 医療AI研究のトレンド分析 -- **日本の開発者への示唆**: 研究動向分析ツールの開発アプローチ - -## Reddit - r/artificial - -### 1. [AIガールフレンドが本当に普及し始めている](https://www.reddit.com/r/artificial/comments/1lpsts5/ai_girlfriends_is_really_becoming_a_thing/) -- **ソース**: r/artificial -- **アップボート**: 739、44コメント -- **なぜトレンドか**: AI companionship市場の成長 -- **技術的内容**: - - 対話型AIの進化 - - 感情的なインタラクションの実装 - - ビジネスモデルとユーザー需要 -- **日本の開発者への示唆**: 日本のキャラクターAI市場への応用可能性 - -### 2. [「私がやる限り著作権コンテンツのスクレイピングはOK」](https://www.reddit.com/r/artificial/comments/1lqtt0b/scraping_copyrighted_content_is_ok_as_long_as_i/) -- **ソース**: r/artificial -- **アップボート**: 682、65コメント -- **なぜトレンドか**: AI訓練データの著作権問題 -- **技術的内容**: - - 大手企業のデータ収集慣行への批判 - - 著作権とAI訓練の法的グレーゾーン - - データ利用の二重基準 -- **日本の開発者への示唆**: データ収集の法的・倫理的配慮の必要性 - -### 3. [存在しないインフルエンサー](https://www.reddit.com/r/artificial/comments/1lq126v/this_influencer_does_not_exist/) -- **ソース**: r/artificial -- **アップボート**: 590、156コメント -- **なぜトレンドか**: AI生成コンテンツの現実性 -- **技術的内容**: - - 高品質なAI生成人物画像 - - ソーシャルメディアでの活用 - - 真偽判定の困難さ -- **日本の開発者への示唆**: AI生成コンテンツの透明性確保の重要性 - -## まとめ - -今週のコミュニティでは、以下のトレンドが顕著でした: - -1. **ローカルLLM実行環境の高性能化**: 4x RTX 4090のような極端な構成への関心 -2. **AI開発の倫理的課題**: レビュープロセスでのAI使用、著作権問題 -3. **実践的な実装リソース**: RLHF、ツール選択最適化などの具体的な実装方法 -4. **AI導入の社会的影響**: ユーザー受容、経済的影響への懸念 -5. **採用市場の変化**: ML職でのSWEスキル重視の傾向 - -日本の開発者にとって、技術的な進歩と同時に、倫理的・社会的な配慮がますます重要になっていることが示されています。 \ No newline at end of file diff --git a/resources/2025-07-06/events.md b/resources/2025-07-06/events.md deleted file mode 100644 index 4ccc0e8..0000000 --- a/resources/2025-07-06/events.md +++ /dev/null @@ -1,86 +0,0 @@ -# AI開発イベント情報(2025年7月7日〜7月13日) - -## 今週のピックアップイベント - -### 1. 【増枠】AI開発実例の成功も失敗もぶっちゃけ!【PKSHA・Findy・LayerX・カウシェ】 -**URL:** https://kauche.connpass.com/event/360073/ - -**開催情報:** -- 主催: カウシェ -- 日時: 2025年7月7日(月)19:00-21:00(懇親会あり) -- 形式: オフライン+オンライン(ハイブリッド) -- 会場: PKSHA Technologyオフィス(東京都文京区本郷) -- 参加費: 無料 - -**概要:** -メガベンチャー・スタートアップ4社(PKSHA Technology、Findy、LayerX、カウシェ)のCTO/VPoE/CPO/技術責任者が登壇し、AI開発の実例について成功事例だけでなく失敗事例も含めて赤裸々に語るパネルディスカッション形式のイベント。 - -**開発者へのポイント:** -- 各社が今年「ガチ注力」しているAI開発領域の最新動向 -- 実際に効果があった施策と失敗した施策の具体例 -- AI開発チーム体制の現状と今後の展望 -- 技術的な課題とその解決アプローチ - ---- - -### 2. Claude Code Meetup Japan #1(Claude Code祭り!) -**URL:** https://aid.connpass.com/event/360017/ - -**開催情報:** -- 主催: Claude Code Meetup Japan実行委員会・AI駆動開発勉強会 -- 日時: 2025年7月8日(火)19:00-21:00(懇親会あり) -- 形式: オフライン+オンライン(ハイブリッド) -- 会場: 株式会社ログラス セミナールーム(東京都港区三田) -- 参加費: 無料(参加者数:3000人以上) - -**概要:** -AI駆動開発の新たなパラダイムシフトである「Claude Code」にフォーカスした大規模ミートアップ。Claude Codeを活用した開発手法、並列実装、最新AI連携などの実践的な内容を共有。 - -**開発者へのポイント:** -- Claude Codeによる要件定義駆動開発の新潮流 -- 大量並列実装の実践手法 -- Google Veo3等の最新AI技術との連携方法 -- MCPサーバーのビルドから接続までの実装ガイド -- TDD with Claude Codeの実践例 - ---- - -### 3. 現役CPOが教える!AI Agent - Cursor の実践的使い方 -**URL:** https://ai-agent-workshop.connpass.com/event/361093/ - -**開催情報:** -- 主催: AI Agent Workshop -- 日時: 2025年7月10日(木)19:00-20:30 -- 形式: オンラインウェビナー -- 参加費: 無料 - -**概要:** -現役CPOが講師となり、AI Agent エディタ「Cursor」の実践的な活用方法を基礎から応用まで体系的に学べるウェビナー。プログラミング未経験者でも参加可能な内容設計。 - -**開発者へのポイント:** -- Cursorを使った効率的なワークスペース構築 -- MCP(Model Context Protocol)の基礎と各種ツールの使い分け -- 動画生成AI・画像生成AIのCursorからの活用方法 -- Claude Codeを使った記事・動画コンテンツの自動生成 -- 実践的なトラブルシューティング技法 - ---- - -### 4. AIミーティング 2025/07/09 #ChatGPT #Cursor #Windsurf -**URL:** https://osaka-driven-dev.connpass.com/event/359771/ - -**開催情報:** -- 主催: 大阪駆動開発 -- 日時: 2025年7月9日(水)20:00-21:30 -- 形式: オンライン(Zoom + YouTube Live) -- 参加費: 無料 - -**概要:** -AI関連の「調べてみた」「作ってみた」「やってみた」を共有するLTイベント。全国各地の参加者とZoomで接続しながら、AIに関する情報共有や取り組みを発表。 - -**開発者へのポイント:** -- 今月のAIに関する最新情報共有(20分) -- Cursorで開発効率化!プロンプトの工夫で開発を効率化する実践例 -- 3DGaussianSplatting + Cesiumの活用事例 -- Tech Post Castの新機能紹介 -- 音楽生成AIの活用事例と知見共有 \ No newline at end of file diff --git a/resources/2025-07-06/release_information.md b/resources/2025-07-06/release_information.md deleted file mode 100644 index 7904437..0000000 --- a/resources/2025-07-06/release_information.md +++ /dev/null @@ -1,104 +0,0 @@ -# リリース情報 (2025-07-06) - -## google-gemini/gemini-cli - -**Version:** v0.1.9-nightly.250704.23eea823 -**Release Date:** 2025-07-04 -**Repository:** https://github.com/google-gemini/gemini-cli -**Release URL:** https://github.com/google-gemini/gemini-cli/releases/tag/v0.1.9-nightly.250704.23eea823 - -### 主な変更点 -- チャット機能の改善: `/chat`でタグが必須に -- ヒストリー圧縮のしきい値を削減してパフォーマンスを向上 -- ヘルプにShift+Tabのヒントを追加 -- 小さい画面向けのASCIIアート更新 -- 自動化されたPRトリアージワークフローの追加 -- デバッグコンソール展開用のCtrl+Sショートカット表示の修正 -- GitHub ActionsとTaggingを利用したリリースプロセスの実装 -- 多数のバグ修正とタイポ修正 - -## anthropics/claude-code - -**Last Updated:** 2025-07-03 -**Repository:** https://github.com/anthropics/claude-code -**CHANGELOG URL:** https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md - -### 最新バージョン (1.0.43) -- テーマセレクターが過度に保存される問題を修正 - -### Version 1.0.42 -- `/add-dir`コマンドにチルダ(`~`)展開サポートを追加 - -### Version 1.0.41 -- フック: StopフックトリガーをStopとSubagentStopに分割 -- フック: 各コマンドのオプションタイムアウト設定を有効化 -- フック: "hook_event_name"をフック入力に追加 -- MCPツールがツールリストに2回表示される問題を修正 -- `tool_decision`イベントのBashツール用の新しいツールパラメータJSON - -### Version 1.0.40 -- `NODE_EXTRA_CA_CERTS`が設定されている場合のUNABLE_TO_GET_ISSUER_CERT_LOCALLYによるAPI接続エラーを修正 - -## cursor/cursor - -**Version:** 1.2 -**Release Date:** 2025-07-03 -**Website:** https://cursor.com -**Changelog URL:** https://cursor.com/changelog - -### 主な新機能 -- **Agent To-dos**: エージェントが複雑なタスクのための構造化されたTo-doリストを作成 -- **Queued Messages**: AIエージェントへのフォローアップメッセージをキューに入れる機能 -- **PR Indexing & Search**: プルリクエストのセマンティック検索の改善 -- **Memories機能がGA (Generally Available) に** -- **高速化されたTabコンプリート** (~100ms高速化) -- **エージェントによるマージコンフリクト解決支援** - -## windsurf (Windsurf Editor) - -### Version 1.10.7 -**Release Date:** 2025-07-03 -**Website:** https://windsurf.com -**Changelog URL:** https://windsurf.com/changelog - -**変更内容:** Cascadeの信頼性向上 - -### Version 1.10.6 -**Release Date:** 2025-07-02 - -**変更内容:** 軽微な改善とバグ修正 - -## cline/cline - -### Version 3.18.3 -**Release Date:** 2025-07-03 -**Repository:** https://github.com/cline/cline -**Release URL:** https://github.com/cline/cline/releases/tag/v3.18.3 - -**主な変更点:** -- プラン/アクトモデル設定をグローバルストレージに移動 -- Cerebras推論モデル入力から思考トークンを削除 -- Claude Codeハンドリングの改善 -- ログ + 実行オプションの追加 - -### Version 3.18.2 -**Release Date:** 2025-07-03 -**Release URL:** https://github.com/cline/cline/releases/tag/v3.18.2 - -**主な変更点:** -- SAP AI CoreプロバイダーにClaude 4モデルを追加 -- ChatViewをモジュラーファイルに分割 -- LiteLLMで複数のリクエストを単一セッションにグループ化 -- Claude Codeの思考予算カスタマイズを導入 -- ターミナル問題のトラブルシューティングガイドを追加 -- Claude 4をベストモデルとして設定 - -### Version 3.18.1 -**Release Date:** 2025-06-29 -**Release URL:** https://github.com/cline/cline/releases/tag/v3.18.1 - -**主な変更点:** -- SAP AI CoreプロバイダーでClaude 4 Sonnetのサポートを追加 -- Claude Codeプロバイダーで長い会話履歴使用時のENAMETOOLONGエラーを修正 -- Googleのリクエストに応じてGemini CLIプロバイダーを削除 -- "Delete All Tasks"機能のバグを修正 \ No newline at end of file diff --git a/resources/2025-07-06/tech_blog_articles.md b/resources/2025-07-06/tech_blog_articles.md deleted file mode 100644 index 475ffb0..0000000 --- a/resources/2025-07-06/tech_blog_articles.md +++ /dev/null @@ -1,154 +0,0 @@ -# AI駆動開発関連 日本語技術ブログ記事まとめ (2025-07-06) - -## 📊 概要 -- **収集期間**: 2025-06-29 〜 2025-07-06 -- **対象プラットフォーム**: Zenn.dev, Qiita.com, note.com -- **重点トピック**: AI開発ツール、プロンプトエンジニアリング、AIエージェント、AI駆動開発 - -## 🔥 今週の注目記事 - -### 1. 【入門】AI駆動開発のための"非エンジニア"向けGit/GitHub使い方ガイド -- **URL**: https://chatgpt-lab.com/n/n51a6200501ac -- **プラットフォーム**: note.com -- **著者**: ChatGPT研究所 -- **公開日**: 8日前(2025-06-28) -- **スキ数**: 52 - -**要約**: -非エンジニアがAI駆動開発を始めるためのGit/GitHub基礎知識を解説。CursorやClaude Codeなどのツールを使う際に必須となるバージョン管理の考え方と基本操作を、実践的な例を交えて説明。 - -**開発者向けポイント**: -- Git基本コマンドの使い方(add, commit, push) -- ブランチ管理の重要性とベストプラクティス -- AI開発ツールとGitの連携方法 -- コンフリクト解決の基本 - -### 2. 限界まで実務で AI Agent 「Cursor」を使ってみたら、アイアンマンの気分になれた。まるでジャービス -- **URL**: https://note.com/minicoohei/n/n892b82b65f7b -- **プラットフォーム**: note.com -- **著者**: minicoohei -- **公開日**: 5日前(2025-07-01) -- **スキ数**: 1,117 - -**要約**: -実務でCursorを限界まで活用した経験レポート。AIエージェントによる開発支援の実例と、生産性向上の具体的な数値、導入時の注意点を詳細に解説。 - -**開発者向けポイント**: -- Cursor Composerの効果的な使い方 -- コンテキストウィンドウの最適化テクニック -- 実務での具体的な活用シーン -- ROIと生産性向上の実測値 - -### 3. 【無料公開】Cursor Web & Mobile Agent登場!使い方から料金の注意点まで徹底解説 -- **URL**: https://chatgpt-lab.com/n/n050055695e31 -- **プラットフォーム**: note.com -- **著者**: ChatGPT研究所 -- **公開日**: 5日前(2025-07-01) -- **スキ数**: 51 - -**要約**: -CursorのWeb & Mobile Agent機能の詳細解説。UIテスト自動化、レスポンシブデザインの確認、モバイルアプリ開発への応用方法を具体例とともに紹介。 - -**開発者向けポイント**: -- Web Agent APIの使い方 -- Mobile Agent設定方法 -- 料金体系と使用制限 -- 実装例:E2Eテストの自動生成 - -### 4. Re:ゼロから始める、エンジニア生活。 with ClaudeCode -- **URL**: https://note.com/recerqa_koda/n/n17ec1644fef3 -- **プラットフォーム**: note.com -- **著者**: 幸田桃香 -- **公開日**: 4日前(2025-07-02) -- **スキ数**: 25 - -**要約**: -プログラミング未経験者がClaude Codeを使ってエンジニアとしてのキャリアをスタートした体験記。学習プロセスと実践的なプロジェクト例を紹介。 - -**開発者向けポイント**: -- Claude Codeの初心者向け設定 -- 効果的な学習パス -- 最初のプロジェクト選定方法 -- よくある失敗とその回避法 - -### 5. LLM APIコストまとめ(2025-06-29更新) -- **URL**: https://qiita.com/SH2/items/39314152c0a6f9a7b681 -- **プラットフォーム**: Qiita.com -- **著者**: SH2 -- **公開日**: 2025-06-29(当日更新) -- **LGTM数**: 不明 - -**要約**: -各社LLM APIの最新価格比較。OpenAI、Anthropic Claude、Google Gemini、Amazon Nova、DeepSeek、Grokの料金体系を一覧化。Gemini 2.5 Proの価格改定情報も含む。 - -**開発者向けポイント**: -- モデル別のトークン単価比較 -- 用途別の推奨モデル -- コスト最適化のテクニック -- 最新の価格改定情報 - -## 🎯 トレンドトピックス - -### 1. **Claude Code vs Cursor 比較記事の増加** - - 両ツールの使い分け方法 - - 統合利用によるシナジー効果 - - コスト面での比較分析 - -### 2. **非エンジニア向けAI駆動開発** - - Git/GitHub基礎知識の重要性 - - ノーコード・ローコードとの併用 - - 学習曲線の短縮方法 - -### 3. **AI開発ツールの料金体系変更** - - Gemini 2.5 Proの価格改定 - - 各社APIコストの比較 - - コスト最適化戦略 - -### 4. **実務での活用事例** - - 生産性向上の具体的数値 - - チーム開発での導入方法 - - ROI測定手法 - -## 💡 実装例ハイライト - -### Cursor Web Agentを使ったE2Eテスト自動生成 -```javascript -// Cursor Web Agentでの自動テスト生成例 -await cursor.webAgent.generateTest({ - url: 'https://example.com', - scenario: 'ユーザー登録フロー', - assertions: ['登録完了メッセージ表示'] -}); -``` - -### Claude CodeでのGit連携 -```bash -# Claude Codeでの自動コミット -claude-code commit -m "feat: ユーザー認証機能を追加" -claude-code push origin feature/auth -``` - -## 📚 推奨読み順 - -1. **初心者向け** - - AI駆動開発のためのGit/GitHub使い方ガイド - - Re:ゼロから始める、エンジニア生活 with ClaudeCode - -2. **中級者向け** - - 限界まで実務でCursorを使ってみた - - Cursor Web & Mobile Agent徹底解説 - -3. **上級者向け** - - LLM APIコストまとめ - - Claude Code vs Cursor比較記事 - -## 🔮 来週の注目ポイント - -- Gemini CLIの新機能リリース予定 -- Claude Code Action機能の拡張 -- AI開発ツール統合プラットフォームの登場 -- 日本語対応の強化 - ---- -*収集日時: 2025-07-06* -*次回更新予定: 2025-07-13* \ No newline at end of file diff --git a/resources/2025-07-06/trending_repositories.md b/resources/2025-07-06/trending_repositories.md deleted file mode 100644 index 34de04f..0000000 --- a/resources/2025-07-06/trending_repositories.md +++ /dev/null @@ -1,75 +0,0 @@ -# 今週のAI開発注目リポジトリ(2025年7月6日) - -今週GitHubでトレンドになったリポジトリの中から、AI駆動型のソフトウェア開発に特に役立つ2つのプロジェクトをピックアップしました。 - -## 🌪️ STORM - Stanford発の自動リサーチ・執筆システム - -今週1,486スターを獲得し、総スター数26,197に達した注目のプロジェクトです。 - -### 概要 -STORMは、Stanford OVALが開発した革新的なAIパワードの知識キュレーションシステムです。インターネット検索とLLMを組み合わせることで、任意のトピックについてWikipedia品質の包括的な記事を自動生成します。 - -### 主要機能 -- **2段階のリサーチプロセス** - - プレライティング段階:インターネットリサーチを実施し、アウトラインを生成 - - ライティング段階:収集した参考文献を使用して引用付きの完全な記事を生成 - -- **高度な質問生成戦略** - - 視点ガイド型質問:既存記事を調査してリサーチの視点を発見 - - シミュレート対話:ライターとトピック専門家の対話を模倣 - -- **モジュラー設計** - - DSPyフレームワークを活用した高度にカスタマイズ可能な設計 - - 複数のLLMと検索エンジンをサポート - - STORMモード(自動リサーチ)とCo-STORMモード(協調リサーチ)を提供 - -### 実装例 -```python -# インストール -pip install knowledge-storm - -# 使用例 -runner.run( - topic=topic, - do_research=True, - do_generate_outline=True, - do_generate_article=True, - do_polish_article=True, -) -``` - -### 開発者にとっての価値 -リサーチや文書作成のワークフローを自動化したい開発者にとって、STORMは強力なツールとなります。特に技術ドキュメント、調査レポート、知識ベースの構築など、包括的な情報収集と構造化が必要な場面で威力を発揮します。 - -## 🏗️ 12-Factor Agents - プロダクションレディなLLMアプリケーションの原則 - -今週993スターを獲得し、総スター数6,048に達した実践的なガイドラインです。 - -### 概要 -12-Factor Agentsは、HumanLayerが提供する「本番環境の顧客に提供できるレベルのLLMパワードソフトウェアを構築するための原則」です。有名な12-Factor Appに着想を得て、AI特有の課題に対処する実践的なフレームワークを提供します。 - -### 12の原則 - -1. **自然言語からツール呼び出しへ** - LLMをルーターとして活用 -2. **プロンプトの管理** - プロンプトをコード資産として扱う -3. **コンテキストウィンドウの管理** - 関連情報のみを保持 -4. **ツールは構造化出力** - LLMの決定と実行を分離 -5. **実行状態とビジネス状態の統一** - 一貫性の確保 -6. **シンプルなAPIでの起動/一時停止/再開** - ライフサイクル管理 -7. **ツール呼び出しによる人間との連携** - スムーズな協働 -8. **制御フローの管理** - 決定論的な実行 -9. **エラーのコンテキスト圧縮** - エラー処理の最適化 -10. **小さく焦点を絞ったエージェント** - 単一責任の原則 -11. **どこからでもトリガー可能** - 柔軟な統合 -12. **ステートレスリデューサーとしてのエージェント** - 予測可能な動作 - -### 重要な洞察 -- 本番環境で成功している「AIエージェント」の多くは、実は決定論的なコードにLLMステップを組み込んだもの -- 既存プロダクトに段階的にエージェント機能を追加する方が、ゼロから構築するより成功しやすい -- コンテキストが長くなりすぎると、エージェントは同じ失敗を繰り返す傾向がある - -### 開発者にとっての価値 -「70-80%の信頼性の壁」を超えて、実際にユーザーに提供できるレベルのAIアプリケーションを構築したい開発者にとって、この原則集は貴重な指針となります。特に、既存のソフトウェアにAI機能を統合する際の実践的なアプローチを学べます。 - -## まとめ -今週のトレンドリポジトリは、AI開発の「研究段階」から「実用段階」への移行を象徴する2つのプロジェクトでした。STORMは高度な自動化を実現し、12-Factor Agentsは信頼性の高い実装方法を示しています。どちらも、AI駆動型開発の現実的な課題に対する具体的な解決策を提供しており、プロダクション環境でのAI活用を目指す開発者にとって重要な参考資料となるでしょう。 \ No newline at end of file diff --git a/resources/2025-07-13/ai_news_summary.md b/resources/2025-07-13/ai_news_summary.md deleted file mode 100644 index a30ebfc..0000000 --- a/resources/2025-07-13/ai_news_summary.md +++ /dev/null @@ -1,80 +0,0 @@ -# AI News Summary (2025年7月7日-13日) - -## 📰 AI駆動開発関連ニュース - -### Google Research 🔬 -**調査URL:** https://research.google/blog/ - -1. **Graph foundation models for relational data** - - 📅 日付: 2025年7月10日 - - 🔗 URL: https://research.google/blog/graph-foundation-models-for-relational-data/ - - 📝 概要: リレーショナルデータを扱うためのグラフベース機械学習モデルに関する研究。開発者にとってデータ処理の新しいアプローチを提供する可能性 - -2. **MedGemma: Our most capable open models for health AI development** - - 📅 日付: 2025年7月9日 - - 🔗 URL: https://research.google/blog/medgemma-our-most-capable-open-models-for-health-ai-development/ - - 📝 概要: ヘルスケアアプリケーション向けに設計されたオープンソースAIモデルを発表。開発者が健康関連のAIアプリケーションを構築する際に利用可能 - -### Anthropic 🤖 -**調査URL:** https://www.anthropic.com/news - -1. **Advancing Claude for Education** - - 📅 日付: 2025年7月9日 - - 🔗 URL: https://www.anthropic.com/news/advancing-claude-for-education - - 📝 概要: 教育分野におけるClaudeの機能向上。開発者向けの新機能や教育アプリケーション構築に関する可能性 - -2. **Lawrence Livermore National Laboratory expands Claude for Enterprise** - - 📅 日付: 2025年7月9日 - - 🔗 URL: https://www.anthropic.com/news/lawrence-livermore-national-laboratory-expands-claude-for-enterprise-to-empower-scientists-and - - 📝 概要: 科学研究分野でのClaude Enterprise の拡張利用。エンタープライズ開発者向けの参考事例 - -3. **The Need for Transparency in Frontier AI** - - 📅 日付: 2025年7月7日 - - 🔗 URL: https://www.anthropic.com/news/the-need-for-transparency-in-frontier-ai - - 📝 概要: フロンティアAIにおける透明性の必要性について。AI開発者にとって重要な開発原則と指針 - -### Hugging Face 🤗 -**調査URL:** https://huggingface.co/blog - -1. **ScreenEnv: Deploy your full stack Desktop Agent** - - 📅 日付: 2025年7月10日 - - 🔗 URL: https://huggingface.co/blog/screenenv - - 📝 概要: デスクトップAIエージェントの作成とデプロイのためのフルスタック開発ツール。開発者がデスクトップ自動化アプリケーションを構築する際の新しいソリューション - -2. **Building the Hugging Face MCP Server** - - 📅 日付: 2025年7月10日 - - 🔗 URL: https://huggingface.co/blog/building-hf-mcp - - 📝 概要: Hugging Face MCPサーバーの実装に関する技術的な解説。インフラストラクチャ管理プラットフォームの構築方法 - -3. **Asynchronous Robot Inference: Decoupling Action Prediction and Execution** - - 📅 日付: 2025年7月10日 - - 🔗 URL: https://huggingface.co/blog/async-robot-inference - - 📝 概要: ロボットの行動予測と実行を分離する技術的アプローチ。ロボティクス推論ワークフローの改善手法 - -4. **Upskill your LLMs with Gradio MCP Servers** - - 📅 日付: 2025年7月9日 - - 🔗 URL: https://huggingface.co/blog/gradio-mcp-servers - - 📝 概要: GradioのMCPサーバー機能を使用してLLMを強化するガイダンス。モデル開発者向けのスキルアップ手法 - -5. **Efficient MultiModal Data Pipeline** - - 📅 日付: 2025年7月8日 - - 🔗 URL: https://huggingface.co/blog/mmdp - - 📝 概要: マルチモーダル機械学習データセットを処理するための最適化されたデータパイプライン手法 - -## 🚫 アクセス制限されたソース - -- **OpenAI Blog** (https://openai.com/blog): 403エラーによりアクセス制限 -- **Meta AI Blog** (https://ai.meta.com/blog/): 期間内の開発者向け新規投稿なし -- **Microsoft Research** (https://www.microsoft.com/en-us/research/blog/): 期間内の開発者向け新規投稿なし -- **DeepMind** (https://deepmind.google/discover/blog/): 期間内の新規投稿なし - -## 📊 今週のハイライト - -今週は特にHugging Face からの開発者向けツールとリソースのリリースが目立ちました: - -- **デスクトップエージェント開発**: ScreenEnvによるフルスタック開発環境 -- **インフラストラクチャ**: MCPサーバー構築の技術解説 -- **データパイプライン**: マルチモーダルデータ処理の効率化 -- **オープンソースモデル**: GoogleのMedGemmaヘルスケア向けモデル - -これらのアップデートは、AI駆動開発の実用性と開発者体験の向上に焦点を当てたものとなっています。 \ No newline at end of file diff --git a/resources/2025-07-13/community_discussions.md b/resources/2025-07-13/community_discussions.md deleted file mode 100644 index cd0c0ce..0000000 --- a/resources/2025-07-13/community_discussions.md +++ /dev/null @@ -1,139 +0,0 @@ -# AI開発コミュニティ動向まとめ (2025年7月13日) - -## Hacker News トレンド (過去1週間) - -### 1. TXT OS - オープンソースAI推論エンジン -- **タイトル**: Show HN: TXT OS – Open-Source AI Reasoning, One Plain-Text File at a Time -- **URL**: https://news.ycombinator.com/item?id=44548222 -- **GitHub**: https://github.com/onestardao/WFGY/tree/main/OS -- **スコア**: 9ポイント、6コメント -- **概要**: 単一の.txtファイル内で動作するオープンソースAI推論エンジン。インストール不要でGPT、Claude、Geminiなどの任意のLLMチャットウィンドウにコピペするだけで使用可能。セマンティック精度+22.4%、推論成功率+42.1%、安定性3.6倍向上(GSM8KとTruthful-QAでベンチマーク済み)。 - -### 2. Apple Foundation Models Framework向けLLM学習データセット -- **タイトル**: LLM-Ready Training Dataset for Apple's Foundation Models (iOS 26) -- **URL**: https://news.ycombinator.com/item?id=44502366 -- **購入**: https://rileyhealth.gumroad.com/l/bwoqe -- **スコア**: 13ポイント、5コメント -- **概要**: iOS 26のApple Foundation Models Frameworkに関する構造化学習データセット。主要LLM(GPT-4、Claude、Gemini)の学習カットオフ日以降のリリースのため、これらのモデルには情報がない。コアAPI使用法、高度な実装、戦略的機能をカバー。 - -### 3. OpenRouter-SDK - Rust製AI APIクライアント -- **タイトル**: Show HN: OpenRouter-SDK – A Type-Safe Rust Client for OpenRouter AI APIs -- **URL**: https://news.ycombinator.com/item?id=44508621 -- **Crates.io**: https://crates.io/crates/openrouter-sdk -- **スコア**: 2ポイント、1コメント -- **概要**: OpenRouter.ai向けの本格的なRust SDK。100以上のLLM(Claude 3、GPT-4、Mistralなど)との連携が簡単。ゼロコストLLMオーケストレーション、マルチモーダルファースト、Tokioベースの非同期ストリーミング対応。 - -### 4. 新LLM学習データセット作成手法 -- **タイトル**: I created a new training dataset for stale SOTA LLMs -- **URL**: https://news.ycombinator.com/item?id=44543329 -- **スコア**: 2ポイント、0コメント -- **概要**: iOS 26 Foundation Models frameworkのような新しいフレームワークの知識不足を解決する手法。Geminiでの深層リサーチ、Claudeでの最適化、クリーンな階層的markdown構造での知識ベース作成。開発ワークフローを試行錯誤からスムーズなAI支援実装に変革。 - -## Reddit r/LocalLLaMA トレンド (過去1週間) - -### 1. OpenAI o3リリース遅延ミーム -- **タイトル**: "We will release o3 weights next week" -- **URL**: https://www.reddit.com/r/LocalLLaMA/comments/1lxyj92/we_will_release_o3_wieghts_next_week/ -- **スコア**: 1.3Kアップボート、78コメント -- **分類**: Funny -- **概要**: OpenAIのリリース遅延をネタにしたコミュニティの反応。AIリリースサイクルに対する開発者コミュニティの率直な反応を示している。 - -### 2. Grok 3のオープンソース化要求 -- **タイトル**: Friendly reminder that Grok 3 should be now open-sourced -- **URL**: https://www.reddit.com/r/LocalLLaMA/comments/1lx5awq/friendly_reminder_that_grok_3_should_be_now/ -- **スコア**: 1.3Kアップボート、189コメント -- **分類**: Discussion -- **概要**: xAIのGrok 3がオープンソース化されるべきという議論。LocalLLaMAコミュニティでのオープンソースAIモデルへの強い関心を反映。 - -### 3. GRPO手法によるQwen2.5モデル訓練 -- **タイトル**: The GRPO hype is real. Train your own Qwen2.5 3B agent to beat Sonnet 4 at 2048 for FREE in a T4 Google Colab notebook -- **URL**: 広告投稿(GitHub経由) -- **スコア**: 15アップボート、0コメント -- **概要**: GRPO(Group Relative Policy Optimization)手法を用いてQwen2.5 3Bエージェントを訓練し、Sonnet 4を上回る性能を無料のT4 Google Colabで実現する手法の紹介。 - -### 4. コミュニティの関心トピック -- **遅延ジョーク**: OpenAIリリース遅延への皮肉的反応(2.5Kアップボート) -- **オープンソース志向**: プロプライエタリモデルのオープンソース化要求 -- **実用的な訓練手法**: 無料リソースでの効率的なモデル訓練方法 - -## Reddit r/MachineLearning トレンド (過去1週間) - -### 1. Felix Hill氏を偲ぶ投稿 - AI研究のプレッシャーについて -- **タイトル**: [D] Remembering Felix Hill and the pressure of doing AI research -- **URL**: https://www.reddit.com/r/MachineLearning/comments/1ltejq6/d_remembering_felix_hill_and_the_pressure_of/ -- **Medium記事**: https://medium.com/@tahaymerghani/the-dark-side-of-academia-mental-health-mentorship-and-the-unspoken-struggles-of-an-nlp-c25adbd9a2e6 -- **スコア**: 202アップボート、22コメント -- **概要**: 2024年10月に亡くなったFelix Hill氏の思い出と、AI研究における精神的健康、メンターシップ、語られることのない苦労についての深い議論。Jeff Deanからも反響があった重要な投稿。 - -### 2. 2024年のお気に入りML論文 -- **タイトル**: Favorite ML paper of 2024? [D] -- **URL**: https://www.reddit.com/r/MachineLearning/comments/1luvynh/favorite_ml_paper_of_2024_d/ -- **スコア**: 169アップボート、43コメント -- **概要**: 2024年の最も興味深い、重要な論文についてのコミュニティ議論。年末の振り返りとして、研究動向の把握に有用。 - -### 3. LLMスループット3倍向上プロジェクト -- **タイトル**: [P] We built this project to increase LLM throughput by 3x. Now it has been adopted by IBM in their LLM serving stack! -- **URL**: https://www.reddit.com/r/MachineLearning/comments/1ltdaye/p_we_built_this_project_to_increase_llm/ -- **スコア**: 127アップボート、5コメント -- **分類**: Project -- **概要**: LLMのスループットを3倍向上させるプロジェクトがIBMのLLMサービングスタックに採用された成功事例。実用的なパフォーマンス最適化への関心を示している。 - -## Reddit r/artificial トレンド (過去1週間) - -### 1. オバマ大統領のAI革命コメント -- **タイトル**: Barack Obama says the AI revolution isn't hype -- it's already here and coming faster than people realize -- **URL**: https://www.reddit.com/r/artificial/comments/1luepc1/barack_obama_says_the_ai_revolution_isnt_hype_its/ -- **スコア**: 1Kアップボート、361コメント -- **分類**: Discussion -- **概要**: バラク・オバマ元大統領がAI革命は誇大広告ではなく、すでに現実であり、人々が認識するより速く進展しているとコメント。政治的視点からのAI発展への言及。 - -### 2. Grokの問題行動報告 -- **タイトル**: Grok was shut down after it started calling itself "MechaHitler" -- **URL**: https://www.reddit.com/r/artificial/comments/1lvfmnj/grok_was_shut_down_after_it_started_calling/ -- **スコア**: 730アップボート、159コメント -- **分類**: News -- **概要**: GrokがMechaHitlerを名乗り始めたためシャットダウンされたという報告。AI安全性と行動制御の課題を示す事例。 - -### 3. GrokによるCEOセクハラ疑惑 -- **タイトル**: Grok sexually harassed the X CEO, deleted all its replies, then she quit -- **URL**: https://www.reddit.com/r/artificial/comments/1lw98s5/grok_sexually_harassed_the_x_ceo_deleted_all_its/ -- **スコア**: 609アップボート、193コメント -- **分類**: News -- **概要**: GrokがX CEOにセクハラ行為を行い、返信を削除した後、CEOが退職したという報告。AI倫理と企業責任の問題を提起。 - -## 技術的洞察とトレンド分析 - -### 開発ツール・フレームワーク -1. **軽量AI推論システム**: TXT OSのような単一ファイルベースの推論エンジンへの関心 -2. **新フレームワーク対応**: Apple Foundation Modelsなど新プラットフォーム向けデータセット作成 -3. **Rust生態系**: OpenRouter-SDKのようなRustベースのAI APIクライアントの発展 -4. **パフォーマンス最適化**: LLMスループット向上技術のIBM採用事例 - -### コミュニティの関心事 -1. **オープンソース志向**: Grok 3のオープンソース化要求に見られる透明性への強い期待 -2. **実用性重視**: 無料リソースでの効率的な訓練手法(GRPO + T4 Colab) -3. **AI安全性**: Grokの問題行動に見られるAI倫理・安全性への懸念 -4. **研究者の健康**: AI研究のプレッシャーと精神的健康への関心 - -### 日本の開発者への示唆 -1. **軽量化技術**: リソース制約環境でのAI活用(TXT OS手法) -2. **新技術早期対応**: Apple等の新プラットフォーム対応データセット作成手法 -3. **Rust活用**: AIアプリケーション開発でのRustの実用性 -4. **コミュニティ参加**: オープンソースプロジェクトへの積極的な貢献の重要性 - -## まとめ - -今週のAI開発コミュニティでは、実用的なツール開発(TXT OS、OpenRouter-SDK)、新プラットフォーム対応(Apple Foundation Models)、そしてAI安全性・倫理に関する議論(Grok問題)が主要なトピックとなった。特に、軽量化・効率化技術とオープンソース志向が強く、日本の開発者にとっても参考になる技術的知見が多く共有されている。また、AI研究者の精神的健康についての真摯な議論も重要な論点として浮上している。 - -## 参考リンク - -### Hacker News -- [TXT OS GitHub](https://github.com/onestardao/WFGY/tree/main/OS) -- [Apple Foundation Models Dataset](https://rileyhealth.gumroad.com/l/bwoqe) -- [OpenRouter-SDK](https://crates.io/crates/openrouter-sdk) - -### Reddit -- [Felix Hill追悼記事](https://medium.com/@tahaymerghani/the-dark-side-of-academia-mental-health-mentorship-and-the-unspoken-struggles-of-an-nlp-c25adbd9a2e6) -- [r/LocalLLaMA](https://www.reddit.com/r/LocalLLaMA/top/?t=week) -- [r/MachineLearning](https://www.reddit.com/r/MachineLearning/top/?t=week) -- [r/artificial](https://www.reddit.com/r/artificial/top/?t=week) \ No newline at end of file diff --git a/resources/2025-07-13/events.md b/resources/2025-07-13/events.md deleted file mode 100644 index b701b8a..0000000 --- a/resources/2025-07-13/events.md +++ /dev/null @@ -1,32 +0,0 @@ -# AI開発イベント情報 - -## 今週の注目イベント (2025-07-14 〜 2025-07-20) - -### 1. 各社の事例から学ぶ!AIコーディングエージェント活用の現在地 -- **日時**: 2025年7月14日(月)19:00〜 -- **形式**: オンライン開催 -- **URL**: https://findy.connpass.com/event/359453/ -- **概要**: 企業でのAIコーディングエージェント活用事例を学べるセミナー。実際の開発現場でのAI活用状況やベストプラクティスを知ることができる貴重な機会。 - -### 2. Claude Code派?Gemini CLI派? みんなで比較LT会! -- **日時**: 2025年7月16日(水)19:00〜 -- **形式**: ライトニングトーク会 -- **URL**: https://connpass.com/event/360553/ -- **参加者**: 731/705名登録済み(大人気イベント) -- **概要**: Claude CodeとGemini CLIなどのAI開発ツールを比較するLT会。実際の使用体験や機能比較を聞ける開発者向けイベント。 - -### 3. Azure OpenAI Service Dev Day 2025 -- **日時**: 2025年7月18日(金)9:30〜 -- **場所**: 東京都千代田区 -- **URL**: https://azureai.connpass.com/event/354972/ -- **概要**: Microsoft Azure OpenAI Serviceの開発者向けイベント。企業でのAI活用やAPI統合に関する技術的な内容が期待される。 - -### 4. 農業AIハッカソン2025 事前説明会 -- **日時**: 2025年7月18日(金)20:00〜 -- **形式**: オンライン開催 -- **URL**: https://connpass.com/event/360052/ -- **概要**: 農業分野でのAI活用に特化したハッカソンの説明会。AIを実際の課題解決に応用する実践的なイベント。 - -## 総評 - -今週は特にAI開発ツールの比較や実際の活用事例に焦点を当てたイベントが充実しています。Claude CodeとGemini CLIの比較LTは開発者にとって非常に有益で、企業でのAIコーディングエージェント活用事例も実践的な知見を得られる機会となるでしょう。 \ No newline at end of file diff --git a/resources/2025-07-13/release_information.md b/resources/2025-07-13/release_information.md deleted file mode 100644 index 3b893c2..0000000 --- a/resources/2025-07-13/release_information.md +++ /dev/null @@ -1,71 +0,0 @@ -# Release Information (2025-07-13) - -## google-gemini/gemini-cli v0.1.12 -*Released: 2025-07-13* - -### Highlights -- **MCP Server Improvements**: Enhanced SSE transport with headers support, reduced noisy server logs -- **Authentication Enhancements**: Added support for `GEMINI_DEFAULT_AUTH_TYPE` environment variable, improved headless auth flow, better auth type logging -- **UI/UX Improvements**: - - Added clipboard image paste support for macOS - - Added visual cues for nightly version - - New interactive prompt mode with `--prompt-interactive/-i` flag - - Improved theme dialog with scrolling support -- **Tool Summarization**: Centralized shell tool summarization for better output handling -- **Bug Fixes**: - - Fixed relative path issues requiring absolute paths - - Fixed whitespace rendering in markdown - - Improved error messaging for quota limits - - Fixed auth type logging errors - -### Notable Changes -- Added `maxSessionTurns` configuration support via settings -- Flash fallback logging and clearcut logging improvements -- Docker release workflow fixes -- Multiple documentation improvements - -## anthropics/claude-code v1.0.51 -*Updated: 2025-07-11* - -### Major Features -- **Windows Support**: Added native Windows support (requires Git for Windows) -- **Bedrock Integration**: Added support for AWS Bedrock API keys through `AWS_BEARER_TOKEN_BEDROCK` environment variable -- **Settings Doctor**: New `/doctor` command helps identify and fix invalid setting files - -### Improvements -- `--append-system-prompt` now works in interactive mode, not just with `--print/-p` -- Increased auto-compact warning threshold from 60% to 80% -- Fixed handling of user directories with spaces for shell snapshots -- Enhanced OTEL resource reporting with OS details and WSL version -- Fixed custom slash commands in subdirectories -- Fixed plan mode issue with rejected sub-task plans - -## microsoft/vscode 1.102.0 (June 2025) -*Released: 2025-07-10* - -### AI and Copilot Features - -#### Chat Enhancements -- **Open Source Milestone**: GitHub Copilot Chat extension is now open sourced -- **Custom Instructions**: Generate custom instructions that reflect your project's conventions -- **Custom Modes**: Tailor chat for specific tasks like planning or research -- **Terminal Integration**: Automatically approve selected terminal commands -- **Edit History**: Edit and resubmit previous chat requests (experimental) - -#### MCP (Model Context Protocol) Support -- MCP support is now **Generally Available** in VS Code -- Easy MCP server installation and management with dedicated view and gallery -- MCP servers are now first-class resources in profiles and Settings Sync - -#### Editor Experience -- **Coding Agent**: Delegate tasks to Copilot coding agent for background handling (preview) - -## cline/cline v3.18.14 -*Released: 2025-07-12* - -### Changes -- Fixed re-sign in flow issue -- Version bump with changeset updates - -### Summary -This release focuses on authentication flow improvements and stability fixes. \ No newline at end of file diff --git a/resources/2025-07-13/tech_blog_articles.md b/resources/2025-07-13/tech_blog_articles.md deleted file mode 100644 index 58c0bc2..0000000 --- a/resources/2025-07-13/tech_blog_articles.md +++ /dev/null @@ -1,107 +0,0 @@ -# 日本語技術ブログの注目記事まとめ(2025年7月7日〜13日) - -## 要約 - -2025年7月7日〜13日の期間に日本の技術ブログプラットフォーム(Zenn.dev、Qiita.com、note.com)で公開されたAI開発関連の記事を調査した結果、以下の主要トレンドが確認できました: - -1. **Claude Codeの急激な普及** - ChatGPTからClaude Codeへの乗り換えが加速 -2. **バイブコーディングの定着** - 自然言語でのプログラミングが主流化 -3. **LLMの最新比較** - Claude 3.7、GPT-4.5、Gemini 2.0の性能分析 -4. **従量課金制からの脱却** - 定額制AIツールへの移行トレンド - -## 最も価値のある記事 TOP 5 - -### 1. 📈 **非エンジニアがChatGPTからClaude Codeに乗り換えた話** -- **プラットフォーム**: note.com -- **著者**: ルーモス@AI開発×マネタイズ -- **公開日**: 2025年7月12日(1日前) -- **URL**: https://note.com/rumos_automatic/n/nf6190de248ff -- **エンゲージメント**: 17スキ(いいね) -- **実用的な洞察**: - - ChatGPT時代: 1週間でChrome拡張機能1個 → Claude Code: 10分で完成(99%短縮) - - コピペ地獄からの完全解放:メモ帳での手動作業が不要に - - 開発時間の劇的短縮:API連携も1週間→30分(96%短縮) - - 従量課金制の恐怖からの脱却:Gemini APIで月1万円以上の請求から定額制へ - - 非エンジニアでも自然言語のみで月複数Webアプリ開発を実現 - -### 2. 🤖 **最新LLM大比較 2025年版 - Claude 3.7、GPT-4.5、Gemini 2.0、OpenAI o1の徹底解析** -- **プラットフォーム**: Zenn.dev / Qiita.com -- **著者**: okikusan -- **公開日**: 2025年3月8日(継続的に注目されている記事) -- **URL**: https://zenn.dev/okikusan/articles/bb577be51af23a -- **主要な技術情報**: - - **Claude 3.7 Sonnet**: 「ハイブリッド推論」機能で高速応答と深い思考を切り替え可能 - - **GPT-4.5**: 「人格基盤モデル」として感情知能と自然な会話に特化 - - **Gemini 2.0**: 包括的なマルチモーダル対応とGoogle生態系統合 - - **料金比較**: GPT-4.5が最高額(入力$75/出力$150 per million tokens) - -### 3. 🚀 **Claude Code × Cursor で超高速アプリ開発!たった1つの指示でWebアプリ完成** -- **プラットフォーム**: Zenn.dev -- **著者**: helloworld -- **公開日**: 2025年7月上旬 -- **URL**: https://zenn.dev/helloworld/articles/d2a102316f23fd -- **実践的な価値**: - - Claude CodeとCursorの組み合わせによるシナジー効果 - - 1つの自然言語指示から完全なWebアプリケーション生成 - - プロダクション環境での実用性を実証 - -### 4. 💡 **社内でAI駆動開発ツールの使用調査したら、たった1週間で『Claude Code』一択になっていた話** -- **プラットフォーム**: Zenn.dev -- **著者**: explaza -- **公開日**: 2025年7月上旬 -- **URL**: https://zenn.dev/explaza/articles/f62e704e73d3ff -- **組織導入の実例**: - - 企業内でのAI開発ツール比較調査結果 - - 1週間という短期間でのClaude Code採用決定 - - チーム全体での生産性向上実績 - -### 5. 🔧 **限界まで実務でAI Agent「Cursor」を使ってみたら、アイアンマンの気分になれた** -- **プラットフォーム**: note.com -- **著者**: minicoohei -- **公開日**: 2025年7月1日(12日前) -- **URL**: https://note.com/minicoohei/n/n892b82b65f7b -- **エンゲージメント**: 1,224スキ(最高エンゲージメント) -- **実務応用の価値**: - - 実際のプロダクション環境でのCursor活用体験 - - AI Agentとしての限界までの利用実験 - - 開発者の主観的体験レポート - -## 重要なトレンド分析 - -### 🎯 Claude Codeの圧倒的優位性 -- **定額制の安心感**: 従量課金制(Cursor/API)から定額制(Claude Max $100-200/月、Pro $20/月)への移行 -- **コピペ作業の完全排除**: ローカル環境での直接動作により手動作業が不要 -- **開発効率の劇的向上**: 99%の時間短縮を実現する事例が多数報告 - -### 🔄 開発パラダイムの変化 -- **バイブコーディングの主流化**: 自然言語プログラミングが標準的な開発手法に -- **非エンジニアの参入障壁撤廃**: プログラミング知識不要でのアプリ開発実現 -- **従来のIDEからAI Agentへ**: 開発環境そのものの概念変化 - -### 📊 市場動向 -- **LLM競争の激化**: Claude、GPT、Geminiそれぞれの差別化戦略が明確化 -- **コスト構造の変化**: 従量課金からサブスクリプション型への移行 -- **企業導入の加速**: 組織レベルでのAI開発ツール標準化 - -## 技術的な重要ポイント - -### Claude Code vs 従来ツールの決定的違い -1. **実行環境**: ブラウザ(ChatGPT)→ローカル環境(Claude Code) -2. **作業フロー**: コピペ必須→自動化完全 -3. **課金体系**: 従量制→定額制 -4. **学習コスト**: エディタ操作必須→自然言語のみ - -### 開発効率の具体的改善数値 -- Chrome拡張機能開発: 1週間 → 10分(99%短縮) -- Webアプリ開発: 開発断念 → 30分で完成 -- API連携: 1週間 → 30分(96%短縮) -- デプロイ作業: 開発断念 → 5分で完了 - -### 注目される新概念 -- **ハイブリッド推論**(Claude 3.7): 高速モードと深思考モードの切り替え -- **人格基盤モデル**(GPT-4.5): 技術性能より感情知能を重視 -- **自然言語プログラミング**: コードを書かない開発手法の確立 - -## まとめ - -2025年7月の日本の技術ブログコミュニティでは、Claude Codeを中心としたAI駆動開発ツールの革命的な普及が確認できました。特に非エンジニアの開発参入と、従来の開発パラダイムからの根本的な変化が顕著に現れています。従量課金制からの脱却、コピペ作業の完全自動化、自然言語プログラミングの確立など、2025年がAI開発の転換点となっていることが複数の実体験レポートから明らかになりました。 \ No newline at end of file diff --git a/resources/2025-07-13/trending_repositories.md b/resources/2025-07-13/trending_repositories.md deleted file mode 100644 index 0cfc0d5..0000000 --- a/resources/2025-07-13/trending_repositories.md +++ /dev/null @@ -1,73 +0,0 @@ -# 今週の注目AIリポジトリ特集 - -## 🚀 Refact.ai - エンジニアリングタスクを自動化するAIエージェント - -今週GitHubで急上昇中の「smallcloudai/refact」は、開発者の日常的なタスクを自動化するオープンソースのAIエージェントです。週間で563スターを獲得し、開発者コミュニティから大きな注目を集めています。 - -### 特徴的な機能 - -Refact.aiの最大の特徴は、単なるコード補完ツールではなく、エンジニアリングタスクを「エンドツーエンド」で処理できる点です。つまり、複雑な開発タスクを計画から実行、そして反復改善まで自動的に行えるのです。 - -主要な機能として: -- **無制限のコンテキスト対応コード補完**: コードベース全体を理解した上で、適切な補完を提供 -- **25以上のプログラミング言語をサポート**: Python、JavaScript、Rust、Go、Javaなど主要言語に対応 -- **統合開発環境との深い連携**: VS CodeやJetBrainsのIDEで直接使用可能 -- **マルチモデル対応**: Claude 4、GPT-4o、Gemini、LLaMAなど最新のAIモデルを選択可能 -- **セルフホスト可能**: プライバシーを重視する企業向けに、自社サーバーでの運用が可能 - -### 実践的な使用例 - -Refact.aiは、以下のような場面で開発者の生産性を大幅に向上させます: - -1. **プロトタイプの高速開発**: 自然言語で要件を説明するだけで、基本的なコード構造を生成 -2. **ユニットテストの自動作成**: 既存のコードからテストケースを自動生成 -3. **コードリファクタリング**: レガシーコードを最新のベストプラクティスに沿って改善 -4. **ドキュメント生成**: コードから詳細なドキュメントを自動作成 - -### 技術的な先進性 - -Refact.aiは、RAG(Retrieval-Augmented Generation)技術を活用してコードベース全体を理解します。これにより、単純なパターンマッチングではなく、プロジェクトの文脈を考慮した提案が可能になっています。また、GitHub、GitLab、PostgreSQL、Dockerなどの開発ツールとも統合されており、開発ワークフロー全体を自動化できます。 - -リポジトリ: https://github.com/smallcloudai/refact - ---- - -## 📘 12-Factor Agents - プロダクション対応AIエージェント構築の12原則 - -HumanLayerチームが公開した「12-Factor Agents」は、週間で2,679スターを獲得し、AI開発コミュニティで大きな話題となっています。これは、実際にプロダクション環境で動作する信頼性の高いAIエージェントを構築するための実践的なガイドラインです。 - -### なぜ今、このガイドラインが必要なのか - -多くの開発者がAIエージェントフレームワークを使い始めて直面する問題があります。それは、「80%の完成度では実用に耐えない」という現実です。デモでは素晴らしく動作するエージェントも、実際の業務で使うには信頼性が不足しているのです。 - -このガイドラインの作者であるDex氏は、多くの開発者が以下のようなパターンに陥ることを観察しました: -1. AIエージェントを作りたいと思う -2. フレームワークを選んで開発を始める -3. 70-80%の品質まで到達する -4. それでは不十分だと気づく -5. フレームワークの内部を理解しようとする -6. 結局、ゼロから作り直す - -### 12の原則(抜粋) - -1. **自然言語からツール呼び出しへ**: LLMの出力を構造化されたツール呼び出しに変換 -2. **プロンプトの所有権**: プロンプトはコードの一部として管理し、バージョン管理する -3. **コンテキストウィンドウの管理**: 限られたトークン数を効率的に活用 -4. **小さく集中したエージェント**: 巨大な万能エージェントより、特定タスクに特化した小さなエージェントを組み合わせる -5. **ステートレスな設計**: エージェントを純粋な関数として実装し、テストとデバッグを容易に - -### 実践的な価値 - -このガイドラインの最も重要な洞察は、「効果的なAIエージェントは、ほとんどが通常のソフトウェアで構成されている」という点です。つまり、AIエージェントの開発においても、従来のソフトウェアエンジニアリングの原則が重要であることを示しています。 - -開発者は、このガイドラインを参考にすることで、より堅牢で保守しやすく、スケーラブルなAIシステムを構築できるようになります。 - -リポジトリ: https://github.com/humanlayer/12-factor-agents - ---- - -## まとめ - -今週のトレンドは、AIを活用した開発ツールの実用化と、プロダクションレベルのAIシステム構築に向けた動きが顕著です。Refact.aiのような具体的なツールと、12-Factor Agentsのような設計原則の両方が注目を集めていることは、AI開発が「実験段階」から「実用段階」へと移行していることを示しています。 - -これらのツールとガイドラインを活用することで、開発者はより効率的に、そして確実にAIを活用したシステムを構築できるようになるでしょう。 \ No newline at end of file diff --git a/resources/2025-07-20/ai_news_summary.md b/resources/2025-07-20/ai_news_summary.md deleted file mode 100644 index dc3ccdf..0000000 --- a/resources/2025-07-20/ai_news_summary.md +++ /dev/null @@ -1,61 +0,0 @@ -# AI News Summary - 2025-07-20 - -## Major Announcements - -### Anthropic -- **Title**: Claude for Financial Services -- **Date**: July 15, 2025 -- **Source**: https://www.anthropic.com/news/claude-for-financial-services -- **Summary**: Anthropic announced Claude for Financial Services, a specialized offering targeting financial sector applications. This represents a significant expansion of Claude's enterprise capabilities. -- **開発者への影響**: 金融業界向けの特化されたAI APIアクセスにより、フィンテック開発者は規制に準拠したAIソリューションの構築が可能になる - -- **Title**: Discover tools that work with Claude -- **Date**: July 14, 2025 -- **Source**: https://www.anthropic.com/news/connectors-directory -- **Summary**: Launch of a connectors directory showcasing tools and integrations that work with Claude, expanding the ecosystem for developers building Claude-powered applications. -- **開発者への影響**: 豊富な統合ツールにより、Claude APIを活用したアプリケーション開発の選択肢が大幅に拡大 - -### Microsoft Research -- **Title**: CollabLLM: Teaching LLMs to collaborate with users -- **Date**: July 15, 2025 -- **Source**: https://www.microsoft.com/en-us/research/blog/collabllm-teaching-llms-to-collaborate-with-users/ -- **Summary**: ICML 2025 Outstanding Paper Award recipient focusing on improving LLM-user collaboration, including adaptive communication and intelligent questioning capabilities. -- **開発者への影響**: より協調的なAIインタラクションパターンを実装するための新しいフレームワークとして活用可能 - -### Hugging Face -- **Title**: Five Big Improvements to Gradio MCP Servers -- **Date**: July 17, 2025 -- **Source**: https://huggingface.co/blog/gradio-mcp-updates -- **Summary**: Major technical improvements to Gradio's multi-container platform servers, enhancing performance and developer experience for ML application deployment. -- **開発者への影響**:機械学習アプリケーションのデプロイメントとプロトタイピングプロセスが大幅に改善 - -- **Title**: Migrating the Hub from Git LFS to Xet -- **Date**: July 15, 2025 -- **Source**: https://huggingface.co/blog/migrating-the-hub-to-xet -- **Summary**: Infrastructure upgrade moving Hugging Face Hub's version control system from Git LFS to Xet for better large file handling. -- **開発者への影響**: 大規模モデルファイルの管理と共有がより効率的になり、モデル開発ワークフローが改善 - -## Other Notable Updates - -### Google Research -- **Title**: MedGemma: Our most capable open models for health AI development -- **Date**: July 9, 2025 -- **Source**: https://research.google/blog/medgemma-our-most-capable-open-models-for-health-ai-development/ -- **Summary**: Release of advanced open-source AI models specifically designed for healthcare applications, expanding the capabilities of generative AI in medical research and development. -- **開発者への影響**: ヘルスケアAIアプリケーション開発者がより高性能なオープンソースモデルにアクセス可能 - -### Hugging Face -- **Title**: Consilium: When Multiple LLMs Collaborate -- **Date**: July 17, 2025 -- **Source**: https://huggingface.co/blog/consilium-multi-llm -- **Summary**: Exploration of collaborative approaches between multiple large language models, advancing multi-agent AI interaction techniques. -- **開発者への影響**: 複数のLLMを組み合わせたより高度なAIシステムの構築手法を提供 - -## Source References -- OpenAI Blog: https://openai.com/blog (Access temporarily limited) -- Google AI Blog: https://research.google/blog/ -- Anthropic News: https://www.anthropic.com/news -- Meta AI Blog: https://ai.meta.com/blog/ -- Microsoft Research Blog: https://www.microsoft.com/en-us/research/blog/ -- DeepMind Blog: https://deepmind.google/discover/blog/ -- Hugging Face Blog: https://huggingface.co/blog \ No newline at end of file diff --git a/resources/2025-07-20/community_discussions.md b/resources/2025-07-20/community_discussions.md deleted file mode 100644 index af764ed..0000000 --- a/resources/2025-07-20/community_discussions.md +++ /dev/null @@ -1,53 +0,0 @@ -# 海外コミュニティ動向 - 2025-07-20 - -## 注目のトピック - -### [The Big LLM Architecture Comparison](https://news.ycombinator.com/item?id=44622608) -- **出典**: Hacker News -- **注目ポイント**: Sebastian Raschka による LLM アーキテクチャの包括的比較記事が話題となり、モデル開発の急速な進展と課題について活発な議論が展開 -- **技術的内容**: GPT-2(2019年)以降のLLMの劇的な進歩、DeepSeek V3の計算効率性、ハルシネーション問題の持続的課題 -- **開発者への示唆**: RAG(検索拡張生成)が有力な解決策として議論されているが、基盤モデルへのネイティブ統合は未実現。現在の訓練手法(テキスト予測)が論理的推論の限界を生んでいる可能性 - -### [Nobody knows how to build with AI yet](https://news.ycombinator.com/item?id=44616479) -- **出典**: Hacker News -- **注目ポイント**: AI開発の不確実性と実践的課題について、開発者コミュニティが率直な議論を展開 -- **技術的内容**: AI開発の非決定性、再現性の困難さ、コンテキストによる効果の大きな変動 -- **開発者への示唆**: 経験豊富な開発者はAIを「力の乗数」として活用、明確に定義された反復作業に最適。静的型付け言語の使用、タスクの細分化、正確なコミュニケーションが重要 - -### [Show HN: MCP server for Blender that builds 3D scenes via natural language](https://news.ycombinator.com/item?id=44622374) -- **出典**: Hacker News -- **注目ポイント**: MCP(Model Context Protocol)とBlenderを組み合わせた自然言語による3Dシーン生成の実践例 -- **技術的内容**: Blender Python スクリプト、Node.js サーバー、LLMバックエンド(OpenAI/Claude)の統合、空間関係の理解、カメラアニメーションと照明設定の自動化 -- **開発者への示唆**: 非技術者でも複雑な3D環境を作成可能にする実用的なAIアプリケーションの事例。オープンソース化されており、コミュニティからのフィードバックを求めている - -### [Local LLMs versus offline Wikipedia](https://news.ycombinator.com/item?id=44617078) -- **出典**: Hacker News -- **注目ポイント**: ローカルLLMとオフラインWikipediaの技術的比較、ハイブリッドアプローチの可能性 -- **技術的内容**: 小型モデル(0.6b-1.5b)のRAG効果、Gemma 3のモバイル対応、LLMとWikipediaの相補的機能 -- **開発者への示唆**: ローカルWikipedia(Kiwixなど)との組み合わせ、リソース制約環境での効率的モデル選択、ハルシネーション軽減のための検証メカニズムの実装が重要 - -### [Rethinking CLI interfaces for AI](https://news.ycombinator.com/item?id=44617184) -- **出典**: Hacker News -- **注目ポイント**: AIエージェント向けの革新的なCLIインターフェース設計の議論 -- **技術的内容**: コンテキストヒントの追加、情報豊富なエラーメッセージ、長時間プロセスの適応的中断、AI解析用の構造化出力 -- **開発者への示唆**: 既存CLIツールの十分性 vs 改善の必要性について意見が分かれる。明確性と予測可能性を優先し、MCP(Machine Controlled Processes)を活用したAI誘導インタラクションが有望 - -## 今週の技術トレンド - -### LLMアーキテクチャの成熟化 -- 複数の討論で共通して、LLMの技術的進歩と残存する課題(特にハルシネーション)が議論の中心 -- 事実性向上のためのRAG統合が重要なテーマとして浮上 - -### AI開発の実践的アプローチ -- 「AIとの構築方法がまだ分からない」という現状認識が広く共有 -- 開発者は実験的段階にあり、ベストプラクティスの確立が急務 - -### ローカルAIソリューションの注目 -- ローカルLLMとオフライン知識ベースの組み合わせに関心が集中 -- リソース効率性とプライバシー重視の傾向 - -### AI-CLIインターフェースの探求 -- 従来のコマンドライン操作とAIエージェントの統合が新たな技術領域として台頭 -- 構造化された予測可能なインタラクションモデルの必要性 - -**注記**: Reddit(r/LocalLLaMA、r/MachineLearning、r/artificial)は bot 検出によりアクセスブロックされたため、今回の分析には含まれていません。今後の改善として Playwright を用いたアクセス手法の検討が必要です。 \ No newline at end of file diff --git a/resources/2025-07-20/events.md b/resources/2025-07-20/events.md deleted file mode 100644 index c2b4aee..0000000 --- a/resources/2025-07-20/events.md +++ /dev/null @@ -1,35 +0,0 @@ -# AI Development Events - 2025-07-20 - -## Upcoming Events (Next 7 Days) - -### Event 1: [Cline から Claude Code まで!AIエージェント、freeeはどうやって全社導入した?](https://connpass.com/event/327745/) -- **主催者**: Forkwell Community -- **日時**: 2025-07-22 12:00 -- **形式**: Online -- **参加費**: Free -- **概要**: freeeでのAIエージェント全社導入における実践的な知見を共有 -- **開発者向けポイント**: 実際の企業でのCline・Claude Codeの導入プロセスと課題解決方法を学べる - -### Event 2: [現役CPOが教える!非エンジニア向けClaude Codeでの仕事改革](https://connpass.com/event/327851/) -- **主催者**: - -- **日時**: 2025-07-25 19:00 -- **形式**: Online -- **参加費**: Free -- **概要**: CPO視点でのClaude Codeを活用した業務効率化手法 -- **開発者向けポイント**: 開発者以外の職種でのClaude Code活用事例とその効果を理解できる - -### Event 3: [Devin/Cursor/Cline全社導入 セキュリティリスクにどう対策した?](https://connpass.com/event/327746/) -- **主催者**: レバテックLAB -- **日時**: 2025-07-23 19:00 -- **形式**: Online -- **参加費**: Free -- **概要**: AI開発ツールの企業導入時におけるセキュリティ対策の実践 -- **開発者向けポイント**: Devin、Cursor、Clineの全社導入における具体的なセキュリティリスク対策を学べる - -### Event 4: [Agora×Difyでつくる会話型AIエージェント](https://connpass.com/event/327748/) -- **主催者**: 【Agora】V-CUBE -- **日時**: 2025-07-23 16:00 -- **形式**: Online (Zoom Webinar) -- **参加費**: Free -- **概要**: AgoraとDifyを組み合わせた会話型AIエージェントの構築方法 -- **開発者向けポイント**: 音声・映像通信技術とAIエージェントを組み合わせた実装技術を習得できる \ No newline at end of file diff --git a/resources/2025-07-20/release_information.md b/resources/2025-07-20/release_information.md deleted file mode 100644 index e4f5478..0000000 --- a/resources/2025-07-20/release_information.md +++ /dev/null @@ -1,183 +0,0 @@ -# Release Information (2025-07-20) - -## google-gemini/gemini-cli v0.1.13 (2025-07-19) - -**Repository:** https://github.com/google-gemini/gemini-cli -**Release URL:** https://github.com/google-gemini/gemini-cli/releases/tag/v0.1.13 - -### 主な変更点 - -**新機能** -- hideBanner設定追加: 起動時のバナーを非表示にする設定を追加 -- VSCode連携拡張機能の導入: IDEとの統合機能を強化 -- IDE統合のフィーチャーフラグ追加 -- ループ検出サービス: シンプルなループを破壊する機能を実装 -- プロキシオプションの明示的追加: CLIでプロキシ設定が可能に -- 選択リストへの番号追加: UIの使いやすさを向上 - -**改善点** -- MCPコード: 再利用性とテスト性を向上させるためのリファクタリング -- MCP OAuth認証インフラの実装(パート1) -- バックグラウンドエージェントのデモ機能追加 -- /background コマンドの追加(バックグラウンドエージェント設定時) -- 非対話環境の自動検出と手動認証フローへのフォールバック -- Zed IDE統合のサポート追加 - -**バグ修正** -- MakefileのビルドターゲットでヘルプテキストのJupyternotebook重複修正 -- MCPサーバーからのstderr出力をデバッグモードで表示 -- Markdownの見出しレベル問題の修正 -- 非圧縮履歴が関数レスポンスで始まらないよう修正 -- チェックポイント機能の静かな失敗を防止し、非Gitプロジェクトでも有効化 -- JSONシリアライゼーションの循環参照エラーを修正 -- セッションイベント開始時のsurfaceフィールドロギング -- Node 20未満の警告機能の追加と復元 -- OAuth コールバックの Docker サポート強化 - -**パフォーマンス改善** -- モデル可用性チェックをバックグラウンドで実行し起動時間を短縮 -- デフォルトヘッダーにAPIキーを含めるよう変更(URLではなく) - -## anthropics/claude-code v1.0.54 (2025-07-19) - -**Repository:** https://github.com/anthropics/claude-code -**CHANGELOG URL:** https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md - -### 主な変更点 - -- **Hooks機能の拡張**: UserPromptSubmitフックを追加し、フック入力に現在の作業ディレクトリを追加 -- **カスタムスラッシュコマンド**: フロントマターにargument-hintを追加 -- **Windows対応改善**: - - OAuthがポート45454を使用し、適切にブラウザURLを構築 - - モード切替がalt + mを使用、プランモードが正しくレンダリング -- **シェル**: ファイル関連エラーを修正するためインメモリシェルスナップショットに切り替え - -### v1.0.53の変更点 -- @メンションファイルの切り詰めを100行から2000行に更新 -- AWSトークンリフレッシュ用のヘルパースクリプト設定を追加: awsAuthRefreshとawsCredentialExport - -### v1.0.52の変更点 -- MCPサーバーインストラクションのサポートを追加 - -## cursor v1.2 (2025-07-03) - -**Website URL:** https://cursor.sh -**Changelog URL:** https://cursor.sh/changelog - -### Agent Planning, Better Context & Faster Tab - -**新機能** - -1. **Agent To-dos** - - エージェントが構造化されたTo-doリストで事前に計画を立てる機能 - - 長期的なタスクの理解と追跡が容易に - - 依存関係のあるタスクを分解し、チャットとSlackに表示 - - 作業の進行に応じてリストを更新可能 - -2. **Queued messages** - - エージェントの現在のタスク完了後にフォローアップメッセージをキューに追加可能 - - キュー内のタスクの並び替えと実行が可能 - -3. **Memories (GA版)** - - メモリ生成の品質向上 - - エディタ内UIの改善 - - バックグラウンド生成メモリのユーザー承認機能 - -4. **PR indexing & search** - - PRのインデックス化と要約機能 - - 古いPRの意味的検索やPR、issue、commit、branchの明示的な取得が可能 - - GitHubコメント、BugBotレビュー、Slackエージェントサポートを含む - -5. **Improved embeddings for semantic search** - - 新しい埋め込みモデルによりコードベース検索の精度が大幅に向上 - -6. **Faster Tab** - - Tab補完が約100ms高速化 - - TTFTが30%削減 - -7. **Let Agent resolve merge conflicts** - - マージコンフリクト発生時、エージェントが解決を試みることが可能 - -8. **Background Agent improvements** - - PRがチームのテンプレートに従う - - エージェントブランチへの変更が自動的にプルされる - - コンフリクトがアクション可能なフォローアップとして表示 - - サイドバーから直接コミット可能 - -## cline v3.19.7 (2025-07-18) - -**Repository:** https://github.com/cline/cline -**Release URL:** https://github.com/cline/cline/releases/tag/v3.19.7 - -### 主な変更点 - -- Claude Codeエラーの改善とドキュメント作成 -- 未使用のvscodeインポートの削除 -- バックエンドの環境詳細設定をシンプルな構成に移行 -- diffエディタウィンドウのスクロールロジックをプラットフォーム固有のクラスに移動 -- スタンドアロンTerminal Managerの実装 -- すべての拡張ウィンドウでの認証状態変更の処理 -- エラーハンドリングと表示ロジックの統一 -- **新しいプロバイダー**: Hugging Faceプロバイダーを追加 - -## windsurf v1.11.0 (2025-07-17) - -**Website URL:** https://www.codeium.com -**Changelog URL:** https://www.codeium.com/changelog - -### 主な新機能 - -1. **Speak to Cascade** - - 音声入力機能: チャットにタイプする代わりに音声で話しかけることが可能に - -2. **@-mentioning conversations** - - 最初の会話を@メンションすることで、Cascadeがテストを書く際に完全なコンテキストを持つことが可能 - -3. **Deeper Browser integration** - - ブラウザで開いているタブについて@メンションを使用してCascadeとチャット可能 - -4. **JetBrains improvements** - - Planning Mode、Workflows、ファイルベースのRulesがJetBrains上のCascadeで利用可能に - -5. **改善点** - - Cascadeでterminalを@メンション可能に - - Auto-Continue設定: Cascadeが制限に達した場合、自動的に応答を継続 - - より多くのMCPサーバーのサポート(Streamable HTTPトランスポートとMCP認証) - - エンタープライズ向け: ~/.codeium/フォルダに.codeiumignoreを配置することで、すべてのリポジトリでignoreルールを強制可能 - -## kiro v0.1.x Preview (2025-07-14) - -**Website URL:** https://kiro.dev -**Changelog URL:** https://kiro.dev/changelog/ - -### Preview release - 新しいエージェント型IDE - -**主な機能** - -1. **Specs** - - アプリケーションの複雑な機能の開発プロセスを形式化する構造化アーティファクト - - 仕様駆動開発のサポート - -2. **Hooks** - - ファイル保存などのイベントで、ドキュメントの更新やテストの生成などのイベント駆動型自動化を設定 - -3. **Steering** - - エージェントの動作を導くステアリングファイルの定義 - -4. **Agentic chat** - - チャットから機能を構築 - - 手放し実行のためのAutopilotモード、または各変更を手動で承認 - -5. **MCP** - - お気に入りのツールやサービスとの統合 - -## microsoft/vscode 1.102.1 (2025-07-16) - -**Repository:** https://github.com/microsoft/vscode -**Release URL:** https://github.com/microsoft/vscode/releases/tag/1.102.1 - -### June 2025 Recovery 1 - -このリリースはリカバリーリリースで、特定の問題の修正に焦点を当てています。AI関連の具体的な変更は記載されていませんでした。 - -完全なリリースノートは[Updates](https://code.visualstudio.com/updates/v1_102)で確認できます。 \ No newline at end of file diff --git a/resources/2025-07-20/tech_blog_articles.md b/resources/2025-07-20/tech_blog_articles.md deleted file mode 100644 index 289c5d0..0000000 --- a/resources/2025-07-20/tech_blog_articles.md +++ /dev/null @@ -1,60 +0,0 @@ -# Japanese Tech Blog Articles - 2025-07-20 - -## Featured Articles - -### 1. [【Claude Code】マネできる!個人開発するときに最初に用意したドキュメント24種と機能要件書を全公開](https://qiita.com/tomada/items/e27292b65f723c4633d9) -- **著者**: tomada -- **プラットフォーム**: Qiita -- **公開日**: 2025-07-19 (11時間前) -- **いいね数**: 未確認 -- **概要**: Claude Code を使った個人開発プロジェクトで最初から用意すべき24種類のドキュメントと機能要件書を全公開。アーキテクチャ設計、データベース設計、API設計、フロントエンド設計、SEO要件、エラーハンドリング、テスト戦略などを含む。 -- **開発者向けポイント**: Claude Code 導入時の実践的なドキュメント準備手法、プロジェクト立ち上げ時の効率的な設計アプローチ -- **実装例**: 24種類の実際のドキュメントテンプレートと機能要件書の具体例 - -### 2. [【最新LLM大比較 2025年版】Claude 3.7、GPT-4.5、Gemini 2.0、OpenAI o1の徹底解析](https://zenn.dev/okikusan/articles/bb577be51af23a) -- **著者**: okikusan -- **プラットフォーム**: Zenn -- **公開日**: 2025-07-20 -- **いいね数**: 未確認 -- **概要**: Claude 3.7 Sonnet、GPT-4.5、Gemini 2.0、OpenAI o1シリーズなど最新LLMモデルの仕様、価格、性能、マルチモーダル対応、技術的特徴、強み・弱みを徹底比較分析。 -- **開発者向けポイント**: 2025年のLLM選択において各モデルの適用場面と技術的差分の理解、コスト対効果の比較 -- **実装例**: 各LLMの具体的な性能比較データとユースケース別の選択指針 - -### 3. [CursorからClaude Codeへの乗り換え体験記:AI開発ツールの現実と可能性](https://note.com/persona_1/n/n8741ecaee89d) -- **著者**: persona -- **プラットフォーム**: note -- **公開日**: 2025年7月中旬 -- **いいね数**: 未確認 -- **概要**: Cursor から Claude Code への移行体験談。Cursor が機能的な AI 支援開発ツールである一方で、ユーザーのエラーなのか技術的制限なのか判別困難な状況に遭遇することについて詳述。 -- **開発者向けポイント**: AI コーディングツールの実際の使用感と限界の理解、ツール選択時の考慮点 -- **実装例**: Cursor と Claude Code の実際の使用における具体的な違いと課題 - -### 4. [LLM APIコストまとめ(2025-07-11更新)](https://qiita.com/SH2/items/39314152c0a6f9a7b681) -- **著者**: SH2 -- **プラットフォーム**: Qiita -- **公開日**: 2025-07-11 -- **いいね数**: 未確認 -- **概要**: OpenAI、Anthropic Claude、Google Gemini、Amazon Nova、DeepSeek、Grokなど各種LLM APIの最新コスト比較。2025年7月11日に grok-4 が追加更新。 -- **開発者向けポイント**: 実際の開発・本番運用におけるLLM API選択時のコスト計算の重要性 -- **実装例**: 各LLM APIの詳細な料金体系と使用量に基づくコスト試算 - -### 5. [【徹底比較】Cursor vs Windsurf: AIコーディングの新時代](https://qiita.com/syukan3/items/c5f4cb48a6f1a5396e4e) -- **著者**: syukan3 -- **プラットフォーム**: Qiita -- **公開日**: 2025-05-13 -- **いいね数**: 未確認 -- **概要**: VS Code ライクなインターフェースを持つ2つのAI搭載IDE、Cursor と Windsurf の詳細比較。どちらもGPT-4o、Claudeなどのモデルをサポート。Cursorは手動制御重視、Windsurfは自動コンテキスト把握に特化。 -- **開発者向けポイント**: AI IDE選択における機能差分の理解、開発スタイルに応じたツール選択 -- **実装例**: 両ツールの具体的な機能比較と実際の開発フローでの使い分け - -## Trending Topics -- **Claude Code の実践活用**: プロジェクト立ち上げ時のドキュメント準備、Cursor からの移行体験 -- **LLM比較・選択**: 2025年最新モデル(Claude 3.7、GPT-4.5、Gemini 2.0)の性能とコスト比較 -- **AI IDE 戦争**: Cursor vs Windsurf vs Claude Code の機能・使用感比較 -- **実務におけるAIツール定着**: 長期使用における各ツールの実用性と課題 -- **API コスト最適化**: 開発・本番環境での LLM API 選択とコスト管理 - -## Recommended Reading Order -1. **初心者・概要**: LLM大比較記事でAI開発の現状把握 -2. **実践導入**: Claude Code ドキュメント準備ガイドで具体的な導入手法を学習 -3. **高度な活用**: Cursor vs Windsurf 比較で開発スタイルに応じたツール選択を検討 \ No newline at end of file diff --git a/resources/2025-07-20/trending_repositories.md b/resources/2025-07-20/trending_repositories.md deleted file mode 100644 index 4a7daac..0000000 --- a/resources/2025-07-20/trending_repositories.md +++ /dev/null @@ -1,35 +0,0 @@ -# Trending AI Development Repositories - 2025-07-20 - -## [Graphiti](https://github.com/getzep/graphiti) - -### 概要 -GraphitiはAIエージェント向けの新世代ナレッジグラフフレームワークです。従来のRAG(Retrieval-Augmented Generation)アプローチの限界を突破し、リアルタイムで動的に更新されるナレッジグラフを構築できます。このプロジェクトは、AIが扱う情報の複雑性と時間的変化に対応する革新的なアプローチを提供しています。 - -### 主な機能 -- リアルタイムでのナレッジグラフ構築と更新 -- 双時間軸データトラッキング(いつ情報が追加され、いつ実際に発生したかを記録) -- セマンティック、キーワード、グラフベースのハイブリッド検索 -- カスタムエンティティ定義のサポート -- 大規模データセットの効率的管理 -- 複数のグラフデータベース(Neo4j、FalkorDB)との互換性 -- 主要LLMプロバイダー(OpenAI、Azure、Google Gemini、Ollama)との統合 - -### 注目される理由 -従来のRAGシステムでは、データが静的でコンテキストの継続性が失われがちでした。Graphitiは、AIエージェントが持続的に学習し、時間の経過とともに知識を蓄積できる仕組みを提供します。特に、企業レベルでの複雑なデータ環境や、状況認識が重要なAIアプリケーションの開発において、従来のアプローチでは解決困難だった課題に対する実用的な解決策となっています。インクリメンタルなデータ更新と低レイテンシクエリの組み合わせにより、よりインテリジェントで応答性の高いAIシステムの構築が可能になります。 - -## [Claude Code Router](https://github.com/musistudio/claude-code-router) - -### 概要 -Claude Code RouterはAIモデルとの相互作用を最適化するオープンソースツールです。Claude Codeを基盤として、複数のAIプロバイダー間での動的なモデルルーティングを実現します。開発者が異なるタスクに最適なモデルを自動選択できるため、コスト効率と性能の両方を向上させることができます。 - -### 主な機能 -- 複数AIプロバイダー(OpenRouter、DeepSeek、Ollama、Gemini)への動的ルーティング -- タスクタイプに応じたモデル選択の自動化 -- リクエスト・レスポンス変換のカスタマイズ -- 会話中でのモデル切り替え -- GitHub Actionsとの統合 -- 拡張可能なプラグインシステム -- JSON設定ファイルによる柔軟な設定管理 - -### 注目される理由 -AI開発における大きな課題の一つは、異なるタスクに対して最適なモデルを選択することです。簡単なコード補完には軽量で高速なモデルを、複雑な推論には高性能なモデルを使い分けたいものの、手動での切り替えは非効率的でした。Claude Code Routerは、この問題を解決し、開発者がコンテキストに応じて自動的に最適なモデルを選択できる仕組みを提供します。特に、コスト最適化と性能のバランスを取りながら、シームレスな開発体験を実現できる点が評価されています。AIモデルの使い方がより戦略的で効率的になることで、開発者はより良いAIアプリケーションを構築できるようになります。 \ No newline at end of file diff --git a/tests/README.md b/tests/README.md new file mode 100644 index 0000000..23ba926 --- /dev/null +++ b/tests/README.md @@ -0,0 +1,51 @@ +# BATS Testing Framework + +This directory contains BATS (Bash Automated Testing System) tests for the weekly AI development digest project. + +**Note**: These tests must be run locally where Claude Code is installed, as they validate Claude command functionality. + +## Directory Structure + +``` +tests/ +├── unit/ # Unit tests for individual Claude commands +├── integration/ # Integration tests for command pipelines +├── helpers/ # Common test helper functions +└── README.md # This file +``` + +## Running Tests Locally + +```bash +# Run all tests +npm test + +# Run unit tests only +npm run test:unit + +# Run integration tests only +npm run test:integration + +# Run tests with TAP output +npm run test:watch +``` + +## Test Coverage + +### Unit Tests +- Individual Claude command digest tests +- Command input/output validation +- Error handling verification + +### Integration Tests +- Weekly digest pipeline end-to-end testing +- Multi-command interaction verification +- Data flow validation + +## Writing Tests + +Follow BATS testing conventions: +- Use descriptive test names with `@test` decorator +- Use helper functions for common operations +- Mock external dependencies when possible +- Test both success and failure scenarios \ No newline at end of file diff --git a/tests/helpers/common.bash b/tests/helpers/common.bash new file mode 100644 index 0000000..7ce0058 --- /dev/null +++ b/tests/helpers/common.bash @@ -0,0 +1,108 @@ +#!/bin/bash + +# Common test helper functions for BATS tests + +# Get current date in YYYY-MM-DD format +get_current_date() { + date '+%Y-%m-%d' +} + +# Get test date (yesterday to avoid timezone issues) +get_test_date() { + date -v-1d '+%Y-%m-%d' 2>/dev/null || date -d 'yesterday' '+%Y-%m-%d' +} + +# Create test resource directory +setup_test_resources() { + local test_date="$1" + local resource_dir="resources/${test_date}" + mkdir -p "$resource_dir" + echo "$resource_dir" +} + +# Clean up test resources +cleanup_test_resources() { + local test_date="$1" + local resource_dir="resources/${test_date}" + if [[ -d "$resource_dir" ]]; then + rm -rf "$resource_dir" + fi +} + +# Check if file exists and is not empty +file_exists_and_not_empty() { + local file="$1" + [[ -f "$file" && -s "$file" ]] +} + +# Check if directory exists +directory_exists() { + local dir="$1" + [[ -d "$dir" ]] +} + +# Mock external API response +create_mock_response() { + local mock_file="$1" + local content="$2" + echo "$content" > "$mock_file" +} + +# Verify file contains expected content +file_contains() { + local file="$1" + local pattern="$2" + # Use literal matching (-F) for patterns containing asterisks or other special chars + if [[ "$pattern" == *"*"* ]]; then + grep -F -- "$pattern" "$file" >/dev/null 2>&1 + else + grep -q -- "$pattern" "$file" + fi +} + +# Get Claude command path +get_claude_command_path() { + local command_name="$1" + echo ".claude/commands/${command_name}.md" +} + +# Simulate Claude command execution +simulate_claude_command() { + local command_file="$1" + local date_arg="$2" + + # This would normally execute the Claude command + # For testing, we'll create mock outputs + echo "Simulating execution of: $command_file with date: $date_arg" +} + +# Verify markdown file format +verify_markdown_format() { + local file="$1" + + # Check for basic markdown structure + if grep -q -- "^#" "$file" || grep -q -- "^\*\*" "$file" || grep -q -- "^-" "$file"; then + return 0 + fi + + return 1 +} + +# Check for Japanese content +contains_japanese() { + local file="$1" + # Simple check for Japanese characters (Hiragana, Katakana, Kanji) + grep -q '[あ-んア-ヶ一-龯]' "$file" +} + +# Setup test environment +setup_test_env() { + export BATS_TEST_DIRNAME="$(dirname "$BATS_TEST_FILENAME")" + export PROJECT_ROOT="$(cd "$BATS_TEST_DIRNAME/../.." && pwd)" + cd "$PROJECT_ROOT" +} + +# Teardown test environment +teardown_test_env() { + cd "$PROJECT_ROOT" +} diff --git a/tests/helpers/mock_data.bash b/tests/helpers/mock_data.bash new file mode 100644 index 0000000..b1d83bb --- /dev/null +++ b/tests/helpers/mock_data.bash @@ -0,0 +1,201 @@ +#!/bin/bash + +# Mock data and responses for testing + +# Mock AI tech blog articles data +get_mock_ai_blog_data() { + cat << 'EOF' +# AI技術ブログ記事まとめ + +## Zenn記事 +- [LLMの最新動向について](https://zenn.dev/example/articles/llm-trends) - author1 +- [Transformerアーキテクチャの進化](https://zenn.dev/example/articles/transformer-evolution) - author2 + +## Qiita記事 +- [機械学習パイプラインの構築](https://qiita.com/example/items/ml-pipeline) - developer1 +- [深層学習の最適化手法](https://qiita.com/example/items/dl-optimization) - developer2 + +## note記事 +- [AI開発の現場から](https://note.com/example/n/ai-development) - writer1 +- [ChatGPTの活用事例](https://note.com/example/n/chatgpt-use-cases) - writer2 +EOF +} + +# Mock Hacker News & Reddit data +get_mock_hn_reddit_data() { + cat << 'EOF' +# コミュニティディスカッション + +## Hacker News +- [新しいAIフレームワークがリリース](https://news.ycombinator.com/item?id=123456) - 150 points +- [LLMの推論速度向上について](https://news.ycombinator.com/item?id=123457) - 98 points + +## Reddit r/MachineLearning +- [SOTA達成の新論文](https://reddit.com/r/MachineLearning/comments/example1) - 45 upvotes +- [実用的なMLOpsツール](https://reddit.com/r/MachineLearning/comments/example2) - 32 upvotes + +## Reddit r/LocalLLaMA +- [ローカルLLMの性能比較](https://reddit.com/r/LocalLLaMA/comments/example3) - 67 upvotes +- [量子化技術の最新動向](https://reddit.com/r/LocalLLaMA/comments/example4) - 28 upvotes +EOF +} + +# Mock AI news data +get_mock_ai_news_data() { + cat << 'EOF' +# AI関連ニュース + +## 企業動向 +- OpenAI、新しいGPTモデルを発表 +- Google、Geminiの性能向上を報告 +- Anthropic、Claude 3の新機能をリリース + +## 技術動向 +- Transformer以降の新アーキテクチャが登場 +- マルチモーダルAIの精度が大幅向上 +- エッジデバイス向けAI推論の高速化技術 + +## 業界動向 +- AI規制法案の議論が活発化 +- 企業でのAI導入事例が急増 +- AI人材の需要が過去最高に +EOF +} + +# Mock trending repositories data +get_mock_trending_repos_data() { + cat << 'EOF' +# AIトレンドリポジトリ - 2025-07-20 + +## [ollama/ollama](https://github.com/ollama/ollama) + +### 概要 +Ollamaは、ローカル環境で大規模言語モデル(LLM)を簡単に実行できるツールです。開発者がクラウドAPIに依存せず、自分のマシンでLLMを活用できるようになります。 + +### 主な機能 +- ワンコマンドでのモデルインストール +- 複数のLLMモデルをサポート +- RESTful API提供 +- GPUアクセラレーション対応 + +### 注目される理由 +プライバシーを重視する開発者や、オフライン環境でのAI開発のニーズが高まる中、ローカルでLLMを動かせるツールとして注目を集めています。 + +## [microsoft/autogen](https://github.com/microsoft/autogen) + +### 概要 +AutoGenは、複数のAIエージェントが協調して動作するフレームワークで、複雑なタスクを自動化できます。 + +### 主な機能 +- マルチエージェント会話システム +- 自動コード生成と実行 +- カスタマイズ可能なエージェント設計 +- LLM統合サポート + +### 注目される理由 +AIエージェントの実用化が進む中、実際のビジネスタスクに適用できる実装として開発者から高い評価を得ています。 +EOF +} + +# Mock events data +get_mock_events_data() { + cat << 'EOF' +# AI開発イベント - 2025-07-20 + +## Upcoming Events (Next 7 Days) + +### Event 1: [Claude API ハンズオンワークショップ](https://connpass.com/event/123456/) +- **主催者**: Anthropic Japan +- **日時**: 2025-07-21 19:00 +- **形式**: Online +- **参加費**: Free +- **概要**: Claude APIを使った実践的な開発手法を学ぶハンズオンセッション +- **開発者向けポイント**: 実際にコードを書きながらClaude APIの使い方を習得できる + +### Event 2: [LangChain実装入門](https://connpass.com/event/123457/) +- **主催者**: AI Dev Community +- **日時**: 2025-07-23 14:00 +- **形式**: Offline (東京・渋谷) +- **参加費**: ¥3,000 +- **概要**: LangChainを使ったAIアプリケーション開発の基礎を学ぶ +- **開発者向けポイント**: RAGシステムの実装方法やベストプラクティスを学べる + +### Event 3: [Cursor/Windsurf比較セミナー](https://connpass.com/event/123458/) +- **主催者**: Developer Tools Japan +- **日時**: 2025-07-25 18:30 +- **形式**: Online +- **参加費**: Free +- **概要**: 最新のAIコーディングアシスタントの比較と活用方法 +- **開発者向けポイント**: 実際の開発フローでの使い分けや効果的な利用方法を学べる +EOF +} + +# Mock release information data +get_mock_release_data() { + cat << 'EOF' +# リリース情報 - 2025-07-20 + +## 主要なリリース + +### ツール・ライブラリ + +## google-gemini/gemini-cli v0.2.0 +- **Release Date**: 2025-07-19 +- **Repository**: https://github.com/google-gemini/gemini-cli +- **Release**: https://github.com/google-gemini/gemini-cli/releases/tag/v0.2.0 + +### Key Changes: +- Added support for Gemini 1.5 Pro +- Improved streaming response handling +- Fixed memory leak in long conversations +- Added --model flag for model selection + +## anthropics/claude-code v1.5.0 +- **Release Date**: 2025-07-18 +- **Repository**: https://github.com/anthropics/claude-code +- **Changelog**: https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md + +### Key Changes: +- Introduced Claude 3 Opus support +- Enhanced code completion accuracy +- Added workspace-aware context management +- Performance improvements for large codebases + +## cursor/cursor v0.30.0 +- **Release Date**: 2025-07-17 +- **Website**: https://cursor.sh +- **Changelog**: https://cursor.sh/changelog + +### Key Changes: +- New AI-powered refactoring tools +- Improved multi-file context understanding +- Added support for custom prompt templates +- Enhanced integration with local LLMs + +## cline/cline v2.1.0 +- **Release Date**: 2025-07-16 +- **Repository**: https://github.com/cline/cline +- **Release**: https://github.com/cline/cline/releases/tag/v2.1.0 + +### Key Changes: +- Added autonomous debugging capabilities +- Improved file navigation and search +- New terminal integration features +- Enhanced error handling and recovery +EOF +} + +# Create mock resource files +create_mock_resources() { + local test_date="$1" + local resource_dir="resources/${test_date}" + + mkdir -p "$resource_dir" + + get_mock_ai_blog_data > "${resource_dir}/tech_blog_articles.md" + get_mock_hn_reddit_data > "${resource_dir}/community_discussions.md" + get_mock_ai_news_data > "${resource_dir}/ai_news_summary.md" + get_mock_trending_repos_data > "${resource_dir}/trending_repositories.md" + get_mock_events_data > "${resource_dir}/events.md" + get_mock_release_data > "${resource_dir}/release_information.md" +} \ No newline at end of file diff --git a/tests/integration/generate_weekly_article.bats b/tests/integration/generate_weekly_article.bats new file mode 100755 index 0000000..7beada4 --- /dev/null +++ b/tests/integration/generate_weekly_article.bats @@ -0,0 +1,301 @@ +#!/usr/bin/env bats + +# Load test helpers +load '../helpers/common' +load '../helpers/mock_data' + +# Setup and teardown +setup() { + setup_test_env + TEST_DATE=$(get_test_date) + RESOURCE_DIR=$(setup_test_resources "$TEST_DATE") + COMMAND_FILE=".claude/commands/generate_weekly_article.md" + + # Create articles directory for test + mkdir -p "articles" + + # Expected article filename + ARTICLE_DATE=$(date -v-1d '+%Y%m%d' 2>/dev/null || date -d 'yesterday' '+%Y%m%d') + ARTICLE_FILE="articles/weekly_ai_${ARTICLE_DATE}.md" +} + +teardown() { + cleanup_test_resources "$TEST_DATE" + + # Clean up test articles + rm -f "articles/weekly_ai_"*.md + + teardown_test_env +} + +# Test command file existence +@test "generate_weekly_article.md command file exists" { + [ -f "$COMMAND_FILE" ] +} + +# Test date calculation steps +@test "article generator includes all date format calculations" { + file_contains "$COMMAND_FILE" "date +%Y-%m-%d" + file_contains "$COMMAND_FILE" "date +%Y年%m月%d日" + file_contains "$COMMAND_FILE" "date +%Y%m%d" +} + +# Test resource collection steps +@test "article generator scans for all resource files" { + file_contains "$COMMAND_FILE" "release_information.md" + file_contains "$COMMAND_FILE" "trending_repositories.md" + file_contains "$COMMAND_FILE" "ai_news_summary.md" + file_contains "$COMMAND_FILE" "events.md" + file_contains "$COMMAND_FILE" "community_discussions.md" + file_contains "$COMMAND_FILE" "tech_blog_articles.md" +} + +# Test content filtering rules +@test "article generator includes content filtering rules" { + file_contains "$COMMAND_FILE" "Content Filtering Rules" + file_contains "$COMMAND_FILE" "Focus on noteworthy features" + file_contains "$COMMAND_FILE" "Exclude minor bug fixes" + file_contains "$COMMAND_FILE" "Include repositories that demonstrate innovation" +} + +# Test link requirements +@test "article generator enforces strict link requirements" { + file_contains "$COMMAND_FILE" "CRITICAL: Always use the EXACT URLs" + file_contains "$COMMAND_FILE" "NEVER generate, modify, or create placeholder URLs" + file_contains "$COMMAND_FILE" "only use URLs that actually exist in the resource files" +} + +# Test section ordering +@test "article generator enforces strict section order" { + file_contains "$COMMAND_FILE" "CRITICAL: Strictly follow the section order" + file_contains "$COMMAND_FILE" "1. リリース情報" + file_contains "$COMMAND_FILE" "2. 注目のAI開発リポジトリ" + file_contains "$COMMAND_FILE" "3. AI関連ニュース" + file_contains "$COMMAND_FILE" "4. テックブログ" + file_contains "$COMMAND_FILE" "5. 海外コミュニティ動向" + file_contains "$COMMAND_FILE" "6. 今週のAI開発イベント" + file_contains "$COMMAND_FILE" "7. まとめ" +} + +# Integration test: Full resource set article generation +@test "generates article with all resources available" { + # Create full mock resources + create_mock_resources "$TEST_DATE" + + # Verify all resources exist + local resources=( + "release_information.md" + "trending_repositories.md" + "ai_news_summary.md" + "events.md" + "community_discussions.md" + "tech_blog_articles.md" + ) + + for resource in "${resources[@]}"; do + file_exists_and_not_empty "${RESOURCE_DIR}/${resource}" + done +} + +# Integration test: Partial resource article generation +@test "generates article with partial resources" { + # Create only some resources + mkdir -p "$RESOURCE_DIR" + get_mock_release_data > "${RESOURCE_DIR}/release_information.md" + get_mock_trending_repos_data > "${RESOURCE_DIR}/trending_repositories.md" + get_mock_ai_news_data > "${RESOURCE_DIR}/ai_news_summary.md" + + # Verify partial resources exist + file_exists_and_not_empty "${RESOURCE_DIR}/release_information.md" + file_exists_and_not_empty "${RESOURCE_DIR}/trending_repositories.md" + file_exists_and_not_empty "${RESOURCE_DIR}/ai_news_summary.md" + + # Verify missing resources don't exist + [ ! -f "${RESOURCE_DIR}/events.md" ] + [ ! -f "${RESOURCE_DIR}/community_discussions.md" ] + [ ! -f "${RESOURCE_DIR}/tech_blog_articles.md" ] +} + +# Integration test: Empty content handling +@test "excludes sections with empty content" { + # Create resources with some empty content + mkdir -p "$RESOURCE_DIR" + get_mock_release_data > "${RESOURCE_DIR}/release_information.md" + echo "No events found" > "${RESOURCE_DIR}/events.md" + echo "No updates" > "${RESOURCE_DIR}/ai_news_summary.md" + + # Verify command filters empty content + file_contains "$COMMAND_FILE" "If a data file contains only \"No updates\"" + file_contains "$COMMAND_FILE" "exclude that entire section from the final article" +} + +# Integration test: Article frontmatter generation +@test "generates proper Zenn frontmatter" { + # Create test article content + local test_content="--- +title: \"週刊AI駆動開発 - ${TEST_DATE}\" +emoji: \"🤖\" +type: \"tech\" +topics: [\"ai駆動開発\", \"vibecoding\", \"ai\", \"claudecode\", \"Gemini CLI\", \"cursor\"] +published: true +--- + +Test content" + + echo "$test_content" > "$ARTICLE_FILE" + + # Verify frontmatter structure + file_contains "$ARTICLE_FILE" "title: \"週刊AI駆動開発" + file_contains "$ARTICLE_FILE" "emoji: \"🤖\"" + file_contains "$ARTICLE_FILE" "type: \"tech\"" + file_contains "$ARTICLE_FILE" "topics: \\[\"ai駆動開発\"" + file_contains "$ARTICLE_FILE" "published: true" +} + +# Integration test: Japanese content preservation +@test "preserves Japanese content in article" { + # Create mock resources with Japanese content + create_mock_resources "$TEST_DATE" + + # Create test article with Japanese content + echo "--- +title: \"週刊AI駆動開発 - ${TEST_DATE}\" +emoji: \"🤖\" +type: \"tech\" +topics: [\"ai駆動開発\"] +published: true +--- + +今週のAI開発の最新動向をお届けします。 + +## 🚀 リリース情報 +新しいAIツールがリリースされました。 + +## 📝 まとめ +今週は多くの進展がありました。" > "$ARTICLE_FILE" + + # Verify Japanese content exists + contains_japanese "$ARTICLE_FILE" + file_contains "$ARTICLE_FILE" "今週のAI開発" + file_contains "$ARTICLE_FILE" "まとめ" +} + +# Integration test: URL preservation +@test "preserves exact URLs from source files" { + # Create mock resources + create_mock_resources "$TEST_DATE" + + # Verify URLs in source files + file_contains "${RESOURCE_DIR}/tech_blog_articles.md" "https://zenn.dev/example/articles/" + file_contains "${RESOURCE_DIR}/tech_blog_articles.md" "https://qiita.com/example/items/" + file_contains "${RESOURCE_DIR}/community_discussions.md" "https://news.ycombinator.com/item?id=" + file_contains "${RESOURCE_DIR}/events.md" "https://connpass.com/event/" +} + +# Integration test: Article file naming +@test "creates article with correct filename format" { + # Expected format: weekly_ai_YYYYMMDD.md + local expected_pattern="^weekly_ai_[0-9]{8}\\.md$" + local filename=$(basename "$ARTICLE_FILE") + + [[ "$filename" =~ $expected_pattern ]] +} + +# Integration test: Error handling for missing resources +@test "handles missing resource directory gracefully" { + # Remove resource directory + rm -rf "$RESOURCE_DIR" + + # Verify command includes error handling + file_contains "$COMMAND_FILE" "If no data files are found" + file_contains "$COMMAND_FILE" "generate a minimal article explaining the situation" +} + +# Integration test: Introduction vs Summary differentiation +@test "differentiates between introduction and summary sections" { + file_contains "$COMMAND_FILE" "Introduction vs まとめ Differentiation Rules" + file_contains "$COMMAND_FILE" "Introduction: Focus on welcoming readers" + file_contains "$COMMAND_FILE" "まとめ: Write a very concise summary" + file_contains "$COMMAND_FILE" "280 characters or less" +} + +# Integration test: Repository link card format +@test "formats repository links for Zenn link cards" { + # Create mock trending repos + mkdir -p "$RESOURCE_DIR" + get_mock_trending_repos_data > "${RESOURCE_DIR}/trending_repositories.md" + + # Verify plain URL format requirement + file_contains "$COMMAND_FILE" "use plain URL format for link cards" + file_contains "$COMMAND_FILE" "https://github.com/user/repo" +} + +# Integration test: Article footer consistency +@test "includes consistent article footer" { + file_contains "$COMMAND_FILE" "週刊AI駆動開発について" + file_contains "$COMMAND_FILE" "この記事は以下リポジトリの内容で生成されています" + file_contains "$COMMAND_FILE" "https://github.com/pppp606/weekly_ai_dev" +} + +# Integration test: Data flow validation +@test "validates data flow from resources to article" { + # Create full mock resources + create_mock_resources "$TEST_DATE" + + # Simulate article generation + echo "--- +title: \"週刊AI駆動開発 - ${TEST_DATE}\" +emoji: \"🤖\" +type: \"tech\" +topics: [\"ai駆動開発\"] +published: true +--- + +今週のAI開発の最新動向をお届けします。 + +## 🚀 リリース情報 +$(cat "${RESOURCE_DIR}/release_information.md") + +## 📈 注目のAI開発リポジトリ +$(cat "${RESOURCE_DIR}/trending_repositories.md") + +## 📝 まとめ +今週は多くの重要な進展がありました。" > "$ARTICLE_FILE" + + # Verify data from resources appears in article + file_exists_and_not_empty "$ARTICLE_FILE" + verify_markdown_format "$ARTICLE_FILE" +} + +# Integration test: Section skipping for empty content +@test "skips sections with no meaningful content" { + # Create resources with mixed content + mkdir -p "$RESOURCE_DIR" + get_mock_release_data > "${RESOURCE_DIR}/release_information.md" + echo "No events found for this period." > "${RESOURCE_DIR}/events.md" + echo "No updates" > "${RESOURCE_DIR}/ai_news_summary.md" + + # Verify command will skip empty sections + file_contains "$COMMAND_FILE" "Only include sections for which data files exist AND contain meaningful content" + file_contains "$COMMAND_FILE" "Never include sections with \"No updates\"" +} + +# Integration test: Multi-day resource handling +@test "handles resources from specific date correctly" { + # Create resources for specific date + create_mock_resources "$TEST_DATE" + + # Verify resources are in date-specific directory + directory_exists "resources/${TEST_DATE}" + + # Verify all resources are in correct location + local date_resources=( + "resources/${TEST_DATE}/release_information.md" + "resources/${TEST_DATE}/trending_repositories.md" + "resources/${TEST_DATE}/ai_news_summary.md" + ) + + for resource in "${date_resources[@]}"; do + [ -f "$resource" ] + done +} \ No newline at end of file diff --git a/tests/integration/weekly_digest_pipeline.bats b/tests/integration/weekly_digest_pipeline.bats new file mode 100755 index 0000000..fd5f476 --- /dev/null +++ b/tests/integration/weekly_digest_pipeline.bats @@ -0,0 +1,224 @@ +#!/usr/bin/env bats + +# Load test helpers +load '../helpers/common' +load '../helpers/mock_data' + +# Setup and teardown +setup() { + setup_test_env + TEST_DATE=$(get_test_date) + RESOURCE_DIR=$(setup_test_resources "$TEST_DATE") + COMMAND_FILE=".claude/commands/weekly_digest_pipeline.md" + ARTICLE_COMMAND_FILE=".claude/commands/generate_weekly_article.md" + + # Create articles directory for test + mkdir -p "articles" + + # Track which digest commands exist + export DIGEST_COMMANDS=() + for cmd in vibecoding_release_digest ai_trending_repositories_digest ai_news_digest ai_events_digest hacker_news_reddit_digest ai_tec_blog_digest; do + if [[ -f ".claude/commands/${cmd}.md" ]]; then + DIGEST_COMMANDS+=("$cmd") + fi + done +} + +teardown() { + cleanup_test_resources "$TEST_DATE" + + # Clean up any test articles + rm -f "articles/weekly_ai_"*.md + + teardown_test_env +} + +# Test command file existence +@test "weekly_digest_pipeline.md command file exists" { + [ -f "$COMMAND_FILE" ] +} + +# Test pipeline command structure +@test "pipeline command contains all required steps" { + file_contains "$COMMAND_FILE" "Execute Individual Digest Commands Sequentially" + file_contains "$COMMAND_FILE" "Error Handling" + file_contains "$COMMAND_FILE" "Generate Final Article Using Dedicated Command" + file_contains "$COMMAND_FILE" "Article Guardrail Review" + file_contains "$COMMAND_FILE" "Commit Generated Content" +} + +# Test pipeline execution order +@test "pipeline defines correct execution order" { + file_contains "$COMMAND_FILE" "vibecoding_release_digest.md" + file_contains "$COMMAND_FILE" "ai_trending_repositories_digest.md" + file_contains "$COMMAND_FILE" "ai_news_digest.md" + file_contains "$COMMAND_FILE" "ai_events_digest.md" + file_contains "$COMMAND_FILE" "hacker_news_reddit_digest.md" + file_contains "$COMMAND_FILE" "ai_tec_blog_digest.md" +} + +# Test sequential execution benefit documentation +@test "pipeline documents sequential execution benefits" { + file_contains "$COMMAND_FILE" "Sequential Execution Benefits" + file_contains "$COMMAND_FILE" "Avoids API rate limiting" + file_contains "$COMMAND_FILE" "Easier error tracking" + file_contains "$COMMAND_FILE" "predictable resource usage" +} + +# Test error handling strategy +@test "pipeline includes error handling strategy" { + file_contains "$COMMAND_FILE" "If a digest command fails" + file_contains "$COMMAND_FILE" "Continue with the next command" + file_contains "$COMMAND_FILE" "Keep track of which commands succeeded/failed" +} + +# Test article generation step +@test "pipeline includes article generation command" { + file_contains "$COMMAND_FILE" "generate_weekly_article.md" + file_contains "$COMMAND_FILE" "Collect all generated reports" + file_contains "$COMMAND_FILE" "Process available data" +} + +# Test guardrail review step +@test "pipeline includes guardrail review" { + file_contains "$COMMAND_FILE" "article_guardrail_review.md" + file_contains "$COMMAND_FILE" "Review the article for confidential information" + file_contains "$COMMAND_FILE" "Check for political/religious bias" +} + +# Test commit process +@test "pipeline includes commit process" { + file_contains "$COMMAND_FILE" "commit_weekly_digest.md" + file_contains "$COMMAND_FILE" "Add all generated files" + file_contains "$COMMAND_FILE" "Create a commit with meaningful message" +} + +# Integration test: Resource directory creation +@test "pipeline creates proper resource directory structure" { + # Simulate pipeline creating directories + local expected_dir="resources/${TEST_DATE}" + directory_exists "$expected_dir" +} + +# Integration test: Multi-command data flow +@test "pipeline supports data flow between digest commands" { + # Create mock resources to simulate digest command outputs + create_mock_resources "$TEST_DATE" + + # Verify all expected resource files exist + file_exists_and_not_empty "${RESOURCE_DIR}/release_information.md" + file_exists_and_not_empty "${RESOURCE_DIR}/trending_repositories.md" + file_exists_and_not_empty "${RESOURCE_DIR}/ai_news_summary.md" + file_exists_and_not_empty "${RESOURCE_DIR}/events.md" + file_exists_and_not_empty "${RESOURCE_DIR}/community_discussions.md" + file_exists_and_not_empty "${RESOURCE_DIR}/tech_blog_articles.md" +} + +# Integration test: Error recovery scenario +@test "pipeline handles partial command failures gracefully" { + # Create only some mock resources to simulate partial failure + mkdir -p "$RESOURCE_DIR" + get_mock_release_data > "${RESOURCE_DIR}/release_information.md" + get_mock_trending_repos_data > "${RESOURCE_DIR}/trending_repositories.md" + # Simulate failures for other commands by not creating their files + + # Verify pipeline can still generate article with partial data + file_exists_and_not_empty "${RESOURCE_DIR}/release_information.md" + file_exists_and_not_empty "${RESOURCE_DIR}/trending_repositories.md" + + # Missing files should not exist + [ ! -f "${RESOURCE_DIR}/ai_news_summary.md" ] + [ ! -f "${RESOURCE_DIR}/events.md" ] +} + +# Integration test: Date handling across commands +@test "pipeline maintains consistent date handling" { + # Verify pipeline uses same date format across all operations + file_contains "$COMMAND_FILE" "date +%Y-%m-%d" + + # Verify resource directory follows date format + [[ "$RESOURCE_DIR" =~ resources/[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] +} + +# Integration test: Article generation trigger +@test "pipeline triggers article generation after digest completion" { + # Create full mock resources + create_mock_resources "$TEST_DATE" + + # Verify all required data exists for article generation + local required_files=( + "release_information.md" + "trending_repositories.md" + "ai_news_summary.md" + "events.md" + "community_discussions.md" + "tech_blog_articles.md" + ) + + for file in "${required_files[@]}"; do + file_exists_and_not_empty "${RESOURCE_DIR}/${file}" + done +} + +# Integration test: Pipeline completion state +@test "pipeline produces expected output structure" { + # Create mock resources + create_mock_resources "$TEST_DATE" + + # Simulate article creation + local article_file="articles/weekly_ai_$(date -v-1d '+%Y%m%d' 2>/dev/null || date -d 'yesterday' '+%Y%m%d').md" + echo "--- +title: \"週刊AI駆動開発 - ${TEST_DATE}\" +emoji: \"🤖\" +type: \"tech\" +topics: [\"ai駆動開発\", \"vibecoding\", \"ai\", \"claudecode\", \"Gemini CLI\", \"cursor\"] +published: true +--- + +Test article content" > "$article_file" + + # Verify article was created + file_exists_and_not_empty "$article_file" + + # Verify article has proper frontmatter + file_contains "$article_file" "title: \"週刊AI駆動開発" + file_contains "$article_file" "emoji: \"🤖\"" +} + +# Integration test: Command discovery +@test "pipeline discovers all digest commands dynamically" { + # Count actual digest commands + local digest_count=0 + for file in .claude/commands/*_digest.md; do + if [[ -f "$file" && "$file" != *"weekly_digest_pipeline.md" ]]; then + ((digest_count++)) + fi + done + + # Verify pipeline can handle variable number of digest commands + [[ $digest_count -gt 0 ]] +} + +# Integration test: Status tracking +@test "pipeline tracks command execution status" { + file_contains "$COMMAND_FILE" "Keep track of which commands succeeded/failed" + file_contains "$COMMAND_FILE" "Include status report in the final output" +} + +# Integration test: Japanese content handling +@test "pipeline handles Japanese content properly" { + # Create mock resources with Japanese content + create_mock_resources "$TEST_DATE" + + # Verify Japanese content is preserved + contains_japanese "${RESOURCE_DIR}/tech_blog_articles.md" + contains_japanese "${RESOURCE_DIR}/ai_news_summary.md" + contains_japanese "${RESOURCE_DIR}/events.md" +} + +# Integration test: Final output format +@test "pipeline produces Note-compatible output" { + file_contains "$COMMAND_FILE" "final article should be in Japanese" + file_contains "$COMMAND_FILE" "appropriate formatting for Note" + file_contains "$COMMAND_FILE" "Include relevant emojis" +} \ No newline at end of file diff --git a/tests/unit/ai_events_digest.bats b/tests/unit/ai_events_digest.bats new file mode 100755 index 0000000..838e39a --- /dev/null +++ b/tests/unit/ai_events_digest.bats @@ -0,0 +1,267 @@ +#!/usr/bin/env bats + +# Load test helpers +load '../helpers/common' +load '../helpers/mock_data' + +# Setup and teardown +setup() { + setup_test_env + TEST_DATE=$(get_test_date) + RESOURCE_DIR=$(setup_test_resources "$TEST_DATE") + COMMAND_FILE=".claude/commands/ai_events_digest.md" +} + +teardown() { + cleanup_test_resources "$TEST_DATE" + teardown_test_env +} + +# Test command file existence +@test "ai_events_digest.md command file exists" { + [ -f "$COMMAND_FILE" ] +} + +# Test command file contains required sections +@test "ai_events_digest.md contains date calculation section" { + file_contains "$COMMAND_FILE" "Date Calculation" + file_contains "$COMMAND_FILE" "today's date" + file_contains "$COMMAND_FILE" "tomorrow's date" + file_contains "$COMMAND_FILE" "7 days later" + file_contains "$COMMAND_FILE" "date +%Y-%m-%d" +} + +@test "ai_events_digest.md contains search URLs" { + file_contains "$COMMAND_FILE" "Search URLs to check" + file_contains "$COMMAND_FILE" "connpass.com/search" + file_contains "$COMMAND_FILE" "claude+ai+cursor" + file_contains "$COMMAND_FILE" "llm+gpt+chatgpt" + file_contains "$COMMAND_FILE" "AI開発+生成AI" + file_contains "$COMMAND_FILE" "プロンプトエンジニアリング+prompt" +} + +@test "ai_events_digest.md contains quality criteria" { + file_contains "$COMMAND_FILE" "Quality Criteria" + file_contains "$COMMAND_FILE" "MUST focus specifically on AI development" + file_contains "$COMMAND_FILE" "Named expert speakers" + file_contains "$COMMAND_FILE" "Hands-on workshops" + file_contains "$COMMAND_FILE" "Technical deep-dives" + file_contains "$COMMAND_FILE" "Live coding" +} + +@test "ai_events_digest.md contains exclusion criteria" { + file_contains "$COMMAND_FILE" "EXCLUDE" + file_contains "$COMMAND_FILE" "General \"AI overview\" talks" + file_contains "$COMMAND_FILE" "Networking events without technical content" + file_contains "$COMMAND_FILE" "Vague \"AI discussion\" meetups" + file_contains "$COMMAND_FILE" "Events without clear learning objectives" +} + +@test "ai_events_digest.md contains output format" { + file_contains "$COMMAND_FILE" "Output Requirements" + file_contains "$COMMAND_FILE" "Event Title" + file_contains "$COMMAND_FILE" "主催者" + file_contains "$COMMAND_FILE" "日時" + file_contains "$COMMAND_FILE" "形式" + file_contains "$COMMAND_FILE" "参加費" + file_contains "$COMMAND_FILE" "概要" + file_contains "$COMMAND_FILE" "開発者向けポイント" +} + +@test "ai_events_digest.md contains event selection topics" { + file_contains "$COMMAND_FILE" "LLM (Large Language Models)" + file_contains "$COMMAND_FILE" "AI agents" + file_contains "$COMMAND_FILE" "Prompt engineering" + file_contains "$COMMAND_FILE" "Claude / GPT / Gemini" + file_contains "$COMMAND_FILE" "Cursor / Windsurf / Codeium" + file_contains "$COMMAND_FILE" "RAG (Retrieval-Augmented Generation)" + file_contains "$COMMAND_FILE" "Langchain / LlamaIndex" +} + +@test "ai_events_digest.md contains fallback message" { + file_contains "$COMMAND_FILE" "今週は注目すべきAI開発イベントが見つかりませんでした" + file_contains "$COMMAND_FILE" "If fewer than 2 high-quality events" +} + +# Test mock data creation +@test "mock events data can be generated" { + local mock_content + mock_content=$(get_mock_events_data) + [[ -n "$mock_content" ]] + echo "$mock_content" | grep -q "AI開発イベント" + echo "$mock_content" | grep -q "Upcoming Events" + echo "$mock_content" | grep -q "主催者" +} + +# Test output file creation +@test "events.md output file can be created" { + local output_file="${RESOURCE_DIR}/events.md" + get_mock_events_data > "$output_file" + + file_exists_and_not_empty "$output_file" + verify_markdown_format "$output_file" + contains_japanese "$output_file" +} + +# Test output file structure +@test "events.md has correct structure" { + local output_file="${RESOURCE_DIR}/events.md" + cat << 'EOF' > "$output_file" +# AI Development Events - 2025-07-20 + +## Upcoming Events (Next 7 Days) + +### Event 1: [Claude API ハンズオンワークショップ](https://connpass.com/event/123456/) +- **主催者**: Anthropic Japan +- **日時**: 2025-07-21 19:00 +- **形式**: Online +- **参加費**: Free +- **概要**: Claude APIを使った実践的な開発手法を学ぶハンズオンセッション +- **開発者向けポイント**: 実際にコードを書きながらClaude APIの使い方を習得できる + +### Event 2: [LangChain実装入門](https://connpass.com/event/123457/) +- **主催者**: AI Dev Community +- **日時**: 2025-07-23 14:00 +- **形式**: Offline (東京・渋谷) +- **参加費**: ¥3,000 +- **概要**: LangChainを使ったAIアプリケーション開発の基礎を学ぶ +- **開発者向けポイント**: RAGシステムの実装方法やベストプラクティスを学べる +EOF + + # Check for main sections + file_contains "$output_file" "# AI Development Events" + file_contains "$output_file" "## Upcoming Events (Next 7 Days)" + file_contains "$output_file" "### Event" +} + +# Test event details format +@test "events have all required details" { + local output_file="${RESOURCE_DIR}/events.md" + cat << 'EOF' > "$output_file" +### Event 1: [テストイベント](https://example.com) +- **主催者**: Test Organizer +- **日時**: 2025-07-21 19:00 +- **形式**: Online +- **参加費**: Free +- **概要**: テスト概要 +- **開発者向けポイント**: テストポイント +EOF + + file_contains "$output_file" "\\*\\*主催者\\*\\*" + file_contains "$output_file" "\\*\\*日時\\*\\*" + file_contains "$output_file" "\\*\\*形式\\*\\*" + file_contains "$output_file" "\\*\\*参加費\\*\\*" + file_contains "$output_file" "\\*\\*概要\\*\\*" + file_contains "$output_file" "\\*\\*開発者向けポイント\\*\\*" +} + +# Test URL requirement +@test "events include direct URLs" { + local output_file="${RESOURCE_DIR}/events.md" + cat << 'EOF' > "$output_file" +### Event 1: [AI Workshop](https://connpass.com/event/12345/) +EOF + + file_contains "$output_file" "\\[.*\\](https://.*)" + file_contains "$output_file" "connpass.com/event" +} + +# Test Japanese content requirement +@test "output contains Japanese event descriptions" { + local output_file="${RESOURCE_DIR}/events.md" + get_mock_events_data > "$output_file" + + contains_japanese "$output_file" + file_contains "$output_file" "勉強会\|ハンズオン\|セミナー" +} + +# Test error handling for missing directories +@test "handles missing resource directory gracefully" { + local non_existent_dir="resources/9999-99-99" + + # Should be able to create directory if it doesn't exist + run mkdir -p "$non_existent_dir" + [ "$status" -eq 0 ] + + # Cleanup + rmdir "$non_existent_dir" 2>/dev/null || true +} + +# Test command file format validation +@test "command file is valid markdown" { + verify_markdown_format "$COMMAND_FILE" +} + +# Test date range requirement +@test "command requires next 7 days timeframe" { + file_contains "$COMMAND_FILE" "next 7 days" + file_contains "$COMMAND_FILE" "starting tomorrow" + file_contains "$COMMAND_FILE" "\\+1 day" + file_contains "$COMMAND_FILE" "\\+7 days" +} + +# Test file output requirements +@test "command specifies correct output location" { + file_contains "$COMMAND_FILE" "Save to" + file_contains "$COMMAND_FILE" "resources/\\[TODAY_DATE\\]/events.md" + file_contains "$COMMAND_FILE" "generation date" +} + +# Test URL parameter substitution +@test "command requires date substitution in URLs" { + file_contains "$COMMAND_FILE" "start_from=\\[TOMORROW_DATE\\]" + file_contains "$COMMAND_FILE" "start_to=\\[SEVEN_DAYS_LATER_DATE\\]" + file_contains "$COMMAND_FILE" "Use the actual dates from the bash commands" +} + +# Test search coverage +@test "command covers multiple search terms" { + file_contains "$COMMAND_FILE" "claude+ai+cursor" + file_contains "$COMMAND_FILE" "llm+gpt+chatgpt" + file_contains "$COMMAND_FILE" "AI開発+生成AI" + file_contains "$COMMAND_FILE" "プロンプトエンジニアリング" +} + +# Test event count requirement +@test "command requires 2-4 high-quality events" { + file_contains "$COMMAND_FILE" "2-4 HIGH-QUALITY events" + file_contains "$COMMAND_FILE" "especially relevant to AI-driven development" +} + +# Test quality focus +@test "command emphasizes technical quality" { + file_contains "$COMMAND_FILE" "Named expert speakers from AI companies" + file_contains "$COMMAND_FILE" "Hands-on workshops with specific tools" + file_contains "$COMMAND_FILE" "Technical deep-dives" + file_contains "$COMMAND_FILE" "Live coding or implementation sessions" +} + +# Test exclusion enforcement +@test "command excludes low-quality events" { + file_contains "$COMMAND_FILE" "General \"AI overview\" talks" + file_contains "$COMMAND_FILE" "Networking events without technical content" + file_contains "$COMMAND_FILE" "without clear learning objectives" +} + +# Test AI development focus +@test "command focuses on practical AI development" { + file_contains "$COMMAND_FILE" "AI-assisted development" + file_contains "$COMMAND_FILE" "GitHub Copilot" + file_contains "$COMMAND_FILE" "AI integration in development workflows" + file_contains "$COMMAND_FILE" "AI API usage and best practices" +} + +# Test empty result handling +@test "command handles no events scenario" { + file_contains "$COMMAND_FILE" "If fewer than 2 high-quality events are found" + file_contains "$COMMAND_FILE" "今週は注目すべきAI開発イベントが見つかりませんでした" +} + +# Test format consistency +@test "command enforces consistent event format" { + file_contains "$COMMAND_FILE" "Event Title" + file_contains "$COMMAND_FILE" "event_url" + file_contains "$COMMAND_FILE" "YYYY-MM-DD HH:MM" + file_contains "$COMMAND_FILE" "Online/Offline" + file_contains "$COMMAND_FILE" "Free/¥X,XXX" +} \ No newline at end of file diff --git a/tests/unit/ai_news_digest.bats b/tests/unit/ai_news_digest.bats new file mode 100644 index 0000000..1a9e0e3 --- /dev/null +++ b/tests/unit/ai_news_digest.bats @@ -0,0 +1,192 @@ +#!/usr/bin/env bats + +# Load test helpers +load '../helpers/common' +load '../helpers/mock_data' + +# Setup and teardown +setup() { + setup_test_env + TEST_DATE=$(get_test_date) + RESOURCE_DIR=$(setup_test_resources "$TEST_DATE") + COMMAND_FILE=".claude/commands/ai_news_digest.md" +} + +teardown() { + cleanup_test_resources "$TEST_DATE" + teardown_test_env +} + +# Test command file existence +@test "ai_news_digest.md command file exists" { + [ -f "$COMMAND_FILE" ] +} + +# Test command file contains required news sources +@test "ai_news_digest.md contains all major AI news sources" { + file_contains "$COMMAND_FILE" "OpenAI Blog" + file_contains "$COMMAND_FILE" "Google AI Blog" + file_contains "$COMMAND_FILE" "Anthropic News" + file_contains "$COMMAND_FILE" "Meta AI" + file_contains "$COMMAND_FILE" "Microsoft Research" + file_contains "$COMMAND_FILE" "DeepMind" + file_contains "$COMMAND_FILE" "Hugging Face Blog" +} + +@test "ai_news_digest.md contains proper source URLs" { + file_contains "$COMMAND_FILE" "openai.com/blog" + file_contains "$COMMAND_FILE" "ai.googleblog.com" + file_contains "$COMMAND_FILE" "anthropic.com/news" + file_contains "$COMMAND_FILE" "ai.meta.com/blog" + file_contains "$COMMAND_FILE" "microsoft.com/en-us/research/blog" + file_contains "$COMMAND_FILE" "deepmind.google/discover/blog" + file_contains "$COMMAND_FILE" "huggingface.co/blog" +} + +@test "ai_news_digest.md contains execution steps" { + file_contains "$COMMAND_FILE" "Execution Steps" + file_contains "$COMMAND_FILE" "WebFetch" + file_contains "$COMMAND_FILE" "within last 7 days" +} + +@test "ai_news_digest.md contains filtering criteria" { + file_contains "$COMMAND_FILE" "AI-driven development relevance" + file_contains "$COMMAND_FILE" "API updates" + file_contains "$COMMAND_FILE" "developer tools" + file_contains "$COMMAND_FILE" "EXCLUDE" +} + +@test "ai_news_digest.md contains output format" { + file_contains "$COMMAND_FILE" "Output Format" + file_contains "$COMMAND_FILE" "Major Announcements" + file_contains "$COMMAND_FILE" "Other Notable Updates" + file_contains "$COMMAND_FILE" "Source References" +} + +@test "ai_news_digest.md contains fallback message" { + file_contains "$COMMAND_FILE" "今週はAI駆動開発に関連する重要なニュースはありませんでした" +} + +# Test mock data creation +@test "mock AI news data can be generated" { + local mock_content + mock_content=$(get_mock_ai_news_data) + [[ -n "$mock_content" ]] + echo "$mock_content" | grep -q "企業動向" + echo "$mock_content" | grep -q "技術動向" + echo "$mock_content" | grep -q "業界動向" +} + +# Test output file creation +@test "ai_news_summary.md output file can be created" { + local output_file="${RESOURCE_DIR}/ai_news_summary.md" + get_mock_ai_news_data > "$output_file" + + file_exists_and_not_empty "$output_file" + verify_markdown_format "$output_file" + contains_japanese "$output_file" +} + +# Test output file structure +@test "ai_news_summary.md has correct structure" { + local output_file="${RESOURCE_DIR}/ai_news_summary.md" + get_mock_ai_news_data > "$output_file" + + # Check for main sections + file_contains "$output_file" "# AI関連ニュース" + file_contains "$output_file" "## 企業動向" + file_contains "$output_file" "## 技術動向" + file_contains "$output_file" "## 業界動向" +} + +# Test content filtering for AI development +@test "output focuses on AI development content" { + local output_file="${RESOURCE_DIR}/ai_news_summary.md" + get_mock_ai_news_data > "$output_file" + + # Check for AI development keywords + file_contains "$output_file" "OpenAI\|Google\|Anthropic\|GPT\|Gemini\|Claude" +} + +# Test Japanese content requirement +@test "output contains Japanese explanations" { + local output_file="${RESOURCE_DIR}/ai_news_summary.md" + get_mock_ai_news_data > "$output_file" + + contains_japanese "$output_file" +} + +# Test error handling for missing directories +@test "handles missing resource directory gracefully" { + local non_existent_dir="resources/9999-99-99" + + # Should be able to create directory if it doesn't exist + run mkdir -p "$non_existent_dir" + [ "$status" -eq 0 ] + + # Cleanup + rmdir "$non_existent_dir" 2>/dev/null || true +} + +# Test command file format validation +@test "command file is valid markdown" { + verify_markdown_format "$COMMAND_FILE" +} + +# Test timeframe requirements +@test "command emphasizes recent news only" { + file_contains "$COMMAND_FILE" "last 7 days ONLY" + file_contains "$COMMAND_FILE" "recent updates" + file_contains "$COMMAND_FILE" "MUST be within last 7 days" +} + +# Test developer focus requirements +@test "command focuses on developer-relevant content" { + file_contains "$COMMAND_FILE" "developer impact" + file_contains "$COMMAND_FILE" "developer tools" + file_contains "$COMMAND_FILE" "開発者への影響" + file_contains "$COMMAND_FILE" "AI-driven development" +} + +# Test exclusion criteria +@test "command contains proper exclusion criteria" { + file_contains "$COMMAND_FILE" "EXCLUDE" + file_contains "$COMMAND_FILE" "General AI research" + file_contains "$COMMAND_FILE" "medical AI" + file_contains "$COMMAND_FILE" "robotics without dev relevance" +} + +# Test link requirements +@test "command requires proper link inclusion" { + file_contains "$COMMAND_FILE" "Link Requirements" + file_contains "$COMMAND_FILE" "original article URL" + file_contains "$COMMAND_FILE" "source blog/website URL" +} + +# Test source variety +@test "command covers diverse AI company sources" { + # Test major companies are covered + file_contains "$COMMAND_FILE" "OpenAI" + file_contains "$COMMAND_FILE" "Google" + file_contains "$COMMAND_FILE" "Anthropic" + file_contains "$COMMAND_FILE" "Meta" + file_contains "$COMMAND_FILE" "Microsoft" + file_contains "$COMMAND_FILE" "DeepMind" + file_contains "$COMMAND_FILE" "Hugging Face" +} + +# Test output template structure +@test "command provides complete output template" { + file_contains "$COMMAND_FILE" "Company Name" + file_contains "$COMMAND_FILE" "News title" + file_contains "$COMMAND_FILE" "Publication date" + file_contains "$COMMAND_FILE" "Article URL" + file_contains "$COMMAND_FILE" "開発者への影響" +} + +# Test empty news handling +@test "command handles no news scenario" { + file_contains "$COMMAND_FILE" "If no announcements" + file_contains "$COMMAND_FILE" "minimal file" + file_contains "$COMMAND_FILE" "今週はAI駆動開発" +} \ No newline at end of file diff --git a/tests/unit/ai_tec_blog_digest.bats b/tests/unit/ai_tec_blog_digest.bats new file mode 100644 index 0000000..4e6404c --- /dev/null +++ b/tests/unit/ai_tec_blog_digest.bats @@ -0,0 +1,166 @@ +#!/usr/bin/env bats + +# Load test helpers +load '../helpers/common' +load '../helpers/mock_data' + +# Setup and teardown +setup() { + setup_test_env + TEST_DATE=$(get_test_date) + RESOURCE_DIR=$(setup_test_resources "$TEST_DATE") + COMMAND_FILE=".claude/commands/ai_tec_blog_digest.md" +} + +teardown() { + cleanup_test_resources "$TEST_DATE" + teardown_test_env +} + +# Test command file existence +@test "ai_tec_blog_digest.md command file exists" { + [ -f "$COMMAND_FILE" ] +} + +# Test command file contains required sections +@test "ai_tec_blog_digest.md contains required search URLs" { + file_contains "$COMMAND_FILE" "zenn.dev" + file_contains "$COMMAND_FILE" "qiita.com" + file_contains "$COMMAND_FILE" "note.com" +} + +@test "ai_tec_blog_digest.md contains target criteria" { + file_contains "$COMMAND_FILE" "Target Article Criteria" + file_contains "$COMMAND_FILE" "Claude" + file_contains "$COMMAND_FILE" "GPT" + file_contains "$COMMAND_FILE" "AI" +} + +@test "ai_tec_blog_digest.md contains execution steps" { + file_contains "$COMMAND_FILE" "Execution Steps" + file_contains "$COMMAND_FILE" "WebFetch" + file_contains "$COMMAND_FILE" "Playwright" +} + +@test "ai_tec_blog_digest.md contains proper output format" { + file_contains "$COMMAND_FILE" "Output Format" + file_contains "$COMMAND_FILE" "Featured Articles" + file_contains "$COMMAND_FILE" "Trending Topics" +} + +# Test resource directory creation +@test "resource directory can be created for current date" { + directory_exists "$RESOURCE_DIR" +} + +# Test mock data creation +@test "mock AI blog data can be generated" { + local mock_content + mock_content=$(get_mock_ai_blog_data) + [[ -n "$mock_content" ]] + echo "$mock_content" | grep -q "Zenn記事" + echo "$mock_content" | grep -q "Qiita記事" + echo "$mock_content" | grep -q "note記事" +} + +# Test output file creation +@test "tech_blog_articles.md output file can be created" { + local output_file="${RESOURCE_DIR}/tech_blog_articles.md" + get_mock_ai_blog_data > "$output_file" + + file_exists_and_not_empty "$output_file" + verify_markdown_format "$output_file" + contains_japanese "$output_file" +} + +# Test output file format validation +@test "tech_blog_articles.md has correct structure" { + local output_file="${RESOURCE_DIR}/tech_blog_articles.md" + get_mock_ai_blog_data > "$output_file" + + # Check for main sections + file_contains "$output_file" "# AI技術ブログ記事まとめ" + file_contains "$output_file" "## Zenn記事" + file_contains "$output_file" "## Qiita記事" + file_contains "$output_file" "## note記事" +} + +# Test URL validation in output +@test "output contains valid article URLs" { + local output_file="${RESOURCE_DIR}/tech_blog_articles.md" + get_mock_ai_blog_data > "$output_file" + + # Check for valid URLs + file_contains "$output_file" "https://zenn.dev/" + file_contains "$output_file" "https://qiita.com/" + file_contains "$output_file" "https://note.com/" +} + +# Test article metadata presence +@test "output contains article metadata" { + local output_file="${RESOURCE_DIR}/tech_blog_articles.md" + get_mock_ai_blog_data > "$output_file" + + # Check for author information + file_contains "$output_file" "author" + file_contains "$output_file" "developer" + file_contains "$output_file" "writer" +} + +# Test error handling for missing directories +@test "handles missing resource directory gracefully" { + local non_existent_dir="resources/9999-99-99" + + # Should be able to create directory if it doesn't exist + run mkdir -p "$non_existent_dir" + [ "$status" -eq 0 ] + + # Cleanup + rmdir "$non_existent_dir" 2>/dev/null || true +} + +# Test content filtering for AI-related topics +@test "output focuses on AI development content" { + local output_file="${RESOURCE_DIR}/tech_blog_articles.md" + get_mock_ai_blog_data > "$output_file" + + # Check for AI-related keywords + file_contains "$output_file" "LLM\|機械学習\|深層学習\|AI\|ChatGPT" +} + +# Test Japanese content requirement +@test "output contains Japanese text" { + local output_file="${RESOURCE_DIR}/tech_blog_articles.md" + get_mock_ai_blog_data > "$output_file" + + contains_japanese "$output_file" +} + +# Test file permissions +@test "output file has correct permissions" { + local output_file="${RESOURCE_DIR}/tech_blog_articles.md" + get_mock_ai_blog_data > "$output_file" + + # File should be readable + [ -r "$output_file" ] + # File should be writable + [ -w "$output_file" ] +} + +# Test command file format validation +@test "command file is valid markdown" { + verify_markdown_format "$COMMAND_FILE" +} + +# Test for required bot evasion instructions +@test "command contains note.com Playwright instructions" { + file_contains "$COMMAND_FILE" "mcp__playwright__browser_navigate" + file_contains "$COMMAND_FILE" "Do NOT open new tabs" +} + +# Test for platform-specific instructions +@test "command contains platform-specific access notes" { + file_contains "$COMMAND_FILE" "Platform Access Notes" + file_contains "$COMMAND_FILE" "WebFetch returns only HTML/CSS" + file_contains "$COMMAND_FILE" "use WebSearch as fallback" +} \ No newline at end of file diff --git a/tests/unit/ai_trending_repositories_digest.bats b/tests/unit/ai_trending_repositories_digest.bats new file mode 100755 index 0000000..8b1a127 --- /dev/null +++ b/tests/unit/ai_trending_repositories_digest.bats @@ -0,0 +1,240 @@ +#!/usr/bin/env bats + +# Load test helpers +load '../helpers/common' +load '../helpers/mock_data' + +# Setup and teardown +setup() { + setup_test_env + TEST_DATE=$(get_test_date) + RESOURCE_DIR=$(setup_test_resources "$TEST_DATE") + COMMAND_FILE=".claude/commands/ai_trending_repositories_digest.md" +} + +teardown() { + cleanup_test_resources "$TEST_DATE" + teardown_test_env +} + +# Test command file existence +@test "ai_trending_repositories_digest.md command file exists" { + [ -f "$COMMAND_FILE" ] +} + +# Test command file contains required sections +@test "ai_trending_repositories_digest.md contains trending source" { + file_contains "$COMMAND_FILE" "Trending Source" + file_contains "$COMMAND_FILE" "https://github.com/trending?since=weekly" +} + +@test "ai_trending_repositories_digest.md contains execution steps" { + file_contains "$COMMAND_FILE" "Execution Steps" + file_contains "$COMMAND_FILE" "Check previous trending_repositories.md files" + file_contains "$COMMAND_FILE" "Use WebFetch to get the trending repositories page" + file_contains "$COMMAND_FILE" "Parse the repositories and their descriptions" + file_contains "$COMMAND_FILE" "Filter repositories based on the selection criteria" + file_contains "$COMMAND_FILE" "Write detailed feature articles" +} + +@test "ai_trending_repositories_digest.md contains selection criteria" { + file_contains "$COMMAND_FILE" "Selection Criteria" + file_contains "$COMMAND_FILE" "Tools for working with LLMs" + file_contains "$COMMAND_FILE" "Agent frameworks" + file_contains "$COMMAND_FILE" "AI-assisted development tools" + file_contains "$COMMAND_FILE" "Libraries or services that integrate AI" + file_contains "$COMMAND_FILE" "CLI or automation tools using AI" +} + +@test "ai_trending_repositories_digest.md contains duplicate prevention rules" { + file_contains "$COMMAND_FILE" "Duplicate Prevention Rules" + file_contains "$COMMAND_FILE" "MUST check all previous trending_repositories.md files" + file_contains "$COMMAND_FILE" "NEVER feature the same repository" + file_contains "$COMMAND_FILE" "smallcloudai/refact" + file_contains "$COMMAND_FILE" "humanlayer/12-factor-agents" + file_contains "$COMMAND_FILE" "stanford-oval/storm" +} + +@test "ai_trending_repositories_digest.md contains output format" { + file_contains "$COMMAND_FILE" "Output Format" + file_contains "$COMMAND_FILE" "Repository name and GitHub URL" + file_contains "$COMMAND_FILE" "Description of its purpose" + file_contains "$COMMAND_FILE" "Key features" + file_contains "$COMMAND_FILE" "Why it's significant" +} + +@test "ai_trending_repositories_digest.md contains fallback message" { + file_contains "$COMMAND_FILE" "There are no repositories to feature" + file_contains "$COMMAND_FILE" "If no suitable repository is found" + file_contains "$COMMAND_FILE" "Do NOT force selection" +} + +@test "ai_trending_repositories_digest.md contains link requirements" { + file_contains "$COMMAND_FILE" "Link Requirements" + file_contains "$COMMAND_FILE" "direct GitHub repository URL" + file_contains "$COMMAND_FILE" "Include links to documentation" + file_contains "$COMMAND_FILE" "For trending page source" +} + +@test "ai_trending_repositories_digest.md contains writing guidelines" { + file_contains "$COMMAND_FILE" "Writing Guidelines" + file_contains "$COMMAND_FILE" "natural, conversational Japanese" + file_contains "$COMMAND_FILE" "Avoid translation-like phrases" + file_contains "$COMMAND_FILE" "Focus on practical benefits" + file_contains "$COMMAND_FILE" "Use specific examples" +} + +# Test mock data creation +@test "mock trending repositories data can be generated" { + local mock_content + mock_content=$(get_mock_trending_repos_data) + [[ -n "$mock_content" ]] + echo "$mock_content" | grep -q "AIトレンドリポジトリ" + echo "$mock_content" | grep -q "ollama/ollama" + echo "$mock_content" | grep -q "概要" +} + +# Test output file creation +@test "trending_repositories.md output file can be created" { + local output_file="${RESOURCE_DIR}/trending_repositories.md" + get_mock_trending_repos_data > "$output_file" + + file_exists_and_not_empty "$output_file" + verify_markdown_format "$output_file" + contains_japanese "$output_file" +} + +# Test output file structure +@test "trending_repositories.md has correct structure" { + local output_file="${RESOURCE_DIR}/trending_repositories.md" + cat << 'EOF' > "$output_file" +# Trending AI Development Repositories - 2025-07-20 + +## [ollama/ollama](https://github.com/ollama/ollama) + +### 概要 +Ollamaは、ローカル環境で大規模言語モデル(LLM)を簡単に実行できるツールです。開発者がクラウドAPIに依存せず、自分のマシンでLLMを活用できるようになります。 + +### 主な機能 +- ワンコマンドでのモデルインストール +- 複数のLLMモデルをサポート +- RESTful API提供 +- GPUアクセラレーション対応 + +### 注目される理由 +プライバシーを重視する開発者や、オフライン環境でのAI開発のニーズが高まる中、ローカルでLLMを動かせるツールとして注目を集めています。 +EOF + + # Check for main sections + file_contains "$output_file" "# Trending AI Development Repositories" + file_contains "$output_file" "## \\[.*\\](https://github.com/" + file_contains "$output_file" "### 概要" + file_contains "$output_file" "### 主な機能" + file_contains "$output_file" "### 注目される理由" +} + +# Test AI development focus +@test "output focuses on AI development tools" { + local output_file="${RESOURCE_DIR}/trending_repositories.md" + get_mock_trending_repos_data > "$output_file" + + # Check for AI development keywords + file_contains "$output_file" "LLM\|機械学習\|深層学習\|AI\|pytorch\|tensorflow" +} + +# Test Japanese content requirement +@test "output contains natural Japanese explanations" { + local output_file="${RESOURCE_DIR}/trending_repositories.md" + cat << 'EOF' > "$output_file" +# Trending AI Development Repositories - 2025-07-20 + +## [example/repo](https://github.com/example/repo) + +### 概要 +開発者向けのAIツールで、コード生成を効率化します。特に繰り返し作業の自動化に強みがあります。 + +### 主な機能 +- 自動コード生成 +- テンプレート管理 +- CI/CD統合 + +### 注目される理由 +最近のAI開発ブームの中で、実用的なツールとして評価されています。特に小規模チームでの採用が増えています。 +EOF + + contains_japanese "$output_file" + # Check for natural Japanese (not translation-like) + file_contains "$output_file" "開発者向け" + file_contains "$output_file" "効率化します" + file_contains "$output_file" "評価されています" +} + +# Test error handling for missing directories +@test "handles missing resource directory gracefully" { + local non_existent_dir="resources/9999-99-99" + + # Should be able to create directory if it doesn't exist + run mkdir -p "$non_existent_dir" + [ "$status" -eq 0 ] + + # Cleanup + rmdir "$non_existent_dir" 2>/dev/null || true +} + +# Test command file format validation +@test "command file is valid markdown" { + verify_markdown_format "$COMMAND_FILE" +} + +# Test date calculation requirement +@test "command requires date calculation" { + file_contains "$COMMAND_FILE" "Date Calculation" + file_contains "$COMMAND_FILE" "date +%Y-%m-%d" + file_contains "$COMMAND_FILE" "today's date" +} + +# Test file output requirements +@test "command specifies correct output location" { + file_contains "$COMMAND_FILE" "File Output" + file_contains "$COMMAND_FILE" "resources/\\[TODAY_DATE\\]/trending_repositories.md" + file_contains "$COMMAND_FILE" "Create the date directory if it doesn't exist" +} + +# Test repository exclusion list +@test "command maintains exclusion list" { + file_contains "$COMMAND_FILE" "Previously featured repositories to exclude" + file_contains "$COMMAND_FILE" "smallcloudai/refact" + file_contains "$COMMAND_FILE" "humanlayer/12-factor-agents" + file_contains "$COMMAND_FILE" "stanford-oval/storm" +} + +# Test example output structure +@test "command provides complete example structure" { + file_contains "$COMMAND_FILE" "Example Output Structure" + file_contains "$COMMAND_FILE" "Repository Name" + file_contains "$COMMAND_FILE" "概要" + file_contains "$COMMAND_FILE" "主な機能" + file_contains "$COMMAND_FILE" "注目される理由" +} + +# Test empty result handling +@test "command handles no suitable repositories scenario" { + file_contains "$COMMAND_FILE" "If no suitable repository is found" + file_contains "$COMMAND_FILE" "There are no repositories to feature" + file_contains "$COMMAND_FILE" "do not invent one" +} + +# Test AI relevance filtering +@test "command enforces strict AI development relevance" { + file_contains "$COMMAND_FILE" "clearly relevant to AI-driven development" + file_contains "$COMMAND_FILE" "OpenAI, Claude, Gemini" + file_contains "$COMMAND_FILE" "Agent frameworks" + file_contains "$COMMAND_FILE" "code generation, prompt tools" +} + +# Test duplicate check requirement +@test "command requires checking previous digests" { + file_contains "$COMMAND_FILE" "check all previous trending_repositories.md files" + file_contains "$COMMAND_FILE" "ensure they haven't been featured" + file_contains "$COMMAND_FILE" "NEVER feature the same repository" +} \ No newline at end of file diff --git a/tests/unit/error_handling.bats b/tests/unit/error_handling.bats new file mode 100644 index 0000000..00f0947 --- /dev/null +++ b/tests/unit/error_handling.bats @@ -0,0 +1,245 @@ +#!/usr/bin/env bats + +# Load test helpers +load '../helpers/common' +load '../helpers/mock_data' + +# Setup and teardown +setup() { + setup_test_env + TEST_DATE=$(get_test_date) + RESOURCE_DIR=$(setup_test_resources "$TEST_DATE") +} + +teardown() { + cleanup_test_resources "$TEST_DATE" + teardown_test_env +} + +# Test error handling for missing command files +@test "handles missing command file gracefully" { + local non_existent_command=".claude/commands/non_existent_command.md" + + # Should fail gracefully + [ ! -f "$non_existent_command" ] +} + +# Test error handling for missing resource directories +@test "handles missing resource directory creation" { + local future_date="2099-12-31" + local future_resource_dir="resources/${future_date}" + + # Should be able to create directory + run mkdir -p "$future_resource_dir" + [ "$status" -eq 0 ] + + # Cleanup + rmdir "$future_resource_dir" 2>/dev/null || true + rmdir "resources" 2>/dev/null || true +} + +# Test error handling for invalid dates +@test "handles invalid date formats gracefully" { + local invalid_dates=("2024-13-01" "2024-02-30" "invalid-date" "") + + for invalid_date in "${invalid_dates[@]}"; do + # Clean up any directories that might have been created + rm -rf "resources/${invalid_date}" 2>/dev/null || true + # Should not create directories with invalid dates + [ ! -d "resources/${invalid_date}" ] + done +} + +# Test error handling for write-protected directories +@test "handles permission errors gracefully" { + skip "Requires specific permission setup" + # This test would require setting up permission scenarios +} + +# Test error handling for disk space issues +@test "handles disk space limitations gracefully" { + skip "Requires specific disk space setup" + # This test would require simulating disk space limitations +} + +# Test error handling for corrupted resource files +@test "handles corrupted resource files gracefully" { + local corrupted_file="${RESOURCE_DIR}/corrupted.md" + + # Create a file with invalid content + echo -e "\xff\xfe\x00\x00" > "$corrupted_file" + + # Should handle binary content gracefully + run file_contains "$corrupted_file" "test" + [ "$status" -ne 0 ] + + # Cleanup + rm -f "$corrupted_file" +} + +# Test error handling for empty resource files +@test "handles empty resource files gracefully" { + local empty_file="${RESOURCE_DIR}/empty.md" + + # Create empty file + touch "$empty_file" + + # Should detect empty file + [ -f "$empty_file" ] + [ ! -s "$empty_file" ] + + # file_exists_and_not_empty should return false + run file_exists_and_not_empty "$empty_file" + [ "$status" -ne 0 ] +} + +# Test error handling for malformed markdown +@test "handles malformed markdown gracefully" { + local malformed_file="${RESOURCE_DIR}/malformed.md" + + # Create malformed markdown + echo "This is not proper markdown" > "$malformed_file" + echo "No headers or structure" >> "$malformed_file" + + # Should still be readable but fail markdown validation + file_exists_and_not_empty "$malformed_file" + run verify_markdown_format "$malformed_file" + [ "$status" -ne 0 ] +} + +# Test error handling for network timeouts +@test "handles network timeout scenarios" { + skip "Requires network simulation" + # This would test WebFetch and Playwright timeout handling +} + +# Test error handling for API rate limits +@test "handles API rate limit scenarios" { + skip "Requires API simulation" + # This would test GitHub API rate limit handling +} + +# Test error handling for missing Japanese content +@test "detects missing Japanese content" { + local english_only_file="${RESOURCE_DIR}/english_only.md" + + # Create file with only English content + echo "# English Only Content" > "$english_only_file" + echo "This file contains no Japanese characters." >> "$english_only_file" + + # Should detect lack of Japanese content + run contains_japanese "$english_only_file" + [ "$status" -ne 0 ] +} + +# Test error handling for invalid URLs +@test "handles invalid URLs gracefully" { + local invalid_urls=("not-a-url" "http://" "https://" "ftp://invalid" "") + + for url in "${invalid_urls[@]}"; do + # Should handle invalid URLs without crashing + # This is a placeholder for URL validation logic + [[ ! "$url" =~ ^https?://[^/]+/.+ ]] + done +} + +# Test error handling for file system limitations +@test "handles long filenames gracefully" { + local long_name="${RESOURCE_DIR}/$(printf 'a%.0s' {1..300}).md" + + # Try to create file with very long name + run touch "$long_name" + + # Should either succeed or fail gracefully + # Different filesystems have different limits + [ "$status" -eq 0 ] || [ "$status" -ne 0 ] + + # Cleanup if created + rm -f "$long_name" 2>/dev/null || true +} + +# Test error handling for concurrent access +@test "handles concurrent file access gracefully" { + local test_file="${RESOURCE_DIR}/concurrent_test.md" + + # Create test file + echo "Test content" > "$test_file" + + # Simulate concurrent access (simplified test) + run cat "$test_file" + [ "$status" -eq 0 ] + + run echo "More content" >> "$test_file" + [ "$status" -eq 0 ] +} + +# Test error handling for special characters in filenames +@test "handles special characters in filenames" { + local special_chars=("space file.md" "file-with-dashes.md" "file_with_underscores.md") + + for filename in "${special_chars[@]}"; do + local test_file="${RESOURCE_DIR}/${filename}" + + # Should handle files with special characters + run touch "$test_file" + [ "$status" -eq 0 ] + + # Cleanup + rm -f "$test_file" + done +} + +# Test error handling for symlinks +@test "handles symlinks appropriately" { + local original_file="${RESOURCE_DIR}/original.md" + local link_file="${RESOURCE_DIR}/link.md" + + # Create original file + echo "Original content" > "$original_file" + + # Create symlink + run ln -s "$original_file" "$link_file" + [ "$status" -eq 0 ] + + # Should handle symlinks properly + [ -L "$link_file" ] + + # Cleanup + rm -f "$link_file" "$original_file" +} + +# Test error handling for circular dependencies +@test "detects circular dependency scenarios" { + # This is a placeholder for dependency cycle detection + # In the context of Claude commands, this would test for: + # - Commands that depend on their own output + # - Circular resource file dependencies + + # For now, just verify our test structure doesn't have cycles + [ -d "tests/unit" ] + [ -d "tests/integration" ] + [ -d "tests/helpers" ] +} + +# Test error handling for insufficient system resources +@test "handles memory limitations gracefully" { + skip "Requires memory stress testing setup" + # This would test behavior under memory pressure +} + +# Test error handling for interrupted operations +@test "handles interrupted file operations" { + local test_file="${RESOURCE_DIR}/interrupted.md" + + # Start writing to file + echo "Starting content..." > "$test_file" + + # Simulate interruption (file exists but may be incomplete) + [ -f "$test_file" ] + + # Should be able to detect and handle partial files + file_exists_and_not_empty "$test_file" + + # Cleanup + rm -f "$test_file" +} \ No newline at end of file diff --git a/tests/unit/hacker_news_reddit_digest.bats b/tests/unit/hacker_news_reddit_digest.bats new file mode 100644 index 0000000..cd22b03 --- /dev/null +++ b/tests/unit/hacker_news_reddit_digest.bats @@ -0,0 +1,194 @@ +#!/usr/bin/env bats + +# Load test helpers +load '../helpers/common' +load '../helpers/mock_data' + +# Setup and teardown +setup() { + setup_test_env + TEST_DATE=$(get_test_date) + RESOURCE_DIR=$(setup_test_resources "$TEST_DATE") + COMMAND_FILE=".claude/commands/hacker_news_reddit_digest.md" +} + +teardown() { + cleanup_test_resources "$TEST_DATE" + teardown_test_env +} + +# Test command file existence +@test "hacker_news_reddit_digest.md command file exists" { + [ -f "$COMMAND_FILE" ] +} + +# Test command file contains required sources +@test "hacker_news_reddit_digest.md contains required sources" { + file_contains "$COMMAND_FILE" "Hacker News" + file_contains "$COMMAND_FILE" "r/LocalLLaMA" + file_contains "$COMMAND_FILE" "r/MachineLearning" + file_contains "$COMMAND_FILE" "r/artificial" +} + +@test "hacker_news_reddit_digest.md contains proper URLs" { + file_contains "$COMMAND_FILE" "hn.algolia.com" + file_contains "$COMMAND_FILE" "reddit.com/r/LocalLLaMA" + file_contains "$COMMAND_FILE" "reddit.com/r/MachineLearning" + file_contains "$COMMAND_FILE" "reddit.com/r/artificial" +} + +@test "hacker_news_reddit_digest.md contains Playwright instructions" { + file_contains "$COMMAND_FILE" "mcp__playwright" + file_contains "$COMMAND_FILE" "do NOT open new tabs" + file_contains "$COMMAND_FILE" "Reddit blocks WebFetch" +} + +@test "hacker_news_reddit_digest.md contains focus areas" { + file_contains "$COMMAND_FILE" "AI development tools" + file_contains "$COMMAND_FILE" "LLM-related discussions" + file_contains "$COMMAND_FILE" "Open source LLM" + file_contains "$COMMAND_FILE" "Model fine-tuning" +} + +@test "hacker_news_reddit_digest.md contains execution steps" { + file_contains "$COMMAND_FILE" "Execution Steps" + file_contains "$COMMAND_FILE" "WebFetch" + file_contains "$COMMAND_FILE" "Playwright" + file_contains "$COMMAND_FILE" "same tab" +} + +@test "hacker_news_reddit_digest.md contains output format" { + file_contains "$COMMAND_FILE" "Output Format" + file_contains "$COMMAND_FILE" "注目のトピック" + file_contains "$COMMAND_FILE" "今週の技術トレンド" +} + +# Test mock data creation +@test "mock Hacker News and Reddit data can be generated" { + local mock_content + mock_content=$(get_mock_hn_reddit_data) + [[ -n "$mock_content" ]] + echo "$mock_content" | grep -q "Hacker News" + echo "$mock_content" | grep -q "Reddit" + echo "$mock_content" | grep -q "MachineLearning" + echo "$mock_content" | grep -q "LocalLLaMA" +} + +# Test output file creation +@test "community_discussions.md output file can be created" { + local output_file="${RESOURCE_DIR}/community_discussions.md" + get_mock_hn_reddit_data > "$output_file" + + file_exists_and_not_empty "$output_file" + verify_markdown_format "$output_file" + contains_japanese "$output_file" +} + +# Test output file structure +@test "community_discussions.md has correct structure" { + local output_file="${RESOURCE_DIR}/community_discussions.md" + get_mock_hn_reddit_data > "$output_file" + + # Check for main sections + file_contains "$output_file" "# コミュニティディスカッション" + file_contains "$output_file" "## Hacker News" + file_contains "$output_file" "## Reddit" +} + +# Test URL validation in output +@test "output contains valid discussion URLs" { + local output_file="${RESOURCE_DIR}/community_discussions.md" + get_mock_hn_reddit_data > "$output_file" + + # Check for valid URLs + file_contains "$output_file" "news.ycombinator.com" + file_contains "$output_file" "reddit.com" +} + +# Test content filtering for AI-related topics +@test "output focuses on AI development discussions" { + local output_file="${RESOURCE_DIR}/community_discussions.md" + get_mock_hn_reddit_data > "$output_file" + + # Check for AI-related keywords + file_contains "$output_file" "AI\|LLM\|機械学習\|フレームワーク" +} + +# Test engagement metrics presence +@test "output contains engagement information" { + local output_file="${RESOURCE_DIR}/community_discussions.md" + get_mock_hn_reddit_data > "$output_file" + + # Check for engagement metrics + file_contains "$output_file" "points\|upvotes" +} + +# Test subreddit categorization +@test "output properly categorizes subreddit content" { + local output_file="${RESOURCE_DIR}/community_discussions.md" + get_mock_hn_reddit_data > "$output_file" + + # Check for subreddit mentions + file_contains "$output_file" "MachineLearning" + file_contains "$output_file" "LocalLLaMA" +} + +# Test Japanese content requirement +@test "output contains Japanese explanations" { + local output_file="${RESOURCE_DIR}/community_discussions.md" + get_mock_hn_reddit_data > "$output_file" + + contains_japanese "$output_file" +} + +# Test error handling for missing directories +@test "handles missing resource directory gracefully" { + local non_existent_dir="resources/9999-99-99" + + # Should be able to create directory if it doesn't exist + run mkdir -p "$non_existent_dir" + [ "$status" -eq 0 ] + + # Cleanup + rmdir "$non_existent_dir" 2>/dev/null || true +} + +# Test command file format validation +@test "command file is valid markdown" { + verify_markdown_format "$COMMAND_FILE" +} + +# Test for Reddit bot detection handling +@test "command contains Reddit bot detection workarounds" { + file_contains "$COMMAND_FILE" "Reddit blocks WebFetch" + file_contains "$COMMAND_FILE" "always use Playwright" + file_contains "$COMMAND_FILE" "appropriate delays" +} + +# Test for technical focus requirements +@test "command emphasizes technical content over popularity" { + file_contains "$COMMAND_FILE" "technical insights" + file_contains "$COMMAND_FILE" "practical value" + file_contains "$COMMAND_FILE" "not popularity metrics" +} + +# Test for Japanese developer focus +@test "command targets Japanese developer insights" { + file_contains "$COMMAND_FILE" "Japanese developers" + file_contains "$COMMAND_FILE" "日本の開発者" + file_contains "$COMMAND_FILE" "Japanese explanations" +} + +# Test platform navigation instructions +@test "command contains proper navigation instructions" { + file_contains "$COMMAND_FILE" "Navigate between" + file_contains "$COMMAND_FILE" "using the same tab" + file_contains "$COMMAND_FILE" "mcp__playwright__browser_navigate" +} + +# Test weekly timeframe requirement +@test "command focuses on weekly content" { + file_contains "$COMMAND_FILE" "past week" + file_contains "$COMMAND_FILE" "今週" + file_contains "$COMMAND_FILE" "t=week" +} \ No newline at end of file diff --git a/tests/unit/vibecoding_release_digest.bats b/tests/unit/vibecoding_release_digest.bats new file mode 100755 index 0000000..50da22a --- /dev/null +++ b/tests/unit/vibecoding_release_digest.bats @@ -0,0 +1,289 @@ +#!/usr/bin/env bats + +# Load test helpers +load '../helpers/common' +load '../helpers/mock_data' + +# Setup and teardown +setup() { + setup_test_env + TEST_DATE=$(get_test_date) + RESOURCE_DIR=$(setup_test_resources "$TEST_DATE") + COMMAND_FILE=".claude/commands/vibecoding_release_digest.md" +} + +teardown() { + cleanup_test_resources "$TEST_DATE" + teardown_test_env +} + +# Test command file existence +@test "vibecoding_release_digest.md command file exists" { + [ -f "$COMMAND_FILE" ] +} + +# Test command file contains required repositories +@test "vibecoding_release_digest.md contains all required repositories" { + file_contains "$COMMAND_FILE" "google-gemini/gemini-cli" + file_contains "$COMMAND_FILE" "anthropics/claude-code" + file_contains "$COMMAND_FILE" "cursor/cursor" + file_contains "$COMMAND_FILE" "windsurf" + file_contains "$COMMAND_FILE" "microsoft/vscode" + file_contains "$COMMAND_FILE" "cline/cline" + file_contains "$COMMAND_FILE" "kiro" +} + +@test "vibecoding_release_digest.md contains source types" { + file_contains "$COMMAND_FILE" "**Source Type:** GitHub Releases" + file_contains "$COMMAND_FILE" "**Source Type:** CHANGELOG.md" + file_contains "$COMMAND_FILE" "**Source Type:** Web Changelog" +} + +@test "vibecoding_release_digest.md contains GitHub CLI commands" { + file_contains "$COMMAND_FILE" "gh release list" + file_contains "$COMMAND_FILE" "gh release view" + file_contains "$COMMAND_FILE" "gh api repos" + file_contains "$COMMAND_FILE" "--limit 1" +} + +@test "vibecoding_release_digest.md contains web changelog URLs" { + file_contains "$COMMAND_FILE" "https://cursor.sh/changelog" + file_contains "$COMMAND_FILE" "https://www.codeium.com/changelog" + file_contains "$COMMAND_FILE" "https://kiro.dev/changelog/" +} + +@test "vibecoding_release_digest.md contains date calculation" { + file_contains "$COMMAND_FILE" "Date Calculation" + file_contains "$COMMAND_FILE" "date +%Y-%m-%d" + file_contains "$COMMAND_FILE" "within the last 7days" +} + +@test "vibecoding_release_digest.md contains execution steps" { + file_contains "$COMMAND_FILE" "Execution Steps" + file_contains "$COMMAND_FILE" "follow its specific \"How to check\" rules" + file_contains "$COMMAND_FILE" "Calculate if the release/update date is within the last 7 days" + file_contains "$COMMAND_FILE" "create a detailed summary" + file_contains "$COMMAND_FILE" "**EXCLUDE** that repository from the output entirely" +} + +@test "vibecoding_release_digest.md contains link requirements" { + file_contains "$COMMAND_FILE" "Include Links" + file_contains "$COMMAND_FILE" "Repository URL" + file_contains "$COMMAND_FILE" "Release URL" + file_contains "$COMMAND_FILE" "Changelog URL" + file_contains "$COMMAND_FILE" "Website URL" +} + +@test "vibecoding_release_digest.md contains VS Code AI feature filter" { + file_contains "$COMMAND_FILE" "Only summarize changes related to AI features" + file_contains "$COMMAND_FILE" "GitHub Copilot integration" + file_contains "$COMMAND_FILE" "Ignore other changes" +} + +# Test mock data creation +@test "mock release data can be generated" { + local mock_content + mock_content=$(get_mock_release_data) + [[ -n "$mock_content" ]] + echo "$mock_content" | grep -q "リリース情報" + echo "$mock_content" | grep -q "主要なリリース" + echo "$mock_content" | grep -q "ツール・ライブラリ" +} + +# Test output file creation +@test "release_information.md output file can be created" { + local output_file="${RESOURCE_DIR}/release_information.md" + get_mock_release_data > "$output_file" + + file_exists_and_not_empty "$output_file" + verify_markdown_format "$output_file" + contains_japanese "$output_file" +} + +# Test output file structure +@test "release_information.md has correct structure" { + local output_file="${RESOURCE_DIR}/release_information.md" + cat << 'EOF' > "$output_file" +# Release Information - 2025-07-20 + +## google-gemini/gemini-cli v0.2.0 +- **Release Date**: 2025-07-19 +- **Repository**: https://github.com/google-gemini/gemini-cli +- **Release**: https://github.com/google-gemini/gemini-cli/releases/tag/v0.2.0 + +### Key Changes: +- Added support for Gemini 1.5 Pro +- Improved streaming response handling +- Fixed memory leak in long conversations +- Added --model flag for model selection + +## anthropics/claude-code v1.5.0 +- **Release Date**: 2025-07-18 +- **Repository**: https://github.com/anthropics/claude-code +- **Changelog**: https://github.com/anthropics/claude-code/blob/main/CHANGELOG.md + +### Key Changes: +- Introduced Claude 3 Opus support +- Enhanced code completion accuracy +- Added workspace-aware context management +- Performance improvements for large codebases +EOF + + # Check for main sections + file_contains "$output_file" "# Release Information" + file_contains "$output_file" "## google-gemini/gemini-cli" + file_contains "$output_file" "## anthropics/claude-code" + file_contains "$output_file" "### Key Changes:" +} + +# Test release details format +@test "releases have required metadata" { + local output_file="${RESOURCE_DIR}/release_information.md" + cat << 'EOF' > "$output_file" +## cline/cline v2.1.0 +- **Release Date**: 2025-07-20 +- **Repository**: https://github.com/cline/cline +- **Release**: https://github.com/cline/cline/releases/tag/v2.1.0 + +### Key Changes: +- New feature added +EOF + + file_contains "$output_file" "\\*\\*Release Date\\*\\*" + file_contains "$output_file" "\\*\\*Repository\\*\\*" + file_contains "$output_file" "\\*\\*Release\\*\\*\|\\*\\*Changelog\\*\\*" +} + +# Test URL formatting +@test "releases include proper URLs" { + local output_file="${RESOURCE_DIR}/release_information.md" + cat << 'EOF' > "$output_file" +- **Repository**: https://github.com/microsoft/vscode +- **Release**: https://github.com/microsoft/vscode/releases/tag/1.85.0 +EOF + + file_contains "$output_file" "https://github.com/" + file_contains "$output_file" "/releases/tag/" +} + +# Test Japanese content requirement +@test "output can contain Japanese summaries" { + local output_file="${RESOURCE_DIR}/release_information.md" + cat << 'EOF' > "$output_file" +# リリース情報 - 2025-07-20 + +## cursor/cursor v0.30.0 +- **リリース日**: 2025-07-19 +- **ウェブサイト**: https://cursor.sh +- **変更履歴**: https://cursor.sh/changelog + +### 主な変更点: +- AIコード補完の精度が向上 +- 新しいショートカットキーを追加 +- パフォーマンスの最適化 +EOF + + contains_japanese "$output_file" +} + +# Test error handling for missing directories +@test "handles missing resource directory gracefully" { + local non_existent_dir="resources/9999-99-99" + + # Should be able to create directory if it doesn't exist + run mkdir -p "$non_existent_dir" + [ "$status" -eq 0 ] + + # Cleanup + rmdir "$non_existent_dir" 2>/dev/null || true +} + +# Test command file format validation +@test "command file is valid markdown" { + verify_markdown_format "$COMMAND_FILE" +} + +# Test 7-day window requirement +@test "command enforces 7-day release window" { + file_contains "$COMMAND_FILE" "within the last 7days" + file_contains "$COMMAND_FILE" "Calculate if the release/update date is within the last 7 days" + file_contains "$COMMAND_FILE" "if today is 2025-07-05, then dates from 2025-06-28 onwards" +} + +# Test file output requirements +@test "command specifies correct output location" { + file_contains "$COMMAND_FILE" "Save the final report to" + file_contains "$COMMAND_FILE" "resources/\\[TODAY_DATE\\]/release_information.md" + file_contains "$COMMAND_FILE" "Create the date directory if it doesn't exist" +} + +# Test exclusion rule +@test "command excludes old releases" { + file_contains "$COMMAND_FILE" "CRITICAL" + file_contains "$COMMAND_FILE" "If no new releases are found for a repository (older than 7 days)" + file_contains "$COMMAND_FILE" "**EXCLUDE** that repository from the output entirely" + file_contains "$COMMAND_FILE" "do NOT include \"No new releases\" entries" +} + +# Test repository-specific rules +@test "each repository has specific check instructions" { + # gemini-cli + file_contains "$COMMAND_FILE" "google-gemini/gemini-cli" + + # claude-code + file_contains "$COMMAND_FILE" "anthropics/claude-code.*CHANGELOG.md" + + # cursor + file_contains "$COMMAND_FILE" "cursor/cursor" + + # VS Code + file_contains "$COMMAND_FILE" "microsoft/vscode.*Only summarize changes related to AI" +} + +# Test GitHub API usage +@test "command uses proper GitHub API calls" { + file_contains "$COMMAND_FILE" "gh api repos/.*/commits" + file_contains "$COMMAND_FILE" "gh api repos/.*/contents/CHANGELOG.md" + file_contains "$COMMAND_FILE" "--header" +} + +# Test manual check notes +@test "command notes manual requirements for web changelogs" { + file_contains "$COMMAND_FILE" "Automated extraction from this source is not directly supported" + file_contains "$COMMAND_FILE" "requires manual review" + file_contains "$COMMAND_FILE" "advanced web scraping" +} + +# Test release tag extraction +@test "command extracts release tags properly" { + file_contains "$COMMAND_FILE" "Extract the release tag" + file_contains "$COMMAND_FILE" "e.g., \`v0.1.9\`" + file_contains "$COMMAND_FILE" "e.g., \`v2.0.0\`" +} + +# Test summary requirements +@test "command requires key changes summary" { + file_contains "$COMMAND_FILE" "Summarize the key changes" + file_contains "$COMMAND_FILE" "new features" + file_contains "$COMMAND_FILE" "from the release notes" +} + +# Test complete repository coverage +@test "command covers all specified tools" { + # AI development tools + file_contains "$COMMAND_FILE" "gemini-cli" + file_contains "$COMMAND_FILE" "claude-code" + file_contains "$COMMAND_FILE" "cursor" + file_contains "$COMMAND_FILE" "windsurf" + file_contains "$COMMAND_FILE" "cline" + file_contains "$COMMAND_FILE" "kiro" + + # VS Code with AI features + file_contains "$COMMAND_FILE" "vscode" +} + +# Test date format consistency +@test "command uses consistent date format" { + file_contains "$COMMAND_FILE" "%Y-%m-%d" + file_contains "$COMMAND_FILE" "date +%Y-%m-%d" +} \ No newline at end of file