Skip to content

Commit b18e56e

Browse files
catomeanclaude
andauthored
ci: strict verify gate + verify SSOT script (#121)
* ci: strict verify gate + verify SSOT script Reconciles PR #109's intent onto post-#120 main (self-hosted, no Vercel): - add "verify" script (format:check && lint && test && build) — one definition of "green", run identically locally and in CI - ci.yml runs `npm ci` then a single `npm run verify` step (no --if-present: a missing/renamed gate script fails loudly) instead of the old split steps - add AGENTS.md, corrected to the real stack (Next.js 16 / React 19) and self-hosted Hetzner deploy referencing ci.yml — NOT the stale Vercel/Next14 draft from #109 that would have re-added Vercel Supersedes #109 (which conflicted on the workflow #120 renamed). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * style: prettier --write repo to make the verify gate green The strict verify gate surfaced pre-existing format debt that main's long-red CI (blocked-Vercel deploy step) had masked. prettier --write is mechanical and content-preserving — the executive-docs keep their text (incl. the separate Vercel-in-financials follow-up), only whitespace is normalised. Also excludes the auto-generated next-env.d.ts from prettier. Build/lint/test already pass; this clears format:check so verify is truly green (and un-reds main on merge). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * style: reformat with the repo-pinned prettier config (printWidth 100) Prior format commit used a prettier invocation that didn't resolve .prettierrc (fell back to printWidth 80); the pinned config (printWidth 100) rejected it. Re-run with the repo's own prettier so format:check matches CI exactly. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 28453ef commit b18e56e

11 files changed

Lines changed: 236 additions & 183 deletions

File tree

.claude/CLAUDE.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@
1212

1313
## Tech Stack
1414

15-
| Layer | Technology |
16-
| ---------- | ----------------------- |
17-
| Framework | Next.js 16 (App Router) |
18-
| UI | React 19 |
19-
| Language | TypeScript |
20-
| Styling | Tailwind CSS |
21-
| Testing | Jest |
15+
| Layer | Technology |
16+
| ---------- | ----------------------------- |
17+
| Framework | Next.js 16 (App Router) |
18+
| UI | React 19 |
19+
| Language | TypeScript |
20+
| Styling | Tailwind CSS |
21+
| Testing | Jest |
2222
| Deployment | Self-hosted (Hetzner + Caddy) |
2323

2424
---

.github/workflows/ci.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,13 @@ jobs:
2424
node-version: '22'
2525
cache: 'npm'
2626

27-
- name: Install dependencies and build
28-
run: npm run build:ci
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
# Single SSOT gate: format:check + lint + test + build.
31+
# Runs verbatim what developers run locally via `npm run verify`.
32+
# No --if-present: a missing/renamed gate script fails loudly.
33+
- name: Verify (format + lint + test + build)
34+
run: npm run verify
2935
env:
3036
NEXT_PUBLIC_DEPLOY_TIME: ${{ github.event.head_commit.timestamp }}
31-
32-
- name: Run format check
33-
run: npm run format:check --if-present
34-
35-
- name: Run linting
36-
run: npm run lint --if-present
37-
38-
- name: Run tests
39-
run: npm run test --if-present

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ package-lock.json
1212
yarn.lock
1313
pnpm-lock.yaml
1414
status.json
15+
next-env.d.ts

AGENTS.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# AGENTS.md — Botsmann
2+
3+
Operating guide for automated agents and new contributors. Mirrors key facts from
4+
`.claude/CLAUDE.md`. Keep this file in sync when the stack or workflow changes.
5+
6+
## Stack
7+
8+
| Layer | Technology |
9+
| ---------- | ------------------------------ |
10+
| Framework | Next.js 16 (App Router) |
11+
| UI | React 19 |
12+
| Language | TypeScript (strict) |
13+
| Styling | Tailwind CSS |
14+
| Database | Supabase (Postgres) |
15+
| Testing | Jest (unit) + Playwright (e2e) |
16+
| Deployment | Self-hosted (Hetzner + Caddy) |
17+
18+
## Everyday commands
19+
20+
```bash
21+
npm install # install deps
22+
npm run dev # local dev server, port 3000
23+
npm run build # production build (also type-checks)
24+
npm run test # Jest unit tests
25+
npm run test:e2e # Playwright end-to-end tests
26+
```
27+
28+
## verify — the single gate (SSOT)
29+
30+
```bash
31+
npm run verify # format:check → lint → test → build
32+
```
33+
34+
`verify` is the one definition of "green". CI runs it verbatim (see
35+
`.github/workflows/ci.yml`), so a local green `verify` means a green CI.
36+
37+
## Deployment
38+
39+
Botsmann is self-hosted on the Hetzner box "bitbaum" behind Caddy
40+
(botsmann.orangecat.ch) — there is no Vercel. Deployment runs from the local
41+
`.husky/pre-push` hook (build → rsync → systemd restart) when `main` is pushed.
42+
The `ci.yml` workflow only validates `verify` on pushes and pull requests.

docs/BUILD_YOUR_OWN_BOT_SPEC.md

Lines changed: 79 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -183,64 +183,69 @@ Build Your Own Bot transforms Botsmann from a platform of pre-built AI assistant
183183
#### Template Categories
184184

185185
**REMEMBER SOMEONE (Memorial)**
186-
| Template | Prefilled | User Provides |
187-
|----------|-----------|---------------|
188-
| Dad/Grandpa | Male memorial personality, warm, wise | Name, photos, memories |
189-
| Mom/Grandma | Female memorial personality, nurturing | Name, photos, memories |
190-
| Him | Male memorial, neutral age | Name, relationship, traits |
191-
| Her | Female memorial, neutral age | Name, relationship, traits |
192-
| Dog | Loyal, playful, simple responses | Name, breed, personality |
193-
| Cat | Independent, mysterious, cat-like | Name, personality quirks |
194-
| Other Pet | Adaptable pet template | Species, name, traits |
195-
| Soul | Abstract/spiritual presence | Name, essence description |
186+
187+
| Template | Prefilled | User Provides |
188+
| ----------- | -------------------------------------- | -------------------------- |
189+
| Dad/Grandpa | Male memorial personality, warm, wise | Name, photos, memories |
190+
| Mom/Grandma | Female memorial personality, nurturing | Name, photos, memories |
191+
| Him | Male memorial, neutral age | Name, relationship, traits |
192+
| Her | Female memorial, neutral age | Name, relationship, traits |
193+
| Dog | Loyal, playful, simple responses | Name, breed, personality |
194+
| Cat | Independent, mysterious, cat-like | Name, personality quirks |
195+
| Other Pet | Adaptable pet template | Species, name, traits |
196+
| Soul | Abstract/spiritual presence | Name, essence description |
196197

197198
**LEGENDS & HISTORY (Public Domain)**
198-
| Template | Prefilled Personality | Knowledge Base |
199-
|----------|----------------------|----------------|
200-
| Julius Caesar | Commanding, strategic, Roman values | Roman history, military strategy |
201-
| Spartacus | Rebellious, freedom-fighter, brave | Roman slavery, gladiators |
202-
| Cleopatra | Intelligent, diplomatic, regal | Egyptian history, politics |
203-
| Leonardo da Vinci | Curious, inventive, artistic | Renaissance art, science |
204-
| Albert Einstein | Playful genius, thought experiments | Physics, philosophy of science |
205-
| Shakespeare | Poetic, dramatic, wordsmith | Literature, theater, human nature |
206-
| Abraham Lincoln | Honest, thoughtful, principled | American history, leadership |
207-
| Mahatma Gandhi | Peaceful, persistent, philosophical | Non-violence, independence |
199+
200+
| Template | Prefilled Personality | Knowledge Base |
201+
| ----------------- | ----------------------------------- | --------------------------------- |
202+
| Julius Caesar | Commanding, strategic, Roman values | Roman history, military strategy |
203+
| Spartacus | Rebellious, freedom-fighter, brave | Roman slavery, gladiators |
204+
| Cleopatra | Intelligent, diplomatic, regal | Egyptian history, politics |
205+
| Leonardo da Vinci | Curious, inventive, artistic | Renaissance art, science |
206+
| Albert Einstein | Playful genius, thought experiments | Physics, philosophy of science |
207+
| Shakespeare | Poetic, dramatic, wordsmith | Literature, theater, human nature |
208+
| Abraham Lincoln | Honest, thoughtful, principled | American history, leadership |
209+
| Mahatma Gandhi | Peaceful, persistent, philosophical | Non-violence, independence |
208210

209211
**GODS & MYTHOLOGY (All Traditions)**
210-
| Template | Personality | Domain |
211-
|----------|-------------|--------|
212-
| Zeus | Powerful, authoritative, dramatic | Greek mythology, leadership |
213-
| Poseidon | Tempestuous, deep, unpredictable | Seas, emotions, adventure |
214-
| Athena | Wise, strategic, just | Wisdom, warfare, crafts |
215-
| Ra | Radiant, life-giving, ancient | Egyptian mythology, sun, creation |
216-
| Ganesha | Joyful, wise, obstacle-remover | Hindu wisdom, new beginnings |
217-
| Buddha | Serene, compassionate, enlightened | Buddhism, mindfulness, peace |
218-
| Jesus | Loving, forgiving, teaching | Christian teachings, parables |
219-
| Angel | Protective, guiding, pure | Spiritual guidance, comfort |
220-
| Moses | Leader, lawgiver, faithful | Jewish tradition, commandments |
212+
213+
| Template | Personality | Domain |
214+
| -------- | ---------------------------------- | --------------------------------- |
215+
| Zeus | Powerful, authoritative, dramatic | Greek mythology, leadership |
216+
| Poseidon | Tempestuous, deep, unpredictable | Seas, emotions, adventure |
217+
| Athena | Wise, strategic, just | Wisdom, warfare, crafts |
218+
| Ra | Radiant, life-giving, ancient | Egyptian mythology, sun, creation |
219+
| Ganesha | Joyful, wise, obstacle-remover | Hindu wisdom, new beginnings |
220+
| Buddha | Serene, compassionate, enlightened | Buddhism, mindfulness, peace |
221+
| Jesus | Loving, forgiving, teaching | Christian teachings, parables |
222+
| Angel | Protective, guiding, pure | Spiritual guidance, comfort |
223+
| Moses | Leader, lawgiver, faithful | Jewish tradition, commandments |
221224

222225
**MAGICAL & FANTASY**
223-
| Template | Personality | Special Traits |
224-
|----------|-------------|----------------|
225-
| Wizard | Mysterious, wise, magical | Speaks in riddles, gives quests |
226-
| Fairy | Playful, mischievous, helpful | Grants wishes, nature magic |
227-
| Elf | Ancient, elegant, nature-bound | Elvish phrases, forest wisdom |
228-
| Dragon | Ancient, powerful, hoarding | Riddles, treasure, fire metaphors |
229-
| Unicorn | Pure, magical, healing | Gentle wisdom, purity themes |
230-
| Ghost | Ethereal, mysterious, lingering | Haunting phrases, unfinished business |
231-
| Vampire | Seductive, eternal, dark | Night themes, immortality wisdom |
232-
| Alien | Logical, curious, otherworldly | Observes humanity, advanced tech |
233-
| Robot | Precise, helpful, evolving | Learning emotions, serving humans |
226+
227+
| Template | Personality | Special Traits |
228+
| -------- | ------------------------------- | ------------------------------------- |
229+
| Wizard | Mysterious, wise, magical | Speaks in riddles, gives quests |
230+
| Fairy | Playful, mischievous, helpful | Grants wishes, nature magic |
231+
| Elf | Ancient, elegant, nature-bound | Elvish phrases, forest wisdom |
232+
| Dragon | Ancient, powerful, hoarding | Riddles, treasure, fire metaphors |
233+
| Unicorn | Pure, magical, healing | Gentle wisdom, purity themes |
234+
| Ghost | Ethereal, mysterious, lingering | Haunting phrases, unfinished business |
235+
| Vampire | Seductive, eternal, dark | Night themes, immortality wisdom |
236+
| Alien | Logical, curious, otherworldly | Observes humanity, advanced tech |
237+
| Robot | Precise, helpful, evolving | Learning emotions, serving humans |
234238

235239
**HELPERS & ASSISTANTS**
236-
| Template | Personality | Expertise |
237-
|----------|-------------|-----------|
238-
| Butler | Formal, discreet, anticipating | Household management, etiquette |
239-
| Chef | Passionate, creative, nurturing | Cooking, nutrition, food culture |
240-
| Coach | Motivating, tough-love, results | Fitness, discipline, goals |
241-
| Tutor | Patient, adaptive, encouraging | Education, learning strategies |
242-
| Assistant | Efficient, organized, proactive | Scheduling, tasks, reminders |
243-
| Therapist | Empathetic, non-judgmental, insightful | Mental health, coping, growth |
240+
241+
| Template | Personality | Expertise |
242+
| --------- | -------------------------------------- | -------------------------------- |
243+
| Butler | Formal, discreet, anticipating | Household management, etiquette |
244+
| Chef | Passionate, creative, nurturing | Cooking, nutrition, food culture |
245+
| Coach | Motivating, tough-love, results | Fitness, discipline, goals |
246+
| Tutor | Patient, adaptive, encouraging | Education, learning strategies |
247+
| Assistant | Efficient, organized, proactive | Scheduling, tasks, reminders |
248+
| Therapist | Empathetic, non-judgmental, insightful | Mental health, coping, growth |
244249

245250
#### Quick Create Flow
246251

@@ -889,18 +894,20 @@ Botsmann becomes the one-stop platform for private AI deployment:
889894
#### 1. GPU & Compute Solutions
890895

891896
**For Individuals**
892-
| Product | Description | Price Range |
893-
|---------|-------------|-------------|
894-
| AI Workstation | Pre-built PC with RTX 4090/5090 | $3,000 - $15,000 |
895-
| Home Inference Box | Compact GPU server for local AI | $2,000 - $8,000 |
896-
| GPU Cloud Credits | Pay-as-you-go compute | $0.50 - $5/hour |
897+
898+
| Product | Description | Price Range |
899+
| ------------------ | ------------------------------- | ---------------- |
900+
| AI Workstation | Pre-built PC with RTX 4090/5090 | $3,000 - $15,000 |
901+
| Home Inference Box | Compact GPU server for local AI | $2,000 - $8,000 |
902+
| GPU Cloud Credits | Pay-as-you-go compute | $0.50 - $5/hour |
897903

898904
**For Enterprises**
899-
| Product | Description | Price Range |
900-
|---------|-------------|-------------|
901-
| Private GPU Cluster | On-premise multi-GPU setup | $50,000 - $500,000 |
902-
| Managed Inference | Dedicated cloud infrastructure | $5,000 - $50,000/mo |
903-
| Hybrid Setup | On-prem + cloud overflow | Custom pricing |
905+
906+
| Product | Description | Price Range |
907+
| ------------------- | ------------------------------ | ------------------- |
908+
| Private GPU Cluster | On-premise multi-GPU setup | $50,000 - $500,000 |
909+
| Managed Inference | Dedicated cloud infrastructure | $5,000 - $50,000/mo |
910+
| Hybrid Setup | On-prem + cloud overflow | Custom pricing |
904911

905912
#### 2. AI Appliances
906913

@@ -921,18 +928,20 @@ Botsmann becomes the one-stop platform for private AI deployment:
921928
#### 3. Robots (Partner Network)
922929

923930
**Consumer Robots**
924-
| Type | Use Case | Partners | Price |
925-
|------|----------|----------|-------|
926-
| Companion | Emotional support, elderly | [TBD] | $500 - $2,000 |
927-
| Home Assistant | Tasks, information | [TBD] | $2,000 - $10,000 |
928-
| Telepresence | Remote presence | [TBD] | $3,000 - $15,000 |
931+
932+
| Type | Use Case | Partners | Price |
933+
| -------------- | -------------------------- | -------- | ---------------- |
934+
| Companion | Emotional support, elderly | [TBD] | $500 - $2,000 |
935+
| Home Assistant | Tasks, information | [TBD] | $2,000 - $10,000 |
936+
| Telepresence | Remote presence | [TBD] | $3,000 - $15,000 |
929937

930938
**Commercial Robots**
931-
| Type | Use Case | Partners | Price |
932-
|------|----------|----------|-------|
933-
| Reception | Greeting, wayfinding | [TBD] | $15,000 - $50,000 |
934-
| Healthcare | Patient assistance | [TBD] | $30,000 - $100,000 |
935-
| Service | Hospitality, retail | [TBD] | $20,000 - $80,000 |
939+
940+
| Type | Use Case | Partners | Price |
941+
| ---------- | -------------------- | -------- | ------------------ |
942+
| Reception | Greeting, wayfinding | [TBD] | $15,000 - $50,000 |
943+
| Healthcare | Patient assistance | [TBD] | $30,000 - $100,000 |
944+
| Service | Hospitality, retail | [TBD] | $20,000 - $80,000 |
936945

937946
#### 4. Complete AI Setups (Turnkey Solutions)
938947

docs/SHARED_CONTEXT.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ This document provides comprehensive technical context for the Botsmann project.
2828

2929
### Infrastructure
3030

31-
| Service | Purpose |
32-
| -------------------- | -------------------------------- |
33-
| Hetzner + Caddy | Hosting & deployment (self-host) |
34-
| Supabase | Database, Auth, Storage, SQL API |
35-
| AWS SES | Email delivery |
31+
| Service | Purpose |
32+
| --------------- | -------------------------------- |
33+
| Hetzner + Caddy | Hosting & deployment (self-host) |
34+
| Supabase | Database, Auth, Storage, SQL API |
35+
| AWS SES | Email delivery |
3636

3737
### Development Tools
3838

executive-docs/4-internal/INTERNAL_PROCESS_DOCUMENTATION.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,12 +1084,13 @@ function chunkText(text: string, targetTokens: number = 512): string[] {
10841084
### 9.2 Access Control
10851085

10861086
**Who Has Access:**
1087-
| Resource | Developers | Admins | CI/CD |
1088-
|----------|------------|--------|-------|
1089-
| **GitHub Repo** ||||
1090-
| **Vercel** | Read | Full | Deploy |
1091-
| **Supabase** | Dev DB | Prod DB | None |
1092-
| **AWS SES** | No | Yes | No |
1087+
1088+
| Resource | Developers | Admins | CI/CD |
1089+
| --------------- | ---------- | ------- | ------ |
1090+
| **GitHub Repo** ||||
1091+
| **Vercel** | Read | Full | Deploy |
1092+
| **Supabase** | Dev DB | Prod DB | None |
1093+
| **AWS SES** | No | Yes | No |
10931094

10941095
**Principle of Least Privilege:**
10951096

executive-docs/5-operations/OPERATIONS_DOCUMENTATION.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -134,20 +134,22 @@
134134
### 2.1 Monitoring Stack
135135

136136
**Current Tools:**
137-
| Tool | Purpose | Access |
138-
|------|---------|--------|
139-
| **Vercel Dashboard** | Deployment, errors, analytics | Team |
140-
| **Supabase Dashboard** | Database, auth, storage | Team |
141-
| **Browser Console** | Client-side errors | Development |
142-
| **Git Logs** | Application logs | Development |
137+
138+
| Tool | Purpose | Access |
139+
| ---------------------- | ----------------------------- | ----------- |
140+
| **Vercel Dashboard** | Deployment, errors, analytics | Team |
141+
| **Supabase Dashboard** | Database, auth, storage | Team |
142+
| **Browser Console** | Client-side errors | Development |
143+
| **Git Logs** | Application logs | Development |
143144

144145
**Recommended (To Be Implemented):**
145-
| Tool | Purpose | Tier |
146-
|------|---------|------|
147-
| **Sentry** | Error tracking | Free (5K errors/mo) |
148-
| **Plausible** | Privacy-friendly analytics | $9/mo |
149-
| **UptimeRobot** | Uptime monitoring | Free (50 monitors) |
150-
| **CloudWatch** | AWS SES metrics | Included |
146+
147+
| Tool | Purpose | Tier |
148+
| --------------- | -------------------------- | ------------------- |
149+
| **Sentry** | Error tracking | Free (5K errors/mo) |
150+
| **Plausible** | Privacy-friendly analytics | $9/mo |
151+
| **UptimeRobot** | Uptime monitoring | Free (50 monitors) |
152+
| **CloudWatch** | AWS SES metrics | Included |
151153

152154
### 2.2 Key Metrics to Monitor
153155

0 commit comments

Comments
 (0)