|
4 | 4 |
|
5 | 5 | (meta |
6 | 6 | (version "0.1.0") |
7 | | - (last-updated "2026-03-20") |
| 7 | + (last-updated "2026-03-21") |
8 | 8 |
|
9 | 9 | (architecture-decisions |
10 | 10 | (adr "001-iser-pattern" |
11 | 11 | (status "accepted") |
12 | | - (context "Need to make powerful languages accessible without steep learning curves") |
13 | | - (decision "Use manifest-driven code generation: user describes WHAT, tool generates HOW") |
14 | | - (consequences "Users write zero target language code; all complexity in the -iser")) |
| 12 | + (context "Need to make Eclexia sustainability features accessible without learning a new language") |
| 13 | + (decision "Use manifest-driven code generation: user describes energy budgets in TOML, tool generates Eclexia constraints and measurement hooks") |
| 14 | + (consequences "Users write zero Eclexia code; all complexity in eclexiaiser")) |
15 | 15 |
|
16 | 16 | (adr "002-abi-ffi-standard" |
17 | 17 | (status "accepted") |
18 | | - (context "Need verified interop between Rust CLI, target language, and user code") |
19 | | - (decision "Idris2 ABI for formal proofs, Zig FFI for C-ABI bridge") |
20 | | - (consequences "Compile-time correctness guarantees; zero runtime overhead from proofs")) |
| 18 | + (context "Need verified interop between Rust CLI, energy measurement hardware, and carbon APIs") |
| 19 | + (decision "Idris2 ABI for formal proofs of resource bounds, Zig FFI for hardware counter access and C-ABI bridge") |
| 20 | + (consequences "Compile-time correctness guarantees for energy budgets; zero runtime overhead from proofs")) |
21 | 21 |
|
22 | | - (adr "003-rsr-template" |
| 22 | + (adr "003-microjoule-units" |
| 23 | + (status "accepted") |
| 24 | + (context "Floating-point energy values cause rounding errors that compound across call chains") |
| 25 | + (decision "Use microjoules (uJ) as the canonical unit at the ABI boundary; milligrams CO2/kWh for carbon") |
| 26 | + (consequences "Integer arithmetic throughout the measurement and enforcement path; no floating-point at FFI boundary")) |
| 27 | + |
| 28 | + (adr "004-carbon-api-providers" |
| 29 | + (status "accepted") |
| 30 | + (context "Need real-time carbon intensity data for renewable-aware scheduling") |
| 31 | + (decision "Support WattTime, Electricity Maps, and static data as carbon API providers; configurable per zone in manifest") |
| 32 | + (consequences "Caching layer needed to avoid API rate limits; static fallback for offline/CI use")) |
| 33 | + |
| 34 | + (adr "005-csrd-reporting" |
| 35 | + (status "accepted") |
| 36 | + (context "EU Corporate Sustainability Reporting Directive requires energy and emissions data from software operations") |
| 37 | + (decision "Generate sustainability reports with CSRD-compatible field mapping from accumulated measurements") |
| 38 | + (consequences "Report struct must include: total energy, total carbon, renewable percentage, measurement count")) |
| 39 | + |
| 40 | + (adr "006-rsr-template" |
23 | 41 | (status "accepted") |
24 | 42 | (context "Need consistent project structure across 29+ -iser repos") |
25 | 43 | (decision "All repos cloned from rsr-template-repo with full CI/CD and governance") |
26 | 44 | (consequences "17 workflows, SECURITY.md, CONTRIBUTING, bot directives from day one"))) |
27 | 45 |
|
28 | 46 | (development-practices |
29 | | - (language "Rust" (purpose "CLI and orchestration")) |
30 | | - (language "Idris2" (purpose "ABI formal proofs")) |
31 | | - (language "Zig" (purpose "FFI C-ABI bridge")) |
| 47 | + (language "Rust" (purpose "CLI orchestration, manifest parsing, codegen")) |
| 48 | + (language "Idris2" (purpose "ABI formal proofs of energy budget satisfiability and composition")) |
| 49 | + (language "Zig" (purpose "FFI C-ABI bridge for RAPL/IPMI energy counters and carbon API")) |
32 | 50 | (build-tool "cargo") |
33 | 51 | (ci "GitHub Actions (17 workflows)")) |
34 | 52 |
|
35 | 53 | (design-rationale |
36 | 54 | (principle "Manifest-driven" |
37 | | - (explanation "User intent captured in TOML; all generation is deterministic and reproducible")) |
38 | | - (principle "Formally verified bridges" |
39 | | - (explanation "Idris2 dependent types prove interface correctness at compile time")) |
40 | | - (principle "Zero target language exposure" |
41 | | - (explanation "Users never write Chapel/Julia/Futhark/etc. — the -iser handles everything")))) |
| 55 | + (explanation "User describes energy budgets and carbon limits in eclexiaiser.toml; tool generates all measurement and enforcement code")) |
| 56 | + (principle "Formally verified resource bounds" |
| 57 | + (explanation "Idris2 dependent types prove energy budgets compose correctly across call chains and are satisfiable")) |
| 58 | + (principle "Hardware-level measurement" |
| 59 | + (explanation "Zig FFI reads RAPL/IPMI hardware counters for accurate energy data; software estimation as fallback")) |
| 60 | + (principle "Carbon-aware by default" |
| 61 | + (explanation "Every energy measurement is paired with grid carbon intensity data, enabling renewable-aware scheduling")))) |
0 commit comments