app
Adom Aiflow Wiring
Public Made by Adomby adom
Harness routing, connector serviceability and assembly review CLI with dynamic AI guidance
← Commit history
Add MIT Rust harness review prototype and wiring assembly guidance
7 files changed
+215−5
Cargo.lockadded+105@@ -0,0 +1,105 @@+# This file is automatically @generated by Cargo.+# It is not intended for manual editing.+version = 4++[[package]]+name = "adom-aiflow-wiring"+version = "0.1.0"+dependencies = [+ "serde_json",+]++[[package]]+name = "itoa"+version = "1.0.18"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"++[[package]]+name = "memchr"+version = "2.8.3"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98"++[[package]]+name = "proc-macro2"+version = "1.0.107"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9"+dependencies = [+ "unicode-ident",+]++[[package]]+name = "quote"+version = "1.0.47"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001"+dependencies = [+ "proc-macro2",+]++[[package]]+name = "serde"+version = "1.0.229"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"+dependencies = [+ "serde_core",+]++[[package]]+name = "serde_core"+version = "1.0.229"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"+dependencies = [+ "serde_derive",+]++[[package]]+name = "serde_derive"+version = "1.0.229"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"+dependencies = [+ "proc-macro2",+ "quote",+ "syn",+]++[[package]]+name = "serde_json"+version = "1.0.154"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "e7e9cc8b1b85264074fbcc02a88680c4096b1e47df8f739dceb03bf482f04bd6"+dependencies = [+ "itoa",+ "memchr",+ "serde",+ "serde_core",+ "zmij",+]++[[package]]+name = "syn"+version = "3.0.9"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"+dependencies = [+ "proc-macro2",+ "quote",+ "unicode-ident",+]++[[package]]+name = "unicode-ident"+version = "1.0.27"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "a2c754d6c33795a1c324727428e5a7dedb5b06195f9890bdbcba760d3e246563"++[[package]]+name = "zmij"+version = "1.0.23"+source = "registry+https://github.com/rust-lang/crates.io-index"+checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b"
Cargo.tomladded+7@@ -0,0 +1,7 @@+[package]+name = "adom-aiflow-wiring"+version = "0.1.0"+edition = "2021"+license = "MIT"+[dependencies]+serde_json = "1"
LICENSEadded+9@@ -0,0 +1,9 @@+MIT License++Copyright (c) 2026 Adom Industries Inc.++Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
README.md+4−2@@ -1,3 +1,5 @@-# Adom Aiflow Wiring+# adom-aiflow-wiring -Harness routing, connector serviceability and assembly review CLI with dynamic AI guidance+MIT-licensed initial Rust review CLI and dynamic guidance. Local prototype; not yet published or integrated into shared AIFlow.++See [skill](SKILL.md). Run `cargo test` and `cargo build --release`; invoke `target/release/adom-aiflow-wiring lint <review.json>`. Exit 0 means declared review checks pass, 1 unresolved findings, 2 input error. It does not independently validate CAD or physical assembly.
SKILL.mdadded+39@@ -0,0 +1,39 @@+---+name: adom-aiflow-wiring+description: Design and review real installed harnesses, connector mating and removal, wire colors, crimp contacts, bend radius, strain relief, cable holders and optional service animation.+---+# Wiring is part of the assembly++Run `adom-aiflow-wiring lint wiring.json` during connector placement, after harness changes and before final assembly export. Its context-dependent findings guide remaining work. This initial binary checks completeness and declared length; it does not solve collisions or certify the evidence. Keep missing supplier data unresolved and continue assumption-based studies explicitly labeled as such.++## Electrical identity and real components++Inventory each factory lead and added harness once. Verify wire color from the exact supplier drawing or inspected sample, not a convention. Map source pin, destination pin, net, color, AWG, insulation OD and polarity. State whether numbering is viewed from mating face or wire-entry face; show mirrored views clearly. Record exact header, mating housing, male/female contacts, retention accessories, contact finish, current rating and voltage/temperature limits.++Verify each contact's conductor and insulation ranges across tolerances, strip length, crimp height where specified, approved tool/die, pull-test requirement and terminal insertion orientation. A matching pitch does not establish compatibility. Bare fan leads do not imply a factory connector. Do not create a second cosmetic set of wires alongside the real leads.++## Mating and servicing++Record the insertion axis, full engagement position and withdrawal travel. Check connector body plus latch deflection, fingers, pliers, release tool or tweezers against surrounding parts throughout the motion. Distinguish releasing a mating housing latch from depinning individual terminals; specify the correct extraction tool and procedure for each. Do not pull on wires or pry against fragile PCB components as a default service method.++Use force in newtons, not an invented pressure. Record supplier mating/unmating and latch-release forces, applicable contact count, test method and cycle conditions. If unavailable, state unknown and plan a fixture measurement. Check PCB support and hold-down strength under these loads. Difficult connectors may require a dedicated release tool and more clearance; never assume finger access because the final mated position fits.++Optional extended animation: disengage latch, withdraw along the actual axis, pause fully separated, then reinsert and engage. Show tool and finger envelopes when relevant; animate the cable flexing consistently. Avoid stretching cables or passing through solids. Mark illustrative animation as such; it is not a force measurement or collision certificate.++## Routing and retention++Prefer moving the connector near the wire exit before choosing a long detour. Compare routing length, accessible latch direction, probe clearance and serviceability. Include minimum supplied length, cut tolerances, crimp preparation, retained factory lead portions and useful service slack.++Use tangent-continuous curves with an explicit minimum bend radius; avoid spline overshoot and sharp corners. Check swept insulation envelopes, abrasion, fan blades, hot surfaces and moving tools. Keep load on a strain-relief feature rather than contact crimps. Account for twist and connector rotation.++Suggest printable cable clips or brackets where wires otherwise float or snag. Specify material temperature/creep limits, attachment fasteners or snap retention, smooth radiused contact surfaces, tolerance, installation/removal sequence and access to release them. Printed clips near a hot sink require temperature evidence; do not assume generic PLA is suitable. Avoid trapping a service harness beneath permanently mounted hardware.++Publish wire/connector details on component pages and the project harness table. Group installed harnesses as meaningful viewer layers. Invalidate routing, electrical/thermal, mechanical and assembled-probing checks affected by connector relocation. Coordinate with adom-aiflow-mechanical for service tools and sequence; preserve all main AIFlow gates.++## Duplicate and physically impossible geometry checks++Assign stable physical conductor IDs and map every rendered wire mesh to them. Count factory stubs, installed paths and hidden nodes: a manifest with two wires does not prove a GLB contains only two. Trim the replaced factory tails at a deliberate splice boundary; retain only one continuous installed conductor. Flag duplicate endpoint pairs, overlapping paths, disconnected stubs, loops caused by spline overshoot and unexplained branches. Parallel conductors require an explicit electrical design reason, never a silent exception.++At each connector use the manufacturer's wire-entry datum and axis, terminal position and insulation-crimp envelope. Reserve a straight lead-out section before the first bend and the specified bend radius. Wires cannot enter arbitrary faces of a housing, pass through its walls, protrude from the mating face or bend sharply inside a crimp barrel. Verify scene geometry and cross-sections, not just endpoint coordinates. A bounded curve is not automatically a bend-radius pass. Make unresolved entry geometry a visible finding and fix it before presenting an installed harness as correct.++Review every neighboring connector, not only the harness's own endpoints. Reserve the complete plug insertion/withdrawal corridor plus latch, finger and release-tool access. A cable passing above a housing can block mating even without intersecting the housing solid. Check both static installed envelopes and all service swept volumes; route or retain wires outside those reservations. Include wire sag, manufacturing tolerances and service movement. Rerun after connector relocation or cable-holder changes.
page.json+10−3@@ -15,12 +15,19 @@ "email": "[email protected]" }, "tags": [],- "license": "proprietary",+ "license": "MIT", "visibility": { "public": true }, "sample_prompts": [],- "discovery_triggers": [],+ "discovery_triggers": [+ "wire harness",+ "connector withdrawal clearance",+ "crimp contacts",+ "wire colors",+ "strain relief",+ "duplicate wire geometry"+ ], "discovery_pitch": null, "metadata": {}, "created_at": "2026-10-16T10:32:42.056Z",@@ -33,4 +40,4 @@ }, "skills": [], "org": "adom"-}+}
src/main.rsadded+41@@ -0,0 +1,41 @@+use serde_json::{Value,json};+use std::{env,fs,process};+fn lint(v:&Value)->Value{+ let mut issues=Vec::new();+ let mut add=|id:&str,check:&str,hint:&str|issues.push(json!({"id":id,"check":check,"severity":"error","hint":hint}));+ let harnesses=v["harnesses"].as_array();+ if harnesses.map_or(true,|a|a.is_empty()){add("inventory","missing","Inventory every installed harness; distinguish factory leads from added wiring.");}+ for h in harnesses.into_iter().flatten(){+ let id=h["id"].as_str().unwrap_or("unnamed");+ for (k,hint) in [("pinColorEvidence","Verify actual supplier wire colors and contact numbering from the mating-face view; do not infer colors from conventions."),("terminalFitEvidence","Verify exact crimp contact, housing and header compatibility, wire AWG, insulation OD, strip length and tooling."),("releaseEvidence","Identify housing latch release separately from terminal depinning; specify tools and safe grip points."),("forceEvidence","Record supplier or measured mating/unmating force in newtons and test conditions. Unknown force is unresolved; do not invent it."),("sweptClearanceEvidence","Verify insertion and extraction travel, latch/tool/finger envelopes, and cable motion against the current assembly."),("bendEvidence","Verify supplier minimum bend radius, insulation envelope, slack and terminal strain relief."),("retentionEvidence","Specify cable clips or printed holders, attachment, edge protection, temperature compatibility and service release."),("neighborServiceClearanceEvidence","Check every neighboring connector mating, withdrawal and latch/tool corridor against wire envelopes, including sag and tolerances."),("revisionEvidence","Bind this review to board, assembly and harness revision hashes.")]{+ if h[k].as_str().map_or(true,|s|s.trim().is_empty()){add(id,k,hint)}+ }+ let wires=h["wires"].as_array();+ if wires.map_or(true,|a|a.is_empty()){add(id,"wires","List each conductor with net, color, source pin and destination pin.");}+ let mut ids=std::collections::HashSet::new();+ let mut endpoints=std::collections::HashSet::new();+ if h["expectedConductorCount"].as_u64().map_or(true,|n|n as usize != wires.map_or(0,|w|w.len())) {add(id,"conductorCount","Match physical conductor count to the connector pin inventory; reject duplicate decorative leads.");}+ for w in wires.into_iter().flatten(){+ match w["physicalId"].as_str(){Some(k) if !k.is_empty()=>{if !ids.insert(k){add(id,"duplicateConductor","A physical conductor ID occurs twice. Remove duplicate wire geometry.");}},_=>add(id,"physicalId","Assign one stable physical ID per conductor and reference its scene nodes.")}+ if let (Some(a),Some(b))=(w["sourcePin"].as_str(),w["destinationPin"].as_str()){if !endpoints.insert((a,b)){add(id,"duplicateEndpoints","Two conductor records connect the same endpoints; investigate duplicate geometry or explicitly model real parallel wires.");}}+ for key in ["continuousGeometryEvidence","entryAxisEvidence","housingIntersectionEvidence","bendRadiusEvidence"]{if w[key].as_str().map_or(true,|s|s.trim().is_empty()){add(id,key,"Verify one continuous insulated conductor, aligned straight crimp entry, no housing-wall penetration or self-intersection, and minimum bend radius. Inspect actual scene geometry, not only the manifest.");}}+ for k in ["net","color","sourcePin","destinationPin"]{if w[k].as_str().map_or(true,|s|s.trim().is_empty()){add(id,k,"Every conductor needs an unambiguous pin-to-pin and color map.");}}}+ match (h["requiredLengthMm"].as_f64(),h["minimumAvailableLengthMm"].as_f64()){+ (Some(r),Some(a)) if r.is_finite()&&a.is_finite()&&r>0.&&a>=r=>{},+ _=>add(id,"length","Required cut length including service slack and termination allowances must fit minimum supplied length.")+ }+ }+ json!({"schemaVersion":1,"passed":issues.is_empty(),"findings":issues,"animationRequired":false,"qualification":"Review completeness only; evidence paths require independent review, not proof of physical fit."})+}+fn main(){let a:Vec<_>=env::args().collect();if a.len()!=3||a[1]!="lint"{eprintln!("Usage: adom-aiflow-wiring lint wiring.json");process::exit(2)}let r=fs::read_to_string(&a[2]).map_err(|e|e.to_string()).and_then(|s|serde_json::from_str(&s).map_err(|e|e.to_string()));match r{Ok(v)=>{let o=lint(&v);println!("{}",serde_json::to_string_pretty(&o).unwrap());if o["passed"]!=true{process::exit(1)}},Err(e)=>{eprintln!("ERROR: {e}");process::exit(2)}}}+#[cfg(test)]mod tests{use super::*;#[test]fn unknowns_fail(){let r=lint(&json!({"harnesses":[{"id":"fan","requiredLengthMm":151,"minimumAvailableLengthMm":150}]}));assert_eq!(r["passed"],false);assert!(r["findings"].as_array().unwrap().iter().any(|v|v["check"]=="length"));assert!(r["findings"].as_array().unwrap().iter().any(|v|v["check"]=="forceEvidence"));}#[test]fn empty_fails(){assert_eq!(lint(&json!({}))["passed"],false)}}++#[cfg(test)] mod geometry_tests {+ use super::*;+ #[test] fn duplicate_conductors_and_service_gaps_are_reported() {+ let wire=json!({"physicalId":"w1","sourcePin":"fan.red","destinationPin":"J9.1","net":"5V_AUX","color":"red"});+ let r=lint(&json!({"harnesses":[{"id":"fan","expectedConductorCount":4,"wires":[wire.clone(),wire]}]}));+ let a=r["findings"].as_array().unwrap();+ for name in ["duplicateConductor","duplicateEndpoints","conductorCount","neighborServiceClearanceEvidence","entryAxisEvidence"] {assert!(a.iter().any(|x|x["check"]==name),"{name}");}+ }+}