sumo_qa_export_test_cases
Export structured QA test cases into markdown, JSON, or CSV format. Returns rendered content and optionally writes to a file.
Instructions
Deterministically EXPORT already-structured QA test cases into one
documented machine-readable shape (issue #148). FILE/FORMAT PLUMBING ONLY
— the host LLM identifies the cases; this tool never infers them and never
inspects a repo. By DEFAULT it is side-effect free (it RETURNS the rendered
text and writes nothing); a file is persisted ONLY when an explicit
output_path is supplied.
Each case is a dict with: id (stable within this export), title,
preconditions (ordered list, may be empty), steps (ordered list,
may be empty), expected_result, optional linked_risk_id (a risk id
in a companion risk ledger), priority (one of critical / high / medium
/ low), and evidence_status (one of planned / passing / failing /
stale / accepted_residual — the same vocabulary as the risk ledger).
format is one of: markdown (the DEFAULT human-facing table),
json (a versioned, key-sorted, deterministic document), or csv
(OPTIONAL, and only valid for a flat outline — at most one precondition
and one step per case). An unsupported format, or CSV for a non-flat
export, returns an error envelope naming the supported formats. Tool-
specific import mappings may need local adjustment.
export_title (optional) names the export as a whole — rendered in the
markdown header and the JSON top-level title. (It is named
export_title, not title, so it is distinct from each case's own
title and survives the served-schema title-slimming pass.)
output_path (optional) is the EXPLICIT file-write carve-out. When
omitted (the default) nothing is written. When given, the SAME rendered
bytes are ALSO persisted, confined to the project export root
(<cwd>/.sumo-qa/exports): a relative path resolves under that root, an
absolute path or .. traversal that escapes it is refused, and an
already-existing target is refused rather than silently overwritten. The
write only happens AFTER successful validation+render, so a bad export
never leaves a file. On a successful write written_path carries the
resolved absolute path (else None).
Returns the rendered content, the chosen format, the stamped
schema_version, the validated test_case_count, and written_path
(the persisted location, or None on the default no-write path).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| test_cases | Yes | ||
| format | No | markdown | |
| export_title | No | ||
| output_path | No |