diff --git a/.claude/.ralph-loop.local.md b/.claude/.ralph-loop.local.md deleted file mode 100644 index e29ea25..0000000 --- a/.claude/.ralph-loop.local.md +++ /dev/null @@ -1,86 +0,0 @@ -# Ralph Loop State - -**Status**: ACTIVE -**Iteration**: 12 -**Started**: 2024-01-13T22:20:00+01:00 -**Max Iterations**: 50 -**Completion Promise**: EXPERTISE_REFRESH_DONE - -## Mission - -Build Botsmann as a three-tier private AI node ecosystem: individuals, professionals, and their connections. - -## Current Task - -P12 - RAG Demo Complete - Ready for Next Phase - -## Completed - -- P9: Initial audit plan created -- P10: **FULL SITE AUDIT** - See `.claude/FULL_SITE_AUDIT.md` -- P11: **STRATEGIC DOCUMENTS CREATED**: - - `.claude/FULL_SITE_AUDIT.md` - What's broken - - `.claude/BILLION_DOLLAR_STRATEGY.md` - Technical architecture - - `.claude/HONEST_REBUILD_PLAN.md` - Consulting-first bootstrap - - `.claude/THREE_TIER_ECOSYSTEM.md` - Complete business model -- P12: **RAG DEMO BUILT**: - - `/lib/rag/search.ts` - Keyword-based search with TF-IDF-like scoring - - `/lib/rag/index.ts` - Module exports - - `/data/demo/swiss-german-knowledge.json` - 15 knowledge chunks - - `/app/api/demo/chat/route.ts` - Chat API with Zod validation - - `/app/demo/page.tsx` - Beautiful chat UI with suggestions - - Homepage "Try the Demo" button added - -## The Vision - -Three-tier private AI node ecosystem: - -1. **Individuals**: Personal nodes at home (doctor, lawyer, advisor AI) -2. **Professionals**: Business nodes for firms (shared knowledge base) -3. **Connections**: Clients temporarily share data with professionals - -## Progress Made (This Session) - -### Fixed (Previous) - -1. Homepage stats - Changed from fake "6+ AI Bots" to honest values -2. ConsultationForm - Now calls real `/api/contact` endpoint -3. Created `/api/contact` route - Stores submissions to JSON file -4. Fixed bot try links - Only bots with actual GPT links marked as "live" -5. Homepage featured bots - Only Heidi marked live, others marked "soon" -6. BotPageTemplate - Now provides `hasExternalLink` boolean -7. Homepage hero - "Your Data. Your AI. Your Control." -8. Featured section - "Private AI Assistants" with honest descriptions -9. How It Works - Updated to consulting flow -10. CTAs - Changed to "Book a Consultation" and "See How It Works" - -### Built (This Session) - -1. RAG Search Module (`/lib/rag/`) - - Keyword-based search with TF-IDF-like scoring - - Question matching boost - - Template-based response generation -2. Swiss German Knowledge Base (15 chunks) - - Greetings, numbers, food, directions - - Culture, quiet hours, dialects - - Work, transport, shopping, expressions, weather -3. Demo Chat API (`/app/api/demo/chat/route.ts`) - - Zod validation - - Returns sources with relevance scores -4. Demo Page (`/app/demo/page.tsx`) - - Beautiful chat interface - - Suggested questions - - Source citations - - Technical details section -5. Homepage "Try the Demo" button - -### Still Pending - -1. Set up Supabase for production data persistence (requires user account setup) -2. Extend RAG demo with Ollama integration (for real LLM responses) - -### Short-term Goals - -1. First consulting client -2. Technical blog posts -3. Individual node MVP diff --git a/docs/BEST_PRACTICES.md b/docs/BEST_PRACTICES.md index 646203c..bfb29b3 100644 --- a/docs/BEST_PRACTICES.md +++ b/docs/BEST_PRACTICES.md @@ -77,14 +77,14 @@ import { BOTS } from '@/data/bots'; **In Practice:** -| Layer | Responsibility | Location | -| ---------- | ---------------- | --------------- | -| Pages | Routing, layout | `app/` | -| Components | UI rendering | `components/` | -| Hooks | State logic | `lib/hooks/` | -| Services | API calls | `lib/services/` | -| Utilities | Pure functions | `lib/` | -| Types | Type definitions | `types/` | +| Layer | Responsibility | Location | +| ---------- | ---------------- | ------------- | +| Pages | Routing, layout | `app/` | +| Components | UI rendering | `components/` | +| Hooks | State logic | `lib/hooks/` | +| API | Route helpers | `lib/api/` | +| Utilities | Pure functions | `lib/` | +| Types | Type definitions | `types/` | **Bad:** diff --git a/docs/SHARED_CONTEXT.md b/docs/SHARED_CONTEXT.md index 544817b..eb39408 100644 --- a/docs/SHARED_CONTEXT.md +++ b/docs/SHARED_CONTEXT.md @@ -208,7 +208,7 @@ User → components/*Form.tsx | `data/bots.ts` | Bot configurations | Adding/editing bots | | `app/layout.tsx` | Root layout | Global UI changes | | `lib/config/navigation.ts` | Nav config (SSOT) | Adding nav items | -| `tailwind.config.js` | Theme config | Styling changes | +| `app/globals.css` | Theme (`@theme`) | Styling changes | | `types/*.ts` | Type definitions | Data structure changes | --- diff --git a/docs/SUPABASE_SETUP.md b/docs/SUPABASE_SETUP.md index 2962fa5..11935ea 100644 --- a/docs/SUPABASE_SETUP.md +++ b/docs/SUPABASE_SETUP.md @@ -57,8 +57,9 @@ Current state: 11 migrations applied, 13 tables in the schema. ### Adding one -1. Add `supabase/migrations/0NN_what_it_does.sql`. Keep it forward-only and - non-destructive, or the deploy will refuse it. +1. Add `supabase/migrations/_what_it_does.sql` (the next number + after the highest one there). Keep it forward-only and non-destructive, or + the deploy will refuse it. 2. Open a PR. Merging deploys it and applies it. A genuinely destructive change is applied by hand, then recorded so the diff --git a/docs/AUDIT_REPORT.md b/docs/archive/AUDIT_REPORT.md similarity index 100% rename from docs/AUDIT_REPORT.md rename to docs/archive/AUDIT_REPORT.md diff --git a/docs/DATA_ROOM_GUIDE.md b/docs/archive/DATA_ROOM_GUIDE.md similarity index 100% rename from docs/DATA_ROOM_GUIDE.md rename to docs/archive/DATA_ROOM_GUIDE.md diff --git a/docs/README-heidi-implementation.md b/docs/archive/README-heidi-implementation.md similarity index 100% rename from docs/README-heidi-implementation.md rename to docs/archive/README-heidi-implementation.md diff --git a/docs/archive/README.md b/docs/archive/README.md new file mode 100644 index 0000000..f3127b6 --- /dev/null +++ b/docs/archive/README.md @@ -0,0 +1,3 @@ +# Archive + +Historical records. They describe the day they were written, not the code today; do not act on them.