summaryrefslogtreecommitdiff
path: root/CLAUDE.md
diff options
context:
space:
mode:
authorPeter Stone <thepeterstone@gmail.com>2026-03-04 11:12:37 -1000
committerPeter Stone <thepeterstone@gmail.com>2026-03-04 11:12:37 -1000
commit4853a4a917bb7942776ffd8b3e003ee03fc49160 (patch)
tree6c1ba3ba7df13353caa73b96e9c7caa35f3269cf /CLAUDE.md
parentec7d895c00c571b37ad9255b99b2e1756776c9e1 (diff)
chore: move role definitions to ~/.claude/roles, trim CLAUDE.md and DESIGN.md
Role prompts extracted to ~/.claude/roles/ (project-agnostic). CLAUDE.md slimmed from 87→72 lines, references global methodology. DESIGN.md trimmed ~200 lines of duplicated workflow content. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md81
1 files changed, 33 insertions, 48 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index b773025..f3bc629 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -1,43 +1,21 @@
-# Claude Code Project Guidelines
+# Task Dashboard — Project Guidelines
-## Project Overview
+## Overview
A unified web dashboard aggregating Trello, Todoist, PlanToEat, Google Calendar, and Google Tasks.
**Stack:** Go 1.24 + chi router + HTMX + Tailwind CSS + SQLite.
-## Key Documents (Read These First)
+## Development Standards
+See `~/.claude/CLAUDE.md` for methodology (TDD, workflow, state management, efficiency, git practices).
+Agent roles defined in `~/.claude/roles/`.
+
+## Key Documents
| Document | Purpose | When to Read |
|----------|---------|--------------|
-| `DESIGN.md` | Authoritative design doc: architecture, patterns, visual design, dev guide | Before any significant work |
+| `DESIGN.md` | Architecture, features, visual design, dev patterns | Before any significant work |
| `SESSION_STATE.md` | Current task state, next steps | Start of every session |
| `docs/adr/*.md` | Architecture Decision Records | Before implementing features in that area |
-### Multi-Agent Workflow (Optional)
-
-Role definitions exist for a three-agent pipeline (`ARCHITECT_ROLE.md`, `IMPLEMENTOR_ROLE.md`, `REVIEWER_ROLE.md`) but the **primary workflow is single-agent** — reading CLAUDE.md + DESIGN.md directly. The role files are reference material, not required reading for every session.
-
-**Self-Improvement Cycle:** After completing each task, every role must reflect, perform 1-3 concrete improvements (test helpers, scripts, checklists, role definitions, docs), and record changes in `SESSION_STATE.md` → "Process Improvements". See each role file for role-specific details.
-
-## Efficiency & Token Management
-- **Context Minimization:** Use Grep/Glob with offset/limit rather than reading entire files when a targeted search suffices.
-- **Surgical Edits:** Perform small, targeted file edits. Avoid rewriting entire files for single changes.
-- **Dependency Awareness:** Use `go test`, `go build` to verify state rather than reasoning through logic.
-- **Proactive Checkpointing:** Treat every 3-4 turns as a potential session end. Update `SESSION_STATE.md` frequently.
-
-## Workflow: TDD — ALWAYS Write Tests First
-**Every bug fix and feature MUST follow Test-Driven Development:**
-1. **Red:** Write a failing test that reproduces the bug or specifies the new behavior.
-2. **Green:** Write the minimum code to make the test pass.
-3. **Refactor:** Clean up if needed, keeping tests green.
-
-**No exceptions.** Do not skip to writing production code. If you find a bug, write a test that fails first, then fix it. This applies to template assertions, handler logic, store queries, and JS behavior (via template content tests).
-
-### Plan-then-Execute
-1. **Discovery:** Use terminal tools to locate relevant Go code/handlers.
-2. **Planning:** Propose a specific plan and **wait for user confirmation** before editing.
-3. **Execution:** Apply changes incrementally, verifying with `go test ./...`.
-4. **Handoff:** If a task is incomplete or the user mentions "limit" or "handoff," immediately summarize progress in `SESSION_STATE.md`.
-
## Essential Commands
- **Run:** `go run cmd/dashboard/main.go`
- **Test:** `go test ./...`
@@ -54,13 +32,6 @@ Role definitions exist for a three-agent pipeline (`ARCHITECT_ROLE.md`, `IMPLEME
- **Resolve bug:** `bash scripts/resolve-bug <id>` — marks a bug as resolved
- **Always check production logs first** when debugging reported issues
-## State Management
-- **SESSION_STATE.md:** The source of truth for resuming work. Must include:
- - Current Task Goal
- - Completed Items
- - **Next 3 Specific Steps**
-- **Status tags:** `[TODO]` → `[IN_PROGRESS]` → `[REVIEW_READY]` → `[APPROVED]` (or `[NEEDS_FIX]`)
-
## Technical Context
- **Trello is PRIMARY:** Key + Token required in query params.
- **Architecture:** chi router → Handlers (`internal/handlers/`) → Store (`internal/store/sqlite.go`).
@@ -73,14 +44,28 @@ Role definitions exist for a three-agent pipeline (`ARCHITECT_ROLE.md`, `IMPLEME
- Prioritize terminal-based verification over manual code review.
- **Patterns:** See `DESIGN.md` → Development Guide for handler/template patterns.
-## Test Quality Checklist
-When writing or reviewing tests, verify:
-- **Effective:** Assertions match test name. Test would fail if code was broken.
-- **Clear:** Arrange-Act-Assert structure. Descriptive names like `TestHandler_MissingField_Returns400`.
-- **Complete:** Happy path + error cases + edge cases. Bug fixes include regression tests.
-
-## Documentation
-- **ADR-first:** Capture architectural decisions in `docs/adr/*.md`, not one-off design docs.
-- **Update DESIGN.md** for new features, endpoints, or schema changes.
-- **Do NOT create** standalone design documents—use ADRs instead.
-
+## Configuration Reference
+
+**Required:**
+- `TODOIST_API_KEY` — Todoist API key
+- `TRELLO_API_KEY` — Trello API key
+- `TRELLO_TOKEN` — Trello token
+- `DEFAULT_PASS` — Admin password
+
+**Optional:**
+- `DEFAULT_USER` (default: "admin")
+- `PLANTOEAT_SESSION` — PlanToEat session cookie
+- `PLANTOEAT_API_KEY` — PlanToEat API key
+- `GOOGLE_CREDENTIALS_FILE` — OAuth credentials JSON path
+- `GOOGLE_CALENDAR_ID` (default: "primary") — comma-separated for multiple
+- `GOOGLE_TASKS_LIST_ID` (default: "@default")
+- `WEBAUTHN_RP_ID` — Passkey Relying Party ID (e.g., "doot.terst.org")
+- `WEBAUTHN_ORIGIN` — Passkey expected origin (e.g., "https://doot.terst.org")
+- `DATABASE_PATH` (default: "./dashboard.db")
+- `PORT` (default: "8080")
+- `CACHE_TTL_MINUTES` (default: 5)
+- `TIMEZONE` (default: "Pacific/Honolulu")
+- `TEMPLATE_DIR` (default: "web/templates")
+- `STATIC_DIR` (default: "web/static")
+- `MIGRATION_DIR` (default: "migrations")
+- `DEBUG` (default: false)