{"record":{"id":"4c28c8fe38968bb3","repo":"eyaltoledano/claude-task-master","slug":"task-description-is-required","errorCode":null,"errorMessage":"Task description is required","messagePattern":"Task description is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/tm-core/src/common/interfaces/storage.interface.ts","lineNumber":459,"sourceCode":"\t\tconst extension = parts.pop();\n\t\tconst baseName = parts.join('.');\n\t\treturn `${baseName}.backup.${timestamp}.${extension}`;\n\t}\n\n\t/**\n\t * Utility method to validate task data before storage operations\n\t * @param task - Task to validate\n\t * @throws Error if task is invalid\n\t */\n\tprotected validateTask(task: Task): void {\n\t\tif (!task.id) {\n\t\t\tthrow new Error('Task ID is required');\n\t\t}\n\t\tif (!task.title) {\n\t\t\tthrow new Error('Task title is required');\n\t\t}\n\t\tif (!task.description) {\n\t\t\tthrow new Error('Task description is required');\n\t\t}\n\t\tif (!task.status) {\n\t\t\tthrow new Error('Task status is required');\n\t\t}\n\t}\n\n\t/**\n\t * Utility method to sanitize tag names for file system safety\n\t * @param tag - Tag name to sanitize\n\t * @returns Sanitized tag name\n\t */\n\tprotected sanitizeTag(tag: string): string {\n\t\treturn tag.replace(/[^a-zA-Z0-9-_]/g, '-').toLowerCase();\n\t}\n}\n","sourceCodeStart":441,"sourceCodeEnd":475,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/packages/tm-core/src/common/interfaces/storage.interface.ts#L441-L475","documentation":"This error is thrown by the internal validateTask helper in the storage interface when a task object being validated has no description. Task Master requires every task to carry a non-empty description field, so writes/creates of a task without one are rejected before reaching storage. It is a data-integrity guard, not an environment problem.","triggerScenarios":"Calling storage/task-creation APIs with a task object whose description property is missing, null, or the empty string ('' is falsy).","commonSituations":"Programmatic task generation scripts that set only id/title/status; importing tasks from JSON or another tracker that lacks a description field; template objects created before fields are filled; migrations or data pipelines that skip description.","solutions":["Add a non-empty description string to the task object before saving/creating it","Validate the task shape (title, description, status all truthy) before calling the storage API","If description is genuinely unknown, provide a placeholder like 'TBD' so validation passes and can be updated later","Check any upstream data source/mapper for a field-mapping bug that drops description"],"exampleFix":"// before\nawait storage.createTask({ id: 5, title: 'Setup CI', status: 'pending' });\n// after\nawait storage.createTask({ id: 5, title: 'Setup CI', description: 'Configure GitHub Actions pipeline for lint and test.', status: 'pending' });","handlingStrategy":"validation","validationCode":"function hasRequiredTaskFields(task) {\n  return Boolean(task && task.id && task.title && task.description && task.status);\n}\nif (!hasRequiredTaskFields(task)) {\n  if (!task.description) throw new Error('description missing: refusing to save task');\n}","typeGuard":"function isValidTask(task): task is Required<Pick<Task,'id'|'title'|'description'|'status'>> & Task {\n  return !!task && typeof task.title === 'string' && task.title.length > 0\n    && typeof task.description === 'string' && task.description.length > 0\n    && typeof task.status === 'string' && task.status.length > 0;\n}","tryCatchPattern":"try {\n  await storage.createTask(task);\n} catch (err) {\n  if (err instanceof Error && err.message === 'Task description is required') {\n    console.error('Task is missing a description; add one before saving.');\n    return;\n  }\n  throw err;\n}","preventionTips":["Use a constructor/factory that requires description so the object cannot be built without it","Validate task shape (zod/ajv schema) at ingestion boundaries before storage calls","Default description to a placeholder in importers/mappers when the source lacks one","Add a unit test asserting createTask rejects description-less tasks"],"tags":["validation","storage","task-management"],"backgroundTag":"missing-required-field","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}