-
Notifications
You must be signed in to change notification settings - Fork 3
148 lines (127 loc) Β· 6 KB
/
Copy pathvalidate.yml
File metadata and controls
148 lines (127 loc) Β· 6 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: Plugin Validation
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate-counts:
name: Validate Component Counts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Count components
run: |
echo "## Component Count Validation" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
AGENTS=$(ls aura-frog/agents/*.md 2>/dev/null | grep -v README | wc -l | tr -d ' ')
SKILLS=$(ls -d aura-frog/skills/*/SKILL.md 2>/dev/null | wc -l | tr -d ' ')
COMMANDS=$(find aura-frog/commands -name '*.md' ! -name 'README.md' | wc -l | tr -d ' ')
RULES=$(find aura-frog/rules -name '*.md' ! -name 'README.md' | wc -l | tr -d ' ')
HOOKS=$(ls aura-frog/hooks/*.cjs 2>/dev/null | wc -l | tr -d ' ')
echo "| Component | Count |" >> $GITHUB_STEP_SUMMARY
echo "|-----------|-------|" >> $GITHUB_STEP_SUMMARY
echo "| Agents | $AGENTS |" >> $GITHUB_STEP_SUMMARY
echo "| Skills | $SKILLS |" >> $GITHUB_STEP_SUMMARY
echo "| Commands | $COMMANDS |" >> $GITHUB_STEP_SUMMARY
echo "| Rules | $RULES |" >> $GITHUB_STEP_SUMMARY
echo "| Hooks | $HOOKS |" >> $GITHUB_STEP_SUMMARY
# Verify expected counts from plugin.json
DESC=$(grep '"description"' aura-frog/.claude-plugin/plugin.json)
# plugin.json description uses "15 agents" not "15 specialized agents" β fixed in v3.7.2.
EXPECTED_AGENTS=$(echo "$DESC" | grep -oP '\d+ agents' | grep -oP '\d+' | head -1)
EXPECTED_SKILLS=$(echo "$DESC" | grep -oP '\d+ skills' | grep -oP '\d+' | head -1)
EXPECTED_COMMANDS=$(echo "$DESC" | grep -oP '\d+ commands' | grep -oP '\d+' | head -1)
EXPECTED_HOOKS=$(echo "$DESC" | grep -oP '\d+ hooks' | grep -oP '\d+' | head -1)
EXPECTED_RULES=$(echo "$DESC" | grep -oP '\d+ rules' | grep -oP '\d+' | head -1)
PASS=true
[ "$AGENTS" != "$EXPECTED_AGENTS" ] && echo "β Agents: expected $EXPECTED_AGENTS, got $AGENTS" && PASS=false
[ "$SKILLS" != "$EXPECTED_SKILLS" ] && echo "β Skills: expected $EXPECTED_SKILLS, got $SKILLS" && PASS=false
[ "$COMMANDS" != "$EXPECTED_COMMANDS" ] && echo "β Commands: expected $EXPECTED_COMMANDS, got $COMMANDS" && PASS=false
[ "$HOOKS" != "$EXPECTED_HOOKS" ] && echo "β Hooks: expected $EXPECTED_HOOKS, got $HOOKS" && PASS=false
[ "$RULES" != "$EXPECTED_RULES" ] && echo "β Rules: expected $EXPECTED_RULES, got $RULES" && PASS=false
if [ "$PASS" = true ]; then
echo "" >> $GITHUB_STEP_SUMMARY
echo "β
All counts match plugin.json" >> $GITHUB_STEP_SUMMARY
else
echo "" >> $GITHUB_STEP_SUMMARY
echo "β Count mismatch detected" >> $GITHUB_STEP_SUMMARY
exit 1
fi
validate-hooks:
name: Validate Hook Syntax
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Check hook syntax
run: |
echo "## Hook Syntax Validation" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
PASS=true
for hook in aura-frog/hooks/*.cjs aura-frog/hooks/lib/*.cjs; do
[ ! -f "$hook" ] && continue
name=$(basename "$hook")
if node --check "$hook" 2>/dev/null; then
echo "β
$name" >> $GITHUB_STEP_SUMMARY
else
echo "β $name β syntax error" >> $GITHUB_STEP_SUMMARY
PASS=false
fi
done
[ "$PASS" = false ] && exit 1
echo "" >> $GITHUB_STEP_SUMMARY
echo "All hooks parse successfully" >> $GITHUB_STEP_SUMMARY
- name: "Check hook parity (Fires: header vs hooks.json registration)"
run: node aura-frog/scripts/ci/validate-hook-parity.cjs
validate-structure:
name: Validate File Structure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check key files exist
run: |
echo "## File Structure Validation" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
PASS=true
check_exists() {
if [ -e "$1" ]; then
echo "β
$1" >> $GITHUB_STEP_SUMMARY
else
echo "β $1 β MISSING" >> $GITHUB_STEP_SUMMARY
PASS=false
fi
}
# File-structure spot check (v3.7.2): point at files that actually
# exist on the current tree. Routing-related deletions/renames since
# earlier versions: router.md removed (agent-detector skill owns
# routing); workflow-orchestrator β run-orchestrator (renamed);
# CHANGELOG.md lives at docs/reference/, not aura-frog/.
check_exists "aura-frog/.claude-plugin/plugin.json"
check_exists "aura-frog/CLAUDE.md"
check_exists "docs/reference/CHANGELOG.md"
check_exists "aura-frog/hooks/hooks.json"
check_exists "aura-frog/rules/core/"
check_exists "aura-frog/rules/agent/"
check_exists "aura-frog/rules/workflow/"
check_exists "aura-frog/agents/lead.md"
check_exists "aura-frog/skills/agent-detector/SKILL.md"
check_exists "aura-frog/skills/run-orchestrator/SKILL.md"
check_exists "aura-frog/skills/plan-orchestrator/SKILL.md"
check_exists "aura-frog/.mcp.json"
[ "$PASS" = false ] && exit 1
echo "" >> $GITHUB_STEP_SUMMARY
echo "All key files present" >> $GITHUB_STEP_SUMMARY
performance-report:
name: Performance Report
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run performance measurement
run: |
echo "## Performance Report" >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY
bash aura-frog/scripts/measure-performance.sh >> $GITHUB_STEP_SUMMARY
echo '```' >> $GITHUB_STEP_SUMMARY