|
| 1 | +<!-- |
| 2 | +SPDX-License-Identifier: CC-BY-SA-4.0 |
| 3 | +SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> |
| 4 | +--> |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | +  |
| 10 | + |
| 11 | +# The Objective |
| 12 | + |
| 13 | +**empty-linter** is a toolkit designed to see "what is not there." It |
| 14 | +purges invisible artifacts—NBSPs, Zero-Width spaces, and null bytes—that |
| 15 | +corrupt file integrity and cause neural-generated character mess to fail |
| 16 | +in symbolic parsers. |
| 17 | + |
| 18 | +It acts as the "Eyes" for agents, enforcing symbolic structural intent |
| 19 | +over hidden "crap-voids." |
| 20 | + |
| 21 | +- **Config:** Managed via `config.ncl` (Nickel). |
| 22 | + |
| 23 | +- **Task Runner:** Managed via `Justfile` (Just). |
| 24 | + |
| 25 | +- **Logic:** Written in ReScript, executed via Deno. |
| 26 | + |
| 27 | +- **Verification:** Powered by [proven |
| 28 | + library](https://github.com/hyperpolymath/proven) with Idris 2 |
| 29 | + dependent types. |
| 30 | + |
| 31 | +- **Deployment:** nerdctl-first, supporting Linux, Minix, macOS, iOS, |
| 32 | + Android, and PC. |
| 33 | + |
| 34 | +# Idris Inside: Mathematically Verified Operations |
| 35 | + |
| 36 | +This project uses the **proven** library for mathematically verified |
| 37 | +operations. The following modules are integrated: |
| 38 | + |
| 39 | +| Module | Purpose | Source File | |
| 40 | +|----|----|----| |
| 41 | +| SafeHex | Constant-time hex encoding/decoding | `ByteDetector.res` | |
| 42 | +| SafePath | Traversal-proof path validation | `PathHandler.res` | |
| 43 | +| SafeString | XSS/SQL injection prevention | `TextTransform.res` | |
| 44 | +| SafeWhitespace | Text normalization without data loss (NEW) | `TextTransform.res` | |
| 45 | + |
| 46 | +Operations marked with "Idris Inside" have compile-time proofs that they |
| 47 | +cannot crash or corrupt data. |
| 48 | + |
| 49 | +# Crap-Overlay Playbook |
| 50 | + |
| 51 | +1. **Audit:** Identify invisible artifacts. |
| 52 | + |
| 53 | +2. **Highlight:** Magenta-coded reporting of offsets. |
| 54 | + |
| 55 | +3. **Correct:** 0xA0 to 0x20 conversion and ZWSP stripping. |
| 56 | + |
| 57 | +# Quick Start (Bash) |
| 58 | + |
| 59 | +The primary entry point for Bash is provided below. For all other |
| 60 | +supported shells (including `nushell`, `fish`, `minix` `shell`, |
| 61 | +`elvish`, etc.), please refer to [The Multi-Shell |
| 62 | +Registry](docs/SHELLS.adoc). |
| 63 | + |
| 64 | +```bash |
| 65 | +#!/usr/bin/env bash |
| 66 | +# Primary Bash wrapper for empty-linter |
| 67 | +# Usage: ./bin/empty-linter.sh [directory] |
| 68 | + |
| 69 | +TARGET=${1:-"."} |
| 70 | + |
| 71 | +if ! command -v deno &> /dev/null; then |
| 72 | + echo "Deno not found. Please install Deno to run empty-linter." |
| 73 | + exit 1 |
| 74 | +fi |
| 75 | + |
| 76 | +deno run --allow-read lib/js/src/EmptyLinter.bs.js "$TARGET" |
| 77 | +``` |
| 78 | + |
| 79 | +# Usage via Just |
| 80 | + |
| 81 | +We prefer the use of `just` for all development tasks. Refer to the |
| 82 | +[Cookbook](cookbook.adoc) for a full list of recipes. |
| 83 | + |
| 84 | +```bash |
| 85 | +# Run the Magenta crap-overlay report |
| 86 | +just audit |
| 87 | + |
| 88 | +# Sanitise the codebase (Auto-fix voids) |
| 89 | +just correct |
| 90 | +``` |
| 91 | + |
| 92 | +# Configuration (Nickel) |
| 93 | + |
| 94 | +All structural intent is defined in `config.ncl`: |
| 95 | + |
| 96 | +```nickel |
| 97 | +{ |
| 98 | + linter = { |
| 99 | + target_dir = ".", |
| 100 | + severity = "error", |
| 101 | + overlay_color = "magenta", |
| 102 | + auto_fix = true, |
| 103 | + } |
| 104 | +} |
| 105 | +``` |
| 106 | + |
| 107 | +# Deployment |
| 108 | + |
| 109 | +Deployment is handled via Podman to ensure cross-platform compatibility |
| 110 | +across edge tech and ASICs. |
| 111 | + |
| 112 | +```bash |
| 113 | +just deploy-nerctl |
| 114 | +``` |
| 115 | + |
| 116 | +# Architecture |
| 117 | + |
| 118 | +See <a href="TOPOLOGY.md" class="md">TOPOLOGY</a> for a visual |
| 119 | +architecture map and completion dashboard. |
0 commit comments