From 71446411bfa52bc15bd691b1da78ed3353b75fad Mon Sep 17 00:00:00 2001 From: Lee Overy Date: Mon, 27 Jul 2026 12:58:32 +0100 Subject: [PATCH] fix(investigation): the symptom interview never ran for work shaped in discovery MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Step 3 asks whether the Symptoms section is already populated and takes that as "a previous session gathered these — don't re-interview". But Step 1 populates Symptoms itself, from the discovery carrier and the seed, precisely so the user is not asked to repeat what they already said. Every path into Step 3 therefore arrives with the section populated: a fresh start, a restart that deletes and rebuilds the file, and a continue where an earlier session's content stands. So the guard is true in all three, and the interview is skipped in all three. For a bugfix shaped in discovery — which is how bugfixes reach investigation — the symptom gathering step never runs at all. It works only when there was no carrier to seed from and the section was left as template placeholders. The guard was asking about the file when the question is about the session. Step 0 already knows: no file means fresh, a continue returns for Step 2 with the earlier session's symptoms standing, a restart deletes the file and returns for Step 1 to rebuild it. That distinction is now held as `resumed` and Step 3 branches on it, so a resumed session skips the interview and a seeded one still has it. An engine fact could not have served here: after Step 1 the topic status is in-progress on both paths, so it cannot tell them apart. Which arm Step 0 took is the only thing that can. Contained to this skill. Discussion and research load the same shared resume reference but their equivalent steps are unconditional guidance loads rather than an interview, so they have nothing to distinguish. The four other "already populated" guards in the system key on engine state — a non-empty map, a key in items, a set review cycle — which cannot be written by the step that precedes them. Only this one keyed on content. Step 0's file-exists arm also gains the routing footer it lacked. The resume reference routes every exit itself, which is the shape that takes `→ On return, proceed as the reference directed.` Co-Authored-By: Claude Opus 5 --- skills/workflow-investigation-process/SKILL.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/skills/workflow-investigation-process/SKILL.md b/skills/workflow-investigation-process/SKILL.md index 04c62aa55..5411525fe 100644 --- a/skills/workflow-investigation-process/SKILL.md +++ b/skills/workflow-investigation-process/SKILL.md @@ -85,6 +85,8 @@ Check if the investigation file exists at `.workflows/{work_unit}/investigation/ #### If no file exists +Set `resumed` = `false`. + → Proceed to **Step 1**. #### If file exists @@ -104,6 +106,10 @@ Check if the investigation file exists at `.workflows/{work_unit}/investigation/ Load **[resume-detection.md](../workflow-shared/references/resume-detection.md)** with artifact = `investigation`, file = `.workflows/{work_unit}/investigation/{topic}.md`, continue_step = `Step 2`, restart_targets = `the investigation file and the phase cache directory (rm -rf .workflows/.cache/{work_unit}/investigation/{topic}/ — content and agent state together)`, commit = `investigation({work_unit}): restart investigation`. +Set `resumed` from where the reference returns: `true` for **Step 2**, the earlier session's symptoms still standing; `false` for **Step 1**, its file deleted and rebuilt. + +→ On return, proceed as the reference directed. + --- ## Step 1: Initialize Investigation @@ -124,9 +130,9 @@ Load **[knowledge-usage.md](../workflow-knowledge/references/knowledge-usage.md) ## Step 3: Symptom Gathering -#### If the Symptoms section is already populated +#### If `resumed` is `true` -Resuming — don't re-interview. Fold in anything new the user has mentioned this session (commit if the file changed). +An earlier session already interviewed the user — don't re-interview. Fold in anything new they have mentioned this session (commit if the file changed). → Proceed to **Step 4**.