ace-task 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.ace-defaults/nav/protocols/skill-sources/ace-task.yml +19 -0
- data/.ace-defaults/nav/protocols/wfi-sources/ace-task.yml +19 -0
- data/.ace-defaults/task/config.yml +25 -0
- data/CHANGELOG.md +518 -0
- data/README.md +52 -0
- data/Rakefile +12 -0
- data/exe/ace-task +22 -0
- data/handbook/guides/task-definition.g.md +156 -0
- data/handbook/skills/as-bug-analyze/SKILL.md +26 -0
- data/handbook/skills/as-bug-fix/SKILL.md +27 -0
- data/handbook/skills/as-task-document-unplanned/SKILL.md +27 -0
- data/handbook/skills/as-task-draft/SKILL.md +24 -0
- data/handbook/skills/as-task-finder/SKILL.md +27 -0
- data/handbook/skills/as-task-plan/SKILL.md +30 -0
- data/handbook/skills/as-task-review/SKILL.md +25 -0
- data/handbook/skills/as-task-review-questions/SKILL.md +25 -0
- data/handbook/skills/as-task-update/SKILL.md +21 -0
- data/handbook/skills/as-task-work/SKILL.md +41 -0
- data/handbook/templates/task/draft.template.md +166 -0
- data/handbook/templates/task/file-modification-checklist.template.md +26 -0
- data/handbook/templates/task/technical-approach.template.md +26 -0
- data/handbook/workflow-instructions/bug/analyze.wf.md +458 -0
- data/handbook/workflow-instructions/bug/fix.wf.md +512 -0
- data/handbook/workflow-instructions/task/document-unplanned.wf.md +222 -0
- data/handbook/workflow-instructions/task/draft.wf.md +552 -0
- data/handbook/workflow-instructions/task/finder.wf.md +22 -0
- data/handbook/workflow-instructions/task/plan.wf.md +489 -0
- data/handbook/workflow-instructions/task/review-plan.wf.md +144 -0
- data/handbook/workflow-instructions/task/review-questions.wf.md +411 -0
- data/handbook/workflow-instructions/task/review-work.wf.md +146 -0
- data/handbook/workflow-instructions/task/review.wf.md +351 -0
- data/handbook/workflow-instructions/task/update.wf.md +118 -0
- data/handbook/workflow-instructions/task/work.wf.md +106 -0
- data/lib/ace/task/atoms/task_file_pattern.rb +68 -0
- data/lib/ace/task/atoms/task_frontmatter_defaults.rb +46 -0
- data/lib/ace/task/atoms/task_id_formatter.rb +62 -0
- data/lib/ace/task/atoms/task_validation_rules.rb +51 -0
- data/lib/ace/task/cli/commands/create.rb +105 -0
- data/lib/ace/task/cli/commands/doctor.rb +206 -0
- data/lib/ace/task/cli/commands/list.rb +73 -0
- data/lib/ace/task/cli/commands/plan.rb +119 -0
- data/lib/ace/task/cli/commands/show.rb +58 -0
- data/lib/ace/task/cli/commands/status.rb +77 -0
- data/lib/ace/task/cli/commands/update.rb +183 -0
- data/lib/ace/task/cli.rb +83 -0
- data/lib/ace/task/models/task.rb +46 -0
- data/lib/ace/task/molecules/path_utils.rb +20 -0
- data/lib/ace/task/molecules/subtask_creator.rb +130 -0
- data/lib/ace/task/molecules/task_config_loader.rb +92 -0
- data/lib/ace/task/molecules/task_creator.rb +115 -0
- data/lib/ace/task/molecules/task_display_formatter.rb +221 -0
- data/lib/ace/task/molecules/task_doctor_fixer.rb +510 -0
- data/lib/ace/task/molecules/task_doctor_reporter.rb +264 -0
- data/lib/ace/task/molecules/task_frontmatter_validator.rb +138 -0
- data/lib/ace/task/molecules/task_loader.rb +119 -0
- data/lib/ace/task/molecules/task_plan_cache.rb +190 -0
- data/lib/ace/task/molecules/task_plan_generator.rb +141 -0
- data/lib/ace/task/molecules/task_plan_prompt_builder.rb +91 -0
- data/lib/ace/task/molecules/task_reparenter.rb +247 -0
- data/lib/ace/task/molecules/task_resolver.rb +115 -0
- data/lib/ace/task/molecules/task_scanner.rb +129 -0
- data/lib/ace/task/molecules/task_structure_validator.rb +154 -0
- data/lib/ace/task/organisms/task_doctor.rb +199 -0
- data/lib/ace/task/organisms/task_manager.rb +353 -0
- data/lib/ace/task/version.rb +7 -0
- data/lib/ace/task.rb +37 -0
- metadata +197 -0
|
@@ -0,0 +1,351 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-review
|
|
3
|
+
allowed-tools: Bash, Read
|
|
4
|
+
description: Review draft tasks for readiness, vertical slice quality, verification
|
|
5
|
+
plans, and promotion to pending
|
|
6
|
+
doc-type: workflow
|
|
7
|
+
purpose: Review draft tasks for readiness and quality before promotion
|
|
8
|
+
ace-docs:
|
|
9
|
+
last-updated: '2026-03-21'
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Review Task Workflow Instruction
|
|
13
|
+
|
|
14
|
+
## Goal
|
|
15
|
+
|
|
16
|
+
Validate draft behavioral specifications and promote to pending when ready. This workflow acts as the readiness gate between drafting and implementation. It reviews draft tasks for completeness, conducts autonomous research to resolve open questions, generates critical questions for unresolved items, and either promotes validated drafts to `status: pending` or blocks with `needs_review: true` when questions remain.
|
|
17
|
+
|
|
18
|
+
## Prerequisites
|
|
19
|
+
|
|
20
|
+
- Task file exists, primarily with `status: draft`
|
|
21
|
+
- Understanding of task's current state and content structure
|
|
22
|
+
- Write access to task files in `.ace-tasks/`
|
|
23
|
+
- Access to project documentation and codebase for research
|
|
24
|
+
|
|
25
|
+
## Project Context Loading
|
|
26
|
+
|
|
27
|
+
- Read and follow: `ace-bundle wfi://bundle`
|
|
28
|
+
|
|
29
|
+
## Process Steps
|
|
30
|
+
|
|
31
|
+
1. **Load and Analyze Draft Task:**
|
|
32
|
+
- **Task Selection:**
|
|
33
|
+
- If specific task provided: Use the provided task path
|
|
34
|
+
- If no task specified: Run `ace-task list --status draft` to view draft tasks
|
|
35
|
+
- **Load Task Content:**
|
|
36
|
+
- Read the task file from the identified path
|
|
37
|
+
- Verify the task has `status: draft`
|
|
38
|
+
- Detect whether the task is an orchestrator with subtasks
|
|
39
|
+
- If the task is an orchestrator:
|
|
40
|
+
- Enumerate child subtasks and their current statuses before any promotion
|
|
41
|
+
- Treat every child subtask still in `draft` as an additional review target
|
|
42
|
+
- Review draft subtasks first and defer any parent promotion decision until child review outcomes are known
|
|
43
|
+
- Parse the behavioral specification sections:
|
|
44
|
+
- User Experience (input, process, output)
|
|
45
|
+
- Expected Behavior
|
|
46
|
+
- Interface Contract
|
|
47
|
+
- Success Criteria
|
|
48
|
+
- Validation Questions
|
|
49
|
+
- Vertical Slice Decomposition (Task/Subtask Model)
|
|
50
|
+
- Verification Plan
|
|
51
|
+
- Frontmatter `bundle` block (`presets`, `files`, `commands`)
|
|
52
|
+
- Identify gaps, ambiguities, or assumptions that need clarification
|
|
53
|
+
|
|
54
|
+
2. **Autonomous Research Phase:**
|
|
55
|
+
- **Attempt Self-Resolution First:**
|
|
56
|
+
- Search project documentation for answers
|
|
57
|
+
- Analyze similar implementations in codebase
|
|
58
|
+
- Review related tasks and their solutions
|
|
59
|
+
- Check architectural decisions and patterns
|
|
60
|
+
- Consult technical documentation and best practices
|
|
61
|
+
- **Web Search When Appropriate:**
|
|
62
|
+
- If WebSearch tool is available and needed:
|
|
63
|
+
- Search for industry standards or best practices
|
|
64
|
+
- Research security implications or vulnerabilities
|
|
65
|
+
- Find performance benchmarks or comparisons
|
|
66
|
+
- Look up API documentation or integration guides
|
|
67
|
+
- Only search when internal resources insufficient
|
|
68
|
+
- Focus searches on specific technical questions
|
|
69
|
+
- **Document Research Findings:**
|
|
70
|
+
- Note what was discovered through research
|
|
71
|
+
- Record reasonable assumptions based on evidence
|
|
72
|
+
- Include sources from web searches if used
|
|
73
|
+
- Identify truly unresolvable questions
|
|
74
|
+
|
|
75
|
+
3. **Critical Question Generation:**
|
|
76
|
+
- **Analyze for Completeness:**
|
|
77
|
+
- Identify missing information that would block implementation
|
|
78
|
+
- Find ambiguous requirements that could lead to wrong implementations
|
|
79
|
+
- Spot assumptions that need validation
|
|
80
|
+
- Detect edge cases not covered in current specification
|
|
81
|
+
- Check for comprehensive renaming scope:
|
|
82
|
+
- If task involves renaming, are all related files identified?
|
|
83
|
+
- Are library directories, test files, and imports considered?
|
|
84
|
+
- Have module/class names been addressed?
|
|
85
|
+
- **Filter Questions by Resolution Status:**
|
|
86
|
+
- Questions answered through research (document the answer)
|
|
87
|
+
- Questions with reasonable defaults (document assumption)
|
|
88
|
+
- Questions requiring human input (escalate only these)
|
|
89
|
+
- **Generate Clarifying Questions:**
|
|
90
|
+
- Only include questions that truly need human decision
|
|
91
|
+
- Frame questions to be answerable asynchronously
|
|
92
|
+
- Make questions specific and actionable
|
|
93
|
+
- Include research context and suggested defaults
|
|
94
|
+
|
|
95
|
+
4. **Readiness Checklist:**
|
|
96
|
+
Evaluate the draft against these readiness criteria:
|
|
97
|
+
|
|
98
|
+
- [ ] **Behavioral Spec Complete**: User Experience section defines input, process, and output
|
|
99
|
+
- [ ] **Expected Behavior Defined**: Clear description of what the system should do
|
|
100
|
+
- [ ] **Interface Contracts Specified**: CLI/API/UI contracts with examples
|
|
101
|
+
- [ ] **Success Criteria Measurable**: Observable, testable outcomes defined
|
|
102
|
+
- [ ] **Scope Boundaries Clear**: In-scope and out-of-scope explicitly stated
|
|
103
|
+
- [ ] **Validation Questions Addressed**: All validation questions either answered or documented as blocking
|
|
104
|
+
- [ ] **Vertical Slice Quality (Task/Subtask)**: Scope is decomposed into end-to-end capability slices (standalone task or orchestrator+subtasks), not horizontal layer-only work
|
|
105
|
+
- [ ] **Subtask Slice Clarity**: Each subtask has a distinct observable outcome and does not duplicate sibling scope
|
|
106
|
+
- [ ] **Child Readiness Complete** (orchestrators only): Every draft child subtask has been reviewed and either promoted to `pending` or blocked with documented questions
|
|
107
|
+
- [ ] **Tracer-First for Uncertain Architecture**: For uncertain/novel execution paths, first subtask is a tracer slice validating viability
|
|
108
|
+
- [ ] **Slice Size Signal Present**: Each slice includes advisory size (`small|medium|large`) for planning visibility
|
|
109
|
+
- [ ] **Decision-Complete Spec**: Implementer can execute without inventing missing behavioral decisions
|
|
110
|
+
- [ ] **Defaults Declared**: Ambiguous/unspecified behavior has explicit defaults
|
|
111
|
+
- [ ] **Verification Plan Present**: Spec includes explicit verification plan with concrete scenarios and commands/checks
|
|
112
|
+
- [ ] **Verification Coverage**: Verification includes unit/equivalent checks, integration/E2E checks when needed, and at least one failure/invalid-path check
|
|
113
|
+
- [ ] **Success Criteria ↔ Verification Mapping**: Each success criterion has corresponding verification evidence path
|
|
114
|
+
- [ ] **Bundle Frontmatter Present**: Task frontmatter includes `bundle` with keys `presets`, `files`, `commands` in canonical order
|
|
115
|
+
- [ ] **Bundle Context Completeness**: `bundle.files` includes all critical context artifacts required for fresh-session execution
|
|
116
|
+
- [ ] **No Contradictory Directives**: Scan spec for conflicting instructions (e.g., "replace X" and "preserve X" for same entity; "add" and "remove" same dependency). Flag any contradictions as HIGH priority questions
|
|
117
|
+
- [ ] **Consumer Packages Listed**: When interfaces change (CLI flags, config keys, protocol URIs), spec identifies which packages consume the interface and will need updates
|
|
118
|
+
- [ ] **Deliverables Match Scope**: Number of deliverables is proportional to scope -- flag if spec lists 3 deliverables but scope implies 15+ file changes
|
|
119
|
+
- [ ] **Operating Modes Covered**: Spec addresses relevant operating modes (dry-run, force, verbose, quiet) or explicitly marks them out-of-scope
|
|
120
|
+
- [ ] **Degenerate Inputs Covered**: Spec considers identity operations (X=Y), empty inputs, and self-referential calls where the same entity appears in both argument positions
|
|
121
|
+
- [ ] **Per-Path Variations Covered**: If spec says "same behavior for X and Y", it enumerates edge cases unique to each path (guard logic, error handling, parameter differences)
|
|
122
|
+
- [ ] **End-State Coherence** (orchestrator subtasks only): Concepts introduced by this subtask
|
|
123
|
+
(new fields, modes, formats) are expected to exist in the final deliverable --
|
|
124
|
+
not be removed by a later subtask. If this subtask adds a concept that a later
|
|
125
|
+
subtask will consolidate away, flag as SCOPE RISK and consider merging subtasks.
|
|
126
|
+
- [ ] **Title Length**: Title is max 80 characters
|
|
127
|
+
- [ ] **Folder Slug**: 3-5 word context slug for folder
|
|
128
|
+
- [ ] **File Slug**: 4-7 word action slug for spec file
|
|
129
|
+
- [ ] **No Slug Repetition**: Subtask slugs do not repeat words from parent folder slug
|
|
130
|
+
- [ ] **Usage Documentation Present**: If task changes CLI/API/workflow/config interfaces, `ux/usage.md` exists with concrete usage scenarios
|
|
131
|
+
- [ ] **No Blocking Questions Remain**: All HIGH priority questions resolved or have acceptable defaults
|
|
132
|
+
|
|
133
|
+
**Assessment:**
|
|
134
|
+
- If ALL checklist items pass: Task is ready for promotion
|
|
135
|
+
- If ANY checklist item fails: Task needs work, document what's missing
|
|
136
|
+
- `large` slice signal alone is advisory and does not block promotion
|
|
137
|
+
|
|
138
|
+
5. **Promote or Block:**
|
|
139
|
+
|
|
140
|
+
**If Ready (all readiness criteria met):**
|
|
141
|
+
- **Orchestrator rule:** If the task is an orchestrator, only promote the parent after all draft child subtasks have been reviewed and promoted successfully.
|
|
142
|
+
- **Recursive promotion for orchestrators:**
|
|
143
|
+
- Review each draft child subtask using the same checklist
|
|
144
|
+
- Promote each child subtask that passes:
|
|
145
|
+
```bash
|
|
146
|
+
ace-task update <child-ref> --set status=pending
|
|
147
|
+
ace-task update <child-ref> --set needs_review=false
|
|
148
|
+
```
|
|
149
|
+
- For any child subtask that fails, keep it in `draft`, set `needs_review=true`, and do not promote the parent
|
|
150
|
+
- Promote the task status and clear any existing `needs_review` flag:
|
|
151
|
+
```bash
|
|
152
|
+
ace-task update <ref> --set status=pending
|
|
153
|
+
ace-task update <ref> --set needs_review=false
|
|
154
|
+
```
|
|
155
|
+
- Report promotion:
|
|
156
|
+
```
|
|
157
|
+
Task <ref> promoted from draft to pending.
|
|
158
|
+
Readiness: All behavioral specs validated, no blocking questions.
|
|
159
|
+
Ready for implementation via ace-assign.
|
|
160
|
+
```
|
|
161
|
+
- **Orchestrator summary requirement:**
|
|
162
|
+
- Report how many child subtasks were reviewed
|
|
163
|
+
- Report how many child subtasks were promoted
|
|
164
|
+
- Report whether parent promotion was deferred due to any blocked child
|
|
165
|
+
|
|
166
|
+
**If Not Ready (blocking questions or gaps remain):**
|
|
167
|
+
- Add `needs_review: true` to task metadata (`ace-task update <ref> --set needs_review=true`)
|
|
168
|
+
- Keep status as `draft`
|
|
169
|
+
- Report blocking status:
|
|
170
|
+
```
|
|
171
|
+
Task <ref> remains draft.
|
|
172
|
+
needs_review: true -- N HIGH priority questions require human input.
|
|
173
|
+
See Review Questions section in task file.
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
6. **Question Documentation and Persistence:**
|
|
177
|
+
- **Persist Questions in Task File:**
|
|
178
|
+
- Add questions directly to the task file (not just review output)
|
|
179
|
+
- Place in dedicated section for easy access and tracking
|
|
180
|
+
- Questions remain until explicitly answered and removed
|
|
181
|
+
- Enable independent review/answering sessions
|
|
182
|
+
- **Question Section Placement:**
|
|
183
|
+
- For draft tasks: After metadata, before main content
|
|
184
|
+
- **Question Format with Research Context:**
|
|
185
|
+
```markdown
|
|
186
|
+
---
|
|
187
|
+
id: task-001
|
|
188
|
+
status: draft
|
|
189
|
+
priority: high
|
|
190
|
+
needs_review: true
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Review Questions (Pending Human Input)
|
|
194
|
+
|
|
195
|
+
### [HIGH] Critical Implementation Questions
|
|
196
|
+
- [ ] How should we handle user sessions that exceed 24 hours?
|
|
197
|
+
- **Research conducted**: Checked auth patterns in codebase
|
|
198
|
+
- **Similar implementations**: Found session extension in API module
|
|
199
|
+
- **Suggested default**: Auto-extend if active, expire if idle >2h
|
|
200
|
+
- **Why needs human input**: Business policy decision required
|
|
201
|
+
|
|
202
|
+
### [MEDIUM] Enhancement Questions
|
|
203
|
+
- [ ] Should we log all session extensions for audit purposes?
|
|
204
|
+
- **Research conducted**: Current logging practices reviewed
|
|
205
|
+
- **Suggested default**: Log only anomalous extensions (>5 per day)
|
|
206
|
+
- **Why needs human input**: Compliance requirements unclear
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
7. **Review Completion and Summary:**
|
|
210
|
+
- **Generate Review Summary:**
|
|
211
|
+
- List all questions generated with priorities
|
|
212
|
+
- Highlight critical blockers that need answers
|
|
213
|
+
- Report readiness checklist results
|
|
214
|
+
- State whether task was promoted or blocked
|
|
215
|
+
- **Summary Format:**
|
|
216
|
+
```markdown
|
|
217
|
+
## Review Summary
|
|
218
|
+
|
|
219
|
+
**Readiness Checklist:** X/N criteria met
|
|
220
|
+
**Questions Generated:** X total (Y high, Z medium)
|
|
221
|
+
**Critical Blockers:** [List HIGH priority questions]
|
|
222
|
+
**Advisories:** [List non-blocking advisories such as large slice size]
|
|
223
|
+
**Decision:** Promoted to pending / Remains draft (needs_review: true)
|
|
224
|
+
**Recommended Next Steps:** Based on current state...
|
|
225
|
+
```
|
|
226
|
+
- **Orchestrator runs should also include:**
|
|
227
|
+
- `Subtasks Reviewed: X`
|
|
228
|
+
- `Subtasks Promoted: Y`
|
|
229
|
+
- `Subtasks Blocked: Z`
|
|
230
|
+
- `Parent Decision: promoted / deferred`
|
|
231
|
+
|
|
232
|
+
## Secondary Support: Non-Draft Statuses
|
|
233
|
+
|
|
234
|
+
While review-task primarily serves as the draft-to-pending gate, it can provide lightweight review for other statuses:
|
|
235
|
+
|
|
236
|
+
- **Pending tasks**: Validate implementation plan completeness, check for stale assumptions
|
|
237
|
+
- **In-progress tasks**: Document progress, identify blockers, update remaining steps
|
|
238
|
+
- **Completed tasks**: Add retrospective notes, identify follow-up tasks
|
|
239
|
+
|
|
240
|
+
For non-draft tasks, skip the Readiness Checklist and Promote/Block steps. Focus on content enhancement and question generation only.
|
|
241
|
+
|
|
242
|
+
## Decision Guidance
|
|
243
|
+
|
|
244
|
+
### When to Use This Workflow
|
|
245
|
+
|
|
246
|
+
**Use review-task when:**
|
|
247
|
+
- Validating a draft task for promotion to pending
|
|
248
|
+
- Refining draft specifications before implementation
|
|
249
|
+
- Researching answers to open questions on draft tasks
|
|
250
|
+
- Checking if a draft is implementation-ready
|
|
251
|
+
|
|
252
|
+
**Don't use review-task when:**
|
|
253
|
+
- Creating new tasks (use draft-task)
|
|
254
|
+
- Planning implementation details (use plan-task via ace-assign)
|
|
255
|
+
- Executing implementation (use work-on-task)
|
|
256
|
+
- Converting ideas to tasks (use draft-task with idea input)
|
|
257
|
+
|
|
258
|
+
## Success Criteria
|
|
259
|
+
|
|
260
|
+
- Draft task validated against readiness checklist
|
|
261
|
+
- Critical questions generated and documented with research context
|
|
262
|
+
- Questions prioritized by implementation impact
|
|
263
|
+
- Default assumptions provided for all questions
|
|
264
|
+
- Vertical slice quality validated using task/subtask model
|
|
265
|
+
- Verification Plan quality validated against success criteria
|
|
266
|
+
- Bundle frontmatter (`presets`, `files`, `commands`) validated for completeness
|
|
267
|
+
- Task promoted to pending if ready, or blocked with `needs_review: true`
|
|
268
|
+
- Orchestrator parents are promoted only after draft child subtasks have also passed review
|
|
269
|
+
- Structure and formatting preserved
|
|
270
|
+
- No loss of existing information
|
|
271
|
+
- Clear improvement in task clarity or completeness
|
|
272
|
+
- User receives actionable list of questions to answer (if any)
|
|
273
|
+
|
|
274
|
+
## Task Management Integration
|
|
275
|
+
|
|
276
|
+
### Finding Tasks Needing Review
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
# List all draft tasks ready for review
|
|
280
|
+
ace-task list --status draft
|
|
281
|
+
|
|
282
|
+
# List all tasks requiring human input (using preset)
|
|
283
|
+
ace-task list needs-review
|
|
284
|
+
|
|
285
|
+
# Alternative: use ace-search to find tasks with needs_review flag
|
|
286
|
+
cd .ace-tasks && ace-search "needs_review: true" --content
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Review Workflow Patterns
|
|
290
|
+
|
|
291
|
+
1. **Draft Validation Session:**
|
|
292
|
+
- Run filter to find draft tasks
|
|
293
|
+
- Review behavioral spec completeness
|
|
294
|
+
- Promote ready tasks, block incomplete ones
|
|
295
|
+
|
|
296
|
+
2. **Question Resolution Session:**
|
|
297
|
+
- Run filter to find tasks needing review
|
|
298
|
+
- Answer questions in batch
|
|
299
|
+
- Remove `needs_review` flag as questions are resolved
|
|
300
|
+
- Re-run review-task to promote
|
|
301
|
+
|
|
302
|
+
3. **Continuous Improvement:**
|
|
303
|
+
- AI agents autonomously research first
|
|
304
|
+
- Only escalate true blockers
|
|
305
|
+
- Questions persist for asynchronous handling
|
|
306
|
+
|
|
307
|
+
## Error Handling
|
|
308
|
+
|
|
309
|
+
### Common Issues and Solutions
|
|
310
|
+
|
|
311
|
+
**"Task not found" Error:**
|
|
312
|
+
- **Cause**: Invalid task path or ID
|
|
313
|
+
- **Solution**: Use `ace-task list` to find correct path
|
|
314
|
+
|
|
315
|
+
**"Task is not draft" Warning:**
|
|
316
|
+
- **Cause**: Task has a non-draft status
|
|
317
|
+
- **Solution**: Review-task primarily targets draft tasks. For other statuses, use lightweight review mode (skip readiness checklist and promotion)
|
|
318
|
+
|
|
319
|
+
**"Structure validation failed" Error:**
|
|
320
|
+
- **Cause**: Breaking required task structure
|
|
321
|
+
- **Solution**: Preserve original section organization
|
|
322
|
+
|
|
323
|
+
## Integration with Other Workflows
|
|
324
|
+
|
|
325
|
+
### Upstream Workflows
|
|
326
|
+
- **capture-idea**: Ideas that become tasks may need review for clarity
|
|
327
|
+
- **draft-task**: New drafts are the primary input for review-task
|
|
328
|
+
|
|
329
|
+
### Downstream Workflows
|
|
330
|
+
- **plan-task (via ace-assign)**: JIT implementation planning for promoted pending tasks
|
|
331
|
+
- **work-on-task**: Reviewed and promoted tasks are clearer to implement
|
|
332
|
+
|
|
333
|
+
## Key Value: Draft-to-Pending Readiness Gate
|
|
334
|
+
|
|
335
|
+
The review-task workflow serves as the quality gate between specification and implementation:
|
|
336
|
+
|
|
337
|
+
1. **Research-First Approach**: AI agents attempt to find answers through documentation, codebase analysis, and pattern recognition before escalating
|
|
338
|
+
2. **Readiness Checklist**: Systematic validation ensures behavioral specs are complete before promotion
|
|
339
|
+
3. **Smart Question Filtering**: Only truly unresolvable questions requiring business/design decisions are escalated
|
|
340
|
+
4. **Persistent Question Tracking**: Questions are saved in task files with `needs_review: true` metadata for easy filtering
|
|
341
|
+
5. **Clear Lifecycle Decision**: Every review results in either promotion to pending or documented blocking questions
|
|
342
|
+
|
|
343
|
+
This approach enables:
|
|
344
|
+
- **Clear Lifecycle Gate**: Draft tasks must pass validation before entering the implementation pipeline
|
|
345
|
+
- **Efficient Human Time**: Humans only address true decision points
|
|
346
|
+
- **Better Quality**: Research context leads to more informed decisions
|
|
347
|
+
- **Task Management Integration**: Easy tracking of tasks needing attention
|
|
348
|
+
|
|
349
|
+
---
|
|
350
|
+
|
|
351
|
+
This workflow ensures draft tasks are validated and promoted to pending when ready, or blocked with clear questions when not, serving as the quality gate between behavioral specification and implementation planning.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-update
|
|
3
|
+
description: Update task metadata, status, position, or location
|
|
4
|
+
allowed-tools: Bash, Read
|
|
5
|
+
argument-hint: "<ref> [--set K=V] [--move-to FOLDER] [--move-as-child-of PARENT|none]
|
|
6
|
+
[--position first|after:<ref>]"
|
|
7
|
+
doc-type: workflow
|
|
8
|
+
purpose: Update task fields, change status, move between folders, and manage hierarchy
|
|
9
|
+
ace-docs:
|
|
10
|
+
last-updated: '2026-03-21'
|
|
11
|
+
last-checked: '2026-03-21'
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# Update Task
|
|
15
|
+
|
|
16
|
+
## Goal
|
|
17
|
+
|
|
18
|
+
Provide a single canonical workflow for task updates, including status changes, metadata edits, and hierarchy movement operations, including promote/demote flows.
|
|
19
|
+
|
|
20
|
+
## Prerequisites
|
|
21
|
+
|
|
22
|
+
- A valid task reference (`<ref>`) for the target task/subtask
|
|
23
|
+
- Target folder or parent references for moves (when provided)
|
|
24
|
+
- Permissions to modify task files in the active repository context
|
|
25
|
+
|
|
26
|
+
## Project Context Loading
|
|
27
|
+
|
|
28
|
+
Load and follow:
|
|
29
|
+
|
|
30
|
+
- `ace-bundle wfi://bundle`
|
|
31
|
+
|
|
32
|
+
## Process Steps
|
|
33
|
+
|
|
34
|
+
1. **Choose the update intent**
|
|
35
|
+
|
|
36
|
+
- Metadata updates (status, priority, tags, dependencies, notes)
|
|
37
|
+
- Lifecycle transitions (backlog/archive/done flows via `--set status=...`)
|
|
38
|
+
- Reparenting / hierarchy movement
|
|
39
|
+
- Sort order changes
|
|
40
|
+
|
|
41
|
+
2. **Apply metadata updates**
|
|
42
|
+
|
|
43
|
+
Use focused `--set` operations:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
ace-task update <ref> --set status=in-progress
|
|
47
|
+
ace-task update <ref> --set status=done
|
|
48
|
+
ace-task update <ref> --set status=done,priority=high
|
|
49
|
+
ace-task update <ref> --add tags=shipped
|
|
50
|
+
ace-task update <ref> --remove tags=wip
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
3. **Apply hierarchy updates via `--move-as-child-of`**
|
|
54
|
+
|
|
55
|
+
- Promote a subtask to standalone
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
ace-task update <ref> --move-as-child-of none
|
|
59
|
+
ace-task update <ref> --move-as-child-of none --dry-run
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
- Demote a task to be a child of a parent orchestrator
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
ace-task update <ref> --move-as-child-of <parent-ref>
|
|
66
|
+
ace-task update <ref> --move-as-child-of <parent-ref> --dry-run
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
- Convert/restructure to parent-child shape when the command supports direct self-parenting in your CLI version
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
ace-task update <ref> --move-as-child-of self
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
4. **Adjust sort position**
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
ace-task update <ref> --position first
|
|
79
|
+
ace-task update <ref> --position after:<other-ref>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
5. **Handle folder/location moves**
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
ace-task update <ref> --move-to archive
|
|
86
|
+
ace-task update <ref> --move-to backlog
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
6. **Validate results immediately**
|
|
90
|
+
|
|
91
|
+
- Re-open target task: `ace-task show <ref>`
|
|
92
|
+
- Confirm metadata, location, parent/child relationship, and position
|
|
93
|
+
- Verify dry-run output before executing non-idempotent moves
|
|
94
|
+
|
|
95
|
+
## Error Handling
|
|
96
|
+
|
|
97
|
+
### Missing or invalid target reference
|
|
98
|
+
|
|
99
|
+
- Symptom: command returns unresolved reference or file-not-found error
|
|
100
|
+
- Fix: verify ref format and current ref status with `ace-task show` or `ace-task finder`
|
|
101
|
+
|
|
102
|
+
### Invalid move target
|
|
103
|
+
|
|
104
|
+
- Symptom: reparent command fails for non-orchestrator parent or circular relationship
|
|
105
|
+
- Fix: confirm the target parent is the intended hierarchy node and re-run with valid `--move-as-child-of` value
|
|
106
|
+
|
|
107
|
+
### Command-level validation failures
|
|
108
|
+
|
|
109
|
+
- Symptom: argument parsing errors or rejected flags
|
|
110
|
+
- Fix: rerun with a narrower set of flags and add one change at a time
|
|
111
|
+
|
|
112
|
+
## Success Criteria
|
|
113
|
+
|
|
114
|
+
- Target task is updated with expected status/metadata changes
|
|
115
|
+
- Reparenting operations produce the intended hierarchy state
|
|
116
|
+
- Sort position changes place the task at the requested location
|
|
117
|
+
- Location moves place the task in the intended folder/release
|
|
118
|
+
- Final `ace-task show <ref>` output matches expected target state
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-work
|
|
3
|
+
description: Execute task implementation against behavioral spec using pre-loaded
|
|
4
|
+
plan
|
|
5
|
+
assign:
|
|
6
|
+
sub-steps:
|
|
7
|
+
- onboard-base
|
|
8
|
+
- task-load
|
|
9
|
+
- plan-task
|
|
10
|
+
- work-on-task
|
|
11
|
+
- pre-commit-review
|
|
12
|
+
- verify-test
|
|
13
|
+
- release-minor
|
|
14
|
+
- create-retro
|
|
15
|
+
context: fork
|
|
16
|
+
doc-type: workflow
|
|
17
|
+
purpose: Execute task implementation from plan with quality gates
|
|
18
|
+
ace-docs:
|
|
19
|
+
last-updated: '2026-03-21'
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# Work on Task
|
|
23
|
+
|
|
24
|
+
## Start State
|
|
25
|
+
|
|
26
|
+
You have context sources already loaded from prior sub-steps:
|
|
27
|
+
- **Project** (`project-base`) — vision, architecture, CLI tools, conventions, and repo-level onboarding context
|
|
28
|
+
- **Task** (`ace-bundle task://<ref>`) — behavioral spec, success criteria, interface contract
|
|
29
|
+
- **Plan** (`ace-task plan <ref> --content`) — implementation checklist with steps, file paths, verification commands
|
|
30
|
+
- **Pre-commit review** runs after implementation and before verification when enabled
|
|
31
|
+
- **Verification** runs in-tree per-package only via `verify-test` before subtree release; no full suite is executed at this level
|
|
32
|
+
|
|
33
|
+
If the plan is missing or stale: run `ace-task plan <ref> --content` and wait before proceeding.
|
|
34
|
+
|
|
35
|
+
### Plan Retrieval Guard
|
|
36
|
+
|
|
37
|
+
To avoid known `--content` stalls in some environments:
|
|
38
|
+
1. Prefer `ace-task plan <ref>` first and read the returned plan path.
|
|
39
|
+
2. Use `ace-task plan <ref> --content` only when inline output is explicitly required.
|
|
40
|
+
3. If `--content` shows no progress after about 3 minutes, stop it and fall back to:
|
|
41
|
+
- `ace-task plan <ref>` (path mode, reuse cached plan when available)
|
|
42
|
+
- The most recent plan artifact plus current task spec, documented in the step report
|
|
43
|
+
4. If stalls repeat, add a follow-up fix task and capture evidence in the retrospective.
|
|
44
|
+
|
|
45
|
+
## Primary Directive
|
|
46
|
+
|
|
47
|
+
Work through the plan checklist, step by step:
|
|
48
|
+
1. Mark task in-progress: `ace-task update <ref> --set status=in-progress`
|
|
49
|
+
2. For each plan step: implement → verify → commit → mark corresponding task checkbox done
|
|
50
|
+
- Plan steps include `path:line` anchors to spec sections — when satisfied, mark the corresponding Success Criteria or Deliverables checkbox as `[x]`
|
|
51
|
+
3. Mark task done: `ace-task update <ref> --set status=done`
|
|
52
|
+
|
|
53
|
+
## Principles
|
|
54
|
+
|
|
55
|
+
**Spec adherence:**
|
|
56
|
+
- Success Criteria are acceptance tests — every criterion must pass before done
|
|
57
|
+
- Interface Contract defines inputs, outputs, and boundaries — don't invent outside it
|
|
58
|
+
- If the spec says X, implement X — don't gold-plate, don't simplify away requirements
|
|
59
|
+
- If spec and plan conflict, spec wins — the plan is a HOW, not a WHAT
|
|
60
|
+
- If the spec is ambiguous or incomplete: stop and ask, don't assume
|
|
61
|
+
|
|
62
|
+
**Prior implementation awareness:**
|
|
63
|
+
- Before creating new modules, search for existing implementations of the same concern — especially spike or prototype code from prior subtasks
|
|
64
|
+
- If a sibling task (same parent, earlier sequence) produced spike code: refactor and promote it rather than creating parallel "production" versions
|
|
65
|
+
- Check dependency task reports and the task folder for prior work artifacts (concept inventories, spike reports)
|
|
66
|
+
- When plan file paths point to locations where code already exists, integrate rather than duplicate
|
|
67
|
+
|
|
68
|
+
**Execution discipline:**
|
|
69
|
+
- Commit incrementally — one logical step per commit, use `ace-git-commit`
|
|
70
|
+
- Test after every change — run `ace-test`; don't accumulate untested code
|
|
71
|
+
- If a test fails: fix it before moving to the next step
|
|
72
|
+
- If a test failure is undiagnosable after one attempt: stop and report
|
|
73
|
+
|
|
74
|
+
**Task lifecycle:**
|
|
75
|
+
- `draft` status: warn the user that the spec hasn't been reviewed, then continue only with explicit confirmation. In unattended/fork contexts where interactive confirmation is not possible, proceed after marking in-progress — the assignment creation layer is responsible for blocking draft tasks before they reach this point.
|
|
76
|
+
- Mark in-progress before first change, done after last verification
|
|
77
|
+
- Never modify task frontmatter directly — use `ace-task update <ref> --set key=value`
|
|
78
|
+
|
|
79
|
+
## Code Conventions
|
|
80
|
+
|
|
81
|
+
- Follow established project patterns — don't introduce new abstractions or styles
|
|
82
|
+
- 2-space indentation (Ruby); keep lines under 120 characters
|
|
83
|
+
- Write tests for all new logic; run `ace-test` before committing
|
|
84
|
+
|
|
85
|
+
## Task Folder
|
|
86
|
+
|
|
87
|
+
**Documents:** Task-specific docs (reports, findings, usage docs) go in the task folder — never in the project root.
|
|
88
|
+
|
|
89
|
+
**Codemods** (scripts that transform files): create in `{task-folder}/codemods/`, never in `bin/`
|
|
90
|
+
|
|
91
|
+
**Temporary files**: create in the system temp directory (`/tmp/`), never in the project root or task folder
|
|
92
|
+
|
|
93
|
+
## Done
|
|
94
|
+
|
|
95
|
+
All plan steps checked, all success criteria pass:
|
|
96
|
+
|
|
97
|
+
1. **Verify working tree is clean** — no uncommitted changes:
|
|
98
|
+
```bash
|
|
99
|
+
git status --short
|
|
100
|
+
```
|
|
101
|
+
If dirty, commit remaining changes with `ace-git-commit` before proceeding.
|
|
102
|
+
|
|
103
|
+
2. Mark task done:
|
|
104
|
+
```bash
|
|
105
|
+
ace-task update <ref> --set status=done
|
|
106
|
+
```
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Ace
|
|
4
|
+
module Task
|
|
5
|
+
module Atoms
|
|
6
|
+
# Glob patterns and matching logic for task spec files.
|
|
7
|
+
# Tasks use `.s.md` extension but exclude `.idea.s.md` (ideas).
|
|
8
|
+
# Subtask files are distinguished from primary files by their ID suffix.
|
|
9
|
+
module TaskFilePattern
|
|
10
|
+
# Pattern matching all spec files
|
|
11
|
+
SPEC_PATTERN = "*.s.md"
|
|
12
|
+
|
|
13
|
+
# Pattern to exclude idea spec files
|
|
14
|
+
IDEA_PATTERN = "*.idea.s.md"
|
|
15
|
+
|
|
16
|
+
# Subtask ID pattern: parent ID + dot + single char (e.g., "8pp.t.q7w.a")
|
|
17
|
+
SUBTASK_ID_REGEX = /^([0-9a-z]{3}\.[a-z]\.[0-9a-z]{3})\.([a-z0-9])$/
|
|
18
|
+
|
|
19
|
+
# Check if a spec file is the primary file for its containing folder.
|
|
20
|
+
# The primary file's ID prefix matches the folder's ID prefix exactly.
|
|
21
|
+
# Subtask files have an additional `.{char}` suffix.
|
|
22
|
+
#
|
|
23
|
+
# @param filename [String] Spec filename (e.g., "8pp.t.q7w-fix-login.s.md")
|
|
24
|
+
# @param folder_id [String] ID extracted from folder name (e.g., "8pp.t.q7w")
|
|
25
|
+
# @return [Boolean]
|
|
26
|
+
def self.primary_file?(filename, folder_id)
|
|
27
|
+
return false if filename.end_with?(".idea.s.md")
|
|
28
|
+
|
|
29
|
+
# Extract ID from filename: "8pp.t.q7w-fix-login.s.md" → "8pp.t.q7w"
|
|
30
|
+
# or subtask: "8pp.t.q7w.a-setup-db.s.md" → "8pp.t.q7w.a"
|
|
31
|
+
file_id = extract_id_from_filename(filename)
|
|
32
|
+
return false unless file_id
|
|
33
|
+
|
|
34
|
+
file_id == folder_id
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Check if a spec file is a subtask file.
|
|
38
|
+
#
|
|
39
|
+
# @param filename [String] Spec filename
|
|
40
|
+
# @return [Boolean]
|
|
41
|
+
def self.subtask_file?(filename)
|
|
42
|
+
return false if filename.end_with?(".idea.s.md")
|
|
43
|
+
|
|
44
|
+
file_id = extract_id_from_filename(filename)
|
|
45
|
+
return false unless file_id
|
|
46
|
+
|
|
47
|
+
file_id.match?(SUBTASK_ID_REGEX)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
# Extract the task ID from a spec filename.
|
|
51
|
+
# "8pp.t.q7w-fix-login.s.md" → "8pp.t.q7w"
|
|
52
|
+
# "8pp.t.q7w.a-setup-db.s.md" → "8pp.t.q7w.a"
|
|
53
|
+
#
|
|
54
|
+
# @param filename [String] Spec filename
|
|
55
|
+
# @return [String, nil] Extracted ID or nil
|
|
56
|
+
def self.extract_id_from_filename(filename)
|
|
57
|
+
# Remove .s.md extension
|
|
58
|
+
base = filename.sub(/\.s\.md$/, "")
|
|
59
|
+
return nil if base == filename # No .s.md extension
|
|
60
|
+
|
|
61
|
+
# Match task ID at start: "8pp.t.q7w" or "8pp.t.q7w.a"
|
|
62
|
+
match = base.match(/^([0-9a-z]{3}\.[a-z]\.[0-9a-z]{3}(?:\.[a-z0-9])?)/)
|
|
63
|
+
match&.[](1)
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|