From a8545ffb6762a506761a9b9f7faf3be58d0bdc71 Mon Sep 17 00:00:00 2001 From: Adam Hathcock Date: Sat, 21 Feb 2026 16:44:22 +0000 Subject: [PATCH] initial plan --- plans/sharpcompress-cli-native-aot-plan.md | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 plans/sharpcompress-cli-native-aot-plan.md diff --git a/plans/sharpcompress-cli-native-aot-plan.md b/plans/sharpcompress-cli-native-aot-plan.md new file mode 100644 index 00000000..f249ce83 --- /dev/null +++ b/plans/sharpcompress-cli-native-aot-plan.md @@ -0,0 +1,45 @@ +# SharpCompress CLI Native AOT Plan (System.CommandLine + Spectre.Console) + +## Goal +Create a `net10.0` Native AOT console tool to inspect archive files. + +## Libraries +- System.CommandLine (parsing, help, completions) +- Spectre.Console (terminal output) + +## Access Modes +- `--access forward` (default): use Reader API first. +- `--access seekable`: force Archive API only. +- In default forward mode, auto-switch to seekable when required by format/layout. + +## Commands +- `inspect ` +- `list ` +- `formats` + +## Key Options +- `--access forward|seekable` +- `--format table|json` +- `--password` +- `--look-for-header` +- `--extension-hint` +- `--rewindable-buffer-size` + +## Fallback Rules (Default Forward) +1. Detect multi-volume archive parts -> use seekable. +2. Forward parse fails but seekable parse succeeds -> use seekable. +3. Report fallback reason in output. + +## Deliverables +- `src/SharpCompress.Cli/` project +- Mode-aware inspection service +- Table + JSON renderers +- CLI docs and examples +- Tests for forward/seekable/fallback behavior + +## Validation +- `dotnet tool restore` +- `dotnet csharpier format .` +- `dotnet csharpier check .` +- `dotnet test tests/SharpCompress.Test/SharpCompress.Test.csproj -c Release -f net10.0` +- `dotnet publish src/SharpCompress.Cli/SharpCompress.Cli.csproj -c Release -r osx-arm64 -p:PublishAot=true`