Use this skill when you need to turn an official Japanese ministry budget PDF into reviewed flow edges, provenance, and budget highlights for this app, or when you need to extend the reviewed-candidate workflow to another ministry.
Use this skill when the task is any of the following:
MIN_xxx -> REC_xxx flow edgesbudget_highlights for the budget pagescripts/seed_db.py and the UIDo not use this skill for generic RAG ingestion only. This workflow is specifically for turning reviewed budget findings into structured flow data.
scripts/generate_reviewed_budget_candidate.py against the official PDF corpus and save a draft JSON.scripts/reviewed_budget_candidates/.scripts/build_reviewed_budget_dataset.py, or add a thin ministry wrapper like scripts/fetch_mext_budget.py when the file should be regenerated often.scripts/seed_db.py.scripts/init_db.py and scripts/seed_db.py both know the data_sources.source_id.python3 scripts/seed_db.py.edges exist in data/money_flow.dbsource_provenance has the official PDF URL, title, and pagesrc/data/unified_data.json contains the new edges and metadata.budgetHighlightsnpm run build passesEach reviewed ministry dataset should produce all of the following:
nodes: one ministry source node and target recipient nodesedges: source_id, target_id, amount, provenance, and page numberbudget_highlights: overview, policy frames, and individual projects when availablereferences/reviewed_candidate_schema.mdscripts/build_reviewed_budget_dataset.pyscripts/generate_reviewed_budget_candidate.pyscripts/fetch_mext_budget.pyscripts/seed_db.pydocs/app_usage_guide.mdRun these after changes:
python3 -m py_compile scripts/build_reviewed_budget_dataset.py scripts/seed_db.py
python3 scripts/seed_db.py
npm run build
When debugging a new ministry, inspect the DB directly:
sqlite3 data/money_flow.db "select e.source_id,e.target_id,p.source_title,p.page_number from edges e left join source_provenance p on p.edge_id=e.id where e.fiscal_year=2025 and e.source_id='MIN_MEXT';"