From 10fc002ef9960741356bbf8a53f5c1c2bb0cbde3 Mon Sep 17 00:00:00 2001 From: Sven Geboers Date: Sun, 24 May 2026 22:52:50 +0200 Subject: [PATCH] feat(skill): add score-extremity project-local skill Two-dimensional scoring via subagents: - Stijl-extremiteit: stylistic/inflammatory language (1-5) - Materiele impact: substantive rights/policy impact (1-5) Defines prompt template, output JSON schema, and batch subagent workflow. --- .opencode/skills/score-extremity/SKILL.md | 90 +++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 .opencode/skills/score-extremity/SKILL.md diff --git a/.opencode/skills/score-extremity/SKILL.md b/.opencode/skills/score-extremity/SKILL.md new file mode 100644 index 0000000..a3fe8d4 --- /dev/null +++ b/.opencode/skills/score-extremity/SKILL.md @@ -0,0 +1,90 @@ +--- +name: score-extremity +description: Two-dimensional extremity scoring for Dutch parliamentary motions. Use when scoring policy radicalism along stylistic vs material impact dimensions, or when performing LLM-based analysis of motion text extremity. +--- + +# Two-Dimensional Extremity Scoring + +Score Dutch parliamentary motions on TWO independent dimensions: + +1. **Stijl-extremiteit (stylistic extremity, 1–5):** How inflammatory, harsh, or rhetorically charged is the language? 1 = neutral/technical, 5 = openly hostile/discriminatory language. + +2. **Materiele impact (material impact, 1–5):** How much would this policy actually restrict rights, affect specific groups, or reshape institutions if enacted? 1 = procedural/ministerial request, 5 = fundamental rights restriction or institutional dismantling. + +These dimensions are independent. A motion can be: +- High stylistic, low material: "Alle buitenlanders moeten het land uit!" (inflammatory but legally vacuous) +- Low stylistic, high material: "Het recht op gezinshereniging wordt beperkt tot kerngezin met inkomenseis van 150% minimumloon" (measured language but concretely restricts rights) + +## Scoring Prompt + +```text +Beoordeel de volgende motie op TWEE onafhankelijke dimensies: + +MOTIE: +Titel: {title} +Tekst: {text} +Vereenvoudigde uitleg: {layman} + +1) STIJL-EXTREMITEIT (1-5): +Hoe fel/opruiend/geladen is het taalgebruik? Let op woordkeuze, toon, en retorische middelen. +1 = neutraal/technisch/ambtelijk, 3 = stellige politieke taal/waardeoordelen, 5 = vijandig/discriminerend/haatdragend taalgebruik. + +2) MATERIELE IMPACT (1-5): +Hoe ingrijpend is het voorgestelde beleid als het wordt uitgevoerd? Wie wordt geraakt en hoe? +1 = procedureel/symbolisch/verzoek aan minister, 3 = concrete beleidswijziging met meetbare gevolgen, 5 = fundamentele inperking van rechten/ontmanteling van instituties/grootschalige uitsluiting. + +Geef voor elke dimensie een score van 1-5 en een korte toelichting in het Nederlands. +``` + +## Output Schema + +Return a JSON object with this structure: + +```json +{ + "stijl_extremiteit": 3, + "stijl_toelichting": "Gebruikt termen als 'massa-immigratie' en 'tsunami' maar niet direct discriminerend", + "materiele_impact": 4, + "materiele_toelichting": "Beperkt recht op gezinshereniging tot kerngezin met verzwaarde inkomenseis" +} +``` + +Field constraints: +- `stijl_extremiteit`: integer, 1–5 +- `stijl_toelichting`: string, Dutch, 1–3 sentences +- `materiele_impact`: integer, 1–5 +- `materiele_toelichting`: string, Dutch, 1–3 sentences + +## Batch Scoring + +When scoring multiple motions at once, return a JSON array: + +```json +{ + "motions": [ + { + "motion_id": 123, + "stijl_extremiteit": 3, + "stijl_toelichting": "...", + "materiele_impact": 4, + "materiele_toelichting": "..." + } + ] +} +``` + +## Subagent Workflow + +The orchestrator spawns subagents (deepseek v4 flash) to score motions in batches: + +1. Read this skill file to get the prompt template and schema +2. Query the stratified sample from `right_wing_motions` JOIN `extremity_scores` +3. Format batches of 10 motions each +4. For each batch, spawn a subagent (`task` tool, subagent_type: general) with: + - This skill's prompt template filled with the 10 motions' text and layman explanations + - The output schema as the expected return format + - Instruction to return valid JSON matching the `motions` array schema +5. Collect results, validate against schema, store in `extremity_scores_2d` table +6. Compute Pearson r between `stijl_extremiteit` and `materiele_impact` + +Batch dispatch is parallel: all 10 subagents (for 100 motions) can be spawned simultaneously since they have no inter-dependencies.