# roigen — Changelog

## v1.0.0 — 2026-06-22

Initial release. Phase 3b of the cli.johlem.net consulting layer
(jfind → complymap → dossier → inciclass → **roigen** → tiberscope).

### Purpose

Template, validate, and export the DORA Register of Information per
**ITS 2024/2956**. Five sub-tables:

| Sub-table | Name |
|-----------|------|
| RT.01.01 | Maintaining entity |
| RT.02.01 | ICT third-party service providers |
| RT.03.01 | Contractual arrangements |
| RT.04.01 | ICT services supporting critical / important functions |
| RT.05.01 | Sub-outsourcing chain (optional) |

### Subcommands

```
roigen init    --client "ACME Bank SA" -o roi.toml
roigen add-provider <register> --id <ID> --identifier-type LEI --identifier-value <LEI> --legal-name "<NAME>"
roigen validate <register> [-F human|json]
roigen dryrun   <register> [-F human|json]
roigen export   <register> -F xml|csv|json|jfind [-o out]
```

### Validation

Two kinds of check, run in one pass:

1. **Required fields** — every field listed in the taxonomy's
   `required[]` array must be non-empty on every row. Also enforces
   controlled vocabularies (`entity_type`, `tpp_identifier_type`,
   `ict_service_type`).
2. **Referential integrity** — every `Contract.tpp_id` resolves to a
   `Provider.id`; every `Contract.function_id` resolves to a
   `Function.id`; every `Subcontract.contract_id` resolves to a
   `Contract.id`.

Issues are collected as `Vec<Issue>` so a single run surfaces every
problem at once. Exit 1 on any issue.

### Export formats

| Format | Notes |
|--------|-------|
| `xml`   | Well-formed XML with the ITS 2024/2956 sub-template ids (RT.01.01 … RT.05.01) as element names. v1.0 is XML-shaped like the eventual XBRL submission; v1.1 swaps element names for the official XBRL concept names when the ESA taxonomy is finalised. |
| `csv`   | One section per sub-table, concatenated with a `# RT.NN.NN` header line so operators can paste into Excel. |
| `json`  | Round-trippable canonical JSON. |
| `jfind` | NDJSON: one `jfind/v1` finding per contractual arrangement, `category="third-party-risk"`, severity High for critical contracts / Info otherwise. Pre-fills DORA Art. 28 / Art. 31 controls (always) + Art. 30 + NIS2 Art. 21(2)(d) for critical. Flows directly into complymap / dossier. |

### Vendored taxonomy

`data/roi_taxonomy.json` ships embedded in the binary
(`include_str!`). Extending the catalogue = fork + edit + recompile.
The data IS the source of truth (same principle as
complymap / inciclass).

### Acceptance gate (Phase 3b) — PASSED

Per consulting-layer spec §4.2:

> A sample register with two providers and one critical function
> validates, exports to well-formed XBRL/XML that passes the
> documented schema checks, and `roigen dryrun` flags a deliberately
> broken reference in a second fixture.

Pinned by `acceptance_gate_sample_register_validates_and_exports`:

1. Clean register (2 providers, 1 critical function, 2 contracts)
   → `validate` exits 0 with `[OK]`.
2. `export -F xml` produces XML starting with `<?xml version="1.0"`
   containing all five `<RT.NN.NN>` elements.
3. Broken fixture (CTR-002 → `tpp_id = "TPP-GONE"`) → `dryrun`
   exits 1 and the output contains `contract-tpp-id-dangling`.

### Suite integration

- Library crate (`roigen`) + CLI binary.
- 7 unit tests (taxonomy load, validator) + 13 integration tests
  (CLI behaviour, all formats, acceptance gate). Zero compiler
  warnings.
- Suite-standard exit codes per `SUITE_STANDARDS.md` §1:
  0 ok / clean · 1 validation issues · 2 usage · 3 runtime /
  refused-overwrite / unknown format.
- Mandatory tagline footer on every `--help`:
  `[ roigen ] ─ an independent project by johlem.net`.
- `--full` extended help (suite convention).

### Deferred to v1.1

- True XBRL output (uses the official ESA taxonomy when stable).
- Interactive `add-provider` prompted mode.
- PDF export via `dossier render` integration.
- DORA proportionality lookup (entity type → which fields apply).
