You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
new-feature.sh errors when there are uncommitted changes, requiring manual stash:
❌ Working tree has uncommitted changes
Commit or stash your changes first:
git stash push -m 'WIP before issue #21'
While the instructions are clear, this adds friction to the workflow.
Proposed Solution
Add --stash flag for automatic stashing:
./scripts/dev/new-feature.sh 21 --stash
Or interactive prompt:
⚠️ Uncommitted changes detected.
Stash and continue? [y/N] y
Stashing changes...
Implementation
# Parse --stash flag
STASH=false
forargin"$@";docase$argin
--stash) STASH=true;shift ;;
esacdone# In uncommitted changes checkif! git diff-index --quiet HEAD -- 2>/dev/null;thenif [ "$STASH"=true ];thenecho"Stashing uncommitted changes..."
git stash push -m "WIP before issue #${ISSUE_NUMBER}"elseecho"❌ Working tree has uncommitted changes"echo" Use --stash to auto-stash, or manually:"echo" git stash push -m 'WIP before issue #${ISSUE_NUMBER}'"exit 1
fifi
Acceptance Criteria
Add --stash flag support to new-feature.sh
Auto-stash with descriptive message when flag used
Flag parsing loop handles --stash in any position relative to issue number
AC-2
Auto-stash with descriptive message when flag used
✅ MET
Uses git stash push --include-untracked -m "WIP before issue #N" with success message
AC-3
Update error message to mention --stash option
✅ MET
Error now shows Use --stash to auto-stash, or manually: hint
AC-4
(Optional) Add interactive prompt
⏭️ DEFERRED
Intentionally deferred per issue spec (lower priority)
Coverage: 3/3 required AC items fully met
Quality Metrics
Metric
Value
Status
Type issues (any)
0
✅ OK
Deleted tests
0
✅ OK
Files changed
1
✅ OK
Lines added
+33
-
Lines deleted
-9
-
Tests
156 passed
✅ OK
Build
Successful
✅ OK
Bash syntax
Valid
✅ OK
Code Review
Strengths:
Clean argument parsing with for loop and case statement
Flexible flag position (before or after issue number) improves UX
Uses --include-untracked to capture complete working directory state
Good visual feedback with emoji and color-coded messages
Error handling via set -e ensures script exits on stash failure
Usage comments updated with new flag documentation
Issues:
None found
Suggestions:
Minor: Extra arguments beyond the first non-flag arg are silently ignored (acceptable for v1, could add validation later)
Adversarial Analysis
Scenario
Behavior
Assessment
--stash with clean working tree
No-op (stash block skipped)
✅ Correct
Multiple issue numbers
First used, rest ignored
✅ Acceptable
git stash failure
Script exits via set -e
✅ Handled
Flag position flexibility
Both orders work
✅ Verified
Verdict: AC_MET_BUT_NOT_A_PLUS
All 3 required AC items are fully implemented and code quality is high. However, script changes require execution verification before READY_FOR_MERGE.
Missing verification: The spec recommends running /verify for CLI/script features to capture actual execution output. No "Execution Verification" evidence found in issue comments.
Next Steps
Run /verify 41 --command "./templates/scripts/new-feature.sh 99 --stash" (with uncommitted changes) to verify auto-stash behavior
Alternatively: Run the script manually and confirm output matches expected behavior
After verification, re-run /qa 41 for final READY_FOR_MERGE verdict
Documentation: Before merging, run /docs 41 to generate feature documentation.
Activity
admarble commentedon Jan 9, 2026
Spec Review - Implementation Plan
Acceptance Criteria Checklist
--stashflag support tonew-feature.sh--stashoptionVerification Criteria
AC-1: Flag Parsing
--stashflag./scripts/dev/new-feature.sh 41 --stashAC-2: Auto-stash Behavior
./scripts/dev/new-feature.sh 41 --stashAC-3: Updated Error Message
--stashflag./scripts/dev/new-feature.sh 41--stashoptionImplementation Plan
Phase 1: Argument Parsing
ISSUE_NUMBER=$1(line 24)--stashflag, store inSTASH_FLAGvariablePhase 2: Modify Uncommitted Changes Check
3. Update block at lines 84-89:
STASH_FLAG=true: rungit stash push -m "WIP before issue #${ISSUE_NUMBER}"STASH_FLAG=false: show updated error with--stashhintPhase 3: Documentation
4. Update usage comment and error message to include
--stashKey Decisions
WIP before issue #NRecommended Workflow
Reasoning: Straightforward shell script change with clear AC. Verify phase for CLI output capture.
Generated by /spec workflow
admarble commentedon Jan 10, 2026
Spec Review - Updated Implementation Plan
Acceptance Criteria Checklist
--stashflag support (flexible position)--stashoptionVerification Criteria
AC-1: Flag Parsing
--stashflag (any order)./scripts/dev/new-feature.sh 41 --stashOR./scripts/dev/new-feature.sh --stash 41AC-2: Auto-stash Behavior
./scripts/dev/new-feature.sh 41 --stashWIP before issue #41git stash listshows new entryAC-3: Updated Error Message
--stashflag./scripts/dev/new-feature.sh 41Use --stash to auto-stashhintAC-4: Interactive Prompt (Optional)
--stashflag, TTY available./scripts/dev/new-feature.sh 41Stash and continue? [y/N]Assumptions to Validate
git stash push -m "message"works in git 2.13+ (standard)--include-untrackedfor complete stashImplementation Plan
Phase 1: Argument Parsing (AC-1)
ISSUE_NUMBER=$1(line 24)--stashflag from any position, store inSTASH_FLAGPhase 2: Uncommitted Changes Logic (AC-2, AC-3)
4. Modify lines 84-89:
STASH_FLAG=true: rungit stash push --include-untracked -m "WIP before issue #${ISSUE_NUMBER}"STASH_FLAG=false: show updated error with--stashhintPhase 3 (Optional): Interactive Prompt (AC-4)
5. Add TTY detection:
[ -t 0 ]6. If TTY + no flag + uncommitted changes: prompt user
7. Reference pattern:
cleanup-worktree.sh:48-53Key Decisions
WIP before issue #NVerification Summary
Recommended Workflow
Reasoning: Straightforward shell script change. Verify phase for CLI output capture.
Generated by /spec workflow
feat(#41): Add --stash flag to new-feature.sh
admarble commentedon Jan 10, 2026
Implementation Progress Update
Acceptance Criteria Status
--stashflag support (flexible position)--stashoptionImplementation Details
Changes to
templates/scripts/new-feature.sh:--stashflag in any position relative to issue number--stashis provided and uncommitted changes exist:git stash push --include-untracked -m "WIP before issue #N"Use --stash to auto-stash, or manually:Files Changed
templates/scripts/new-feature.sh(+33, -9 lines)Verification Results
npm test- 156 tests passednpm run build- TypeScript compilation successfulPR Status
Next Steps
/verifyor/qato validate CLI behavior with manual testingGenerated by /exec workflow
admarble commentedon Jan 10, 2026
QA Review for Issue #41
AC Coverage
--stashflag support (flexible position)--stashin any position relative to issue numbergit stash push --include-untracked -m "WIP before issue #N"with success message--stashoptionUse --stash to auto-stash, or manually:hintCoverage: 3/3 required AC items fully met
Quality Metrics
any)Code Review
Strengths:
forloop andcasestatement--include-untrackedto capture complete working directory stateset -eensures script exits on stash failureIssues:
Suggestions:
Adversarial Analysis
--stashwith clean working treegit stashfailureset -eVerdict:
AC_MET_BUT_NOT_A_PLUSAll 3 required AC items are fully implemented and code quality is high. However, script changes require execution verification before
READY_FOR_MERGE.Missing verification: The spec recommends running
/verifyfor CLI/script features to capture actual execution output. No "Execution Verification" evidence found in issue comments.Next Steps
/verify 41 --command "./templates/scripts/new-feature.sh 99 --stash"(with uncommitted changes) to verify auto-stash behavior/qa 41for finalREADY_FOR_MERGEverdictDocumentation: Before merging, run
/docs 41to generate feature documentation.Generated by /qa workflow
admarble commentedon Jan 10, 2026
QA Review
Branch:
feature/41-feat-add-stash-flag-to-new-feature-shCommit:
9ee1ddcAC Coverage
--stashflag support--stashCoverage: 3/3 required AC items met
Quality Metrics
Code Review
Strengths:
41 --stashor--stash 41)--include-untrackedfor complete stashVerdict:
AC_MET_BUT_NOT_A_PLUSAll AC met with quality implementation. Script changes require execution verification before merge.
Next Steps
/verify 41to capture execution output/qa 41for final verdictGenerated by /qa workflow
admarble commentedon Jan 10, 2026
Execution Verification
Feature:
--stashflag fornew-feature.shResult: ✅ Verified by human review
Tests Executed
new-feature.sh--stashin usage ✓new-feature.sh --stashnew-feature.sh 41 --stashnew-feature.sh --stash 41Execution Output (click to expand)
Usage message test:
With issue and --stash flag:
Human Confirmation:
Verified by
/verifyworkflowadmarble commentedon Jan 10, 2026
QA Review - Final ✅
Verdict:
READY_FOR_MERGEAll acceptance criteria met with quality implementation.
--stashflag supportQuality Metrics
Summary
Clean implementation with flexible argument parsing. Code follows existing patterns and is well-documented.
Next: Create PR and merge.
Generated by /qa workflow
feat(#41): Add --stash flag to new-feature.sh (#47)
feat(#41): Add --stash flag to new-feature.sh