-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathResetAG.sh
More file actions
90 lines (80 loc) 路 2.64 KB
/
Copy pathResetAG.sh
File metadata and controls
90 lines (80 loc) 路 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash
# [AGENTS-MD] Protocol Reset Tool (ResetAG)
# Purpose: Unlock the project and force re-initialization WITHOUT deleting the framework.
echo "========================================================"
echo " AGENTS-MD PROTOCOL RESET TOOL (v7.5 Refined)"
echo "========================================================"
echo ""
echo "[!] WARNING: This will reset project-specific configurations."
echo " Core framework directories (bmad, .agents) are preserved."
echo ""
# 1. Remove governance and status markers
echo "[1/3] Clearing state markers..."
if [ -f "PROJECT_STATUS.md" ]; then
rm "PROJECT_STATUS.md"
echo "[OK] Removed PROJECT_STATUS.md"
fi
if [ -f "sprint-status.yaml" ]; then
rm "sprint-status.yaml"
echo "[OK] Removed sprint-status.yaml"
fi
if [ -f "USER_PROFILE.md" ]; then
rm "USER_PROFILE.md"
echo "[OK] Removed USER_PROFILE.md"
fi
if [ -f ".ag_env_verified" ]; then
rm ".ag_env_verified"
echo "[OK] Invalidated environment verification"
fi
if [ -d ".git" ]; then
rm -rf ".git"
echo "[OK] Removed .git directory (for clean distribution)"
fi
# 2. Clear project-specific configurations
echo "[2/3] Resetting configurations..."
if [ -f "bmad/bmm/config.yaml" ]; then
rm "bmad/bmm/config.yaml"
echo "[OK] Reset BMAD BMM config"
fi
if [ -f "bmad/core/config.yaml" ]; then
rm "bmad/core/config.yaml"
echo "[OK] Reset BMAD Core config"
fi
if [ -d "_bmad-output" ]; then
rm -rf "_bmad-output"
echo "[OK] Cleaned up runtime output directory"
fi
# 3. Forced Context Logic
echo "[3/3] Forcing protocol re-indexing..."
if [ -f "AGENTS.md" ]; then
touch "AGENTS.md"
echo "[OK] Updated AGENTS.md timestamp"
fi
# 4. Distribution Mode (Optional)
echo ""
read -p "[?] Prepare for new distribution? (Reset CHANGELOG history) (y/N): " dist_mode
if [[ "$dist_mode" =~ ^[Yy]$ ]]; then
echo "[4/4] Resetting CHANGELOG.md..."
if [ -f "CHANGELOG.md" ]; then
rm "CHANGELOG.md"
echo "[OK] Deleted old CHANGELOG"
fi
cat <<EOF > CHANGELOG.md
# CHANGELOG
## Project Initialized
- chore: Project initialized for distribution.
EOF
echo "[OK] Created fresh CHANGELOG.md"
fi
echo ""
echo "========================================================"
echo "[SUCCESS] Project state reset."
echo ""
echo "[NEXT STEP] To re-initialize the project, run:"
echo " ./setup.sh"
echo ""
echo "Or manually edit PROJECT_STATUS.md to set your governance mode."
echo ""
echo "[INFO] After initialization, you can start working with the AI."
echo "========================================================"
echo ""