feat(flow): runnable durchstich-full + jurist approval prompt
Earlier durchstich-full never parsed (inline maps in with:). Rewrite to the runnable step set (normalize/deontic/citations/cohort/frust); skm/benefit stay documented-out pending the SDK json-input path. Give the system.approval step a clear prompt (Studio shows it as the approval-card heading). Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
parent
aabff2b140
commit
a022f3100a
1 changed files with 92 additions and 0 deletions
92
flows/durchstich-full.yaml
Normal file
92
flows/durchstich-full.yaml
Normal file
|
|
@ -0,0 +1,92 @@
|
||||||
|
# Vertikaler Durchstich, Vollversion (so weit heute lauffähig).
|
||||||
|
#
|
||||||
|
# Erweitert durchstich-from-file um die Analyse-Module, deren
|
||||||
|
# Eingaben sich aus vorhergehenden Step-Outputs speisen lassen
|
||||||
|
# (alle als $ref) — Pflichten, Zitationsgraph, Lesbarkeit/Frust.
|
||||||
|
# Das flow.completed-Event trägt damit norm + duties + citations
|
||||||
|
# + frust + cohort, also die Form, die HubRepository.list() in der
|
||||||
|
# Recl∆Im-App in Evaluation-Objekte übersetzt.
|
||||||
|
#
|
||||||
|
# NICHT enthalten: econ.skm_score und law.benefit_score. Beide
|
||||||
|
# Module lesen ihren Tupel-/Ratings-Input über `require_json`,
|
||||||
|
# d.h. sie erwarten ein Payload::Json. In einem Flow lässt sich
|
||||||
|
# ein Json-Wert aber nur aus einem vorhergehenden Step-Output
|
||||||
|
# beziehen — `chain run --input name=value` erzeugt Text,
|
||||||
|
# `--input name=@file` erzeugt Bytes, nie Json, und ein Inline-
|
||||||
|
# Map-Literal in `with:` lehnt der Flow-Parser ab ("expected a
|
||||||
|
# string"). Es gibt heute also keinen Weg, skm/benefit aus CLI-
|
||||||
|
# Inputs zu treiben. Siehe Handoff an chain (json-CLI-Input).
|
||||||
|
# Sobald der Plattform-Fix steht, die skm-/benefit-Steps unten
|
||||||
|
# einkommentieren (Form: `with: { duties: $inputs.duties }` mit
|
||||||
|
# `inputs: { duties: json }`).
|
||||||
|
#
|
||||||
|
# Aufruf:
|
||||||
|
# chain run flows/durchstich-full.yaml \
|
||||||
|
# --input content=@/tmp/gewo-14-mini.xml \
|
||||||
|
# --input cohort_id=berlin-kmu
|
||||||
|
# (pausiert am system.approval-Gate — danach via Hub/Studio
|
||||||
|
# freigeben, dann wird das flow.completed-Event geschrieben.)
|
||||||
|
|
||||||
|
name: durchstich-full
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
content: bytes
|
||||||
|
cohort_id: text
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- id: normalize
|
||||||
|
use: text.akoma_normalize@^0
|
||||||
|
with:
|
||||||
|
content: $inputs.content
|
||||||
|
mime: "application/xml"
|
||||||
|
|
||||||
|
- id: deontic
|
||||||
|
use: text.deontic_extract@^0
|
||||||
|
with:
|
||||||
|
norm: $normalize.norm
|
||||||
|
|
||||||
|
- id: citations
|
||||||
|
use: graph.citation_extract@^0
|
||||||
|
with:
|
||||||
|
norm: $normalize.norm
|
||||||
|
|
||||||
|
- id: cohort
|
||||||
|
use: stats.cohort_size@^0
|
||||||
|
with:
|
||||||
|
cohort_id: $inputs.cohort_id
|
||||||
|
|
||||||
|
- id: frust
|
||||||
|
use: text.readability_score@^0
|
||||||
|
with:
|
||||||
|
norm: $normalize.norm
|
||||||
|
graph: $citations.citations
|
||||||
|
|
||||||
|
# Pending platform json-CLI-input (Handoff → chain). Form, die
|
||||||
|
# nach dem Fix gilt — `inputs:` oben um `duties: json` /
|
||||||
|
# `ratings: json` ergänzen und mit --input duties=… speisen:
|
||||||
|
# - id: skm
|
||||||
|
# use: econ.skm_score@^0
|
||||||
|
# with:
|
||||||
|
# duties: $inputs.duties
|
||||||
|
# - id: benefit
|
||||||
|
# use: law.benefit_score@^0
|
||||||
|
# with:
|
||||||
|
# ratings: $inputs.ratings
|
||||||
|
|
||||||
|
- id: review
|
||||||
|
use: system.approval@^0
|
||||||
|
with:
|
||||||
|
title: "Recl∆Im — Review GewO §14 (Live)"
|
||||||
|
prompt: >-
|
||||||
|
Juristische Freigabe: Stimmen die extrahierten Pflichten, die
|
||||||
|
Zitationen und die Norm-Wiedergabe mit dem geltenden Gesetzestext
|
||||||
|
überein? Quellen siehe Payload. Bei Freigabe gilt die Auswertung
|
||||||
|
als juristisch bestätigt.
|
||||||
|
payload: $normalize.norm
|
||||||
|
|
||||||
|
outputs:
|
||||||
|
norm: $normalize.norm
|
||||||
|
frust: $frust.score
|
||||||
|
cohort: $cohort.cohort
|
||||||
|
duties: $deontic.duties
|
||||||
|
citations: $citations.citations
|
||||||
Loading…
Add table
Add a link
Reference in a new issue