← All work

Public sector · permit data

Permit data pre-filled from the sources

A ministry asked for every data field an applicant submits for 38 permits. The fields were collected by script from legislation, application forms and the client portal's e-forms, and every row carries its source. Domain specialists only confirmed and corrected, and everyone could see progress in one view.

Problem

A ministry sent the agency a spreadsheet: confirm 38 permits, correct channels and register holders, and write out every data field an applicant submits for each permit. The deadline was five working days. The permits spanned seven domains, each with its own laws, forms and the few people who know them. The usual route — spreadsheet sent round, everyone fills in their rows, someone merges versions — yields three divergent files by the deadline, half the rows empty, and no idea who has even started.

There was also a substantive question: were all 38 permits in scope at all? Some of them are, in their special law, expressly tied to the general code on economic activities and belong to a different mapping exercise. That could not be judged from names, only from the legal text.

What is different

Pre-fill before confirmation. Data fields were not requested from people on a blank page; they were collected by script from public sources — the consolidated texts in the State Gazette, the application forms on the agency's website, and the configuration of the client portal's e-forms — and placed in front of the validator with a source reference. The human task became confirming and correcting, not writing.

One shared state. Every permit has an owner, every owner has a list and a progress bar, and everyone sees everyone's progress in real time. The admin can see who has not started, who is halfway and who is done, and remind people individually as the deadline approaches instead of writing to all.

Working with habits, not against them. Anyone who did not want to click through the app could email a plain-text summary; the app parses it and attaches the results to the right permits. The outcome lands in the same database regardless of the route taken.

Scope checked by fact, not opinion. Each permit's special law was checked for a direct reference to the general code. Eight had one and were flagged as disputed, with the paragraph anyone can open and verify.

Pre-fill from sources, let people confirm.
Every data field carries its source; mandatoriness is graded, not yes/no.
Two rounds in one table: the agency's proposal, the ministry's decision, the added fields.
The mapping in numbers.

What was actually done

  1. Legal landscape. For each of the 38 permits the consolidated text of the special law was read through the State Gazette's public API and the reference written down to paragraph and subsection: the legal basis, the provision listing the data required in the application, and — where present — the direct reference to the general code on economic activities. The latter produced the scope dispute on eight permits. Website references were checked the same way; one pointed to a regulation that does not exist.
  2. Application channels. For each permit it was established from the agency's website and portal how it is actually applied for (portal, form by email, competition, training, EU system), and the ministry's pre-filled channel corrected where it did not match.
  3. Client portal e-forms. Portal sessions were recorded as HAR files, from which the service catalogue (108 services), form steps, field labels and validation rules were extracted (from translation files and configuration). Forms that open only when starting an application were opened to the first step with a browser agent while recording traffic; the data models of one system's forms were harvested by a console script that creates a draft, reads the model and deletes the draft. Pre-fill sources (authentication, business register, population register, client register) and mandatoriness thus came from the validator's rules, not from guesswork.
  4. Forms. Application forms from the website (doc, docx, xlsx, pdf; 21 in the first round, 5 in the second) were downloaded and parsed into fields by program; each field kept its source note.
  5. Permits without a form. Where no application form exists, the data composition was written out directly from the act or regulation, with the provision cited.
  6. Two rounds, two formats. First response: 38 permits, level 1 (name, code, address, contacts, representative) complete for all, and permit-specific fields with graded mandatoriness. The ministry split rows into atomic ones (659 rows) and accepted 9 of 17 proposals; the second response added those in the same atomic form (256 rows), including fields from EU regulation annexes and register statutes.
  7. Auditability. A methodology annex went with the cover letter, and an internal audit document with prompts, scripts and reliability grades, so every row can be traced back to its source.

Invisible layers

The data model is five tables: permits (with the data fields as a JSON array, each field carrying a name, explanation, pre-fill and mandatory markers), validators, assignments (who owns what), validations (status ok / needs change, notes, optional field overrides and extra fields) and delegations. Statuses and assignments sync in real time, so progress bars move on every screen at once.

Roles come from row-level security in the database: each signed-in user is matched to a validator record by email; only that validator or the admin can change the status of their permits; assignments and access are admin-only; delegation is only possible in one's own name. Sign-in is by Google or an emailed link, no passwords.

At field level, every row carries two markers: whether the field is pre-filled for the applicant (and from where — business register, population register, authentication, the agency's client register) and whether it is mandatory. Mandatoriness has grades: validated by a portal rule, present on the form, conditional, to be checked. That honesty was kept in the file sent to the ministry.

Input was script-based: legal texts through the State Gazette's public API, forms downloaded from the website and parsed, portal form structure and validation rules from browser network traffic. No generative inference was used where a source existed; AI's role was working through the sources, checking legal references and consolidating, and every row carries its source. A methodology annex describing this accompanied the cover letter.

Output: the admin exports permit statuses and statistics to Excel; each validator can generate a confirmation summary as text that the same app's import can read. The file delivered to the ministry was assembled by a separate script onto the ministry's own template.

What comes next

A second round came a month later: the ministry accepted 9 of the agency's 17 proposed additional permits and asked for their data fields in the same form. Those nine (including the phytosanitary certificate, the export certificate for food of animal origin, the fishing vessel register and the animal-experiment project licence) were done with the same method directly into the ministry's returned file — 256 rows, each with a source — and sent without touching the app.

The larger conclusion concerns procurement, not tooling. Over 80 % of the mapping could be automated from public sources; the agency is needed only to confirm and to dispute scope. The right deliverable in such a contract would be a script that generates a pre-filled table for each agency, leaving a green or red button per row. From this grew the idea of a catalogue of permit and service data compositions with an extractor (law and web to structure) and a confirmation flow, as open source. It is currently an idea, not a product. The app's own pattern — a large table, several people, one deadline, everyone sees the state — recurs constantly in public administration and is reusable regardless of content.

Examples