exp98 Claude Opus 4.6 commited on
Commit
9a6952b
Β·
1 Parent(s): de71b62

Add targeted claim regeneration from analysis feedback

Browse files

When claim analysis shows a non-perfect rating (e.g., Specificity: Medium),
an "Improve" button appears on that card. Clicking it sends the current
claims plus the analysis feedback to Gemini, which rewrites the claims
with specific focus on improving that dimension while preserving strengths
in other areas. Old analysis is cleared so the user can re-analyze.

- Extend ClaimRequest model with improvement_focus, previous_claims, and
analysis_feedback optional fields
- Update /api/generate-claim to use a targeted improvement prompt when
improvement_focus is provided (backwards compatible)
- Add Improve buttons to analysis cards (hidden when rating is already best)
- Add improveClaimDimension() JS function with loading states

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

2 files changed +105 -2
Files changed (2)
backend/server.py+39-2
eddison-app.html+66