A pathway node is one step on a person's journey. It can be a piece of content, an action, a referral, an assessment, a community resource, or a civic opportunity. Each node has a type that determines how it renders, what it requires, and what it unlocks. New node types can be added by a Chamber of Health Director or FFH content manager without changing any code — they just populate a new row in the pathway_nodes table with the right type tag and content.
- 🎥 Video: "How Blood Pressure Works"
- 📊 Visual: Infographic — The Diabetes Risk Spectrum
- 🎵 Audio: Dr. Rob Medical Minutes podcast episode
- 📖 Reading: Deep-dive article on sleep apnea
- 🎮 Game: Prevention Bingo condition card
- 🔬 Sim: 360 Human Explorer 3D body system
- 🧠 Quiz: Pre/post knowledge assessment
- 🚶 30-day walking challenge with streak tracker
- ⚖️ Weekly weight check-in
- 🥗 Nutrition log — 7-day healthy meal streak
- 😴 Sleep quality journal — 14-night baseline
- 💊 Medication adherence tracker
- 🧘 5-minute daily breathing challenge
- 🩸 After-meal blood sugar awareness walk
- 📲 Share health check link with 3 people
- 👨👩👧👦 Invite family to Fit Family Pathway
- 🩺 Send pathway report to your doctor
- 📣 Post milestone to social media
- 🤝 Present at a community meeting
- 🏫 Share with a teacher or school
- ⚖️ Contact rep about health legislation
- ✍️ Sign a community health petition
- 🙋 Volunteer for a community project
- 💛 Donate to the FFH Foundation
- 🏛️ Attend a Chamber of Health meeting
- 🎤 Submit public comment on a local ordinance
- 📊 FFH PHIT™ trail day participation
- 🩺 Full STOP-BANG sleep apnea screener
- 📊 PHQ-9 depression screener (full version)
- 🥗 Detailed food security / SDOH assessment
- 💊 Medication adherence deep screener
- 🏠 Housing stability assessment
- 💰 Financial stress screener → benefits matching
- 🧒 Age-appropriate health literacy pre-test
- 📝 Pre-appointment question builder
- 🩺 Pre-appointment question list generator
- 📱 Telemedicine visit booking (partner links)
- 😴 Sleep study referral checklist
- 🧪 Lab test explainer (what to ask for)
- 💉 Vaccination reminder + locator
- 🦷 Dental clinic locator (oral-heart connection)
- 👁️ Vision / hearing screening reminder
- 🤝 CHW (Community Health Worker) assignment
- 🏥 FQHC / sliding-scale clinic finder
- 🥦 Farmers market + SNAP Double-Up location
- 🚶 Walking group meeting time and place
- 🌱 Community garden plot availability
- 🏋️ Free / low-cost recreation center
- 🍱 Meals on Wheels enrollment form
- 🚌 Medical transportation assistance
- 🐕 Companion animal programs (loneliness / mental)
- 📚 Library health literacy programs
- 🤝 AA / NA / support group meeting
- 🏘️ Housing application assistance
- 🛒 SNAP eligibility check + application link
- 🏥 Medicaid / marketplace insurance navigator
- 💊 Medicare Part D drug cost comparison
- 🏠 Section 8 / housing voucher application guide
- 📋 Insurance appeal letter template
- 💰 How to get cheaper insurance (ACA tips)
- 🎓 Free GED / job training programs
- 🚗 Reduced-cost transportation to care
- 👴 Supplemental Security Income (SSI) guide
- 🍼 WIC program enrollment
- 🎸 Arts therapy referral
- 🌐 Language-specific culturally adapted content
- 🦺 Workplace wellness challenge node
- 🏫 School-based health education module
- 📡 Wearable device integration prompt
- 🤖 Dr. Rob AI consultation node
- 🌍 International / global health resource
- ⛪ Faith community health program
- 🧑⚕️ Certified Patient milestone node
-- Every user's routing profile. Written once, read everywhere. CREATE TABLE user_profiles ( id uuid PRIMARY KEY, org_id uuid, -- white-label tenant goals text[], -- ['weight','diabetes','heart'] learning_styles text[], -- ['visual','audio','simulation'] risk_flags jsonb, -- {heart:'moderate', sleep:'high'...} situation jsonb, -- {activity:2, diet:3, food_access:'no'} zip_code text, coins integer DEFAULT 0, rank text DEFAULT 'explorer', created_at timestamptz DEFAULT NOW() );
-- Every piece of content in the ecosystem. Tagged so the engine can route to it. CREATE TABLE content_objects ( id uuid PRIMARY KEY, title text, description text, node_type text, -- 'learn'|'live'|'share'|'ours'|'assess'|'clinical'|'resource'|'benefit'|'custom' content_types text[], -- ['video','visual','game','audio','reading','social','tracker','simulation'] health_topics text[], -- ['heart','diabetes','sleep','mental','lungs','sdoh',...] goal_tags text[], -- ['weight','diabetes','heart','move','eat','family','community'] phase text, -- 'learn'|'live'|'share'|'ours' difficulty integer, -- 1–5 duration_min integer, -- estimated completion time coins_reward integer, prerequisite_ids uuid[], -- what must be complete before this unlocks trigger_conditions jsonb,-- {risk_flag:'high', situation_key:'food_access', value:'no'} source_module text, -- 'bingo_cardiovascular'|'you_do_matter'|'chamber_local'|... url text, org_id uuid, -- null = global; set = org-specific (white-label) active boolean DEFAULT TRUE, created_by text -- 'ffh_team'|'director_[id]'|'community_partner' );
-- The assembled pathway for a specific user. Generated by the routing function, stored here. CREATE TABLE pathway_routes ( id uuid PRIMARY KEY, user_id uuid REFERENCES user_profiles, content_id uuid REFERENCES content_objects, position integer, -- order on the pathway status text, -- 'locked'|'available'|'started'|'complete'|'skipped' priority_score float, -- computed by routing function (higher = earlier) style_match float, -- 0–1: overlap between user learning_styles and content_types unlocked_at timestamptz, completed_at timestamptz, coins_earned integer );
-- Director-managed. A Director logs in and adds local resources. Auto-appears on maps and pathways. CREATE TABLE community_resources ( id uuid PRIMARY KEY, name text, resource_type text, -- 'park'|'food'|'clinic'|'program'|'benefit'|'volunteer'|'event' goal_tags text[], -- matches content_objects.goal_tags taxonomy zip_codes text[], -- can serve multiple ZIPs lat float, lng float, address text, description text, url text, phone text, hours text, cost text, -- 'free'|'sliding_scale'|'low_cost'|'varies' sdoh_flags text[], -- ['food_access','housing','transportation','insurance'] director_id uuid, -- who added it verified boolean, active boolean DEFAULT TRUE, event_dates jsonb -- for events: [{date, time, recurring}] );
-- Runs when a user completes onboarding or updates their profile. -- Returns ranked list of content_objects for this user. FUNCTION build_pathway(user_id uuid) RETURNS pathway_routes[]: profile = SELECT * FROM user_profiles WHERE id = user_id candidates = SELECT * FROM content_objects WHERE active = true AND (org_id IS NULL OR org_id = profile.org_id) AND goal_tags && profile.goals -- array overlap AND check_trigger_conditions(node, profile) FOR EACH candidate: style_match = |content_types ∩ mapped_style_tags(profile.learning_styles)| / |content_types| risk_score = risk_relevance(health_topics, profile.risk_flags) goal_score = |goal_tags ∩ profile.goals| / |goal_tags| priority = (goal_score * 0.5) + (risk_score * 0.3) + (style_match * 0.2) RETURN candidates ORDER BY priority DESC, phase_order ASC -- phase_order: assess > learn > live > share > ours
A Chamber of Health Director in a small rural town should be able to add "Here is where you can get a CHW assigned to your case" as a pathway node — without calling a developer. A national organization should be able to add "Here is how to get Meals on Wheels" that appears for users over 65 with limited mobility, everywhere in the country. The system accommodates both without code changes.
🟢 Level 1: Content Manager Adds a Node
No code. Log in to the FFH Admin Dashboard, click "Add Content," fill out the form. The node appears on pathways for users whose profile matches the tags.
- Write a title and description
- Pick the node type (Learn / Live / Assessment / Clinical / Resource / Benefit / Custom)
- Tag with health topics, goals, and content types
- Set trigger conditions (e.g., "only show if food_access = 'no'")
- Add a URL or action
- Set coin reward and prerequisite (optional)
- Publish → appears immediately on matching pathways
🟡 Level 2: Chamber of Health Director Adds Local Resources
A Director logs into their Chamber of Health dashboard and adds local resources for their community. These automatically appear on the pathway maps and resource nodes for users in their ZIP codes.
- Add a farmers market: name, address, ZIP, hours, SNAP-accepted, goal_tags: ['food','diabetes']
- Add a walking group: time, location, ZIP, goal_tags: ['move','heart','social']
- Add a CHW program: phone, eligibility, ZIP range, resource_type: 'clinical'
- Add a local health event: date, time, location, recurring schedule
- Add a Meals on Wheels contact: phone, eligibility_conditions: ['age>65','mobility_limited']
- Add a housing application help service, an insurance navigator, a free clinic night
🔵 Level 3: FFH Team Adds a New Node Type
When a genuinely new kind of step is needed — not just new content but a new behavior — the FFH team defines a new type tag and a rendering template. One developer, one afternoon.
- Define the new type string (e.g., 'wearable_sync', 'dr_rob_consult', 'certified_patient_milestone')
- Add rendering logic in the Pathway component (one switch-case)
- Document the new type in this architecture file
- All future content tagged with this type renders correctly
⚙️ Trigger Condition Examples
Every node can have zero or more trigger conditions. If conditions exist, the node only appears when all are met. This is what makes the pathway adaptive without rule engines.
{"risk_flag": "sleep", "min_level": "moderate"}→ only show sleep apnea screening if moderate+ risk{"situation_key": "food_access", "value": "no"}→ only show SNAP node if food access was flagged{"goal": "diabetes", "fam_diabetes": "yes"}→ prioritize CDC NDPP for family history{"age_min": 65}→ show Meals on Wheels only for users 65+{"zip_codes": ["17201","17202"]}→ show this local resource only in these ZIPs{"completed_node": "uuid-of-prerequisite"}→ unlock after completing another step{"org_id": "uuid-of-partner"}→ show only to users of a specific white-label partner{"insurance": "none"}→ show insurance navigator only to uninsured users
This is Maria, 44. She selected goals: lose weight, understand diabetes (dad has it), reduce stress. Learning style: videos and games. Food access: limited. The pathway below was assembled by the routing function from those inputs. Every node type from the inventory is represented.
This is the SKILL.md file to install in the CoWork / Claude skill system. It gives any future Claude session — building any FFH module — complete context on the Pathway Engine: the node types, the data model, the tagging taxonomy, the routing logic, and the extensibility rules. When this skill is active, Claude never builds a one-off page again. Every new module plugs into the ecosystem correctly.
--- name: ffh-pathway-engine description: > The FFH Pathway Engine architecture, data model, node type taxonomy, content tagging system, routing logic, and extensibility protocol for the Force for Health Network. TRIGGER THIS SKILL for ANY conversation involving the Living Wellness Pathway, individual pathway steps, content recommendations, community resource matching, learning style routing, goal-based content filtering, or adding new stepping stones to the pathway. Also trigger for: "what goes on a pathway," "add a new node," "how does content get matched," "tagging content," "routing users to content," "community resources on the pathway," "extensible pathway," or any reference to the Me/We/Ours framework in a technical context. This skill coordinates all other FFH skills — it is the connective layer. --- # FFH Pathway Engine — Master Architecture ## What This Is The Pathway Engine is the adaptive routing layer that assembles a personalized route through the FFH ecosystem for each user. It is NOT a page or a module. It is the data model + routing function that connects every module. Every piece of content in the FFH ecosystem must be registered as a content_object in Supabase with the correct tag arrays. The routing function reads those tags against the user's profile and returns a ranked, sequenced pathway. Adding new content = adding a row to the table. No code. ## The Nine Node Types Every pathway step is one of these types. New types can be added by defining a type string and a rendering template — no schema change. learn — Education content (video, visual, audio, game, reading, simulation) live — Behavior challenge, tracker, daily habit, streak share — Social sharing, referral, community multiplier ours — Civic action, volunteer, donation, legislation assess — Deeper validated screener that changes routing clinical — Doctor prep, telemedicine, CHW, clinic finder, referral resource — Director-managed local resource (park, market, program, clinic) benefit — SNAP, Medicaid, insurance, housing, transportation, WIC custom — Any new type defined by Director or FFH team. Open slot. ## Content Tagging Taxonomy Every content_object row MUST have: content_types — video | visual | audio | simulation | reading | social | game | tracker health_topics — heart | diabetes | sleep | mental | lungs | sdoh | weight | ... goal_tags — weight | diabetes | heart | sleep | stress | move | eat | family | community node_type — one of the nine types above trigger_conditions — jsonb — optional conditions that must be met for node to appear Learning style → content_type mapping: visual → [video, visual] audio → [audio] simulation → [simulation, game] social → [social] reading → [reading] ## Routing Priority Formula priority = (goal_score * 0.5) + (risk_score * 0.3) + (style_match * 0.2) goal_score = overlap between content goal_tags and user.goals risk_score = relevance of health_topics to user risk_flags style_match = overlap between content_types and user learning_styles ## Extensibility Rules (NEVER BREAK THESE) 1. New content = new row in content_objects. Never hardcode. 2. New local resource = Director adds via dashboard. ZIP + goal_tags required. 3. New node type = new type string + rendering case. One dev, one afternoon. 4. Trigger conditions = jsonb on each row. No rule engine needed. 5. White-label org_id isolation is mandatory on every query. ## Key Supabase Tables user_profiles — goals[], learning_styles[], risk_flags jsonb, situation jsonb content_objects — node_type, content_types[], goal_tags[], trigger_conditions jsonb pathway_routes — assembled pathway per user, status, priority_score community_resources — Director-managed, zip_codes[], goal_tags[], event_dates jsonb ## The Me / We / Ours Framework Every pathway exists in three rings: Me — individual health check, education, trackers, clinical navigation We — family pathway, shared activities, family tracker and report Ours — civic action, community projects, legislation, volunteer, donate The pathway engine routes users through all three rings based on their goals and engagement level. A user who selects 'community' as a goal gets Ours nodes earlier. A user who selects 'family' gets We nodes earlier. ## What Claude Should Do With This Skill When building ANY new FFH page or module: - Register new content as content_objects with correct tags - Never hardcode resource lists — they belong in community_resources - Every new page should expose its content to the pathway engine via tags - Use the nine node types as the vocabulary for all pathway decisions - When a user describes a new stepping stone ("CHW assignment", "Meals on Wheels", "cheaper insurance guide") — identify the node_type, define trigger_conditions, and describe the content_objects row — don't build a one-off page ## Reference Files Load these when needed: references/node-types.md — Full inventory with examples per type references/supabase-schema.sql — Complete table definitions references/routing-function.sql — Full routing pseudocode + SQL references/content-taxonomy.md — Complete tag vocabulary references/director-guide.md — How Directors add/manage resources