abt 1.7.1

AgenticBlockTransfer โ€” agentic-first CLI successor to dd, human-first GUI/TUI successor to balenaEtcher, Ventoy, Rufus, Fedora Media Writer, and rpi-imager
# ROADMAP


Implementation progress for AgenticBlockTransfer (`abt`).

Legend: โœ… Done | ๐Ÿ”ง Partial | ๐Ÿ”ฒ Not started

## v0.1.0 โ€” Foundation (current)


### Core Library


| Component                | Status | Notes                                                                                                                        |
| ------------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| Error types (`AbtError`) | โœ…      | thiserror-derived, 21 variants (6 new: Timeout, CancelledByUser, BackupFailed, TokenMismatch, RetryExhausted, DeviceChanged) |
| Type definitions         | โœ…      | ImageFormat (15), DeviceType (12), Filesystem (10), HashAlgorithm (6)                                                        |
| Image format detection   | โœ…      | Magic byte detection + extension fallback, BufReader-wrapped                                                                 |
| Decompressing reader     | โœ…      | gz, bz2, xz, zstd, zip โ€” streaming with BufReader wrapping                                                                   |
| Write engine             | โœ…      | BufWriter, inline hashing, retry w/ backoff, spawn_blocking, O_DIRECT + FILE_FLAG_NO_BUFFERING                               |
| Verification engine      | โœ…      | Hash-based (no re-decompression), inline hash comparison                                                                     |
| Hasher                   | โœ…      | SHA-256, SHA-512, SHA-1, MD5, BLAKE3, CRC32 โ€” trait-based dedup                                                              |
| Progress tracking        | โœ…      | Fully lock-free AtomicU8/AtomicU64, no Mutex                                                                                 |
| Device formatting        | โœ…      | Platform-dispatched, no shell injection, input validation                                                                    |
| Device abstraction       | โœ…      | `DeviceEnumerator` trait, `DeviceInfo` struct                                                                                |
| Safety system            | โœ…      | Pre-flight checks, dry-run, fingerprints, 10 exit codes, partition backup                                                    |
| HTTP download source     | โœ…      | reqwest streaming download โ†’ write pipeline with progress                                                                    |
| Signal handling          | โœ…      | Graceful Ctrl+C with device sync                                                                                             |
| Shell completions        | โœ…      | bash, zsh, fish, PowerShell via clap_complete                                                                                |
| Sparse write             | โœ…      | Zero-block skipping with lseek/SetFilePointer                                                                                |

### Platform Support


| Platform             | Enumeration         | Write | Format     | Elevation   | Status |
| -------------------- | ------------------- | ----- | ---------- | ----------- | ------ |
| Linux                | sysfs + lsblk       | โœ…     | mkfs.*     | uid check   | โœ…      |
| macOS                | diskutil            | โœ…     | diskutil   | uid check   | โœ…      |
| Windows              | PowerShell Get-Disk | โœ…     | format.exe | Admin token | โœ…      |
| FreeBSD / other UNIX | sysctl + geom       | โœ…     | newfs      | uid check   | โœ…      |

### CLI


| Feature                      | Status | Notes                                                                 |
| ---------------------------- | ------ | --------------------------------------------------------------------- |
| Argument parsing (clap)      | โœ…      | 18 commands, aliases, global flags                                    |
| `write` command              | โœ…      | Full pipeline: decompress โ†’ write โ†’ sync โ†’ verify                     |
| `verify` command             | โœ…      | Source comparison + expected hash                                     |
| `list` command               | โœ…      | Tabular output, --all / --removable / --type filters                  |
| `info` command               | โœ…      | Device + image inspection                                             |
| `checksum` command           | โœ…      | Multi-algorithm with progress bar                                     |
| `format` command             | โœ…      | Platform-dispatched                                                   |
| `ontology` command           | โœ…      | JSON-LD and JSON output                                               |
| `tui` command                | โœ…      | Launches TUI mode                                                     |
| `gui` command                | โœ…      | Launches GUI mode                                                     |
| JSON output mode (`-o json`) | โœ…      | Structured output on write (safety report + result) and list commands |
| Shell completions            | โœ…      | bash, zsh, fish, PowerShell via `completions` command                 |

### TUI


| Feature             | Status | Notes                                                                      |
| ------------------- | ------ | -------------------------------------------------------------------------- |
| Source selection    | โœ…      | Text input for image path                                                  |
| Device listing      | โœ…      | Table with selection                                                       |
| Write confirmation  | โœ…      | Safety prompt before write                                                 |
| Progress gauge      | โœ…      | Real-time bytes/speed/ETA                                                  |
| Error display       | โœ…      | Dedicated error state                                                      |
| Keyboard navigation | โœ…      | Up/Down/Enter/Esc/q                                                        |
| File browser        | โœ…      | In-TUI file picker with directory navigation, extension filtering, Tab key |

### GUI


| Feature            | Status | Notes                                                                       |
| ------------------ | ------ | --------------------------------------------------------------------------- |
| 3-step wizard      | โœ…      | Source โ†’ Device โ†’ Write                                                     |
| Device list        | โœ…      | Selectable with system drive filter                                         |
| Progress bar       | โœ…      | Animated with speed/ETA                                                     |
| Menu bar           | โœ…      | File / View / Help                                                          |
| Dark/light mode    | โœ…      | Toggle via View menu                                                        |
| Native file dialog | โœ…      | rfd crate โ€” Browse and Open Image dialogs                                   |
| Device refresh     | โœ…      | Synchronous re-enumeration via runtime handle                               |
| Drag-and-drop      | โœ…      | eframe egui with hover overlay + extension filtering                        |
| Theme system       | โœ…      | 6 presets (Dark/Light/Nord/Solarized/Dracula/Monokai), View > Theme submenu |

### AI Ontology


| Feature                  | Status | Notes                                                                       |
| ------------------------ | ------ | --------------------------------------------------------------------------- |
| JSON-LD output           | โœ…      | Full schema.org vocabulary                                                  |
| 7 capability definitions | โœ…      | Parameters, types, constraints, examples                                    |
| Type definitions         | โœ…      | ImageFormat, Compression, DeviceType, Filesystem, Hash                      |
| Platform support matrix  | โœ…      | Per-OS details                                                              |
| Device scope categories  | โœ…      | 4 categories with examples                                                  |
| Exit code semantics      | โœ…      | Per-capability exit codes                                                   |
| JSON output mode         | โœ…      | Compact JSON alternative                                                    |
| YAML output              | โœ…      | serde_yaml serialization via `abt ontology -f yaml`                         |
| MCP/Tool-use schema      | โœ…      | Full MCP server with JSON-RPC 2.0 over stdio, 6 tools                       |
| OpenAPI-style schema     | โœ…      | OpenAPI 3.1 spec with 9 endpoints, 12 schemas via `abt ontology -f openapi` |

---

## v0.2.0 โ€” Reliability & Testing


| Item                         | Status | Notes                                                                                                                 |
| ---------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------- |
| Unit tests for core library  | โœ…      | 109 tests: image detection, hasher, progress, device, types, download, partition, config, ISO 9660, blocksize, notify |
| Integration tests            | โœ…      | 17 integration tests: compression round-trips, partition parsing, config, verifier, progress                          |
| CI pipeline (GitHub Actions) | โœ…      | Linux + macOS + Windows matrix, clippy, fmt, feature combinations, MSRV                                               |
| Loopback device testing      | โœ…      | LoopbackDevice struct, create_test_image, create_compressed_test_image, 10 tests                                      |
| Error recovery               | โœ…      | WriteCheckpoint with JSON persistence, verify_written_region, try_resume(), 8 tests                                   |
| Signal handling              | โœ…      | Graceful Ctrl+C with progress cancel + sync                                                                           |
| Logging improvements         | โœ…      | Structured logging with file output via `--log-file`                                                                  |

## v0.3.0 โ€” Performance


| Item                         | Status | Notes                                                                             |
| ---------------------------- | ------ | --------------------------------------------------------------------------------- |
| Direct I/O (O_DIRECT)        | โœ…      | Linux O_DIRECT + Windows FILE_FLAG_NO_BUFFERING via `--direct-io`                 |
| Async I/O (io_uring)         | โœ…      | Linux kernel 5.1+ with graceful fallback                                          |
| Parallel hashing             | โœ…      | Inline hash during write (no second pass)                                         |
| Memory-mapped I/O            | โœ…      | memmap2-based verification with fallback to standard I/O                          |
| Adaptive block size          | โœ…      | Benchmark-based auto-tune with diminishing-returns detection + heuristic fallback |
| Zero-copy splice/sendfile    | โœ…      | splice (Linux), sendfile (macOS/FreeBSD), fallback (Windows)                      |
| Multi-threaded decompression | โœ…      | pigz/pbzip2-style channel-based pipeline, parallel bz2/zstd, read-ahead gz/xz     |
| Benchmarking suite           | โœ…      | `abt bench` โ€” block-size sweep, read/write throughput, IOPS, JSON                 |
| Sparse write optimization    | โœ…      | Skip all-zero blocks via lseek SEEK_CUR                                           |
| Retry with backoff           | โœ…      | 3ร— retry on transient I/O errors                                                  |
| BufReader/BufWriter          | โœ…      | All file I/O buffered, decompressors wrapped                                      |

## v0.4.0 โ€” Extended Format Support


| Item                      | Status | Notes                                                                                         |
| ------------------------- | ------ | --------------------------------------------------------------------------------------------- |
| QCOW2 reading             | โœ…      | Header parsing (v2/v3), L1โ†’L2โ†’cluster chain, streaming Read impl, 8 tests                     |
| VHD/VHDX reading          | โœ…      | VHD footer/dynamic header/BAT, Fixed+Dynamic readers, VHDX identifier+header parsing, 8 tests |
| VMDK reading              | โœ…      | Sparse extent header, grain directory/table chain, streaming Read, 8 tests                    |
| WIM extraction            | โœ…      | Header parsing, flags, compression, GUID, XML metadata, 8 tests                               |
| Partition table parsing   | โœ…      | GPT/MBR parsing with type lookups, mixed-endian GUID, UTF-16LE names                          |
| ISO 9660 metadata         | โœ…      | PVD parsing, El Torito boot detection, Joliet, volume label, dates                            |
| Sparse write optimization | โœ…      | Skip zero blocks (done in v0.1.0)                                                             |

## v0.5.0 โ€” Ecosystem


| Item                                   | Status | Notes                                                                       |
| -------------------------------------- | ------ | --------------------------------------------------------------------------- |
| Shell completions (bash/zsh/fish/pwsh) | โœ…      | `abt completions <shell>` via clap_complete                                 |
| Man page generation                    | โœ…      | `abt man` generates roff pages for all commands via clap_mangen             |
| Native file dialog (GUI)               | โœ…      | rfd crate โ€” Browse, Open Image, filter by disk image extensions             |
| Drag-and-drop (GUI)                    | โœ…      | eframe egui with hover overlay + extension filtering                        |
| URL/HTTP download source               | โœ…      | Streaming download โ†’ decompress โ†’ write pipeline                            |
| Progress notification (OS)             | โœ…      | notify-rust โ€” toast on write success/failure, verify pass/fail              |
| Config file (~/.config/abt)            | โœ…      | TOML config: write, safety, output, logging sections with defaults          |
| Plugin/extension system                | โœ…      | FormatPlugin trait, PluginRegistry, 4 built-in plugins, custom registration |

## v1.0.0 โ€” Production Release


| Item                         | Status | Notes                                                                                    |
| ---------------------------- | ------ | ---------------------------------------------------------------------------------------- |
| Stable API guarantee         | โœ…      | semver commitment, version 1.0.0, CHANGELOG.md                                           |
| Security audit               | โœ…      | 8 categories, 20+ checks (SEC-001-SEC-063), path/symlink/privilege/TOCTOU/URL/hash audit |
| Signed releases              | โœ…      | GPG-signed binaries, SHA-256 checksums, GitHub artifact attestation                      |
| Package manager distribution | โœ…      | Homebrew, AUR, winget, deb, rpm packaging configs                                        |
| Localization / i18n          | โœ…      | 12 locales, 4 built-in catalogs (en/de/fr/es), format args, detect_system_locale         |
| Accessibility                | โœ…      | 16 ARIA roles, WCAG 2.1 AA contrast, announcement queue, keyboard-only mode              |
| Comprehensive documentation  | โœ…      | mdbook with 16 chapters: User Guide, Interfaces, AI Integration, Advanced, Development   |
| MCP server mode              | โœ…      | JSON-RPC 2.0 over stdio, 6 tools, `abt mcp` command                                      |

## Future / Research


| Item                             | Notes                                                                        |
| -------------------------------- | ---------------------------------------------------------------------------- |
| Device cloning (device โ†’ device) | โœ… `abt clone` โ€” block-level clone with inline hashing, sparse, verification  |
| Network block device source      | โœ… `abt` supports nbd:// URLs as image source, NBD protocol client            |
| Multicast imaging                | โœ… `abt` multicast sender/receiver, CRC32 per-chunk, session ID, NAK recovery |
| Differential/incremental writes  | โœ… `abt diff` โ€” block-level comparison, skip identical, dry-run, verify       |
| Secure erase                     | โœ… `abt erase` โ€” 6 methods: auto/zero/random/ATA/NVMe/discard, multi-pass     |
| Boot sector validation           | โœ… `abt boot` โ€” MBR/GPT/UEFI validation with 7 checks, JSON output            |
| Raspberry Pi OS catalog          | โœ… `abt catalog` โ€” fetch/search/browse rpi-imager OS catalog                  |
| Ventoy-style multi-boot          | โœ… `abt multiboot` โ€” registry, GRUB2 config, OS auto-detect, add/remove/list  |

## v1.1.0 โ€” Feature Wave 10 (Reference Project Parity)


Inspired by studying 5 reference projects (etcher, rufus, Ventoy, MediaWriter, rpi-imager).

| Feature                   | Status | Notes                                                                                   |
| ------------------------- | ------ | --------------------------------------------------------------------------------------- |
| OS Customization          | โœ…      | `abt customize` โ€” firstrun.sh / cloud-init / network-config generation, WiFi, SSH keys  |
| Image Download Cache      | โœ…      | `abt cache` โ€” SHA-256 verified local cache, eviction policies, manifest persistence     |
| Drive Health / Bad Blocks | โœ…      | `abt health` โ€” multi-pass destructive bad block check, fake flash detection, read test  |
| Sleep Inhibitor           | โœ…      | RAII guard prevents OS sleep during writes (systemd/caffeinate/SetThreadExecutionState) |
| Drive Backup              | โœ…      | `abt backup` โ€” 5 compression formats, inline SHA-256, sparse zero-skip, progress        |
| Persistent Storage        | โœ…      | `abt persist` โ€” casper/Fedora/Ventoy persistence partitions and image files             |

## v1.2.0 โ€” Feature Wave 11 (Download Resilience & Hardware Awareness)


Gap analysis from reference projects (rufus, etcher, MediaWriter, rpi-imager, Ventoy).

| Feature                     | Status | Notes                                                                         |
| --------------------------- | ------ | ----------------------------------------------------------------------------- |
| Resumable Downloads         | โœ…      | HTTP Range resume with .part/.meta.json files, ETag/Last-Modified validation  |
| Mirror Selection & Failover | โœ…      | `abt mirror` โ€” latency probing, failover, metalink (RFC 5854) parsing         |
| Self-Update Checker         | โœ…      | `abt update` โ€” GitHub Releases API, semver compare, platform asset detection  |
| Checksum File Parsing       | โœ…      | `abt checksum-file` โ€” SHA256SUMS/MD5SUMS auto-detect (GNU/BSD/simple formats) |
| USB Speed Detection         | โœ…      | `abt usb-info` โ€” USB speed enum, degraded warnings, write-time estimates      |
| Large FAT32 Formatter       | โœ…      | FAT32 formatting for drives >32 GB with custom cluster sizes (up to 2 TiB)    |

## v1.3.0 โ€” Feature Wave 12 (Security, Windows Automation & Fleet Management)


Gap analysis from reference projects (rufus, etcher, MediaWriter, rpi-imager, Ventoy).

| Feature                         | Status | Notes                                                                                     |
| ------------------------------- | ------ | ----------------------------------------------------------------------------------------- |
| Proxy Configuration             | โœ…      | HTTP/HTTPS/SOCKS5 auto-detection, no-proxy lists, fetch profiles (Interactive/Background) |
| Signature Verification          | โœ…      | RSA SHA-256 with PEM keyring, detached .sig/.asc, download-and-verify workflow            |
| Windows Unattended Setup (WUE)  | โœ…      | `abt wue` โ€” autounattend.xml generator, TPM/SecureBoot/RAM bypasses, OOBE, accounts       |
| Generic OS Catalog              | โœ…      | Provider registry with hardware tags, cache persistence, rpi-imager JSON conversion       |
| UEFI:NTFS Dual-Partition Layout | โœ…      | FAT32 file-size analysis, ESP+NTFS layout planner, Windows To Go support                  |
| Fleet (Multi-Target) Writing    | โœ…      | `abt fleet` โ€” concurrent device sessions, progress snapshots, cancellation, USB detect    |



## v1.4.0 โ€” Feature Wave 13 (Recovery, Telemetry & Secure Boot)


Gap analysis from reference projects (rufus, etcher, MediaWriter, rpi-imager, Ventoy).

| Feature               | Status | Notes                                                                                 |
| --------------------- | ------ | ------------------------------------------------------------------------------------- |
| Drive Restore         | โœ…      | Factory-state restore with GPT/MBR management, sector wiping, multi-filesystem format |
| Performance Telemetry | โœ…      | Bottleneck detection, per-phase throughput, session recording, JSON export/import     |
| Write Watchdog        | โœ…      | Stall detection with escalation chains, queue depth reduction, sync fallback, presets |
| WIM Extraction        | โœ…      | Header parsing, image enumeration, glob filtering, edition/build/arch detection       |
| Secure Boot Detection | โœ…      | EFI variable reading, firmware mode, key databases, PE Authenticode, bootloader ID    |


## v1.5.0 โ€” Feature Wave 14 (Filesystem Detection, Drive Scanning & Bootloader Management)


Gap analysis from reference projects (rufus, etcher, MediaWriter, rpi-imager, Ventoy).

| Feature                        | Status | Notes                                                                                      |
| ------------------------------ | ------ | ------------------------------------------------------------------------------------------ |
| Filesystem Detection           | โœ…      | Superblock magic detection for 17 filesystem types, confidence scores, metadata extraction |
| Drive Scanner                  | โœ…      | Async hot-plug scanning, DeviceAdapter trait, tokio broadcast events, scan snapshots       |
| Drive Constraints              | โœ…      | System drive protection, size checks, source overlap detection, auto-select best drive     |
| Windows To Go                  | โœ…      | ISO analysis, GPT/MBR partition planning, SAN policy, drive attribute validation           |
| Syslinux/Bootloader Management | โœ…      | 8 bootloader types, version parsing, fs compatibility, syslinux.cfg generation, MBR plans  |

## v1.6.0 โ€” Feature Wave 15 (Image Formats, Security & Hardware Access)


Gap analysis from reference projects (rufus, etcher, MediaWriter, rpi-imager, Ventoy).

| Feature                | Status | Notes                                                                                   |
| ---------------------- | ------ | --------------------------------------------------------------------------------------- |
| FFU Image Parser       | โœ…      | Security/image/store header parsing, manifest extraction, FfuReader streaming, 9 tests  |
| ISOHybrid Detection    | โœ…      | MBR/GPT hybrid analysis, Isolinux/GRUB2/GenericMBR, write mode recommendation, 11 tests |
| Process Lock Detection | โœ…      | Cross-platform lock scanning (Linux /proc, macOS lsof, Windows wmic), 10 tests          |
| Privilege Elevation    | โœ…      | UAC/pkexec/sudo/osascript re-launch, status reporting, method detection, 12 tests       |
| Optical Disc Reader    | โœ…      | CD/DVD/Blu-ray reading, ISO 9660 PVD, retry/zero-fill, SHA-256 verification, 9 tests    |
## v1.7.0 โ€” Feature Wave 16 (FIPS Compliance & Formal Verification)


NIST FIPS, CMMC 2.0 Level 2, and DoD compliance hardening; formal verification of safety invariants.

| Feature                        | Status | Notes                                                                                     |
| ------------------------------ | ------ | ----------------------------------------------------------------------------------------- |
| FIPS Compliance Module         | โœ…      | FIPS 140-2/3 mode, algorithm validation gate, runtime enforcement via `--fips` / env var  |
| SP 800-90A CSPRNG              | โœ…      | `getrandom` OS CSPRNG replaces xorshift64 in FIPS mode for secure erase patterns          |
| SP 800-88 Sanitization Records | โœ…      | Certificate generation per NIST SP 800-88 Rev 1 ยง4.7, JSON serialization                  |
| CMMC Audit Trail               | โœ…      | HMAC-SHA256 integrity-chained event log, JSON-lines format, SIEM-ready                    |
| FIPS Device Fingerprinting     | โœ…      | SHA-256 replaces CRC32 for device tokens in FIPS mode (FIPS 180-4)                        |
| TLS Hardening                  | โœ…      | TLS 1.2 minimum, HTTPS-only URL validation in FIPS mode (SP 800-52 Rev 2)                 |
| FIPS Algorithm Gate            | โœ…      | Hash algorithm validation rejects MD5/CRC32/BLAKE3 in FIPS mode (SP 800-131A)             |
| Compliance Self-Assessment     | โœ…      | `abt compliance` command โ€” FIPS/CMMC/DoD checklist with JSON output for auditors          |
| Formal Verification            | โœ…      | 10 Safety Invariants (SI-1 โ€“ SI-10), Kani proof harnesses, compile-time static assertions |
| Property-Based Testing         | โœ…      | 24 proptest harnesses covering safety, hashing, progress, and device enumeration          |
| Unsafe Audit                   | โœ…      | All 17 `unsafe` blocks documented with `// SAFETY:` comments per Rust API Guidelines      |