Skip to content

Level 1 · Practice and recap

The whole arc runs on a laptop CPU, on the ~5 KB Iris dataset (real flowers, Fisher 1936; public domain). No GPU, no Kaggle token, no sensitive data — zero friction. Use the V1 milestone chip (in the arc) to clone the repo and check out the starting point, then install the project dependencies:

Terminal
uv sync # install deps from pyproject.toml + uv.lock (reproducible)

With the project environment active, reproduce the arc. Each block below is the REAL step from the steps/ script —the same one that builds the published repo, not a hand-written copy—; the “copy” button gives you the exact command. The commands and commit message are the verbatim Spanish artefacts of the repo:

1 · Measure V1 (sepal-only) → RED. Compile the gate contract from froga.yaml and run it. froga run exits non-zero on purpose (red gate), and still signs the evidence:

Compilar el plan de evaluación OSCAL (antes del modelo) Martha
Commands
  • froga compile
  • git add -A
  • git commit -m "compile: assessment plan OSCAL (contrato del gate, antes del modelo)"
Modelo logreg base V1 — escribe Y corre (gate RED esperado) MarthaExpected verdictRED
📍 reproducir iris-v0.1.0-red
git clone https://github.com/Venturalitica/vldemo-iris
cd vldemo-iris
git switch -c try iris-v0.1.0-red
Commands
  • patch: params.patch
  • patch: dvc-evaluate.patch
  • patch: train.patch
  • patch: evaluate.patch
  • patch: compliance-eval.patch
  • froga runmay fail
  • git add -A
  • git commit -m "modelo: logreg V1 solo-sépalo (train/evaluate + dvc.yaml) — run: V1 evidencia base (gate RED esperado; seed=42)"
  • git push -u origin main

2 · Treat the risk and re-measure → GREEN. The treatment is a single versioned change: edit train.py to add petal_length and petal_width to the model’s FEATURES list —the diff below is exactly what you change— and commit it with the message you see, the very one the script uses; in the same step you run the gate again and, with the petals in, macro recall rises and the gate closes green:

Abre la rama de tratamiento + añade las features de pétalo (§6.5) — escribe Y corre (gate VERDE) MarthaExpected verdictGREEN
📍 reproducir iris-v0.2.0-green
git clone https://github.com/Venturalitica/vldemo-iris
cd vldemo-iris
git switch -c try iris-v0.2.0-green
Commands
  • git checkout -b tratamiento/anadir-petalos
  • patch: train-petals.patch
  • froga run
  • git add -A
  • git commit -m "treatment: añade las features de pétalo (las discriminativas) — ISO 23894 §6.5"
  • git push -u origin tratamiento/anadir-petalos
  • froga pr open --base main --title "iris V2: features de pétalo (cierra el gate de recall)"

Each step lands on the same gate colour as its tag: step 080 reproduces iris-v0.1.0-red, step 090 reproduces iris-v0.2.0-green. A nightly CI job re-clones each tag and checks the colour still matches, so the links never quietly rot.

An AI system that is declared, classified, treated, with the signed evidence in git, which closes cleanly GREEN — and a complete ISO 23894 risk loop run on a system that no law touches. The risk was real (versicolor/virginica overlap in sepal space, a fact about the flowers), the treatment was a versioned commit (add the petal features), the residual was confirmed by a passing control (macro recall 0.81 → 0.95), and the approval is a signed act .froga/acts/NNNN-approve.json that only James could produce (signed with his key). Responsibility split as it should: Martha provided and signed the evidence from the CLI; James declared the risk, reviewed and approved from the portal.

We did all of this because it is good engineering, not because anyone forced us. That is Level 1’s whole lesson. In Level 2 the law walks in — a student-selection system that is high-risk under the EU AI Act, whose subjects can be minors — and the honesty gets harder: the blocking gate becomes whether a minor’s data is minimized enough to resist re-identification (GDPR), not model accuracy.

No law applies to a flower classifier. So why run a risk loop on it at all?

Because risk management is good engineering, independent of any legal obligation. The loop is how you discover, on purpose, where your system is weak — here, that a sepal-only model confuses two species — and prove you treated it. Level 1 deliberately picks a system no law touches (flowers, outside the EU AI Act’s Annex III) to make the point unarguable: the method pays off on its own merits. The law arrives in Level 2; the value of the method does not depend on it.

What exactly was the treatment, and why did it turn the gate from RED to GREEN?

The treatment was a code change: adding petal_length and petal_width to the FEATURES list in train.py, so the model also uses the petal measurements. The petal features are the discriminative ones — they separate versicolor from virginica cleanly, whereas the sepal features overlap. With the petals in, macro recall rose from 0.81 (RED, below the > 0.90 gate) to 0.95 (GREEN). Crucially, the change lives in git as a commit, so the engine attributes the risk’s closure to it (the treatment event) and the residual is confirmed by a passing control, not merely declared.

Why does Martha sign but James approve — and could Martha just approve it herself?

They are different responsibilities, enforced by role. Martha (maintainer) treats, measures and signs the technical evidence — her signature proves authorship and integrity. James (owner) is the approval authority: he reviews the evidence and approves, accepting the residual risk. The engine will not count an approval signed with the key that requested it, so Martha cannot approve her own request even if she runs froga approve — the person who produced the evidence is not the one who accepts the risk. The approval is recorded as a DSSE-signed act (.froga/acts/NNNN-approve.json) naming James, not a click in a database.