# Digimetrics — Fix Handoff (for Claude Code)

**This file is a handoff from an external QA audit, not a verified bug database.** Every item below was found by black-box testing against the live product at platform.digimetrics.ai — I do not have access to this codebase and have not located any of these issues in source. Treat every item as a **claim to verify, not a fact to act on.**

## Before touching any code

For each item:
1. **Reproduce it first.** Follow the exact steps given. If you can't reproduce it against the live product or your local/staging environment, stop and flag it back as "could not reproduce" rather than fixing blind — it may be already fixed, environment-specific, or a misread on the auditor's part.
2. **Locate the actual cause in source.** The "Where to look" note under each item is a hypothesis from behavior, not a file reference — I never saw this codebase. Use it as a starting search direction, not a citation.
3. **Fix only what you confirmed.** Several items below share one root cause across multiple tools (explicitly noted) — confirm the shared cause before writing one fix and assuming it covers every instance.
4. **Report back per item**: confirmed-and-fixed / confirmed-but-different-cause / could-not-reproduce. Silence on an item that turns out to be wrong is worse than flagging it.

Full narrative context, screenshots-as-described, and the "why it matters" reasoning for each item live in the companion report: **albert-fix-report** (the page this file was linked from).

---

## Critical (fix first — cross-cutting, multi-tool impact)

### DM-01 — Crawl-based checks return false negatives on JS-rendered sites
**Tools affected:** AI Readiness Check, Full Site Audit, llms.txt Generator (Technical SEO Crawler by contrast got this right — see note)
**Severity:** Critical — highest priority in this handoff

**Reproduce:**
1. Create/select a project pointed at a large, JS-rendered site (test used `hermes.com/us/en`).
2. Run AI Readiness Check, Full Site Audit, and llms.txt Generator against it.
3. Compare each tool's robots.txt / structured-data / semantic-HTML / meta-description verdicts against the live page (view-source or DOM inspection, not the tools' own output).

**Expected:** All three tools agree with each other and with the live page.
**Actual (this audit):** All three disagreed with each other; ground-truth DOM inspection showed robots.txt, structured data, semantic HTML, and meta description all genuinely present — but at least one tool reported each as missing. `document.querySelectorAll('h1')` confirmed 0 `<h1>` tags — Technical SEO Crawler correctly flagged this one.

**Where to look:** Whatever HTTP fetch layer these tools share for pulling page content — the pattern (static-file checks like robots.txt come back accurate; anything requiring parsed/rendered HTML comes back wrong, always toward "not found") points at a fetcher that doesn't execute JavaScript, or a target site serving reduced content to a non-browser user agent. Compare the fetch/render logic used by AI Readiness Check, Full Site Audit, and llms.txt Generator against whatever Technical SEO Crawler uses — if Technical SEO Crawler correctly found the H1 gap, its fetch path may be more reliable and worth reusing.

---

### DM-02 — AI Image Generator and AI Video Generator fail on all plain text-to-generate requests
**Tools affected:** AI Image Generator, AI Video Generator
**Severity:** Critical — likely blocks basic usage entirely

**Reproduce:**
1. Open AI Image Generator (or Video Generator), select "Guided — answer a few questions."
2. Enter only a plain text description. Do not upload or reference any image.
3. Run.

**Expected:** Generates the requested image/video.
**Actual:** Fails every time (4/4 attempts across 2 sites, 2 sessions) with an error about a "source image" — e.g. *"Your source image didn't upload correctly or isn't recognized by this tool"* / *"That source image could not be read. It must be an image generated here."* No source image was ever provided in any of these requests.

**Where to look:** A validation/pre-processing step shared by both tools that unconditionally checks for or reads a source-image parameter, even when the request mode (`Guided`, text-only) never collects one. Given both tools fail identically, look for shared generation-pipeline code rather than per-tool logic. Credits are correctly not charged on failure — preserve that behavior in the fix.

---

### DM-03 — Cross-tool contradictions on plain yes/no facts about the same domain
**Tools affected:** AI Readiness Check, Full Site Audit, llms.txt Generator
**Severity:** Critical
**Relationship to DM-01:** Same tools, same root data-source problem likely explains both — fix DM-01 first, then re-check whether this resolves on its own.

**Reproduce:**
1. Pick any domain. Run AI Readiness Check, Full Site Audit, and llms.txt Generator against it in the same session.
2. Compare their llms.txt / structured-data / semantic-HTML pass-fail verdicts.

**Expected:** Agreement on plain factual checks.
**Actual:** Disagreement — e.g. one run had AI Readiness Check say llms.txt Missing, Full Site Audit say llms.txt Missing — Opportunity, and llms.txt Generator say llms.txt Present, all for the same domain in the same session.

**Where to look:** Same as DM-01 — if these three tools pull page-existence facts from different fetch/cache paths with different freshness or rendering behavior, unifying that path should fix both DM-01 and DM-03 together.

---

### DM-04 — AI Page Rewrite fabricates review-rating (`aggregateRating`) structured data
**Tools affected:** AI Page Rewrite
**Severity:** Critical — compliance risk, not just a quality bug

**Reproduce:**
1. Run AI Page Rewrite against a product page that has no visible review/rating system.
2. Inspect the generated JSON-LD output for `Organization` and `Product` schema blocks.

**Expected:** No `aggregateRating` field, or an explicit note that no review data exists.
**Actual:** Specific, plausible-looking numbers were generated — `"ratingValue": "4.5", "ratingCount": "1250"` (Organization), `"ratingValue": "4.6", "ratingCount": "245"` (one product) — with no real review data anywhere in the source page or any other tool's output for that same page.

**Where to look:** The schema-generation prompt/logic for `aggregateRating` (and any other unverifiable numeric field, e.g. `foundingDate`, if not scraped from a real source) — confirm whether it's instructed to omit the field when no real rating data is available, or whether it's being asked to "fill in a plausible value." This is worth prioritizing above its single-tool scope: publishing fabricated review counts as structured data violates [Google's review-snippet guidelines](https://developers.google.com/search/docs/appearance/structured-data/review-snippet) and can trigger a sitewide manual action for any customer who copies it out.

---

### DM-05 — Locale/currency defaults don't reflect the active project's market
**Tools affected:** Keyword Analysis (CPC currency), Rank Checker (Location default), Content Checker (currency in generated copy)
**Severity:** Critical — 3 confirmed instances across form defaults and generated content

**Reproduce (Keyword Analysis):**
1. Set the active project's domain/market to United States (e.g. `hermes.com/us/en`).
2. Run Keyword Analysis with Location explicitly set to "United States."
3. Check the CPC column's currency symbol.

**Expected:** USD (`$`).
**Actual:** Singapore-dollar values (`S$0.38`, `S$1.11`) despite Location = United States.

**Reproduce (Rank Checker):**
1. Same project (US-market domain). Open Rank Checker fresh.
2. Check the Location field's default value before touching it.

**Expected:** Defaults to the project's own market (United States) or leaves it unset.
**Actual:** Defaults to "Singapore" regardless of the active project's actual domain/market.

**Where to look:** Wherever project locale/market is supposed to be read into (a) form field defaults and (b) generation prompts — it looks like a hardcoded fallback to Singapore (this account's original home market) rather than a per-project value. Check every tool with a location-dependent field or currency-dependent output, not just these three — this pattern is likely broader than what this audit happened to catch.

---

## Friction (fix next — real, narrower scope)

### DM-06 — Output truncated mid-sentence, 5 confirmed instances across 4 tools
**Tools affected:** Backlinks Explorer, SEM Ad Copy Generator, AI Content Optimiser, AI Mentions Tracker
**Reproduce:** Run any of these tools and read the full generated recommendation/description text to the end.
**Actual examples:** `"Free assembly on orders over."` (missing the number), `"...protect domain author…"` (cuts off mid-word), `"...moving you from position 7 to position…"`.
**Where to look:** A shared output-length limit hit during generation/streaming across these tools — one fix likely resolves all instances. Check whichever token/character cap applies to the recommendation-generation step.

### DM-07 — Competitor tools named by name in "Do this next" advice, 5 confirmed instances
**Tools affected:** Rank Checker, Page Technical & Domain Analysis, SEO Strategy
**Reproduce:** Run any of these tools and read the generated recommendations for direct mentions of Ahrefs, SEMrush, Moz, or Screaming Frog.
**Where to look:** An unconstrained recommendation-generation prompt shared across these tools — add a guardrail instructing it to reference Digimetrics' own tool catalog (or generic language) instead of naming competitors.

### DM-08 — Raw backend variable names leak into generated copy, 4 confirmed instances
**Tools affected:** Technical SEO Crawler (`avgOnPageScore`), Backlinks Explorer (`spamScore`, `referringIps`, `domainRank`)
**Reproduce:** Run either tool and read the generated recommendation text for camelCase field names appearing verbatim.
**Where to look:** Same shared prompt-template family as DM-07 — likely raw object interpolation (`{{fieldName}}`-style) into the recommendation text instead of a formatted value.

### DM-09 — Stale form state persists across project switches, confirmed twice
**Tools affected:** Competitors Identifier, Keyword Analysis (likely broader — not exhaustively tested)
**Reproduce:** Fill a keyword/input field on Tool A under Project 1. Switch the active project to Project 2. Open Tool A again without touching the field.
**Expected:** Field resets or clearly reflects Project 2.
**Actual:** Field retained Project 1's value while other fields on the same page (e.g. Website) correctly updated to Project 2.
**Why it matters:** Digimetrics' stated core use case is agencies managing multiple clients — this risks silently applying Client A's inputs to a report delivered under Client B's name.
**Where to look:** Whatever state persistence (form cache, last-used-value storage) survives a project-context switch — audit which fields are meant to persist (convenience) vs. which should reset on project change.

### DM-10 — SEO Diagnostics' Keyword Difficulty defaults to exactly 100 for most keywords
**Reproduce:** Run SEO Diagnostics for a domain with 50+ ranking keywords. Check the KD column distribution.
**Actual:** The large majority peg to exactly 100, including keywords already ranking #1–4 for the domain; a minority of long-tail/local queries show varied, plausible scores.
**Where to look:** The KD lookup for this specific flow — the pattern (varied scores for some, exact-ceiling for most) suggests a failing/rate-limited call silently defaulting to 100 rather than genuine uniform difficulty. Compare against Keyword Analysis's KD lookup, which returned varied, reasonable values in this audit.

### DM-11 — Backlinks Explorer: summary count doesn't match table count, and one run miscalculates a percentage
**Reproduce:** Run Backlinks Explorer "Whole site." Compare the "BROKEN BACKLINKS" number in the summary card against the table header's total.
**Actual:** Consistently mismatched (57 vs. 63 on one site; 333,570 vs. 426,256 on another, ~28% gap). One run's recommendation text also stated "46%" for a ratio (333,570 ÷ 921,847) that computes to ~36%.
**Where to look:** Two separate issues — (a) the summary and table likely pull from different snapshots/queries of the same underlying data, and (b) the percentage appears to be computed by the LLM from raw numbers in the prompt rather than calculated in code and passed in as a value. Fix (b) by computing the percentage server-side and interpolating the result instead of asking the model to do arithmetic.

### DM-12 — Persona Generator's summary undercounts its own output
**Reproduce:** Run Persona Generator. Compare the plain-English summary's stated persona count against the actual number of personas generated below it.
**Actual:** Summary said "three distinct customer types" (once) and "three distinct high-value customer types" (again, different site) while 10 and 11 personas respectively were actually generated.
**Where to look:** The summarization step likely receives only a truncated slice of the full persona output rather than the complete result — check what's actually passed to whatever generates the top-line summary.

### DM-13 — Media Plan Generator's "Marketing funnel" section is generic, unrelated boilerplate
**Reproduce:** Run Media Plan Generator with any business brief that isn't eco-friendly/sustainability-focused. Read the "Marketing funnel" section specifically.
**Actual:** Consistently references "sustainability," "eco-friendly niche," and "eco-friendly markets" regardless of the actual business — every other section of the same output is correctly business-specific.
**Where to look:** This section looks like a hardcoded/static template not wired into the same context-aware generation as the rest of the tool — confirm whether it calls the model at all, or just inserts static copy.

### DM-14 — Full Site Audit recommendations written as "Digimetrics will do this for you"
**Reproduce:** Run Full Site Audit. Read the meta-title/meta-description/llms.txt recommendation items specifically.
**Actual:** Four items read like an agency-deliverable SOW ("Digimetrics will address the meta titles... Digimetrics to check, create and install llms.txt.") rather than advice to a self-serve user, unlike every other recommendation in the same tool and every other tool tested.
**Where to look:** Likely a leftover prompt fragment from an internal/agency-facing template (Performance Marketing Audit's Starter tier has legitimate agency-voiced copy for comparison) that wasn't genericized for the self-serve product surface.

---

## Lower priority / labeling

### DM-15 — Tool count inconsistent: "36" vs "35"
Sidebar nav badge and Home dashboard both say 36; the Tools page's own header says 35, matching a manual tile count (SEO 14, Content 6, AI Visibility 4, Strategy 6, Integrations 5). Pick one source of truth and confirm both surfaces read from it.

### DM-16 — Three tools missing per-tool browser tab titles
`/seo-diagnostics`, `/performance-audit`, `/social-audit` show a generic "Digimetrics" tab title instead of a per-tool title, unlike every `/tool/*` route. Likely these three routes don't set the title the same way the standard `/tool/*` template does.

### DM-17 — Sidebar "Settings" links to Account & billing, no separate Settings page exists
Cosmetic — either rename the nav item or split out a real Settings page.

### DM-18 — Account page's "X monthly" caption tracks live balance, not the fixed plan quota
Reproduce: watch the "Credits left" and "X monthly" numbers on `/account` before and after running a tool. Expected: "X monthly" stays fixed at the plan's real allowance (e.g. 6,000 for Expert). Actual: it moved with consumption in this audit, suggesting it's bound to a live-updating field rather than the static plan quota.

### DM-19 — Home dashboard summary cards scoped to wrong project
Site Health, Page Speed, Authority, and Technical Signals cards on Home showed data for `arcade.software` while the active project was a different domain. AI Visibility card correctly scoped. Same-account cross-project scoping bug, not a cross-customer leak — check what these four cards query against vs. what the AI Visibility card queries against.

---

*Source report: "Digimetrics Platform — QA & Competitive Pricing Report" (albert-fix-report). Testing conducted against platform.digimetrics.ai, account albert@mediaone.co, two projects: a Singapore SME site and hermes.com/us/en. All findings are external black-box observations — verify against source before fixing.*
