Spaces:
Sleeping
Sleeping
Commit History
-
Sync from GitHub main β ERP priority, WMCA/Shropshire watchlist, network preserve-owners fix (a7395ea)
Verified signaturea87217c
-
Output LGR landscape report as Word .docx alongside .mdβ
Piers Lyon +1: Claude Opus 4.7 (1M context)User wants the intel asset shareable as a proper Word doc rather than a Markdown file. Adding a focused markdownβdocx converter and wiring it into the LGR research script so every future run writes both formats automatically. md_to_docx.py β new module: Pure-python (python-docx, no pandoc shell-out) converter that handles the markdown patterns we actually emit in Claude reports: - ATX headings H1-H4 with Curium navy styling - Paragraphs, unordered + ordered lists - Bold / italic / inline code - Inline hyperlinks (rendered as proper Word hyperlinks) - Horizontal rules Not a general-purpose markdown engine β tables / fenced code / nested lists past one level all render as plain text. Trade-off is zero shell dependencies and ~150 lines of code. scripts/lgr_deep_research.py: Final persistence step now writes BOTH .md (for git diff / readability / re-run input) AND .docx (for sharing with the team). requirements.txt: + python-docx intel_assets/lgr_landsβ¦224df5f -
Deepen LGR research sweep β 4 more passes + streaming consolidationβ
Piers Lyon +1: Claude Opus 4.7 (1M context)User asked to "go deeper" on LGR research β leave no stone unturned across job sites, tender notices, LinkedIn, and council cabinet papers. Added 4 new passes after the original 5: 6. jobs_uk_boards β comprehensive UK job-board sweep covering JobsGoPublic, LG Jobs, MJ Recruitment, LGC Jobs, gov.uk Civil Service, Reed, Totaljobs, Indeed, CV-Library, direct council careers pages. 10 search budget. 7. tenders_deep β FTS + Contracts Finder + CCS frameworks (RM6187 MCF3 etc.) + regional consortia (NEPO, YPO, ESPO, Pro5). Catches PINs (early-warning notices) 3-6 months before tenders go live. 8 search budget. 8. linkedin_deep β aggressive site:linkedin.com queries via web_search to find named Programme Directors / Directors of Transformation at each priority council. ZERO LinkedIn account risk (uses Google's public index, not LinkedIn auth). 12 search budget. 9. moderngov_cabinet β Cabinet papers + committee agendas on ModernGov / Cβ¦563437a -
Deep LGR research sweep β script + landscape report (18 May 2026)β
Piers Lyon +1: Claude Opus 4.7 (1M context)User asked for a one-off deep research piece on LGR to identify every council planning or mobilising. Built a five-pass web_search sweep + Claude consolidation that produces a markdown landscape report and a structured lgr_tracker DB table. scripts/lgr_deep_research.py: Five focused passes via Anthropic web_search: 1. Current landscape β every council by LGR stage 2. Ministerial decisions + funding triggers (last 90d) 3. Transformation / programme / change leadership hires 4. Section 114 / Best Value / commissioner interventions 5. Major ERP rollouts coinciding with LGR Consolidation step merges multi-pass output into: - intel_assets/lgr_landscape_YYYY-MM-DD.md (markdown report) - lgr_tracker DB table (one row per council with curium_priority, lgr_stage, preferred_option, key_dates, intervention_status, transformation_hires, erp_systems, reasoning) Re-runnable quarterly to refresh the landscape. Cost: ~Β£3 in Claude tokens per run. intelβ¦4348881
-
Drop mailbox-poll feedback path β web form is the only routeβ
Piers Lyon +1: Claude Opus 4.7 (1M context)Per agreed plan: feedback is captured via the unauth web form on the HF Space (?form=feedback), not via email replies. The Microsoft Graph mailbox poll was blocked anyway by the tenant's Application Access Policy, so leaving it in the cron just produced noisy 403 lines in the logs every run. Changes: - scripts/weekly_hunt_and_email.py β Step 1.5 commented out, with a one-liner explaining how to re-enable if Mail.Read ever lands. - weekly_digest.py footer β drops the "Or just reply to this email" alternative line; the example phrases now read as form-input guidance instead. The downstream recap flow is unchanged. feedback_form._submit() already persists into the same feedback_messages / feedback_signals tables that feedback_digest reads, so the "What you told us last week" header keeps working β just sourced 100% from web form submissions now. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>ffb7a00
-
Closed-loop feedback: recipients reply, system digests, recap surfacesβ
Piers Lyon +1: Claude Opus 4.7 (1M context)Adds a feedback round-trip so each weekly digest learns from the recipient's reply to the previous one. Capture - Every lead in the email gets a stable feedback token (lead-<company-slug>-<isoYYYYwWW>) printed as a small grey tag next to the company name. - A "Help us tune this β just reply" footer is appended to every email body, telling recipients they can either quote a lead token ("lead-bentley-motors-2026w19 β already knew") or write naturally ("more food manufacturing", "loved the FDE theme"). - Reply-To remains the existing ADMIN_EMAIL convention; no recipient workflow change required. Ingest (feedback_ingest.py) - Polls the mailbox via the SAME Microsoft Graph app registration used for sendMail. Requires Mail.Read permission to be granted on the app β fails cleanly with a 403 in logs otherwise (digest still ships, recap section just renders empty). - Mailbox priority: FEEDBACK_INBOX > MS_GRAPH_REPLY_TO > ADMIN_EMAIL > MS_GRAPH_FROM_EMAIL. - For each new reβ¦3395614 -
Lead-gen + market research quality upgrade (Phases 1-4)β
Piers Lyon +1: Claude Opus 4.7 (1M context)Brings digest + briefing output up to the layout and specificity of a manually-researched intel pack: macro context β cross-sector themes β cited reports β company-specific news with quantified facts and exec quotes weaved in. Phase 1 β Extraction - brain.py / news_radar.py prompts now extract quantified_facts (Β£/$ figures, headcount, %, timelines), executive_quotes (named attribution), confidence (official|confirmed|rumour), impact_scope (company_wide|divisional|site_specific|individual). - New signal_facts table + JSON columns on signals_news / signals_jobs. - Wired through hunter.py, council_scanner.py callsites. Existing no-LLM scraped-post paths default to None β backwards compatible. Phase 2 β UK macro pulse - New macro_intel.py: 10 free UK macro feeds (BoE, ONS, BBC, Sky, FT, Reuters, CIPD, Personnel Today, Construction News, Building) β keyword filter β Claude extracts 4-8 quantified weekly indicators with category, value, change, Curium-relevant implication, soβ¦9d92f64
-
Add Adela as third recipient with aggregate (all-team) digest roleβ
Piers Lyon +1: Claude Opus 4.7 (1M context)User wants Adela to receive a full cross-team digest β every team member's leads concatenated into one email so she has visibility across the whole pipeline. Henriette + Stu continue to receive their individual warm-route digests. config.yaml: new digest_role field on team_emails entries. - "individual" (default) β own warm-route leads only - "all" β own leads + every other enabled team member's leads in one email Adela added as digest_role: "all". Pulls from network_graph too β she has 292 LinkedIn connections of her own. weekly_digest.build_aggregate_digest: composes the cross-team email. Recipient's own leads anchor the top, then sections per team member. Empty sections (colleagues with 0 warm-route leads this week) are skipped to keep it scannable. scripts/weekly_hunt_and_email.py: orchestrator dispatches to build_aggregate_digest when role is "all", else build_digest_for_colleague as before. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>11f303e -
Careers-page scraping infrastructure (Greenhouse/Lever/Workday/SR/Personio)β
Piers Lyon +1: Claude Opus 4.7 (1M context)User asked to add direct careers-page scraping for Curium clients. Built the infrastructure as an additive fourth jobs-source phase after Adzuna and the keyword scraper. careers_scraper.py β five public-API fetchers: - Greenhouse (boards-api.greenhouse.io) - Lever (api.lever.co) - Workday (*.myworkdayjobs.com β POST search endpoint) - SmartRecruiters (api.smartrecruiters.com) - Personio XML feed Auto-dispatches to the right fetcher based on URL pattern. Filters to senior + transformation/change/people titles only. Each posting gets the client name attached so it lands in the right collator company record. hunter._hunt_jobs_fast: new Phase 1c calls careers_scraper.run_all_client_careers β walks every curium_clients entry that has an `ats_url` set, fetches that client's senior roles, adds to the same all_jobs pool that Adzuna fills. Same US-signal filter applies (with UK/EMEA carve-out). scripts/discover_ats.py β probes each client name across all 5 ATS platforms with sensibβ¦b48405d -
Add 5 free intel feeds + FTS tenders + HF token diagnosticβ
Piers Lyon +1: Claude Opus 4.7 (1M context)User asked to make the hunt more powerful with free sources. Adds five Tier-1 sources (no API keys, all UK-focused) and a focused FTS tender source β all persist into existing signals_news / signals_tenders tables. intel_feeds.py β new module: β’ Personnel Today RSS (HR, no relevance filter β feed is on-topic) β’ HR Director RSS (HR, no filter) β’ FT Companies RSS (UK board changes / M&A β relevance-filtered) β’ City AM RSS (UK financial news β relevance-filtered) β’ BBC Business RSS (broad UK biz β relevance-filtered) β’ Hansard API (UK Parliament, 6 search terms β public-sector signals) β’ Find a Tender Service (FTS) API β UK above-threshold tenders, keyword + buyer match against Curium target list β’ Trigger-type classifier maps headline+summary into the existing leadership_change / restructure / ma_activity / transformation_ programme / culture_capability / contract_award taxonomy β’ Persistence helpers re-use collator.add_news_signal / add_tender_signal sβ¦5a206c6
-
Fix domain: curium.co.uk β curiumsolutions.comβ
Piers Lyon +1: Claude Opus 4.7 (1M context)The actual Curium tenant uses curiumsolutions.com β the prior references to curium.co.uk were my mistaken assumption from the public website branding. Updated: - config.yaml: company.website + an old example email recipient - mailer.py: docstring example - scripts/setup_gh_secrets.sh: MS_GRAPH_FROM_EMAIL default Caused a spurious 'mailbox not found' error when running New-ApplicationAccessPolicy against the wrong domain. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>27f7662 -
mailer: add Microsoft Graph API transport for M365 service accountsβ
Piers Lyon +1: Claude Opus 4.7 (1M context)User is M365 admin and prefers to keep email sending inside the tenant (data security) rather than using a third-party transactional service. SMTP AUTH is being deprecated by Microsoft and requires a paid mailbox license; Graph API with an Azure AD App Registration is the Microsoft- recommended path: - No SMTP AUTH, no basic auth deprecation risk - Works with a free shared mailbox (no license required) - Application Access Policy can scope the app to one mailbox only mailer.py now auto-picks transport: - 'graph' when MS_GRAPH_TENANT_ID + MS_GRAPH_CLIENT_ID + MS_GRAPH_CLIENT_SECRET + MS_GRAPH_FROM_EMAIL are all set - 'smtp' fallback when SMTP_USERNAME + SMTP_PASSWORD are set - 'none' when neither β send() returns a clear error Graph path uses msal client credentials flow β bearer token β POST /users/{mailbox}/sendMail. Common Graph errors (403 missing Mail.Send / Application Access Policy, 404 mailbox not found, 401 token issues) are surfaced to the caller in the messaβ¦48cb4ed -
mailer: separate SMTP_FROM_EMAIL from SMTP_USERNAMEβ
Piers Lyon +1: Claude Opus 4.7 (1M context)Previously the From-header address came from SMTP_USERNAME, which forced the auth user to also be the visible sender. That breaks for transactional relays (e.g. Resend) where SMTP_USERNAME='resend' but the team wants emails to come from intelligence@curium.co.uk. New SMTP_FROM_EMAIL env var separates the two; falls back to SMTP_USERNAME for the M365 / Gmail case where they're identical. Workflow + setup_gh_secrets.sh updated to handle the new variable. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>37eb301 -
Add scripts/setup_gh_secrets.sh β interactive GH Actions secret setupβ
Piers Lyon +1: Claude Opus 4.7 (1M context)Helper for populating the 14 GitHub Actions secrets the weekly workflow needs. Run locally in Terminal β values are piped to gh secret set via stdin (never on argv), sensitive prompts use read -s (no terminal echo). Prefills defaults from local .env where possible so re-runs are idempotent. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>e09465e -
Weekly Monday hunt + per-colleague email digest (Henriette as test recipient)β
Piers Lyon +1: Claude Opus 4.7 (1M context)End-to-end pipeline: GitHub Actions cron β pull state β run hunt β push state β compose per-colleague emails via Claude β send via SMTP. Configured for ONE recipient initially (Henriette) so the team can validate wording and routing before broadcasting. Adding more recipients is purely a config.yaml + Space-secret edit later. config.yaml β new top-level `team_emails` block. Each entry maps a colleague name (must match the LinkedIn export's `Owner` column) to an email. The `ENV:HENRIETTE_EMAIL` syntax keeps the actual address out of git β resolved at send time from the GH Actions secret. weekly_digest.py β new module: - get_team_emails(): reads config + resolves ENV: indirection - fetch_warm_leads_for_colleague(): joins network_graph (filtered to THIS colleague's connections) with recent signals_jobs / signals_news / signals_tenders, ranks by overall_score + signal density, returns top 12. Each lead carries the colleague's specific contact at that company, pβ¦aea8ae2 -
Add prep_connections.py CLI to dodge HF Spaces upload-size limitβ
Piers Lyon +1: Claude Opus 4.7 (1M context)User reports the in-app upload still does nothing for the 25 MB master XLSX even with maxUploadSize / maxMessageSize raised β HF Spaces' edge proxy silently drops the websocket frame before it reaches Python. Workaround that doesn't require migrating off HF or paying for a bigger tier: convert the XLSX to a slim CSV locally first. The Curium master workbook is mostly inert sheets (pivot tables, message templates, dropdowns); the actual New Data sheet alone is ~5 MB as CSV. - scripts/prep_connections.py: tiny CLI that wraps the existing convert_xlsx_to_csv (with the same sheet auto-detection that prefers movement-tracking sheets) and writes a CSV next to the source. Tested on the real workbook: 25.1 MB XLSX -> 5.1 MB CSV. - app.py: file_uploader help text mentions the script, plus a collapsible "Large XLSX won't upload?" expander with the exact command for admins who hit the silent-drop symptom. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1527bac
-
Add hunt cooldown + last-run timestamp displayβ
Piers Lyon +1: Claude Opus 4.6 (1M context)- All users see 'Last hunt: X ago' caption beneath HUNT NOW button - Same for COUNCIL SCAN - Admin button disables for 60 min after a successful hunt (configurable via HUNT_COOLDOWN_MINUTES / COUNCIL_SCAN_COOLDOWN_MINUTES env vars) - Tooltip shows unlock time when blocked - Scheduled hunt also stamps the timestamp so manual hunts respect it - Failed hunts don't trigger cooldown (allows retry) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>0c6de48
-
Add auth, audit logging, backup/restore, and HF Spaces deploymentβ
Piers Lyon +1: Claude Opus 4.6 (1M context)- Two-tier auth: admin (full access) + viewer (read-only, concurrent sessions) - All Claude-spending buttons gated to admin role (HUNT, drafts, queries) - Append-only JSONL audit log for all significant actions - Scheduled hunt toggle (admin UI) + entrypoint for future automation - Database backup/restore buttons for ephemeral HF Spaces storage - Dockerfile for HF Spaces (Docker SDK, port 7860, non-root user) - Password hash generator script (bcrypt) - Deployment guides for both Azure Container Apps and Hugging Face Spaces Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>560b4ce