scaffold: CLI surface with stubbed kernel and patch verbs

Add the spectral command tree -- kernel quest/test and patch
check/format/commit/create/submit/update -- with every verb wired through
main to a todo!() body, plus the pieces they will share:

- config: resolve the kernel tree from $SPECTRAL_KERNEL, falling back to
  ~/.spectral/linux, patches under ~/.spectral/patches, and confirm a tree
  really is one before anything uses it
- git: a thin wrapper over the git binary, currently only run
- error: one thiserror enum, converted once in main
- patch/checkpatch and patch/maintainers: seams around the tree's own
  scripts/checkpatch.pl and scripts/get_maintainer.pl, so spectral never
  carries a stale copy of the kernel's rules

20 functions are todo!(); the #[allow(dead_code)] sites mark the items
that are unreachable only until their caller is written. fmt, clippy -D
warnings, and test are all clean.
This commit is contained in:
2026-09-14 20:38:20 -04:00
parent 0ee045c71e
commit c25bf94c33
13 changed files with 754 additions and 3 deletions
+3 -1
View File
@@ -4,6 +4,8 @@ version = "0.1.0"
edition = "2024"
[dependencies]
clap = "4.6.7"
clap = { version = "4.6.7", features = ["derive"] }
reqwest = "0.13.5"
scraper = "0.27.0"
thiserror = "2"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }