Skip to content

feat(06): polish and harden — donna-tools CLI, UAT gate, docs, tool learning, bootstrap refactor #6

feat(06): polish and harden — donna-tools CLI, UAT gate, docs, tool learning, bootstrap refactor

feat(06): polish and harden — donna-tools CLI, UAT gate, docs, tool learning, bootstrap refactor #6

Workflow file for this run

name: UAT Gate
on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, labeled, unlabeled]
permissions:
contents: read
pull-requests: read
jobs:
uat-gate:
name: UAT
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Extract phase number from branch
id: phase
run: |
BRANCH="${{ github.head_ref }}"
# Extract phase number from branch name (e.g., gsd/phase-06-... → 06)
PHASE_NUM=$(echo "$BRANCH" | sed -n 's|^gsd/phase-\([0-9]\{2,\}\)-.*|\1|p')
if [ -z "$PHASE_NUM" ]; then
echo "Could not extract phase number from branch: $BRANCH"
echo "Expected format: gsd/phase-XX-..."
exit 1
fi
echo "phase_num=$PHASE_NUM" >> "$GITHUB_OUTPUT"
echo "Phase: $PHASE_NUM"
- name: Check UAT completion
run: |
PHASE_NUM="${{ steps.phase.outputs.phase_num }}"
# Find UAT files for this phase only (HUMAN-UAT and RETEST-UAT)
PHASE_DIR=$(find .planning/phases -maxdepth 1 -type d -name "${PHASE_NUM}-*" | head -1)
if [ -z "$PHASE_DIR" ]; then
echo "No phase directory found for phase $PHASE_NUM"
exit 1
fi
UAT_FILES=$(find "$PHASE_DIR" -name "*-HUMAN-UAT.md" -o -name "*-RETEST-UAT.md" 2>/dev/null | sort)
if [ -z "$UAT_FILES" ]; then
echo "No UAT files found in $PHASE_DIR"
echo "Complete human UAT with /gsd:verify-work before merging."
exit 1
fi
# Use the latest UAT file (last in sorted order)
LATEST=$(echo "$UAT_FILES" | tail -1)
STATUS=$(head -10 "$LATEST" | grep '^status:' | awk '{print $2}')
ISSUES=$(grep '^issues:' "$LATEST" | head -1 | awk '{print $2}')
echo "Checking: $LATEST — status: $STATUS, issues: ${ISSUES:-unknown}"
if [ "$STATUS" != "complete" ]; then
echo "FAIL: status is not complete"
echo "Run /gsd:verify-work to complete UAT."
exit 1
fi
if [ "${ISSUES:-1}" != "0" ]; then
echo "FAIL: latest UAT found $ISSUES issue(s) — retest needed after fixes"
echo "Run /gsd:verify-work to retest."
exit 1
fi
echo ""
echo "Phase $PHASE_NUM UAT passed: status complete, 0 issues."