Skip to content

Commit 4e09148

Browse files
hyperpolymathclaude
andcommitted
feat: v0.1 foundation — five-language defensive ECM platform
Implement the v0.1 foundation for Robodog ECM with a five-language architecture: Rust (core), SPARK (safety proofs), Idris2 (ABI), Zig (FFI bridge), V-lang (API layer). Rust core: - ECM signal analysis (synthetic signals, FFT spectrum, interference detection) - PQ crypto protocols (Kyber1024, Dilithium5, SPHINCS+ with round-trip tests) - Formation control (5 shapes, separation checks, geometry computation) - Defensive autonomy (collision avoidance, safe-state, comms loss handling) SPARK safety: - ecm_safety (frequency band bounds, power limits with postconditions) - formation_safety (separation distance proofs via squared distance) - autonomy_safety (comms timeout, speed bounds, safe-state selection) Idris2 ABI: - Types.idr (core type universe — no offensive action constructors) - ECM.idr (power bounds, spectrum snapshots) - Crypto.idr (key sizes with dependent type proofs) - Formation.idr (integer-mm coordinates, separation proof witnesses) - Foreign.idr (Zig FFI declarations) Zig FFI: - C-ABI signal classification, distance computation, formation positions - Generated C header (robodog_ffi.h) - Unit + integration tests V-lang API: - Full type mirror of core types - Signal classification + defensive recommendation - ABI verification types (round-trip proofs) Infrastructure: - Trustfile.a2ml: 780-line comprehensive trust contract (18 checks) - EXPORT-CONTROL.md: ITAR/EAR/Wassenaar compliance framework - run-checks.sh: executable Trustfile verification - Fix SPDX typos (PLMP→PMPL) in 3 contractile files - Fix LICENSE (MPL-2.0→PMPL-1.0-or-later as root) - Replace old Haskell Trustfile with A2ML format - Updated TOPOLOGY.md, STATE.a2ml, README.adoc, justfile, .gitignore Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 975019f commit 4e09148

40 files changed

Lines changed: 6006 additions & 541 deletions

.gitignore

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ Thumbs.db
2424
/.elixir_ls/
2525

2626
# Rust
27-
# Cargo.lock # Keep for binaries
27+
src/rust/target/
28+
# Cargo.lock # Keep for reproducible builds
2829

2930
# Elixir
3031
/cover/
@@ -50,6 +51,16 @@ __pycache__/
5051
*.ali
5152
/obj/
5253
/bin/
54+
src/spark/obj/
55+
src/spark/proof/
56+
57+
# Zig
58+
ffi/zig/.zig-cache/
59+
ffi/zig/zig-out/
60+
61+
# Idris2
62+
src/abi/build/
63+
src/abi/**/*.ibc
5364

5465
# Haskell
5566
/.stack-work/

.machine_readable/STATE.a2ml

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,44 @@
11
# SPDX-License-Identifier: PMPL-1.0-or-later
22
# STATE.a2ml — Project state checkpoint
3-
# Converted from STATE.scm on 2026-03-15
3+
# Updated: 2026-03-16
44

55
[metadata]
66
project = "robodog-ecm"
77
version = "0.1.0"
8-
last-updated = "2026-03-15"
8+
last-updated = "2026-03-16"
99
status = "active"
1010

1111
[project-context]
1212
name = "robodog-ecm"
13-
completion-percentage = 0
14-
phase = "In development"
13+
completion-percentage = 40
14+
phase = "v0.1 Foundation"
15+
description = "Electronic Countermeasures & Defensive Technologies research platform"
16+
17+
[technology-stack]
18+
core = "Rust"
19+
safety = "Ada/SPARK"
20+
abi = "Idris2"
21+
ffi = "Zig"
22+
api = "V-lang"
23+
24+
[v0.1-progress]
25+
ecm-signal-analysis = "implemented — signals, detection, FFT spectrum"
26+
crypto-protocols = "implemented — Kyber1024, Dilithium5, SPHINCS+ round-trips"
27+
formation-control = "implemented — 5 shapes, separation checks, geometry"
28+
defensive-autonomy = "implemented — collision avoidance, safe-state, comms loss"
29+
spark-proofs = "specified — ecm_safety, formation_safety, autonomy_safety"
30+
idris2-abi = "implemented — Types, ECM, Crypto, Formation, Foreign"
31+
zig-ffi = "implemented — classify, distance, formation, C header"
32+
v-api = "implemented — full type mirror, classify, recommend"
33+
trustfile = "complete — 780 lines, 18 operational checks"
34+
export-control = "complete — ITAR/EAR/Wassenaar framework"
35+
36+
[blockers]
37+
none = "No blockers for v0.1 completion"
38+
39+
[next-actions]
40+
1 = "Run cargo test to verify Rust builds"
41+
2 = "Run zig build test to verify FFI"
42+
3 = "Run gnatprove to verify SPARK proofs"
43+
4 = "Run idris2 --check to verify ABI"
44+
5 = "Commit, push, mirror"

EXPORT-CONTROL.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
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+
# Export Control Compliance Framework
5+
6+
## Classification
7+
8+
This repository contains **dual-use defensive technologies** that may be
9+
subject to export control regulations including:
10+
11+
- **UK Export Control Act 2002** and Strategic Export Control Lists
12+
- **Wassenaar Arrangement** Category 5 (Information Security) and Category 11 (Military Electronics)
13+
- **US ITAR** (International Traffic in Arms Regulations) — for reference only; UK law governs
14+
- **US EAR** (Export Administration Regulations) — for reference only; UK law governs
15+
16+
### Technology Categories Present
17+
18+
| Category | Description | Control Status |
19+
|----------|-------------|----------------|
20+
| ECM Signal Analysis | Spectrum analysis, interference detection | Dual-use (Wassenaar Cat 5) |
21+
| Post-Quantum Cryptography | Kyber, Dilithium, SPHINCS+ protocols | Potentially controlled (Cat 5A2) |
22+
| Formation Control | Distributed coordination for robotic systems | Dual-use (Cat 11) |
23+
| Autonomous Navigation | Collision avoidance, threat response | Dual-use (Cat 11) |
24+
25+
## Defensive Use Only Policy
26+
27+
### Permitted Uses
28+
29+
1. **Defensive electronic countermeasures** — protecting communications from interception
30+
2. **Search and rescue coordination** — multi-robot disaster response
31+
3. **Secure communications research** — post-quantum protocol design and analysis
32+
4. **Academic research** — published, peer-reviewed defensive technology studies
33+
5. **Civilian infrastructure protection** — spectrum monitoring and anomaly detection
34+
35+
### Explicitly Prohibited Uses
36+
37+
1. **Offensive weapons systems** — targeting, kill chains, lethal autonomy
38+
2. **Mass surveillance** — tracking, profiling, or monitoring individuals
39+
3. **Offensive signal jamming** — disrupting civilian or emergency communications
40+
4. **Autonomous lethal decision-making** — any system that decides to use force
41+
5. **Export to embargoed or sanctioned entities** — per UK/EU/UN sanctions lists
42+
43+
## Contributor Requirements
44+
45+
### Before Contributing
46+
47+
All contributors must:
48+
49+
1. **Acknowledge** this export control policy by including in their first commit message:
50+
```
51+
Export-Control-Acknowledged: yes
52+
```
53+
54+
2. **Verify** they are not acting on behalf of any entity on:
55+
- UK Consolidated List of Financial Sanctions Targets
56+
- EU Consolidated Sanctions List
57+
- UN Security Council Sanctions Committees lists
58+
59+
3. **Ensure** their contributions serve exclusively defensive purposes
60+
61+
### Code Review Requirements
62+
63+
All pull requests involving the following must receive explicit export control review:
64+
65+
- New cryptographic algorithm implementations
66+
- Signal processing or spectrum analysis modules
67+
- Autonomous decision-making logic
68+
- Formation control or swarm coordination protocols
69+
- Any hardware interface code (SDR, sensors, actuators)
70+
71+
## Technical Controls
72+
73+
### Source-Level Annotations
74+
75+
All modules that handle controlled technology must include the annotation:
76+
77+
```rust
78+
//! DEFENSIVE USE ONLY — Electronic countermeasures for protective applications.
79+
//! Export control classification: Wassenaar Category [X], UK ML [Y].
80+
//! See EXPORT-CONTROL.md for compliance requirements.
81+
```
82+
83+
### Build-Time Verification
84+
85+
The `Trustfile.a2ml` includes checks that:
86+
87+
- No offensive capability markers exist in source code
88+
- Core modules declare defensive-use-only intent
89+
- Export control documentation is present and current
90+
91+
### CI/CD Enforcement
92+
93+
The `hypatia-scan` workflow includes export control scanning rules that flag:
94+
95+
- Offensive terminology in code, comments, or documentation
96+
- Undocumented cryptographic implementations
97+
- Missing defensive-use annotations on controlled modules
98+
99+
## Licensing Interaction
100+
101+
The PMPL-1.0-or-later license does **not** override export control obligations.
102+
Even though the source code is publicly available under an open license, users
103+
remain responsible for compliance with all applicable export control laws in
104+
their jurisdiction.
105+
106+
## Contact
107+
108+
For export control queries:
109+
110+
- **Author:** Jonathan D.A. Jewell
111+
- **Email:** j.d.a.jewell@open.ac.uk
112+
- **Institution:** The Open University
113+
114+
## Document History
115+
116+
| Date | Change |
117+
|------|--------|
118+
| 2026-03-16 | Initial export control framework for v0.1 |

0 commit comments

Comments
 (0)