-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify.sh
More file actions
executable file
·228 lines (208 loc) · 6.26 KB
/
verify.sh
File metadata and controls
executable file
·228 lines (208 loc) · 6.26 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
#!/bin/bash
# SpecOps Verification Script
# Checks that all required files are present and valid
set -e
echo "SpecOps Verification"
echo "==========================="
echo ""
ERRORS=0
WARNINGS=0
# Check function
check_file() {
if [ -f "$1" ]; then
echo " OK: $1"
else
echo " MISSING: $1"
ERRORS=$((ERRORS + 1))
fi
}
check_dir() {
if [ -d "$1" ]; then
echo " OK: $1/"
else
echo " MISSING: $1/"
ERRORS=$((ERRORS + 1))
fi
}
# Check core files
echo "Core Files:"
check_file "README.md"
check_file "QUICKSTART.md"
check_file "docs/TEAM_GUIDE.md"
check_file "CHANGELOG.md"
check_file "docs/REFERENCE.md"
check_file "docs/STRUCTURE.md"
check_file "LICENSE"
check_file ".gitignore"
check_file "schema.json"
check_file "setup.sh"
check_file "verify.sh"
check_file "scripts/bump-version.sh"
check_file "scripts/remote-install.sh"
check_file "scripts/install-hooks.sh"
echo ""
# Check git hooks
echo "Git Hooks:"
check_dir "hooks"
check_file "hooks/pre-commit"
check_file "hooks/pre-push"
echo ""
# Check core modules
echo "Core Modules:"
check_dir "core"
check_file "core/workflow.md"
check_file "core/safety.md"
check_file "core/simplicity.md"
check_file "core/data-handling.md"
check_file "core/verticals.md"
check_file "core/custom-templates.md"
check_file "core/config-handling.md"
check_file "core/error-handling.md"
check_file "core/update.md"
check_file "core/tool-abstraction.md"
check_dir "core/templates"
check_file "core/templates/feature-requirements.md"
check_file "core/templates/bugfix.md"
check_file "core/templates/refactor.md"
check_file "core/templates/design.md"
check_file "core/templates/tasks.md"
check_file "core/templates/implementation.md"
echo ""
# Check build system
echo "Build System:"
check_dir "generator"
check_file "generator/generate.py"
check_file "generator/validate.py"
check_dir "generator/templates"
check_file "generator/templates/claude.j2"
check_file "generator/templates/cursor.j2"
check_file "generator/templates/codex.j2"
check_file "generator/templates/copilot.j2"
echo ""
# Check platform adapters
echo "Platform Adapters:"
for platform in claude cursor codex copilot; do
check_dir "platforms/$platform"
check_file "platforms/$platform/platform.json"
check_file "platforms/$platform/install.sh"
check_file "platforms/$platform/README.md"
done
check_file "platforms/claude/SKILL.md"
check_file "platforms/cursor/specops.mdc"
check_file "platforms/codex/SKILL.md"
check_file "platforms/copilot/specops.instructions.md"
echo ""
# Check plugin manifests
echo "Plugin Manifests:"
check_dir ".claude-plugin"
check_file ".claude-plugin/plugin.json"
check_file ".claude-plugin/marketplace.json"
echo ""
# Check skills directory (plugin + legacy)
echo "Skills Directory:"
check_dir "skills"
check_dir "skills/specops"
check_file "skills/specops/SKILL.md"
echo ""
# Check examples directory
echo "Examples Directory:"
check_dir "examples"
check_file "examples/.specops.json"
check_file "examples/.specops.minimal.json"
check_file "examples/.specops.full.json"
check_file "examples/.specops.review.json"
check_file "examples/.specops.builder.json"
check_file "examples/.specops.solo-review.json"
check_dir "examples/specs"
check_dir "examples/specs/feature-user-authentication"
check_file "examples/specs/feature-user-authentication/requirements.md"
check_file "examples/specs/feature-user-authentication/design.md"
check_file "examples/specs/feature-user-authentication/tasks.md"
check_file "examples/specs/feature-user-authentication/implementation.md"
check_dir "examples/specs/feature-dark-mode-toggle"
check_dir "examples/specs/feature-k8s-autoscaling"
check_dir "examples/specs/feature-user-activity-pipeline"
check_dir "examples/specs/feature-date-utils-library"
echo ""
# Check example templates
echo "Example Templates:"
check_dir "examples/templates"
check_file "examples/templates/infra-requirements.md"
check_file "examples/templates/infra-design.md"
check_file "examples/templates/data-pipeline-requirements.md"
check_file "examples/templates/data-pipeline-design.md"
check_file "examples/templates/library-requirements.md"
check_file "examples/templates/library-design.md"
echo ""
# Validate JSON files
echo "JSON Validation:"
json_files=(
schema.json
"examples/.specops.json"
"examples/.specops.minimal.json"
"examples/.specops.full.json"
platforms/claude/platform.json
platforms/cursor/platform.json
platforms/codex/platform.json
platforms/copilot/platform.json
".claude-plugin/plugin.json"
".claude-plugin/marketplace.json"
)
for json_file in "${json_files[@]}"; do
if [ -f "$json_file" ]; then
if python3 -c "import json; json.load(open('$json_file'))" 2>/dev/null; then
echo " OK: $json_file (valid JSON)"
else
echo " FAIL: $json_file (invalid JSON)"
ERRORS=$((ERRORS + 1))
fi
fi
done
echo ""
# Check file permissions
echo "File Permissions:"
for script in setup.sh verify.sh scripts/bump-version.sh scripts/remote-install.sh platforms/claude/install.sh platforms/cursor/install.sh platforms/codex/install.sh platforms/copilot/install.sh; do
if [ -f "$script" ]; then
if [ -x "$script" ]; then
echo " OK: $script is executable"
else
echo " WARN: $script is not executable (run: chmod +x $script)"
WARNINGS=$((WARNINGS + 1))
fi
fi
done
echo ""
# Run build validation if generated files exist
echo "Build Validation:"
if [ -f "platforms/claude/SKILL.md" ] && [ -f "platforms/cursor/specops.mdc" ] && [ -f "platforms/codex/SKILL.md" ] && [ -f "platforms/copilot/specops.instructions.md" ]; then
if python3 generator/validate.py 2>/dev/null; then
echo " OK: All platform outputs validated"
else
echo " FAIL: Platform output validation failed"
ERRORS=$((ERRORS + 1))
fi
else
echo " SKIP: Generated platform files not found. Run: python3 generator/generate.py --all"
WARNINGS=$((WARNINGS + 1))
fi
echo ""
# Summary
echo "==========================="
echo "Summary:"
echo " Errors: $ERRORS"
echo " Warnings: $WARNINGS"
echo ""
if [ $ERRORS -eq 0 ]; then
echo "All checks passed!"
echo ""
echo "Next steps:"
echo "1. Run ./setup.sh to install"
echo "2. Read QUICKSTART.md to get started"
echo "3. Review examples/ for reference"
exit 0
else
echo "Verification failed with $ERRORS error(s)"
echo ""
echo "Please ensure all files are present and try again."
exit 1
fi