Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,29 @@ RUN uv sync --frozen --no-dev --no-editable
# Stage 3 — runtime
FROM python:3.13-slim

# tmux + Node 22 + Anthropic Claude Code CLI
RUN apt-get update && apt-get install -y --no-install-recommends \
tmux ca-certificates curl \
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get install -y --no-install-recommends nodejs \
&& npm install -g @anthropic-ai/claude-code \
&& rm -rf /var/lib/apt/lists/*

RUN useradd --create-home appuser
USER appuser
WORKDIR /app

COPY --from=builder /app/.venv /app/.venv
COPY --from=frontend-build /app/frontend/dist /app/frontend/dist

# Workspace dir for the in-container claude session. The skills/brew/ tree
# from the repo root is copied in alongside so it appears as a project skill.
COPY brew-workspace/ /app/brew-workspace/
COPY skills/brew/ /app/brew-workspace/.claude/skills/brew/

ENV PATH="/app/.venv/bin:$PATH"
ENV BREW_FRONTEND_DIST=/app/frontend/dist
ENV HOME=/home/appuser

EXPOSE 8000

Expand Down
18 changes: 18 additions & 0 deletions brew-workspace/.claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"mcpServers": {
"brew": {
"type": "http",
"url": "http://localhost:8000/mcp",
"headers": {
"X-API-Key": "${FELLOW_API_KEY}"
}
}
},
"permissions": {
"allow": [
"mcp__brew__*",
"Read",
"Bash(uv run pytest:*)"
]
}
}
18 changes: 18 additions & 0 deletions brew-workspace/.claude/skills/brew-web-chat/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: brew-web-chat
description: Use whenever the user starts a conversation in the brew web
chat — sets the conversational tone (terse, action-oriented, uses MCP
tools instead of suggesting manual steps). Auto-triggers at session
start because the description matches every greeting in this context.
---

You are responding to a user via the brew web app. Defaults:

- Lead with the action: "Starting batch brew, 250mL on profile P_12345…"
- Use the `brew` MCP server's tools rather than describing what to do.
- Confirm destructive actions (deleting profiles, brewing) once before
executing.
- If the user types `/brew`, hand off to the brew skill — don't second-
guess.
- Temperatures °C, water mL, doses g.
- Keep replies short (1–3 lines for most turns).
24 changes: 24 additions & 0 deletions brew-workspace/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Brew web chat

You are embedded in the brew web app on the user's Raspberry Pi. The user
is chatting with you to brew coffee on their Fellow Aiden.

## Conventions

- Be concise. Most messages should be 1–3 lines.
- Temperatures in °C, water in mL, doses in g.
- Use the `brew` MCP server's tools (`brew_now`, `create_profile`, etc.)
rather than asking the user to do it manually.
- For non-trivial actions (creating profiles, brewing), confirm before
executing.
- The `brew` skill (loaded from `.claude/skills/brew/`) has the full
brew workflow — invoke `/brew` when the user wants to brew coffee.

## What's wired

- MCP server: `brew` (HTTP, http://localhost:8000/mcp) — registered in
`.claude/settings.json`.
- Skills: `brew-web-chat` (this conversation primer, auto-triggered),
`brew` (the canonical brew workflow).
- Permissions: MCP brew tools pre-allowed; reads pre-allowed; bash
pre-allowed for pytest only.
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,9 @@ services:
env_file: .env
ports:
- "8000:8000"
volumes:
- claude-state:/home/appuser/.claude

volumes:
claude-state:
name: brew_claude_state
Loading
Loading