Resolves MCP error when trying to set status="pending" on tasks.
Changes:
- Migration 019: Add 'pending' to tasks.status CHECK constraint
- Update task_update tool schema to accept 'pending' status
- Update task_list tool schema to filter by 'pending' status
Status meanings:
- pending: Created, awaiting approval or dependencies
- open: Approved and ready to start
- in_progress: Currently being worked on
- testing: Implementation complete, being tested
- blocked: Stuck waiting for something
- completed: Done
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
**CF-282: Session Reference in Tasks**
- Add session_id column to tasks table (migration 019)
- Store session_id when creating tasks in taskAdd()
- Display session_id in taskShow() output
- Create index for performance
- Backfill existing tasks from task_activity
**CF-278: Enhanced Session Context**
- Updated session-start to load memories (via DB query)
- Performance: 2-3.6s (target <5s) ✓
Changes:
- migrations/019_add_session_id_to_tasks.sql: New migration
- src/tools/crud.ts: taskAdd and taskShow modifications
Requires: Claude Code restart to load new code
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Creates deployments and deployment_logs tables for tracking all
deployment types (Docker, MCP, iOS/macOS, services). Includes
deployment status, timing, git integration, and structured logging.
Also adds run-migration.mjs helper for running migrations against
PostgreSQL database.
Part of CF-290, completes CF-291.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Switch from external Gemini API (3072 dims, $0.15/1M tokens) to local
Ollama mxbai-embed-large (1024 dims, free) for cost savings and HNSW
index support.
Changes:
- Updated embeddings.ts: model 'mxbai-embed-large', API URL fixed
- Updated migration 015: vector(1024) with HNSW index
- Regenerated 268 tool_docs embeddings with new model
Benefits:
- Free embeddings (no API costs)
- HNSW index enabled (1024 < 2000 dim limit)
- Fast similarity search (O(log n) vs O(n))
- No external API dependency
Trade-offs:
- 5% quality loss (MTEB 64.68 vs ~70 Gemini)
- Uses local compute (1.2GB RAM, <1s per embedding)
Task: CF-251
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Enhancements:
1. Session Context Table
- Migration 014: session_context table
- Tracks current working task per session
- Auto-updated on task status changes
2. Auto-Linking to Current Working Task
- When task status → in_progress: sets as current_task_id
- When task status → completed: clears current_task_id
- New tasks auto-link to current working task with 'relates_to'
- Shows auto-link message during task creation
3. Session ID Resolution
- Fixed path: ~/.cache/session-memory/current_session
- Falls back to environment variable CLAUDE_SESSION_ID
- Generates timestamp-based ID if unavailable
Example Flow:
```
1. task update CF-123 --status in_progress
→ Sets CF-123 as current working task
2. task add --title "Related work"
→ Created: CF-124
🔗 Auto-linked to: CF-123 (current working task)
3. task update CF-123 --status completed
→ Clears current working task
```
Files Changed:
- migrations/014_session_context.sql (new, 33 lines)
- src/tools/crud.ts (auto-linking logic, session context management)
Benefits:
- Zero manual linking for related work
- Session context preserved automatically
- Investigation workflows auto-organized
- Retroactive work tracking prevented
Note: Requires MCP server restart to take effect.
Remaining CF-166 Features (Phase 3):
- task investigate command
- Investigation workflow helper
- Task creation reminders
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
epic_close was failing with "column updated_at does not exist".
Migration adds the column with default NOW() and backfills
existing rows from created_at.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
New MCP tools:
- project_lock: Lock a project for exclusive session access
- project_unlock: Release a project lock
- project_lock_status: Check lock status for project(s)
Features:
- Automatic lock expiration (default 2h)
- Session ownership verification
- Force unlock option for emergencies
- Lock extension on re-lock by same session
Migration 004: project_locks table with expiry tracking
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Migration 003: enables semantic search for epics
- ALTER TABLE epics ADD COLUMN embedding vector(1024)
- HNSW index for similarity search
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Creates core tables for task-mcp:
- projects, task_sequences, epic_sequences
- tasks with vector(1024) embedding for semantic search
- epics, versions, task_checklist, task_links
- HNSW index for fast vector similarity search
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- task_delegations table for tracking delegation metadata per task
- task_learning_effectiveness table for per-task learning tracking
- Indexes for efficient querying by task_id, status, backend
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>