mix validate_tasklist (TaskValidator v0.8.1)

View Source

Validates the format and structure of a TaskList.md file.

Task List Structure

The task list must contain two main sections:

  • Current Tasks (Active tasks in progress)
  • Completed Tasks (Tasks that have been finished)

Validation Rules

Task ID Format

  • 2-4 uppercase letters as prefix (e.g., SSH, SCP, ERR)
  • 3-4 digits as sequence number
  • Optional hyphen and number for subtasks (e.g., SSH0001-1)
  • Examples: SSH0001, SCP0001, ERR001, SSH0001-1

Status Values

Valid statuses:

  • Planned
  • In Progress
  • Review
  • Completed
  • Blocked

Priority Values

Valid priorities:

  • Critical
  • High
  • Medium
  • Low

Error Handling Requirements

Main tasks and subtasks have different error handling requirements:

Main Tasks

Must include comprehensive error handling documentation:

**Error Handling**
**Core Principles**
- Pass raw errors
- Use {:ok, result} | {:error, reason}
- Let it crash
**Error Implementation**
- No wrapping
- Minimal rescue
- function/1 & /! versions
**Error Examples**
- Raw error passthrough
- Simple rescue case
- Supervisor handling
**GenServer Specifics**
- Handle_call/3 error pattern
- Terminate/2 proper usage
- Process linking considerations

Subtasks

Use simplified error handling format:

**Error Handling**
**Task-Specific Approach**
- Error pattern for this task
**Error Reporting**
- Monitoring approach

Common Validation Errors:

  • Using wrong error handling format (e.g., main task format for subtasks)
  • Missing error handling sections
  • Incomplete error handling documentation

Required Sections

Main tasks must include:

  • Description
  • Simplicity Progression Plan
  • Simplicity Principle
  • Abstraction Evaluation
  • Requirements
  • ExUnit Test Requirements
  • Integration Test Scenarios
  • Typespec Requirements
  • TypeSpec Documentation
  • TypeSpec Verification
  • Status
  • Priority

Subtask Requirements

  • Must use same prefix as parent task
  • Must have "Status" section
  • If status is "Completed", must have "Review Rating"
  • Review rating format: 1-5 with optional decimal (e.g., 4.5)
  • Review rating can include "(partial)" suffix
  • Can be organized as checkboxes or numbered entries

Subtask Formats

Tasks can organize subtasks in two formats:

  1. Checkbox Format (Recommended):

    **Subtasks**
    - [x] Basic structure implementation [SSH0001-1]
    - [ ] Essential features [SSH0001-2]
    - [ ] Integration testing [SSH0001-3]
  2. Numbered Format:

    #### 1. Basic structure implementation (SSH0001-1)
    **Status**
    Completed
    
    **Review Rating**
    4.5

Additional Rules

  • Tasks marked as "In Progress" must have at least one subtask
  • All non-completed tasks must have detailed entries
  • No duplicate task IDs allowed
  • All subtasks must use the same prefix as their parent task

Usage

mix validate_tasklist [OPTIONS]

Options

--path  Specify a non-default path to the TaskList.md file (default: docs/TaskList.md)

Example

mix validate_tasklist
mix validate_tasklist --path ./custom/path/TaskList.md

Summary

Functions

Callback implementation for Mix.Task.run/1.

Functions

run(args)

Callback implementation for Mix.Task.run/1.