All done. v3.5.18 — site.zip ready for upload.
Portal Intelligence Layer — Complete
All 10 tasks implemented and merged:
┌──────┬───────────────────────────────────────────────────────────────────────────────┬────────┐ │ Task │ What │ Status │ ├──────┼───────────────────────────────────────────────────────────────────────────────┼────────┤ │ 1 │ llm_router.py — Ollama-first/Claude-fallback model abstraction │ Done │ ├──────┼───────────────────────────────────────────────────────────────────────────────┼────────┤ │ 2 │ 15 prompt templates (classify, extract, cross-doc) │ Done │ ├──────┼───────────────────────────────────────────────────────────────────────────────┼────────┤ │ 3 │ DB migrations — document_analysis + project_intelligence tables + helpers │ Done │ ├──────┼───────────────────────────────────────────────────────────────────────────────┼────────┤ │ 4 │ Job type registration (portal_classify, portal_cross_analyse) │ Done │ ├──────┼───────────────────────────────────────────────────────────────────────────────┼────────┤ │ 5 │ portal_classify handler — auto-classify + single-doc extraction │ Done │ ├──────┼───────────────────────────────────────────────────────────────────────────────┼────────┤ │ 6 │ portal_cross_analyse handler — stakeholder, decisions, health synthesis │ Done │ ├──────┼───────────────────────────────────────────────────────────────────────────────┼────────┤ │ 7 │ 8 new portal API actions (triggers, imports, promotion, dashboard) │ Done │ ├──────┼───────────────────────────────────────────────────────────────────────────────┼────────┤ │ 8 │ Nightly batch cron (portal_intelligence_cron.php) │ Done │ ├──────┼───────────────────────────────────────────────────────────────────────────────┼────────┤ │ 9 │ Lead intelligence dashboard in Lab (portal-intelligence.php) │ Done │ ├──────┼───────────────────────────────────────────────────────────────────────────────┼────────┤ │ 10 │ Client portal extensions (health card, published insights, expanded taxonomy) │ Done │ └──────┴───────────────────────────────────────────────────────────────────────────────┴────────┘
Next steps after deploy:
- Add portal_intelligence_cron.php to cPanel cron: 0 2 * * * /usr/local/bin/php public_html/portal_intelligence_cron.php
- Define PORTAL_INTEL_CRON_KEY in config.php
- Restart the Python worker to pick up the new handlers
- Add the Lab nav link to portal-intelligence.php in _lab_nav.php
Related Concepts
- Model Abstraction — Wikipedia
- Ollama-first Model — Wikipedia
- Prompt Templates — Wikipedia
- Cross-Doc Classification — Wikipedia