BurningTimesAi/scripts/manifest_register.sh

73 lines
2.3 KiB
Bash
Raw Normal View History

#!/bin/bash
# 매니페스트 수동 등록 — PM이 pm-auditor Task 호출 직후 명시 실행
# C35-9 Layer 3 근본 해결 2026-04-20
# Usage: bash scripts/manifest_register.sh <plan_id> <target_files_csv> <goal>
PLAN_ID="${1}"
TARGETS_CSV="${2}"
GOAL="${3}"
if [ -z "$PLAN_ID" ] || [ -z "$TARGETS_CSV" ] || [ -z "$GOAL" ]; then
cat >&2 <<EOF
Usage: bash scripts/manifest_register.sh <plan_id> <target_files_csv> <goal>
plan_id : 예) 2026-04-20_134530
target_files_csv : 쉼표 구분 파일 상대 경로 (예: scripts/x.sh,SKILL.md)
goal : 집행 목표 1줄 요약 (예: "안건 X Phase 1 집행")
근거: C35-9 Layer 3 매니페스트 기반 감사 (2026-04-20 PreToolUse 차단 전환)
EOF
exit 1
fi
feat(BT·신설): 조직 신설 Phase 1 — git 저장소 교체 + 중앙 저장소 A안 분리 PD님 2026-04-21 직접 지시 5개 중 1·2·4 이행. ## 집행 내역 1. git remote: NerdNavisAi.git → BurningTimesAi.git 교체 (BT main + 본 worktree) - E:/NerdNavisAi 레포 원격은 원상 유지 (실측 확인) 2. 중앙 저장소 A안 분리: ~/.claude/burningtimes-{live,memory,audit}/ - nerdnavis-* 중앙 저장소에서 cp -r 복사 (원본 미변경) - .junction-marker 내용 BT로 갱신 3. 본 worktree .live junction 재연결 → burningtimes-live 4. audit junction 3종 신설: .burningtimes_{auditor_calls,warning_ignored,bypass_log} 5. scripts·setup 28파일 하드코딩 일괄 치환 (nerdnavis/NerdNavis/너드나비스/NERDNAVIS → burningtimes/BurningTimes/BURNINGTIMES) 6. paths.local.json.template BT 전용 재작성 (Unity·Framework 경로 __TBD__ placeholder) 7. .gitignore: .live.bak_*/ 패턴 추가 ## 보류 항목 (PD 재논의 예정) - 3. memory/org/ 내용 초기화 (PD 지시) - 5. Unity 프로젝트 경로 (PD 신규 경로 제공 전까지) - SKILL.md·CLAUDE.md 조직명 전환 및 P17·P29 처리 - 프로젝트/수상한잡화점/ 등 수상한잡화점 관련 일괄 정리 - 코어코드/NerdNavis.Framework/ → BT-프레임워크 이름 전환 - 공유/조직공지/ 너드나비스 맥락 공지 처리 - .claude/agents/*.md frontmatter skills 참조명 ## 감사 pm-auditor 사전 감사 통과 (Critical 0건, Major 2건 commit 전 정정 완료). 매니페스트: bt-org-split-phase1 (C35-9 PreToolUse 차단 해제). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 15:14:51 +00:00
MANIFEST_DIR="$HOME/.claude/burningtimes-audit/manifest/active"
mkdir -p "$MANIFEST_DIR" 2>/dev/null
MANIFEST="$MANIFEST_DIR/$PLAN_ID.md"
HOSTNAME_TAG=$(hostname 2>/dev/null | tr -d '[:space:]' | tr -cd '[:alnum:]-_' | head -c 32)
# YAML frontmatter + 본문
{
echo "---"
echo "plan_id: $PLAN_ID"
echo "created_at: $(date -Iseconds 2>/dev/null || date +%Y-%m-%dT%H:%M:%S)"
echo "hostname: ${HOSTNAME_TAG:-unknown}"
echo "goal: \"$GOAL\""
echo "target_files:"
IFS=',' read -ra FILES <<< "$TARGETS_CSV"
for f in "${FILES[@]}"; do
# 공백 제거
f=$(echo "$f" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
echo " - $f"
done
echo "completion_criteria: \"commit + push 완료 후 post-commit hook archived 이동\""
echo "---"
echo ""
echo "# 매니페스트 — $PLAN_ID"
echo ""
echo "- **등록 시각**: $(date -Iseconds 2>/dev/null || date)"
echo "- **호스트**: ${HOSTNAME_TAG:-unknown}"
echo "- **집행 목표**: $GOAL"
echo ""
echo "## 대상 파일"
for f in "${FILES[@]}"; do
f=$(echo "$f" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
echo "- \`$f\`"
done
echo ""
echo "## 완료 기준"
echo ""
echo "commit + push 완료. post-commit hook이 \`archived/$PLAN_ID.md\`로 자동 이동 + target_files cross-check."
} > "$MANIFEST"
echo "✅ 매니페스트 등록 완료"
echo " 경로: $MANIFEST"
echo " plan_id: $PLAN_ID"
echo " target_files: ${#FILES[@]}"
echo " 해제: 본 매니페스트 target_files 범위 내 Edit/Write 자동 통과"
echo ""
echo "📌 본 집행 완료 (commit + push) 후 매니페스트는 자동 archived 이동"
exit 0