Decisions Log

kennjordan
← All sections

Decisions Log

Key choices made in building the platform, with rationale. Newest first.

2026-04-23

CPD Activity funnel panel instead of surfacing the generic ep-courses Activity tab

The ep-courses plugin shipped a built-in Activity tab (landing view, CTA click, viewer view, lesson complete, course complete) designed for the s2l.online enrolment model. On CPD there are no traditional courses to enrol in; the product is an AI interview leading to a personalised pathway of Vimeo videos. Surfacing the stock tab would have shown near-empty data and given stakeholders nothing to react to. Built a CPD-specific “CPD Activity” admin panel inside ep-cpd-interview, with a six-stage funnel (landing view → interview start → interview complete → pathway view → first video play → multi-video session), specialty distribution pulled from completed interview profiles, and a top-watched videos table backed by the inventory taxonomy. Brand-matched: Fraunces heads, Inter body, deep teal bars with coral accent. Lives at /admin/plugins under EP CPD Interview → CPD Funnel.

2026-04-23

Event logging duplicated inline in CPD plugins rather than exposing ep-courses log_event

ep-courses has a private log_event() helper that writes to pm_ep_events. Two options to share it with ep-cpd-home and ep-cpd-interview: (a) promote it to public on ep-courses, (b) reimplement a ~10-line INSERT helper in each CPD plugin. Chose (b): keeps ep-courses unchanged so that plugin stays in lock-step with its s2l.online twin (Kenn’s client) and avoids cross-plugin coupling where one plugin depends on a public API of another. Cost is a duplicate helper; benefit is that ep-courses remains a zero-touch shared dependency.

2026-04-23

Extended pm_ep_events with session_id + meta columns rather than overloading existing fields

The base pm_ep_events schema (owned by ep-courses) has course_slug VARCHAR(191) and lesson_sort INT. Could have crammed interview session IDs into course_slug and vimeo IDs into lesson_sort, but that muddies semantics for anyone reading the shared Activity tab later. Added two new columns via a defensive column-check ALTER in ep-cpd-interview’s construct(): session_id VARCHAR(64) and meta VARCHAR(191). Additive-only, does not break ep-courses reads, and keeps CPD event metadata self-describing. Check-then-ALTER pattern mirrors what ep-courses already does for its own additive schema evolution.

2026-04-23 late

Modal video player on pathway page instead of redirecting to /watch/

Personalised pathway cards open each lecture in an inline modal with a Vimeo iframe, rather than sending the user to the full course viewer. Rationale: the pathway is ephemeral per interview session and not a persistent enrolment, so the full viewer with progress tracking would be overkill. Modal is fast, focused, keeps the user in the pathway context.

2026-04-23 late

Claude API key lives in PageMotor admin, not FPM env

Initially stored the Anthropic key as an FPM pool environment variable. Switched to reading from PageMotor's built-in Architect_AI_Claude_ai option (editable via /admin/ai/). Single source of truth, Hasmukh can rotate without SSH access, no FPM reload needed.

2026-04-23 late

All MLUCT videos whitelisted for cpd.medilearn.africa embed

Batch-authorised the entire 300-video UCT library for embedding on the CPD domain in one API run. Takes ~60 seconds. Previous whitelisting was only for s2l.online; the new domain needed its own entry on each video. Videos retain their password protection for direct vimeo.com access.

2026-04-23 late

External JS file instead of inline script blocks

PageMotor's content pipeline HTML-encodes ampersands inside CMS page content, which breaks inline JavaScript (&& becomes &&). Moved all interactive scripts (interview chat, pathway modal) into separate .js files served as static assets. Belt-and-braces fix for a gnarly silent failure mode.

2026-04-23 evening

Full rebrand over cloned S2L chrome

Both sites inherited S2L's theme when we cloned from s2l.online. Rather than modifying theme files, each site got a small *-brand plugin that renders site chrome via [shell-start]/[shell-end] shortcodes and hides the S2L chrome via body:has() CSS selectors. Keeps theme untouched, makes branding per-site, and the pattern is reusable for any future spin-off.

2026-04-23 evening

AI interview powered by Claude Sonnet 4.5 via Anthropic API

Chose Sonnet 4.5 over cheaper Haiku because the interview needs conversational warmth and good follow-up judgement. Cost ~£0.02 per interview which is a rounding error. Max-tokens capped at 500 per response to keep interviews punchy. System prompt lives inside the plugin class so it can be iterated without schema changes.

2026-04-23

Prototype over plan

Chose to build a working prototype ahead of finalising brand, content pathways, or business model. Rationale: “a good prototype is better than a great plan” — easier for Hasmukh and UCT to react to something concrete than to a slide deck. All naming and positioning choices are explicitly marked as reversible.

2026-04-23

Use cpd.medilearn.africa for the platform and documentation.mobilearn.africa for the docs

Subdomains on existing owned TLDs: no domain purchase cost, fast to set up, both reversible. The naming aligns with the audience: medilearn for medical CPD (the product), mobilearn for MobiLearn project assets (the docs).

2026-04-23

Target FCP candidates, not neurologists specifically

Original brief: neurology conference tool. Content audit revealed the entire FCP curriculum is well-covered (211h, 28 specialties) but no siloed neurology library. Pivoting to an FCP platform with specialty pathways (including neurology) maximises the value of existing content while keeping the neurology conference use case as a valid entry point.

2026-04-23

Anthropic API over Max subscription for the interview

Claude Max covers personal Claude Code usage, not production apps serving end users. The platform needs its own Anthropic API account. Cost estimate: ~£0.02–0.05 per full interview (Sonnet 4.5, 5–8 exchanges). 100 attendees ≈ £5.

2026-04-23

Reuse ep-courses plugin infrastructure from s2l.online

The ep-courses plugin built for s2l already handles Vimeo integration, course/lesson models, viewer UI, activity tracking, and landing pages. Copying that wholesale into the new CPD install removes weeks of work. The CPD-specific home page is a thin new plugin (ep-cpd-home) that composes existing parts.