Add CLAUDE.md agent memory with codebase architecture notes#9
Open
bgillis99-pixel wants to merge 16 commits intomainfrom
Open
Add CLAUDE.md agent memory with codebase architecture notes#9bgillis99-pixel wants to merge 16 commits intomainfrom
bgillis99-pixel wants to merge 16 commits intomainfrom
Conversation
Documents project structure, tech stack, key file paths, code patterns, build/deploy setup, and conventions for future AI agent conversations. https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
- sites/sites.json: one config for every site (phone, colors, prices, FAQ, chatbot) - sites/template.html: one canonical mobile-first template with SEO, FAQ schema, AutomotiveBusiness JSON-LD, sister-site cross-links, sticky CTA, VIN chatbot - sites/build.mjs: generates per-site index.html, worker.js (HTML embedded — no KV drift), wrangler.toml, sitemap.xml, robots.txt into sites/dist/ - VIN chatbot (gorilla) on every site → /api/chat → KV + ALERT_WEBHOOK - Bookings → /api/book → same alert pipeline - 8 sites generated. San Diego now correctly shows OBD $119 / OVI $219. - Removed legacy workers/cleantruckcheckstockton (now generated). - CLAUDE.md updated so future sessions edit sites.json, not deployed workers. https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
- cleantruckcheck-roseville: SF Giants (orange/black/gold) — already set - cleantruckcheck-fairfield: Air Force Academy (royal blue/silver) - cleantruckcheck-hayward: Raiders (silver/black) - mobilecarbtest: 49ers (scarlet/gold) - mobilecarbsmoketest (San Diego): unchanged amber/brown — user confirmed correct https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
Single workflow that builds sites/dist/* from sites.json and deploys every site as its own Cloudflare Worker via a matrix. Adding a new site to sites.json now auto-deploys on next push — no workflow edits needed. Triggers: - push to main/master/claude/** when sites/** changes - workflow_dispatch (with optional `only` input to deploy a single site) Uses CLOUDFLARE_API_TOKEN secret already configured in the repo. https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
Codifies the workflow for adding/editing/migrating any single-page Silverback site on Cloudflare Workers, so future sessions follow the same pattern and don't reintroduce the cross-contamination problem. Auto-triggers on prompts about: adding a new site, migrating from Squarespace/Wix/WordPress, editing colors/phone/prices, deploying a Cloudflare worker, or building one-page brochure sites for any Silverback business (CARB sites, Chick Boo Law Firm, DMC Properties, etc.). Documents per-vertical conventions: CARB (existing), Law (Chick Boo, future), Real Estate (DMC, future), Landing pages. https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
Architecture changes:
- sites/templates/{carb,law}.html — vertical-specific templates
- sites/content/<site-id>/blog/*.md — markdown blog posts per site
- build.mjs reads vertical, picks template, renders intake forms,
loads blog posts (frontmatter + markdown), generates /blog/ + /blog/<slug>
routes baked into worker.js (no KV needed for content)
New vertical: law
- Hamburger nav with practice-area anchors + Reviews + Blog + Directions + Call
- Story-led hero (no big self-photos — by client request)
- Practice area cards open free confidential intake forms
- Per-area intake forms with vertical-specific schemas (bankruptcy, immigration,
family, personal injury, estate planning) — submit to /api/intake
- Google reviews section + "Get Directions" button (deep-links to native Maps)
- Google Business Profile / Place ID hooks ready
- LegalService JSON-LD, FAQ schema, mobile-first
- OBI ⚖️ chatbot with law-specific guardrails: refuses nutrition/politics/etc,
always surfaces firm phone + email
- Attorney advertising disclaimer in footer
New site: chigbulaws (chigbulaws.com)
- Email locked: chigbulaw@sbcglobal.net (do NOT 'fix' the spelling)
- Domain locked: chigbulaws.com (plural — inherited, do NOT 'correct')
- Theme: deep navy + warm gold
- Practice areas: Bankruptcy, Immigration, Family, Personal Injury, Estate
- Reviews: 3 placeholder testimonials, real Google integration ready
- 1 example blog post (welcome.md)
Build pipeline: 11 sites total now (10 CARB + 1 law) — all green.
https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
…t form, prominent bar number - Subheadline + CTAs no longer promise free consults except for PI - New "Tell us about your case" quick contact form at top of page — for clients who don't want to fill out a full intake. Submits to /api/intake with area="general" so it still alerts the office. - Practice area intake forms: PI shows "Free Consultation · No Fee Unless We Win", others show "Confidential Intake" - BAR_NUMBER token: rendered prominently under hero with calbar.ca.gov verify link, also in footer. Field added to sites.json (currently TBD — paste real number). - FAQ updated to be honest about consultation fees - OBI chatbot reply rewritten for the same reason https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
…ntakes Top-attorney pattern — each practice area gets its own URL, focused content, and a 6-question intake form (best practice for conversion): - /bankruptcy/, /immigration/, /family/, /personal-injury/, /estate-planning/ - Per-page: hero, "what I help with" bullets, 3-step process, focused intake, area-specific FAQ, reviews strip, LegalService + FAQPage JSON-LD scoped to area - Worker routes /<area>/ to embedded HTML, no DB - Sitemap auto-includes area pages with priority 0.9 Home page restructured: - Reviews moved ABOVE the fold (right after hero) with average rating display - Practice area cards now link to /<area>/ instead of in-page anchors - Removed inline intake forms (now on per-area pages) Attorney details: - Name updated to "Clifford Chigbu, Esq." (first name added per user) - attorneyShortName field for friendly copy - Bar number rendered prominently with calbar.ca.gov verify link Intake fields trimmed to ~6 per area for completion rate: - Bankruptcy: 6 (income, debt, home, garnishment, prior, goal) - Immigration: 6 (country, status, family, criminal, deportation, goal) - Family: 6 (matter, marriage, separation, kids, DV, urgency) - PI: 6 (incident, date, injuries, treatment, insurance, police report) - Estate: 6 (docs needed, kids, real estate, value, marital, concerns) Per-area content added: - areaHeadline / areaSubhead (outcome-focused, e.g. "Stop the harassment") - bullets (specific things he does) - process (3 steps for clarity) - areaFaq (3 area-specific Q&A) https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
If the webhook is down, the agent is unreachable, or the KV binding isn't set, form submissions and chat messages still reach the client via email. Flow in worker.js fireAlert(): 1. Persist payload in KV (SUBMISSIONS namespace, 90-day TTL) — always 2. POST to ALERT_WEBHOOK (Make/Zapier/SMS) — if configured 3. Email via Resend API (env.RESEND_API_KEY) — if set 4. Fallback to MailChannels — free, requires domain SPF/DKIM Every submission fires both webhook AND email (double-belt) so nothing gets lost. Formatter builds a clean subject + plain-text body with all payload fields, sets reply_to to the client's email so Clifford can reply directly. New sites.json fields: - fallbackEmail: where submissions are mirrored (defaults to site.email) - fromEmail: sending address (defaults to noreply@<domain>) Chigbu Law wired to email chigbulaw@sbcglobal.net for every intake, contact form, OBI chat message — even if the webhook/agent is completely down. Setup docs added to generated wrangler.toml for each site. https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
Schema enrichment (home page LegalService JSON-LD): - aggregateRating (ratingValue, reviewCount, best/worst) from reviews array - Individual Review items with reviewRating, author, reviewBody — so Google can show the actual review text in rich results - Full PostalAddress (street/locality/region/postal/country) - knowsLanguage array - priceRange - image (from ogImage field when set) Analytics hooks (both carb + law templates): - Cloudflare Web Analytics (free, no cookies) — set cloudflareAnalyticsToken - Google Analytics 4 — set googleAnalyticsId (G-XXXXXXXXXX) - Plausible — set plausibleDomain - All three render independently; set any/all. Zero render if all empty. - analyticsHtml() helper in build.mjs builds the script tags conditionally All sites rebuilt, schema verified (3 Review items + aggregateRating embedded in chigbulaws home page JSON-LD). NOTE TO USER: the reviews in sites.json are still PLACEHOLDERS I invented. They need to be replaced with the real Google reviews before launch. https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
Clifford Chigbu's office is in Elk Grove (Sacramento County), not Stockton as I had assumed. Updated: - city, region, eyebrow, address, addressForMaps - meta description, keywords, FAQ answer - Google Business / reviews search URLs Still placeholders: phone, bar number, street address, real bio, real reviews. https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
Real data extracted from Squarespace screenshots: - Full name: Clifford C. Chigbu - Title: Attorney at Law - CA State Bar #: 221386 (verify link now works: apps.calbar.ca.gov/.../221386) - Phone: (916) 230-6381 - Hours: Mon–Fri 8:30 AM – 6:00 PM (confirmed) - Award: Best of BusinessRate 2025 — Family Law Attorney — Elk Grove (rendered as trust badge under hero + included in LegalService JSON-LD) Practice areas — REPLACED my guesses with his actual 5: 1. Family Law (lead — he's the top-rated family law attorney) 2. Immigration (his other strength per user) 3. Personal Injury (incl. car accidents) 4. Bankruptcy (with his existing questionnaire concept preserved) 5. Business & Contract Law (NEW — I had estate planning, which he does NOT do) REMOVED: Wills & Estate Planning (I invented this — he doesn't offer it) ADDED: Business & Contract Law (his real 5th area) Wider service area: - serviceAreas[] now covers Elk Grove, Sacramento, Davis, Lodi, Stockton, Jackson, Galt, Wilton, Rancho Cordova, Folsom, Ione, West Sacramento - New "Proudly serving the greater Sacramento area" section on home page with city chips - Meta description + keywords updated to lead with Family + Immigration and target surrounding city searches - LegalService JSON-LD areaServed now lists all cities as Schema.org City entities (better for local SEO) - Subheadline updated: "serving Elk Grove, Sacramento, Davis, Lodi, Stockton, Jackson, and the greater Central Valley" https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
… signage Extracted from user's Google Business Profile screenshot: - Firm name: "Law Offices of Clifford Chigbu" (per building exterior signage) - Alt name: "Clifford Chigbu Attorney at Law" (per Google Business Profile) - Full address: 4815 Laguna Park Dr, Suite C, Elk Grove, CA 95758 - Real Google rating: 4.8 stars from 24 reviews - Business category: Family law attorney (matches top-rated positioning) Changes: - Replaced fake 5.0/3-review placeholder with authoritative Google numbers (googleRating=4.8, googleReviewCount=24) - New reviews section HTML: shows "4.8 stars from 24 clients on Google" prominently when the reviews[] array is empty, instead of "Reviews coming soon" - LegalService JSON-LD aggregateRating now uses the real Google numbers; falls back to computing from reviews[] if not set - Added streetAddress, postalCode fields for full PostalAddress schema - Map deep link now points to exact address (4815 Laguna Park Dr STE C) - Added deskPhotoUrl + officeExteriorPhotoUrl placeholder fields for when user uploads the photos (Clifford at desk + building with signage) https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
dmc-properties | 1dcf448 | Apr 07 2026, 11:44 PM |
Five complementary AI-search layers:
1. knowledgeBase[] in sites.json — 49 Q&As for Chigbu Law grouped by category
(Family, Immigration, PI, Bankruptcy, Business, General). One source, used
by every layer below.
2. Client-side instant search module on the home page
- Search box filters Q&As as you type (case-insensitive, question + answer +
category matched)
- Category pills to filter by practice area
- First 6 items expanded by default; the rest collapsed
- Zero cost, zero latency, works offline. No API key needed.
3. /llms.txt file — new open standard for telling LLMs how to read your site.
Served by worker at /llms.txt and also written to sites/dist/<id>/llms.txt.
Contains: firm profile, contact, bio, practice areas with URLs, service
areas, full Q&A knowledge base, awards. ChatGPT, Claude, Perplexity will
read this when crawling.
4. /api/search + /search worker endpoints — keyword-scored search over the
embedded knowledge base. Optional Workers AI re-ranking hook if env.AI
binding is set (graceful no-op if not). JSON response for future JS
consumers; can power a future chatbot upgrade.
5. Schema enrichment:
- QAPage JSON-LD with all knowledge base items (Google SGE + AI overviews)
- SearchAction in LegalService JSON-LD (tells Google there's a search endpoint)
- alternateName for firmNameAlt
- robots.txt explicitly welcomes GPTBot, ClaudeBot, Claude-Web, anthropic-ai,
PerplexityBot, Google-Extended, CCBot, Amazonbot, Applebot-Extended, Bingbot
Impact: visitors get instant answers without leaving the page, AI search
engines (ChatGPT/Perplexity/Gemini) can cite the firm confidently, and Google
AI overviews have clean Q&A pairs to pull from.
https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
… vCard ONE-TAP DEPLOY (mobile-friendly via GitHub Actions): - .github/workflows/deploy-sites.yml: now has a choice dropdown of all 11 sites (or "ALL"). Tap → pick → green button → done. No typing. - .github/workflows/test-email.yml: validates the email fallback end-to-end. Sends a fake intake to a chosen site, expects it to land in fallbackEmail. - .github/workflows/health-check.yml: pings every site and reports up/down. Auto-runs every 6 hours; can also be triggered manually. RUNBOOKS for Clifford launch (when user is at a computer): - sites/DNS_CUTOVER.md: full Squarespace -> Cloudflare migration playbook, including MX preservation, registrar nameserver swap, rollback procedure. - sites/RESEND_SETUP.md: 10-min email setup; finishes with the test-email workflow as the validation step. - sites/PUNCH_LIST.md: every blocker between today and live launch, organized. - sites/directories/chigbulaws.md: copy-paste packet for 18 directories (Bing, Apple, Avvo, Justia, Yelp, etc.) with NAP-consistent fields. CALIFORNIA STATE BAR COMPLIANCE PASS: - Stronger disclaimer: explicitly states no attorney-client relationship from visiting/submitting/chatting; only by signed engagement agreement - "This is not legal advice" notice above every intake form - Privacy Policy at /privacy/ (CCPA-compliant, required for sites collecting personal info via forms) - Terms of Use at /terms/ with attorney-advertising, no-advice, and past-results disclaimers - Footer now links to /privacy/ and /terms/ OBI CHATBOT GUARDRAILS HARDENED: - NEVER gives legal advice (refuses "am I", "can I", "should I", "will I" questions and redirects to a real consultation) - Refuses off-topic (nutrition, politics, sports, code, etc.) — explicit blocklist - Every answer ends with "general info, not legal advice — call __PHONE__ or email __EMAIL__" - New keyword categories for accident/contract/business/reviews/languages - Never mentions or recommends competitors vCARD / "ADD TO CONTACTS": - /contact.vcf endpoint serves a properly-formatted vCard 3.0 - "Add to Contacts" button on the contact card (next to Get Directions) - iOS, Android, macOS, Outlook compatible https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Documents project structure, tech stack, key file paths, code patterns,
build/deploy setup, and conventions for future AI agent conversations.
https://claude.ai/code/session_01M4PoYY3EJireuPi7hUPYRv