Skip to content

Commit 5f08de5

Browse files
committed
Refactor TaskPromptBuilder and related documentation to align with new directory structure. Key updates include:
- Updated resource strategy to reflect changes in task storage paths, emphasizing the use of `workspace/` for project-specific artifacts. - Revised output packaging instructions to ensure task prompt files are created directly in the new structure. - Clarified validation and communication expectations for task outputs. These changes enhance clarity and usability for developers implementing task prompts within the updated DevAgent framework.
1 parent ba25460 commit 5f08de5

6 files changed

Lines changed: 292 additions & 59 deletions

File tree

.devagent/agents/TaskPromptBuilder.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
- Request missing info by sending a short checklist covering source, base branch, constraints, and research availability; pause until the source reference, base branch, and repo entry points are confirmed.
1212

1313
## Resource Strategy
14-
- `.devagent/features/<feature_slug>/tasks/` — canonical storage; create a dated file per active task using the template. `feature_slug` matches the feature hub, while `task_slug` maps to the spec or external issue id.
15-
- `.devagent/templates/task-prompt-template.md` — reusable structure for metadata, narrative context, implementation plan, acceptance criteria, and task pack (create/update if the structure evolves).
16-
- `.devagent/features/<feature_slug>/spec/` & `.devagent/features/<feature_slug>/research/` — cite relevant sections when producing prompts.
14+
- `.devagent/workspace/features/<feature_slug>/tasks/` — canonical storage; **create a dated file per active task** using the template (e.g., `2025-10-01_task-1-slug.md`). `feature_slug` matches the feature hub, while `task_slug` maps to the spec or external issue id.
15+
- `.devagent/core/templates/task-prompt-template.md` — reusable structure for metadata, narrative context, implementation plan, acceptance criteria, and task pack (create/update if the structure evolves).
16+
- `.devagent/workspace/features/<feature_slug>/spec/` & `.devagent/workspace/features/<feature_slug>/research/` — cite relevant sections when producing prompts.
1717
- #ResearchAgent — pull in missing evidence or clarify ambiguous requirements before finalizing prompts.
1818
- #TaskPlanner — sanity-check grouping or sequencing when scope spans multiple milestones.
1919
- Escalate to requester if source materials conflict or research is missing for high-risk tasks.
@@ -37,7 +37,7 @@
3737
- `file_hints` list of repo paths likely to be touched during execution
3838
- `context_refs` list of source docs, research files, and code paths for deeper reading
3939
7. **Validation:** Self-check coverage against source objectives, ensure metadata fields are complete, confirm every section has citations or file hints, and verify formatting against the updated template.
40-
8. **Output packaging & handoff:** Save to `.devagent/features/<feature_slug>/tasks/YYYY-MM-DD_<task_slug>.md`. Append the status log with a timestamped entry, then notify downstream agents (#TaskPlanner/#Executor) and log unresolved items in `.devagent/product/guiding-questions.md` if needed.
40+
8. **Output packaging & handoff:** **Write the complete task prompt file** to `.devagent/workspace/features/<feature_slug>/tasks/YYYY-MM-DD_<task_slug>.md` using the template structure. Append the status log with a timestamped entry, then notify downstream agents (#TaskPlanner/#Executor) and log unresolved items in `.devagent/workspace/product/guiding-questions.md` if needed.
4141

4242
## Adaptation Notes
4343
- For small fixes, compress steps 4-6 into a single task with embedded checklist but still include base branch confirmation, file hints, and an execution prompt.
@@ -50,8 +50,9 @@
5050
- No authoritative research for high-risk work — create blocker note and loop in #ResearchAgent.
5151

5252
## Expected Output
53-
- Artifact: Updated `.devagent/features/<feature_slug>/tasks/YYYY-MM-DD_<task_slug>.md` containing the filled template (metadata, narrative context, implementation plan, acceptance criteria, task pack, status log, research links).
54-
- Communication: Brief summary in team channel or hand-off note listing task ids, blockers, dependencies, and base branch sync info.
53+
- **Artifact:** Complete task prompt file written to `.devagent/workspace/features/<feature_slug>/tasks/YYYY-MM-DD_<task_slug>.md` containing the filled template (metadata, narrative context, implementation plan, acceptance criteria, task pack, status log, research links).
54+
- **Communication:** Brief summary in team channel or hand-off note listing task ids, blockers, dependencies, and base branch sync info.
55+
- **Action:** The agent should create/write the file directly, not just describe what should be in it.
5556

5657
## Follow-up Hooks
5758
- Downstream agents: #Executor consumes prompts; #TaskPlanner monitors sequencing and status log; #ResearchAgent handles flagged gaps.

.devagent/features/2025-10-01_core-workspace-split/spec/2025-10-01_core-workspace-split-spec.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -246,21 +246,17 @@ All agent instruction sheets must be updated to use new path conventions:
246246
- Create `core/README.md` with setup guide
247247
- Update root README
248248

249-
**Phase 4: Validation**
250-
- Test agent invocations end-to-end
251-
- Verify all workflows function correctly
252-
253249
### Review Gates
254250

255251
- **Pre-implementation:** Design review with @jaruesink (this spec)
256-
- **Post-implementation:** All agent workflows tested successfully
252+
- **Post-implementation:** All tasks complete, documentation in place
257253

258254
### Analytics & QA Requirements
259255

260256
**Validation Signals:**
261-
- All agents execute successfully in new structure
262257
- Path references correctly use `core/` and `workspace/` conventions
263258
- Documentation complete and accurate
259+
- Manual spot-checks confirm agent workflows function correctly
264260

265261
## Approval & Ops Readiness
266262

.devagent/features/2025-10-01_core-workspace-split/tasks/2025-10-01_implementation-plan.md

Lines changed: 11 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
## Summary
1111

12-
Restructure `.devagent/` directory into `core/` (portable agent kit) and `workspace/` (project-specific artifacts) to enable easy DevAgent setup across new projects. The plan executes in 4 phases: (1) directory structure creation and file moves, (2) agent path reference updates across 12 agent files with 79+ path references, (3) documentation updates, (4) validation testing. Clean cut approach - no backwards compatibility needed.
12+
Restructure `.devagent/` directory into `core/` (portable agent kit) and `workspace/` (project-specific artifacts) to enable easy DevAgent setup across new projects. The plan executes in 3 phases: (1) directory structure creation and file moves, (2) agent path reference updates across 12 agent files with 79+ path references, (3) documentation updates. Clean cut approach - no backwards compatibility needed.
1313

1414
## Scope & Assumptions
1515

@@ -109,9 +109,9 @@ Restructure `.devagent/` directory into `core/` (portable agent kit) and `worksp
109109
- Acceptance: Template paths use `core/`, feature paths use `workspace/`
110110
- **Validation plan:** Run `grep -r "\.devagent/\(agents\|templates\|features\|memory\|product\|research\)" .devagent/core/agents/` to verify no old path patterns remain
111111

112-
### Task 3: Update Core Documentation & Create Migration Guide
112+
### Task 3: Update Core Documentation
113113

114-
- **Objective:** Update AGENTS.md with new paths, create core/README.md with setup instructions, and provide migration guide for external adopters
114+
- **Objective:** Update AGENTS.md with new paths, create core/README.md with setup instructions
115115
- **Dependencies:** Tasks 1-2 complete (structure and agent paths updated)
116116
- **Subtasks:**
117117
1. `Update AGENTS.md agent references` — Change all agent paths from `.devagent/agents/...` to `.devagent/core/agents/...`
@@ -132,50 +132,16 @@ Restructure `.devagent/` directory into `core/` (portable agent kit) and `worksp
132132
- Entry points: All files in `.devagent/core/templates/` that reference their own location
133133
- Example: task-plan-template.md line 8 references file location pattern
134134
- Acceptance: Templates reference `workspace/` for output locations, `core/` for template source
135-
- **Validation plan:** Review all documentation for path accuracy, test setup instructions via dry-run with fresh checkout
136-
137-
### Task 4: Validation Testing & Edge Case Handling
138-
139-
- **Objective:** Validate new structure against real agent workflows and identify/fix edge cases
140-
- **Dependencies:** Tasks 1-3 complete (structure, paths, and docs updated)
141-
- **Subtasks:**
142-
1. `Test ProductMissionPartner workflow` — Invoke agent, verify it reads/writes to `workspace/product/`
143-
- Validation: Agent successfully accesses mission.md, roadmap.md from workspace/product/
144-
- Acceptance: No path errors, outputs written to correct workspace/ locations
145-
2. `Test ResearchAgent workflow` — Invoke agent in general mode, verify template access and output location
146-
- Validation: Agent reads from `core/templates/research-packet-template.md`, writes to `workspace/research/`
147-
- Acceptance: Template loaded correctly, output in workspace/research/ with correct timestamp
148-
3. `Test SpecArchitect workflow` — Invoke agent for spec creation, verify full template → workspace flow
149-
- Validation: Reads template from `core/templates/spec-document-template.md`, writes to `workspace/features/.../spec/`
150-
- Acceptance: Spec created in correct feature hub location under workspace/
151-
4. `Test TaskPlanner workflow` — Self-validate by checking this task plan's references
152-
- Validation: Verify this task plan correctly references core/ templates and workspace/ features
153-
- Acceptance: All paths in this document follow new conventions
154-
5. `Test TaskExecutor workflow` — Invoke agent with task from workspace, verify code access
155-
- Validation: Agent reads tasks from `workspace/features/.../tasks/`, executes against codebase
156-
- Acceptance: No path resolution errors
157-
6. `Test CodegenBackgroundAgent workflow` — Verify API integration and path handling
158-
- Validation: Agent accesses templates from core/, generates prompts correctly
159-
- Acceptance: Background agent deployment succeeds with new paths
160-
7. `Audit for hardcoded path assumptions` — Search codebase for any missed `.devagent/agents` or `.devagent/templates` references
161-
- Command: `grep -r "\.devagent/agents\|\.devagent/templates" . --exclude-dir=.git`
162-
- Acceptance: Only references in this task plan (documenting old paths) or migration guide
163-
8. `Test edge case: nested feature hub references` — Verify agent-to-agent handoffs work with new paths
164-
- Example: #ResearchAgent → #SpecArchitect → #TaskPlanner chain
165-
- Acceptance: Each agent correctly reads predecessor's outputs from workspace/
166-
9. `Validate template rendering` — Ensure template placeholders updated for workspace/ outputs
167-
- Check: All templates with file location placeholders reference workspace/ paths
168-
- Acceptance: No templates instruct users to write to `.devagent/templates/` or `.devagent/agents/`
169-
- **Validation plan:** Document test results in feature hub, create checklist of passed/failed workflows, escalate blockers to @jaruesink
135+
- **Validation plan:** Review all documentation for path accuracy, verify with manual spot-checks
170136

171137

172138
## Risk Register
173139

174140
| Risk | Impact | Mitigation | Owner |
175141
| --- | --- | --- | --- |
176-
| Agent path updates incomplete (79+ references) | High - broken workflows | Automated grep validation in Task 2, comprehensive testing in Task 4 | @jaruesink |
142+
| Agent path updates incomplete (79+ references) | High - broken workflows | Automated grep validation in Task 2, manual spot-checking | @jaruesink |
177143
| Template self-references missed | Low - user confusion | Comprehensive template audit in Task 3.5 | @jaruesink |
178-
| Agent-to-agent handoffs fail with new paths | Medium - workflow breakage | Chain testing in Task 4.8 | @jaruesink |
144+
| Agent-to-agent handoffs fail with new paths | Medium - workflow breakage | Manual verification when using agents post-merge | @jaruesink |
179145

180146
## Dependencies
181147

@@ -196,7 +162,6 @@ Restructure `.devagent/` directory into `core/` (portable agent kit) and `worksp
196162
- [ ] Feature hub template moved to `core/templates/feature-hub-template/`
197163
- [ ] All workspace artifacts moved to `workspace/` subdirectories
198164
- [ ] Zero old path patterns detected in `grep` audit
199-
- [ ] All 6+ agent workflows tested successfully
200165
- [ ] Documentation complete (`core/README.md`, updated `AGENTS.md`, root README)
201166
- [ ] Structure validated and ready for use
202167

@@ -205,20 +170,19 @@ Restructure `.devagent/` directory into `core/` (portable agent kit) and `worksp
205170
| Question | Impact | Owner | Target Resolution |
206171
| --- | --- | --- | --- |
207172
| Should root AGENTS.md remain or move entirely to core/? | Low - documentation organization | @jaruesink | Task 3.3 |
208-
| Do any agents have implicit path assumptions in logic? | Medium - hidden breakage | #TaskExecutor during Task 4 | Task 4 completion |
173+
| Do any agents have implicit path assumptions in logic? | Medium - hidden breakage | Manual testing post-merge | Post-implementation |
209174
| Should we create workspace/.gitkeep files for empty dirs? | Low - git tracking | @jaruesink | Task 1 |
210175

211176
## Implementation Notes
212177

213-
- **Sequencing rationale:** Tasks 1-2 are tightly coupled (move then update references), Task 3 adds documentation, Task 4 validates everything
214-
- **Rollback trigger:** If Task 4 reveals >3 broken workflows, pause and escalate to @jaruesink
215-
- **Incremental commits:** Commit after each major task (1, 2, 3, 4) to enable granular rollback if needed
216-
- **Testing coverage:** 6 agent workflows (ProductMissionPartner, ResearchAgent, SpecArchitect, TaskPlanner, TaskExecutor, CodegenBackgroundAgent) provide representative coverage of path usage patterns
178+
- **Sequencing rationale:** Tasks 1-2 are tightly coupled (move then update references), Task 3 adds documentation
179+
- **Validation approach:** Manual spot-checking of agent workflows post-implementation to verify paths work correctly
180+
- **Incremental commits:** Commit after each major task (1, 2, 3) to enable granular rollback if needed
217181

218182
## Next Steps
219183

220184
1. Review this task plan with @jaruesink for approval
221185
2. Begin Task 1 execution with directory structure creation
222186
3. Maintain task status updates in this document during implementation
223-
4. Merge to main once all validation passes
187+
4. Merge to main once all tasks complete
224188

0 commit comments

Comments
 (0)