feat(CF-301): Implement task_move_project function

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>
This commit is contained in:
Christian Gick
2026-01-20 08:05:34 +02:00
parent 213a84f464
commit 18a016f82f
4 changed files with 135 additions and 2 deletions

View File

@@ -82,6 +82,19 @@ export const toolDefinitions = [
required: ['title'],
},
},
{
name: 'task_move_project',
description: 'Move task to different project while preserving history',
inputSchema: {
type: 'object',
properties: {
id: { type: 'string', description: 'Task ID to move (e.g., CF-295)' },
target_project: { type: 'string', description: 'Target project key (e.g., VPN, ST, GB)' },
reason: { type: 'string', description: 'Optional reason for move' },
},
required: ['id', 'target_project'],
},
},
// Semantic Search Tools
{