Scope decisions (in-scope parity headline, deferred tabs), STEP import and kernel notes in ROADMAP/plan
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
1 parent
9d46efc9ec
commit
eb2a5d27b9
3 files changed
+112
-63
No files matched your search
+27
-5
@@ -24,9 +24,19 @@ const TABS: &[(&str, &str)] = &[
|
||||
("ToolsTab", "UTILITIES"),
|
||||
];
|
||||
|
||||
/// The tabs the headline number counts (M0 scope).
|
||||
/// The tabs the headline number counts (now: SOLID and SKETCH).
|
||||
const HEADLINE: &[&str] = &["SOLID", "SKETCH"];
|
||||
|
||||
/// The owner's scope: these tabs (and the PLASTIC subset below) count toward the in-scope
|
||||
/// figure; the rest of Fusion is deferred and listed separately.
|
||||
const IN_SCOPE_TABS: &[&str] = &["SOLID", "SKETCH", "ASSEMBLY", "SHEET METAL"];
|
||||
/// The PLASTIC commands in scope (enclosure features).
|
||||
const PLASTIC_SUBSET: &[&str] = &["FusionBossCommand", "FusionRibCommand", "FusionWebCommand", "FusionLipCommand", "FusionSnapFitCommand"];
|
||||
|
||||
fn in_scope(e: &Entry) -> bool {
|
||||
IN_SCOPE_TABS.contains(&e.tab.as_str()) || (e.tab == "PLASTIC" && PLASTIC_SUBSET.contains(&e.id.as_str()))
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Entry {
|
||||
pub tab: String,
|
||||
@@ -117,13 +127,17 @@ pub fn run(root: &Path, refresh: bool) -> Result<(), String> {
|
||||
let head: Vec<&Entry> = catalog.iter().filter(|e| HEADLINE.contains(&e.tab.as_str())).collect();
|
||||
let head_live = head.iter().filter(|e| live(e)).count();
|
||||
let all_live = catalog.iter().filter(|e| live(e)).count();
|
||||
let scope: Vec<&Entry> = catalog.iter().filter(|e| in_scope(e)).collect();
|
||||
let scope_live = scope.iter().filter(|e| live(e)).count();
|
||||
let mut md = format!(
|
||||
"# Fusion command parity\n\nGenerated by `cargo xtask parity` from `xtask/data/fusion-catalog.tsv` (the toolbar commands of Fusion's Design workspace, ids and names only) and the live command registry (`solvecraft-cli commands`). A command counts as live when SolveCraft registers the same command id. This measures breadth, not depth; see ROADMAP.md and docs/oracle.md for depth.\n\n**SOLID + SKETCH: {head_live} / {} commands live ({:.0}%).** All Design tabs: {all_live} / {} ({:.0}%). Registered commands: {}.\n\n| Tab | Panel | Live | Total | % |\n|---|---|---:|---:|---:|\n",
|
||||
"# Fusion command parity\n\nGenerated by `cargo xtask parity` from `xtask/data/fusion-catalog.tsv` (the toolbar commands of Fusion's Design workspace, ids and names only) and the live command registry (`solvecraft-cli commands`). A command counts as live when SolveCraft registers the same command id. This measures breadth, not depth; see ROADMAP.md and docs/oracle.md for depth.\n\n**In scope (SOLID, SKETCH, ASSEMBLY, SHEET METAL, PLASTIC enclosure subset): {scope_live} / {} commands live ({:.0}%).** SOLID + SKETCH: {head_live} / {} ({:.0}%). Registered commands: {}.\n\nDeferred until further notice (not in the in-scope figure): MESH, FORM, SURFACE beyond what solids need, PCB, render, animation, simulation, manufacture, drawings, MANAGE, UTILITIES and the rest of PLASTIC. All Design tabs together: {all_live} / {} ({:.0}%).\n\n| Tab | Panel | Live | Total | % |\n|---|---|---:|---:|---:|\n",
|
||||
scope.len(),
|
||||
pct(scope_live, scope.len()),
|
||||
head.len(),
|
||||
pct(head_live, head.len()),
|
||||
ids.len(),
|
||||
catalog.len(),
|
||||
pct(all_live, catalog.len()),
|
||||
ids.len()
|
||||
);
|
||||
let mut groups: Vec<(String, String, usize, usize)> = Vec::new();
|
||||
for e in &catalog {
|
||||
@@ -136,7 +150,13 @@ pub fn run(root: &Path, refresh: bool) -> Result<(), String> {
|
||||
None => groups.push((e.tab.clone(), e.panel.clone(), l, 1)),
|
||||
}
|
||||
}
|
||||
for (t, p, l, n) in &groups {
|
||||
for (t, p, l, n) in groups.iter().filter(|g| IN_SCOPE_TABS.contains(&g.0.as_str())) {
|
||||
md += &format!("| {t} | {p} | {l} | {n} | {:.0}% |\n", pct(*l, *n));
|
||||
}
|
||||
let plastic: Vec<&Entry> = catalog.iter().filter(|e| e.tab == "PLASTIC" && PLASTIC_SUBSET.contains(&e.id.as_str())).collect();
|
||||
md += &format!("| PLASTIC | enclosure subset | {} | {} | {:.0}% |\n", plastic.iter().filter(|e| live(e)).count(), plastic.len(), pct(plastic.iter().filter(|e| live(e)).count(), plastic.len()));
|
||||
md += "\n### Deferred tabs\n\n| Tab | Panel | Live | Total | % |\n|---|---|---:|---:|---:|\n";
|
||||
for (t, p, l, n) in groups.iter().filter(|g| !IN_SCOPE_TABS.contains(&g.0.as_str())) {
|
||||
md += &format!("| {t} | {p} | {l} | {n} | {:.0}% |\n", pct(*l, *n));
|
||||
}
|
||||
md += "\n## Live (SOLID, SKETCH)\n\n";
|
||||
@@ -149,7 +169,9 @@ pub fn run(root: &Path, refresh: bool) -> Result<(), String> {
|
||||
}
|
||||
std::fs::write(root.join("docs/parity.md"), md).map_err(|e| format!("docs/parity.md: {e}"))?;
|
||||
println!(
|
||||
"parity: SOLID+SKETCH {head_live}/{} ({:.0}%), all tabs {all_live}/{} → docs/parity.md",
|
||||
"parity: in scope {scope_live}/{} ({:.0}%), SOLID+SKETCH {head_live}/{} ({:.0}%), all tabs {all_live}/{} → docs/parity.md",
|
||||
scope.len(),
|
||||
pct(scope_live, scope.len()),
|
||||
head.len(),
|
||||
pct(head_live, head.len()),
|
||||
catalog.len()
|
||||
|
||||
Reference in new issue
Block a user