CodeIssuesPull RequestsActionsSecurityInsights
✨ AI
More
Settings

audit: deep platform audit, daily workflow, compliance flags, timestamped docs #3862

Merged⚡ AI-generatedXSccantynz wants to mergeclaude/code-docs-audit-gaps-KMMt4mainopened May 29, 20260/4 tasks
ccantynzcommented May 29, 2026

Originally written by @ccantynz-alt on GitHub.
Imported from https://github.com/ccantynz-alt/MarcoReid.com/pull/81


Summary

Deep audit of the entire platform — code vs. docs, what's built vs. what's needed, legal/compliance gaps, and competitive landscape research. Creates the infrastructure to keep docs in sync with code daily going forward.

What's in this PR

  • MASTER-AUDIT.md — Timestamped single source of truth for the platform. Code audit results, citation research (Stanford 2025 AI hallucination study), multi-jurisdiction compliance requirements, competitive landscape (Harvey/Clio/Smokeball/TR/Xero), and a ranked action plan. Every new container session reads this after CLAUDE.md so it never acts on stale information.

  • .github/workflows/platform-audit.yml — Daily automated audit at 6am NZST. Checks: Astra references, placeholder content, hardcoded secrets, brand casing violations, missing AI disclaimers, missing page metadata. Creates a GitHub issue if any check fails — new sessions have a clear action list waiting for them.

  • Metadata fix/compliance and /legal-notices pages were the only marketing pages missing SEO metadata. Fixed via layout.tsx wrappers (correct Next.js App Router pattern for "use client" pages).

  • CLAUDE.md updates — 10 new timestamped decisions in Section 25. Stage Tracker updated (Stage 3 complete, Stage 4 in progress). Opening/Closing Ritual updated — MASTER-AUDIT.md is now step 2 of every session.

Key Findings From the Audit

Code is ahead of docs: The platform is ~85% production-ready. 84 API routes, 24 database models, Claude API integrated, Stripe fully wired, zero Astra references, zero lorem ipsum.

Immediate compliance flags:

  • 🚨 NZ Privacy Amendment Act IPP 3A — effective 1 May 2026, now 28 days overdue. Disclose Claude API pipeline in privacy policy.
  • ⚠️ ABA Opinion 512 — onboarding consent must explicitly name AI use. General tech consent is insufficient.
  • ⚠️ EU AI Act high-risk deadline — 2 August 2026 (65 days away). Risk classification required before EU market entry.
  • ⚠️ AU Privacy Act — all lawyers must have compliance advice from 1 July 2026 (33 days).

Citation system: AI hallucination rates in best commercial tools: 17–43% (Stanford/Yale 2025). Required threshold before production: under 5%. Solution: CourtListener block-of-text API (free, 9M+ opinions) + Harvard CAP FAISS index (CC0, 6.7M opinions) as RAG corpus. Marco engine is built and ready — just needs API key + CourtListener wired in.

Most dangerous competitor: Smokeball in AU/NZ (4.8/5 stars, Archie AI, strong small-firm presence). Not Harvey — they won't touch the market we own.

Test plan

  • Build passes: npm run build ✅ confirmed clean
  • New layout.tsx files render metadata correctly on /compliance and /legal-notices
  • Daily audit workflow triggers on schedule and on workflow_dispatch
  • MASTER-AUDIT.md is accurate as of 2026-05-29

https://claude.ai/code/session_01BETeMQCCtyrema2QkKRWh6


Generated by Claude Code

ccantynzcommented May 29, 2026

Originally written by @vercel[bot] on GitHub.


The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marco-reid-com Ready Ready Preview, Comment May 29, 2026 12:27am

Cross-repo impact

See what breaks downstream if this PR merges.

Analyze →
⮌ Merged

This pull request was merged into main.

c comment · e edit title · m merge · a approve · r request changes · ? shortcuts