From 931b5559c7d83ceffd0b150f4e66c3bb226bd7e3 Mon Sep 17 00:00:00 2001 From: vxavierr Date: Mon, 2 Mar 2026 12:05:03 -0300 Subject: [PATCH] fix(qa-gate): add mandatory story status update after gate verdict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem identified: @qa creates the gate file but leaves the story in InReview (or Ready for Review) — creating a stale Status field that any agent or human consulting the story will read as incorrect state. Dual root cause: - qa-gate.md had no explicit instruction to update the story Status field - story-lifecycle.md assigned the Done transition to @devops, which is incorrect — @devops handles git push, not the status field update Changes: - qa-gate.md: add MANDATORY FINAL STEP section with verdict→Status mapping table and required Change Log entry format. Gate file without status update is now defined as incomplete task execution. - story-lifecycle.md: replace single Done row (attributed to @devops) with two explicit rows owned by @qa: PASS/CONCERNS/WAIVED → Done (@qa MUST update) FAIL → InProgress (@qa MUST update) Add CRITICAL block mirroring the existing Draft→Ready critical note, making @qa's responsibility unambiguous. --- .aios-core/development/tasks/qa-gate.md | 17 +++++++++++++++++ .claude/rules/story-lifecycle.md | 5 ++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.aios-core/development/tasks/qa-gate.md b/.aios-core/development/tasks/qa-gate.md index bce9035077..543a3f0fe1 100644 --- a/.aios-core/development/tasks/qa-gate.md +++ b/.aios-core/development/tasks/qa-gate.md @@ -394,6 +394,23 @@ If blast radius returned HIGH risk: 3. Keep status_reason to 1-2 sentences maximum 4. Use severity values exactly: `low`, `medium`, or `high` +## MANDATORY FINAL STEP — Update Story Status + +After creating the gate file, **ALWAYS** update the story's `| **Status** |` row in the metadata table and append to the Change Log. This step is non-negotiable — a gate file without a corresponding story Status update is an incomplete task execution. + +| Gate verdict | Story Status → | +|--------------|-----------------| +| PASS | Done | +| CONCERNS | Done | +| FAIL | InProgress | +| WAIVED | Done | + +**Change Log entry (append, do not replace):** + +``` +| {YYYY-MM-DD} | @qa (Quinn) | Gate: {verdict} — Status: {old} → {new} | +``` + ## Example Story Update After creating gate file, append to story's QA Results section: diff --git a/.claude/rules/story-lifecycle.md b/.claude/rules/story-lifecycle.md index eb17b17702..8cc4cddde8 100644 --- a/.claude/rules/story-lifecycle.md +++ b/.claude/rules/story-lifecycle.md @@ -18,10 +18,13 @@ Draft → Ready → InProgress → InReview → Done | Ready | @po validates (GO) | @po | **MUST update status field in story file from Draft → Ready** | | InProgress | @dev starts implementation | @dev | Update status field | | InReview | @dev completes, @qa reviews | @qa | Update status field | -| Done | @qa PASS, @devops pushes | @devops | Update status field | +| Done | @qa PASS / CONCERNS / WAIVED | **@qa** | **MUST update status field InReview → Done** | +| InProgress (return) | @qa FAIL | **@qa** | **MUST update status field InReview → InProgress** | **CRITICAL:** The `Draft → Ready` transition is the responsibility of @po during `*validate-story-draft`. When verdict is GO (including conditional GO after fixes are applied), @po MUST update the story's Status field to `Ready` and log the transition in the Change Log. A story left in `Draft` after a GO verdict is a process violation. +**CRITICAL:** The `InReview → Done` and `InReview → InProgress` transitions are the responsibility of @qa during `*qa-gate`. @qa MUST update the story's Status field immediately after creating the gate file (see `qa-gate.md` — MANDATORY FINAL STEP). A story left in `InReview` after a gate verdict is a process violation. @devops does NOT own this transition — @devops only executes `git push` after the story is already `Done`. + ## Phase 1: Create (@sm) **Task:** `create-next-story.md`