Session Overview

Sam asked to patch the ai-visibility-weekly audit so it stops miscrediting Hollan & Aguiar as Sam Aguiar Injury Lawyers, then verify the fix against the current 12-query audit set using the 2026-06-12 artifacts and comparable methodology. The work stayed local and code-only, no live website or ad-system writes.

What Was Accomplished

Updated the AI visibility scoring logic so a firm hit now requires Sam Aguiar, Sam Aguiar Injury Lawyers, Aguiar Injury Lawyers, aguiarinjurylawyers, or the official aguiarinjurylawyers.com domain. The scorer no longer credits bare Aguiar surname matches, and samaguiarlaw.com was removed from the firm citation domain list because it is not the canonical firm site. Added a reusable verifier script that can re-score saved weekly raw artifacts without spending API calls. Patched both active surfaces found in the repo: the current June artifact folder and the older tracked Marketing_project/ai-visibility runner that launchd docs still reference.

Evidence Source and Verification

Primary evidence came from /Users/samaguiar/Documents/Projects/Repos/sail-marketing/ai-visibility/data/audit-2026-06-12-raw.json, which contains 12 rows and 24 engine results across Perplexity and ChatGPT. The known false positive was T3, ChatGPT, for Kentucky truck accident lawyer, where the old artifact marked Sam Aguiar named and cited because the answer surfaced Hollan & Aguiar Law and a Google Maps URL for that unrelated firm. Verification command run: python3 ai-visibility/scripts/verify_weekly_scoring.py ai-visibility/data/audit-2026-06-12-raw.json --expect-named-codes T1,T2,R1,R2 --expect-cited-codes T1,T2,R1,R2 --expect-score T3:chatgpt:0. Result: PASS. Rows checked: 12. Engine results checked: 24. Correct firm named and cited codes: T1, T2, R1, R2. Corrected T3 score: 0.

Files and Locations

Modified /Users/samaguiar/Documents/Projects/Repos/sail-marketing/ai-visibility/scripts/run_audit.py, current artifact-folder scorer. Added /Users/samaguiar/Documents/Projects/Repos/sail-marketing/ai-visibility/scripts/verify_weekly_scoring.py, reusable saved-raw verifier. Modified /Users/samaguiar/Documents/Projects/Repos/sail-marketing/ai-visibility/data/audit-2026-06-12-script.py, June 12 rerun script kept with the artifacts. Created /Users/samaguiar/Documents/Projects/Repos/sail-marketing/ai-visibility/data/audit-2026-06-12-verification.txt, verification output. Modified /Users/samaguiar/Documents/Projects/Repos/sail-marketing/Marketing_project/ai-visibility/scripts/run_audit.py, older tracked scorer still referenced by launchd docs. Added /Users/samaguiar/Documents/Projects/Repos/sail-marketing/Marketing_project/ai-visibility/scripts/verify_weekly_scoring.py, duplicate verifier for the older scheduled path. Modified /Users/samaguiar/Documents/Projects/routines-build/ai_visibility_audit/CLAUDE.md, adding the firm-name scoring guardrail to future weekly runs.

Current State

The scoring fix is verified locally. The repo was already dirty before this work, including many unrelated root and marketing-repo changes. I did not pull, stage, commit, stash, or revert anything. The current ai-visibility/ folder in the marketing repo is untracked as a directory, but it contains the June 12 artifacts Sam asked to use, so I edited it in place and also patched the older tracked Marketing_project/ai-visibility runner to avoid leaving a parallel stale scorer.

What Was Tried and Did Not Work

A Notion enhanced Markdown spec fetch returned INVALID_ARGUMENT, so the export used plain Markdown only after the SAIL Knowledge Base data source schema was successfully fetched. A junk Python import check was accidentally run in parallel and failed with ModuleNotFoundError: No module named 'ai_visibility_probe'; it did not touch files and was not part of verification. Python compile cache directories created by syntax checks were removed.

Suggested Next Steps

The cleanest next automation step is to have ai-visibility-weekly run the verifier after writing raw JSON and before producing the Notion report. For this exact 12-query cohort, pass the explicit expectations used here. If the query set changes later, run the verifier without expected code flags and keep only the false-positive guard. A future agent may also reconcile the two ai-visibility locations, because ai-visibility/ has the freshest June artifacts while older launchd docs still point to Marketing_project/ai-visibility/.

Pickup Prompt

Continue the AI visibility weekly audit hardening in /Users/samaguiar/Documents/Projects. Start by reading FOLDER-INDEX.md, Skills/ai-visibility-auditor/SKILL.md, and Repos/sail-marketing/ai-visibility/audit-2026-06-12.md. The scorer has already been patched to stop crediting bare Aguiar matches, and verification passed against data/audit-2026-06-12-raw.json. Next, if Sam approves durable automation changes, wire scripts/verify_weekly_scoring.py into the weekly run immediately after raw JSON generation and before the report or Notion export. Preserve the current no-live-write boundary and do not disturb the unrelated dirty tree.

QA Recommendations Pending Approval

A. Recommended: wire the verifier into ai-visibility-weekly after raw JSON generation and before report publication, because this prevents another false-positive report from reaching Notion.

B. Alternative: leave the verifier as a manual local check, which keeps the scheduler unchanged but relies on future agents remembering to run it.

C. Alternative: reconcile ai-visibility/ and Marketing_project/ai-visibility/ first, which is cleaner long term but touches more paths in an already dirty repo.