- fl.attorney.agent (AbstractModel): manual-only substantive analysis fired from
the case AI tab. Builds a full case context (parties, children, financials,
issue tags, prior analyses) plus candidate statute/caselaw lists, and asks
Claude to author a strategy memo, draft arguments/counterarguments, write a
risk narrative, and assess substantial change (FL 61.30(1)(b))
- Grounds output in the real library: the model may only pick statutes/case law
from the supplied candidates, which are then resolved back to records and
linked (fl.analysis.cited_statute_ids / matched_caselaw_ids, case.caselaw_ids)
- Rule-based fallback produces a usable memo (complexity, statutes by category,
caselaw by tag, risk flags) when the API is unavailable — never a raw error
- fl.analysis: add analysis_type, strategy_memo (Html), risk_narrative,
cited_statute_ids; surface them in the analysis views
- fl.case: add attorney_memo_id + related memo/risk display; action_run_attorney_agent
opens the memo; "Generate Attorney Strategy Memo" button on the AI tab (admin)
- Refactor fl_ai_engine: extract shared call_claude_json(system, user) +
_extract_json so both agents and the engine share one Claude/JSON path
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- New fl.conflict.check model: screens petitioner/respondent/party_ids names
against parties on other open cases (exact partner match + difflib fuzzy
match at 0.85 threshold); skips folded/closed stages
- Runs automatically as the first action in fl.case.create; logs conflicts to
chatter with matched-case detail and never silently passes
- fl.case gains conflict_check_passed/conflict_check_id/conflict_check_ids;
write() blocks advancing stage_id past Intake until the check passes
- Admin-only action_override requires a written justification, stamps user/date,
and flips conflict_check_passed True with a chatter audit entry
- Add conflict check form/tree/search views, action, Cases sub-menu item,
case form banner + Run Conflict Check button, and Kanban conflict badge
- ACL entries for fl.conflict.check (admin full, paralegal no-delete)
- Finish Claude migration cleanup in fl_analysis.py (model_used default,
docstring/help text)
- Add .gitignore for Python artifacts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>