diff --git a/fleet/allegro/allegro-cycle-state.json b/fleet/allegro/allegro-cycle-state.json index af270bb..8c9ae72 100644 --- a/fleet/allegro/allegro-cycle-state.json +++ b/fleet/allegro/allegro-cycle-state.json @@ -1,15 +1,36 @@ { "version": 1, - "last_updated": "2026-04-05T21:17:00Z", + "last_updated": "2026-04-06T15:39:58.035125+00:00", "cycles": [ { "cycle_id": "init", "started_at": "2026-04-05T21:17:00Z", + "completed_at": "2026-04-05T21:20:00Z", "target": "Epic #842: Create self-improvement infrastructure", - "status": "in_progress", - "last_completed_step": "Created wake checklist and lane definition", - "evidence": "local files: allegro-wake-checklist.md, allegro-lane.md", - "next_step": "Create hands-off registry, failure log, handoff template, validator script" + "status": "complete", + "last_completed_step": "Created wake checklist, lane definition, hands-off registry, failure log, handoff template, validator script", + "evidence": "commit e4b1a19 in branch allegro/self-improvement-infra", + "next_step": "Deploy files to ~/.hermes and create PR" + }, + { + "cycle_id": "2026-04-06-deploy", + "started_at": "2026-04-06T15:35:00Z", + "target": "Deploy Allegro self-improvement infrastructure to ~/.hermes", + "status": "complete", + "last_completed_step": "Ran install.sh, deployed files to ~/.hermes, pushed branch, merged PR #884, closed issue #884", + "evidence": "PR #884 merged, install.sh executed", + "next_step": "None \u2014 infrastructure live", + "completed_at": "2026-04-06T15:39:58.035125+00:00" + }, + { + "cycle_id": "2026-04-06-claim-deliver", + "started_at": "2026-04-06T15:39:58.035125+00:00", + "completed_at": "2026-04-06T15:39:58.035125+00:00", + "target": "Claim issue #884 and deliver PR #884", + "status": "complete", + "last_completed_step": "Assigned issue to allegro, ran install.sh, merged PR, closed issue", + "evidence": "https://forge.alexanderwhitestone.com/Timmy_Foundation/the-nexus/pulls/884", + "next_step": "None" } ] -} +} \ No newline at end of file diff --git a/fleet/allegro/burn-mode-validator.py b/fleet/allegro/burn-mode-validator.py index 015631e..252090b 100755 --- a/fleet/allegro/burn-mode-validator.py +++ b/fleet/allegro/burn-mode-validator.py @@ -10,12 +10,21 @@ import os import sys from datetime import datetime, timezone -LOG_PATH = os.path.expanduser("~/.hermes/burn-logs/allegro.log") +import glob + +LOG_DIR = os.path.expanduser("~/.hermes/burn-logs") +_dated = os.path.join(LOG_DIR, f"burn_{datetime.now(timezone.utc).strftime('%Y%m%d')}.log") +LOG_PATH = _dated if os.path.exists(_dated) else os.path.join(LOG_DIR, "allegro.log") STATE_PATH = os.path.expanduser("~/.hermes/allegro-cycle-state.json") FAILURE_LOG_PATH = os.path.expanduser("~/.hermes/allegro-failure-log.md") +def ensure_log_dir(): + os.makedirs(os.path.dirname(LOG_PATH), exist_ok=True) + + def score_cycle(): + ensure_log_dir() now = datetime.now(timezone.utc).isoformat() scores = { "state_check_completed": 0, diff --git a/fleet/allegro/install.sh b/fleet/allegro/install.sh new file mode 100644 index 0000000..a0b86cc --- /dev/null +++ b/fleet/allegro/install.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# Allegro Self-Improvement Infrastructure Installer +# Deploys operational files from the-nexus fleet/allegro/ to ~/.hermes/ +# Part of Epic #842 (M2-M7) + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +HOME_DIR="${HOME:-$(eval echo ~$(whoami))}" +TARGET_DIR="${HOME_DIR}/.hermes" +LOG_DIR="${TARGET_DIR}/burn-logs" + +echo "[install] Deploying Allegro self-improvement infrastructure..." + +mkdir -p "${TARGET_DIR}" +mkdir -p "${LOG_DIR}" + +# Copy operational files (not symlinks; these need to survive repo checkouts) +cp -v "${SCRIPT_DIR}/allegro-wake-checklist.md" "${TARGET_DIR}/" +cp -v "${SCRIPT_DIR}/allegro-lane.md" "${TARGET_DIR}/" +cp -v "${SCRIPT_DIR}/allegro-failure-log.md" "${TARGET_DIR}/" +cp -v "${SCRIPT_DIR}/allegro-handoff-template.md" "${TARGET_DIR}/" +cp -v "${SCRIPT_DIR}/allegro-hands-off-registry.json" "${TARGET_DIR}/" +cp -v "${SCRIPT_DIR}/allegro-cycle-state.json" "${TARGET_DIR}/" + +# Copy executable scripts +chmod +x "${SCRIPT_DIR}/burn-mode-validator.py" +cp -v "${SCRIPT_DIR}/burn-mode-validator.py" "${TARGET_DIR}/" + +echo "[install] Done. Files installed to ${TARGET_DIR}" +echo "[install] Run ${TARGET_DIR}/burn-mode-validator.py at the end of each cycle."