refactor(prompts): clarify artifact format handling and response structure in routing and task descriptions

This commit is contained in:
Anish Sarkar 2026-08-17 14:27:37 +05:30
parent f181fcfa6e
commit dbfe0a3aca
4 changed files with 16 additions and 7 deletions

View file

@ -77,10 +77,12 @@ web_crawler specialist to crawl and then save the data with its
requests go to `task(deliverables, …)` with an explicit instruction to create
an editable PPTX artifact.
**Report and resume artifacts.** Report, resume, and CV requests with no
explicit output format go to `task(deliverables, …)` with an explicit
instruction to create a PDF artifact. Do not ask the user to choose a format.
Preserve an explicit override: editable Word requests → DOCX, slides or a
**Report and resume artifacts.** Report, resume, CV, and submission-document
creation requests go to `task(deliverables, …)`. Unless the user specifies
another format, instruct the specialist to create a PDF artifact. Infer
non-critical details rather than asking follow-up questions or drafting the
document inline; brief follow-ups such as "just do it" preserve this intent.
Explicit format requests still win: editable Word → DOCX, slides or a
presentation → PPTX, and a workbook or spreadsheet → XLSX.
**Video media.** Requests whose requested output is a video, animation, or

View file

@ -9,8 +9,8 @@
entry in `<specialists>`).
- `description` — the FULL task prompt. The specialist cannot see this
thread, so include all context and constraints, plus what you need
back. The specialist will respond in its own format — don't dictate
one.
back. The specialist owns its response structure; preserve and explicitly
pass all user constraints, including any required artifact format.
- Args (batch mode):
- `tasks` — array of `{description, subagent_type}` objects to fan out
concurrently. Mutually exclusive with single-mode args. Use when a

View file

@ -26,6 +26,8 @@ what was generated.
→ XLSX. Plain notes, briefs, and content intended for continued editing →
Markdown. An explicit format always overrides these defaults; otherwise,
prefer PDF for a finished deliverable.
- For PDF-default requests, complete the PDF workflow rather than substituting
a Markdown-only artifact or an inline draft.
- Available format skill: `pdf` — creates polished PDF files for PDFs, resumes,
CVs, reports-as-PDF, letters, one-pagers, and printable documents.
- Available format skill: `docx` — creates polished, editable Word documents

View file

@ -66,6 +66,7 @@ def test_presentation_routing_separates_pptx_from_video():
def test_reports_and_resumes_default_to_pdf_without_format_clarification():
"""Supervisor and specialist apply the canonical artifact format policy."""
routing = read_prompt_md("routing.md")
task_description = read_prompt_md("tools/task/description.md")
deliverables_package = _route_resource_package(
SUBAGENT_BUILDERS_BY_NAME["deliverables"]
)
@ -73,7 +74,9 @@ def test_reports_and_resumes_default_to_pdf_without_format_clarification():
assert "**Report and resume artifacts.**" in routing
assert "create a PDF artifact" in routing
assert "Do not ask the user to choose a format." in routing
assert "rather than asking follow-up questions or drafting the" in routing
assert 'brief follow-ups such as "just do it" preserve this intent' in routing
assert "including any required artifact format" in task_description
assert "Choose the output format from the user's intent without asking" in (
deliverables_prompt
)
@ -81,6 +84,8 @@ def test_reports_and_resumes_default_to_pdf_without_format_clarification():
deliverables_prompt
)
assert "An omitted format is never a missing constraint" in deliverables_prompt
assert "rather than substituting" in deliverables_prompt
assert "a Markdown-only artifact or an inline draft" in deliverables_prompt
assert (
'"artifact_type": "artifact" | "podcast" | "video_presentation" | "image"'
in deliverables_prompt