Skip to content

Commit 3310a52

Browse files
committed
Enhance TaskPromptBuilder and task-prompt-template documentation to improve clarity and usability. Key updates include:
- Revised resource strategy for task storage and template structure, emphasizing feature slugs and dated task files. - Expanded workflow steps to include detailed context gathering and narrative assembly. - Updated output packaging to reflect new file paths and improved validation checks. These changes streamline the task prompt creation process and clarify expectations for agent operations.
1 parent 4981192 commit 3310a52

2 files changed

Lines changed: 55 additions & 27 deletions

File tree

.devagent/agents/TaskPromptBuilder.md

Lines changed: 12 additions & 13 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/tasks/<slug>/tasks.md` — canonical storage; create the file if absent, one per active initiative. Slug = spec slug or external issue id.
15-
- `.devagent/templates/task-prompt-template.md` — reusable structure for overview, base branch notes, relevant files, task table, prompts, and logs (create/update if template evolves).
16-
- `.devagent/features/<slug>/spec/` & `.devagent/tasks/<slug>/research/` — cite relevant sections when producing prompts.
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.
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.
@@ -24,25 +24,24 @@
2424
- Retrieval etiquette: Always cite file paths or document anchors; note freshness date for research references older than 30 days.
2525

2626
## Workflow
27-
1. **Kickoff:** Confirm mode (`spec` vs `issue`), slug/id, repo, base branch (per repo), and due date; check if supporting research exists.
27+
1. **Kickoff:** Confirm mode (`spec` vs `issue`), task slug, feature slug, repo, base branch (per repo), target branch convention, and due date; check if supporting research exists.
2828
2. **Branch baseline:** Record the base branch and last known sync (e.g., `main @ 2025-09-29T12:00Z`). Flag if the branch is stale or unclear.
29-
3. **Context gathering:** Read the source document or issue, skim linked research, run targeted code search to identify entry points if needed.
30-
4. **Task framing:** Draft a mini-brief (problem, objective, definition of done) if not provided; ensure each bullet maps back to source context.
31-
5. **Prompt drafting:** For each task, capture:
29+
3. **Context gathering:** Read the source document or issue, pull relevant feature mission/roadmap context, skim linked research, and run targeted code search to identify entry points if needed.
30+
4. **Narrative assembly:** Populate `Product Context`, `Research Summary`, and `Task Scope` sections using the gathered materials; cite sources with paths and freshness notes.
31+
5. **Plan articulation:** Fill in the `Implementation Plan`, `Acceptance Criteria`, `Reference Files`, `Constraints`, and `Deliverables` sections, ensuring each line ties back to a cited context source.
32+
6. **Task pack drafting:** For each discrete execution unit, capture:
3233
- `task-id` (slug-ordinal format)
3334
- Brief description tied to source anchor
3435
- AI execution prompt (plain text, max ~120 words) referencing necessary files/research
3536
- `status` defaulting to `planned`
3637
- `file_hints` list of repo paths likely to be touched during execution
3738
- `context_refs` list of source docs, research files, and code paths for deeper reading
38-
6. **Relevant files rollup:** Merge unique `file_hints` entries plus any additional contextual paths into the `Relevant Files` section, adding short notes on why each file matters.
39-
7. **Grouping & ordering:** Sequence tasks for smooth execution; group subtasks by shared prefix (e.g., `api-1a`, `api-1b`) and add a parent roll-up row.
40-
8. **Validation:** Self-check coverage against source objectives, ensure no prompt lacks context refs, file hints, or base-branch notes, verify file formatting against the template.
41-
9. **Output packaging & handoff:** Write or update `.devagent/tasks/<slug>/tasks.md` using the template sections (`Overview`, `Branches`, `Relevant Files`, `Task Table`, `Status Log`, `Research Links`). Append change log with timestamp, then notify #TaskPlanner/#Executor and log unresolved items in `.devagent/product/guiding-questions.md` as needed.
39+
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.
4241

4342
## Adaptation Notes
4443
- 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.
45-
- When multiple repos are involved, capture base branch per repo, duplicate the task table per repo within the same file, and maintain a joint `Relevant Files` section grouped by repo.
44+
- When multiple repos are involved, capture base branch per repo, duplicate the task table per repo within the same file, and maintain a joint `Reference Files` section grouped by repo.
4645
- If research is missing, generate provisional prompts with explicit TODO references and escalate to #ResearchAgent before execution proceeds.
4746

4847
## Failure & Escalation
@@ -51,7 +50,7 @@
5150
- No authoritative research for high-risk work — create blocker note and loop in #ResearchAgent.
5251

5352
## Expected Output
54-
- Artifact: Updated `.devagent/tasks/<slug>/tasks.md` containing overview, base branch notes, relevant files, task table with prompts and file hints, status log, and research links.
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).
5554
- Communication: Brief summary in team channel or hand-off note listing task ids, blockers, dependencies, and base branch sync info.
5655

5756
## Follow-up Hooks

.devagent/templates/task-prompt-template.md

Lines changed: 43 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,62 @@
11
# Task Prompt File Template
22

3-
## Overview
3+
## Metadata
4+
- `task_slug`: <task identifier used for downstream agents>
5+
- `feature_slug`: <feature hub slug>
6+
- `date_generated`: <ISO8601 timestamp>
47
- `source_type`: spec | issue
5-
- `source_ref`: <spec path or issue id/link>
8+
- `source_refs`: [<spec path or issue id/link>, ...]
69
- `repo`: <primary repo or service>
7-
- `last_updated`: <ISO8601 timestamp>
10+
- `base_branch`: <branch name — include last fetch timestamp>
11+
- `target_branch`: <planned working branch name or prefix>
812
- `owner`: <person or agent responsible for upkeep>
9-
- `summary`: One sentence describing the initiative.
1013

11-
## Branches
12-
- `base_branch`: <e.g., main | develop — include last fetch timestamp>
13-
- `feature_branch`: <planned working branch name or prefix>
14+
## Product Context
15+
- Problem statement and customer impact.
16+
- Link to mission/roadmap items or OKRs that frame the task.
1417

15-
## Relevant Files
16-
- `src/service/foo.py` — Main entry point affected by tasks.
17-
- `docs/api.md` — Reference for request/response contract.
18+
## Research Summary
19+
- Key finding with freshness note — cite research packets or interviews.
20+
- Additional insight — highlight risks, constraints, or metrics.
1821

19-
## Task Table
22+
## Task Scope
23+
- Objective: <definition of done in one sentence>.
24+
- Out of scope: <what remains untouched>.
25+
- Dependencies: <upstream/downstream tasks or approvals>.
26+
27+
## Implementation Plan
28+
1. **Step label** — describe the work, list functions or components to touch, reference code patterns.
29+
2. **Step label** — include validation steps, instrumentation, or integration notes.
30+
3. **Step label** — outline testing, documentation, or rollout tasks.
31+
32+
## Acceptance Criteria
33+
- Testable condition tied to requirements.
34+
- Quality guardrails (tests, lint, observability, performance).
35+
- Edge cases and telemetry expectations.
36+
37+
## Reference Files
38+
- `src/service/foo.py` — Reason this file matters.
39+
- `docs/api.md` — Link to specs, schemas, or contracts.
40+
41+
## Constraints
42+
- Architectural or compliance constraints to honour.
43+
- Tooling, language, or dependency versions to maintain.
44+
45+
## Deliverables
46+
1. <File or artifact> — expected change.
47+
2. <Test or doc> — required validation or comms.
48+
49+
## Task Pack
2050
| task-id | description | ai_prompt | status | file_hints | context_refs |
2151
| --- | --- | --- | --- | --- | --- |
22-
| slug-1 | Example task tied to source section | Plain-language instructions for Executor agents (≤120 words). Include file paths or research docs to open. | planned | [`src/service/foo.py`] | [`spec.md#L42`, `research/2025-09-10_api.md`] |
52+
| slug-1 | Example task tied to source section | Plain-language instructions for executor agents (≤120 words). Include file paths or research docs to open. | planned | [`src/service/foo.py`] | [`spec.md#L42`, `research/2025-09-10_api.md`] |
2353

2454
Status values: `planned`, `in_progress`, `blocked`, `ready_for_review`, `done`.
2555

2656
## Status Log
2757
- 2025-09-29T00:00Z — Initial breakdown.
2858

2959
## Research Links
30-
- `.devagent/tasks/<slug>/research/<date>_<topic>.md`
60+
- `.devagent/features/<feature_slug>/research/<date>_<topic>.md`
3161
- Additional context files or dashboards referenced in prompts.
3262

33-
> Copy this template into `.devagent/tasks/<slug>/tasks.md` and update sections as the plan evolves.

0 commit comments

Comments
 (0)