| name | audit-israeli-phonebook |
| description | Sweep existing Google Contacts for Israeli organisation entries and report what is missing, stale, duplicated or corrupted — star numbers that lost their asterisk, 1-800 numbers with no reachable-from-abroad fallback, merged counter and call-centre hours, entries with no verification date, and the same office saved twice under two transliterations. Use to review or clean up an existing Israeli phonebook. |
Audit an Israeli phonebook
Read-heavy, write-light. The output is a report the user acts on; do not
silently rewrite contacts.
Scope it first
Ask what to sweep before starting. "All contacts" on a large phonebook is a lot
of API calls and most of them are people, not offices. Better starting points:
- a named agency —
search_contacts for ביטוח לאומי, משרד הפנים, the
health fund
- contacts already carrying any of the canonical custom fields
- a list the user names
What to look for
Work through list_contacts or the searches above, and flag:
Corrupted star numbers. A *XXXX number that has lost its asterisk, or has
been wrapped as +9723450, is broken and will not connect. This is the most
common silent corruption — it comes from sync round trips and third-party
importers, not from typos. A bare 4-digit number in an Israeli org contact is a
star number that has been mangled; check it against the organisation's site
before rewriting it.
No route from abroad. Any contact whose only numbers are *XXXX, 1-800,
1-700, 1-599 or short codes cannot be called from outside Israel or from a
foreign SIM. Flag it and suggest finding a geographic 0X fallback. Run the
numbers through the classifier rather than eyeballing them:
python3 scripts/il_phone.py classify --json '<number>' '<number>'
Merged hours. A single hours value covering both the counter and the phone
line, or a value that does not say which it is. For an Israeli government
office or health fund these are different timetables, and a merged value will
eventually send someone to a closed door.
Missing Shabbat status. An org contact with hours but no Shabbat and Chag
field. For an Israeli office this is almost never genuinely unknown — it means
nobody checked.
Stale entries. Verified older than a year, or absent. Israeli office hours
change with seasons, budgets and reorganisations. Absent is worse than old: an
entry with no date cannot be triaged at all.
Off-vocabulary custom fields. Keys that are not in
reference/custom-field-keys.md — near-misses like Hours (reception) or
Opening Hours fragment the phonebook, because nothing matches across contacts
any more.
Duplicates. The same office saved twice under two transliterations, or once
in Hebrew and once in English. Search each candidate by its phone number as
well as its name — the number is the reliable key when the spelling is not.
Hebrew-only entries with no Latin name. Findable only by someone who can
type Hebrew, which may not be true on every device the user owns.
Report, then fix
Present findings grouped by severity — broken (will not connect), misleading
(wrong hours, wrong promise of English), untidy (off-vocabulary keys, missing
dates) — and let the user choose. Do not batch-fix.
When they do choose, remember that update_contact's list arguments replace
whole collections. For a single custom field use set_custom_field. For
anything in a list, get_contact first, merge, then write the complete
collection back. Fixing an audit finding by accidentally deleting three phone
numbers is a worse outcome than the finding.
For anything that needs re-checking against a source, hand off to the
save-israeli-contact skill rather than guessing at the corrected value. An
audit that invents plausible hours is worse than one that reports them missing.