forked from joshft/correctless
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsync.sh
More file actions
executable file
·62 lines (51 loc) · 2.15 KB
/
sync.sh
File metadata and controls
executable file
·62 lines (51 loc) · 2.15 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
#!/usr/bin/env bash
# Sync source files → both plugin directories
# Run after editing files in the source directories (skills/, hooks/, templates/, helpers/)
# to propagate changes to correctless-lite/ and correctless-full/
set -euo pipefail
cd "$(dirname "${BASH_SOURCE[0]}")"
info() { echo " ✓ $*"; }
echo ""
echo "Syncing source → plugins"
echo "========================"
echo ""
# --- Hooks (shared by both) ---
cp hooks/workflow-gate.sh correctless-lite/hooks/workflow-gate.sh
cp hooks/workflow-gate.sh correctless-full/hooks/workflow-gate.sh
cp hooks/workflow-advance.sh correctless-lite/hooks/workflow-advance.sh
cp hooks/workflow-advance.sh correctless-full/hooks/workflow-advance.sh
info "Hooks → both plugins"
# --- Setup script (shared) ---
cp setup correctless-lite/setup
cp setup correctless-full/setup
chmod +x correctless-lite/setup correctless-full/setup
info "Setup script → both plugins"
# --- Shared templates ---
for tmpl in ARCHITECTURE.md AGENT_CONTEXT.md antipatterns.md workflow-config.json; do
cp "templates/$tmpl" "correctless-lite/templates/$tmpl"
cp "templates/$tmpl" "correctless-full/templates/$tmpl"
done
info "Common templates → both plugins"
# --- Full-only templates ---
for tmpl in workflow-config-full.json workflow-effectiveness.json drift-debt.json external-review-history.json; do
cp "templates/$tmpl" "correctless-full/templates/$tmpl"
done
cp -r templates/invariants/* correctless-full/templates/invariants/
info "Full-only templates → correctless-full"
# --- Full-only helpers ---
cp -r helpers/* correctless-full/helpers/
info "PBT helpers → correctless-full"
# --- Lite skills ---
for skill in csetup cspec creview ctdd cverify cdocs cstatus; do
cp "skills/$skill/SKILL.md" "correctless-lite/skills/$skill/SKILL.md"
done
info "Lite skills (7) → correctless-lite"
# --- Full skills (all) ---
for skill in csetup cspec cmodel creview-spec ctdd cverify caudit cupdate-arch cdocs cpostmortem cstatus; do
mkdir -p "correctless-full/skills/$skill"
cp "skills/$skill/SKILL.md" "correctless-full/skills/$skill/SKILL.md"
done
info "Full skills (11) → correctless-full"
echo ""
echo "Done. Verify with: git diff --stat"
echo ""