{"slug": "how-to-compare-two-ai-system-inventory-exports", "title": "How to compare two AI system inventory exports", "summary": "A developer building Northstar, an AI system inventory tool, published a Python script that diffs two CSV exports of an AI register by system ID, flagging added, removed and changed records across fields such as owner, purpose, assessment basis and sign-off. The walkthrough uses a free sample inventory with three fictional systems and demonstrates detecting an owner change on a 'Recruiter Screener' entry, citing NIST's AI Risk Management Framework playbook on keeping inventories tied to risk records.", "body_md": "An AI register can look complete while the tools in it have already changed. A vendor can turn on CV ranking by default, or a team can start using an assistant for a different decision. When you review the register again, you need to see which records changed and which evidence to revisit.\n\nKeep two exports from the same workspace. Match on the system ID so you can still find a record after someone renames it. Compare the owner, intended use, assessment basis and sign-off, then ask the owner to confirm what changed in the actual tool.\n\nI’m building Northstar. Its [free sample AI system inventory](https://northstar.builtbyangelo.co/ai-system-inventory-template.html?utm_source=devto&utm_medium=article&utm_campaign=inventory_changes) uses the same columns as its workspace export and includes three fictional systems. Download it twice, save the files as `before.csv` and `after.csv`, and change a field in the second file.\n\nThis example reads both files without changing either of them. Save it as `compare_inventory.py` and run it with `python3 compare_inventory.py`.\n\n``` python\nimport csv\n\nFIELDS = (\n    \"name\", \"owner\", \"purpose\", \"status\", \"tier\", \"role\",\n    \"basis\", \"last_assessed_as_of\", \"ruleset\", \"signed_by\",\n)\n\ndef load_inventory(path):\n    inventory = {}\n    with open(path, encoding=\"utf-8-sig\", newline=\"\") as file:\n        for row in csv.DictReader(file):\n            system_id = row[\"system_id\"].strip()\n            if not system_id or system_id in inventory:\n                raise ValueError(f\"Missing or repeated system ID in {path}\")\n            inventory[system_id] = row\n    return inventory\n\nbefore = load_inventory(\"before.csv\")\nafter = load_inventory(\"after.csv\")\nfor system_id in sorted(before.keys() | after.keys()):\n    previous = before.get(system_id)\n    current = after.get(system_id)\n    if previous is None:\n        print(f\"{system_id}  added  {current['name']}\")\n    elif current is None:\n        print(f\"{system_id}  missing from new export  {previous['name']}\")\n    else:\n        for field in FIELDS:\n            if previous[field] != current[field]:\n                print(f\"{system_id}  {field}  {previous[field]} → {current[field]}\")\n```\n\nIf you change Recruiter Screener’s owner from `Head of People` to `Recruitment Operations Lead` in `after.csv`, you’ll get this result.\n\n```\n1  owner  Head of People → Recruitment Operations Lead\n```\n\n[NIST’s AI Risk Management Framework playbook](https://airc.nist.gov/airmf-resources/playbook/govern/) describes keeping an inventory that connects AI systems to the records needed to manage their risks. If you already have a register, try this on one workflow before comparing everything.\n\nThis walkthrough was drafted with Codex. The comparison was run locally on the fictional sample and does not use applicant or customer data.", "url": "https://wpnews.pro/news/how-to-compare-two-ai-system-inventory-exports", "canonical_source": "https://dev.to/angeloforz/how-to-compare-two-ai-system-inventory-exports-215e", "published_at": "2026-12-02 07:11:49+00:00", "updated_at": "2026-12-02 07:13:18.635569+00:00", "lang": "en", "topics": ["ai-policy", "ai-tools", "developer-tools"], "entities": ["Northstar", "NIST", "Codex"], "also_reported_by": [], "takeaway": "Diffing two inventory exports keyed on a stable system ID surfaces added, removed and changed records (owner, purpose, assessment basis, sign-off) so owners can confirm what actually changed in the tool.", "recommendation": {"advice": "Keep dated exports of your AI system inventory and diff them on a stable system ID to catch renamed or changed tools, then have owners confirm the change.", "playbook": "production-ops", "playbook_url": "https://wpnews.pro/playbooks/production-ops"}, "alternates": {"html": "https://wpnews.pro/news/how-to-compare-two-ai-system-inventory-exports", "markdown": "https://wpnews.pro/news/how-to-compare-two-ai-system-inventory-exports.md", "text": "https://wpnews.pro/news/how-to-compare-two-ai-system-inventory-exports.txt", "jsonld": "https://wpnews.pro/news/how-to-compare-two-ai-system-inventory-exports.jsonld"}}