Adds DB column, TypeScript types, MCP tool schemas, and CRUD handlers
for planning_mode_required (NULL=auto-detect, true=always, false=never).
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove invalid 'pending' status from task_list and task_update enums
- Default to excluding completed tasks when no status filter provided
- Previously, task_list(status=open) missed in_progress/blocked/testing tasks
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Extends project_documentation with 'workflow' type for:
- Development workflows
- Quality validation processes
- Testing procedures
Used for CF-378 pre-test validation workflow.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Extends project_documentation with 'configuration' type to store:
- Public/internal domains
- Component locations (VMs, services)
- Dependencies and infrastructure setup
**Changes:**
- Added 'configuration' to doc_type enum in tools/index.ts
**Use case:**
Displayed at session start via session-start script (CF-382)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
New link types added:
- depends_on: Task depends on another task to complete first
- needs: Task needs another task (weaker dependency)
- implements: Task implements a feature/requirement
- fixes: Task fixes an issue identified in another task
- causes: Task causes/introduces issue in another task
- subtask_of: Task is a subtask of another (parent-child)
Preserves existing types: blocks, relates_to, duplicates
Changes:
- Migration 021 updates database constraint
- Updated TypeScript types and MCP tool schema
- Applied to production database
Implements CF-385
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
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>
Added task_move_project tool to move tasks between projects while
preserving all relationships and history:
Changes:
- db.ts: Added getClient() for transaction support
- crud.ts: Implemented taskMoveProject() with full transaction
- index.ts: Wired up tool handler and import
- tools/index.ts: Registered tool definition
Preserves:
- Task metadata (title, description, type, status, priority)
- Checklist items
- Linked commits
- Delegations
- Activity history
- Task links (relates_to, blocks, duplicates)
- Epic and version assignments
- Embeddings
Process:
1. Validates source task and target project exist
2. Generates new ID in target project
3. Transfers all related data in transaction
4. Marks old task as completed with reference
5. Creates duplicate link between tasks
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Phase 7 complete: Advanced session analysis capabilities
New MCP Tools (3):
1. session_semantic_search - Vector similarity search across all sessions
2. session_productivity_analytics - Metrics (avg duration, tasks, commits, tokens)
3. session_pattern_detection - Detect patterns (tool usage, task types)
Features:
- Semantic search with embedding-based similarity
- Fallback to ILIKE text search if embeddings unavailable
- Analytics over configurable time periods (week/month/quarter)
- Pattern detection with frequency analysis
Use Cases:
- Find similar past work: "sessions about WhatsApp integration"
- Track productivity: avg commits/tasks per session
- Identify tool usage patterns: which tools used most often
- Analyze task type distribution
All 7 phases complete! System ready for testing.
Related: CF-257
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Implemented 8 new session management tools:
- session_start: Initialize session with metadata tracking
- session_update: Update session metrics during execution
- session_end: Close session with summary and embedding
- session_list: List sessions with filtering
- session_search: Semantic search across sessions
- session_context: Get complete session context (tasks, commits, builds, memories)
- build_record: Link builds to sessions and versions
- session_commit_link: Link commits to sessions
Enhanced existing tools:
- memory_add: Added session_id and task_id parameters
- Updated all memory queries to use 'memories' table (renamed from session_memories)
Implementation:
- Created src/tools/sessions.ts with all session operations
- Updated src/tools/memories.ts for new schema
- Added 8 session tool definitions to src/tools/index.ts
- Registered all session tools in src/index.ts switch statement
- TypeScript compilation successful
Related: CF-167 (Fix shared session-summary.md file conflict)
New features:
- detectProjectFromCwd(): Maps directory paths to project keys
- project_context: Returns project, tasks, epics, lock status
- Auto-detection for 18 known projects (ST, VPN, OWUI, etc.)
- Falls back to extracting from Apps/X or Infrastructure/X paths
Use project_context at session start to see only relevant tasks.
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>
- New epic_close(id) function to mark epics as completed
- Added tool definition and handler
- Usage: epic_close({ id: 'CF-E1' })
Task: CF-258
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Session 374: Task-MCP and Delegation System Integration (Phase 4 & 6)
- Add task_delegations tool: query delegations for a specific task
- Add task_delegation_query tool: query across all tasks by status/backend
- Enhance taskShow() to display recent delegation history
- New delegations.ts module with getRecentDelegations helper
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Combines close + link operations for duplicate issues:
- Closes the duplicate task (sets status to completed)
- Creates bidirectional 'duplicates' link to dominant task
Usage: task_resolve_duplicate(duplicate_id, dominant_id)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>