Implement full-text analysis, department impact, and debate context for propositions#604
Draft
Implement full-text analysis, department impact, and debate context for propositions#604
Conversation
…_anforanden in propositions.ts; restore REQUIRED_TOOLS to 4 tools; add Policy Substance, Department Impact, Debate sections Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
…r department analysis Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Enhance propositions with full-text analysis and departmental impact
Implement full-text analysis, department impact, and debate context for propositions
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
propositions.tswas generating articles fromget_propositionermetadata alone — no policy substance, no department context, no debate reactions.REQUIRED_TOOLShad been reverted to 1 tool to silence validation failures caused by the missing implementations.MCP Tool Integrations
search_dokument_fulltext— fetches full policy text for the top proposition; extracts title/summary for a "Policy Substance" sectionanalyze_g0v_by_department— queries a 7-day rolling window of government documents by department; renders a "Department Impact" listsearch_anforanden— retrieves parliamentary speeches mentioning the proposition; renders attributed blockquotes in a "Parliamentary Debate" sectionAll three calls use non-fatal
try/catch— articles generate successfully even when enrichment tools are unavailable.Article Template Additions (
content-generators.ts)Three new sections appended to
generatePropositionsContent(), each with 14-language heading maps and consistent display limits:Data Flow
ArticleContentDataextended withfullTextResults,departmentAnalysis,speechDebatesREQUIRED_TOOLSrestored to full 4-tool list:get_propositioner,search_dokument_fulltext,analyze_g0v_by_department,search_anforandengenerateSources()updated to reflect all 4 toolsTest Coverage
requestandsearchSpeechesonMCPClientREQUIRED_TOOLSassertion, all-tools-called assertion, graceful degradation when enrichment tools throwOriginal prompt
This section details on the original issue you should resolve
<issue_title>Improve Propositions: Add full-text analysis, department impact, and debate context</issue_title>
<issue_description>## 📋 Issue Type
Enhancement — Implement missing MCP tools for government propositions: full-text analysis, department impact, and debate context
🎯 Objective
Implement the three TODO MCP tools in
scripts/news-types/propositions.ts:search_dokument_fulltext(full policy text analysis),analyze_g0v_by_department(government department impact mapping), andsearch_anforanden(parliamentary debate context). These tools will transform proposition articles from basic metadata summaries into comprehensive policy analysis pieces.📊 Current State
scripts/news-types/propositions.ts(401 lines)get_propositioner✅ (only tool)search_dokument_fulltext❌,analyze_g0v_by_department❌,search_anforanden❌get_propositioner) — reduced from original 4 to avoid validation failures🚀 Desired State
🔧 Implementation Approach
1. Add
search_dokument_fulltextintegration (~80 lines)scripts/data-transformers/policy-analysis.tsfor domain detection2. Add
analyze_g0v_by_departmentintegration (~60 lines)3. Add
search_anforandenintegration (~60 lines)4. Update REQUIRED_TOOLS
Restore full 4-tool list:
get_propositioner,search_dokument_fulltext,analyze_g0v_by_department,search_anforanden5. Enhanced article templates
🤖 Recommended Agent
code-quality-engineer— TypeScript implementation matching existing MCP integration patterns✅ Acceptance Criteria
search_dokument_fulltextintegrated for policy substance extractionanalyze_g0v_by_departmentintegrated for department impact mappingsearch_anforandenintegrated for debate context📚 References
scripts/news-types/propositions.ts:49-52(TODO comments)scripts/news-types/propositions.ts:187-196(REQUIRED_TOOLS update comment)search_dokument_fulltext,analyze_g0v_by_department,search_anforandenscripts/data-transformers/policy-analysis.tsscripts/data-transformers/document-analysis.tsscripts/news-types/weekly-review.ts(full enrichment pipeline example)</issue_description>
<agent_instructions>Implement the three TODO MCP tools in scripts/news-types/propositions.ts: search_dokument_fulltext, analyze_g0v_by_department, search_anforanden. Resto...
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.