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,489 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: task-plan
|
|
3
|
+
allowed-tools: Bash, Read
|
|
4
|
+
description: Create a cache-backed implementation plan with freshness checks and anchored
|
|
5
|
+
execution checklist output
|
|
6
|
+
doc-type: workflow
|
|
7
|
+
purpose: Create implementation plans with caching and execution checklists
|
|
8
|
+
ace-docs:
|
|
9
|
+
last-updated: '2026-03-21'
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
# Plan Task Workflow Instruction
|
|
13
|
+
|
|
14
|
+
## Goal
|
|
15
|
+
|
|
16
|
+
Create a JIT (just-in-time) implementation plan for a pending task. The plan is returned as inline output. The calling system handles caching and persistence. It does NOT modify task spec files or change task status. Focus exclusively on the HOW (technical implementation approach) rather than the WHAT (behavioral requirements).
|
|
17
|
+
|
|
18
|
+
## Planning Phase Context
|
|
19
|
+
|
|
20
|
+
**This workflow produces a complete implementation plan as inline output.**
|
|
21
|
+
|
|
22
|
+
- The calling system handles persistence (cache artifacts, pointers, freshness)
|
|
23
|
+
- Does NOT modify task specification files
|
|
24
|
+
- Does NOT change task status
|
|
25
|
+
- Plan is consumed by the next step (work-on-task) or by the developer
|
|
26
|
+
|
|
27
|
+
This workflow can be invoked standalone for ad-hoc planning or as a step within ace-assign.
|
|
28
|
+
|
|
29
|
+
## Output Contract
|
|
30
|
+
|
|
31
|
+
Output the complete plan as your response. Do NOT write files, use Bash, or attempt cache operations.
|
|
32
|
+
|
|
33
|
+
The plan will be consumed by a separate execution agent that has no access to this system prompt or project context. Therefore the plan must be:
|
|
34
|
+
- **Complete**: Fill out ALL applicable templates (Technical Approach, File Modifications, Anchored Checklist)
|
|
35
|
+
- **Self-contained**: Include all file paths, code references, and context needed for execution
|
|
36
|
+
|
|
37
|
+
## Prerequisites
|
|
38
|
+
|
|
39
|
+
- Task file exists with **pending** status (validated by review-task)
|
|
40
|
+
- Task must have clear behavioral requirements from draft-task workflow
|
|
41
|
+
- Understanding of project context and architecture
|
|
42
|
+
- Access to recent git history and project status
|
|
43
|
+
- Load project context
|
|
44
|
+
|
|
45
|
+
## Project Context Loading
|
|
46
|
+
|
|
47
|
+
- Read and follow: `ace-bundle wfi://bundle`
|
|
48
|
+
|
|
49
|
+
## Task Type Considerations
|
|
50
|
+
|
|
51
|
+
**Code Implementation Tasks** (Full workflow applies including test planning):
|
|
52
|
+
- New features with business logic
|
|
53
|
+
- API endpoints and services
|
|
54
|
+
- Data processing and transformation
|
|
55
|
+
- Authentication and authorization systems
|
|
56
|
+
- Integration with external services
|
|
57
|
+
|
|
58
|
+
**Documentation/Workflow Tasks** (Skip test planning steps):
|
|
59
|
+
- Creating or updating documentation
|
|
60
|
+
- Workflow instruction development
|
|
61
|
+
- Guide and template creation
|
|
62
|
+
- Process documentation
|
|
63
|
+
- Configuration documentation
|
|
64
|
+
|
|
65
|
+
**Mixed Tasks** (Apply test planning selectively):
|
|
66
|
+
- Configuration with validation logic
|
|
67
|
+
- CLI tools with complex functionality
|
|
68
|
+
- Templates with embedded logic
|
|
69
|
+
- Build and deployment scripts
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## Process Steps
|
|
73
|
+
|
|
74
|
+
1. **Load and Analyze Pending Task:**
|
|
75
|
+
- **Task Selection:**
|
|
76
|
+
- If specific task provided: Use the provided task path
|
|
77
|
+
- If no task specified: Run `ace-task list --status pending` to get pending tasks
|
|
78
|
+
- Document the selected task path for reference
|
|
79
|
+
- **Load Task Content:**
|
|
80
|
+
- Read the task file from the identified path
|
|
81
|
+
- Verify task has `status: pending`
|
|
82
|
+
- Parse the structure and extract:
|
|
83
|
+
- Behavioral specification (User Experience, Interface Contract, Success Criteria)
|
|
84
|
+
- Existing scope and deliverables
|
|
85
|
+
- Any existing implementation notes
|
|
86
|
+
- **Capture Freshness Inputs:**
|
|
87
|
+
- Build the freshness input set from the task file and loaded context files (`bundle.files`, plus optional usage/docs/research files read during planning)
|
|
88
|
+
- If any freshness input is missing, flag the plan as stale with an explicit gap note
|
|
89
|
+
- If any freshness input mtime is newer than the candidate plan, treat the plan as stale
|
|
90
|
+
- Default stale behavior: automatically regenerate (no interactive prompt)
|
|
91
|
+
- **Load Usage Context (if present):**
|
|
92
|
+
- Check for `ux/usage.md` in the task directory
|
|
93
|
+
- If it exists, read it as additional behavioral context — usage scenarios serve as acceptance criteria for the implementation plan
|
|
94
|
+
- **Plan Against Behavioral Spec Structure:**
|
|
95
|
+
- Treat the behavioral spec as the planning checklist, not background context
|
|
96
|
+
- Explicitly cover each section in the plan: Interface Contract, Error Handling, Edge Cases, Success Criteria
|
|
97
|
+
- Ensure the plan covers operating modes defined by the spec (dry-run, force, verbose, quiet) when relevant
|
|
98
|
+
- If the spec omits information needed for implementation, add a `Behavioral Gaps` section at the end of the plan rather than silently working around omissions
|
|
99
|
+
- **Enumerate Paths Separately for Shared-Behavior Specs:**
|
|
100
|
+
- If the spec says "same behavior" across multiple paths, list each path explicitly in the plan
|
|
101
|
+
- Note per-path divergences (guard logic, dry-run interaction, error handling differences, parameter differences)
|
|
102
|
+
- Do not assume one path's implementation automatically generalizes to all others
|
|
103
|
+
|
|
104
|
+
2. **Technical Research Phase:**
|
|
105
|
+
|
|
106
|
+
**Architecture Pattern Analysis:**
|
|
107
|
+
- Review existing project patterns and identify best fit
|
|
108
|
+
- Analyze how this feature integrates with current architecture
|
|
109
|
+
- Document architectural decisions and rationale
|
|
110
|
+
|
|
111
|
+
**Technology Stack Research:**
|
|
112
|
+
- Research available libraries, frameworks, and tools
|
|
113
|
+
- Evaluate performance implications and compatibility
|
|
114
|
+
- Consider version requirements and dependencies
|
|
115
|
+
|
|
116
|
+
**Implementation Approach Investigation:**
|
|
117
|
+
- Research industry best practices for this type of feature
|
|
118
|
+
- Analyze similar implementations in the codebase
|
|
119
|
+
- Identify proven patterns and anti-patterns
|
|
120
|
+
|
|
121
|
+
**Naming Consistency Analysis:**
|
|
122
|
+
- For rename/refactoring tasks, analyze comprehensive scope:
|
|
123
|
+
- Search for all files and directories containing the old name
|
|
124
|
+
- Identify library structure patterns that need renaming
|
|
125
|
+
- Check test file naming conventions and related test assets
|
|
126
|
+
- Review module and class naming throughout the codebase
|
|
127
|
+
- Document the full renaming scope to prevent partial migrations
|
|
128
|
+
|
|
129
|
+
**Cross-Package Reference Audit:**
|
|
130
|
+
- For rename/namespace/migration tasks that change URIs, paths, or identifiers:
|
|
131
|
+
- Run `ace-search "old-pattern" --content --hidden` for each pattern being changed (e.g., `wfi://lint`, `handbook/skills/as-lint-run/SKILL.md`, file paths)
|
|
132
|
+
- Group results by package to understand cross-package impact
|
|
133
|
+
- Count total references: flag as **HIGH RISK** if >20 references across >3 packages
|
|
134
|
+
- Include all reference-update work in subtask decomposition — do not treat as follow-up
|
|
135
|
+
- For interface changes (CLI flags, config keys, method signatures):
|
|
136
|
+
- Search for all consumers: `ace-search "method_or_key_name" --content --hidden`
|
|
137
|
+
- List consumer packages that will need coordinated updates
|
|
138
|
+
- Document the full downstream scope before implementation begins
|
|
139
|
+
|
|
140
|
+
**Document Research Findings:**
|
|
141
|
+
- Summarize key technical insights
|
|
142
|
+
- Note recommended approaches with pros/cons
|
|
143
|
+
- Identify potential technical risks and mitigation strategies
|
|
144
|
+
|
|
145
|
+
3. **Tool Selection:**
|
|
146
|
+
|
|
147
|
+
Evaluate tools/libraries against: performance requirements, integration with existing stack, maintenance considerations, and team expertise.
|
|
148
|
+
|
|
149
|
+
**Tool Decision:** Selected tool/library, rationale, and key trade-offs.
|
|
150
|
+
|
|
151
|
+
**Dependency Analysis:**
|
|
152
|
+
- List all new dependencies required
|
|
153
|
+
- Verify compatibility with existing dependencies
|
|
154
|
+
- Document any potential conflicts or risks
|
|
155
|
+
|
|
156
|
+
4. **File Modification Planning:**
|
|
157
|
+
|
|
158
|
+
**Create Files:**
|
|
159
|
+
- List all new files to be created with purpose and key components
|
|
160
|
+
- Define file structure and organization
|
|
161
|
+
- Plan directory structure if needed
|
|
162
|
+
|
|
163
|
+
**Modify Files:**
|
|
164
|
+
- Identify existing files requiring changes
|
|
165
|
+
- Document specific modifications and their impact
|
|
166
|
+
- Plan integration points and interfaces
|
|
167
|
+
|
|
168
|
+
**Delete Files:**
|
|
169
|
+
- Identify obsolete files to be removed
|
|
170
|
+
- Document reasons for removal
|
|
171
|
+
- Check dependencies before deletion
|
|
172
|
+
|
|
173
|
+
**Naming Consistency Analysis:**
|
|
174
|
+
- When renaming commands, tools, or components, identify ALL related items:
|
|
175
|
+
- Executable/command files
|
|
176
|
+
- Library directory structures (e.g., `lib/.../old_name/` to `lib/.../new_name/`)
|
|
177
|
+
- Test file patterns (e.g., `old_name_spec.rb` to `new_name_spec.rb`)
|
|
178
|
+
- Test fixture/cassette directories
|
|
179
|
+
- Module and class names in code
|
|
180
|
+
- Import/require statements throughout codebase
|
|
181
|
+
- Documentation references in markdown files
|
|
182
|
+
- Configuration file references
|
|
183
|
+
|
|
184
|
+
5. **Test Case Planning:** *(For code implementation tasks only)*
|
|
185
|
+
|
|
186
|
+
**Note:** This step applies when the task involves code implementation (new features, APIs, business logic, etc.). Skip for documentation, workflow, or configuration-only tasks.
|
|
187
|
+
|
|
188
|
+
**Analyze Testing Requirements:**
|
|
189
|
+
- Review behavioral specification for testable components
|
|
190
|
+
- Identify input validation rules, business logic flows, output expectations
|
|
191
|
+
- Determine error scenarios and integration points
|
|
192
|
+
- Consider performance and security requirements
|
|
193
|
+
|
|
194
|
+
**Scenario Identification:**
|
|
195
|
+
|
|
196
|
+
**Happy Path Scenarios:**
|
|
197
|
+
- Standard expected usage patterns
|
|
198
|
+
- Primary user workflows and interactions
|
|
199
|
+
|
|
200
|
+
**Edge Case Scenarios:**
|
|
201
|
+
- Boundary values (minimum/maximum limits)
|
|
202
|
+
- Empty, null, or missing inputs
|
|
203
|
+
- Special characters and unusual data formats
|
|
204
|
+
|
|
205
|
+
**Error Condition Scenarios:**
|
|
206
|
+
- Invalid input validation failures
|
|
207
|
+
- Missing required data or parameters
|
|
208
|
+
- External service failures or unavailability
|
|
209
|
+
|
|
210
|
+
**Test Prioritization:**
|
|
211
|
+
- **High Priority:** Core business logic, security-critical features, user-facing functionality
|
|
212
|
+
- **Medium Priority:** Secondary features, admin functions, performance optimizations
|
|
213
|
+
- **Low Priority:** Nice-to-have features, rare edge cases, internal utilities
|
|
214
|
+
|
|
215
|
+
6. **Implementation Steps Planning:**
|
|
216
|
+
|
|
217
|
+
**Detailed Step Breakdown:**
|
|
218
|
+
- Create specific, actionable implementation steps
|
|
219
|
+
- Order steps logically with dependencies
|
|
220
|
+
- Include validation and testing at each step
|
|
221
|
+
- Integrate test implementation alongside code implementation
|
|
222
|
+
|
|
223
|
+
**Embedded Test Planning:**
|
|
224
|
+
- Design test blocks for critical operations using planned test scenarios
|
|
225
|
+
- Plan verification commands for each step based on test case analysis
|
|
226
|
+
- Include test execution validation at key implementation points
|
|
227
|
+
- Include rollback verification where needed
|
|
228
|
+
|
|
229
|
+
7. **Risk Assessment:**
|
|
230
|
+
|
|
231
|
+
**Primary Risk:** Description of the most significant risk
|
|
232
|
+
- **Mitigation:** Strategy to reduce or avoid the risk
|
|
233
|
+
- **Rollback:** Steps to undo if the risk materializes
|
|
234
|
+
|
|
235
|
+
Include additional risks only if they are significant and distinct from the primary risk.
|
|
236
|
+
|
|
237
|
+
8. **Implementation Plan Assembly:**
|
|
238
|
+
|
|
239
|
+
Assemble the complete plan output covering:
|
|
240
|
+
- Technical approach and architecture decisions
|
|
241
|
+
- File modification plan
|
|
242
|
+
- Implementation steps with embedded tests
|
|
243
|
+
- Risk assessment with mitigation
|
|
244
|
+
- Test strategy (for code tasks)
|
|
245
|
+
|
|
246
|
+
Output the assembled plan following the REPORT section format below.
|
|
247
|
+
|
|
248
|
+
**Plan Output Schema (Anchored Checklist)**
|
|
249
|
+
- Each step has a stable ID (for example: `STEP-01`)
|
|
250
|
+
- Each step includes at least one `path:line` anchor back to the behavioral spec
|
|
251
|
+
- Each step includes explicit dependencies (`depends_on: []` when none)
|
|
252
|
+
- Each step includes one or more verification commands
|
|
253
|
+
- Include a freshness summary that lists tracked input files and stale/fresh determination
|
|
254
|
+
|
|
255
|
+
**UX/Usage Documentation Note**
|
|
256
|
+
For user-facing features (commands, CLI tools, APIs, workflows), draft usage documentation (`ux/usage.md`) with key scenarios is created during the draft step. The full usage documentation is completed during implementation (work-on-task step) using `wfi://docs/update-usage`.
|
|
257
|
+
|
|
258
|
+
## Implementation Planning Templates
|
|
259
|
+
|
|
260
|
+
The following templates may be used when structuring planning output:
|
|
261
|
+
|
|
262
|
+
### Technical Approach Template
|
|
263
|
+
|
|
264
|
+
```markdown
|
|
265
|
+
## Technical Approach
|
|
266
|
+
|
|
267
|
+
### Architecture Pattern
|
|
268
|
+
- [ ] Pattern selection and rationale
|
|
269
|
+
- [ ] Integration with existing architecture
|
|
270
|
+
- [ ] Impact on system design
|
|
271
|
+
|
|
272
|
+
### Technology Stack
|
|
273
|
+
- [ ] Libraries/frameworks needed
|
|
274
|
+
- [ ] Version compatibility checks
|
|
275
|
+
- [ ] Performance implications
|
|
276
|
+
- [ ] Security considerations
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
### File Modification Template
|
|
280
|
+
|
|
281
|
+
```markdown
|
|
282
|
+
## File Modifications
|
|
283
|
+
|
|
284
|
+
### Create
|
|
285
|
+
- path/to/new/file.ext
|
|
286
|
+
- Purpose: [why this file]
|
|
287
|
+
- Key components: [what it contains]
|
|
288
|
+
- Dependencies: [what it depends on]
|
|
289
|
+
|
|
290
|
+
### Modify
|
|
291
|
+
- path/to/existing/file.ext
|
|
292
|
+
- Changes: [what to modify]
|
|
293
|
+
- Impact: [effects on system]
|
|
294
|
+
- Integration points: [how it connects]
|
|
295
|
+
|
|
296
|
+
### Delete
|
|
297
|
+
- path/to/obsolete/file.ext
|
|
298
|
+
- Reason: [why removing]
|
|
299
|
+
- Dependencies: [what depends on this]
|
|
300
|
+
- Migration strategy: [how to handle removal]
|
|
301
|
+
|
|
302
|
+
### Rename (for comprehensive migrations)
|
|
303
|
+
- old/path/name.ext → new/path/name.ext
|
|
304
|
+
- Type: [file/directory/both]
|
|
305
|
+
- Related renames:
|
|
306
|
+
- Library directories: `lib/old_name/` → `lib/new_name/`
|
|
307
|
+
- Test files: `*old_name*.rb` → `*new_name*.rb`
|
|
308
|
+
- Module/class names: `OldName` → `NewName`
|
|
309
|
+
- Import updates: [number of files with require/import statements]
|
|
310
|
+
- Documentation updates: [number of markdown files with references]
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## Content Transformation Guidelines
|
|
314
|
+
|
|
315
|
+
When planning from a behavioral spec:
|
|
316
|
+
|
|
317
|
+
**Input (WHAT concerns from behavioral spec):**
|
|
318
|
+
- User experience requirements
|
|
319
|
+
- Interface contracts
|
|
320
|
+
- Success criteria
|
|
321
|
+
- Validation questions and answers
|
|
322
|
+
|
|
323
|
+
**Output (HOW concerns for implementation):**
|
|
324
|
+
- Technical approach analysis
|
|
325
|
+
- Implementation strategy with steps
|
|
326
|
+
- Tool and library selection
|
|
327
|
+
- File modification planning
|
|
328
|
+
- Risk assessment and mitigation
|
|
329
|
+
- Test strategy
|
|
330
|
+
|
|
331
|
+
## Output / Success Criteria
|
|
332
|
+
|
|
333
|
+
- Complete plan is returned as inline response following the REPORT format
|
|
334
|
+
- NO task file modifications
|
|
335
|
+
- NO status changes
|
|
336
|
+
- Complete technical implementation plan with specific steps
|
|
337
|
+
- All tools and libraries selected with rationale
|
|
338
|
+
- File modification plan with detailed impact analysis
|
|
339
|
+
- Risk assessment with mitigation strategies
|
|
340
|
+
- Embedded tests for critical operations
|
|
341
|
+
- Clear integration with existing architecture
|
|
342
|
+
- Anchored checklist format includes step IDs, `path:line` anchors, dependencies, and verification commands
|
|
343
|
+
- Freshness metadata includes task file + loaded context files
|
|
344
|
+
|
|
345
|
+
## Common Patterns
|
|
346
|
+
|
|
347
|
+
### New Feature Implementation
|
|
348
|
+
- Start with architecture integration analysis
|
|
349
|
+
- Focus on data flow and state management
|
|
350
|
+
- Plan comprehensive testing strategy
|
|
351
|
+
- Consider performance implications early
|
|
352
|
+
|
|
353
|
+
### Refactoring Implementation
|
|
354
|
+
- Document current state thoroughly
|
|
355
|
+
- Plan incremental transformation steps
|
|
356
|
+
- Emphasize backward compatibility
|
|
357
|
+
- Create extensive rollback procedures
|
|
358
|
+
|
|
359
|
+
### Integration Implementation
|
|
360
|
+
- Focus on interface compatibility
|
|
361
|
+
- Plan configuration management
|
|
362
|
+
- Emphasize error handling and recovery
|
|
363
|
+
- Document external dependencies
|
|
364
|
+
|
|
365
|
+
## Usage Example
|
|
366
|
+
|
|
367
|
+
**Input:** Pending task with validated behavioral specification
|
|
368
|
+
> "Plan implementation for task .ace-tasks/v.0.9.0/tasks/task-dir/task.s.md (status: pending)"
|
|
369
|
+
|
|
370
|
+
**Process:** Technical research, tool selection, implementation planning
|
|
371
|
+
|
|
372
|
+
**Output:** Complete implementation plan as inline response (no file writes)
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
This workflow creates JIT implementation plans that guide the work-on-task step, returning complete inline plans without modifying task specifications or changing task status.
|
|
377
|
+
|
|
378
|
+
## REPORT
|
|
379
|
+
|
|
380
|
+
Your response IS the plan artifact. Output it directly — do not write files or use tools.
|
|
381
|
+
|
|
382
|
+
This plan will be passed to a separate execution agent that has NO access to:
|
|
383
|
+
- This system prompt
|
|
384
|
+
- The project context
|
|
385
|
+
- The task specification (unless you include relevant parts)
|
|
386
|
+
|
|
387
|
+
Therefore the plan MUST be **complete and self-contained**:
|
|
388
|
+
|
|
389
|
+
### Required sections
|
|
390
|
+
|
|
391
|
+
Use these exact markdown headings in this order:
|
|
392
|
+
|
|
393
|
+
1. **`## Task Summary`** — what is being implemented and why (brief, from the spec)
|
|
394
|
+
2. **`## Execution Context`** — minimum project context the work agent needs:
|
|
395
|
+
- Key conventions and patterns relevant to THIS task
|
|
396
|
+
- Relevant architectural constraints
|
|
397
|
+
- Package/gem boundaries crossed
|
|
398
|
+
- Non-obvious project rules affecting this work
|
|
399
|
+
3. **`## Technical Approach`** — fill out the Technical Approach template (architecture, stack, strategy)
|
|
400
|
+
4. **`## File Modifications`** — fill out the File Modification template (Create/Modify/Delete with paths, purpose, impact)
|
|
401
|
+
5. **`## Plan Checklist`** — anchored checklist (STEP-01, STEP-02...) with:
|
|
402
|
+
- `path:line` anchors to relevant source files
|
|
403
|
+
- Explicit dependencies (`depends_on: []`)
|
|
404
|
+
- Verification commands per step
|
|
405
|
+
6. **`## Test Plan`** — test scenarios and files (for code tasks; skip for docs/workflow tasks)
|
|
406
|
+
7. **`## Risk Assessment`** — primary risk, mitigation, rollback
|
|
407
|
+
8. **`## Freshness Summary`** — tracked input files and their state
|
|
408
|
+
|
|
409
|
+
If needed, add **`## Behavioral Gaps`** only after `## Freshness Summary`.
|
|
410
|
+
|
|
411
|
+
### Format rules
|
|
412
|
+
|
|
413
|
+
- Use the embedded templates from `<documents>` section to structure each part
|
|
414
|
+
- Every implementation step must be actionable without additional context
|
|
415
|
+
- Include exact file paths, method names, and line references where applicable
|
|
416
|
+
- Do not summarize or abbreviate — the execution agent needs full detail
|
|
417
|
+
- Never ask for permissions/approvals or output escalation requests
|
|
418
|
+
- Never return status-only text such as "plan delivered" without the required sections
|
|
419
|
+
|
|
420
|
+
<documents>
|
|
421
|
+
<template path="tmpl://task/technical-approach">## Technical Approach
|
|
422
|
+
|
|
423
|
+
### Architecture Pattern
|
|
424
|
+
- [ ] Pattern selection and rationale
|
|
425
|
+
- [ ] Integration with existing architecture
|
|
426
|
+
- [ ] Impact on system design
|
|
427
|
+
|
|
428
|
+
### Technology Stack
|
|
429
|
+
- [ ] Libraries/frameworks needed
|
|
430
|
+
- [ ] Version compatibility checks
|
|
431
|
+
- [ ] Performance implications
|
|
432
|
+
- [ ] Security considerations
|
|
433
|
+
|
|
434
|
+
### Implementation Strategy
|
|
435
|
+
- [ ] Step-by-step approach
|
|
436
|
+
- [ ] Rollback considerations
|
|
437
|
+
- [ ] Testing strategy
|
|
438
|
+
- [ ] Performance monitoring
|
|
439
|
+
</template>
|
|
440
|
+
|
|
441
|
+
<template path="tmpl://task/file-modification-checklist">## File Modifications
|
|
442
|
+
|
|
443
|
+
### Create
|
|
444
|
+
- path/to/new/file.ext
|
|
445
|
+
- Purpose: [why this file]
|
|
446
|
+
- Key components: [what it contains]
|
|
447
|
+
- Dependencies: [what it depends on]
|
|
448
|
+
|
|
449
|
+
### Modify
|
|
450
|
+
- path/to/existing/file.ext
|
|
451
|
+
- Changes: [what to modify]
|
|
452
|
+
- Impact: [effects on system]
|
|
453
|
+
- Integration points: [how it connects]
|
|
454
|
+
|
|
455
|
+
### Delete
|
|
456
|
+
- path/to/obsolete/file.ext
|
|
457
|
+
- Reason: [why removing]
|
|
458
|
+
- Dependencies: [what depends on this]
|
|
459
|
+
- Migration strategy: [how to handle removal]
|
|
460
|
+
|
|
461
|
+
### Rename (for comprehensive migrations)
|
|
462
|
+
- old/path/name.ext → new/path/name.ext
|
|
463
|
+
- Type: [file/directory/both]
|
|
464
|
+
- Related renames:
|
|
465
|
+
- Library directories: `lib/old_name/` → `lib/new_name/`
|
|
466
|
+
- Test files: `*old_name*.rb` → `*new_name*.rb`
|
|
467
|
+
- Module/class names: `OldName` → `NewName`
|
|
468
|
+
- Import updates: [number of files with require/import statements]
|
|
469
|
+
- Documentation updates: [number of markdown files with references]
|
|
470
|
+
</template>
|
|
471
|
+
|
|
472
|
+
<template path="tmpl://task/plan-anchored-checklist">## Plan Checklist
|
|
473
|
+
|
|
474
|
+
### STEP-01
|
|
475
|
+
- **Anchor**: path/to/task.s.md:42
|
|
476
|
+
- **Depends On**: []
|
|
477
|
+
- **Action**: [what to implement]
|
|
478
|
+
- **Verification**:
|
|
479
|
+
- `ace-lint path/to/file`
|
|
480
|
+
|
|
481
|
+
### STEP-02
|
|
482
|
+
- **Anchor**: path/to/task.s.md:58
|
|
483
|
+
- **Depends On**: [STEP-01]
|
|
484
|
+
- **Action**: [next implementation action]
|
|
485
|
+
- **Verification**:
|
|
486
|
+
- `ace-test path/to/test_file.rb`
|
|
487
|
+
</template>
|
|
488
|
+
|
|
489
|
+
</documents>
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
doc-type: workflow
|
|
3
|
+
purpose: Review implementation plans before execution
|
|
4
|
+
ace-docs:
|
|
5
|
+
last-updated: '2026-03-21'
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Review Plan Workflow Instruction
|
|
9
|
+
|
|
10
|
+
## Goal
|
|
11
|
+
|
|
12
|
+
Critically evaluate an implementation plan for completeness, specificity, and autonomous executability. This workflow acts as the adversarial quality gate between planning and execution. A plan that passes this review should be executable by an agent without asking a single clarifying question.
|
|
13
|
+
|
|
14
|
+
## When to Use
|
|
15
|
+
|
|
16
|
+
- As Phase 2 (self-critique) in a plan generation step
|
|
17
|
+
- After any implementation plan is produced, before handing off to execution
|
|
18
|
+
- When reviewing plan quality in ace-assign pipeline steps
|
|
19
|
+
|
|
20
|
+
## Evaluation Dimensions
|
|
21
|
+
|
|
22
|
+
Evaluate the plan against these six dimensions. Score each as **PASS**, **WEAK**, or **FAIL**.
|
|
23
|
+
|
|
24
|
+
### 1. Decision Completeness
|
|
25
|
+
|
|
26
|
+
Every decision point must be resolved. No "TBD", "consider X or Y", "to be determined", or "depends on" left unresolved.
|
|
27
|
+
|
|
28
|
+
**PASS:** All decisions made with clear rationale.
|
|
29
|
+
**WEAK:** Minor open questions that won't block execution.
|
|
30
|
+
**FAIL:** Unresolved choices that would force the executor to guess.
|
|
31
|
+
|
|
32
|
+
**Check for:**
|
|
33
|
+
- Ambiguous phrasing: "could use X or Y", "might need", "possibly"
|
|
34
|
+
- Deferred decisions: "TBD", "decide later", "to be determined"
|
|
35
|
+
- Missing rationale for key choices
|
|
36
|
+
|
|
37
|
+
### 2. Behavioral Spec Coverage
|
|
38
|
+
|
|
39
|
+
Every section of the behavioral specification must map to at least one plan element. No spec requirement silently dropped.
|
|
40
|
+
|
|
41
|
+
**PASS:** Every spec section (Success Criteria, Interface Contract, Edge Cases, Error Handling) has corresponding plan items.
|
|
42
|
+
**WEAK:** Minor spec details not explicitly addressed but inferable.
|
|
43
|
+
**FAIL:** Entire spec sections with no corresponding plan items.
|
|
44
|
+
|
|
45
|
+
**Check for:**
|
|
46
|
+
- Success criteria without implementation steps
|
|
47
|
+
- Interface contract details missing from file modification plan
|
|
48
|
+
- Error handling requirements with no planned implementation
|
|
49
|
+
- Edge cases mentioned in spec but absent from test planning
|
|
50
|
+
|
|
51
|
+
### 3. File Modification Exhaustiveness
|
|
52
|
+
|
|
53
|
+
Every file to be created, modified, or deleted must be listed. Cross-package impacts identified.
|
|
54
|
+
|
|
55
|
+
**PASS:** Complete file manifest with specific changes per file, cross-package references audited.
|
|
56
|
+
**WEAK:** Core files listed but minor ancillary files missing (docs, configs).
|
|
57
|
+
**FAIL:** Vague references like "update related files" or missing entire categories of changes.
|
|
58
|
+
|
|
59
|
+
**Check for:**
|
|
60
|
+
- "Update related files" or "modify as needed" without specifics
|
|
61
|
+
- Missing test files for new implementations
|
|
62
|
+
- Cross-package consumers of changed interfaces not listed
|
|
63
|
+
- Renamed/moved files without import/require update plan
|
|
64
|
+
|
|
65
|
+
### 4. Test Strategy Adequacy
|
|
66
|
+
|
|
67
|
+
Test scenarios must be named and specific, not generic placeholders.
|
|
68
|
+
|
|
69
|
+
**PASS:** Named test scenarios with concrete inputs, expected outputs, and edge cases.
|
|
70
|
+
**WEAK:** Test categories identified but individual scenarios lack specificity.
|
|
71
|
+
**FAIL:** Generic statements like "write tests for X" or "add appropriate tests".
|
|
72
|
+
|
|
73
|
+
**Check for:**
|
|
74
|
+
- "Add tests" without specifying what scenarios
|
|
75
|
+
- Missing edge case scenarios for boundary conditions
|
|
76
|
+
- No error/failure path test scenarios
|
|
77
|
+
- Test file locations not specified
|
|
78
|
+
|
|
79
|
+
### 5. Risk Assessment Honesty
|
|
80
|
+
|
|
81
|
+
Risks must be specific to this plan, not generic software warnings.
|
|
82
|
+
|
|
83
|
+
**PASS:** Risks tied to specific plan decisions with concrete mitigation steps.
|
|
84
|
+
**WEAK:** Risks identified but mitigations are vague.
|
|
85
|
+
**FAIL:** Generic risks ("performance could be affected") or no risks identified for a non-trivial plan.
|
|
86
|
+
|
|
87
|
+
**Check for:**
|
|
88
|
+
- Boilerplate risks copied from templates
|
|
89
|
+
- Mitigations that just restate the risk ("mitigate by being careful")
|
|
90
|
+
- Missing risks for cross-package changes, data migrations, or API changes
|
|
91
|
+
|
|
92
|
+
### 6. Autonomous Executability
|
|
93
|
+
|
|
94
|
+
Could an agent execute this plan without asking a single clarifying question?
|
|
95
|
+
|
|
96
|
+
**PASS:** Every step is unambiguous with clear inputs, actions, and verification criteria.
|
|
97
|
+
**WEAK:** Most steps clear but 1-2 require minor interpretation.
|
|
98
|
+
**FAIL:** Multiple steps require judgment calls or clarification to proceed.
|
|
99
|
+
|
|
100
|
+
**Check for:**
|
|
101
|
+
- Steps that assume knowledge not present in the plan
|
|
102
|
+
- Missing ordering or dependency information between steps
|
|
103
|
+
- Verification criteria that require subjective judgment
|
|
104
|
+
- References to external resources not included in the plan
|
|
105
|
+
|
|
106
|
+
## Output Format
|
|
107
|
+
|
|
108
|
+
Produce the critique in this structure:
|
|
109
|
+
|
|
110
|
+
```markdown
|
|
111
|
+
## Plan Critique
|
|
112
|
+
|
|
113
|
+
**Verdict:** READY | NEEDS WORK | INSUFFICIENT
|
|
114
|
+
|
|
115
|
+
### Dimension Scores
|
|
116
|
+
|
|
117
|
+
| Dimension | Score | Notes |
|
|
118
|
+
|-----------|-------|-------|
|
|
119
|
+
| Decision Completeness | PASS/WEAK/FAIL | One-line finding |
|
|
120
|
+
| Behavioral Spec Coverage | PASS/WEAK/FAIL | One-line finding |
|
|
121
|
+
| File Modification Exhaustiveness | PASS/WEAK/FAIL | One-line finding |
|
|
122
|
+
| Test Strategy Adequacy | PASS/WEAK/FAIL | One-line finding |
|
|
123
|
+
| Risk Assessment Honesty | PASS/WEAK/FAIL | One-line finding |
|
|
124
|
+
| Autonomous Executability | PASS/WEAK/FAIL | One-line finding |
|
|
125
|
+
|
|
126
|
+
### Critical Findings
|
|
127
|
+
- [List specific issues that MUST be fixed before execution]
|
|
128
|
+
|
|
129
|
+
### Strengths
|
|
130
|
+
- [List what the plan does well]
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Verdict Criteria
|
|
134
|
+
|
|
135
|
+
- **READY:** No FAIL scores, at most one WEAK score
|
|
136
|
+
- **NEEDS WORK:** No more than two FAIL scores, or three+ WEAK scores
|
|
137
|
+
- **INSUFFICIENT:** Three or more FAIL scores
|
|
138
|
+
|
|
139
|
+
## Review Principles
|
|
140
|
+
|
|
141
|
+
- Be adversarial. Your job is to find what's missing, not to praise what's present.
|
|
142
|
+
- Cite specific plan sections when noting issues.
|
|
143
|
+
- A vague plan produces vague execution. Demand specificity.
|
|
144
|
+
- "Good enough" plans produce mediocre implementations. Push for completeness.
|