Repository navigation
Expand file tree
/
Copy pathaudit_modules.sh
More file actions
executable file
·74 lines (63 loc) · 1.92 KB
/
Copy pathaudit_modules.sh
File metadata and controls
executable file
·74 lines (63 loc) · 1.92 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
#!/usr/bin/env bash
# Audit script for Active Inference 401: Advanced PhD Seminar
# Verifies structural completeness of all modules.
set -euo pipefail
PASS=0; FAIL=0; WARN=0
check_file() {
if [ -f "$1" ]; then
PASS=$((PASS + 1))
else
echo " FAIL: Missing $1"
FAIL=$((FAIL + 1))
fi
}
check_module() {
local dir="$1"
for f in module.md questions.md practice_quiz.md lab.md dashboard.html README.md AGENTS.md; do
check_file "$dir/$f"
done
}
check_course() {
local course_dir="$1"
local course_name="$2"
echo "--- Course: $course_name ---"
check_file "$course_dir/README.md"
check_file "$course_dir/AGENTS.md"
check_file "$course_dir/syllabus.md"
for mod_dir in "$course_dir"/[0-9][0-9]_*/; do
[ -d "$mod_dir" ] && check_module "$mod_dir"
done
}
echo "=== Active Inference 401: Advanced PhD Seminar Audit ==="
echo ""
echo "--- Root-level files ---"
check_file "README.md"
check_file "OVERVIEW.md"
check_file "AGENTS.md"
echo "--- Resource files ---"
for f in glossary.md notation_table.md references.md cross_course_map.md learning_pathways.md faq.md README.md AGENTS.md; do
check_file "resources/$f"
done
check_course "01_philosophical_foundations" "Philosophical Foundations"
check_course "02_neuroscientific_frontiers" "Neuroscientific Frontiers"
check_course "03_advanced_theory" "Advanced Theory"
check_course "04_research_methods" "Research Methods"
echo ""
echo "--- Placeholder Check ---"
if grep -r "\[TODO\]\|\[PLACEHOLDER\]\|TBD\|FIXME" --include="*.md" . 2>/dev/null | grep -v AGENTS.md | grep -v audit_modules.sh; then
echo " WARN: Placeholders found!"
WARN=$((WARN + 1))
else
echo " No placeholders found (excluding guidelines)."
fi
echo ""
echo "=== Audit Summary ==="
echo " PASS: $PASS"
echo " FAIL: $FAIL"
echo " WARN: $WARN"
if [ $FAIL -eq 0 ]; then
echo " STATUS: PASSED"
else
echo " STATUS: FAILED"
exit 1
fi