Skip to content

Add HARMONICA.md — persistent org context for AI facilitator#44

Open
zhiganov wants to merge 17 commits intomasterfrom
feature/harmonica-md
Open

Add HARMONICA.md — persistent org context for AI facilitator#44
zhiganov wants to merge 17 commits intomasterfrom
feature/harmonica-md

Conversation

@zhiganov
Copy link
Member

Summary

  • Conversational AI onboarding that generates a HARMONICA.md document with 8 sections (About, Goals, Participants, Vocabulary, Prior Decisions, Facilitation Preferences, Constraints, Success Patterns)
  • Settings editor tab with collapsible section cards, character counter, and "Regenerate with AI" dialog
  • Runtime injection of owner's HARMONICA.md into every facilitation prompt

Changes

  • Migration 036: adds harmonica_md TEXT column to users table
  • API route (/api/onboarding/chat): LLM asks 3-4 questions, outputs <HARMONICA_MD> block
  • OnboardingChat component: 3-phase flow (chat → section review → save)
  • HarmonicaMdTab: structured editor in Settings with 8 collapsible sections
  • Dashboard: new users without HARMONICA.md see onboarding in welcome banner
  • llamaUtils.ts: fetches session owner's HARMONICA.md and prepends to system prompt

Addresses HAR-16, HAR-17, HAR-18.

Test plan

  • Run migration (npm run migrate or direct SQL via Neon)
  • New user dashboard → onboarding chat appears → complete it → HARMONICA.md saved
  • Settings > HARMONICA.md tab → content loads, sections editable, save works
  • "Skip for now" → persists across page loads via localStorage
  • "Regenerate with AI" in Settings opens onboarding chat dialog
  • Create session, send message → check server logs for "Organizational Context" in system prompt
  • Character limit enforced at 6000

🤖 Generated with Claude Code

Add conversational AI onboarding that generates a HARMONICA.md document
with 8 sections (About, Goals, Participants, Vocabulary, Prior Decisions,
Facilitation Preferences, Constraints, Success Patterns). Includes:

- DB migration (036) adding harmonica_md column to users table
- Onboarding chat API route with LLM-powered questionnaire
- OnboardingChat component (chatting → reviewing → saved flow)
- Settings editor tab with collapsible section cards
- Dashboard integration showing onboarding for new users
- Runtime injection into facilitation prompts via session owner lookup

Addresses HAR-16, HAR-17, HAR-18.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 21, 2026

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

Project Deployment Actions Updated (UTC)
harmonica-web-app Ready Ready Preview, Comment Feb 21, 2026 7:17pm
harmonica-web-app-dev Ready Ready Preview, Comment Feb 21, 2026 7:17pm

Request Review

zhiganov and others added 3 commits February 21, 2026 16:56
upsertUser() was setting name from Auth0 on every login, reverting
any name the user had manually saved in Settings.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The top-right user button was reading from Auth0's session (which
returns the identity provider name/email), not the user-editable
display name saved in the database.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Embedding the full chat widget in the welcome banner was cramped
and confusing. Now shows a clean prompt with a button that opens
the onboarding chat in a proper dialog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Frosted glass card (white/60 + backdrop-blur) with amber border that
blends into the welcome banner gradient. Staggered entrance animation
for context hints (team, goals, preferences). Opens chat in dialog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
zhiganov and others added 2 commits February 21, 2026 17:11
router.push('/api/auth/logout') fails because Next.js client router
can't handle API routes that return HTTP redirects. Use full page
navigation instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…nner

The auto-generated "Default" key was never shown to the user (raw key
hashed and discarded), making it impossible to use. Replaced with a
banner that creates a key on click and reveals the claude mcp install
command inline with copy button.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Shows the claude mcp add-json command template with placeholder below
the keys table, always visible. Users no longer need to create a new
key just to see the install command format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The deleteUserAccount action was failing silently because api_keys and
session_ratings rows referencing the user weren't deleted before the
user record, likely hitting FK constraints.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Both the onboarding skip and connect-AI-tools dismiss flags were stored
with a fixed key, so skipping on one account would hide the banners for
all accounts in the same browser. Now keyed by Auth0 user sub.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
zhiganov and others added 2 commits February 21, 2026 17:51
The initial LLM call with empty messages was failing (500) because
Anthropic requires at least one user message. Replaced with a hardcoded
greeting for instant response. Also fixed the logo aspect ratio —
image is 128x55, was forced to w-7 h-7 (square).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The CTA card already has a skip button, and the dialog has a close X.
Only show skip in standalone (non-embedded) mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Block click-outside and Escape key from closing the dialog to prevent
losing in-progress onboarding chat. User can still close via the X
button intentionally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
All references to oldspeak.notion.site (Help Center, Privacy Policy,
Beginners Guide) now point to the Mintlify docs site.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 7 custom events across signup-to-completion funnel to enable native
PostHog Funnels: user_signed_up, onboarding_completed, onboarding_skipped,
session_created, session_shared, participant_joined, session_completed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace bare window.confirm() dialogs with an AlertDialog requiring users
to type "DELETE" before the button activates. Set a sessionStorage flag
during deletion to prevent InvitationProcessor from re-creating the user
via syncCurrentUser() during the feedback delay before logout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Auth0's default logout only clears the Auth0 session but doesn't notify
identity providers. Adding federated logout tells Google/GitHub to forget
the account selection, so users see the account picker on next sign-in.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant