Summary
The repository ships rich, structured anatomy prompt templates at src/medcheck/prompts/anatomy/{knee,shoulder,spine}.txt, but build_prompt() in vision_analysis.py only uses the short hardcoded _ANATOMY_HINTS dict and never reads those files. The detailed templates are effectively dead code, and the Vision-LLM receives only a one-line hint instead of the systematic checklist authored for each region.
Location
src/medcheck/pipeline/vision_analysis.py — _ANATOMY_HINTS dict and build_prompt()
src/medcheck/prompts/anatomy/*.txt — detailed templates that are never read
Impact
Suggested Fix
- Add a loader that reads
prompts/anatomy/<region>.txt when present and uses its content as the anatomy-specific instruction block.
- Fall back to the existing
_ANATOMY_HINTS dict, then to a generic instruction, when no template file exists (keeps hip/ankle/wrist/brain working).
- Add an
abdomen hint so the README's advertised regions are all covered.
- Cache loaded templates to avoid re-reading on every call.
Category
Bug / Enhancement
Severity
Medium
Effort Estimate
~1 h
Summary
The repository ships rich, structured anatomy prompt templates at
src/medcheck/prompts/anatomy/{knee,shoulder,spine}.txt, butbuild_prompt()invision_analysis.pyonly uses the short hardcoded_ANATOMY_HINTSdict and never reads those files. The detailed templates are effectively dead code, and the Vision-LLM receives only a one-line hint instead of the systematic checklist authored for each region.Location
src/medcheck/pipeline/vision_analysis.py—_ANATOMY_HINTSdict andbuild_prompt()src/medcheck/prompts/anatomy/*.txt— detailed templates that are never readImpact
*.txttemplate (cf. Add hip anatomy prompt template #10 hip, Add ankle/foot anatomy prompt template #11 ankle/foot, Add wrist anatomy prompt template #12 wrist) has no effect, because nothing loads them.abdomensupport, but there is neither a hint entry nor a template for it.Suggested Fix
prompts/anatomy/<region>.txtwhen present and uses its content as the anatomy-specific instruction block._ANATOMY_HINTSdict, then to a generic instruction, when no template file exists (keeps hip/ankle/wrist/brain working).abdomenhint so the README's advertised regions are all covered.Category
Bug / Enhancement
Severity
Medium
Effort Estimate
~1 h