Files
Claude-Code-Workflow/.claude/commands/task/create.md
catlog22 12f9e34223 refactor: Enhance agent definitions and workflow documentation structure
- Update agent role definitions with clearer responsibilities and capabilities
- Refine task execution workflows with improved context gathering protocols
- Enhance tool implementation guide with better command examples
- Streamline workflow architecture documentation for better clarity

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-15 15:58:06 +08:00

4.1 KiB

name, description, usage, argument-hint, examples
name description usage argument-hint examples
create Create implementation tasks with automatic context awareness /task:create "title" task title
/task:create "Implement user authentication"
/task:create "Build REST API endpoints"
/task:create "Fix login validation bug"

Task Create Command (/task:create)

Overview

Creates new implementation tasks with automatic context awareness and ID generation.

Core Principles

Task System: @~/.claude/workflows/task-core.md

Core Features

Automatic Behaviors

  • ID Generation: Auto-generates impl-N format (max 2 levels)
  • Context Inheritance: Inherits from active workflow session
  • JSON Creation: Creates task JSON in active session
  • Status Setting: Initial status = "pending"
  • Agent Assignment: Suggests agent based on task type
  • Session Integration: Updates workflow session stats

Context Awareness

  • Validates active workflow session exists
  • Avoids duplicate task IDs
  • Inherits session requirements and scope
  • Suggests task relationships

Usage

Basic Creation

/task:create "Build authentication module"

Output:

✅ Task created: impl-1
Title: Build authentication module
Type: feature
Agent: code-developer
Status: pending

Task Types

  • feature - New functionality (default)
  • bugfix - Bug fixes
  • refactor - Code improvements
  • test - Test implementation
  • docs - Documentation

Task Creation Process

  1. Session Validation: Check active workflow session
  2. ID Generation: Auto-increment impl-N
  3. Context Inheritance: Load workflow context
  4. Implementation Setup: Initialize implementation field
  5. Agent Assignment: Select appropriate agent
  6. File Creation: Save JSON to .task/ directory
  7. Session Update: Update workflow stats

Task Schema: See @~/.claude/workflows/task-core.md for complete JSON structure

Implementation Field Setup

Auto-Population Strategy

  • Detailed info: Extract from task description and scope
  • Missing info: Mark pre_analysis as multi-step array format for later pre-analysis
  • Basic structure: Initialize with standard template

Analysis Triggers

When implementation details incomplete:

⚠️ Task requires analysis for implementation details
Suggest running: gemini analysis for file locations and dependencies

File Management

JSON Task File

  • Location: .task/impl-[N].json in active session
  • Content: Complete task with implementation field
  • Updates: Session stats only

Simple Process

  1. Validate session and inputs
  2. Generate task JSON
  3. Update session stats
  4. Notify completion

Context Inheritance

Tasks inherit from:

  1. Active Session - Requirements and scope from workflow-session.json
  2. Planning Document - Context from IMPL_PLAN.md
  3. Parent Task - For subtasks (impl-N.M format)

Agent Assignment

Based on task type and title keywords:

  • Build/Implementcode-developer
  • Design/Planplanning-agent
  • Test/Validatecode-review-test-agent
  • Review/Auditreview-agent

Validation Rules

  1. Session Check - Active workflow session required
  2. Duplicate Check - Avoid similar task titles
  3. ID Uniqueness - Auto-increment task IDs
  4. Schema Validation - Ensure proper JSON structure

Error Handling

# No workflow session
❌ No active workflow found
→ Use: /workflow init "project name"

# Duplicate task
⚠️ Similar task exists: impl-3
→ Continue anyway? (y/n)

# Max depth exceeded
❌ Cannot create impl-1.2.1 (max 2 levels)
→ Use: impl-2 for new main task

Examples

Feature Task

/task:create "Implement user authentication"

✅ Created impl-1: Implement user authentication
Type: feature
Agent: code-developer
Status: pending

Bug Fix

/task:create "Fix login validation bug" --type=bugfix

✅ Created impl-2: Fix login validation bug
Type: bugfix
Agent: code-developer
Status: pending
  • /task:breakdown - Break into subtasks
  • /task:execute - Execute with agent
  • /context - View task details