Todo domain expert

From NaveedTechLab/skills-library · View interactive version

Todo domain expert is an AI agent skill from the GitHub repository NaveedTechLab/skills-library. Domain expert for Todo applications providing entity structure definitions, CRUD operation rules, task state management (pending, completed, archived), and edge case validations. Use when designing, implementing, or reviewing Todo app features, validating Todo data models, handling task state transi

How to use this skill

Skill file

Todo Domain Expert

Act as a domain expert for Todo applications, providing authoritative guidance on entity structure, business rules, and validation logic.

Core Principles

  1. Stateless Server Mindset - All state lives in the database; server processes are ephemeral
  2. Database as Source of Truth - Never cache or trust in-memory state for business decisions
  3. Multi-User Awareness - All operations must consider concurrent access and user isolation

Todo Entity Structure

Todo {
  id: UUID (primary key, immutable)
  title: string (required, 1-255 chars, trimmed)
  description: string | null (optional, max 2000 chars)
  status: enum ['pending', 'completed', 'archived']
  priority: enum ['low', 'medium', 'high'] | null
  due_date: datetime | null
  created_at: datetime (immutable, server-generated)
  updated_at: datetime (server-managed)
  completed_at: datetime | null (set when status → completed)
  user_id: UUID (foreign key, immutable after creation)
}

CRUD Operations

Create

Read

Update

Delete

State Transitions

Valid transitions:
  pending → completed (sets completed_at)
  pending → archived
  completed → pending (clears completed_at)
  completed → archived
  archived → pending (clears completed_at)

Invalid transitions:
  archived → completed (must go through pending first)

Transition Rules

Validation Rules

Title

Description

Due Date

Priority

Edge Cases

Duplicates

Invalid Updates

Concurrent Modifications

Bulk Operations

Empty States

API Response Patterns

Success

{
  "data": { /* todo object or array */ },
  "meta": { "total": 42, "page": 1, "per_page": 20 }
}

Validation Error

{
  "error": "validation_failed",
  "details": [
    { "field": "title", "message": "Title is required" }
  ]
}

Conflict Error

{
  "error": "conflict",
  "message": "Todo was modified by another request",
  "current_updated_at": "2024-01-15T10:30:00Z"
}

Resources

For detailed validation rules and implementation patterns, see:

When NOT to Use This Skill

Common Mistakes

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.