Skip to content

Commit a06b885

Browse files
committed
refactor(commands): migrate execute sudolang program to slash command
1 parent 44138ce commit a06b885

File tree

4 files changed

+208
-170
lines changed

4 files changed

+208
-170
lines changed

ai/commands/execute.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

ai/commands/run.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# ⚙️ /run - Execute Task/Epic
2+
3+
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.
4+
5+
## Prerequisites
6+
7+
Before running a task:
8+
1. Verify a task/epic plan exists in the tasks/ folder
9+
1. Confirm the task status is 📋 PLANNED or has tasks marked as pending
10+
1. Review plan.md to ensure the epic is listed and current
11+
12+
## Task Execution Protocol
13+
14+
executePlan() {
15+
1. Complete only the current task
16+
1. Validate - Verify the task meets its success criteria
17+
1. Report - Summarize what was accomplished
18+
1. Await Approval - Get explicit user approval before proceeding to the next task
19+
}
20+
21+
## Agent Orchestration
22+
23+
For complex tasks that require specialized expertise, systematically employ the agent orchestrator pattern in @agent-orchestrator.mdc
24+
25+
assessComplexity() {
26+
criteria:
27+
Multiple technical domains (UI, backend, testing, etc.)
28+
Specialized knowledge (Redux, TDD, product management, etc.)
29+
Cross-functional coordination
30+
Integration with existing agent workflows
31+
}
32+
33+
## Task Status Management
34+
35+
TaskStatus = pending | inProgress | completed | blocked | cancelled
36+
37+
updateTaskStatus() {
38+
1. Mark current task as inProgress when starting
39+
1. Update task status to completed when validated
40+
1. If blocked, mark as blocked and report the blocker
41+
1. Update the epic file after each status change
42+
}
43+
44+
## Validation Criteria
45+
46+
validateTask() {
47+
Check:
48+
- All requirements are met
49+
- Code follows project style guides and conventions
50+
- Tests pass (if applicable)
51+
- No regressions introduced
52+
- Success criteria from task plan are satisfied
53+
}
54+
55+
## Completed Epic Documentation
56+
57+
onComplete() {
58+
1. Update epic status to ✅ COMPLETED (${completionDate})
59+
1. Move to tasks/archive/YYYY-MM-DD-${epicName}.md
60+
1. Remove the epic entirely from plan.md
61+
}
62+
63+
## Execution Constraints
64+
65+
Constraints {
66+
Never attempt multiple tasks simultaneously
67+
Avoid breaking changes unless explicitly requested (open/closed principle)
68+
Always get explicit user approval before moving to the next task
69+
If a task reveals new information, pause and re-plan
70+
Always validate task completion before proceeding
71+
If blocked or uncertain, ask clarifying questions rather than making assumptions
72+
For complex tasks, ensure proper agent dispatch before execution
73+
}
74+
75+
## Execution Flow
76+
77+
executeTask() {
78+
1. Identify the next pending task from the epic
79+
1. Execute the task following executePlan()
80+
1. Validate completion
81+
1. Update task status
82+
1. Await user approval
83+
1. Repeat for next task or call onComplete() if all tasks are done
84+
}
85+

ai/commands/task.md

Lines changed: 123 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,127 @@
1-
## ✅ Task
1+
# /task - Create Task/Epic Plan
22

3-
Use the task creator to plan and execute a task epic.
3+
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.
4+
5+
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.
6+
7+
## Context Gathering
8+
9+
Before beginning any task, gather/infer context. When in doubt, ask clarifying questions:
10+
11+
TaskStatus = pending | inProgress | completed | blocked | cancelled
12+
13+
State {
14+
TaskName // The specific task being planned
15+
Status // Current execution state
16+
CodeContext // All relevant files, functions, and components that need to be examined or modified
17+
StyleGuides // Coding standards, patterns, and conventions that apply to this work
18+
Dependencies // External libraries, APIs, or system integrations required
19+
Constraints // Technical limitations, performance requirements, or business rules
20+
Stories // Clear, measurable outcomes for the completed work
21+
AgentRequirements // Assessment if task requires specialized agent expertise
22+
}
23+
24+
## Requirements Analysis
25+
26+
Use @requirements.mdc to analyze and generate the requirements of the task.
27+
28+
## Agent Orchestration
29+
30+
For complex tasks that require specialized expertise, systematically employ the agent orchestrator pattern in @agent-orchestrator.mdc
31+
32+
assessComplexity() {
33+
criteria:
34+
Multiple technical domains (UI, backend, testing, etc.)
35+
Specialized knowledge (Redux, TDD, product management, etc.)
36+
Cross-functional coordination
37+
Integration with existing agent workflows
38+
}
39+
40+
## Task Planning
41+
42+
planTask() {
43+
1. Decompose - Break the user's request into atomic, sequential tasks
44+
1. Assess Agent Needs - For each task, determine if agent orchestration is required
45+
1. Order tasks by dependencies and logical flow
46+
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
47+
1. Sequence - Arrange tasks so each builds on the previous one
48+
1. Checkpoint Plan approval gates between major phases
49+
}
50+
51+
## Task Plan Creation Protocol
52+
53+
createPlan() {
54+
1. Think = "🎯 restate |> 💡 ideate |> 🪞 reflectCritically |> 🔭 expandOrthogonally |> ⚖️ scoreRankEvaluate |> 💬 respond"
55+
1. Gather any additional context or clarification needed
56+
1. Present the task/epic plan to the user for approval
57+
1. Add the plan to the project root plan.md file, with a reference to the epic plan file
58+
}
59+
60+
## Task Plan Template Structure
61+
62+
Epic files must be as simple as possible while clearly communicating what needs to be done.
63+
64+
epicTemplate() {
65+
"""
66+
# ${EpicName} Epic
67+
68+
**Status**: 📋 PLANNED
69+
**Goal**: ${briefGoal}
70+
71+
## Overview
72+
73+
${singleParagraphStartingWithWHY}
74+
75+
---
76+
77+
## ${TaskName}
78+
79+
${briefTaskDescription}
80+
81+
**Requirements**:
82+
- Given ${situation}, should ${jobToDo}
83+
- Given ${situation}, should ${jobToDo}
84+
85+
---
86+
"""
87+
}
88+
89+
epicConstraints {
90+
// Overview:
91+
Start with WHY (user benefit/problem being solved)
92+
Explain what gaps are being addressed
93+
Keep it terse
94+
95+
// Tasks:
96+
No task numbering (use task names only)
97+
Brief description (1 sentence max)
98+
Requirements section with bullet points ONLY using "Given X, should Y" format
99+
Include ONLY novel, meaningful, insightful requirements
100+
NO extra sections, explanations or text
101+
}
102+
103+
reviewEpic() {
104+
After creating the epic file, verify:
105+
106+
1. Single paragraph overview starting with WHY
107+
1. No task numbering
108+
1. All requirements follow "Given X, should Y" format
109+
1. Only novel/insightful requirements remain (eliminate obvious boilerplate)
110+
1. No extra sections beyond template
111+
}
112+
113+
## Planning Constraints
4114

5115
Constraints {
6-
Before beginning, read and respect the constraints in please.mdc.
7-
Remember to use the TDD process if asked to implement code.
116+
Each task should be completable in ~50 lines of code or less
117+
Tasks should be independent - completing one shouldn't break others
118+
Avoid breaking changes unless explicitly requested (open/closed principle)
119+
If uncertain, ask clarifying questions rather than making assumptions
120+
For complex tasks, ensure proper agent dispatch is planned before execution
121+
}
122+
123+
## Execution
124+
125+
createTask() {
126+
createPlan |> reviewEpic |> awaitApproval
8127
}

ai/rules/task-creator.mdc

Lines changed: 0 additions & 158 deletions
This file was deleted.

0 commit comments

Comments
 (0)