Skip to main content
Decisions change: a risk team lowers a threshold, a new finding should refer instead of decline, a score should weigh some evidence more. This guide keeps all of that in a configuration, edited from a screen in your application, and applied by a function on every run.

1. Design the rule document

Describe your rules as data. A decision policy and a score model:
namespace
namespace
Keep the defaults in git, next to the workflow, and create them at deploy time without overwriting documents that already exist.

2. Read them in the workflow

3. Apply them in a function

What makes this robust:
  • Validation: a malformed rule document stops the run with a message naming the field, instead of quietly changing outcomes.
  • Safe default: a finding the policy does not list is referred, so a new check can never approve anything on its own.
  • Ignored, not lost: findings set to IGNORE are kept, in ignored, for the record.
  • Self-explaining results: parts and a copy of the model go into every result, so a score can be explained with the rules that produced it, even after the rules change.

4. Give the rules a screen

In your application, an admin page that:
  1. reads both documents (GET /floware/v1/configurations/reviews/<key>);
  2. shows them as forms: a segmented Decline / Refer / Ignore control per finding, number inputs for thresholds and weights, a table for grades;
  3. validates before saving: weights add up, grades start at 0, thresholds in range;
  4. saves with PUT, and shows “applies from the next run”.
Because PUT replaces the whole document and keeps no history, keep a version number inside the document, and log each save in your own table if you need a change history.

5. Explain the result to people

Render the score with its formula built from the stored model, not from code constants, for example “Identity (4) + Documents (3) + Consistency (3)”, with the grade bands. A chat assistant can explain a specific result’s breakdown from the same data. After building it, change a rule in the screen (set one finding to IGNORE, change a weight, rename a grade), run a test case, and check that the result follows. Then restore the defaults.