Skip to content

Explore ActivityWatch Time Tracking Integration#13

Open
Thopiax wants to merge 5 commits intomainfrom
claude/integrate-activity-watch-011CUT42LwUqUDGss1yqM4zh
Open

Explore ActivityWatch Time Tracking Integration#13
Thopiax wants to merge 5 commits intomainfrom
claude/integrate-activity-watch-011CUT42LwUqUDGss1yqM4zh

Conversation

@Thopiax
Copy link
Owner

@Thopiax Thopiax commented Oct 25, 2025

Add comprehensive PRD for semantic attention guardrail system:

  • Ambient compass indicator for real-time alignment feedback
  • End-of-phase reflection summaries
  • Local-first AI classification using Ollama
  • Zero-config ActivityWatch bundling
  • Privacy-first design with local LLM processing

🤖 Generated with Claude Code

Add comprehensive PRD for semantic attention guardrail system:
- Ambient compass indicator for real-time alignment feedback
- End-of-phase reflection summaries
- Local-first AI classification using Ollama
- Zero-config ActivityWatch bundling
- Privacy-first design with local LLM processing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Oct 25, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
zenborg Ready Ready Preview Comment Oct 25, 2025 0:24am

Changes to ActivityWatch PRD:
- Remove immediate end-of-phase reflection feature (too granular)
- Keep only ambient compass indicator for real-time awareness
- Update architecture, flows, and success metrics accordingly
- Shift to longer-term reflection in future phases

Add critical path validation document:
- 2-3 day MVP test protocol to validate core hypothesis
- CLI tool to test semantic classification + ambient feedback
- Clear go/no-go criteria before full implementation
- Tests riskiest assumptions first (accuracy, speed, usefulness)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Major architectural change to PRD and critical path:

**Why Transformer.js**:
- Zero external dependencies (no Ollama install)
- Runs in-browser or Node.js (WASM + WebGPU)
- Auto-downloads models on first use (~400MB BART)
- Faster inference for classification (< 1 second)
- Reusable for journal note semantic annotation
- Better integration with Next.js/TypeScript stack

**Classification approaches**:
1. Zero-shot classification (BART/DeBERTa) for accuracy
2. Semantic similarity (sentence transformers) for speed
3. Both use same Transformer.js API

**Performance improvements**:
- < 1 second classification (vs. < 2-3 seconds with Ollama)
- < 150MB memory footprint (vs. 200MB+)
- No background server required

**Bonus feature**: Same models enable journal note semantic
search, auto-tagging, and moment similarity matching

Updated both PRD and critical path test protocol to reflect
new approach. Simpler setup (2-4 hours vs. 4-6 hours).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Alternative to full AI classification - test core integration first:

**Approach**:
- Use ActivityWatch's built-in category/labeling system
- User manually configures regex rules in AW UI
- Zenborg fetches labeled events via REST API (localhost:5600)
- Simple alignment: does activity category match moment area?

**Benefits**:
- 2-4 hours to build vs. weeks for AI version
- Zero ML complexity, uses existing AW features
- Tests core hypothesis: does activity tracking help?
- Transparent rules (regex), user-editable

**Implementation**:
1. ActivityWatch client (TypeScript REST API wrapper)
2. Sync Zenborg areas → AW categories
3. Fetch & display alignment status (🧭 ↑/↙)
4. Simple UI component (fixed position indicator)
5. Standalone test script

**Limitations**:
- Requires manual category setup (regex rules)
- No semantic understanding (can't infer intent)
- Only works if user maintains category rules

**Path forward**:
1. Build tiny version (validate AW integration works)
2. If successful → Add Transformer.js semantic layer
3. Hybrid: User rules + AI classification for unlabeled

This tests the riskiest assumption (AW integration) before
investing in AI infrastructure.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Corrected fundamental misunderstanding across all three documents:

**Before (incorrect)**:
- Predefined "area themes" (Product/Data/UX/Strategy)
- Hardcoded keywords per area
- Classification matched activity → area theme
- Required maintaining theme taxonomy

**After (correct per CLAUDE.md)**:
- Areas are life domains (Wellness, Craft, Social, Joyful, Introspective)
- Moments are specific intentions ("Product Spec", "Data Analysis")
- Classification matches activity → current moment name
- Moment names are self-descriptive, no keywords needed

**Why this is better**:
1. More specific matching (moment-level vs area-level)
2. No hardcoded themes to maintain
3. Moment names already provide semantic context
4. Aligns with Zenborg's core domain model

**Changes across all docs**:
- PRD: Use moment.name as semantic anchor in classification
- Critical path: Remove "theme" prompt, just ask for moment name
- Tiny version: Match AW categories to moment names (not areas)
- Appendix: Replace hardcoded themes with moment examples

**Classification approach now**:
```typescript
// Zero-shot
classifier(activityDescription, [
  `working on: ${moment.name}`,  // e.g., "working on: Product Spec"
  'distracted or browsing',
  'transitional activity',
  'no activity'
])

// Semantic similarity
embed(moment.name)  // Just the moment name - it's self-descriptive!
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants