### Example Trigger: Information Prefix Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md These examples demonstrate the use of bolded information labels that trigger the 'Information Prefix Errors'. ```text **注意**: このセクションをお読みください **重要**: 重要な情報 **ポイント**: 重要な点です - **メモ**: これは大切です ``` -------------------------------- ### Clarity (Concreteness) Guidance Example Errors Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md Shows examples of abstract performance, change, and evaluation expressions that lack specificity. The guidance suggests providing concrete numerical data or detailed explanations. ```text 【具体性】抽象的な性能表現が検出されました。具体的な数値基準の提示を検討してください。 (例:「50ms未満の応答時間」) ``` ```text 【具体性】定量化されていない変化表現が検出されました。具体的な数値や割合の提示を検討してください。 ``` ```text 【具体性】抽象的な評価表現が検出されました。何に対してどのように効率的なのか、 具体的な説明を検討してください。 ``` -------------------------------- ### Consistency Guidance Example Errors Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md Provides examples of inconsistencies in terminology, function naming, and writing style (e.g., mixing 'desu/masu' and 'da/dearu' styles). The goal is to ensure uniformity throughout the document. ```text 【一貫性】同一対象を指す用語の混在が検出されました。文書全体で統一した用語の使用を検討してください。 ``` ```text 【一貫性】機能名称の表記揺れが検出されました。プロジェクト内で統一した名称の使用を検討してください。 ``` ```text 【一貫性】文体の混在が検出されました。「です・ます調」または「だ・である調」への統一を検討してください。 ``` -------------------------------- ### Active Voice Recommendation Example Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/README.md Demonstrates the recommendation to use active voice over passive voice for clarity. This involves changing passive constructions to active ones. ```text 〜することができます → 〜します ``` -------------------------------- ### Example Options for Allows Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md Configure allowed patterns to prevent false positives. Supports exact strings and regex-like patterns. ```typescript { allows: [ "使用方法:", // Exact match "/^例:/", // Regex: starts with "例:" "/コマンド.*:/i" // Case-insensitive ] } ``` -------------------------------- ### Allowlist for no-ai-colon-continuation Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/configuration.md Example of pattern allowlisting for the 'no-ai-colon-continuation' rule. It allows specific exact strings and patterns starting with '例:' or ending with ':'. ```json { "no-ai-colon-continuation": { "allows": [ "使用方法:", "実装方法:", "/^例:/", "/\[.*\]:$/" ] } } ``` -------------------------------- ### Conciseness Improvement Example Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/README.md Illustrates how to improve conciseness by removing redundant phrases. This example shows replacing 'まず最初に' with 'まず'. ```text まず最初に → まず ``` -------------------------------- ### Start textlint as an MCP Server Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/README.md Launch textlint as an MCP server for integration with AI tools like Claude Code or VSCode Copilot. Requires textlint v14.8.0 or later. ```bash npx textlint --mcp ``` -------------------------------- ### Allowlist for no-ai-list-formatting Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/configuration.md Example of pattern allowlisting for the 'no-ai-list-formatting' rule. It allows an exact string, patterns starting with '例:', and bold text patterns. ```json { "no-ai-list-formatting": { "allows": [ "許可する見出し", "/^例:/", "/\*\*特別な.*\*\*/" ] } } ``` -------------------------------- ### More Natural List Formatting Examples Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/README.md Provides examples of more natural list item expressions as alternatives to AI-generated patterns. This involves removing unnecessary bolding and emojis. ```markdown - 重要な項目: これは重要な項目です - 注意事項: 注意が必要な項目です - 区切り記号を使わずに項目を説明する - 完了した項目 - 失敗した項目 - アイデア項目 - 注目の話題 - 開始準備完了 - 重要項目 - 目標設定 - メモ項目 ``` -------------------------------- ### Pattern Allowlisting Example Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md Illustrates how to allow specific patterns within a rule using the 'allows' option, which accepts a list of strings or regular expressions. ```json { "rule-name": { "allows": ["pattern1", "/pattern2/"] } } ``` -------------------------------- ### Rule Configuration Example Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md This JSON configuration enables the no-ai-colon-continuation rule and sets specific allowances for patterns that should not be flagged. ```json { "rules": { "@textlint-ja/preset-ai-writing": { "no-ai-colon-continuation": { "allows": ["使用方法:", "/^例:/", "/コマンド.*:/"], "disableCodeBlock": false, "disableList": false, "disableQuote": false, "disableTable": false } } } } ``` -------------------------------- ### Voice (Clarity) Guidance Example Errors Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md Highlights examples of passive and abstract expressions that should be rephrased using active verbs for clearer communication. It also flags nominalizations. ```text 【明確性】受動的で抽象的な表現が検出されました。具体的な動詞を使った能動態への変更を検討してください。 ``` ```text 【明確性】名詞化された表現が検出されました。「を変更する」のような直接的な動詞表現を検討してください。 ``` ```text 【明確性】二重の名詞化表現が検出されました。「を実装する」への簡潔化を検討してください。 ``` -------------------------------- ### Example Trigger: Bold + Separator Pattern Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md These examples show list items that trigger the 'Bold + Separator Pattern Errors' due to the combination of bold text and a separator. ```text - **重要**: 説明 - **注意**:説明 - **項目** - 説明 - **項目** — 説明 ``` -------------------------------- ### Suggested Alternative for List Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md An example of how to rephrase the sentence to avoid the flagged pattern, making the Japanese more natural. ```markdown 説明の内容は以下の通りです。 - 項目1 - 項目2 ``` -------------------------------- ### Suggested Alternative for Table Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md An example of how to rephrase the sentence to avoid the flagged pattern, making the Japanese more natural. ```markdown 以下の通りです。 | Header | |--------| | Data | ``` -------------------------------- ### More Natural Emphasis Examples Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/README.md Provides examples of natural emphasis without relying on AI-specific patterns like excessive bolding. This aims for clearer and less mechanical emphasis. ```markdown これは重要な項目です。 注意してください。 # 重要なお知らせ ## 太字の見出し ``` -------------------------------- ### Example Trigger: Abstract Category Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md These examples contain abstract or metaphorical phrases that trigger the 'Abstract Category Errors'. ```text 魔法のように動作します 奇跡的な結果 驚異的なパフォーマンス 可能性を解き放つ 潜在能力を引き出す 民主化するプラットフォーム スーパーチャージします ``` -------------------------------- ### Global Rule Suppression Example Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md Demonstrates how to disable an entire rule by setting its name to 'false' in the configuration. ```json { "rule-name": false } ``` -------------------------------- ### Redundancy Guidance Example Errors Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md Illustrates common redundant expressions that should be simplified for conciseness. The suggested replacements aim to make the text more direct. ```text 【簡潔性】冗長表現が検出されました。「まず最初に」→「まず」または「最初に」への簡潔化を検討してください。 ``` ```text 【簡潔性】冗長な助動詞表現が検出されました。「できます」または「します」への簡潔化を検討してください。 ``` ```text 【簡潔性】不要な前置き表現が検出されました。核心から始める簡潔な文章構成を検討してください。 ``` -------------------------------- ### Example Trigger: Emoji + Bold Combination Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md These examples show combinations of emojis followed by bold text that trigger the 'Emoji + Bold Combination Errors'. ```text ℹ️ **重要な情報** 🚀 **スタートガイド** 💡 **ヒント** - ✅ **完了した項目** ``` -------------------------------- ### AI List Formatting Examples Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/README.md Demonstrates common AI-generated list formatting patterns that may appear mechanical. These include bolded items, emojis, and specific separators. ```markdown - **重要**: これは重要な項目です - **注意**: 注意が必要な項目です - **項目** - ハイフン区切りも同様のパターンです - **項目** — em ダッシュ区切りも検出します - ✅ 完了した項目 - ❌ 失敗した項目 - 💡 アイデア項目 - 🔥 ホットな話題 - 🚀 開始準備完了 - ⭐ 重要項目 - 🎯 目標設定 - 📝 メモ項目 ``` -------------------------------- ### Example Trigger: Absoluteness Category Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md These examples show phrases that fall under the 'Absoluteness Category' and are considered overly exaggerated. ```text 革命的な技術 ゲームチェンジャーなソリューション 世界初のアプローチ 究極のパフォーマンス 完全に問題が解決 完璧なシステム 最高の品質 最先端の機能 大幅に改善 ``` -------------------------------- ### Structure Guidance Example Messages Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md Illustrates structural issues such as repetitive connectives, sequential instructions without proper formatting, and mechanical list introductions. Suggestions include using bullet points, numbered lists, or headings for better organization. ```text 【構造化】接続表現の重複が検出されました。箇条書きや段落分けによる情報整理を検討してください。 ``` ```text 【構造化】連続的な手順説明が検出されました。番号付きリストまたは見出し構造での整理を検討してください。 ``` ```text 【構造化】接続表現と句点で終わる文の直後の箇条書きは機械的な印象を与える可能性があります。 「たとえば、次のような点があります。」のような自然な導入文を検討してください。 ``` -------------------------------- ### Suggested Alternative for Quote Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md An example of how to rephrase the sentence to avoid the flagged pattern, making the Japanese more natural. ```markdown たとえば、次のような例があります。 > 引用文 ``` -------------------------------- ### Suggested Alternative for Code Block Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md An example of how to rephrase the sentence to avoid the flagged pattern, making the Japanese more natural. ```markdown 実行方法は以下の通りです。 ```bash command ``` ``` -------------------------------- ### Example Trigger: Decorative Emoji in List Items Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md These examples demonstrate list items containing decorative emojis that trigger the 'Decorative Emoji Errors'. ```text - ✅ 完了した項目 - 💡 アイデア - 🚀 スタート - 📝 メモ ``` -------------------------------- ### Example Trigger: Predictive Category Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md These examples include phrases that are considered predictive or overly ambitious, triggering the 'Predictive Category Errors'. ```text 業界を再定義します 未来を変える技術 パラダイムシフトをもたらす 不可避の変化 新たな基準を設定 次世代のソリューション フロンティアを開拓 根本的に変革する ``` -------------------------------- ### Recommended Alternatives for Colon Usage Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md Provides examples of how to rephrase sentences that use a predicate followed by a colon into more natural Japanese, using noun phrases or complete sentences. ```markdown ❌ 実行します: ✅ 実行方法: ✅ 実行方法は以下の通りです。 ❌ 説明します: ✅ 説明: ✅ 説明内容は以下の通りです。 ❌ 例えば: ✅ 例: ✅ たとえば、次のような例があります。 ``` -------------------------------- ### AI Hype Expression Examples Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/README.md Shows examples of exaggerated or hype-like expressions commonly found in AI writing. These phrases often overstate claims or use buzzwords. ```markdown 革命的な技術で業界を変えます。 これはゲームチェンジャーです。 世界初のソリューションを提供します。 究極のパフォーマンスを実現します。 完全に問題を解決します。 すべての課題を解決します。 最高の品質を保証します。 魔法のように動作します。 奇跡的な結果を生み出します。 可能性を解き放つソリューションです。 AIを民主化するプラットフォームです。 業務をスーパーチャージします。 業界を再定義する革新です。 未来を変える技術です。 パラダイムシフトを起こします。 不可避の変化が起こります。 次世代のソリューションです。 ``` -------------------------------- ### Allowlist for no-ai-hype-expressions Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/configuration.md Example of pattern allowlisting for the 'no-ai-hype-expressions' rule. It allows specific hype words and regex patterns. ```json { "no-ai-hype-expressions": { "allows": [ "革命的な", "/次世代の.*/", "/最先端の" ] } } ``` -------------------------------- ### More Natural Expression Examples for Hype Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/README.md Offers alternative, more natural phrasing for common AI hype expressions. This focuses on more grounded and realistic language. ```markdown 効果的な技術で業界に変化をもたらします。 これは大きな変化をもたらすでしょう。 新しいソリューションを提供します。 高いパフォーマンスを実現します。 多くの問題を解決します。 主要な課題を解決します。 高い品質を保証します。 スムーズに動作します。 優れた結果を生み出します。 新たな機会を創出するソリューションです。 AIを利用しやすくするプラットフォームです。 業務を効率化します。 業界に新しい視点をもたらす革新です。 将来に影響を与える技術です。 大きな変化を起こします。 重要な変化が起こるでしょう。 新しいソリューションです。 ``` -------------------------------- ### Document-Level Analysis Report Example Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md This message summarizes the total number of improvement suggestions found in the document, broken down by category, based on the 7 Cs of effective technical writing. A link to detailed guidelines is provided. ```text 【テクニカルライティング品質分析】この文書で{totalIssues}件の改善提案が見つかりました [内訳: 簡潔性: {count}件, 明確性: {count}件, 具体性: {count}件, 一貫性: {count}件, 構造化: {count}件]。 効果的なテクニカルライティングの7つのC (Clear, Concise, Correct, Coherent, Concrete, Complete, Courteous) の原則に基づいて見直しを検討してください。 詳細なガイドライン: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/docs/tech-writing-guidelines.md ``` -------------------------------- ### Category Suppression Example Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md Shows how to disable specific pattern categories within a rule by using the 'disable{CategoryName}Patterns' option. ```json { "rule-name": { "disable{CategoryName}Patterns": true } } ``` -------------------------------- ### AI Emphasis Pattern Examples Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/README.md Illustrates AI-generated emphasis patterns, such as excessive use of bolding or specific prefixes, which can appear mechanical. This includes bolded words and informational prefixes. ```markdown これは**非常に**重要な項目です。 **注意**してください。 # **重要なお知らせ** ## **太字**の見出し ``` -------------------------------- ### More Natural Colon Continuation Examples Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/README.md Shows more natural Japanese expressions following a colon, avoiding the English-like pattern. This includes rephrasing to introduce lists or code blocks more smoothly. ```markdown 実行方法は以下の通りです。 ```bash command ``` 説明の内容は以下の通りです。 - 項目1 - 項目2 たとえば、次のような例があります。 - 具体的な例 例: - 具体的な例 ``` -------------------------------- ### Programmatic Usage of No AI Hype Expressions Rule Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-hype-expressions.md Import and use the no-ai-hype-expressions rule programmatically in your Textlint setup. Configure options like disabling abstract patterns and specifying allowed expressions. ```typescript import rule from "@textlint-ja/textlint-rule-preset-ai-writing/src/rules/no-ai-hype-expressions"; const context = { Syntax, RuleError, report, getSource, locator }; const handler = rule(context, { disableAbstractPatterns: true, allows: ["許可する表現"] }); // handler[Syntax.Str](node) is called for each text node ``` -------------------------------- ### AI Colon Continuation Examples (English-like Pattern) Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/README.md Detects English-like patterns where a block element follows a colon, which is unnatural in Japanese. This rule uses morphological analysis to check if the preceding sentence ends with a predicate. ```markdown 実行します: ```bash command ``` 説明します: - 項目1 - 項目2 例えば: - 具体的な例 ``` -------------------------------- ### Basic Preset Configuration Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/preset.md Enable all rules with their default configurations by including the preset in your .textlintrc file. ```json { "rules": { "@textlint-ja/preset-ai-writing": true } } ``` -------------------------------- ### Full Default Configuration Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/configuration.md An explicit version of the minimal configuration, showing all default rules enabled. The 'ai-tech-writing-guideline' rule is enabled with 'severity: "info"'. ```json { "rules": { "@textlint-ja/preset-ai-writing": { "no-ai-list-formatting": true, "no-ai-hype-expressions": true, "no-ai-emphasis-patterns": true, "no-ai-colon-continuation": true, "ai-tech-writing-guideline": { "severity": "info" } } } } ``` -------------------------------- ### Enable AI Writing Rule Preset in .textlintrc Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/README.md Recommended way to enable the AI writing rule preset. Add this configuration to your .textlintrc file. ```json { "rules": { "@textlint-ja/preset-ai-writing": true } } ``` -------------------------------- ### Integration with textlint-rule-preset-ja-technical-writing Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/configuration.md Recommended integration with the 'preset-ja-technical-writing' preset. Enforces strict rules from the technical writing preset and AI writing rules, with guideline suggestions at 'info' level. ```json { "rules": { "preset-ja-technical-writing": true, "@textlint-ja/preset-ai-writing": { "ai-tech-writing-guideline": { "severity": "info", "enableDocumentAnalysis": true }, "no-ai-colon-continuation": { "allows": ["使用方法:", "実装方法:"] } } } } ``` -------------------------------- ### Textlint Configuration with Rule Options Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/INDEX.md Configure specific rules within the AI writing preset, such as disabling certain patterns or allowing specific text/regex. ```json { "rules": { "@textlint-ja/preset-ai-writing": { "no-ai-list-formatting": { "allows": ["許可するテキスト", "/regex/pattern/"], "disableBoldListItems": false, "disableEmojiListItems": false } } } } ``` -------------------------------- ### Development Configuration: Lenient Suggestions Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/configuration.md Configuration for development environments, using the guideline rule for suggestions and disabling stricter rules. Enables 'ai-tech-writing-guideline' with 'severity: "info"' and 'enableDocumentAnalysis: true'. ```json { "rules": { "@textlint-ja/preset-ai-writing": { "no-ai-list-formatting": false, "no-ai-hype-expressions": false, "no-ai-emphasis-patterns": false, "no-ai-colon-continuation": false, "ai-tech-writing-guideline": { "severity": "info", "enableDocumentAnalysis": true } } } } ``` -------------------------------- ### Customizing Rule Options Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/preset.md Configure specific rule options by providing a configuration object for the preset in your .textlintrc file. ```json { "rules": { "@textlint-ja/preset-ai-writing": { "no-ai-list-formatting": { "allows": ["許可するテキスト", "/regex/pattern/i"], "disableBoldListItems": false, "disableEmojiListItems": false }, "no-ai-hype-expressions": { "allows": [], "disableAbsolutenessPatterns": false, "disableAbstractPatterns": false, "disabledPredictivePatterns": false }, "no-ai-emphasis-patterns": { "allows": [], "disableEmojiEmphasisPatterns": false, "disableInfoPatterns": false, "disableHeadingEmphasisPatterns": false }, "no-ai-colon-continuation": { "allows": [], "disableCodeBlock": false, "disableList": false, "disableQuote": false, "disableTable": false }, "ai-tech-writing-guideline": { "severity": "info", "allows": [], "disableRedundancyGuidance": false, "disableVoiceGuidance": false, "disableClarityGuidance": false, "disableConsistencyGuidance": false, "disableStructureGuidance": false, "enableDocumentAnalysis": true } } } } ``` -------------------------------- ### Integration with Other Presets and Custom Options Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/preset.md Integrate the AI Writing preset with other Textlint presets and apply custom options, such as severity levels and allowed patterns. ```json { "rules": { "preset-ja-technical-writing": true, "@textlint-ja/preset-ai-writing": { "ai-tech-writing-guideline": { "severity": "info", "enableDocumentAnalysis": true }, "no-ai-colon-continuation": { "allows": ["使用方法:", "/^例:$/"] } } } } ``` -------------------------------- ### Programmatic Usage of the Rule Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md Demonstrates how to import and use the no-ai-colon-continuation rule programmatically within a Textlint context, including custom configurations. ```typescript import rule from "@textlint-ja/textlint-rule-preset-ai-writing/src/rules/no-ai-colon-continuation"; const context = { Syntax, RuleError, report, getSource, locator }; const handler = rule(context, { disableCodeBlock: true, allows: ["使用方法:"] }); // handler[Syntax.Document](node) is called for the entire document (async) ``` -------------------------------- ### Production Configuration: Strict Enforcement Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/configuration.md Configuration for production environments, enabling all rules with minimal allowances and setting 'ai-tech-writing-guideline' to 'severity: "error"'. 'enableDocumentAnalysis' is also set to true. ```json { "rules": { "@textlint-ja/preset-ai-writing": { "no-ai-list-formatting": { "allows": [] }, "no-ai-hype-expressions": { "allows": [] }, "no-ai-emphasis-patterns": { "allows": [] }, "no-ai-colon-continuation": { "allows": [] }, "ai-tech-writing-guideline": { "severity": "error", "enableDocumentAnalysis": true } } } } ``` -------------------------------- ### Error Message: Information Prefix (List Items) Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md This error targets bolded information labels within list items, recommending a more natural presentation. ```text リストアイテムで「**{label}**」のような太字の情報プレフィックスは機械的な印象を与える可能性があります。 より自然な表現を検討してください。 ``` -------------------------------- ### 用語と表現の統一例 Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/docs/tech-writing-guidelines.md 「ユーザー/クライアント/顧客」や「設定画面/設定ページ」のように、同じ対象を指す異なる用語や、「です・ます調/だ・である調」といった文体の混在を避けるための統一例です。一貫性の原則に従い、表記ゆれをなくします。 ```markdown ❌ ユーザーがログインし、クライアントが設定を変更します。 ✅ ユーザーがログインし、ユーザーが設定を変更します。 ❌ 設定画面を開き、設定ページで変更します。 ✅ 設定画面を開き、設定画面で変更します。 ``` -------------------------------- ### 能動態と具体的な動詞の使用例 Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/docs/tech-writing-guidelines.md 受動態の表現を能動態に変更し、主語を明確にすることで、より直接的で分かりやすい文章にする例です。具体的な動詞の使用を推奨します。 ```markdown ❌ データの検証が行われます。 ✅ システムがデータを検証します。 ❌ ファイルの変更を行ってください。 ✅ ファイルを変更してください。 ``` -------------------------------- ### Pattern Allowlisting Syntax Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/configuration.md Defines the syntax for pattern allowlisting, supporting exact string matches, basic regex, and regex with flags like 'i' (case-insensitive) and 'm' (multiline). ```json { "allows": [ "exact match", // Exact string matching (case-sensitive) "/regex/", // Basic regex pattern "/regex/i", // Case-insensitive regex "/regex/m", // Multiline mode "/regex/im" // Combined flags ] } ``` -------------------------------- ### 文の構造化と分割例 Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/docs/tech-writing-guidelines.md 長文や複数のアイデアを含む文を、一文一義の原則に従って短く分割し、論理的な順序で再構成する例です。読者の理解を助けるための構造化を示します。 ```markdown ❌ この機能は複数のオプションを提供し、ユーザーが柔軟に設定でき、 パフォーマンスも向上し、セキュリティも強化されています。 ✅ この機能は複数のオプションを提供します。 ユーザーは柔軟に設定できます。 パフォーマンスが向上し、セキュリティも強化されています。 ``` -------------------------------- ### Morphological Analysis Logic Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md Illustrates the core logic for analyzing Japanese text using kuromojin to determine the part of speech of the word preceding a colon, flagging predicates but allowing nouns. ```typescript const tokens = await tokenize(beforeColonText); const lastToken = tokens[tokens.length - 1]; const partOfSpeech = lastToken.pos.split(",")[0]; // Checks for: if (partOfSpeech === "名詞") return true; // Noun (allowed) if (["動詞", "形容詞", "助動詞"].includes(partOfSpeech)) return false; // Predicates (flagged) if (partOfSpeech === "接続詞") return false; // Conjunctions (flagged) ``` -------------------------------- ### Error Message: Information Prefix (Paragraphs) Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md This error flags bolded information labels like '注意' or '重要' in paragraphs, suggesting a more natural phrasing. ```text 「**{label}**」のような太字の情報プレフィックスは機械的な印象を与える可能性があります。 より自然な表現を検討してください。 ``` -------------------------------- ### 抽象的表現の具体化例 Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/docs/tech-writing-guidelines.md 「高速なパフォーマンス」や「大幅に向上」といった曖昧な表現を、測定可能な数値や具体的な効果を示す表現に置き換える例です。具体性の原則に基づき、客観的な情報を提供します。 ```markdown ❌ このAPIは高速なパフォーマンスを提供します。 ✅ このAPIは50ms未満で応答します。 ❌ 大幅にパフォーマンスが向上しました。 ✅ 処理速度が従来比200%向上しました。 ``` -------------------------------- ### Configuration for No AI Hype Expressions Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-hype-expressions.md Configure the no-ai-hype-expressions rule within the AI Writing preset. You can specify allowed expressions and control pattern categories. ```json { "rules": { "@textlint-ja/preset-ai-writing": { "no-ai-hype-expressions": { "allows": ["許可する表現", "/^次世代の.*/"], "disableAbsolutenessPatterns": false, "disableAbstractPatterns": false, "disabledPredictivePatterns": false } } } } ``` -------------------------------- ### Default Preset Export Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/preset.md The preset is exported as a default object from the main entry point, defining rules and their default configurations. ```typescript const preset = { rules: { "no-ai-list-formatting": TextlintRuleModule, "no-ai-hype-expressions": TextlintRuleModule, "no-ai-emphasis-patterns": TextlintRuleModule, "ai-tech-writing-guideline": TextlintRuleModule, "no-ai-colon-continuation": TextlintRuleModule }, rulesConfig: { "no-ai-list-formatting": true, "no-ai-hype-expressions": true, "no-ai-emphasis-patterns": true, "ai-tech-writing-guideline": { severity: "info" }, "no-ai-colon-continuation": true } }; export default preset; ``` -------------------------------- ### 冗長表現の改善例 Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/docs/tech-writing-guidelines.md 「まず最初に」「〜することができます」のような冗長な表現を、より簡潔で直接的な表現に置き換える例です。簡潔性の原則に従い、不必要な言葉を削除します。 ```markdown ❌ まず最初に設定ファイルを開く必要があります。 ✅ まず、設定ファイルを開きます。 ❌ このAPIを使用することができます。 ✅ このAPIを使用できます。 ``` -------------------------------- ### Allow Specific Expressions Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-hype-expressions.md Define a list of specific expressions that should be allowed and not flagged by the rule. This is useful for terms that are contextually appropriate or intentionally used. ```json { "no-ai-hype-expressions": { "allows": [ "革命的な", "/最先端の.*/", "/次世代" ] } } ``` -------------------------------- ### Allow Specific Patterns Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md Customize the rule to permit specific phrases or regex patterns that might otherwise be flagged as unnatural colon continuations. ```json { "no-ai-colon-continuation": { "allows": [ "使用方法:", "実装方法:", "/^例:/", "/\ \[.*\ \]:$/" ] } } ``` -------------------------------- ### Disabling Specific Rules within Preset Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/preset.md Enable the preset but disable a specific rule by setting its value to false in the .textlintrc configuration. ```json { "rules": { "@textlint-ja/preset-ai-writing": { "no-ai-hype-expressions": false } } } ``` -------------------------------- ### Error Message: Emoji + Bold Combination (List Items) Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md This error flags the combination of an emoji and bold text within a list item, recommending a more natural presentation. ```text リストアイテムで絵文字と太字の組み合わせは機械的な印象を与える可能性があります。 より自然な表現を検討してください。 ``` -------------------------------- ### Disabling Specific Checks Within a Rule Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/preset.md Enable a rule within the preset but disable specific pattern checks by configuring the rule's options in .textlintrc. ```json { "rules": { "@textlint-ja/preset-ai-writing": { "no-ai-list-formatting": { "disableEmojiListItems": true } } } } ``` -------------------------------- ### Document-Level Processing Loop Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md Shows the iteration over document nodes to identify paragraphs and trigger the colon continuation check for each paragraph and its subsequent sibling node. ```typescript for (const [i, currentNode] of node.children.entries()) { const nextNode = node.children[i + 1]; if (currentNode.type === Syntax.Paragraph) { await checkColonContinuation(currentNode, nextNode); } } ``` -------------------------------- ### Error Message: Bold + Separator Pattern Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md This error is triggered when a list item contains bold text followed by a colon or em-dash. It suggests using more natural phrasing. ```text リストアイテムで強調(**)とコロン(:)の組み合わせは機械的な印象を与える可能性があります。 より自然な表現を検討してください。 リストアイテムで強調(**)とダッシュ(—)の組み合わせは機械的な印象を与える可能性があります。 より自然な表現を検討してください。 ``` -------------------------------- ### Error Message: Abstract Category Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md This error targets abstract or metaphorical expressions, suggesting the use of concrete explanations or more grounded language. ```text 「魔法のように」という比喩的表現は現実味に欠ける可能性があります。 具体的な仕組みを説明することを検討してください。 「奇跡的な」という表現は過度に感情的である可能性があります。 具体的な成果を示すことを検討してください。 「民主化する」という表現は技術文脈では曖昧である可能性があります。 「利用しやすくする」などの具体的な表現を検討してください。 ``` -------------------------------- ### English Text Detection Heuristic Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md A heuristic approach to identify English text, which commonly uses colons, to prevent false positives from the rule. ```typescript const isEnglishText = /^[a-zA-Z0-9\s\-_.]+$/.test(beforeColonText.trim()) && /[a-zA-Z]/.test(beforeColonText); ``` -------------------------------- ### Error Message: Decorative Emoji in List Items Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md This error occurs when a list item uses a decorative emoji, suggesting a text-based alternative for a more natural feel. ```text リストアイテムでの絵文字「✅」の使用は、読み手によっては機械的な印象を与える場合があります。 テキストベースの表現も検討してみてください。 リストアイテムでの絵文字「🚀」の使用は、読み手によっては機械的な印象を与える場合があります。 テキストベースの表現も検討してみてください。 ``` -------------------------------- ### Flagged List Pattern Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md This pattern is flagged when a paragraph ends with a predicate and a colon, followed by a list. It suggests an alternative phrasing for more natural Japanese. ```markdown 説明します: - 項目1 - 項目2 ``` -------------------------------- ### Flagged Table Pattern Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md This pattern is flagged when a paragraph ends with a predicate and a colon, followed by a table. It suggests an alternative phrasing for more natural Japanese. ```markdown 以下の通り: | Header | |--------| | Data | ``` -------------------------------- ### Error Message: Emoji + Bold Combination (Paragraphs) Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md This error is triggered by the combination of an emoji followed by bold text in a paragraph, suggesting a more natural phrasing. ```text 絵文字と太字の組み合わせは機械的な印象を与える可能性があります。 より自然な表現を検討してください。 ``` -------------------------------- ### Disable Specific Block Types Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md Configure the rule to ignore colons within code blocks, lists, or quotes by setting the corresponding disable flags to true. ```json { "no-ai-colon-continuation": { "disableCodeBlock": true } } ``` ```json { "no-ai-colon-continuation": { "disableCodeBlock": true, "disableQuote": true, "disableTable": true } } ``` -------------------------------- ### Error Message: Predictive Category Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md This error flags predictive or overly ambitious phrases, recommending specific explanations of changes rather than vague claims. ```text 「業界を再定義」という表現は誇張的である可能性があります。 具体的な変化を説明することを検討してください。 「未来を変える」という表現は大げさである可能性があります。 具体的な改善点を述べることを検討してください。 「パラダイムシフト」という表現は定型的である可能性があります。 具体的な変化を説明することを検討してください。 「次世代の」という表現は定型的である可能性があります。 具体的な技術的進歩を説明することを検討してください。 ``` -------------------------------- ### Disable Specific Categories Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-hype-expressions.md Disable all abstract patterns while still flagging other types of hype expressions. This allows for fine-grained control over which categories of patterns are enforced. ```json { "no-ai-hype-expressions": { "disableAbstractPatterns": true } } ``` -------------------------------- ### Colon + Block Element Pattern Error Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md This rule detects paragraphs ending with a predicate and a colon, immediately followed by a code block, list, quote, or table. English text and specific noun endings are automatically allowed. ```markdown 実行します: ```bash command ``` ``` ```markdown 説明します: - 項目1 - 項目2 ``` ```markdown 例えば: > 引用 ``` ```markdown 以下の通り: | Header | ``` -------------------------------- ### Error Message: Absoluteness Category Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/errors.md This error flags overly absolute or exaggerated expressions, recommending the use of more specific and objective language. ```text 「革命的な」という表現は過度に誇張的である可能性があります。 具体的な改善点を述べることを検討してください。 「完全に」という絶対的な表現は過度に断定的である可能性があります。 「多くの場合」などの表現を検討してください。 「最高の」という表現は主観的で誇張的である可能性があります。 より客観的な評価を示すことを検討してください。 ``` -------------------------------- ### Flagged Code Block Pattern Source: https://github.com/textlint-ja/textlint-rule-preset-ai-writing/blob/main/_autodocs/api-reference/no-ai-colon-continuation.md This pattern is flagged when a paragraph ends with a predicate and a colon, followed by a code block. It suggests an alternative phrasing for more natural Japanese. ```markdown 実行します: ```bash command ``` ```