toga-ai 1.0.328 → 1.0.329
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
type: session
|
|
3
|
+
slug: bdr-build
|
|
4
|
+
title: BDR web funnel built through Phase 5 (scaffold to real backend)
|
|
5
|
+
author: tcox
|
|
6
|
+
repos: [bdr, ai-bdr]
|
|
7
|
+
framework: "2.0"
|
|
8
|
+
client: shared
|
|
9
|
+
status: active
|
|
10
|
+
created: 2026-07-14
|
|
11
|
+
updated: 2026-07-14
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Session: bdr-build
|
|
15
|
+
**Date:** 2026-07-14
|
|
16
|
+
**Project/Repo:** bdr (2.0) — local `C:\WWW\BDR`, GitHub `agilantsolutions/BDR`, branch `BDR-Development`
|
|
17
|
+
**Task:** Execute PLAN.md Phases 0-5 of the BDR web funnel: get the repo onto GitHub, scaffold the Next.js app, and build the content layer, component library, all screens/flow, and the real HubSpot/Toga backend.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## What WORKED
|
|
22
|
+
- **Repo now on GitHub.** `C:\WWW\BDR` git-initialized, branched off remote `_main` (README preserved), pushed to `agilantsolutions/BDR` branch **`BDR-Development`** (developer renamed it from feature/initial-plan-and-mockup). 8 commits: `3a1db6b` plan+mockup import (323 files, `.claude/` gitignored), `08eaf65` PLAN.md path/registry fixes, then Phases 0-5.
|
|
23
|
+
- **CLI git auth PERMANENTLY FIXED on this machine.** `git config --global credential.helper manager` + one interactive `git fetch` popped the GCM browser sign-in; credentials stored. Push/fetch now work from CLI for ALL repos incl. the knowledge repo (`/capture` pushes work). The old "push via GitHub Desktop" memory was deleted as obsolete.
|
|
24
|
+
- **Phase 0** (`dcc3e30`): Next.js 16.2.3 + React 19.2.4 + TS scaffold mirroring `info`'s config. Mockup `styles.css` ported as `src/app/studio.css`. `resolveCampaignId` (?campaign= -> hsCampaignId map -> `default`, slug regex `^[a-z0-9][a-z0-9-]{0,63}$`). ESLint flat-config no-em-dash rule (Literal/TemplateElement/JSXText selectors) — proven to fire. amplify.yml + .env.example.
|
|
25
|
+
- **Phase 1** (`960fe34`): `src/content/` schema.ts (CampaignBundle contract), provider.ts (`resolveCampaign` never throws; unknown slug serves DEFAULT content with requested id), hubspotProvider.ts stub (throws, gated on §9.10), useCampaign.tsx context hook, default.ts = mockup copy verbatim extracted by subagent. Vitest wired (server-only shimmed via alias).
|
|
26
|
+
- **Phase 2** (`90fd7ed`): components.jsx ported to 16+ typed client modules (Ico 27-icon registry + iconFor, AgentArt/SmoothImg/TalkingPreview, VoiceDial+VoiceAudio, ColorSelector, SwapFade with settle guards verbatim, Particles, StepRail, SynapseButton...). `src/lib/agentData.ts` (only home for accent hexes) + `assetPath.ts` (replaces ASSET()/window.__resources, preloadAgentAssets). Assets pruned per §5.8 to 6.2MB (Alex slot-1 art+talk video, walkthrough, brand SVGs).
|
|
27
|
+
- **Phase 3** (`64553b1`): Capabilities.tsx fully config-driven (Q&A pill rotation with mockup fade phases + same-tick click guard), thin AgentFlowRoot (accent -> :root, --mx/--my hover, scroll tint), RichText.tsx `agentize()` replaces `<agent>` token with bundle.agent.name. Schema calibrations: `chrome`, eyebrows, `qbank`, connectNote -> {label,value}.
|
|
28
|
+
- **Phase 4** (`85a4772`): useAgentFlow state machine (go()/back map, stepFor, modal gates, aibdr.v2 localStorage — only voice survives refresh), AutoBuild (verbatim ms timeline, lands on CAMPAIGN agent not hardcoded Alex), CallNow, Schedule (12-month, 30-min slots), Success (calling simulation + summaries + AmbientQuestions), Welcome/WelcomeStep2/EarlyAccess modals, leadActions seam stubs. Creator + TweaksPanel deliberately NOT ported (parked, §9.3/§9.7).
|
|
29
|
+
- **Phase 5** (`34a3910`): `src/server/` toga.ts + hubspot.ts ported from `info` with ALL PII logging stripped (identifier-only logs), validation.ts (16KB body cap, phone/uuid/ISO checks), leadSink.ts + callbackService.ts adapters, /api/call-now + /api/call-later + /api/contact route handlers (always envelope-shaped), page.tsx primes lead from ?hsContactId server-side and NEVER fails rendering, leadActions POST for real. info's dead 501 `visit` route dropped deliberately.
|
|
30
|
+
- **Verification discipline held every phase:** tsc + eslint + vitest + next build + live SSR curl checks before each commit. Final: **67 tests / 7 files green**. Live checks: `?campaign=healthcare` -> data-campaign="healthcare"; POST /api/call-now `{}` -> 400 envelope (not 500); missing env -> 500 envelope, funnel still renders.
|
|
31
|
+
- **Subagent pipeline worked well:** 4 background implementer agents (content extraction, component port, Capabilities, Phase 4 flow, Phase 5 backend) each verified before returning; main thread stayed conductor.
|
|
32
|
+
|
|
33
|
+
## What did NOT work — DO NOT RETRY THESE
|
|
34
|
+
- **`sed`/`perl` in-place replacement of literal `\n` escapes through the Bash tool failed silently** (file unchanged; the `\"` expression in the same sed call DID apply — escaping is mangled through the Windows Git Bash wrapper). Fix that worked: the **Edit tool** with exact old/new strings. The mockup's styles.css lines 759 + 840 contain literal `\n` / `\"` sequences (JS-string generation artifacts) that break the CSS parser — already fixed in `src/app/studio.css`; `mockup/styles.css` left pristine (still broken) on purpose.
|
|
35
|
+
- **`pkill` does not kill Windows processes from Git Bash** — it exits quietly and the old `next start` keeps holding port 3000, serving a STALE build (looks like your new code didn't build). Kill via PowerShell `Get-NetTCPConnection -LocalPort 3000 | Stop-Process` or `taskkill //PID <pid> //F` (netstat to find PID).
|
|
36
|
+
- **The Bash tool's cwd resets to `c:\WWW` between some calls** — `npm run <script>` then fails with "Missing script" because c:\WWW has no package.json. Always `cd /c/WWW/BDR &&` first.
|
|
37
|
+
- **Pre-commit path scan regex missed `c:\WWW\...` single-backslash absolute paths** (pattern only matched escaped/forward-slash forms) — PLAN.md was pushed with machine paths in it (git-workflow violation), fixed in follow-up `08eaf65`. Scan for `[A-Za-z]:[\\/]` case-insensitively next time.
|
|
38
|
+
- **ESLint linted `mockup/**` (110 errors)** until `mockup/**` was added to globalIgnores — the prototype is reference material, not shipped code.
|
|
39
|
+
- **CLI push/fetch without GCM sign-in**: `fatal: could not read Username` — resolved permanently (see What WORKED); do not fall back to GitHub Desktop workflows.
|
|
40
|
+
|
|
41
|
+
## Not tried yet (candidates for next session)
|
|
42
|
+
- **§9.10 decision (gates Phase 6):** how campaign content is modeled in HubSpot (HubDB likely vs custom object; nested Q&A pool/sets/callSummaries are the hard part). Needs the HubSpot instance owner. Then: implement hubspotProvider (fetch by slug + map + revalidation cache + no-em-dash normalization), seed campaign 1 from default.ts, slim DEFAULT to engineering fallback.
|
|
43
|
+
- **Phase 6:** second campaign (healthcare proof points already in the Q pool) proving zero-code campaign adds.
|
|
44
|
+
- **Phase 7:** pixel-parity pass vs mockup screens/screenshots, GA4 (react-ga4 installed, not wired), accessibility.
|
|
45
|
+
- **Phase 8:** Amplify SSR app creation + env vars (values from info's deployment), `togatech` integration mechanism (§9.6), PR + merge strategy for `BDR-Development` -> `_main`.
|
|
46
|
+
- **Local run QA:** developer was about to `npm run dev` and walk the funnel; feedback may yield fidelity fixes.
|
|
47
|
+
- Success screen consuming `submitOk` (currently exposed by useAgentFlow, not yet surfaced in UI).
|
|
48
|
+
|
|
49
|
+
## Current file state
|
|
50
|
+
| File | Status | Notes |
|
|
51
|
+
|------|--------|-------|
|
|
52
|
+
| `C:\WWW\BDR` (whole repo) | 8 commits pushed to `BDR-Development` | Working tree clean at `34a3910`. No PR opened (developer said "no PR to do yet"). |
|
|
53
|
+
| `src/app/` | layout + page (server: resolve slug -> bundle -> lead prime) + studio.css (fixed) + api/{call-now,call-later,contact} | |
|
|
54
|
+
| `src/content/` | schema.ts, default.ts (mockup copy interim), provider.ts, hubspotProvider.ts (throwing stub), useCampaign.tsx | |
|
|
55
|
+
| `src/components/`, `src/flow/`, `src/server/`, `src/lib/` | Complete per phases 2-5 | Creator/TweaksPanel not ported (parked). |
|
|
56
|
+
| `test/` (7 files, 67 tests) | All green | Includes route validation, CST formatting, slots, phone. |
|
|
57
|
+
| `knowledge/2.0/apps/ai-bdr/*` (team repo) | NOT yet re-synced with Phase 3/4 schema calibrations or build progress | `/capture` pending — run it next session start or after QA. |
|
|
58
|
+
|
|
59
|
+
## Decisions made
|
|
60
|
+
- **No Tailwind** (deviation from mirroring info): Tailwind 4's preflight reset would fight the mockup's hand-authored CSS and threaten pixel parity; PLAN §5.1 makes it optional. Rejected: including it for config parity.
|
|
61
|
+
- **DEFAULT bundle carries the mockup's copy verbatim as interim dev content** (documented in default.ts header) until HubSpot is seeded post-§9.10, then slim to engineering fallback. Rejected: building screens against lorem-ipsum minimal DEFAULT (no parity possible).
|
|
62
|
+
- **Schema calibrated by building, not upfront:** Phase 3/4 added chrome, qbank, eyebrows, earlyAccess/phone/recap groups, connectNote {label,value}, template tokens `<agent>/<date>/<tz>/<time>/<detail>`. The §6 sketch was a starting point; the code schema is now the contract.
|
|
63
|
+
- **AutoBuild lands on `bundle.agent`**, not hardcoded Alex — agent identity is campaign config (PLAN §2.2 design implication).
|
|
64
|
+
- **info's `visit` route dropped** (permanent 501 stub, no caller): dead attack surface. Recorded in contact route header.
|
|
65
|
+
- **PII logging stripped at port time** (info debt): identifier-only logs everywhere; Toga error paths strip query strings (contact lookup carries email in query).
|
|
66
|
+
- **`.claude/` harness gitignored** in the BDR repo (machine-local, installed via npx toga-ai; committing snapshots the whole KB stale).
|
|
67
|
+
- **GCM one-time sign-in** chosen over GitHub Desktop-only pushes: fixes CLI push machine-wide, permanently.
|
|
68
|
+
|
|
69
|
+
## Blockers
|
|
70
|
+
- **§9.10 HubSpot content mechanism undecided** — gates hubspotProvider + campaign seeding (Phase 6). Owner: whoever runs the HubSpot instance.
|
|
71
|
+
- **First-campaign direction/copy from leadership** still pending (fills bundle 1, doesn't block engine work).
|
|
72
|
+
- **Real-call testing needs env values** (HUBSPOT_ACCESS_TOKEN + 4 TOGA_* vars) from info's deployment — deliberate action, hits live Toga and can trigger an actual callback.
|
|
73
|
+
|
|
74
|
+
## Exact next step
|
|
75
|
+
> `cd C:\WWW\BDR && npm run dev`, open http://localhost:3000, walk the full funnel (Welcome -> Build my agent -> AutoBuild -> Capabilities -> Call Now/Schedule -> Success) side-by-side with `mockup/AI BDR (standalone).html`, and note fidelity gaps for the Phase 7 parity pass. Then run `/capture` to re-sync the ai-bdr knowledge docs (schema calibrations + build progress).
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
_Saved by /session-save on 2026-07-14_
|
package/package.json
CHANGED