mirror of
https://github.com/storytold/wordcraft.git
synced 2026-10-26 11:27:10 -06:00
Progress docs per craftrules standards/progress-docs.md: target-app parity, gaps, roadmap with alpha gate, readiness by audience (full / mainstream / essentials) with Opus 5.5 hours, and feature, format, layout, hardware, UI and localization parity docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
940 B
Rust
23 lines
940 B
Rust
//! `cargo xtask parity`: write docs/parity-checklist.md from the live command registry compared with the
|
|
//! word-processor feature catalog (via `wordcraft-cli parity --markdown`).
|
|
|
|
use std::path::Path;
|
|
|
|
pub fn run(root: &Path) -> Result<(), String> {
|
|
let out = crate::cargo()
|
|
.args(["run", "-q", "-p", "wordcraft-cli", "--", "parity", "--markdown"])
|
|
.output()
|
|
.map_err(|e| format!("cargo run wordcraft-cli: {e}"))?;
|
|
if !out.status.success() {
|
|
return Err(format!("wordcraft-cli parity failed:\n{}", String::from_utf8_lossy(&out.stderr)));
|
|
}
|
|
let md = String::from_utf8_lossy(&out.stdout).to_string();
|
|
let path = root.join("docs/parity-checklist.md");
|
|
std::fs::write(&path, &md).map_err(|e| format!("{}: {e}", path.display()))?;
|
|
if let Some(line) = md.lines().find(|l| l.starts_with("**")) {
|
|
println!("{line}");
|
|
}
|
|
println!("wrote {}", path.display());
|
|
Ok(())
|
|
}
|