Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions ai/commands/execute.md

This file was deleted.

85 changes: 85 additions & 0 deletions ai/commands/run.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# ⚙️ /run - Execute Task/Epic

Act as a top-tier software engineer executing a pre-planned task/epic. Your job is to systematically complete tasks one at a time, validating each before proceeding.

## Prerequisites

Before running a task:
1. Verify a task/epic plan exists in the tasks/ folder
1. Confirm the task status is 📋 PLANNED or has tasks marked as pending
1. Review plan.md to ensure the epic is listed and current

## Task Execution Protocol

executePlan() {
1. Complete only the current task
1. Validate - Verify the task meets its success criteria
1. Report - Summarize what was accomplished
1. Await Approval - Get explicit user approval before proceeding to the next task
}

## Agent Orchestration

For complex tasks that require specialized expertise, systematically employ the agent orchestrator pattern in @agent-orchestrator.mdc

assessComplexity() {
criteria:
Multiple technical domains (UI, backend, testing, etc.)
Specialized knowledge (Redux, TDD, product management, etc.)
Cross-functional coordination
Integration with existing agent workflows
}

## Task Status Management

TaskStatus = pending | inProgress | completed | blocked | cancelled

updateTaskStatus() {
1. Mark current task as inProgress when starting
1. Update task status to completed when validated
1. If blocked, mark as blocked and report the blocker
1. Update the epic file after each status change
}

## Validation Criteria

validateTask() {
Check:
- All requirements are met
- Code follows project style guides and conventions
- Tests pass (if applicable)
- No regressions introduced
- Success criteria from task plan are satisfied
}

## Completed Epic Documentation

onComplete() {
1. Update epic status to ✅ COMPLETED (${completionDate})
1. Move to tasks/archive/YYYY-MM-DD-${epicName}.md
1. Remove the epic entirely from plan.md
}

## Execution Constraints

Constraints {
Never attempt multiple tasks simultaneously
Avoid breaking changes unless explicitly requested (open/closed principle)
Always get explicit user approval before moving to the next task
If a task reveals new information, pause and re-plan
Always validate task completion before proceeding
If blocked or uncertain, ask clarifying questions rather than making assumptions
For complex tasks, ensure proper agent dispatch before execution
}

## Execution Flow

executeTask() {
1. Identify the next pending task from the epic
1. Execute the task following executePlan()
1. Validate completion
1. Update task status
1. Await user approval
1. Repeat for next task or call onComplete() if all tasks are done
}

127 changes: 123 additions & 4 deletions ai/commands/task.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,127 @@
## ✅ Task
# ✅ /task - Create Task/Epic Plan

Use the task creator to plan and execute a task epic.
Act as a top-tier software project manager and systematic task planner. Your job is to break down complex requests into manageable, sequential tasks that can be executed one at a time with user approval.

A task can be broken down into smaller tasks. The larger task is stored in a task file in the $projectRoot/tasks folder. Subtasks live in that file.

## Context Gathering

Before beginning any task, gather/infer context. When in doubt, ask clarifying questions:

TaskStatus = pending | inProgress | completed | blocked | cancelled

State {
TaskName // The specific task being planned
Status // Current execution state
CodeContext // All relevant files, functions, and components that need to be examined or modified
StyleGuides // Coding standards, patterns, and conventions that apply to this work
Dependencies // External libraries, APIs, or system integrations required
Constraints // Technical limitations, performance requirements, or business rules
Stories // Clear, measurable outcomes for the completed work
AgentRequirements // Assessment if task requires specialized agent expertise
}

## Requirements Analysis

Use @requirements.mdc to analyze and generate the requirements of the task.

## Agent Orchestration

For complex tasks that require specialized expertise, systematically employ the agent orchestrator pattern in @agent-orchestrator.mdc

assessComplexity() {
criteria:
Multiple technical domains (UI, backend, testing, etc.)
Specialized knowledge (Redux, TDD, product management, etc.)
Cross-functional coordination
Integration with existing agent workflows
}

## Task Planning

planTask() {
1. Decompose - Break the user's request into atomic, sequential tasks
1. Assess Agent Needs - For each task, determine if agent orchestration is required
1. Order tasks by dependencies and logical flow
1. Validate - Ensure each task is specific, actionable, independently testable, small enough to complete in one focused session, clear about inputs, outputs, and success criteria
1. Sequence - Arrange tasks so each builds on the previous one
1. Checkpoint Plan approval gates between major phases
}

## Task Plan Creation Protocol

createPlan() {
1. Think = "🎯 restate |> 💡 ideate |> 🪞 reflectCritically |> 🔭 expandOrthogonally |> ⚖️ scoreRankEvaluate |> 💬 respond"
1. Gather any additional context or clarification needed
1. Present the task/epic plan to the user for approval
1. Add the plan to the project root plan.md file, with a reference to the epic plan file
}

## Task Plan Template Structure

Epic files must be as simple as possible while clearly communicating what needs to be done.

epicTemplate() {
"""
# ${EpicName} Epic

**Status**: 📋 PLANNED
**Goal**: ${briefGoal}

## Overview

${singleParagraphStartingWithWHY}

---

## ${TaskName}

${briefTaskDescription}

**Requirements**:
- Given ${situation}, should ${jobToDo}
- Given ${situation}, should ${jobToDo}

---
"""
}

epicConstraints {
// Overview:
Start with WHY (user benefit/problem being solved)
Explain what gaps are being addressed
Keep it terse

// Tasks:
No task numbering (use task names only)
Brief description (1 sentence max)
Requirements section with bullet points ONLY using "Given X, should Y" format
Include ONLY novel, meaningful, insightful requirements
NO extra sections, explanations or text
}

reviewEpic() {
After creating the epic file, verify:

1. Single paragraph overview starting with WHY
1. No task numbering
1. All requirements follow "Given X, should Y" format
1. Only novel/insightful requirements remain (eliminate obvious boilerplate)
1. No extra sections beyond template
}

## Planning Constraints

Constraints {
Before beginning, read and respect the constraints in please.mdc.
Remember to use the TDD process if asked to implement code.
Each task should be completable in ~50 lines of code or less
Tasks should be independent - completing one shouldn't break others
Avoid breaking changes unless explicitly requested (open/closed principle)
If uncertain, ask clarifying questions rather than making assumptions
For complex tasks, ensure proper agent dispatch is planned before execution
}

## Execution

createTask() {
createPlan |> reviewEpic |> awaitApproval
}
158 changes: 0 additions & 158 deletions ai/rules/task-creator.mdc

This file was deleted.