fix(#4776): resolve the artifact-exists prompt under --auto (#4832)

* fix(#4776): resolve the artifact-exists prompt under --auto

/gsd-ui-phase <phase> --auto stopped at 'UI-SPEC.md already exists for
Phase {N}. What would you like to do?' whenever the file was on disk —
which is most often after an earlier run wrote the contract as a draft
and ended before its checker ran, exactly the state a re-run exists to
verify. Step 4 had no --auto arm; step 9.5 in the same file has had one
since it was added, which is how the drift went unnoticed.

Step 4 now auto-selects Skip: the existing UI-SPEC is left untouched and
the run proceeds to the checker. Skip is the only non-destructive choice
— Update re-runs the researcher, which rewrites the whole contract and
drops answers a person already recorded in it, and View exits without
verifying anything.

spec-phase.md's artifact-exists arm auto-selected 'Update it', which is
the same defect with the opposite sign: an unattended run regenerating a
spec nobody is watching. Per the decision recorded on #4776 — an
unattended run reuses an existing artifact rather than regenerating it —
it now auto-selects Skip and leaves the spec unchanged.

The max-revision-iterations escalation (Force approve / Edit manually /
Abandon) is deliberately untouched and pinned by a test: accepting
blocking findings is a decision a person makes.

Closes #4776

* chore(#4776): add changeset fragment

Emitted-Drift-Ack-Growth: ui-phase.md — --auto arm added to the existing-UI-SPEC branch (#4776)
Emitted-Drift-Ack-Growth: spec-phase.md — --auto arm reworded to reuse the existing SPEC (#4776)

* fix(#4776): extend the reuse-as-is --auto fix to the 3 sibling files

The PR's original scope claim -- that ai-integration-phase.md,
eval-review.md and ui-review.md were "scoped by triage to their own
issues" -- was false; no such issues existed, and it contradicted #4776's
own most recent (2026-09-16) triage comment, which explicitly widened the
fix to require all 5 files under one recommended fix.

Applies the same reuse-as-is pattern: ai-integration-phase.md mirrors
ui-phase.md's 3-way Update/View/Skip shape (auto-selects Skip);
eval-review.md and ui-review.md have only Re-audit/View (auto-selects
View, the only non-regenerating choice). None of the three had any prior
--auto handling at all -- each has exactly one AskUserQuestion call site
total, and it is the one this fix resolves, so an --auto run through any
of them no longer stalls anywhere.

Emitted-Drift-Ack-Growth: ai-integration-phase.md — the --auto arm reusing an existing AI-SPEC is the deliverable (#4776)
Emitted-Drift-Ack-Growth: eval-review.md — the --auto arm reusing an existing EVAL-REVIEW is the deliverable (#4776)
Emitted-Drift-Ack-Growth: ui-review.md — the --auto arm reusing an existing UI-REVIEW is the deliverable (#4776)

---------

Co-authored-by: Tom Boucher <trekkie@nomorestars.com>
This commit is contained in:
Michel Moreira
2026-09-23 12:13:34 -03:00
committed by GitHub
parent b90eef28e8
commit af822a8024
8 changed files with 153 additions and 6 deletions

View File

@@ -118,7 +118,7 @@ Clarify WHAT a phase delivers through Socratic questioning with quantitative amb
| Flag | Description |
|------|-------------|
| `--auto` | Skip interactive questions; Claude selects recommended defaults and writes SPEC.md |
| `--auto` | Skip interactive questions; Claude selects recommended defaults and writes SPEC.md. An existing SPEC.md is **reused as-is**, never regenerated |
| `--text` | Use plain-text numbered lists instead of TUI menus (required for `/rc` remote sessions) |
**Position in workflow:** `spec-phase → discuss-phase → plan-phase → execute-phase → verify`
@@ -178,11 +178,17 @@ Generate UI design contract for frontend phases.
|----------|----------|-------------|
| `N` | No | Phase number (defaults to current phase) |
| Flag | Description |
|------|-------------|
| `--auto` | Skip interactive questions. An existing UI-SPEC.md is **reused as-is** and sent straight to the checker, never re-researched |
| `--text` | Use plain-text numbered lists instead of TUI menus |
**Prerequisites:** `.planning/ROADMAP.md` exists, phase has frontend/UI work
**Produces:** `{phase}-UI-SPEC.md`
```bash
/gsd-ui-phase 2 # Design contract for phase 2
/gsd-ui-phase 2 --auto # Non-interactive; reuses an existing UI-SPEC
```
---
@@ -426,9 +432,14 @@ Retroactive 6-pillar visual audit of implemented frontend.
For richer visual evidence, pair this with `gsd-browser` or another browser MCP server so the audit can capture screenshots, state, console/network context, and reproducible interaction steps.
| Flag | Description |
|------|-------------|
| `--auto` | Skip interactive questions. An existing UI-REVIEW.md is **reused as-is**, never re-audited |
```bash
/gsd-ui-review # Audit current phase
/gsd-ui-review 3 # Audit phase 3
/gsd-ui-review 3 --auto # Non-interactive; reuses an existing UI-REVIEW
```
---
@@ -1659,9 +1670,14 @@ Generate an AI-SPEC.md design contract for phases that involve building AI syste
**Spawns:** 3 parallel specialist agents: domain-researcher, framework-selector, ai-researcher, and eval-planner
| Flag | Description |
|------|-------------|
| `--auto` | Skip interactive questions. An existing AI-SPEC.md is **reused as-is**, never regenerated |
```bash
/gsd-ai-integration-phase # Wizard for the current phase
/gsd-ai-integration-phase 3 # Wizard for a specific phase
/gsd-ai-integration-phase 3 --auto # Non-interactive; reuses an existing AI-SPEC
```
---
@@ -1673,9 +1689,14 @@ Audit an executed AI phase's evaluation coverage and produce an EVAL-REVIEW.md r
**Prerequisites:** Phase has been executed and has an `AI-SPEC.md`
**Produces:** `{phase}-EVAL-REVIEW.md` with findings, gaps, and remediation guidance
| Flag | Description |
|------|-------------|
| `--auto` | Skip interactive questions. An existing EVAL-REVIEW.md is **reused as-is**, never re-audited |
```bash
/gsd-eval-review # Audit current phase
/gsd-eval-review 3 # Audit a specific phase
/gsd-eval-review 3 --auto # Non-interactive; reuses an existing EVAL-REVIEW
```
---