feat(scripts): implement eod argument in daily-routine.sh
- Integrated maintenance.sh into the end-of-day protocol. - Added hygiene and documentation checklists to EOD workflow. - Updated daily-routine.sh with morning and evening phases.
This commit is contained in:
@@ -7,6 +7,7 @@ set -euo pipefail
|
||||
mkdir -p "$HOME/logs" 2>/dev/null || true
|
||||
LOCAL_LOG="$HOME/logs/daily-routine-$(date +%Y%m%d).log"
|
||||
HEALTH_SCRIPT="$(dirname "$0")/morning-health-check.sh"
|
||||
MAINTENANCE_SCRIPT="$(dirname "$0")/maintenance.sh"
|
||||
WORKSPACE="$HOME/internal/mw-pfeddersheim-workstation"
|
||||
|
||||
# ANSI colors
|
||||
@@ -125,6 +126,45 @@ phase_7_launch() {
|
||||
log " 3. FIRST ACTION: Write ONE thing that proves work has started (e.g., 1 failing test)."
|
||||
}
|
||||
|
||||
# --- EOD Protocol Phases ---
|
||||
|
||||
eod_hygiene_git() {
|
||||
phase_header "EOD-1" "Git, Hygiene & Verification"
|
||||
log "Git status:"
|
||||
git -C "$WORKSPACE" status --short || log "${RED} Git status failed${NC}"
|
||||
|
||||
log "\nChecking for large untracked files..."
|
||||
find "$WORKSPACE" -maxdepth 2 -not -path '*/.*' -size +10M -ls || true
|
||||
|
||||
log "\nValidation Checklist:"
|
||||
log " [ ] Tests passed (run manually if needed)"
|
||||
log " [ ] No temporary files or logs left behind"
|
||||
log " [ ] Work committed (including WIP if necessary)"
|
||||
}
|
||||
|
||||
eod_knowledge_documentation() {
|
||||
phase_header "EOD-2" "Knowledge & Documentation"
|
||||
log "Documentation Checklist:"
|
||||
log " [ ] README updated with major achievements"
|
||||
log " [ ] CHANGELOG updated"
|
||||
log " [ ] NEXT_STEPS.md updated for tomorrow"
|
||||
log " [ ] Learnings captured in docs/learnings/"
|
||||
}
|
||||
|
||||
eod_ops_automation() {
|
||||
phase_header "EOD-3" "Ops & Automation"
|
||||
log "Running system maintenance..."
|
||||
if [ -x "$MAINTENANCE_SCRIPT" ]; then
|
||||
bash "$MAINTENANCE_SCRIPT" | tee -a "$LOCAL_LOG"
|
||||
else
|
||||
log "${YELLOW}WARNING: Maintenance script not found or not executable${NC}"
|
||||
fi
|
||||
|
||||
log "\nFinal Ops Checklist:"
|
||||
log " [ ] Services stopped"
|
||||
log " [ ] Docker pruned (via maintenance.sh)"
|
||||
}
|
||||
|
||||
# Command line interface
|
||||
case "${1:-morning}" in
|
||||
"health")
|
||||
@@ -147,8 +187,15 @@ case "${1:-morning}" in
|
||||
phase_7_launch
|
||||
log "\n--- Full Morning Protocol Finished $(date) ---"
|
||||
;;
|
||||
"eod")
|
||||
log "--- Starting End of Day Protocol $(date) ---"
|
||||
eod_hygiene_git
|
||||
eod_knowledge_documentation
|
||||
eod_ops_automation
|
||||
log "\n--- End of Day Protocol Finished $(date) ---"
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {health|morning|morning-full}"
|
||||
echo "Usage: $0 {health|morning|morning-full|eod}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
Reference in New Issue
Block a user