Imported from RefactorKai/EXACT2026 (
.agents/AGENTS.md). Install upstream withnpx skills add RefactorKai/EXACT2026 --skill .agents. Copyright stays with the author.
Rule: SymPy Execution & Unit Scaling (Type 1 & 2 Pipelines)
1. SymPy Output Extraction:
When an LLM uses sympy.solve(), the output is often a list of dictionaries (e.g., [{C: 0.000047}]).
Rule: The Python execution sandbox preamble MUST dynamically check if the evaluation result is a list of dictionaries or a dictionary. It must extract the first numeric value before attempting to cast it to float(), preventing sandbox crashes and false CoT fallbacks.
2. Unit Scaling Paradox:
LLMs often double-scale values if prompted with target units.
Rule: Static examples in the LLM prompt MUST force the LLM to output ONLY in BASE SI units (e.g., print_answer(value, 'BASE_SI')). All prefix/unit scaling MUST be performed purely in the external Python wrapper (e.g., scale_to_unit) before variance/contradiction checks.