Files
his/.harness/init.sh
zhaoyun 1396e4b4d2 feat(harness): integrate walkinglabs 5-subsystem model with templates
- Add .harness/ directory with 6 templates:
  init.sh (unified startup entry)
  PROGRESS.md (session progress tracking)
  feature_list.json (machine-readable feature status)
  clean-state-checklist.md (end-of-session cleanup)
  session-handoff.md (cross-session handoff)
  evaluator-rubric.md (review scoring)
- Update AGENTS.md: 5-subsystem model (Instruction/Tools/Environment/State/Feedback)
- Add Init-Plan-Implement-Verify-Cleanup workflow cycle
2026-05-28 15:05:20 +08:00

44 lines
1.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Harness Init — 统一启动与验证入口
# 每次新会话开始前运行
set -euo pipefail
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "$ROOT_DIR"
echo "==> 当前目录: $PWD"
echo "==> Git 状态"
git status --short 2>/dev/null || true
git log --oneline -3 2>/dev/null || true
echo ""
echo "==> 编译检查"
cd openhis-server-new
mvn compile -pl openhis-application -am -q 2>/dev/null && echo " ✅ 编译通过" || echo " ❌ 编译失败"
echo ""
echo "==> 读取进度"
if [ -f .harness/PROGRESS.md ]; then
head -20 .harness/PROGRESS.md
else
echo " (无进度文件)"
fi
echo ""
echo "==> 读取功能清单"
if [ -f .harness/feature_list.json ]; then
python3 -c "
import json
with open('.harness/feature_list.json') as f:
data = json.load(f)
features = [f for f in data.get('features', []) if f.get('status') == 'in_progress']
if features:
print(f\" 当前进行中: {features[0].get('title', 'unknown')}\")
else:
print(' 当前无进行中的功能')
" 2>/dev/null || echo " (无法解析)"
fi
echo ""
echo "==> 环境就绪 ✅"