sequential-execution
1
总安装量
1
周安装量
#46341
全站排名
安装命令
npx skills add https://github.com/squirrel289/pax --skill sequential-execution
Agent 安装分布
github-copilot
1
Skill 文档
Sequential Execution
Execute tasks in order when dependencies exist between steps.
When to Use
Use sequential execution when:
- Tasks have dependencies (Task B needs Task A’s output)
- Order matters for correctness
- Tasks modify shared state or files
- Workflow has clear sequential stages (e.g., commit â push â PR)
- Later tasks need results from earlier tasks
Parameters
- tasks: Ordered list of task descriptions
- dependencies: Map of task dependencies (which tasks depend on which outputs)
How Sequential Execution Works
Step 1: Identify Dependencies
Map out which tasks depend on others:
- Task A produces output X
- Task B needs input X to proceed
- Task C needs output from Task B
Step 2: Execute in Order
Execute tasks one at a time, passing outputs forward:
- Execute Task A, store output
- Execute Task B with output from A
- Execute Task C with output from B
Step 3: Track Progress
Use todo list to track sequential progress:
- Mark current task as
in-progress - Mark completed tasks as
completed - Keep upcoming tasks as
not-started
Sequential Patterns
Pattern 1: Linear Pipeline
A â B â C â D
Each task depends on the previous task’s output.
Pattern 2: Staged Workflow
Stage 1: Setup â Stage 2: Processing â Stage 3: Cleanup
Clear phases that must happen in order.
Pattern 3: Conditional Sequencing
A â (if success) â B â (if failure) â C
Execution path depends on previous results.
Pattern 4: Accumulator Pattern
Start with initial state, each task transforms and passes to next:
- Task 1: Initialize state
- Task 2: Transform state
- Task 3: Enhance state
- Task 4: Finalize state
When to Use Sequential vs Parallel
| Scenario | Execution Type | Reason |
|---|---|---|
| B needs A’s output | Sequential | Dependency |
| Multiple independent analyses | Parallel | No dependencies |
| Commit â Push â PR | Sequential | Order matters |
| Analyze multiple files | Parallel | Independent |
| Build â Test â Deploy | Sequential | Must happen in order |
| Review multiple perspectives | Parallel | Independent views |
TodoList Integration
Track sequential progress clearly:
{
"todos": [
{ "id": 1, "title": "Fetch PR details", "status": "completed" },
{ "id": 2, "title": "Run tests", "status": "in-progress" },
{ "id": 3, "title": "Review comments", "status": "not-started" },
{ "id": 4, "title": "Merge PR", "status": "not-started" }
]
}
Common Sequential Workflows
Git Workflow
- Make changes â 2. Commit â 3. Push â 4. Create PR â 5. Merge
PR Processing
- Fetch PR â 2. Analyze â 3. Address comments â 4. Run checks â 5. Merge
Build Pipeline
- Install dependencies â 2. Build â 3. Test â 4. Package â 5. Deploy
Code Review
- Read code â 2. Identify issues â 3. Write comments â 4. Submit review
Error Handling
In sequential execution:
- If step N fails, steps N+1 onwards cannot proceed
- Decide whether to:
- Retry failed step
- Skip to error handling flow
- Abort entire sequence
- Continue with partial results
Best Practices
- Make dependencies explicit: Clearly document what each task needs
- Pass data forward: Each task receives output from previous task
- Track progress: Update todo list after each step
- Handle errors: Plan for failures at each stage
- Validate inputs: Ensure each task has what it needs before starting
- Log intermediate results: Useful for debugging and resuming
Quick Reference
WHEN TO USE:
â Tasks have dependencies
â Order matters
â Shared state modifications
â Must wait for previous results
PATTERNS:
Linear: A â B â C â D
Staged: Setup â Process â Cleanup
Conditional: A â (check) â B or C
Accumulator: Transform state through stages
TODOLIST:
- Mark current step as in-progress
- Keep future steps as not-started
- Mark completed steps as completed
ERROR HANDLING:
- Stop on failure
- Retry step
- Fallback flow
- Abort sequence