Add a 数学的表記 section to AIRULES.md - #343
Merged
Merged
Conversation
The user reads undergraduate-level math and often finds a formula faster to parse than prose. The existing "数学的・構造的な説明は 定量的・体系的に行う" bullet states the goal but gives no trigger, so responses stayed prose-only. This section supplies the missing parts: when to reach for notation, what symbol vocabulary can be used without explanation, and which formalizations to avoid. Notation is handled in one bullet that switches on the render target, so the section stays self-contained enough to paste into claude.ai preferences (deploy.sh only symlinks AIRULES.md to Claude Code, Codex, and Junie). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TjSPJwmFZsyAKSiNqYZaxK
Review of the first draft surfaced two substantive defects. The notation bullet named terminals as the non-rendering side. That assertion is unverified — the PR body hedged it, the rule body did not, which is exactly what AIRULES.md's own hedge-preservation rule forbids. It is also wrong for two of the file's deploy targets: Junie renders in a GUI panel, and claude.ai renders LaTeX. The bullet now switches on whether the environment renders LaTeX, which is the actual axis, and cites GitHub's Web UI as an example rather than an enumeration that drifts from the documented set (Issues, Discussions, pull requests, wikis, Markdown files). The reading-aloud example "n が2倍でレイテンシは4倍" does not follow from O(n²) — an upper bound holds even for constant T — yet O(·) was the only asymptotic symbol the section licensed. Θ(·) and Ω(·) are now licensed and the example is tied to T ∝ n². Smaller fixes: scope stated explicitly, since the adjacent 出力フォーマット section excludes conversation and silence invited that reading by analogy; symbol-definition duty narrowed to variables and parameters so it stops contradicting the licensed-symbol bullet; ≲ dropped, as its convention splits between Vinogradov (constant-factor upper bound, redundant with O(·)) and the engineering "roughly at most"; the approximation rule made operational instead of merely asking for a distinction; the trigger's parenthetical marked as examples so it reads as subordinate to the ambiguity criterion rather than as an independent trigger; P(·) added next to E[·]. 出力フォーマット's emphasis-markup exception now covers math spans. The `_` in `$x_i$` is a subscript, not emphasis, and the section it lives in governs authoring, so this scopes the authoring rule without asserting anything about how any parser treats `_` inside a math span. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TjSPJwmFZsyAKSiNqYZaxK
ikuwow
marked this pull request as ready for review
July 30, 2026 06:24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add a
## 数学的表記section toAIRULES.md, right after## 応答の姿勢と判断.The user reads undergraduate-level math and often parses a formula faster than the equivalent prose. The existing bullet
数学的・構造的な説明は定量的・体系的に行うstates that goal but supplies no trigger, so responses stayed prose-only in practice.Design choices the diff does not show
The trigger is a property of the content (relations that turn ambiguous in prose), not a topic list. A topic-based trigger would fire on "math questions" and stay silent exactly where notation helps most — latency, cost, and complexity estimates in ordinary engineering discussion. The parenthetical list is marked as examples so it stays subordinate to that criterion rather than acting as an independent trigger, and one sub-bullet guards the failure mode this kind of rule dies from: formalizing the whole explanation instead of the one relation inside it.
The scope line is explicit because the adjacent
## 出力フォーマットsection excludes conversation. Without it, a reader could carry that exclusion over by analogy, which would disable the section for the case the user cares about most.Notation is one bullet rather than a glyph table or a dedicated skill. The request was for math to be chosen more often, not for notation to be standardized; a glyph reference serves the latter and can be added if that need appears. Keeping the section short also keeps it pasteable into claude.ai preferences —
scripts/deploy.shsymlinksAIRULES.mdonly to~/.claude/CLAUDE.md,~/.codex/AGENTS.md, and~/.junie/AGENTS.md(deploy.sh:64,79,84), so claude.ai is a manual copy.## 出力フォーマット's emphasis-markup exception is extended to cover math spans. The_in$x_i$is a subscript rather than emphasis, and that section governs authoring, so this scopes the authoring rule without asserting anything about how a parser treats_inside a math span.The existing
数学的・構造的な説明は定量的・体系的に行うbullet is left in place. The new section covers the 定量的 half but not the 構造的・体系的 half, so it is not a full replacement.vladimirrott/claude-math (MIT) was evaluated as an off-the-shelf option. Its
skills/math-unicode/SKILL.mdis a notation and glyph guide with no policy on when to use math, and it forbids LaTeX unconditionally, which conflicts with using LaTeX where it renders. Not adopted.Review fixes
The notation bullet originally named terminals as the non-rendering side. That assertion is unverified, and the first draft hedged it in this body while stating it as fact in the rule text — the exact drift
AIRULES.mdprohibits in its own hedge-preservation bullet. It is also wrong for two deploy targets: Junie renders in a JetBrains GUI panel, and claude.ai renders LaTeX. The bullet now switches on whether the environment renders LaTeX, which is the actual axis, and cites GitHub's Web UI as an example rather than reproducing a documented set it could drift from.The reading-aloud example
n が2倍でレイテンシは4倍does not follow fromO(n²), since an upper bound holds even whenTis constant, yetO(·)was the only asymptotic symbol the section licensed.Θ(·)andΩ(·)are now licensed and the example is tied toT ∝ n².≲was dropped rather than glossed: its convention splits between Vinogradov (f ≲ g ⟺ f = O(g), redundant with the licensedO(·)) and the engineering reading of "roughly at most", so licensing it without fixing a convention would have invited inconsistent use.Smaller fixes: the symbol-definition duty was narrowed to variables and parameters, so it stops contradicting the licensed-symbol bullet; the approximation rule now says which symbol to use instead of only asking for a distinction.
Verification
$…$,$`…`$,$$…$$, andmathblocks, in Issues, Discussions, pull requests, wikis, and Markdown files (GitHub Docs: Writing mathematical expressions)mathcode block instead of writing the fence, which would otherwise be an unterminated inline code span