summaryrefslogtreecommitdiff
path: root/CLAUDE.md
blob: dbef146bfff1707b3daba9374ad49b5dbeed4099 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Claude Code Project Guidelines

## Project Overview
A unified web dashboard aggregating Trello (PRIMARY), Todoist, Obsidian, and PlanToEat. 
**Stack:** Go backend + HTMX + Tailwind CSS + SQLite.

## Efficiency & Token Management
- **Context Minimization:** Do not read entire files if `grep`, `sed`, or `ls` can answer a question.
- **Surgical Edits:** Perform small, targeted file edits. Avoid rewriting entire files for single changes.
- **Dependency Awareness:** Use `go test`, `go build`, and `lint` to verify state rather than asking the agent to "think" through logic.
- **Proactive Checkpointing:** Treat every 3-4 turns as a potential session end. Update `SESSION_STATE.md` frequently.

## Workflow: 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 ./...`
- **Build:** `go build -o dashboard cmd/dashboard/main.go`

## State Management
- **SESSION_STATE.md:** The source of truth for resuming work. It must include:
    - Current Task Goal
    - Completed Items
    - Architecture Decisions
    - **Next 3 Specific Steps**

## Technical Context
- **Trello is PRIMARY:** Key + Token required in query params.
- **Architecture:** chi router -> Handlers (`internal/handlers/`) -> Store (`internal/store/sqlite.go`).
- **Errors:** Partial data/cache fallback preferred over hard failure.

## Coding Style
- Use concise, idiomatic Go.
- Avoid verbose explanations or comments for self-evident logic.
- Prioritize terminal-based verification over manual code review.