feat(phased-execution): push each phase commit after it is made

The harness now pushes the phase commit right after committing it
(PHASE_PUSH=1 default, new push_phase in lib.sh): upstream when set,
else 'git push -u <first remote> <branch>'; no remote = skip with a
notice. A push failure keeps the commit local, prints the same loud
ERROR contract as a commit failure, and stops the run — the next
phase's push sweeps the unpushed commit in. PHASE_PUSH=0 opts out with
a loud notice. SKILL.md (Commits + config table + exit codes) and the
executor prompts document the new behavior.
This commit is contained in:
2026-09-10 07:56:30 -04:00
parent f6cbb2d664
commit b88fbaec62
8 changed files with 80 additions and 22 deletions
+2 -2
View File
@@ -11,7 +11,7 @@
# run-phase.sh 03_api.md # a legacy single-file phase
#
# Env: see SKILL.md (MAX_FIX_ATTEMPTS, PHASE_MODEL, PHASE_THINKING,
# PHASE_COMMIT, PI_TRUST, FRESH_FIX).
# PHASE_COMMIT, PHASE_PUSH, PI_TRUST, FRESH_FIX).
set -uo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/lib.sh"
@@ -45,7 +45,7 @@ while unit="$(phase_next_unit "$phase")"; do
done
if (( failed )); then
# execute_unit printed the failure detail (task failure: errors, logs,
# resume command — or phase-commit failure: the hand-fix command).
# resume command — or phase commit/push failure: the hand-fix command).
echo "✗ ERROR: phase $phase did not complete — see the error output above" >&2
exit 1
fi