Skip to content

Commit 7746e32

Browse files
hyperpolymathclaude
andcommitted
feat(rsr): add Justfile, Mustfile, Dustfile for full RSR compliance
Closes the three remaining RSR gaps in developer-ecosystem: - Justfile with V-lang build/test/fmt/coverage, assail, validate-rsr - Mustfile.a2ml with structure, language policy, monorepo integrity - Dustfile.a2ml with cleanup, hygiene, and reversibility contracts All V-lang connectors (subdirectories) inherit RSR from this parent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 054c98d commit 7746e32

3 files changed

Lines changed: 270 additions & 0 deletions

File tree

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Dustfile — Cleanup and Hygiene Contract
3+
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
5+
@abstract:
6+
Cleanup and reversibility invariants for the developer-ecosystem monorepo.
7+
These ensure the repo stays tidy and changes can be undone.
8+
@end
9+
10+
## Cleanup
11+
12+
### stale-branch-policy
13+
- description: Branches should be deleted after merge
14+
- policy: delete-after-merge
15+
- severity: info
16+
17+
### artifact-retention
18+
- description: CI artifacts retained for 90 days max
19+
- policy: 90-days
20+
- severity: info
21+
22+
### no-build-artifacts
23+
- description: No compiled artifacts committed to source
24+
- run: "! find v-ecosystem -name '*.o' -o -name '*.so' -o -name '*.a' 2>/dev/null | head -1 | grep -q ."
25+
- severity: warning
26+
27+
### no-stray-scm-files
28+
- description: No legacy .scm checkpoint files (migrated to .a2ml)
29+
- run: "! find .machine_readable -name '*.scm' -not -name 'bot_directives' 2>/dev/null | head -1 | grep -q ."
30+
- severity: warning
31+
32+
## Hygiene
33+
34+
### formatting-required
35+
- description: V source files should be v fmt compliant
36+
- policy: required
37+
- severity: warning
38+
39+
### dead-code-removal
40+
- description: Unused modules and imports should be removed
41+
- policy: encouraged
42+
- severity: info
43+
44+
### todo-tracking
45+
- description: TODO comments should reference issues or be time-bounded
46+
- policy: tracked-in-issues
47+
- severity: info
48+
49+
## Reversibility
50+
51+
### backup-before-destructive
52+
- description: Destructive operations require confirmation
53+
- policy: true
54+
- severity: warning
55+
56+
### rollback-mechanism
57+
- description: All changes reversible via git revert
58+
- policy: git-revert
59+
- severity: info
60+
61+
### data-retention
62+
- description: Preserve data for 30 days before permanent deletion
63+
- policy: preserve-30-days
64+
- severity: info
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Mustfile — Physical State Contract
3+
# Author: Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
4+
5+
@abstract:
6+
Physical state invariants for the developer-ecosystem monorepo.
7+
These MUST be true for the repo to be in a valid state.
8+
@end
9+
10+
## Structure
11+
12+
### ai-manifest-present
13+
- description: 0-AI-MANIFEST.a2ml exists at repo root
14+
- run: test -f 0-AI-MANIFEST.a2ml
15+
- severity: critical
16+
17+
### machine-readable-dir
18+
- description: .machine_readable/6a2/ directory exists with checkpoint files
19+
- run: test -f .machine_readable/6a2/STATE.a2ml && test -f .machine_readable/6a2/META.a2ml && test -f .machine_readable/6a2/ECOSYSTEM.a2ml
20+
- severity: critical
21+
22+
### license-present
23+
- description: LICENSE file exists
24+
- run: test -f LICENSE
25+
- severity: critical
26+
27+
### security-policy
28+
- description: SECURITY.md exists
29+
- run: test -f SECURITY.md
30+
- severity: critical
31+
32+
### editorconfig
33+
- description: .editorconfig exists
34+
- run: test -f .editorconfig
35+
- severity: warning
36+
37+
## Language Policy
38+
39+
### no-typescript
40+
- description: No TypeScript files in source directories
41+
- run: "! find . -name '*.ts' -not -path '*/node_modules/*' -not -path '*/.lake/*' -not -path '*/opam-repository/*' 2>/dev/null | head -1 | grep -q ."
42+
- severity: warning
43+
44+
### no-npm-lockfile
45+
- description: No package-lock.json (use Deno)
46+
- run: test ! -f package-lock.json
47+
- severity: warning
48+
49+
## Monorepo Integrity
50+
51+
### no-nested-git
52+
- description: No .git directories in subdirectories (monorepo rule)
53+
- run: "! find . -mindepth 2 -name '.git' -type d -not -path '*/node_modules/*' -not -path '*/.lake/*' -not -path '*/opam-repository/*' -not -path '*/satellites/*' 2>/dev/null | head -1 | grep -q ."
54+
- severity: warning
55+
56+
### spdx-headers
57+
- description: Source files have SPDX license headers
58+
- run: "find v-ecosystem/v_api_interfaces -name '*.v' -exec head -1 {} \\; 2>/dev/null | grep -c 'SPDX' | xargs test 0 -lt"
59+
- severity: warning
60+
61+
## Workflows
62+
63+
### workflows-present
64+
- description: GitHub Actions workflows directory exists
65+
- run: test -d .github/workflows
66+
- severity: warning
67+
68+
### hypatia-scan
69+
- description: Hypatia scan workflow present
70+
- run: test -f .github/workflows/hypatia-scan.yml
71+
- severity: warning

‎Justfile‎

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
# SPDX-License-Identifier: PMPL-1.0-or-later
2+
# Copyright (c) 2026 Jonathan D.A. Jewell (hyperpolymath) <j.d.a.jewell@open.ac.uk>
3+
#
4+
# developer-ecosystem Justfile
5+
# Monorepo build orchestration for V-lang, Julia, Deno, ReScript, Elixir, Idris2 ecosystems
6+
7+
set shell := ["bash", "-uc"]
8+
set positional-arguments := true
9+
10+
project := "developer-ecosystem"
11+
version := "0.1.0"
12+
13+
# ═══════════════════════════════════════════════════════════════════════════════
14+
# DEFAULT & HELP
15+
# ═══════════════════════════════════════════════════════════════════════════════
16+
17+
# Show all available recipes
18+
default:
19+
@just --list --unsorted
20+
21+
# ═══════════════════════════════════════════════════════════════════════════════
22+
# V-LANG ECOSYSTEM
23+
# ═══════════════════════════════════════════════════════════════════════════════
24+
25+
# Compile all V-lang API interfaces
26+
v-build:
27+
#!/usr/bin/env bash
28+
set -euo pipefail
29+
echo "=== Building V-lang API interfaces ==="
30+
cd v-ecosystem/v_api_interfaces
31+
errors=0
32+
for d in v_*/; do
33+
[ -f "$d/src/"*.v ] 2>/dev/null || continue
34+
name="${d%/}"
35+
if v -shared "$d/src/" 2>/dev/null; then
36+
echo " ✓ $name"
37+
else
38+
echo " ✗ $name"
39+
errors=$((errors+1))
40+
fi
41+
done
42+
echo ""
43+
if [ $errors -eq 0 ]; then
44+
echo "All V modules compiled successfully."
45+
else
46+
echo "$errors module(s) failed."
47+
exit 1
48+
fi
49+
50+
# Run all V-lang tests
51+
v-test:
52+
#!/usr/bin/env bash
53+
set -euo pipefail
54+
echo "=== Testing V-lang API interfaces ==="
55+
cd v-ecosystem/v_api_interfaces
56+
errors=0
57+
for d in v_*/; do
58+
[ -d "$d/tests" ] || continue
59+
name="${d%/}"
60+
if v test "$d/tests/" 2>/dev/null; then
61+
echo " ✓ $name"
62+
else
63+
echo " ✗ $name"
64+
errors=$((errors+1))
65+
fi
66+
done
67+
echo ""
68+
if [ $errors -eq 0 ]; then
69+
echo "All V tests passed."
70+
else
71+
echo "$errors module(s) failed tests."
72+
exit 1
73+
fi
74+
75+
# Format all V source files
76+
v-fmt:
77+
#!/usr/bin/env bash
78+
echo "=== Formatting V-lang source ==="
79+
find v-ecosystem/v_api_interfaces -name "*.v" -exec v fmt {} \;
80+
echo "Done."
81+
82+
# List V-lang connector coverage
83+
v-coverage:
84+
#!/usr/bin/env bash
85+
echo "=== V-lang Connector Coverage ==="
86+
total=$(ls -d v-ecosystem/v_api_interfaces/v_*/ 2>/dev/null | wc -l)
87+
echo "Total connectors: $total"
88+
echo ""
89+
for d in v-ecosystem/v_api_interfaces/v_*/; do
90+
name=$(basename "$d")
91+
src=$(find "$d/src" -name "*.v" 2>/dev/null | wc -l)
92+
tests=$(find "$d/tests" -name "*.v" 2>/dev/null | wc -l)
93+
echo " $name: $src src, $tests test files"
94+
done
95+
96+
# ═══════════════════════════════════════════════════════════════════════════════
97+
# QUALITY
98+
# ═══════════════════════════════════════════════════════════════════════════════
99+
100+
# Run all quality checks
101+
quality: v-build v-test
102+
@echo "Quality checks complete."
103+
104+
# ═══════════════════════════════════════════════════════════════════════════════
105+
# SECURITY
106+
# ═══════════════════════════════════════════════════════════════════════════════
107+
108+
# Run panic-attacker pre-commit scan
109+
assail:
110+
@command -v panic-attack >/dev/null 2>&1 && panic-attack assail . || echo "WARN: panic-attack not found — install from https://github.com/hyperpolymath/panic-attacker"
111+
112+
# ═══════════════════════════════════════════════════════════════════════════════
113+
# VALIDATION
114+
# ═══════════════════════════════════════════════════════════════════════════════
115+
116+
# Validate RSR compliance
117+
validate-rsr:
118+
#!/usr/bin/env bash
119+
echo "=== RSR Compliance Check ==="
120+
MISSING=""
121+
for f in .editorconfig LICENSE 0-AI-MANIFEST.a2ml README.adoc SECURITY.md CONTRIBUTING.md; do
122+
[ -f "$f" ] || MISSING="$MISSING $f"
123+
done
124+
for f in .machine_readable/6a2/STATE.a2ml .machine_readable/6a2/META.a2ml .machine_readable/6a2/ECOSYSTEM.a2ml; do
125+
[ -f "$f" ] || MISSING="$MISSING $f"
126+
done
127+
for f in .machine_readable/contractiles/must/Mustfile.a2ml .machine_readable/contractiles/trust/Trustfile.a2ml .machine_readable/contractiles/dust/Dustfile.a2ml; do
128+
[ -f "$f" ] || MISSING="$MISSING $f"
129+
done
130+
if [ -z "$MISSING" ]; then
131+
echo "All RSR files present."
132+
else
133+
echo "MISSING:$MISSING"
134+
exit 1
135+
fi

0 commit comments

Comments
 (0)