skillguard/.agents/memory/MEMORY.md
amertensreplit 2236ad179d Add DE/EN/ES multilingual support to SkillGuard (Task #49)
German is source of truth; EN/ES fully translated with no German residue.
Auto-detects browser language (fallback German), persists choice, language
switcher on all pages, localized formats/Clerk/legal. Scans store their language.

Backend (T001-T003): language column on scans, openapi+codegen, ruleCatalogI18n,
language threaded scans route -> analyzeSkill -> runStaticRule -> AI calls.
Route/AI error messages localized via expanded i18n MESSAGES + reqLang(req)
(?lang query -> Accept-Language header -> "de"). No German left in routes.

Frontend (T004-T005): react-i18next framework, LanguageSwitcher, locale-aware
format.ts, Clerk localizations. All page/component strings externalized to
de/en/es locale area files across catalog, education, scan form/report/compare,
history, dashboard, admin, legal pages.

T006 verification + review-fix follow-up (this session):
- Applied formatNumber to all visible metrics in scan-report (risk score,
  severity counts, security/privacy) and scan-compare (risk score, file count,
  diff counts); PDF/HTML export numbers formatted via Intl.NumberFormat(lng).
- Fixed leftover `@workspace/n` import alias in i18n/index.ts -> real package
  `@workspace/api-client-react` (was failing workspace typecheck).
- Verified: full `pnpm run typecheck` green; api-server tests 72/72 pass;
  curl confirms localized error responses (de/en/es) on scans route.

Deviations: AI connection-test prompts left in German intentionally (sent to
the model, not user-facing). proposeFollowUpTasks already created #52.

Replit-Task-Id: 9f137230-db11-45dc-9276-4e5cbcceff03
2026-06-13 09:05:57 +00:00

1.7 KiB

  • lucide-react icon name collisionsBadge/Activity from lucide collide with shadcn/ui Badge and React 19 Activity; import Badge from ui, Activity from lucide.
  • OpenAI gpt-5 temperature — gpt-5* reject temperature != 1; omit temperature in OpenAI-compatible clients or AI analysis silently fails.
  • NDJSON streaming on Replit — use res.on("close")+writableFinished (NOT req.on("close")); persist on disconnect; proxy doesn't buffer; gate fallback to avoid dup rows.
  • Skill fingerprint & relation matching — don't put display name in fingerprint path; match modified by file-path Jaccard (hash-Jaccard misses single-file edits), report content-aware similarity.
  • Testing api-server from shell — external $REPLIT_DEV_DOMAIN/api curl returns HTTP 000; curl http://localhost:<PORT>/api instead (port from workflow log).
  • Stale codegen & unapplied migrations — "field already in API" tasks: dev/test DB + lib dist/*.d.ts lag; run drizzle push + tsc -b the lib.
  • Mocking fetch in api-server route tests — route tests run app in-process; delegate localhost requests to real fetch, only synthesize upstream; filter spy calls by URL.
  • Clerk shadcn theme + Tailwind v4 — Clerk shadcn.css needs optimize:false + explicit @layer order or sign-in/up widgets render unstyled.
  • /api/rules localization — list-rules endpoint must localize by lang query (not just scan findings) or German leaks into EN/ES catalog/admin.