Update administration

From atanasster/electionsbg · View interactive version

Update administration is an AI agent skill from the GitHub repository atanasster/electionsbg. Refresh the Държавна администрация data behind /sector/administration — the e-government adoption vs the EU (data/administration/egov.json, Eurostat isoc_ciegi_ac), the citizen digital-skills band vs the EU (data/administration/digital_skills.json, Eurostat isoc_sk_dskl_i21, incl. the full-27 youth

How to use this skill

Skill file

update-administration

<!-- pipeline-pointer:start (generated from the registry; edit scripts/pipeline/registry) -->

Pipeline: handler CODE0 runs this unattended — pnpm run pipeline:ingest --only update-administration. The registry holds its commands, gates and publish set; this runbook covers what a script cannot do (operator steps, judgement calls, troubleshooting). When a step fails, start from the repair packet the run writes, not from the procedure below.

<!-- pipeline-pointer:end -->

Refreshes the data served at /sector/administration (the bespoke

institution-first dashboard) + /sector/administration/services (the DbDataTable

services browser), and read by the administrationOverview AI chat tool.

Sources

| Artifact | Source | Cadence | Watcher |

|---|---|---|---|

| egov.json | Eurostat isoc_ciegi_ac (I_IUGOV1 — interaction with public authorities) | annual | eurostat_egov |

| digital_skills.json | Eurostat isoc_sk_dskl_i21 (I_DSK2_* — citizen digital skills, DESI human-capital pillar; headline + 5 areas + composition + full-27 youth cut) | biennial (odd years) | eurostat_digital_skills |

| services_catalog.json + admin_services (PG) + services_overview.json | Административен регистър (iisda.government.bg/adm_services/services) | weekly-ish | iisda_services |

| service_quality.json | Annual Доклад за състоянието на администрацията (parsed from the cached raw_data/budget/doklad-*.txt) | annual | iisda_doklad (shared with /update-budget) |

| eforms_requests.json + admin_service_requests (PG, migration 201) | МЕУ's еФорми request volumes, data.egov.bg dataset 20218 (one resource per month) | monthly, on the 1st | — (no watcher yet; run with any administration refresh) |

| context.json (derived) | data/budget/personnel.json + data/macro.json + data/cofog.json | on any of those | — (rebuild after /update-budget or /update-macro) |

The e-gov procurement group (МЕУ + ИА ИЕУ + ДАЕУ, rolled up server-side by

awarder_group_model) rides the procurement corpus and needs no ingest here —

it refreshes with /update-procurement.

Run

pnpm exec tsx scripts/administration/fetch_egov.ts              # egov.json (Eurostat)
pnpm exec tsx scripts/administration/fetch_digital_skills.ts    # digital_skills.json (Eurostat isoc_sk_dskl_i21)
pnpm exec tsx scripts/administration/fetch_services.ts          # services_overview.json + services_catalog.json (ИИСДА scrape)
pnpm exec tsx scripts/administration/parse_service_quality.ts   # service_quality.json (from cached doklad-*.txt)
pnpm run admin:build-context                               # context.json (from personnel + macro + cofog)
DATABASE_URL=… pnpm run db:load:admin-services:pg          # load admin_services into LOCAL Postgres

Notes:

/update-budget downloads; run /update-budget first when iisda_doklad flips so

the newest year's text is cached. The parser is deliberately narrow (signals volume,

proposals, satisfaction-measurement compliance) — таен клиент / one-stop-shop are

prose-only in the report and are NOT extracted.

/update-macro (macro + cofog) too — it bakes their slices so the page fetches

~8 KB instead of ~324 KB. This is why iisda_doklad maps here as well.

Per-service fee / deadline / e-availability are NOT captured (each detail page is a

separate xajax fetch — deferred).

еФорми e-service request volumes

pnpm run admin:eforms                          # data.egov.bg 20218 → data/administration/eforms_requests.json
pnpm run db:load:admin-service-requests:pg     # → admin_service_requests + admin_service_requests_month

REQUESTS through the еФорми system only — not completions, and not every e-service (one a

body runs on its own portal is absent, not zero). МЕУ skips months (2025-01…04, 2025-07…08,

2026-02 as of 2026-10-21); admin_service_requests_month lists the months that WERE

published, so a missing month is never read as zero. The fetcher refuses when a month it

held before disappears (--allow-shrink if МЕУ withdrew it) and does not rewrite the file

when no month changed. The snapshot is a PG load source and is excluded from bucket sync.

Publish

services_catalog ingest source): the ordinary pnpm run bucket:sync ships

data/administration/ to GCS (it is not excluded from the sync).

and load it, then it serves via /api/db/table?resource=admin_services:

```bash

pnpm run db:load:admin-services:pg:cloud

```

(admin_services is small; keep it in the standard cloud refresh alongside

db:load:schools:pg:cloud.)

rest so prod is not a vintage behind when a surface ships:

```bash

pnpm run db:load:admin-service-requests:pg:cloud

```

Finish

Stamp the ingest marker so the orchestrator won't re-run it:

git add data/administration/ state/ingest/update-administration.json

(Write state/ingest/update-administration.json with {"lastSuccessfulIngest":"<ISO>"}.)

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.