Sixhats

Sixhats is a web app built on Edward de Bono's Six Thinking Hats framework, using AI to structure decision-making across six analytical lenses. Its standout feature is Debate Mode, which streams five Claude Haiku instances in parallel before synthesizing a final recommendation with Claude Sonnet. Built with React, Express, and SQLite, it deploys anywhere via Docker with session persistence and export support.

Sixhats

Six Thinking Hats AI

What is this?

Edward de Bono’s Six Thinking Hats is a 40-year-old method for structured parallel thinking.
Instead of one perspective dominating a decision, you examine it through six distinct lenses,
facts (White), emotions (Red), risks (Black), benefits (Yellow), alternatives (Green), and
process (Blue), each in turn.

This tool automates that structure. Pick a hat and describe your decision, or run Debate Mode
to stream five AI perspectives simultaneously, then synthesize them with Claude Sonnet into a
decisive recommendation. Sessions persist, share by link, and export to Markdown or PDF.

Live demo

Try the live demo: Should I quit my job to start a company?

This is a pre-seeded Debate Mode session, no sign-up required, no API key needed.
The app itself is rate-limited (30 requests/min per IP) but the demo link is read-only
and accessible without the token.

Debate Mode -five AI perspectives on a single decision, synthesized by Claude

Six Hats thinking session analyzing "Should I quit my job to start a company?" with White, Red, Black, Yellow, and Green hat perspectives

 

Multi-agent Debate Mode

Debate Mode is the technical headliner. Five Claude Haiku instances stream in parallel, each
taking a distinct analytical stance on the same question. When all five finish, Claude Sonnet
reads their outputs and synthesizes a final recommendation.

This is not sequential AI prompting with a “now summarize” step. It is genuine parallel execution:
five concurrent SSE streams, one shared session, one synthesis call that reads all five before
responding. The result is a recommendation that has genuinely considered opposing perspectives,
not just the loudest one.

The per-hat tab UI

Each analytical lens lives in its own tab. Switch between White (facts), Red (emotion), Black (risk),
Yellow (benefit), and Green (alternatives) to navigate a session. A Debate tab appears automatically
when a session contains a multi-agent debate.

Per-hat tab view – each analytical lens has its own organized thread

Six Hats thinking session interface showing empty White Hat view for the question "Should I quit my job to start a company?

 

 

Deploy anywhere

No cloud-specific platform required. One Node.js process serves both the API and the built Vite
client. Runs on any VPS, home server, or Docker host.

# Clone and configure
git clone https://forgejo.familytechlab.com/frank/sixhats.git
cp .env.example .env
# Set: CLAUDE_API_KEY, APP_TOKEN (also set as VITE_APP_TOKEN for the client build)

# Build and run with Docker
docker compose up -d --build

# The app is now at http://localhost:3001
# Proxy with Caddy (see Caddyfile.snippet in the repo)

Security model

The APPTOKEN is intentionally included in the client bundle as a shared secret for solo-user
access control. Any developer who opens DevTools can extract it in 30 seconds, this is
security-by-obscurity, not real auth.

The actual defense is rate limiting on /api/generate (30 req/min per IP) and /api/debate
(5 req/min per IP) plus a configurable daily spend cap via DAILYCOSTCAPCENTS. For a
personal single-user tool, this is the right tradeoff. The architecture preserves the auth
retrofit path: userid TEXT DEFAULT 'anonymous' is already in the schema, and getRateLimitKey(req)
is already factored for a one-line swap when real auth lands.

For a multi-user deployment, replace APPTOKEN with Authentik OIDC (already in the infrastructure)
and scope sessions and usage logs by user_id.

Architecture

client/       Vite 6 + React 19 + Tailwind 4 (SPA)
server/       Express 4 + better-sqlite3 (API + SSE streaming)
shared/       Hat types, prompts, model routing (isomorphic)
data/         SQLite DB (gitignored, volume-mounted in Docker)
dist/         Built client assets (served by Express in production)

Model routing (shared/hats.ts):

  • Single-hat queries + Debate-mode perspectives → claude-haiku-4-5
  • Full Spectrum + Debate-mode synthesis → claude-sonnet-4-6

Development

cp .env.example .env.local
# fill in CLAUDE_API_KEY, APP_TOKEN, VITE_APP_TOKEN (same value as APP_TOKEN)

npm install
npm run dev
# Express backend → :3001, Vite dev server → :3000 (proxies /api to backend)
npm run build   # Vite build → dist/
npm start       # NODE_ENV=production tsx server/index.ts

Health check: GET /health{ ok: true, uptime, version }

Issues and roadmap: Forgejo