feat: コロン(:)と箇条書きの機械的組み合わせパターンの検出機能を追加 #9
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
概要
Issue #8 で提案された、AIが生成しがちな機械的な「コロン(:)+ 箇条書き」パターンを検出し、より自然な日本語表現への改善を提案する機能を実装しました。
🎯 解決する問題
AIが生成する技術文書では、以下のような機械的なパターンが頻繁に見られます:
Before(機械的):
After(自然):
🚀 実装内容
1. 新しい検出パターンの追加
ai-tech-writing-guideline
ルールに構造化ガイダンス機能を拡張:
または:
で終わり、直後にリストが続く場合を検出2. 建設的なメッセージング
プロジェクトの方針に従い、中立的で提案的なメッセージを提供:
3. コードの品質向上(リファクタリング)
detectColonListPattern()
: コロン + 箇条書きパターンの検出processDocumentStructureGuidance()
: 文書レベルの構造化ガイダンス処理processParagraphGuidance()
: 段落内のガイダンスパターン検出processDocumentAnalysis()
: 文書全体の品質分析結果報告4. 将来の拡張性向上
関数化により、今後の新機能追加が容易になりました:
🧪 テスト
追加されたテストケース
:
で終わる段落 + 箇条書き(検出される):
で終わる段落 + 箇条書き(検出される)テスト結果
すべてのテストが正常に通過しており、既存機能に影響はありません。
📝 技術的詳細
ai-tech-writing-guideline
disableStructureGuidance: true
オプション🎉 期待される効果
🔗 関連