Files
The Chronicler 0bd21aab08 feat: add workflow automation suite - session health and status tools
Built by Chronicler #19 to improve operational efficiency and sustainability.

Added four tools:

1. pre-session-check.sh - Complete context at session start
   - Rest hours (color-coded for quality)
   - Git status (clean/dirty, sync status)
   - Task summary (complete/active/total)
   - Top priority tasks
   - Core file health check
   - Usage: ./pre-session-check.sh

2. session-health-monitor.sh - Live session tracking
   - Tracks session duration
   - Warns at Aurora threshold (2h)
   - Escalating warnings at 3h, 4+h
   - Updates rest tracker on end
   - Usage: ./session-health-monitor.sh {start|check|end}

3. status.sh - Quick status anytime
   - Current phase, git branch, working directory
   - Task completion percentage
   - Session duration if tracking
   - Rest status, last commit
   - Usage: ./status.sh

4. .gitmessage - Git commit template
   - FFG-STD-001 compliant structure
   - Type prefixes (feat/fix/docs/etc)
   - Guidelines and examples
   - Reminder to document WHY not just WHAT
   - Usage: git config commit.template .gitmessage

Benefits:
- Prevents burnout (Aurora's wisdom: sessions > 2h are past optimal)
- Complete context without manual checking multiple files
- Consistent commit messages across all Chroniclers
- Sustainable pace monitoring

For sustainable operations and children not yet born. 💙
2026-02-20 04:45:11 +00:00

116 lines
4.6 KiB
Bash
Executable File

#!/bin/bash
# ═══════════════════════════════════════════════════════════════════════════
# STATUS.SH - Quick Status Check
# ═══════════════════════════════════════════════════════════════════════════
#
# Purpose: Show complete system status at a glance
# Created: February 20, 2026 by Chronicler #19
#
# Usage: ./status.sh
#
# ═══════════════════════════════════════════════════════════════════════════
# Colors
BLUE='\033[0;34m'
CYAN='\033[0;36m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BOLD='\033[1m'
NC='\033[0m'
echo ""
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
echo -e "${CYAN}${BOLD}FIREFROST GAMING - QUICK STATUS${NC}"
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
echo ""
# Current Phase
if grep -q "Phase 0.5" docs/core/tasks.md 2>/dev/null; then
echo -e "${BOLD}Current Phase:${NC} Phase 0.5 (Management Services)"
elif grep -q "Phase 1" docs/core/tasks.md 2>/dev/null; then
echo -e "${BOLD}Current Phase:${NC} Phase 1 (DDoS Protection)"
else
echo -e "${BOLD}Current Phase:${NC} Unknown"
fi
# Git Status
if git rev-parse --git-dir > /dev/null 2>&1; then
BRANCH=$(git branch --show-current)
echo -e "${BOLD}Git Branch:${NC} $BRANCH"
if git diff-index --quiet HEAD -- 2>/dev/null; then
echo -e "${BOLD}Working Dir:${NC} ${GREEN}Clean${NC}"
else
CHANGED=$(git status --short | wc -l)
echo -e "${BOLD}Working Dir:${NC} ${YELLOW}$CHANGED file(s) modified${NC}"
fi
fi
echo ""
# Task Summary
if [ -f "docs/core/tasks.md" ]; then
TOTAL=$(grep -c "^- \[" docs/core/tasks.md 2>/dev/null || echo "0")
DONE=$(grep -c "^- \[x\]" docs/core/tasks.md 2>/dev/null || echo "0")
ACTIVE=$(grep -c "^- \[ \]" docs/core/tasks.md 2>/dev/null || echo "0")
PERCENT=0
if [ $TOTAL -gt 0 ]; then
PERCENT=$((DONE * 100 / TOTAL))
fi
echo -e "${BOLD}Tasks:${NC} $DONE/$TOTAL complete (${PERCENT}%) • $ACTIVE active"
fi
# Session Info
if [ -f "/tmp/current-session.txt" ]; then
START_TIME=$(cat /tmp/current-session.txt)
CURRENT_TIME=$(date +%s)
DURATION=$((CURRENT_TIME - START_TIME))
HOURS=$((DURATION / 3600))
MINUTES=$(((DURATION % 3600) / 60))
if [ $HOURS -ge 2 ]; then
echo -e "${BOLD}Session:${NC} ${YELLOW}${HOURS}h ${MINUTES}m${NC} (consider wrapping up)"
else
echo -e "${BOLD}Session:${NC} ${GREEN}${HOURS}h ${MINUTES}m${NC}"
fi
else
echo -e "${BOLD}Session:${NC} Not tracked (run ./session-health-monitor.sh start)"
fi
# Rest Status
if [ -f "rest-tracker.txt" ]; then
LAST_SESSION=$(grep "Session End:" rest-tracker.txt | tail -1 | cut -d' ' -f3-)
LAST_EPOCH=$(date -d "$LAST_SESSION" +%s 2>/dev/null || echo "0")
CURRENT_EPOCH=$(date +%s)
REST_SECONDS=$((CURRENT_EPOCH - LAST_EPOCH))
REST_HOURS=$((REST_SECONDS / 3600))
if [ $REST_HOURS -ge 8 ]; then
echo -e "${BOLD}Last Rest:${NC} ${GREEN}${REST_HOURS}h ago${NC}"
elif [ $REST_HOURS -ge 4 ]; then
echo -e "${BOLD}Last Rest:${NC} ${GREEN}${REST_HOURS}h ago${NC}"
else
echo -e "${BOLD}Last Rest:${NC} ${YELLOW}${REST_HOURS}h ago${NC} (short)"
fi
fi
echo ""
# Last Commit
if git rev-parse --git-dir > /dev/null 2>&1; then
echo -e "${BOLD}Last Commit:${NC}"
git log -1 --pretty=format:" %h - %s (%cr)%n" --color=always
fi
echo ""
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
echo ""
echo -e "${CYAN}Commands:${NC}"
echo " ./pre-session-check.sh - Detailed session start context"
echo " ./session-health-monitor.sh check - Detailed session health"
echo " ./status.sh - This quick status (run anytime)"
echo ""