Tasks Tail QA Pair
Auto-append the canonical QA pair ($qa-report + $qa-execution) to every _tasks.md produced by cy-create-tasks, so the implementation agent always closes a program with a real verification pass. The pair operates on the repo's living QA tree (docs/qa/) — plans become journeys/charters/scenario files, results become registry bugs and dated reports.
Procedures
Step 1: Locate the Tasks File
- Resolve the target
_tasks.mdpath. If invoked immediately aftercy-create-tasks, the orchestrator passes the slug; otherwise read the most recently modified.compozy/tasks/<slug>/_tasks.md. - Read the file and check whether the last two non-empty entries already follow the QA pair pattern.
- If both
qa-reportandqa-executionrows exist with proper dependencies, exit with statusnoop— do not duplicate.
Step 2: Detect UI-Bearing Features
- Parse the task list for any task that touches
web/,packages/site,web/e2e/, Storybook, or any frontend-facing surface. - If at least one task touches user-facing UI, set
requires_e2e=true. - If no task touches UI but the techspec covers public API/CLI, agent-manageability, extensibility, or config lifecycle surfaces, set
requires_cli_e2e=true. - Otherwise
requires_e2e=false(rare — backend-only refactors).
Step 3: Read the Tail Template
- Read
references/qa-tail-template.mdfor the canonical row shape, complexity rating, and required<critical>blocks. - Note the
Dependenciessyntax: theqa-reporttask depends on the last implementation task, and theqa-executiontask depends onqa-report. - Preserve the table column order used in the existing
_tasks.md(do not reorder columns). The current canonical order is# | Title | Status | Complexity | Dependencies.
Step 4: Compose the QA Pair
- Generate the
qa-reporttask row using the template:- Title:
QA Plan and Session Charters - Frontmatter type:
qa-report - Status:
pending - Complexity:
high - Dependencies: last implementation task ID
- Title:
- Generate the
qa-executiontask row:- Title:
Real-User QA Execution - Frontmatter type:
qa-execution - Status:
pending - Complexity:
critical - Dependencies: the new
qa-reporttask ID - Include e2e directive when
requires_e2e=true(Playwright viabrowser-use:browser, fallback toagent-browser). - Include CLI/API/agent-manageability end-to-end directive when
requires_cli_e2e=true.
- Title:
- Compute correct sequential task IDs (e.g., next
task_NNnumbers).
Step 5: Append and Verify
- Append the two rows below the existing list. Do not modify earlier rows.
- Create matching
task_NN.mdfiles for both QA rows using the body guidance inreferences/qa-tail-template.md. - If the
_tasks.mdincludes a## MVP Boundarysection that references "tasks 01-NN", update only the QA range to include the new tasks. - Read
references/qa-pair-checklist.mdand confirm every item passes before exit. - Print the final two-row diff to stdout for human/agent review.
Error Handling
- If the target
_tasks.mdcannot be located, fail loudly and report the resolved slug. Do not write files speculatively. - If the file lacks a recognizable task table (e.g., it is empty or uses a custom format), refuse to edit; emit the discovered shape on stderr and ask for the correct path.
- If
cy-create-tasksalready inserted partial QA tasks (onlyqa-reportor onlyqa-execution), repair the missing half rather than duplicating. - Never replace existing QA rows. If the user has customized them, treat the file as ready and exit
noop.