Repository navigation
feat: MCP direct tools, local-model eval, uncertainty, calc sheets, calculator app, new domains - #9
Merged
Conversation
…y calculator app - fpc-mcp --domains fluids,thermo: also serve each calculation as its own tool, with the registry's JSON Schema (synthesized signature adapter). - calculate tool: explain the nesting when a model sends inputs next to "key" (seen with qwen2.5:7b); clearer example in its description. - scripts/try_local_model.py: run engineering questions through fpc-mcp with an Ollama model and check the answers against fpc. - fpc.uncertainty: Normal/Uniform/Triangular inputs, monte_carlo() on any registry calculation or function, intervals and sensitivity; fpc uncertainty command. - fpc.report: Markdown calc sheets (method, inputs with units, defaults, result, optional uncertainty, review checklist); fpc report command. - apps/calculator.py: Streamlit form for every calculation, generated from the registry, with uncertainty and calc-sheet tabs; AppTest coverage. - mypy: disallow untyped/incomplete defs across fpc/ (annotated the remaining helpers in beam, design, modal, cli). - docs: trusting-results guide, API pages, building-tools section. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ROADMAP section 11 "domain gaps engineers hit daily" plus cited tests: - MachineElements: bolt torque/preload/stiffness/joint constant and load sharing, static (von Mises) and DE-Goodman shaft diameter, spring rate and Wahl/Bergstrasser shear stress, bearing L10 life and required rating, fillet weld throat shear (Shigley 10th ed.). - Fatigue: Se' for steels, Marin factors (surface, size, load, reliability), Goodman/Soderberg/Gerber/ASME-elliptic safety factors, Basquin S-N line and cycles to failure. - Material: radius of gyration, slenderness and transition ratios, Johnson buckling load, and critical_buckling_load choosing Euler or Johnson. - Psychrometrics: Hyland-Wexler saturation pressure, humidity ratio, RH, dew point and wet bulb (brentq), enthalpy, specific volume, altitude pressure (ASHRAE Fundamentals 2017 Ch. 1). Exported, preloaded in the GUI, documented (API pages, README), llms.txt regenerated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- scripts/try_local_model.py: --think on|off; report when a reasoning model's answer lands only in the thinking field. - docs/ai.md: --domains section and a results table for qwen3:14b, qwen2.5:7b and qwen2.5-coder:14b, with the failure modes found. - ROADMAP: tick sections 9-11 items done on this branch; new follow-ups (AISC download is manual, equation-number spot check, enhancement factor, older-domain citations, LM Studio/Open WebUI apps). - CHANGELOG, CLAUDE.md: new domains, uncertainty, reports, app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Builds the rest of ROADMAP sections 9-11. Stacked on #8: merge #8 first, and GitHub retargets this PR to
mainautomatically.What's new
MCP direct tools:
fpc-mcp --domains fluids,thermoalso serves each calculation in those domains as its own tool, with the registry's JSON Schema.Local-model evaluation:
scripts/try_local_model.pyasks an Ollama model six mixed-unit engineering questions throughfpc-mcpand checks the answers againstfpc. The results are indocs/ai.md:calculatetool fix: a model that puts the inputs besidekey(qwen2.5:7b did) now gets back the exact call shape to send, instead of a validation error it retried indefinitely.Uncertainty:
fpc.uncertaintyandfpc uncertaintyrun Monte Carlo on any calculation. Inputs can be Normal, Uniform or Triangular. The result gives the mean, standard deviation, percentiles, a 95 % interval and each input's share of the spread.Calc sheets:
fpc.reportandfpc reportwrite a Markdown sheet with the method, inputs with units, defaults, result, library version, an optional uncertainty section and a review checklist.Web calculator:
apps/calculator.pyis a Streamlit form for every calculation, generated from the registry, with uncertainty and calc-sheet tabs.New domains:
MachineElements: bolts, shafts, springs, bearings, welds.Fatigue: Marin factors; Goodman, Soderberg, Gerber and ASME-elliptic safety factors; S-N curve.Psychrometrics: saturation pressure, humidity ratio, relative humidity, dew point, enthalpy, specific volume, wet bulb.Material: Johnson buckling and an Euler/Johnson chooser.Stricter types: mypy now uses
disallow_untyped_defsanddisallow_incomplete_defsacrossfpc/.Docs and bookkeeping:
docs/trusting-results.md.Checks run locally
pytest419 passed on Python 3.14 and on 3.11.ruff checkandruff format --checkpass.mypywith the stricter settings passes.scripts/python_support.py checkpasses.mkdocs build --strictpasses.Needs a human
w_shapes.csvagainst AISC needs the spreadsheet downloaded by hand: aisc.org returns 403 to scripts.🤖 Generated with Claude Code