precision-and-rounding
Installation
SKILL.md
Precision and Rounding — Project-First
Purpose
Prevent accidental numeric behavior changes. The project's verified existing contract takes precedence over generic preferences. This skill does not prescribe Half-Up, Half-Even, 2 decimal places, decimal, or any global rounding mode by default.
Use with a general debugging or testing workflow; this skill is the numerical decision specialist, not a replacement for root-cause analysis or test execution.
Non-negotiable rules
- Discover before modifying. Inspect the affected calculation end-to-end, not just the line that rounds a value. See project-discovery.md.
- Separate facts from guesses. Cite file paths, code references, configuration and observed tests for every claim about project behavior. Search results are leads, not proof of runtime behavior.
- Never silently change policy. No implicit switch from Half-Even to Half-Up, no automatic conversion to fixed 2dp, no change to when rounding occurs, and no broad numeric-type migration.
- Preserve behavior by default. For bugs and improvements, change only what is required. If requested behavior conflicts with existing behavior, explicitly identify the conflict and its affected scope.
- Do not infer an intentional policy from one incidental call. Check callers, overrides, framework defaults, docs and executable tests; multiple policies may coexist by field, operation, tenant, currency, or version.
- Missing decision-critical evidence means stop the policy change. State the unknown and ask for the smallest needed clarification; you may still document findings or add characterization tests that do not alter production behavior.
- No invented verification. Never claim tests passed, values were inspected, or business rules were confirmed unless actually observed.
- No project disclosures. Never copy sensitive values or proprietary implementation into a public skill artifact. Use generic examples.