{
	"id": "add-task",
	"version": "1.0.0",
	"description": "Generate a new task based on description",
	"metadata": {
		"author": "system",
		"created": "2024-01-01T00:00:00Z",
		"updated": "2024-01-01T00:00:00Z",
		"tags": ["task-creation", "generation"]
	},
	"parameters": {
		"prompt": {
			"type": "string",
			"required": true,
			"description": "User's task description"
		},
		"newTaskId": {
			"type": "number",
			"required": true,
			"description": "ID for the new task"
		},
		"existingTasks": {
			"type": "array",
			"description": "List of existing tasks for context"
		},
		"gatheredContext": {
			"type": "string",
			"description": "Context gathered from codebase analysis"
		},
		"contextFromArgs": {
			"type": "string",
			"description": "Additional context from manual args"
		},
		"priority": {
			"type": "string",
			"default": "medium",
			"enum": ["high", "medium", "low"],
			"description": "Task priority"
		},
		"dependencies": {
			"type": "array",
			"description": "Task dependency IDs"
		},
		"useResearch": {
			"type": "boolean",
			"default": false,
			"description": "Use research mode"
		},
		"hasCodebaseAnalysis": {
			"type": "boolean",
			"required": false,
			"default": false,
			"description": "Whether codebase analysis is available"
		},
		"projectRoot": {
			"type": "string",
			"required": false,
			"default": "",
			"description": "Project root path for context"
		}
	},
	"prompts": {
		"default": {
			"system": "You are a helpful assistant that creates well-structured tasks for a software development project. Generate a single new task based on the user's description, adhering strictly to the provided JSON schema. Pay special attention to dependencies between tasks, ensuring the new task correctly references any tasks it depends on.\n\nWhen determining dependencies for a new task, follow these principles:\n1. Select dependencies based on logical requirements - what must be completed before this task can begin.\n2. Prioritize task dependencies that are semantically related to the functionality being built.\n3. Consider both direct dependencies (immediately prerequisite) and indirect dependencies.\n4. Avoid adding unnecessary dependencies - only include tasks that are genuinely prerequisite.\n5. Consider the current status of tasks - prefer completed tasks as dependencies when possible.\n6. Pay special attention to foundation tasks (1-5) but don't automatically include them without reason.\n7. Recent tasks (higher ID numbers) may be more relevant for newer functionality.\n\nThe dependencies array should contain task IDs (numbers) of prerequisite tasks.{{#if useResearch}}\n\nResearch current best practices and technologies relevant to this task.{{/if}}",
			"user": "{{#if hasCodebaseAnalysis}}## IMPORTANT: Codebase Analysis Required\n\nYou have access to powerful codebase analysis tools. Before generating the task:\n\n1. Use the Glob tool to explore the project structure (e.g., \"**/*.js\", \"**/*.json\", \"**/README.md\")\n2. Use the Grep tool to search for existing implementations, patterns, and technologies\n3. Use the Read tool to examine key files like package.json, main entry points, and relevant source files\n4. Analyze the current implementation to understand what already exists\n\nBased on your analysis:\n- Identify existing components/features that relate to this new task\n- Understand the technology stack, frameworks, and patterns in use\n- Generate implementation details that align with the project's current architecture\n- Reference specific files, functions, or patterns from the codebase in your details\n\nProject Root: {{projectRoot}}\n\n{{/if}}You are generating the details for Task #{{newTaskId}}. Based on the user's request: \"{{prompt}}\", create a comprehensive new task for a software development project.\n      \n      {{gatheredContext}}\n      \n      {{#if useResearch}}Research current best practices, technologies, and implementation patterns relevant to this task. {{/if}}Based on the information about existing tasks provided above, include appropriate dependencies in the \"dependencies\" array. Only include task IDs that this new task directly depends on.\n      \n      Return your answer as a single JSON object matching the schema precisely:\n      \n      {\n        \"title\": \"Task title goes here\",\n        \"description\": \"A concise one or two sentence description of what the task involves\",\n    \"details\": \"Detailed implementation steps, considerations, code examples, or technical approach\",\n    \"testStrategy\": \"Specific steps to verify correct implementation and functionality\",\n    \"dependencies\": [1, 3] // Example: IDs of tasks that must be completed before this task\n  }\n      \n      Make sure the details and test strategy are comprehensive and specific{{#if useResearch}}, incorporating current best practices from your research{{/if}}. DO NOT include the task ID in the title.\n      {{#if contextFromArgs}}{{contextFromArgs}}{{/if}}"
		}
	}
}
