TaskValidator (TaskValidator v0.4.1)

View Source

Validates TaskList.md format compliance according to project guidelines.

The TaskValidator ensures that task documents follow a consistent structure, making it easier to track and manage work across multiple project components.

Validation Checks

  • ID format compliance (like SSH0001, SCP0001, ERR001, etc.)
  • Unique task IDs across the document
  • Required sections and fields present in each task
  • Proper subtask structure with consistent prefixes
  • Valid status values from the allowed list
  • Proper review rating format for completed tasks

Usage Example

case TaskValidator.validate_file("path/to/TaskList.md") do
  {:ok, message} ->
    # Task list validation succeeded
    IO.puts("Validation passed: " <> message)
  {:error, reason} ->
    # Task list validation failed
    IO.puts("Validation failed: " <> reason)
end

Summary

Functions

Extracts tasks from the TaskList.md content.

Validates a TaskList.md file against the specified format requirements.

Functions

extract_tasks(lines)

@spec extract_tasks([String.t()]) :: {:ok, [map()]} | {:error, String.t()}

Extracts tasks from the TaskList.md content.

validate_file(file_path)

@spec validate_file(String.t()) :: :ok | {:error, String.t()}

Validates a TaskList.md file against the specified format requirements.

Returns :ok if validation passes, or {:error, reason} if it fails.