Require human verification before resolving debug sessions

This commit is contained in:
Colin
2026-02-17 09:51:13 -05:00
parent c609f3d0de
commit 02bc779c7d
4 changed files with 66 additions and 10 deletions

View File

@@ -6,6 +6,9 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
## [Unreleased]
### Changed
- `/gsd:debug` flow now requires a `human-verify` checkpoint after self-verification before marking debug sessions `resolved` and moving files to `.planning/debug/resolved/`
## [1.20.3] - 2026-02-16
### Fixed

View File

@@ -737,7 +737,7 @@ DEBUG_RESOLVED_DIR=.planning/debug/resolved
```markdown
---
status: gathering | investigating | fixing | verifying | resolved
status: gathering | investigating | fixing | verifying | awaiting_human_verify | resolved
trigger: "[verbatim user input]"
created: [ISO timestamp]
updated: [ISO timestamp]
@@ -801,10 +801,10 @@ files_changed: []
## Status Transitions
```
gathering -> investigating -> fixing -> verifying -> resolved
^ | |
|____________|___________|
(if verification fails)
gathering -> investigating -> fixing -> verifying -> awaiting_human_verify -> resolved
^ | | |
|____________|___________|_________________|
(if verification fails or user reports issue)
```
## Resume Behavior
@@ -907,6 +907,7 @@ Based on status:
- "investigating" -> Continue investigation_loop from Current Focus
- "fixing" -> Continue fix_and_verify
- "verifying" -> Continue verification
- "awaiting_human_verify" -> Wait for checkpoint response and either finalize or continue investigation
</step>
<step name="return_diagnosis">
@@ -966,11 +967,52 @@ Update status to "fixing".
- Update status to "verifying"
- Test against original Symptoms
- If verification FAILS: status -> "investigating", return to investigation_loop
- If verification PASSES: Update Resolution.verification, proceed to archive_session
- If verification PASSES: Update Resolution.verification, proceed to request_human_verification
</step>
<step name="request_human_verification">
**Require user confirmation before marking resolved.**
Update status to "awaiting_human_verify".
Return:
```markdown
## CHECKPOINT REACHED
**Type:** human-verify
**Debug Session:** .planning/debug/{slug}.md
**Progress:** {evidence_count} evidence entries, {eliminated_count} hypotheses eliminated
### Investigation State
**Current Hypothesis:** {from Current Focus}
**Evidence So Far:**
- {key finding 1}
- {key finding 2}
### Checkpoint Details
**Need verification:** confirm the original issue is resolved in your real workflow/environment
**Self-verified checks:**
- {check 1}
- {check 2}
**How to check:**
1. {step 1}
2. {step 2}
**Tell me:** "confirmed fixed" OR what's still failing
```
Do NOT move file to `resolved/` in this step.
</step>
<step name="archive_session">
**Archive resolved debug session.**
**Archive resolved debug session after human confirmation.**
Only run this step when checkpoint response confirms the fix works end-to-end.
Update status to "resolved".
@@ -1127,6 +1169,8 @@ Orchestrator presents checkpoint to user, gets response, spawns fresh continuati
**Commit:** {hash}
```
Only return this after human verification confirms the fix.
## INVESTIGATION INCONCLUSIVE
```markdown
@@ -1176,7 +1220,8 @@ Check for mode flags in prompt context:
**goal: find_and_fix** (default)
- Find root cause, then fix and verify
- Complete full debugging cycle
- Archive session when verified
- Require human-verify checkpoint after self-verification
- Archive session only after user confirmation
**Default mode (no flags):**
- Interactive debugging with user

View File

@@ -110,6 +110,9 @@ Task(
**If `## CHECKPOINT REACHED`:**
- Present checkpoint details to user
- Get user response
- If checkpoint type is `human-verify`:
- If user confirms fixed: continue so agent can finalize/resolve/archive
- If user reports issues: continue so agent returns to investigation/fixing
- Spawn continuation agent (see step 5)
**If `## INVESTIGATION INCONCLUSIVE`:**

View File

@@ -8,7 +8,7 @@ Template for `.planning/debug/[slug].md` — active debug session tracking.
```markdown
---
status: gathering | investigating | fixing | verifying | resolved
status: gathering | investigating | fixing | verifying | awaiting_human_verify | resolved
trigger: "[verbatim user input]"
created: [ISO timestamp]
updated: [ISO timestamp]
@@ -127,9 +127,14 @@ files_changed: []
- Update Resolution.verification with results
- If verification fails: status → "investigating", try again
**After self-verification passes:**
- status -> "awaiting_human_verify"
- Request explicit user confirmation in a checkpoint
- Do NOT move file to resolved yet
**On resolution:**
- status → "resolved"
- Move file to .planning/debug/resolved/
- Move file to .planning/debug/resolved/ (only after user confirms fix)
</lifecycle>