Normative specification. Module 5 detects official US government policy events (tariffs, trade restrictions, export controls, spending, subsidies, tax, regulation, antitrust, government shutdown) and scores their direct effect on sectors, industries, sub-industries and named companies on a −2…+2 scale. It authenticates the source, fixes the legal stage and dates, maps exposure, checks the market reaction, computes confidence and risk, and emits affected-scope trading restrictions. It does not select a stock/ETF, generate an entry/stop/target/order, close a position, or score the broad market — those belong to the sibling specialist modules, Output 2, and the trading bot. Its broad-market directional contribution is always 0.
Implementation target (not yet built): routes/module5.py → snapshots/module5.json
(+ a stateful event store .data/module5_events.db), surfaced in a "Module 5" navbar
view. It is the general-policy counterpart to Module 4 (Trump/executive actions); Module 4
owns any Trump-specific event and Module 5 assigns it 0 and stops.
Implementation note (v1 ceilings). The Part 4 scoring is pure arithmetic, but its inputs (source authentication, stage classification, provision separation, entity/exposure mapping, dedup) require NLP the spec assumes upstream. The intended split is an LLM extraction pass (
agents/skills/module5_extract.md) that fills the Part 2 structured record, then a deterministic scorer (Parts 4/9) that turns it into points and restrictions with zero model calls. See Section Two — Implementation options and concerns below; that boundary is the whole design. The controlling official-source feeds (Federal Register, Congress.gov, USITC, USTR/CBP, BIS, CBO/JCT, USAspending, RegInfo/OIRA, DOJ/FTC — Part 3.1) are not integrated today, so v1 caps confidence low until they exist. Cross-module handoffs (Part 10) are placeholders until sibling modules exist.
CALCULATION_TIMESTAMP_UTC (ISO 8601 UTC); CURRENT_TIME_ET (with DST); RUN_TYPE (SCHEDULED | EVENT_TRIGGERED | MANUAL | RECALCULATION); CALCULATION_VERSION; GLOBAL_DATA_STATUS_IN (VALID | DEGRADED | INVALID); NEW_ENTRY_STATUS_IN (ALLOWED | RESTRICTED | PAUSED); ACTIVE_RESTRICTION_LIST_IN.
POLICY_EVENT_ID; LEGAL_INSTRUMENT_ID (bill no. / Federal Register doc no. / docket / proclamation / tariff action no.); PROVISION_ID; SOURCE_DOCUMENT_ID; EVENT_OWNER_MODULE; TRUMP_SPECIFIC_EVENT_FLAG; POLICY_CATEGORY (GENERAL_TARIFF | COUNTRY_TARIFF | EXPORT_CONTROL | TECHNOLOGY_RESTRICTION | STEEL_TARIFF | ALUMINIUM_TARIFF | AUTO_TARIFF | RETAIL_IMPORT_RESTRICTION | ENERGY_POLICY | ENVIRONMENTAL_POLICY | DEFENCE_SPENDING | INFRASTRUCTURE_SPENDING | TAX_POLICY | SUBSIDY | INDUSTRIAL_POLICY | FISCAL_LEGISLATION | REGULATION | ANTITRUST | GOVERNMENT_SHUTDOWN); EVENT_LABEL_LIST.
ISSUING_AUTHORITY; ISSUING_AGENCY; JURISDICTION_LEVEL (US_FEDERAL | US_STATE | US_LOCAL | FOREIGN); OFFICIAL_SOURCE_TYPE; OFFICIAL_SOURCE_URL; OFFICIAL_SOURCE_PUBLICATION_TIMESTAMP; OFFICIAL_DOCUMENT_STATUS; SOURCE_REVISION_NUMBER; SUPERSEDED_DOCUMENT_ID.
ANNOUNCEMENT_TIMESTAMP; PUBLICATION_TIMESTAMP; INTRODUCTION_DATE; COMMITTEE_APPROVAL_DATE; HOUSE_PASSAGE_DATE; SENATE_PASSAGE_DATE; SIGNING_DATE; LEGAL_EFFECTIVE_DATE; COMPLIANCE_DATE; FUNDING_APPROVAL_DATE; FUNDING_RELEASE_DATE; ENFORCEMENT_DATE; EXEMPTION_DATE; REVIEW_DATE; EXPIRY_DATE; SUNSET_DATE; DELAY_DATE; SUSPENSION_DATE; COURT_DECISION_DATE; REPEAL_DATE; CANCELLATION_DATE.
AFFECTED_COUNTRY_LIST; RETALIATING_COUNTRY_LIST; HTS_CODE_LIST; ECCN_LIST; PRODUCT_CATEGORY_LIST; FINISHED_GOOD_FLAG; PRODUCTION_INPUT_FLAG; FORMAL_EXCLUSION_LIST; FORMAL_EXEMPTION_LIST; QUOTA_LIST.
EXISTING_TARIFF_RATE_PCT; ADDITIONAL_TARIFF_RATE_PCT; FINAL_TARIFF_RATE_PCT; AFFECTED_IMPORT_VALUE_USD; AFFECTED_EXPORT_VALUE_USD; US_CONSUMPTION_VALUE_USD; DOMESTIC_PRODUCTION_VALUE_USD; REPLACEMENT_CAPACITY_12M_PCT; RETALIATION_REVENUE_SHARE_PCT; TARIFFED_INPUT_COST_SHARE_PCT; REVENUE_EXPOSURE_PCT; COST_EXPOSURE_PCT; IMPORT_EXPOSURE_PCT; EXPORT_EXPOSURE_PCT; PRODUCTION_CAPACITY_EXPOSURE_PCT; CRITICAL_DEPENDENCY_FLAG.
ANNOUNCED_AMOUNT_USD; AUTHORISED_AMOUNT_USD; APPROPRIATED_AMOUNT_USD; ALLOCATED_AMOUNT_USD; OBLIGATED_AMOUNT_USD; ACTUAL_AWARD_AMOUNT_USD; FIRST_12_MONTH_AMOUNT_USD; SPENDING_CUT_AMOUNT_USD; PROGRAMME_RECIPIENT_LIST; ELIGIBILITY_RULE_PUBLISHED_FLAG; AUTHORISATION_STATUS; APPROPRIATION_STATUS; ALLOCATION_STATUS; OBLIGATION_STATUS.
OFFICIAL_TAX_ESTIMATE_USD; FIRST_12_MONTH_TAX_EFFECT_USD; INDUSTRY_AFTER_TAX_EARNINGS_CHANGE_USD; TAX_CREDIT_AMOUNT_USD; TAX_DEDUCTION_AMOUNT_USD; TAX_PROVISION_SCOPE (INDUSTRY_SPECIFIC | BROAD); TAX_EFFECTIVE_DATE.
REGULATORY_IDENTIFICATION_NUMBER; RULE_STAGE; ANNUAL_COMPLIANCE_COST_USD; ANNUAL_COST_SAVING_USD; ANNUAL_DIRECT_BENEFIT_USD; OFFICIAL_ECONOMIC_ANALYSIS_AVAILABLE_FLAG; OPERATING_LICENCE_AFFECTED_FLAG; MARKET_ACCESS_AFFECTED_FLAG; OIRA_REVIEW_STATUS; OIRA_ECONOMICALLY_SIGNIFICANT_FLAG.
ANTITRUST_CASE_ID; ANTITRUST_ACTION_STAGE; TARGET_COMPANY_LIST; TARGET_COMPANY_TICKER_LIST; TARGET_COMPANY_MARKET_SHARE_PCT; TARGET_COMPANY_INDUSTRY_REVENUE_SHARE_PCT; INDUSTRY_WIDE_PRACTICE_FLAG; FINAL_JUDGMENT_FLAG; STRUCTURAL_REMEDY_FLAG; PROHIBITED_PRACTICE_FLAG; COMPETITOR_MARKET_ACCESS_GAIN_PCT.
FUNDING_EXPIRY_TIMESTAMP; SAME_FUNDING_TEXT_PASSED_HOUSE_FLAG; SAME_FUNDING_TEXT_PASSED_SENATE_FLAG; FUNDING_ENACTED_FLAG; SHUTDOWN_START_TIMESTAMP; SHUTDOWN_END_TIMESTAMP; AFFECTED_AGENCY_LIST; INDUSTRY_FEDERAL_REVENUE_SHARE_PCT; CRITICAL_GOVERNMENT_SERVICE_DEPENDENCY_FLAG.
SECTOR_ID; INDUSTRY_ID; SUB_INDUSTRY_ID; BUSINESS_ACTIVITY_ID; COMPANY_NAME; COMPANY_TICKER; INDUSTRY_TRAILING_12M_REVENUE_USD; INDUSTRY_ANNUAL_OUTPUT_USD; INDUSTRY_TRAILING_12M_EARNINGS_USD; COMPANY_TRAILING_12M_REVENUE_USD; COMPANY_POLICY_EXPOSURE_USD; DIRECT_EXPOSURE_REASON; EXPOSURE_DATA_TIMESTAMP.
REACTION_INSTRUMENT_ID; REACTION_INSTRUMENT_REFERENCE_PRICE; REACTION_INSTRUMENT_END_PRICE; SPY_REFERENCE_PRICE; SPY_END_PRICE; EVENT_WINDOW_VOLUME; PRIOR_20_SESSION_MEDIAN_SAME_WINDOW_VOLUME; REGULAR_SESSION_OPEN_TIMESTAMP; REGULAR_SESSION_CLOSE_TIMESTAMP.
POLICY_EVENT_ID; EVENT_OWNER_MODULE; TRUMP_SPECIFIC_EVENT_FLAG; OFFICIAL_SOURCE_URL or official doc identifier; POLICY_STAGE; LEGAL_STATUS; AFFECTED_PRODUCT/INDUSTRY/COMPANY; ECONOMIC_IMPLEMENTATION_DATE (when active); exposure numerator; exposure denominator; direction of the direct effect. Missing a critical field prevents the affected directional calculation.
One controlling provider per field. Do not average conflicting legal statuses; do not combine two tariff classifications for one product; do not mix incompatible accounting periods; do not mix industry denominators from different taxonomies in one calc. A legal source and an economic-data source may differ (they control different fields).
Do not estimate legal status; do not invent exposure %; do not carry forward a stale tariff rate; do not substitute a classification; do not infer effectiveness because a date passed; do not infer distribution because funding was authorised. Preserve unaffected valid outputs; assign 0 to the incomplete calc; set affected confidence INVALID when the missing field is critical; pause affected new entries when the gap could materially change trading risk.
Same event = same legal instrument + provision + issuing authority + covered products/activity + effective action. Different news reports / different labels do not create different events. A later amendment replaces only the affected provision (no extra score for superseded wording).
Every applicable: announcement, publication, vote, signing, court decision, effective, funding, compliance, enforcement, exemption, review, expiry, delay, suspension, repeal, cancellation.
One POLICY_EVENT_ID per law; one PROVISION_ID per separately-funded/legally-distinct provision; calculate each provision only for its actual recipients; never score the whole law again after its provisions; attach labels without extra points.
Distinct economic mechanisms only: revenue loss/gain; input-cost increase/reduction; import-sourcing restriction; export-market restriction; production-capacity effect; government-funding effect; tax effect; compliance-cost effect; market-access effect. Same exposure base + mechanism counted once. EVENT_GROUP_RAW_POINT = sum of distinct channel points, capped −2…+2.
Use the measure connected to the mechanism (export restriction → export/foreign-revenue share; input tariff → tariffed input-cost share; import restriction → sourcing/import share; production restriction → production-capacity share; finished-product tariff → imported-sales / competitive-import share). Thresholds (unrounded): < 10% → 0; 10–<20% → 1; ≥ 20% → 2. Loss of a required licence / principal product / critical market / irreplaceable input → −2 regardless of %.
Tariff directly covers competing imports; affected imports ≥ 20% of US consumption; domestic producers can replace ≥ 10% of affected import volume within 12 months; tariffed imported inputs < 10% of domestic producer costs; foreign revenue exposed to retaliation < 10%. Any FALSE/missing → 0. Tariff protection alone cannot produce +2.
BIS + controlling legal docs; use directly affected revenue/shipments/licences/capacity/sales. < 10% → 0; 10–<20% → −1; ≥ 20% → −2. Loss of critical licence / principal-product prohibition → −2 and CRITICAL_DEPENDENCY_FLAG TRUE. A domestic competitor gets no positive point merely because a foreign rival is restricted — a positive point needs a separate measurable subsidy, procurement award or market-access benefit.
Primary steel/aluminium producers → max +1 under domestic-beneficiary conditions. Downstream metal users → 10%/20% cost-exposure thresholds. Auto makers combine finished-vehicle import exposure + imported-component exposure + retaliatory foreign-revenue exposure. HQ location does not determine domestic-production status. Retail/apparel use total sourcing exposure across all affected countries: < 10% → 0; 10–<20% → −1; ≥ 20% → −2.
DIRECT_POLICY_AMOUNT_PCT = FIRST_12_MONTH_DIRECT_POLICY_AMOUNT / (INDUSTRY_TRAILING_12M_REVENUE
or INDUSTRY_ANNUAL_OUTPUT) × 100. Use revenue for revenue effects, output for production;
don't switch denominators mid-calc. < 1% → 0; 1–<5% → ±1; ≥ 5% → ±2.
Proposed → 0. Authorised not appropriated → 0. Appropriated not allocated → compute, move one level toward zero. Enacted+funded+directed to identifiable recipients → full. Actual obligations/awards → confirm implementation. Cuts/rescissions → same thresholds, negative. A company-specific contract → company alert but normally 0 industry points unless the programme benefits multiple participants or total value ≥ 1% of annual industry revenue.
INDUSTRY_AFTER_TAX_EARNINGS_IMPACT_PCT = FIRST_12_MONTH_AFTER_TAX_EARNINGS_CHANGE /
INDUSTRY_TRAILING_12M_EARNINGS × 100. |impact| < 2% → 0; 2–<5% → ±1; ≥ 5% → ±2. If industry
earnings ≤ 0 → invalid %, assign 0, TAX_IMPACT_DATA_STATUS = INVALID. Credits/deductions acting
as subsidies use the 1%/5% revenue thresholds. Broad, non-allocable provisions → 0 Module-5
points; pass raw effect to the specialist module.
Eligibility rules published; funding legally authorised; funding appropriated; amount measurable; recipient industry identifiable; implementation period known. Any fail → 0. Removal of an existing subsidy/credit/preference → same thresholds, negative.
REGULATORY_COST_BENEFIT_PCT = annual direct industry cost/saving/benefit / industry annual
revenue × 100. < 1% → 0; 1–<5% → ±1; ≥ 5% → ±2. Loss of a critical operating licence / legal
market access → −2 regardless of %. OIRA classification changes monitoring priority only (no
directional point). "Deregulation" earns a positive point only with a measurable saving/benefit.
Create for any official negative Module-5 action on a named company (antitrust, fine/penalty, export restriction, import ban, sanctions, contract cancellation, subsidy/tax-benefit loss, regulatory restriction, environmental enforcement, product prohibition, merger challenge, market-access loss). Risk: < 10% & no critical dependency → LOW; 10–<20% → MODERATE; ≥ 20% → HIGH; critical licence/principal product/essential market/irreplaceable input → CRITICAL; exposure unavailable → UNDETERMINED, LOW confidence. The alert does not create an automatic trade.
DAYS_TO_FUNDING_EXPIRY = FUNDING_EXPIRY_DATE − CURRENT_DATE (calendar days). In order:
1. Expired & replacement not enacted → ACTIVE_SHUTDOWN.
2. 0–2 days pre-expiry & same text not passed both chambers → HIGH.
3. 3–7 days & same text not passed both chambers → ELEVATED.
4. 8–14 days & funding not enacted → WATCH.
5. > 14 days → NORMAL.
Formal delay ≥ 7 days → suspend future structural impact until the new date. Court/agency stay → structural 0 while active. Partial exemption → recompute remaining covered exposure. Full repeal/cancellation → remove structural impact. Reversal overlay → max opposite magnitude 1. Appeal → does not restore structural impact unless the action stays legally operative during appeal.
STRUCTURAL_POLICY_IMPACT_POINT = full direct point only when the policy is legally effective, funded (where applicable), enforceable, exposure data valid, and not stayed/blocked/repealed/ excluded. Otherwise use the stage-adjusted point.
Formal proposal → max 3. Bill passage / final rule → max 5. New effective action → max 5. Formal delay/exemption → max 2. Full cancellation → max 3.
COMBINED_EVENT_IMPACT_POINT = STRUCTURAL_POLICY_IMPACT_POINT + ADJUSTED_ANNOUNCEMENT_OVERLAY_POINT,
capped −2…+2. A temporary opposite reaction may reduce the announcement point toward zero; it may
not reverse the structural point without an official reversal.
SECTOR_RETURN_PCT = sectorETF_end/ref − 1 ×100; SPY_RETURN_PCT = SPY_end/ref − 1 ×100;
RELATIVE_RETURN_PCT = SECTOR − SPY. EVENT_WINDOW_RVOL = event-window volume / median same-clock
volume over prior 20 completed regular sessions. Confirming: |rel return| ≥ 1.00% in predicted
direction and RVOL ≥ 1.50. Opposite: |rel return| ≥ 1.00% against and RVOL ≥ 1.50. Else
NEUTRAL_OR_UNCONFIRMED.
When event is < 09:30 ET, > 16:00 ET, or < 60 regular minutes remain: measure the first 30 regular-market minutes after the next open and the next regular-session close. Confirming: first-30-min rel return ≥ 1.00% in predicted direction + first-30-min RVOL ≥ 1.50 + closing rel return stays in direction. Opposite = equivalent inverse. All else neutral/conflicting.
Confirming → REACTION_CONFIDENCE_SCORE = 100, add no policy points. Neutral/unavailable/mixed → 50, no change. Opposite → 0, move announcement overlay one level toward zero, do not change the structural point. (Direct sector-performance scoring stays outside Module 5.)
CONFIDENCE_PCT = SOURCE×40% + IMPLEMENTATION×25% + EXPOSURE×25% + REACTION×10%.Unexpected action; becomes effective during regular hours; |combined impact| == 2; sector/industry identifiable. → Pause new entries in the affected group 60 min; request cancel of unfilled entry orders; require verification of final legal details; require one completed 30-min regular bar; existing positions unchanged. Outside regular hours → no new entry in the group before 10:00 ET next regular day.
Dedupe before scoring; one legal action's product/country labels stay one event; separate independent legal actions may combine. Sum independent active points per sub-industry, cap −2…+2; aggregate into industry, cap −2…+2. If an industry has both signs of non-zero sub-industry points → INDUSTRY_MIXED_FLAG TRUE, preserve separate points. If a sector has both signs of non-zero industry points → SECTOR_MIXED_FLAG TRUE, FINAL_SECTOR_POINT = 0. Only-positive → sum capped +2; only-negative → sum capped −2. Equal positive and negative totals → 0, MIXED_POLICY_STATUS TRUE (not NEUTRAL).
IS_MODULE_4_EVENT (Trump flag TRUE or owner==4); IS_DUPLICATE_EVENT; IS_OFFICIAL_POLICY; IS_ACTIVE_POLICY (effective+funded+enforceable+not stayed); IS_CRITICAL_DEPENDENCY_LOSS; IS_FORMAL_PROPOSAL; IS_ENACTED_NOT_ACTIVE; IS_DIRECTLY_EXPOSED (exposure ≥ 10% or critical); IS_INDUSTRY_WIDE_ANTITRUST (≥ 20% revenue/share); IS_CONFIRMING_REACTION; IS_OPPOSITE_REACTION; IS_UNEXPECTED_EFFECTIVE_SHOCK (|impact|==2); IS_MIXED_INDUSTRY; IS_MIXED_SECTOR; HAS_EXISTING_PAUSE (NEW_ENTRY_STATUS_IN==PAUSED); HAS_CRITICAL_DATA_FAILURE.
MODULE_5_BROAD_MARKET_DIRECTION_POINT = 0. Inflation/growth/consumer/yield/
commodity effects pass to specialist modules, not scored here.1 read run-control → 2 preserve inherited pauses → 3 validate sources+economic data → 4 stop affected calcs on invalid critical data → 5 assign ownership → 6 exclude Module 4 → 7 remove duplicates → 8 separate provisions → 9 store trading-relevant dates → 10 stage+legal status → 11 economic implementation date → 12 map sectors/industries/sub-industries/companies → 13 tariff/trade exposure → 14 spending/subsidy/industrial → 15 tax → 16 regulation/antitrust → 17 shutdown risk → 18 raw points → 19 stage treatment → 20 structural impact → 21 announcement overlay → 22 market-reaction confirmation → 23 announcement reduction on conflict → 24 confidence → 25 policy risk → 26 sector restrictions → 27 company alerts → 28 aggregate sub-industry/industry → 29 mark mixed → 30 cap all −2…+2 → 31 broad-market contribution 0 → 32 handoff packets → 33 Output 1 → 34 final trade decision NOT_PRODUCED → 35 trade approved FALSE → 36 order generated FALSE.
Module 5 must not: select a stock; generate a long/short entry; place, close, reduce or reverse a position; change a price-based stop; set a stock target; decide final sector selection or portfolio size; cancel another module's pause; score inflation/growth/yields/commodities; count a Trump-specific action; count one policy twice via multiple labels; treat a media statement as proof of help/harm; treat an announcement as proof a policy is economically active.
Structured output with: identification (module no/name, version, UTC+ET timestamps, run type); event identification (IDs, category, labels, authority, jurisdiction, owner, exclusion/duplicate flags); source & reliability (source type/doc id/timestamp, DATA_STATUS, age, missing/stale/ conflict lists, failure reason, partial status); status & dates (stage, legal status, all key timestamps, court-stay/delay/repeal status, trading-relevant date list); coverage & exposure (countries, products, HTS/ECCN, sector/industry/sub-industry/business-activity/company lists + tickers, DIRECT_EXPOSURE_PCT + reason, critical-dependency flag); amounts (tariff rates, import/ export values, first-12-month spending/subsidy/tax/compliance, actual obligated/award); calculation outputs (raw channels, raw/stage-adjusted/structural/announcement/adjusted-announcement/combined points, relative return, RVOL, reaction status, the four sub-scores, confidence %); final market-group results (groups helped/harmed, final sector/industry/sub-industry/business-activity impact lists, mixed flags, MIXED_POLICY_STATUS, broad-market point = 0); company alerts (per company: name, ticker, action, activity, exposure %, risk, confidence, start, expected duration, industry-wide flag); risk & permission (policy risk, shutdown status/duration, hard-risk warning, new-entry status, restriction scope, max local size multiplier, leveraged-overnight status, unfilled- order action, restriction start/end, resumption condition, inherited-pause status); handoffs (per destination: raw/calculated/not-scored fields, status, missing fields, double-counting control, handed-off directional points = 0); trading-bot status (final trade decision NOT_PRODUCED_BY_MODULE_5, trade approved FALSE, order generated FALSE, stock selected FALSE, final sector selected FALSE, ready- for-Output-2 TRUE only when valid); audit (formula/threshold/source lists, excluded/superseded/ duplicate lists, revision + restriction history, next recalculation time).
(This section is Beyond Markets engineering analysis, not part of the normative spec.)
Module 5 is a component of a different kind of system than the current Beyond Markets report pipeline: a deterministic, multi-module auto-trading engine (Module 4 = Trump events; siblings for inflation/growth/consumer/yield/energy/geopolitical/company-risk; an "Output 2" aggregator; a downstream trading bot that actually places orders). Overlap and gaps:
| Module 5 concept | Beyond Markets today | Fit |
|---|---|---|
| Method: deterministic rules, fixed thresholds | 11 LLM agents, prose reports | opposite paradigm |
| Output: −2…+2 points + handoff packets | Human-read markdown per request | no scoring layer |
| Consumer: automated trading bot | Swing pipeline (trade_db → Alpaca bracket) |
adjacent, not wired |
| Trading restrictions (PAUSED, size mult, shock pause) | _position_cap, get_active_symbols, propose loop |
our gating is caps/dedup, not policy-driven |
| Market-reaction confirmation (sector ETF vs SPY, RVOL) | Polygon aggregates exist; no engine | buildable from current tools |
| Macro/policy backdrop | snapshots/dashboard.md regime + geopolitical_risk agent |
same domain, softer form |
It is the deterministic sibling of what the geopolitical_risk + macro_outlook/
market_brief reports do qualitatively today.
The module does two different jobs, split exactly at the Part-2 parameter boundary:
Hard rule: a model must never emit the final score. The deterministic back-end exists so that a ±2 that pauses live trading is: - reproducible — same event → same score → unit-testable, diffable across revisions; - safe where the spec forbids inference — "don't infer effective because the date passed", "don't estimate missing legal status" are exactly where an LLM hallucinates; - cheap on the hot path — 2-minute freshness during market hours means constant re-scoring; deterministic is instant/free, LLM is slow and expensive per tick.
Making the whole module non-deterministic is more prompt work and a worse result, so it is
not even the lazy option. This mirrors Module 4's own note: pure-arithmetic scoring behind an
agents/skills/module4_extract.md NLP pass.
Module 5's entire premise is authoritative official sources, and we integrate almost none:
- Have: SEC EDGAR (get_sec_submissions), FRED, FMP, Polygon/Massive, Alpaca, news feeds.
- Missing (every controlling source in Part 3.1): Federal Register, Congress.gov, USITC
DataWeb, USTR/CBP, BIS Entity List, CBO/JCT, USAspending, RegInfo/OIRA, DOJ/FTC.
So even a perfect deterministic core can't run — there's no ingestion for the legal instruments it validates against. That is ~9 new government-API integrations, a large surface separate from the market-data vendor work. Until it exists, v1 caps OFFICIAL_SOURCE_SCORE / IMPLEMENTATION_CERTAINTY low and most events stay WATCH/INVALID.
routes/module5.py, snapshots/, .data/module5_events.db) —
ships via the normal rsync; snapshots/ and .data/ are already deploy-excluded (server-
owned), so a fresh prod generates them at runtime.geopolitical_risk agent (stage / exposure / ±2 / confidence per group), scored by
a small deterministic Python function. ~80% of the value, days not months, no new gov APIs.
This is the hybrid boundary above, minimally realised.Recommendation: LLM extraction → deterministic scoring (Path A now, Path B if/when the auto-trader and gov-source feeds are built). Start with the market-reaction slice + a chosen taxonomy/ETF map; keep every Part 15 item and every gov-source dependency as named ceilings.