Skip to content

Commit bf0d161

Browse files
Jonathan D.A. Jewellclaude
andcommitted
Remove forbidden AssemblyScript & add language policy enforcement
- Remove engines/wagasm-ssg/wasm-ssg.ts (AssemblyScript forbidden in wagasm-ssg) - Add language policy CI workflow (.github/workflows/language-policy.yml) - Add policy check script (scripts/check-language-policy.js) wagasm-ssg is pure WebAssembly Text (WAT) - no AssemblyScript permitted Enforces Hyperpolymath Language Policy: ReScript over TypeScript, Deno over Node.js 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent b0fffd7 commit bf0d161

File tree

3 files changed

+205
-347
lines changed

3 files changed

+205
-347
lines changed
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# SPDX-License-Identifier: AGPL-3.0-or-later
2+
name: Language Policy Enforcement
3+
4+
on:
5+
push:
6+
branches: ["*"]
7+
pull_request:
8+
branches: ["*"]
9+
10+
permissions: read-all
11+
12+
jobs:
13+
check-policy:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
17+
18+
- name: Setup Deno
19+
uses: denoland/setup-deno@e95548e56ddc3f63d0e1eab7bed41d4031f02b36 # v2
20+
with:
21+
deno-version: v2.x
22+
23+
- name: Check for banned TypeScript files
24+
run: |
25+
echo "Checking for banned TypeScript files..."
26+
VIOLATIONS=$(find . -type f \( -name "*.ts" -o -name "*.tsx" \) \
27+
! -name "*.d.ts" \
28+
! -path "./.git/*" \
29+
! -path "./node_modules/*" \
30+
! -path "./_site/*" | head -20)
31+
if [ -n "$VIOLATIONS" ]; then
32+
echo "ERROR: TypeScript files found (banned - use ReScript instead):"
33+
echo "$VIOLATIONS"
34+
exit 1
35+
fi
36+
echo "No TypeScript violations found"
37+
38+
- name: Check for banned Go files
39+
run: |
40+
echo "Checking for banned Go files..."
41+
VIOLATIONS=$(find . -type f -name "*.go" \
42+
! -path "./.git/*" | head -20)
43+
if [ -n "$VIOLATIONS" ]; then
44+
echo "ERROR: Go files found (banned - use Rust instead):"
45+
echo "$VIOLATIONS"
46+
exit 1
47+
fi
48+
echo "No Go violations found"
49+
50+
- name: Check for banned Node.js lock files
51+
run: |
52+
echo "Checking for banned lock files..."
53+
VIOLATIONS=""
54+
for f in package-lock.json yarn.lock pnpm-lock.yaml bun.lockb; do
55+
if [ -f "$f" ]; then
56+
VIOLATIONS="$VIOLATIONS $f"
57+
fi
58+
done
59+
if [ -n "$VIOLATIONS" ]; then
60+
echo "ERROR: Node.js lock files found (banned - use Deno instead):"
61+
echo "$VIOLATIONS"
62+
exit 1
63+
fi
64+
echo "No Node.js lock file violations found"
65+
66+
- name: Check for banned Python files
67+
run: |
68+
echo "Checking for banned Python files..."
69+
VIOLATIONS=$(find . -type f -name "*.py" \
70+
! -path "./.git/*" \
71+
! -path "./salt/*" \
72+
! -path "./saltstack/*" \
73+
! -path "./_salt/*" | head -20)
74+
if [ -n "$VIOLATIONS" ]; then
75+
echo "ERROR: Python files found outside SaltStack (banned - use ReScript/Rust):"
76+
echo "$VIOLATIONS"
77+
exit 1
78+
fi
79+
echo "No Python violations found"
80+
81+
- name: Run full policy check
82+
run: deno run --allow-read scripts/check-language-policy.js

0 commit comments

Comments
 (0)