Feature: configurable report profiles (customer, internal, changes) #140

Open
opened 2026-10-13 21:15:55 +02:00 by michael · 1 comment
Owner

Goal

Reports configurable by file, like the other schemas: which named
blocks, in which order, with which options. Use case: a client asks
"what has the mandate achieved?" -- answer with a ready report.

Prerequisite

DAW/fragjan#139: visibility filter, report model and named blocks.

Profiles

schema: fragjan_report/v1
report_id: kunde
audience: customer          # customer | internal
blocks:
  - critical
  - contradictions
  - dates
  - sections: { history: line }
  - open
  • Standard profiles shipped with fragjan: kunde, intern, changes
  • Packs may ship own profiles (reports/ in the pack)
  • fragjan catalog report <answers> --profile=<id>
  • Profiles select and order existing blocks; no template language

Visibility

  • Profiles describe presentation only. Visibility is decided before
    the renderer (see #139); a profile cannot add data its audience may
    not see
  • audience: internal requires --internal; a confidential pack
    refuses every customer profile

Changes block

  • Lists answers whose current finding differs from an earlier one,
    with before -> after and dates
  • It is a change report, not a success report:
    unclear -> refuted is a recognised risk, confirmed -> refuted a
    possible deterioration
  • A real success report needs impact and measures (template method:
    finding -> impact/risk -> possible measure) -- separate topic

Acceptance criteria

  • fragjan_report/v1 validated; unknown block or option -> error
  • Standard profiles produce the same output as #139 reports
  • Pack profile overrides standard profile with same id
  • Customer profile cannot show statements, follow-ups or
    confidential answers, even if it lists those blocks
  • Fixtures for customer, internal and changes reports
  • Tests pass on Lua 5.1 and 5.4

Out of scope

  • Impact/measures model
  • Labels per language (i18n after common migration)
  • Profiles per mandate

Refs: DAW/fragjan#139

## Goal Reports configurable by file, like the other schemas: which named blocks, in which order, with which options. Use case: a client asks "what has the mandate achieved?" -- answer with a ready report. ## Prerequisite DAW/fragjan#139: visibility filter, report model and named blocks. ## Profiles ```yaml schema: fragjan_report/v1 report_id: kunde audience: customer # customer | internal blocks: - critical - contradictions - dates - sections: { history: line } - open ``` - Standard profiles shipped with fragjan: `kunde`, `intern`, `changes` - Packs may ship own profiles (`reports/` in the pack) - `fragjan catalog report <answers> --profile=<id>` - Profiles select and order existing blocks; no template language ## Visibility - Profiles describe presentation only. Visibility is decided before the renderer (see #139); a profile cannot add data its audience may not see - `audience: internal` requires `--internal`; a confidential pack refuses every customer profile ## Changes block - Lists answers whose current finding differs from an earlier one, with before -> after and dates - It is a change report, not a success report: unclear -> refuted is a recognised risk, confirmed -> refuted a possible deterioration - A real success report needs impact and measures (template method: finding -> impact/risk -> possible measure) -- separate topic ## Acceptance criteria - [ ] `fragjan_report/v1` validated; unknown block or option -> error - [ ] Standard profiles produce the same output as #139 reports - [ ] Pack profile overrides standard profile with same id - [ ] Customer profile cannot show statements, follow-ups or confidential answers, even if it lists those blocks - [ ] Fixtures for customer, internal and changes reports - [ ] Tests pass on Lua 5.1 and 5.4 ## Out of scope - Impact/measures model - Labels per language (i18n after common migration) - Profiles per mandate Refs: DAW/fragjan#139
Author
Owner

Status 2026-10-15

Done:

  • [OK] ad49526 fix(catalog): strip finding basis and note from customer model
  • [OK] b75fb78 feat(catalog): add fragjan_report/v1 profile validator

Findings:

  • Reports should be a generic, declarative mechanism for several
    programs (fragjan, steurjan, raidan, sprengaz), not a fragjan feature
  • Document composition moves to berhtjan:
    DAW/daw-modul-berhtjan-core#18
  • Data contract and fragjan formats go to daw-contracts:
    DAW/daw-contracts#16
  • Profiles need explicit addressing instead of silent override by id
  • Mandate-level definitions are a core case, not out of scope
  • fragjan_report/v1 is not released; schema may still change freely

On hold:

Open nit for the next commit in profile.lua: check_sequence() should
require integer keys 1..n; a table with gaps plus a string key can
pass the #t comparison.

## Status 2026-10-15 Done: - [OK] ad49526 fix(catalog): strip finding basis and note from customer model - [OK] b75fb78 feat(catalog): add fragjan_report/v1 profile validator Findings: - Reports should be a generic, declarative mechanism for several programs (fragjan, steurjan, raidan, sprengaz), not a fragjan feature - Document composition moves to berhtjan: DAW/daw-modul-berhtjan-core#18 - Data contract and fragjan formats go to daw-contracts: DAW/daw-contracts#16 - Profiles need explicit addressing instead of silent override by id - Mandate-level definitions are a core case, not out of scope - fragjan_report/v1 is not released; schema may still change freely On hold: - [ ] Rebuild of render.lua waits for DAW/daw-modul-berhtjan-core#18 - [ ] Profile loading, --profile, changes block: decide after concept Open nit for the next commit in profile.lua: check_sequence() should require integer keys 1..n; a table with gaps plus a string key can pass the #t comparison.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/fragjan#140
No description provided.