factcircuit
FactCircuit: an auditable claim-and-evidence verification loop with immutable provenance, staged checks, bounded retrieval, and reproducible evaluation.
2世代の GTFS フィードを比較し、路線・便数・時刻・停留所の変化を自動で読み解きます。GTFSデータリポジトリの公開フィードにも対応。/ Compare two GTFS feed versions and see what changed — routes, trips, times, stops.
Translation pending
DataHTML · PythonGitHub @niyalistOnlineOwner unconfirmed
Have you tried it? One tap is enough. No sign-in needed.
No updates detected yet. GitHub releases will appear here.
Owners of public repositories under a personal GitHub account can sign in to verify ownership and manage the introduction themselves. No administrator approval is needed.
Sign in, generate a verification file, and commit it to this repository’s default branch within 30 minutes. Files on other branches or forks do not count. Then check the file below to manage the project without administrator approval. Keep the file to retain your access.
If needed, you will go to sign-in. After signing in, return here and press your chosen verification button again.
Run /nomorevibe verify in your project folder to verify ownership and manage the introduction yourself.
Verify in one minuteAsk about other verification options
Semantic diff for GTFS feeds — compares multiple generations of GTFS feeds and extracts/report schedule changes as human‑recognizable semantic differences (e.g., routes discontinued, service reduced, stops renamed).
AI translation
Semantic diff for GTFS feeds — compares two versions and reports the changes as human-recognizable events (routes discontinued, service reduced, stops renamed) | 複数世代の GTFS フィードを比較し、ダイヤ改正を人間が認識できる意味的な変化として抽出・レポートする
Taken from the repository README
Loading the full README. The saved excerpt is shown below.
gtfs-semantic-diff compares two versions of a GTFS feed and reports the
differences as human-recognizable, semantic changes — a route discontinued,
evening service cut, a stop renamed or relocated, departures shifted — instead
of thousands of changed rows. Every raw field-level difference is structurally
accounted for: it either becomes evidence for a change event or is reported as
an unexplained residual, and the coverage ratio is measured on every run.Read the full README ↗日本語版: README.ja.md
gtfs-semantic-diff compares two versions of a GTFS feed and reports the differences as human-recognizable, semantic changes — a route discontinued, evening service cut, a stop renamed or relocated, departures shifted — instead of thousands of changed rows. Every raw field-level difference is structurally accounted for: it either becomes evidence for a change event or is reported as an unexplained residual, and the coverage ratio is measured on every run.
Try it: diff.gtfs.jp — upload any two GTFS zips, free, no sign-up. The site and reports are bilingual (English / Japanese, following your browser language).
explained_ratio, typically 1.0 on our verification feeds).stop_id / route_id / trip_id
are reassigned between versions, entities are re-identified from content —
names, coordinates, stop sequences, times. The resulting old↔new ID mapping
is itself an output (mapping.json), usable as a backbone for longitudinal
analysis across feed versions.config/default.toml. Same input, same output.The hosted service exposes every layer of a comparison result:
| Layer | URL pattern | Content |
|---|---|---|
| Digest | r/{pair}.digest.en.md (English) / .digest.md (Japanese) / .digest.json | Summary for LLMs and humans — numbers identical in both languages |
| Route detail | r/{pair}.routes.digest.json | Per-route changed trips (old/new trip_ids), counts by time band |
| ID mapping | r/{pair}.mapping.json | Adopted old↔new correspondences for stops / routes / trips |
| Full events | see r/{pair}/index.json | All 44 event types with evidence, plus raw diffs |
https://diff.gtfs.jp/mcp — register it as a connector in
Claude or ChatGPT (no auth) and query comparisons conversationally,
including running new comparisons.Python 3.11+ (developed on 3.14).
uv venv .venv.nosync --python 3.14 # .nosync needed if the repo is under iCloud sync (see note)
ln -s .venv.nosync .venv
uv pip install -e '.[dev]' --python .venv.nosync/bin/python
Note (macOS + iCloud): if the repository lives under an iCloud-synced directory (e.g.
~/Documents), a venv at.venvbreaks: iCloud keeps restoring a hidden flag on.pthfiles in site-packages, and Python 3.14 ignores hidden.pthfiles. Directories named*.nosyncare excluded from iCloud sync, hence the layout above.
# Compare two local GTFS zips (older one first) into a self-contained HTML report
gtfs-semantic-diff compare old.zip new.zip --html report.html
# Also emit ChangeEvent JSON / Markdown / raw diffs
gtfs-semantic-diff compare old.zip new.zip \
-o events.json --report report.md --rawdiffs rawdiffs.json
# Lightweight HTML (same "core" bundle as the web service) or app+data split output
gtfs-semantic-diff compare old.zip new.zip --html-lite lite.html --html-dir out/
# AI-oriented digest (Markdown / JSON, numbers guaranteed identical to the report)
gtfs-semantic-diff compare old.zip new.zip --digest digest.md --digest-json digest.json
# Japanese feeds: fetch generations directly from gtfs-data.jp
gtfs-semantic-diff fetch --org nagai-unyu --feed Nagaibus
gtfs-semantic-diff compare --org chitetsu --feed chitetsubus \
--old prev_2 --new prev_1 --html report.html
# Run only the L1 identity stage and inspect match confidence
gtfs-semantic-diff identity --org chitetsu --feed chitetsubus
--config swaps the threshold TOML (default: config/default.toml).infra/, AWS CDK; S3 + CloudFront + Lambda) powers
diff.gtfs.jp and can be deployed to your own AWS
account.Events fall into 6 groups (routes, stop patterns, trips/times, stops, calendars, fares/metadata), 44 types in total. The exhaustive detection specification is docs/spec/detection.md (Japanese): L0 enumeration rules, L1 identity scoring, and per-rule detection conditions, evidence consumption and thresholds.
zip ×2 | gtfs-data.jp API
→ load/ normalized loading (day_type normalization, all .txt kept as strings)
→ diff0/ L0: exhaustive RawDiff enumeration (the ledger's denominator)
→ identity/ L1: cross-version identity — stop clusters / route families /
stop patterns / route groups
→ events/ L2: rule cascade + residual accounting → ChangeEvent JSON (canonical)
→ report/ presentation model (cognitive units) → HTML / Markdown / digest
Date-based CalVer (YYYY.M.D.N — release date plus a same-day sequence
number, e.g. 2026.7.11.1). pyproject.toml is the single source of the
version; it is embedded in generated reports alongside generated_at.
All roadmap milestones are complete. On the Japanese verification feeds
explained_ratio is 1.0000; the international verification set (TriMet,
MBTA, STM Montréal, Rome, national-scale Swiss and Netherlands feeds) runs to
completion with explained_ratio 0.98–1.0. 287 tests. The largest Japanese
verification pair (30,700 raw diffs) takes ~2 seconds; national-scale feeds
finish in minutes (docs/perf/).
Development documentation is in Japanese (development happens in Japanese). The external API guide and reference (docs/api/) are English-first with Japanese companions.
| Document | Content |
|---|---|
| docs/articles/internals_1_core.md | Internals, part 1: RawDiff, MatchGraph, TripDelta, ChangeEvent — the ledger core |
| docs/articles/internals_2_presentation.md | Internals, part 2: the presentation layer — from ledger units to cognitive units |
| docs/spec/detection.md | Detection specification (implementation-accurate, exhaustive) |
| docs/design/presentation.md | Report display requirements and invariants |
| docs/design/ontology.md | Event catalog (design) |
| docs/design/architecture.md | Architecture and JSON schemas |
| docs/design/roadmap.md | Milestones and Definitions of Done |
| docs/api/ | External API guide and reference — English, with Japanese companions (served at diff.gtfs.jp/docs/) |
| docs/verification/ | Real-data verification logs |
This repository is developed as a human + AI collaboration using Claude Code. CLAUDE.md is the standing instruction file (design principles, development rules); progress is driven by per-milestone Definitions of Done — nothing is recorded as "done" without an execution record on the verification feeds. Design decisions, review findings and rejected alternatives are kept in docs/verification/ and the revision histories of the design documents.
.venv.nosync/bin/python -m pytest -q
.venv.nosync/bin/ruff check src tests
config/default.toml.| docs/perf/ |
| Performance measurement records |
| CLAUDE.md | Design principles and development rules (instructions for AI agents) |