infra(allegro): deploy installer and update cycle state for #845
Some checks failed
CI / validate (pull_request) Failing after 13s

- Add install.sh to copy self-improvement files to ~/.hermes/
- Update allegro-cycle-state.json: mark init cycle complete, start deploy cycle
- Fix burn-mode-validator.py to auto-create burn-logs directory
- Install executed; files now live in /root/.hermes/

Refs #845 #842
This commit is contained in:
Allegro (Burn Mode)
2026-04-06 15:33:21 +00:00
parent 6df57dcec0
commit 56d4d58cb3
3 changed files with 55 additions and 5 deletions

View File

@@ -1,15 +1,25 @@
{
"version": 1,
"last_updated": "2026-04-05T21:17:00Z",
"last_updated": "2026-04-06T15:35:00Z",
"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": "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": "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"
"last_completed_step": "Created install.sh and updated cycle state",
"evidence": "fleet/allegro/install.sh, fleet/allegro/allegro-cycle-state.json",
"next_step": "Run install.sh, commit, push branch, create PR, update Gitea issue #845"
}
]
}

View File

@@ -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,

31
fleet/allegro/install.sh Normal file
View File

@@ -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."