Commit 0dcbb88
authored
feat: enhance single task execution (#12)
## Summary
This PR significantly enhances the `execute-task.md` documentation to
provide a more robust and orchestrator-friendly task execution
framework. The changes introduce explicit validation steps, formalized
status transitions, post-execution checks, and structured
machine-parseable output for external orchestration pipelines.
## Key Changes
- **Refined execution checklist**: Simplified and clarified the internal
Todo task tracking steps to focus on core execution phases (validate →
in-progress → execute → validate → completed/failed)
- **Enhanced status validation**: Added explicit handling for the
`needs-clarification` status to prevent execution of tasks awaiting
clarification, with clear error messaging
- **Formalized status transitions**: Introduced a new "Valid Status
Transitions" section documenting all allowed state changes (`pending` →
`in-progress` → `completed`/`failed`, retry flows, and external
clarification flows)
- **Post-task validation framework**: Added two new sections:
- **Post-Task Validation**: Lint checking with auto-fix attempts and
status reversion on failure
- **Post-Execution Checks**: Targeted test validation for affected code
with failure handling
- **Noteworthy events documentation**: Introduced structured guidelines
for documenting unexpected decisions, dependency issues, environment
problems, scope observations, and test findings
- **Structured output requirements**: Added mandatory machine-parseable
output block at the end of execution containing Plan ID, Task ID,
Status, Exit Code, and validation results (lint/test checks)
- **Updated critical rules**: Removed agent-selection guidance (out of
scope for single-task execution) and added emphasis on structured output
provision
- **Improved integration notes**: Clarified that the command is designed
for external orchestrator contexts and emphasizes the new structured
output capability for pipeline automation
## Notable Implementation Details
- The structured output format enables automated orchestration pipelines
to parse results and determine next steps without manual intervention
- Post-execution validation is task-focused (not plan-level), avoiding
duplication with orchestrator responsibilities
- Error handling now ensures structured output is emitted even on
failure
- Documentation emphasizes that the external orchestrator manages
commits, branching, and plan archival1 parent fd776bc commit 0dcbb88
1 file changed
Lines changed: 60 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
56 | 55 | | |
57 | | - | |
| 56 | + | |
58 | 57 | | |
59 | | - | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | | - | |
67 | | - | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
165 | 170 | | |
166 | 171 | | |
167 | 172 | | |
| |||
171 | 176 | | |
172 | 177 | | |
173 | 178 | | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
174 | 190 | | |
175 | 191 | | |
176 | 192 | | |
| |||
268 | 284 | | |
269 | 285 | | |
270 | 286 | | |
271 | | - | |
272 | | - | |
273 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
274 | 299 | | |
275 | 300 | | |
| 301 | + | |
| 302 | + | |
276 | 303 | | |
277 | 304 | | |
278 | 305 | | |
279 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
280 | 325 | | |
281 | 326 | | |
282 | 327 | | |
| |||
292 | 337 | | |
293 | 338 | | |
294 | 339 | | |
295 | | - | |
| 340 | + | |
296 | 341 | | |
297 | 342 | | |
298 | | - | |
| 343 | + | |
| 344 | + | |
299 | 345 | | |
300 | 346 | | |
301 | 347 | | |
302 | | - | |
| 348 | + | |
0 commit comments