mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-06 00:44:07 +01:00
fix: prose design commands pass briefs and feedback as data
The DESIGN_SETUP command list taught `iterate --feedback "..."`, and design-consultation's late-change and plan-design-review's slop-regenerate lines showed `--feedback "<feedback>"` / `"..."`; design-shotgun's retry showed `generate --brief "<brief>"` and `evolve --brief "<brief>"`. Feedback now reads "$(cat "$FEEDBACK_FILE")" from an agent-written mktemp file (the setup note says how), and the shotgun retry reads the variant's own brief out of briefs.json with jq instead of retyping it. Co-authored-by: dgrant <dgrant@users.noreply.github.com>
This commit is contained in:
1 parent
e652ae4ae9
commit
eba6d83ae4
11 files changed
+28
-24
No files matched your search
@@ -566,9 +566,9 @@ Commands:
|
||||
- `$D compare --images-file /path/board-images.json --output /path/board.html --serve` — comparison board + HTTP server
|
||||
- `$D serve --html /path/board.html` — serve comparison board and collect feedback via HTTP
|
||||
- `$D check --image /path.png --brief "$(cat "$BRIEF_FILE")"` — vision quality gate
|
||||
- `$D iterate --session /path/session.json --feedback "..." --output /path.png` — iterate
|
||||
- `$D iterate --session /path/session.json --feedback "$(cat "$FEEDBACK_FILE")" --output /path.png` — iterate
|
||||
|
||||
Image commands never overwrite (a taken name gets `-2`) and always print JSON (`requested`, `saved`, `failures`); exit 0 ready, 2 nothing saved, 3 stopped after saving some. Capture without `set -e`: `_OUT=$($D ...); _RC=$?`. Briefs travel as files, never inline.
|
||||
Image commands never overwrite (a taken name gets `-2`) and always print JSON (`requested`, `saved`, `failures`); exit 0 ready, 2 nothing saved, 3 stopped after saving some. Capture without `set -e`: `_OUT=$($D ...); _RC=$?`. Briefs and feedback are free text: write each into a private `mktemp` file under `.gstack/tmp` and pass `"$(cat "$FILE")"`, never inline.
|
||||
- `$D extract --image /absolute/path.png` — print tokens and automatically update DESIGN.md in the current Git repository; no read-only flag
|
||||
|
||||
`generate` returns `sessionFile`; `iterate` requires that existing session. `variants` returns `paths` but creates no session: regenerate with an updated brief instead.
|
||||
|
||||
@@ -396,7 +396,7 @@ _EXTRACT_DIR=$(mktemp -d "${TMPDIR:-/tmp}/gstack-design-extract-XXXXXXXX") || ex
|
||||
|
||||
Compare extracted tokens with the approved image and verified fonts; show discrepancies at Q-final. Empty arrays, an "Unable to extract" mood or command failure → disclose fallback to Phase 3 values, never invent measured tokens.
|
||||
|
||||
Late visual changes return to the feedback loop: regenerate, recheck, reconfirm, then extract again. Only `generate` supplies `sessionFile` for `$D iterate --session "<returned sessionFile>" --feedback "<feedback>" --output "$_DESIGN_DIR/refined.png"`; use its printed `outputPath`. Variants must regenerate.
|
||||
Late visual changes return to the feedback loop: regenerate, recheck, reconfirm, then extract again. Only `generate` supplies `sessionFile` for `$D iterate --session "<returned sessionFile>" --feedback "$(cat "$FEEDBACK_FILE")" --output "$_DESIGN_DIR/refined.png"`; use its printed `outputPath`. Variants must regenerate.
|
||||
|
||||
**Plan mode:** Carry the approved mockup paths/tokens into Phase 6's "## Proposed DESIGN.md" plan section. Its Q-final approval governs saving that content; defer the actual DESIGN.md to implementation.
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@ _EXTRACT_DIR=$(mktemp -d "${TMPDIR:-/tmp}/gstack-design-extract-XXXXXXXX") || ex
|
||||
|
||||
Compare extracted tokens with the approved image and verified fonts; show discrepancies at Q-final. Empty arrays, an "Unable to extract" mood or command failure → disclose fallback to Phase 3 values, never invent measured tokens.
|
||||
|
||||
Late visual changes return to the feedback loop: regenerate, recheck, reconfirm, then extract again. Only `generate` supplies `sessionFile` for `$D iterate --session "<returned sessionFile>" --feedback "<feedback>" --output "$_DESIGN_DIR/refined.png"`; use its printed `outputPath`. Variants must regenerate.
|
||||
Late visual changes return to the feedback loop: regenerate, recheck, reconfirm, then extract again. Only `generate` supplies `sessionFile` for `$D iterate --session "<returned sessionFile>" --feedback "$(cat "$FEEDBACK_FILE")" --output "$_DESIGN_DIR/refined.png"`; use its printed `outputPath`. Variants must regenerate.
|
||||
|
||||
**Plan mode:** Carry the approved mockup paths/tokens into Phase 6's "## Proposed DESIGN.md" plan section. Its Q-final approval governs saving that content; defer the actual DESIGN.md to implementation.
|
||||
|
||||
|
||||
@@ -414,9 +414,9 @@ Commands:
|
||||
- `$D compare --images-file /path/board-images.json --output /path/board.html --serve` — comparison board + HTTP server
|
||||
- `$D serve --html /path/board.html` — serve comparison board and collect feedback via HTTP
|
||||
- `$D check --image /path.png --brief "$(cat "$BRIEF_FILE")"` — vision quality gate
|
||||
- `$D iterate --session /path/session.json --feedback "..." --output /path.png` — iterate
|
||||
- `$D iterate --session /path/session.json --feedback "$(cat "$FEEDBACK_FILE")" --output /path.png` — iterate
|
||||
|
||||
Image commands never overwrite (a taken name gets `-2`) and always print JSON (`requested`, `saved`, `failures`); exit 0 ready, 2 nothing saved, 3 stopped after saving some. Capture without `set -e`: `_OUT=$($D ...); _RC=$?`. Briefs travel as files, never inline.
|
||||
Image commands never overwrite (a taken name gets `-2`) and always print JSON (`requested`, `saved`, `failures`); exit 0 ready, 2 nothing saved, 3 stopped after saving some. Capture without `set -e`: `_OUT=$($D ...); _RC=$?`. Briefs and feedback are free text: write each into a private `mktemp` file under `.gstack/tmp` and pass `"$(cat "$FILE")"`, never inline.
|
||||
|
||||
**Path rule:** Design artifacts belong in `$GSTACK_STATE_ROOT/projects/$SLUG/designs/`.
|
||||
Use `bin/gstack-paths` (docs/state-root.md). Keep it even if temporary; never substitute
|
||||
|
||||
@@ -763,9 +763,9 @@ Commands:
|
||||
- `$D compare --images-file /path/board-images.json --output /path/board.html --serve` — comparison board + HTTP server
|
||||
- `$D serve --html /path/board.html` — serve comparison board and collect feedback via HTTP
|
||||
- `$D check --image /path.png --brief "$(cat "$BRIEF_FILE")"` — vision quality gate
|
||||
- `$D iterate --session /path/session.json --feedback "..." --output /path.png` — iterate
|
||||
- `$D iterate --session /path/session.json --feedback "$(cat "$FEEDBACK_FILE")" --output /path.png` — iterate
|
||||
|
||||
Image commands never overwrite (a taken name gets `-2`) and always print JSON (`requested`, `saved`, `failures`); exit 0 ready, 2 nothing saved, 3 stopped after saving some. Capture without `set -e`: `_OUT=$($D ...); _RC=$?`. Briefs travel as files, never inline.
|
||||
Image commands never overwrite (a taken name gets `-2`) and always print JSON (`requested`, `saved`, `failures`); exit 0 ready, 2 nothing saved, 3 stopped after saving some. Capture without `set -e`: `_OUT=$($D ...); _RC=$?`. Briefs and feedback are free text: write each into a private `mktemp` file under `.gstack/tmp` and pass `"$(cat "$FILE")"`, never inline.
|
||||
|
||||
**Path rule:** Design artifacts belong in `$GSTACK_STATE_ROOT/projects/$SLUG/designs/`.
|
||||
Use `bin/gstack-paths` (docs/state-root.md). Keep it even if temporary; never substitute
|
||||
|
||||
@@ -424,9 +424,9 @@ Commands:
|
||||
- `$D compare --images-file /path/board-images.json --output /path/board.html --serve` — comparison board + HTTP server
|
||||
- `$D serve --html /path/board.html` — serve comparison board and collect feedback via HTTP
|
||||
- `$D check --image /path.png --brief "$(cat "$BRIEF_FILE")"` — vision quality gate
|
||||
- `$D iterate --session /path/session.json --feedback "..." --output /path.png` — iterate
|
||||
- `$D iterate --session /path/session.json --feedback "$(cat "$FEEDBACK_FILE")" --output /path.png` — iterate
|
||||
|
||||
Image commands never overwrite (a taken name gets `-2`) and always print JSON (`requested`, `saved`, `failures`); exit 0 ready, 2 nothing saved, 3 stopped after saving some. Capture without `set -e`: `_OUT=$($D ...); _RC=$?`. Briefs travel as files, never inline.
|
||||
Image commands never overwrite (a taken name gets `-2`) and always print JSON (`requested`, `saved`, `failures`); exit 0 ready, 2 nothing saved, 3 stopped after saving some. Capture without `set -e`: `_OUT=$($D ...); _RC=$?`. Briefs and feedback are free text: write each into a private `mktemp` file under `.gstack/tmp` and pass `"$(cat "$FILE")"`, never inline.
|
||||
|
||||
**Path rule:** Design artifacts belong in `$GSTACK_STATE_ROOT/projects/$SLUG/designs/`.
|
||||
Use `bin/gstack-paths` (docs/state-root.md). Keep it even if temporary; never substitute
|
||||
@@ -717,9 +717,11 @@ After the command returns and its images are published:
|
||||
saved in ~{actual time}", listing every published path. A `skipped` check is missing
|
||||
automated coverage, not a pass: say so.
|
||||
2. For any failures: report explicitly with the error. Do NOT silently skip. Rerun each
|
||||
failed variant with `retryable: true` once, using its own operation and brief:
|
||||
`"$D" generate --brief "<brief>" --output "$_VARIANT_TMP/variant-<letter>.png"`, or for a
|
||||
screenshot entry `"$D" evolve --screenshot "$_DESIGN_DIR/current.png" --brief "<brief>" --output "$_VARIANT_TMP/variant-<letter>.png"`.
|
||||
failed variant with `retryable: true` once, using its own operation and its brief read
|
||||
from `briefs.json` as data:
|
||||
`_BRIEF=$(jq -r --arg v "<letter>" '.[($v | explode[0]) - 65].brief' "$_DESIGN_DIR/briefs.json")`, then
|
||||
`"$D" generate --brief "$_BRIEF" --output "$_VARIANT_TMP/variant-<letter>.png"`, or for a
|
||||
screenshot entry `"$D" evolve --screenshot "$_DESIGN_DIR/current.png" --brief "$_BRIEF" --output "$_VARIANT_TMP/variant-<letter>.png"`.
|
||||
Capture its JSON and exit code, then publish its `outputPath` with the claim helper.
|
||||
3. If zero variants succeeded: fall back to sequential generation, running `$D generate`
|
||||
yourself one variant at a time into `$_VARIANT_TMP`, publishing each with the claim
|
||||
|
||||
@@ -300,9 +300,11 @@ After the command returns and its images are published:
|
||||
saved in ~{actual time}", listing every published path. A `skipped` check is missing
|
||||
automated coverage, not a pass: say so.
|
||||
2. For any failures: report explicitly with the error. Do NOT silently skip. Rerun each
|
||||
failed variant with `retryable: true` once, using its own operation and brief:
|
||||
`"$D" generate --brief "<brief>" --output "$_VARIANT_TMP/variant-<letter>.png"`, or for a
|
||||
screenshot entry `"$D" evolve --screenshot "$_DESIGN_DIR/current.png" --brief "<brief>" --output "$_VARIANT_TMP/variant-<letter>.png"`.
|
||||
failed variant with `retryable: true` once, using its own operation and its brief read
|
||||
from `briefs.json` as data:
|
||||
`_BRIEF=$(jq -r --arg v "<letter>" '.[($v | explode[0]) - 65].brief' "$_DESIGN_DIR/briefs.json")`, then
|
||||
`"$D" generate --brief "$_BRIEF" --output "$_VARIANT_TMP/variant-<letter>.png"`, or for a
|
||||
screenshot entry `"$D" evolve --screenshot "$_DESIGN_DIR/current.png" --brief "$_BRIEF" --output "$_VARIANT_TMP/variant-<letter>.png"`.
|
||||
Capture its JSON and exit code, then publish its `outputPath` with the claim helper.
|
||||
3. If zero variants succeeded: fall back to sequential generation, running `$D generate`
|
||||
yourself one variant at a time into `$_VARIANT_TMP`, publishing each with the claim
|
||||
|
||||
@@ -669,9 +669,9 @@ Commands:
|
||||
- `$D compare --images-file /path/board-images.json --output /path/board.html --serve` — comparison board + HTTP server
|
||||
- `$D serve --html /path/board.html` — serve comparison board and collect feedback via HTTP
|
||||
- `$D check --image /path.png --brief "$(cat "$BRIEF_FILE")"` — vision quality gate
|
||||
- `$D iterate --session /path/session.json --feedback "..." --output /path.png` — iterate
|
||||
- `$D iterate --session /path/session.json --feedback "$(cat "$FEEDBACK_FILE")" --output /path.png` — iterate
|
||||
|
||||
Image commands never overwrite (a taken name gets `-2`) and always print JSON (`requested`, `saved`, `failures`); exit 0 ready, 2 nothing saved, 3 stopped after saving some. Capture without `set -e`: `_OUT=$($D ...); _RC=$?`. Briefs travel as files, never inline.
|
||||
Image commands never overwrite (a taken name gets `-2`) and always print JSON (`requested`, `saved`, `failures`); exit 0 ready, 2 nothing saved, 3 stopped after saving some. Capture without `set -e`: `_OUT=$($D ...); _RC=$?`. Briefs and feedback are free text: write each into a private `mktemp` file under `.gstack/tmp` and pass `"$(cat "$FILE")"`, never inline.
|
||||
|
||||
**Path rule:** Design artifacts belong in `$GSTACK_STATE_ROOT/projects/$SLUG/designs/`.
|
||||
Use `bin/gstack-paths` (docs/state-root.md). Keep it even if temporary; never substitute
|
||||
|
||||
@@ -217,7 +217,7 @@ FIX TO 10: Rewrite vague UI descriptions with specific alternatives:
|
||||
- "Hero section" → what makes this hero feel like THIS product?
|
||||
- "Clean, modern UI" → meaningless. Replace with actual design decisions.
|
||||
- "Dashboard with widgets" → what makes this NOT every other dashboard?
|
||||
If visual mockups were generated in Step 0.5, evaluate them against the AI slop blacklist above. Read each mockup image using the Read tool. Does the mockup fall into generic patterns (3-column grid, centered hero, stock-photo feel)? If so, flag it and offer to regenerate with more specific direction via `$D iterate --feedback "..."`; use its printed `outputPath` for any later view, check or board.
|
||||
If visual mockups were generated in Step 0.5, evaluate them against the AI slop blacklist above. Read each mockup image using the Read tool. Does the mockup fall into generic patterns (3-column grid, centered hero, stock-photo feel)? If so, flag it and offer to regenerate with more specific direction via `$D iterate --feedback "$(cat "$FEEDBACK_FILE")"` (the feedback in a private file, never inline); use its printed `outputPath` for any later view, check or board.
|
||||
**STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY.
|
||||
|
||||
### Pass 5: Design System Alignment
|
||||
@@ -258,7 +258,7 @@ If mockups were generated in Step 0.5 and review passes changed significant desi
|
||||
|
||||
AskUserQuestion: "The review passes changed [list major design changes]. Want me to regenerate mockups to reflect the updated plan? This ensures the visual reference matches what we're actually building."
|
||||
|
||||
If yes, use `$D iterate` with feedback summarizing the changes, or `$D variants` with an updated brief. Save to the same `$_DESIGN_DIR` directory; nothing is overwritten, so do round accounting and carry the printed paths into any new board (rebuild it with the board block, which rewrites `board-images.json`) or check.
|
||||
If yes, use `$D iterate` with feedback summarizing the changes, or `$D variants` with an updated brief; either text goes in a brief or feedback file, never inline. Save to the same `$_DESIGN_DIR` directory; nothing is overwritten, so do round accounting and carry the printed paths into any new board (rebuild it with the board block, which rewrites `board-images.json`) or check.
|
||||
|
||||
## How to ask questions
|
||||
Follow the AskUserQuestion format from the Preamble above. Additional rules for plan design reviews:
|
||||
|
||||
@@ -79,7 +79,7 @@ FIX TO 10: Rewrite vague UI descriptions with specific alternatives:
|
||||
- "Hero section" → what makes this hero feel like THIS product?
|
||||
- "Clean, modern UI" → meaningless. Replace with actual design decisions.
|
||||
- "Dashboard with widgets" → what makes this NOT every other dashboard?
|
||||
If visual mockups were generated in Step 0.5, evaluate them against the AI slop blacklist above. Read each mockup image using the Read tool. Does the mockup fall into generic patterns (3-column grid, centered hero, stock-photo feel)? If so, flag it and offer to regenerate with more specific direction via `$D iterate --feedback "..."`; use its printed `outputPath` for any later view, check or board.
|
||||
If visual mockups were generated in Step 0.5, evaluate them against the AI slop blacklist above. Read each mockup image using the Read tool. Does the mockup fall into generic patterns (3-column grid, centered hero, stock-photo feel)? If so, flag it and offer to regenerate with more specific direction via `$D iterate --feedback "$(cat "$FEEDBACK_FILE")"` (the feedback in a private file, never inline); use its printed `outputPath` for any later view, check or board.
|
||||
**STOP.** AskUserQuestion once per issue. Do NOT batch. Recommend + WHY.
|
||||
|
||||
### Pass 5: Design System Alignment
|
||||
@@ -120,7 +120,7 @@ If mockups were generated in Step 0.5 and review passes changed significant desi
|
||||
|
||||
AskUserQuestion: "The review passes changed [list major design changes]. Want me to regenerate mockups to reflect the updated plan? This ensures the visual reference matches what we're actually building."
|
||||
|
||||
If yes, use `$D iterate` with feedback summarizing the changes, or `$D variants` with an updated brief. Save to the same `$_DESIGN_DIR` directory; nothing is overwritten, so do round accounting and carry the printed paths into any new board (rebuild it with the board block, which rewrites `board-images.json`) or check.
|
||||
If yes, use `$D iterate` with feedback summarizing the changes, or `$D variants` with an updated brief; either text goes in a brief or feedback file, never inline. Save to the same `$_DESIGN_DIR` directory; nothing is overwritten, so do round accounting and carry the printed paths into any new board (rebuild it with the board block, which rewrites `board-images.json`) or check.
|
||||
|
||||
## How to ask questions
|
||||
Follow the AskUserQuestion format from the Preamble above. Additional rules for plan design reviews:
|
||||
|
||||
@@ -1208,9 +1208,9 @@ Commands:
|
||||
- \`$D compare --images-file /path/board-images.json --output /path/board.html --serve\` — comparison board + HTTP server
|
||||
- \`$D serve --html /path/board.html\` — serve comparison board and collect feedback via HTTP
|
||||
- \`$D check --image /path.png --brief "$(cat "$BRIEF_FILE")"\` — vision quality gate
|
||||
- \`$D iterate --session /path/session.json --feedback "..." --output /path.png\` — iterate
|
||||
- \`$D iterate --session /path/session.json --feedback "$(cat "$FEEDBACK_FILE")" --output /path.png\` — iterate
|
||||
|
||||
Image commands never overwrite (a taken name gets \`-2\`) and always print JSON (\`requested\`, \`saved\`, \`failures\`); exit 0 ready, 2 nothing saved, 3 stopped after saving some. Capture without \`set -e\`: \`_OUT=$($D ...); _RC=$?\`. Briefs travel as files, never inline.${ctx.skillName === 'design-consultation' ? `
|
||||
Image commands never overwrite (a taken name gets \`-2\`) and always print JSON (\`requested\`, \`saved\`, \`failures\`); exit 0 ready, 2 nothing saved, 3 stopped after saving some. Capture without \`set -e\`: \`_OUT=$($D ...); _RC=$?\`. Briefs and feedback are free text: write each into a private \`mktemp\` file under \`.gstack/tmp\` and pass \`"$(cat "$FILE")"\`, never inline.${ctx.skillName === 'design-consultation' ? `
|
||||
- \`$D extract --image /absolute/path.png\` — print tokens and automatically update DESIGN.md in the current Git repository; no read-only flag
|
||||
|
||||
\`generate\` returns \`sessionFile\`; \`iterate\` requires that existing session. \`variants\` returns \`paths\` but creates no session: regenerate with an updated brief instead.` : ''}
|
||||
|
||||
Reference in new issue
Block a user