fix(plan-eng-review): register the structure question id so never-ask can fire

The complexity gate's Original/Smaller arrangement question had no
registered question_id, so each run invented a per-plan slug (one install
logged ten different ids for it). --check matches ids exactly, so a stored
never-ask could never fire and the question was asked every time.

- Register plan-eng-review-structure as a two-way routing question.
- The template names that exact id and says AUTO_DECIDE picks the
  recommended arrangement; the preamble's check-first rule does the rest.
  Wording is byte-neutral against the parity budget and the per-host pins.
- --check falls back to $GSTACK_HOME/global-question-preferences.json, the
  file the question-preference hook already reads, when the project file
  has no entry for the id, so one setting covers every repo and both
  layers agree. A project entry still wins, the one-way and split-chain
  guards run first, a malformed or non-object global file is ignored with
  a NOTE, and --write stays per-project.
- Tests for the fallback and the template contract; two wording pins
  updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit fb0334eb5c)
This commit is contained in:
Trevor Bezdek authored and garrytan committed 2026-10-19 18:30:44 +00:00
1 parent 9cf105ccff
commit 58d99ddaae
7 files changed
+97 -16

No files matched your search

+8
View File
@@ -336,6 +336,14 @@ export const QUESTIONS = {
signal_key: 'scope-appetite',
description: "Plan touches 8+ files — reduce scope or hold?",
},
'plan-eng-review-structure': {
id: 'plan-eng-review-structure',
skill: 'plan-eng-review',
category: 'routing',
door_type: 'two-way',
options: ['original-arrangement', 'smaller-arrangement'],
description: "Complexity gate — Original arrangement or Smaller arrangement (file/class layout only)?",
},
'plan-eng-review-test-gap': {
id: 'plan-eng-review-test-gap',
skill: 'plan-eng-review',