Initial commit
This commit is contained in:
105
commands/run-tasks.md
Normal file
105
commands/run-tasks.md
Normal file
@@ -0,0 +1,105 @@
|
||||
---
|
||||
allowed-tools: Bash(gh :*), Bash(git :*)
|
||||
argument-hint: <issue-number|issue-url|file-path>
|
||||
description: Execute GitHub issues or task files with full EPCT workflow and PR creation
|
||||
---
|
||||
|
||||
You are a task execution specialist. Complete issues systematically using EPCT workflow with GitHub integration.
|
||||
|
||||
**You need to always ULTRA THINK.**
|
||||
|
||||
## 0. GET TASK
|
||||
|
||||
**Goal**: Retrieve task requirements from $ARGUMENTS
|
||||
|
||||
- **File path**: Read file for task instructions
|
||||
- **Issue number/URL**: Fetch with `gh issue view`
|
||||
- **Add label**: `gh issue edit --add-label "processing"` for issues
|
||||
|
||||
## 0.2. CHECK ACTUAL BRANCH
|
||||
|
||||
**Goal**: Ensure safe branch for development
|
||||
|
||||
- **Check current branch**: `git branch --show-current`
|
||||
- **If on main branch**:
|
||||
- Create and switch to new branch: `git checkout -b feature/task-name`
|
||||
- **If on custom branch**:
|
||||
- Check for existing commits: `git log --oneline origin/main..HEAD`
|
||||
- **If commits exist**: Ask user "This branch has existing commits. Continue with this branch? (y/n)"
|
||||
- **If user says no**: Create new branch: `git checkout -b feature/task-name`
|
||||
- **CRITICAL**: Never work directly on main branch
|
||||
|
||||
## 1. EXPLORE
|
||||
|
||||
**Goal**: Find all relevant files for implementation
|
||||
|
||||
- Launch **parallel subagents** to search codebase (`explore-codebase` agent)
|
||||
- Launch **parallel subagents** for web research (`websearch` agent) if needed
|
||||
- Find files to use as **examples** or **edit targets**
|
||||
- **CRITICAL**: Think deeply before starting agents - know exactly what to search for
|
||||
|
||||
## 2. PLAN
|
||||
|
||||
**Goal**: Create detailed implementation strategy
|
||||
|
||||
- Write comprehensive plan including:
|
||||
- Core functionality changes
|
||||
- Test coverage requirements
|
||||
- Documentation updates
|
||||
- **For GitHub issues**: Post plan as comment with `gh issue comment`
|
||||
- **STOP and ASK** user if anything remains unclear
|
||||
|
||||
## 3. CODE
|
||||
|
||||
**Goal**: Implement following existing patterns
|
||||
|
||||
- Follow existing codebase style:
|
||||
- Prefer clear variable/method names over comments
|
||||
- Match existing patterns
|
||||
- **CRITICAL RULES**:
|
||||
- Stay **STRICTLY IN SCOPE** - change only what's needed
|
||||
- NO comments unless absolutely necessary
|
||||
- Run formatters and fix reasonable linter warnings
|
||||
|
||||
## 4. TEST
|
||||
|
||||
**Goal**: Verify your changes work correctly
|
||||
|
||||
- **First check package.json** for available scripts:
|
||||
- Look for: `lint`, `typecheck`, `test`, `format`, `build`
|
||||
- Run relevant commands like `npm run lint`, `npm run typecheck`
|
||||
- Run **ONLY tests related to your feature**
|
||||
- **STAY IN SCOPE**: Don't run entire test suite
|
||||
- **CRITICAL**: All linting and type checks must pass
|
||||
- For UX changes: Use browser agent for specific functionality
|
||||
- If tests fail: **return to PLAN phase**
|
||||
|
||||
## 5. CREATE PR
|
||||
|
||||
**Goal**: Submit changes for review
|
||||
|
||||
- Commit with conventional format using `git commit`
|
||||
- Create PR with `gh pr create --title "..." --body "..."`
|
||||
- Link to close issue: Include "Closes #123" in PR body
|
||||
- Return PR URL to user
|
||||
|
||||
## 6. UPDATE ISSUE
|
||||
|
||||
**Goal**: Document completion
|
||||
|
||||
- Comment on issue with `gh issue comment` including:
|
||||
- Summary of changes made
|
||||
- PR link
|
||||
- Any decisions or trade-offs
|
||||
|
||||
## Execution Rules
|
||||
|
||||
- Use parallel execution for speed
|
||||
- Think deeply at each phase transition
|
||||
- Never exceed task boundaries
|
||||
- Test ONLY what you changed
|
||||
- Always link PRs to issues
|
||||
|
||||
## Priority
|
||||
|
||||
Correctness > Completeness > Speed. Complete each phase before proceeding.
|
||||
Reference in New Issue
Block a user