{"$schema":"https://json.schemastore.org/sarif-2.1.0.json","version":"2.1.0","runs":[{"tool":{"driver":{"name":"codehealth","informationUri":"https://codehealth.canine.dev","rules":[{"id":"D1","name":"Cyclomatic Complexity","shortDescription":{"text":"Cyclomatic Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D1"},{"id":"D2","name":"Cognitive Complexity","shortDescription":{"text":"Cognitive Complexity"},"helpUri":"https://codehealth.canine.dev/dimensions/D2"},{"id":"D3","name":"God Classes","shortDescription":{"text":"God Classes"},"helpUri":"https://codehealth.canine.dev/dimensions/D3"},{"id":"D4","name":"Code Duplication","shortDescription":{"text":"Code Duplication"},"helpUri":"https://codehealth.canine.dev/dimensions/D4"},{"id":"D5","name":"Coupling","shortDescription":{"text":"Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D5"},{"id":"D6","name":"Cohesion (LCOM4)","shortDescription":{"text":"Cohesion (LCOM4)"},"helpUri":"https://codehealth.canine.dev/dimensions/D6"},{"id":"D9","name":"Test Distribution","shortDescription":{"text":"Test Distribution"},"helpUri":"https://codehealth.canine.dev/dimensions/D9"},{"id":"D10","name":"Test Quality","shortDescription":{"text":"Test Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D10"},{"id":"D12","name":"Dependency Hygiene","shortDescription":{"text":"Dependency Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/D12"},{"id":"D13","name":"Secret Scanning","shortDescription":{"text":"Secret Scanning"},"helpUri":"https://codehealth.canine.dev/dimensions/D13","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D14","name":"License Compliance","shortDescription":{"text":"License Compliance"},"helpUri":"https://codehealth.canine.dev/dimensions/D14"},{"id":"D15","name":"Churn \u00D7 Complexity Hotspots","shortDescription":{"text":"Churn \u00D7 Complexity Hotspots"},"helpUri":"https://codehealth.canine.dev/dimensions/D15"},{"id":"D17","name":"Explicit Debt","shortDescription":{"text":"Explicit Debt"},"helpUri":"https://codehealth.canine.dev/dimensions/D17"},{"id":"D20","name":"ADR Quality","shortDescription":{"text":"ADR Quality"},"helpUri":"https://codehealth.canine.dev/dimensions/D20"},{"id":"D26","name":"Project Cohesion","shortDescription":{"text":"Project Cohesion"},"helpUri":"https://codehealth.canine.dev/dimensions/D26"},{"id":"D28","name":"Secrets (history)","shortDescription":{"text":"Secrets (history)"},"helpUri":"https://codehealth.canine.dev/dimensions/D28","relationships":[{"target":{"id":"CWE-798","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-259","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A07:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-798","CWE-259"],"owasp":"A07:2025"}},{"id":"D29","name":"Static Analysis (SAST)","shortDescription":{"text":"Static Analysis (SAST)"},"helpUri":"https://codehealth.canine.dev/dimensions/D29","relationships":[{"target":{"id":"CWE-79","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-89","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-78","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-94","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-77","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A05:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-79","CWE-89","CWE-78","CWE-94","CWE-77"],"owasp":"A05:2025"}},{"id":"D30","name":"Dependency Vulnerabilities","shortDescription":{"text":"Dependency Vulnerabilities"},"helpUri":"https://codehealth.canine.dev/dimensions/D30","relationships":[{"target":{"id":"CWE-1395","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"CWE-937","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A03:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-1395","CWE-937"],"owasp":"A03:2025"}},{"id":"D34","name":"Knowledge Freshness","shortDescription":{"text":"Knowledge Freshness"},"helpUri":"https://codehealth.canine.dev/dimensions/D34"},{"id":"D35","name":"Change Coupling","shortDescription":{"text":"Change Coupling"},"helpUri":"https://codehealth.canine.dev/dimensions/D35"},{"id":"D43","name":"Malicious Dependencies","shortDescription":{"text":"Malicious Dependencies"},"helpUri":"https://codehealth.canine.dev/dimensions/D43","relationships":[{"target":{"id":"CWE-506","toolComponent":{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d"}},"kinds":["relevant"]},{"target":{"id":"A08:2025","toolComponent":{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61"}},"kinds":["relevant"]}],"properties":{"cwe":["CWE-506"],"owasp":"A08:2025"}},{"id":"D44","name":"Platform End-of-Life","shortDescription":{"text":"Platform End-of-Life"},"helpUri":"https://codehealth.canine.dev/dimensions/D44"},{"id":"AX10","name":"Code composition","shortDescription":{"text":"Code composition"},"helpUri":"https://codehealth.canine.dev/dimensions/AX10"},{"id":"AX3","name":"Project dependency cycles","shortDescription":{"text":"Project dependency cycles"},"helpUri":"https://codehealth.canine.dev/dimensions/AX3"},{"id":"AX4","name":"Dependency direction","shortDescription":{"text":"Dependency direction"},"helpUri":"https://codehealth.canine.dev/dimensions/AX4"},{"id":"AX8","name":"Test isolation","shortDescription":{"text":"Test isolation"},"helpUri":"https://codehealth.canine.dev/dimensions/AX8"},{"id":"AX9","name":"CQS / query purity","shortDescription":{"text":"CQS / query purity"},"helpUri":"https://codehealth.canine.dev/dimensions/AX9"},{"id":"AXB1","name":"Runtime evidence locked \u2014 no reproducible boot","shortDescription":{"text":"Runtime evidence locked \u2014 no reproducible boot"},"helpUri":"https://codehealth.canine.dev/dimensions/AXB1"},{"id":"ED5","name":"Idempotency","shortDescription":{"text":"Idempotency"},"helpUri":"https://codehealth.canine.dev/dimensions/ED5"},{"id":"M1","name":"Documentation (README)","shortDescription":{"text":"Documentation (README)"},"helpUri":"https://codehealth.canine.dev/dimensions/M1"},{"id":"M2","name":"Architecture documentation","shortDescription":{"text":"Architecture documentation"},"helpUri":"https://codehealth.canine.dev/dimensions/M2"},{"id":"M3","name":"Folder \u0026 project structure","shortDescription":{"text":"Folder \u0026 project structure"},"helpUri":"https://codehealth.canine.dev/dimensions/M3"},{"id":"M4","name":"Documentation accuracy","shortDescription":{"text":"Documentation accuracy"},"helpUri":"https://codehealth.canine.dev/dimensions/M4"},{"id":"P1","name":"CI/CD gates","shortDescription":{"text":"CI/CD gates"},"helpUri":"https://codehealth.canine.dev/dimensions/P1"},{"id":"P10","name":"Library API \u0026 versioning","shortDescription":{"text":"Library API \u0026 versioning"},"helpUri":"https://codehealth.canine.dev/dimensions/P10"},{"id":"P2","name":"Observability","shortDescription":{"text":"Observability"},"helpUri":"https://codehealth.canine.dev/dimensions/P2"},{"id":"P3","name":"Security \u0026 performance tooling","shortDescription":{"text":"Security \u0026 performance tooling"},"helpUri":"https://codehealth.canine.dev/dimensions/P3"},{"id":"P6","name":"Release Hygiene","shortDescription":{"text":"Release Hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/P6"},{"id":"PF3","name":"Async \u0026 latency hygiene","shortDescription":{"text":"Async \u0026 latency hygiene"},"helpUri":"https://codehealth.canine.dev/dimensions/PF3"},{"id":"X1","name":"Async correctness","shortDescription":{"text":"Async correctness"},"helpUri":"https://codehealth.canine.dev/dimensions/X1"},{"id":"X10","name":"Duplicated predicate","shortDescription":{"text":"Duplicated predicate"},"helpUri":"https://codehealth.canine.dev/dimensions/X10"},{"id":"X12","name":"Unreachable branch","shortDescription":{"text":"Unreachable branch"},"helpUri":"https://codehealth.canine.dev/dimensions/X12"},{"id":"X13","name":"Undrained process stream","shortDescription":{"text":"Undrained process stream"},"helpUri":"https://codehealth.canine.dev/dimensions/X13"},{"id":"X14","name":"Bypassable address classification","shortDescription":{"text":"Bypassable address classification"},"helpUri":"https://codehealth.canine.dev/dimensions/X14"},{"id":"X15","name":"Unvalidated length from an untrusted reader","shortDescription":{"text":"Unvalidated length from an untrusted reader"},"helpUri":"https://codehealth.canine.dev/dimensions/X15"},{"id":"X17","name":"Uncapped recursion over a caller-supplied document","shortDescription":{"text":"Uncapped recursion over a caller-supplied document"},"helpUri":"https://codehealth.canine.dev/dimensions/X17"},{"id":"X19","name":"Unrestored process-global state","shortDescription":{"text":"Unrestored process-global state"},"helpUri":"https://codehealth.canine.dev/dimensions/X19"},{"id":"X20","name":"Mistyped argument guard","shortDescription":{"text":"Mistyped argument guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X20"},{"id":"X21","name":"Side-effecting pattern guard","shortDescription":{"text":"Side-effecting pattern guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X21"},{"id":"X22","name":"Contradicted release guard","shortDescription":{"text":"Contradicted release guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X22"},{"id":"X23","name":"Unguarded diagnostic materialisation","shortDescription":{"text":"Unguarded diagnostic materialisation"},"helpUri":"https://codehealth.canine.dev/dimensions/X23"},{"id":"X24","name":"Document value interpolated into markup unescaped","shortDescription":{"text":"Document value interpolated into markup unescaped"},"helpUri":"https://codehealth.canine.dev/dimensions/X24"},{"id":"X25","name":"Inert configuration knob","shortDescription":{"text":"Inert configuration knob"},"helpUri":"https://codehealth.canine.dev/dimensions/X25"},{"id":"X26","name":"Unsynchronised callback handoff","shortDescription":{"text":"Unsynchronised callback handoff"},"helpUri":"https://codehealth.canine.dev/dimensions/X26"},{"id":"X27","name":"Collection changed while being enumerated","shortDescription":{"text":"Collection changed while being enumerated"},"helpUri":"https://codehealth.canine.dev/dimensions/X27"},{"id":"X28","name":"Index access outside its own emptiness guard","shortDescription":{"text":"Index access outside its own emptiness guard"},"helpUri":"https://codehealth.canine.dev/dimensions/X28"},{"id":"X3","name":"Exception handling","shortDescription":{"text":"Exception handling"},"helpUri":"https://codehealth.canine.dev/dimensions/X3"},{"id":"X30","name":"Support guard that admits what it rejects","shortDescription":{"text":"Support guard that admits what it rejects"},"helpUri":"https://codehealth.canine.dev/dimensions/X30"},{"id":"X32","name":"Type resolved by simple name across every loaded assembly","shortDescription":{"text":"Type resolved by simple name across every loaded assembly"},"helpUri":"https://codehealth.canine.dev/dimensions/X32"},{"id":"X6","name":"Hand-rolled structured-format parsing","shortDescription":{"text":"Hand-rolled structured-format parsing"},"helpUri":"https://codehealth.canine.dev/dimensions/X6"},{"id":"X7","name":"Silent fallback defaults","shortDescription":{"text":"Silent fallback defaults"},"helpUri":"https://codehealth.canine.dev/dimensions/X7"},{"id":"X9","name":"Subsumed condition operand","shortDescription":{"text":"Subsumed condition operand"},"helpUri":"https://codehealth.canine.dev/dimensions/X9"}]}},"results":[{"ruleId":"D1","level":"warning","message":{"text":"MCPDispatch.dispatch (cyclomatic 60): MCPDispatch.dispatch has cyclomatic complexity 60 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/MCPDispatch.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"55ba67db6801291ddbb53ac953195649f56a386bd2fabc3c122956762c6e6c8d"}},{"ruleId":"D1","level":"warning","message":{"text":"Actions.click (cyclomatic 34): Actions.click has cyclomatic complexity 34 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"6101457cd83a2c6f145e81869dec674b7f2d61cfc28e51ec50cdbac4794285f0"}},{"ruleId":"D1","level":"warning","message":{"text":"Perception.fullElementInfo (cyclomatic 30): Perception.fullElementInfo has cyclomatic complexity 30 (threshold 15). To reduce it, split the body: these branches sit side by side rather than nested inside one another, so extracting each one on its own would leave a function per branch. Group the statements between the checks into named steps and move each step into its own function, so the body reads as a short sequence of named stages."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"b15e1a651ce69bb9c99e47ed4d56c9d04ed2ed88c8ec85ca018b17c5ffe6a8cf"}},{"ruleId":"D1","level":"warning","message":{"text":"Perception.findElements (cyclomatic 28): Perception.findElements has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"d8ad18ebbf373c8818f34497dabcd29c8fa4b68119c5c2956b418b58fcefc287"}},{"ruleId":"D1","level":"warning","message":{"text":"ScreenCapture.captureWindowSyncWithReason (cyclomatic 28): ScreenCapture.captureWindowSyncWithReason has cyclomatic complexity 28 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Screenshot/ScreenCapture.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"9d16624a462ae32595b28217eadb0811ab25df857a595e2d80c83c6271985500"}},{"ruleId":"D1","level":"warning","message":{"text":"Actions.typeText (cyclomatic 27): Actions.typeText has cyclomatic complexity 27 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"5605767d562efeb4f400366c78bc86d2ee5c007f75acfeb3d55f348f099612e4"}},{"ruleId":"D1","level":"warning","message":{"text":"Actions.scoreFieldCandidates (cyclomatic 26): Actions.scoreFieldCandidates has cyclomatic complexity 26 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":1095}}}],"partialFingerprints":{"codehealthFindingId/v1":"df53909caa8b6e08ad621dd644b5688b3518a606af3d207afc9c64257ba26a96"}},{"ruleId":"D1","level":"warning","message":{"text":"Actions.manageWindow (cyclomatic 22): Actions.manageWindow has cyclomatic complexity 22 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: Actions.mapSpecialKey (cyclomatic 26) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":915}}}],"partialFingerprints":{"codehealthFindingId/v1":"ccc8faa616b823cd3f08998e826638a6051bbdf0bf05b1033d54d40bb1072338"}},{"ruleId":"D1","level":"warning","message":{"text":"SetupWizard.setupPythonVenv (cyclomatic 21): SetupWizard.setupPythonVenv has cyclomatic complexity 21 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/SetupWizard.swift"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"22a67a36cf635d5a129416f84d7a8babad0130e42815948763e46effb7cf1bef"}},{"ruleId":"D1","level":"warning","message":{"text":"Annotate.annotate (cyclomatic 19): Annotate.annotate has cyclomatic complexity 19 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Annotate.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"862e12ffae13bb830cbc1ceb48ea6d1b6e39143793b7a30077785488d9a6bd1e"}},{"ruleId":"D1","level":"warning","message":{"text":"Annotate.collectElements (cyclomatic 17): Annotate.collectElements has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Annotate.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"c8cca2e339947193f5da49e522027175bc3759ba0dd30f5f11c62e00ff93bc02"}},{"ruleId":"D1","level":"warning","message":{"text":"RecipeEngine.run (cyclomatic 17): RecipeEngine.run has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Recipes/RecipeEngine.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"6879daf4d4676fc2575afe32a5873f5738f251d08461c121cb8b97d97a412306"}},{"ruleId":"D1","level":"warning","message":{"text":"RecipeEngine.executeStep (cyclomatic 17): RecipeEngine.executeStep has cyclomatic complexity 17 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Recipes/RecipeEngine.swift"},"region":{"startLine":252}}}],"partialFingerprints":{"codehealthFindingId/v1":"2a62ed6a63c208cc2858003f36be9a0e26bdf443f5b03a8b4cc9a82ad57dac97"}},{"ruleId":"D1","level":"warning","message":{"text":"Actions.drag (cyclomatic 16): Actions.drag has cyclomatic complexity 16 (threshold 15). To reduce it, separate the cases: extract each independent branch into its own named function, and where the body has guards that only reject input, fold those into early returns at the top. This is NOT this file\u0027s highest cyclomatic complexity: Actions.mapSpecialKey (cyclomatic 26) is higher and carries no row of its own \u2014 it was excluded as a flat dispatcher (a long switch/match over independent cases: many branches, almost no nesting), which this dimension does not treat as a refactor obligation. It is named here so the ranking you see in this file is not mistaken for the whole of it; the excluded method is counted neither in this dimension\u0027s figures nor in its score."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":780}}}],"partialFingerprints":{"codehealthFindingId/v1":"9065ec636801d3794ed0cdda55aa0033d2daa5e40904d930832593e395c7ce91"}},{"ruleId":"D1","level":"warning","message":{"text":"Perception.screenshot (cyclomatic 16): Perception.screenshot has cyclomatic complexity 16 (threshold 15). To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Where every arm is uniform \u2014 the same kind of value, with no behaviour of its own \u2014 a table keyed by the case is the shorter form; wherever the arms carry different data or different behaviour, keep them as cases, because collapsing those trades an explicit, reviewable set of cases for nothing."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":356}}}],"partialFingerprints":{"codehealthFindingId/v1":"17191015e80ee0e85ca887967c5ef6a6ea2488a71b632033628c3d974d7c4a79"}},{"ruleId":"D2","level":"warning","message":{"text":"MCPDispatch.dispatch (cognitive 64): MCPDispatch.dispatch has cognitive complexity 64 (threshold 15). Drivers by points: if/else 27 (53 pts), boolean chains 4, ternaries 2 (4 pts), error handling 1 (2 pts), match/switch 1 (nesting depth added 29). The drivers above price the dispatch low by construction \u2014 a dispatch is charged once however many cases it lists, while each branch inside an arm is charged in full \u2014 so most of this count is what the case bodies hold, and the arms are where it can be reduced. To reduce it, keep the dispatch but shrink the arms: move each non-trivial case body into its own named function (or onto the value being matched) so the dispatch reads one line per case, and group related cases into a sub-dispatch. Keep every case explicit, and make the behaviour for cases you do not list a deliberate choice rather than an accident."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/MCPDispatch.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"feb4a731ee7aa48900a124a2e091600e0c68ff3ee939c8ad6edf58f7099380fe"}},{"ruleId":"D2","level":"warning","message":{"text":"Actions.typeText (cognitive 63): Actions.typeText has cognitive complexity 63 (threshold 15). Drivers by points: if/else 24 (49 pts), error handling 3 (6 pts), ternaries 2 (5 pts), boolean chains 3 (nesting depth added 31). To reduce it, flatten the nesting: this score is depth rather than breadth \u2014 most of its points come from checks stacked inside one another, so the work sits several levels in. Invert each enclosing check into an early exit (a return, or the language\u0027s equivalent) so the happy path stays at one level, and where a level cannot be exited early, lift the block it encloses into its own named function."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"d653af04e1ac414a60e3afe8a6f786a864fcc2145346c8d0458e37e497ad969e"}},{"ruleId":"D2","level":"warning","message":{"text":"Actions.click (cognitive 48): Actions.click has cognitive complexity 48 (threshold 15). Drivers by points: if/else 16 (25 pts), boolean chains 11, error handling 4 (9 pts), match/switch 2 (3 pts) (nesting depth added 15). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"1c38d0cbd66b92f38c0c03c8db0537e05fb82df13924fab17017dd1161e354f3"}},{"ruleId":"D2","level":"warning","message":{"text":"Perception.fullElementInfo (cognitive 36): Perception.fullElementInfo has cognitive complexity 36 (threshold 15). Drivers by points: if/else 28 (32 pts), boolean chains 2, ternaries 1 (2 pts) (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"06c737cfadc58ba1b412547daf6c1beef4ff1760d5f7df78221ff31c92e16163"}},{"ruleId":"D2","level":"warning","message":{"text":"Perception.findElements (cognitive 35): Perception.findElements has cognitive complexity 35 (threshold 15). Drivers by points: if/else 18 (25 pts), boolean chains 9, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":80}}}],"partialFingerprints":{"codehealthFindingId/v1":"f11f54ab913bd3378f98e98383474340a41b8998a83fa58948efd0c8f959375f"}},{"ruleId":"D2","level":"warning","message":{"text":"ScreenCapture.captureWindowSyncWithReason (cognitive 35): ScreenCapture.captureWindowSyncWithReason has cognitive complexity 35 (threshold 15). Drivers by points: if/else 17 (24 pts), boolean chains 10, ternaries 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Screenshot/ScreenCapture.swift"},"region":{"startLine":62}}}],"partialFingerprints":{"codehealthFindingId/v1":"bb4733a0c49548bd63cb51a7ac579594092d01d524cd66e8d7c3ea2277d56b09"}},{"ruleId":"D2","level":"warning","message":{"text":"RecipeEngine.run (cognitive 34): RecipeEngine.run has cognitive complexity 34 (threshold 15). Drivers by points: if/else 13 (30 pts), loops 2 (3 pts), boolean chains 1 (nesting depth added 18). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Recipes/RecipeEngine.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"d1910f81232d453fede26a6981fb61eadaf3cdcb8c2a9f5582ad1b83c96e35f0"}},{"ruleId":"D2","level":"warning","message":{"text":"Actions.scoreFieldCandidates (cognitive 30): Actions.scoreFieldCandidates has cognitive complexity 30 (threshold 15). Drivers by points: if/else 10 (15 pts), boolean chains 13, loops 1, ternaries 1 (nesting depth added 5). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":1095}}}],"partialFingerprints":{"codehealthFindingId/v1":"d2fafc2989ad1b1110feba604864964b20f7a715c1fd6ae429c9b5539b6952d6"}},{"ruleId":"D2","level":"warning","message":{"text":"SetupWizard.setupPythonVenv (cognitive 29): SetupWizard.setupPythonVenv has cognitive complexity 29 (threshold 15). Drivers by points: if/else 14 (19 pts), boolean chains 6, loops 2 (4 pts) (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/SetupWizard.swift"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5ab6e07c4296cb9915fa764acf4bd059dde9755af6d6d52b1fa4d72a3c58941"}},{"ruleId":"D2","level":"warning","message":{"text":"Actions.manageWindow (cognitive 27): Actions.manageWindow has cognitive complexity 27 (threshold 15). Drivers by points: if/else 14 (22 pts), boolean chains 2, ternaries 1 (2 pts), match/switch 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":915}}}],"partialFingerprints":{"codehealthFindingId/v1":"44c46c312f702adca1f94e9dc1d967fcdc6ab444f799380284a960534de3e566"}},{"ruleId":"D2","level":"warning","message":{"text":"Annotate.annotate (cognitive 27): Annotate.annotate has cognitive complexity 27 (threshold 15). Drivers by points: if/else 17 (23 pts), boolean chains 3, loops 1 (nesting depth added 6). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Annotate.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"8030eb83ef564f5330002360fb103a9c37b42d1cde244f4975a2ebe0a9b605a4"}},{"ruleId":"D2","level":"warning","message":{"text":"Actions.scroll (cognitive 24): Actions.scroll has cognitive complexity 24 (threshold 15). Drivers by points: if/else 7 (12 pts), error handling 4 (9 pts), ternaries 1 (2 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":530}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cd03baf887e6a6ff67874dc07bb11f6da372f05482b58e203a56244a9bce799"}},{"ruleId":"D2","level":"warning","message":{"text":"MCPServer.run (cognitive 24): MCPServer.run has cognitive complexity 24 (threshold 15). Drivers by points: if/else 8 (21 pts), match/switch 1 (2 pts), loops 1 (nesting depth added 14). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/MCPServer.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"f7e5b13e828eff8f898919415e2bfdd683c11965e5db5f153152e5bf5448be81"}},{"ruleId":"D2","level":"warning","message":{"text":"Doctor.checkShowUIModel (cognitive 24): Doctor.checkShowUIModel has cognitive complexity 24 (threshold 15). Drivers by points: if/else 10 (19 pts), loops 2 (4 pts), boolean chains 1 (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/Doctor.swift"},"region":{"startLine":342}}}],"partialFingerprints":{"codehealthFindingId/v1":"a1328830e880cf51a2d549a9c588df81efb9bc3b8f4f6ed18a6c548d66478937"}},{"ruleId":"D2","level":"warning","message":{"text":"Perception.collectContent (cognitive 23): Perception.collectContent has cognitive complexity 23 (threshold 15). Drivers by points: if/else 8 (12 pts), ternaries 4 (10 pts), loops 1 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":825}}}],"partialFingerprints":{"codehealthFindingId/v1":"3c9bd8d0084cb6b9c3de5ec77a4d33329b6200b9614843710476c31389069a11"}},{"ruleId":"D2","level":"warning","message":{"text":"Perception.buildContext (cognitive 21): Perception.buildContext has cognitive complexity 21 (threshold 15). Drivers by points: if/else 12 (21 pts) (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":484}}}],"partialFingerprints":{"codehealthFindingId/v1":"1879778a93043ed7f8f69d92222d92cd874eddcd7bb41c96ef18ca37f7e59ec8"}},{"ruleId":"D2","level":"warning","message":{"text":"Actions.drag (cognitive 20): Actions.drag has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11 (15 pts), boolean chains 3, loops 1, ternaries 1 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":780}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5ad0a5535aac799d55144dfe0910930c429b773cc81ea0ced5f93eff68e8079"}},{"ruleId":"D2","level":"warning","message":{"text":"FocusManager.focus (cognitive 20): FocusManager.focus has cognitive complexity 20 (threshold 15). Drivers by points: if/else 6 (15 pts), loops 2 (3 pts), boolean chains 2 (nesting depth added 10). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/FocusManager.swift"},"region":{"startLine":15}}}],"partialFingerprints":{"codehealthFindingId/v1":"210792682c1e1b778652bfc901e8e6616f745e3e76c42a255ea506ff4e676e42"}},{"ruleId":"D2","level":"warning","message":{"text":"Annotate.collectElements (cognitive 20): Annotate.collectElements has cognitive complexity 20 (threshold 15). Drivers by points: if/else 7 (10 pts), boolean chains 8, loops 1, ternaries 1 (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Annotate.swift"},"region":{"startLine":211}}}],"partialFingerprints":{"codehealthFindingId/v1":"47dc1e73411348faafd586cbec4eecea98f500282f3223f54b9d040f69a932df"}},{"ruleId":"D2","level":"warning","message":{"text":"Perception.buildAppInfo (cognitive 18): Perception.buildAppInfo has cognitive complexity 18 (threshold 15). Drivers by points: if/else 6 (15 pts), ternaries 1 (3 pts) (nesting depth added 11). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":586}}}],"partialFingerprints":{"codehealthFindingId/v1":"96b5834853ed57425d4124a5ee80a25a3050c98238fd5740d347b6f81f0bace7"}},{"ruleId":"D2","level":"warning","message":{"text":"Doctor.checkVisionSidecar (cognitive 18): Doctor.checkVisionSidecar has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8 (17 pts), boolean chains 1 (nesting depth added 9). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/Doctor.swift"},"region":{"startLine":411}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab537f29542de3823e648ef4e4679f4f68664b939f70b8e650f700270156c269"}},{"ruleId":"D2","level":"warning","message":{"text":"Doctor.checkVisionBinary (cognitive 17): Doctor.checkVisionBinary has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (14 pts), boolean chains 2, loops 1 (nesting depth added 7). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/Doctor.swift"},"region":{"startLine":239}}}],"partialFingerprints":{"codehealthFindingId/v1":"b53c11e6fc13dc701ff61cc7e794ee4b458b70067bc84cef351c1e697e005653"}},{"ruleId":"D2","level":"warning","message":{"text":"SetupWizard.configureMCP (cognitive 17): SetupWizard.configureMCP has cognitive complexity 17 (threshold 15). Drivers by points: if/else 7 (9 pts), boolean chains 5, error handling 2 (3 pts) (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/SetupWizard.swift"},"region":{"startLine":236}}}],"partialFingerprints":{"codehealthFindingId/v1":"42bcaa5c3d72afb4c33e13213e4c4180f0b0d2e92994e3f9954e4820f93882fd"}},{"ruleId":"D2","level":"warning","message":{"text":"Perception.readContent (cognitive 16): Perception.readContent has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9 (13 pts), boolean chains 3 (nesting depth added 4). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":232}}}],"partialFingerprints":{"codehealthFindingId/v1":"96d2a13e81db352296b74a362a9086d2d1657e2eb258ddc7e5587bfa0aba10d8"}},{"ruleId":"D2","level":"warning","message":{"text":"CDPBridge.evaluateJS (cognitive 16): CDPBridge.evaluateJS has cognitive complexity 16 (threshold 15). Drivers by points: if/else 6 (8 pts), boolean chains 5, match/switch 2 (3 pts) (nesting depth added 3). To reduce it, split the body into named stages: move each independent step or branch into its own named function so the body reads as a short sequence of named calls rather than one long body."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Vision/CDPBridge.swift"},"region":{"startLine":203}}}],"partialFingerprints":{"codehealthFindingId/v1":"5a9405bebc29ac3d25681dcbfd31d5847a3be485a935922ed8f2d25472a8e784"}},{"ruleId":"D2","level":"warning","message":{"text":"SetupWizard.setupVision (cognitive 16): SetupWizard.setupVision has cognitive complexity 16 (threshold 15). Drivers by points: if/else 11 (14 pts), boolean chains 2 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth \u2014 checks laid out side by side rather than stacked \u2014 so group the statements between the checks into named steps and move each step into its own function. Some of it IS depth: where a check sits inside another whose only job is to reach it, merge the two into one condition, and where an else follows a branch that already returns, drop the trailing else and let the rest of the body continue at one level."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/SetupWizard.swift"},"region":{"startLine":375}}}],"partialFingerprints":{"codehealthFindingId/v1":"fe6e4d8afe28260205a74af228b0ec5171cff5fb8610a72b31f5a906ed8da8f4"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: MCPDispatch.dispatch: MethodTooLong \u2014 dispatch runs 218 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 118 over it, 2.18\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/MCPDispatch.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"000a8d6835eefe59917f6f8cd817b141d6b8b70a80a3c014b531f0218d40a22d"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Actions: ClassTooLong \u2014 749 significant lines (blank, comment-only and punctuation-only lines excluded), 22 methods. The bar is 400 significant lines; this is 349 over it, 1.87\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":20}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff3f17bfee15d7f2bac3216ed0ca37cc291acf97856136ced3cc5fcfcf11f8fb"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: Perception: ClassTooLong \u2014 613 significant lines (blank, comment-only and punctuation-only lines excluded), 32 methods. The bar is 400 significant lines; this is 213 over it, 1.53\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":14}}}],"partialFingerprints":{"codehealthFindingId/v1":"71f279435636aaca16433cdda950230874ad62c28f801c686e801266daf69429"}},{"ruleId":"D3","level":"warning","message":{"text":"ClassTooLong: SetupWizard: ClassTooLong \u2014 606 significant lines (blank, comment-only and punctuation-only lines excluded), 26 methods. The bar is 400 significant lines; this is 206 over it, 1.52\u00D7 the bar. To reduce it, group the members that share the same data into a smaller type of their own and delegate to it, so no single type carries every responsibility."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/SetupWizard.swift"},"region":{"startLine":21}}}],"partialFingerprints":{"codehealthFindingId/v1":"3433966a60b426b1bec4366b839dd8a94c0bb56945a99fbc200b7e817cb07b35"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Actions/Actions.swift: FileTooLong \u2014 752 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Actions (20-1229). The bar is 500 significant lines; this is 252 over it, 1.50\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c3bcb89278dfa1fb921873207c00a67171206e41163302c11ba03fe5d24fa308"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Actions.click: MethodTooLong \u2014 click runs 147 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 47 over it, 1.47\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"d5d95ebb6ccbbe7df775c2d919d903ee9438841cb9a4343d886f978094f47c34"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: Perception/Perception.swift: FileTooLong \u2014 616 significant lines (blank, comment-only and punctuation-only lines excluded), about 100% of them inside a single declaration: Perception (14-1043). The bar is 500 significant lines; this is 116 over it, 1.23\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"56ed5dc9721a3a9af46e8e0b2f99d389386ab98eb9758277ece6a5ce3698bad2"}},{"ruleId":"D3","level":"warning","message":{"text":"FileTooLong: ghost/SetupWizard.swift: FileTooLong \u2014 611 significant lines (blank, comment-only and punctuation-only lines excluded), about 99% of them inside a single declaration: SetupWizard (21-972). The bar is 500 significant lines; this is 111 over it, 1.22\u00D7 the bar. Moving the declarations that sit BESIDE it into sibling files will not shorten this file. Extract from INSIDE that declaration instead: lift each cohesive group of its body \u2014 the parts that share the same inputs and are named together \u2014 into its own unit in a sibling file, and have the original call them."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/SetupWizard.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2e1c7d7193fd41ee215604c538a1c338b465f67fcffd94fe9cf812fa358b0eb9"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Actions.typeText: MethodTooLong \u2014 typeText runs 115 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 15 over it, 1.15\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":280}}}],"partialFingerprints":{"codehealthFindingId/v1":"476e71a59763600df107e226ba4fdff27de9a1d86e09adacd39462e440339c25"}},{"ruleId":"D3","level":"warning","message":{"text":"MethodTooLong: Annotate.annotate: MethodTooLong \u2014 annotate runs 109 significant lines (blank, comment-only and punctuation-only lines excluded) in one body. The bar is 100 significant lines; this is 9 over it, 1.09\u00D7 the bar. This is length, not branching: a long straight-line body scores low on complexity and is still read whole to change any part of it, so the complexity numbers beside this row neither confirm nor excuse it. To reduce it, extract each cohesive step of the body \u2014 the runs of statements that work on the same values and would earn the same name \u2014 into its own named unit, and have this one call them in order."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Annotate.swift"},"region":{"startLine":41}}}],"partialFingerprints":{"codehealthFindingId/v1":"f890d569c7e5a14c3130285b3b480de3af8e2fcf3844e19acf6ea5427df1d7e7"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (44 lines \u00D7 2): Sources/GhostOS/Vision/VisionPerception.swift:215-258 | Sources/GhostOS/Vision/VisionPerception.swift:292-335 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Vision/VisionPerception.swift"},"region":{"startLine":215}}}],"partialFingerprints":{"codehealthFindingId/v1":"7e948be780b0331ea2915a40f5fe22bbe4ad45457530a831accedea82ffb47b4"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (18 lines \u00D7 2): Sources/GhostOS/Vision/VisionBridge.swift:167-184 | Sources/GhostOS/Vision/VisionBridge.swift:198-215 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/Vision/VisionBridge.swift:167\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Sources/GhostOS/Vision/VisionBridge.swift:187\u0060 calls \u0060findServerScript\u0060, \u0060info\u0060, \u0060findPython\u0060 and \u0060Sources/GhostOS/Vision/VisionBridge.swift:217\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Vision/VisionBridge.swift"},"region":{"startLine":167}}}],"partialFingerprints":{"codehealthFindingId/v1":"6421a17ca1032dfbcaa0892902696feb7ace61665aaf9dce4fde6157e04eb56a"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17\u201318 lines \u00D7 2): Sources/ghost/Doctor.swift:483-499 | Sources/ghost/SetupWizard.swift:924-941 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/ghost/Doctor.swift:483\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/Doctor.swift"},"region":{"startLine":483}}}],"partialFingerprints":{"codehealthFindingId/v1":"104eb1f904c1410fc916a0afdb336a8448d69cd6f28828ad6bb9973186c87d00"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9\u201317 lines \u00D7 2): Sources/GhostOS/Actions/Actions.swift:45-53 | Sources/GhostOS/Actions/Actions.swift:177-193 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/Actions/Actions.swift:45\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":45}}}],"partialFingerprints":{"codehealthFindingId/v1":"74ccbe3377f17e198ea0b2fde71417315650bf656bd1a100a640a8977a382cf9"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201317 lines \u00D7 2): Sources/GhostOS/Actions/Actions.swift:55-71 | Sources/GhostOS/Actions/Actions.swift:650-664 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/Actions/Actions.swift:55\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":55}}}],"partialFingerprints":{"codehealthFindingId/v1":"4ef20de217150274db76cc71bf76ba52a8a106c5832a07fc80416edd0c612859"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (17 lines \u00D7 2): Sources/GhostOS/Actions/Actions.swift:387-403 | Sources/GhostOS/Actions/Actions.swift:427-443 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/Actions/Actions.swift:387\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Sources/GhostOS/Actions/Actions.swift:406\u0060 calls \u0060readbackFromElement\u0060, \u0060String\u0060, \u0060prefix\u0060 and \u0060Sources/GhostOS/Actions/Actions.swift:444\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":387}}}],"partialFingerprints":{"codehealthFindingId/v1":"727e06060fd4c46f91a3eb69304a0c6157608ff117f989ac7812b4fe9491c096"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201317 lines \u00D7 2): Sources/GhostOS/Perception/Perception.swift:169-181 | Sources/GhostOS/Perception/Perception.swift:187-203 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/Perception/Perception.swift:169\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":169}}}],"partialFingerprints":{"codehealthFindingId/v1":"a5e4581d48eab3d0cae373d668b886e9238674f149959274e5d937cf1b360d08"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (16\u201317 lines \u00D7 2): Sources/GhostOS/Perception/Perception.swift:233-248 | Sources/GhostOS/Perception/Perception.swift:296-312 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/Perception/Perception.swift:296\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":233}}}],"partialFingerprints":{"codehealthFindingId/v1":"e19670cf7dc7cc36e8be0826613e06e5678c3853047305e702fd28bab6ef15bd"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (15\u201316 lines \u00D7 2): Sources/GhostOS/Perception/Annotate.swift:50-64 | Sources/GhostOS/Perception/Perception.swift:360-375 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/Perception/Annotate.swift:50\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Annotate.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"02a9ff25fdf0212810b096e8b7d3d1a7b12dd690d4b4dd861338be52e5fa1e2b"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (12\u201314 lines \u00D7 2): Sources/GhostOS/Screenshot/ScreenCapture.swift:87-100 | Sources/GhostOS/Screenshot/ScreenCapture.swift:111-122 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/Screenshot/ScreenCapture.swift:87\u0060 it runs out through the closing brace of the declaration holding it \u2014 the window is that declaration\u0027s tail, not a fragment that begins part-way through something, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Screenshot/ScreenCapture.swift"},"region":{"startLine":87}}}],"partialFingerprints":{"codehealthFindingId/v1":"85a53aedb178bd53721e5361e38006e79cf4b2996d623e47689fb78615957e93"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (13\u201314 lines \u00D7 2): Sources/ghost/Doctor.swift:81-94 | Sources/ghost/SetupWizard.swift:196-208 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/ghost/Doctor.swift:81\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/Doctor.swift"},"region":{"startLine":81}}}],"partialFingerprints":{"codehealthFindingId/v1":"2d9d713f391c72764154cd4d0dbe37661dadc29856829d3c49498cc8d9855fec"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11\u201312 lines \u00D7 2): Sources/GhostOS/Actions/Actions.swift:670-681 | Sources/GhostOS/Actions/Actions.swift:732-742 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/Actions/Actions.swift:670\u0060 it runs out through the closing brace of the declaration holding it and carries on into the declaration that follows \u2014 the window is the tail of one member plus the head of the next, so no call can be substituted for those exact lines, and the smallest declaration that contains all of them is the type they sit in. The repeated unit is the member each site sits in: where those members\u0027 bodies are the same, move one whole member to the shared location and have the others delegate to it; where the copies are a run of near-identical overloads or wrappers that differ only in their signatures, the repetition IS the run \u2014 a one-line delegation has no helper inside it to lift \u2014 so generate the run from the set it enumerates, or accept it and keep each member\u0027s own documentation with it. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":670}}}],"partialFingerprints":{"codehealthFindingId/v1":"2dd8db5aa2017806fcdd030693a02377ede94323357d1cb05f423946dfaecb77"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/GhostOS/Actions/Actions.swift:727-737 | Sources/GhostOS/Actions/Actions.swift:797-807 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/Actions/Actions.swift:727\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":727}}}],"partialFingerprints":{"codehealthFindingId/v1":"1fe64403d6eeb8f58353437586951613759ddc465606c50e65297ae48e9345c6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/GhostOS/MCP/MCPDispatch.swift:70-80 | Sources/GhostOS/MCP/MCPDispatch.swift:112-122 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/MCP/MCPDispatch.swift:70\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/MCPDispatch.swift"},"region":{"startLine":70}}}],"partialFingerprints":{"codehealthFindingId/v1":"08a09c63993c9c3b9de22b520547396ef1560093c67c0b9f8e70a2cdbe6dbf92"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (11 lines \u00D7 2): Sources/GhostOS/MCP/MCPDispatch.swift:338-348 | Sources/GhostOS/MCP/MCPDispatch.swift:360-370 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/MCP/MCPDispatch.swift:338\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/MCPDispatch.swift"},"region":{"startLine":338}}}],"partialFingerprints":{"codehealthFindingId/v1":"fdcc75bc8c455a65fcf0bae0bb7c1d2be024cef8444113e74939a9ca6d587b70"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (10 lines \u00D7 2): Sources/ghost/Doctor.swift:293-302 | Sources/ghost/SetupWizard.swift:503-512 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/ghost/Doctor.swift:293\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/Doctor.swift"},"region":{"startLine":293}}}],"partialFingerprints":{"codehealthFindingId/v1":"961278dde9f6648b882c7c3ae6322ec21e6007f826d01f7d3244452a194ae816"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 3): Sources/GhostOS/Actions/Actions.swift:668-677 | Sources/GhostOS/Actions/Actions.swift:730-738 | Sources/GhostOS/Actions/Actions.swift:800-808 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/Actions/Actions.swift:668\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":668}}}],"partialFingerprints":{"codehealthFindingId/v1":"82ad5b9a0b3564a8a21e1e8e84f1bb9e002f8f838fae7c26636f6407bbee0dd5"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): Sources/GhostOS/MCP/MCPDispatch.swift:59-67 | Sources/GhostOS/MCP/MCPDispatch.swift:100-107 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/MCPDispatch.swift"},"region":{"startLine":59}}}],"partialFingerprints":{"codehealthFindingId/v1":"733aa433a47bddab8b67ba8ee16f52cad59c40fbce58910119951dbf345905f6"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8\u20139 lines \u00D7 2): Sources/ghost/SetupWizard.swift:163-170 | Sources/ghost/SetupWizard.swift:214-222 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/ghost/SetupWizard.swift:163\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The matched lines also transfer control out of the body holding them, which cannot survive a move into a called unit unchanged: have the extracted unit return that decision and let each site act on it. Note that the copies do not run to the end of the range shown: their LAST lines are different code, not the same code under different names \u2014 the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/SetupWizard.swift"},"region":{"startLine":163}}}],"partialFingerprints":{"codehealthFindingId/v1":"3cee8d8ecf95756885a38c9b1b1e1f1aff496560bc0048e141ebe5e2b8ce679c"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (9 lines \u00D7 2): Sources/ghost/SetupWizard.swift:550-558 | Sources/ghost/SetupWizard.swift:564-572 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/ghost/SetupWizard.swift:550\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that. The \u0060return\u0060 at the foot of the matched lines is the enclosing body\u0027s own terminal exit, not an early one: it moves with them unchanged, and each site calls the extracted unit from the position that \u0060return\u0060 occupied \u2014 no decision has to be handed back and re-acted on."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/SetupWizard.swift"},"region":{"startLine":550}}}],"partialFingerprints":{"codehealthFindingId/v1":"bbaf125a83ac2c0a304a30852848383b8cf44730615fd374d1fb2d00b7ccf868"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (8 lines \u00D7 2): Sources/GhostOS/Recipes/RecipeEngine.swift:312-319 | Sources/GhostOS/Recipes/RecipeEngine.swift:323-330 \u2014 both copies are in the same file, so extract the block into one function there and call it from each site \u2014 the copies drift apart the first time only one of them is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/Recipes/RecipeEngine.swift:312\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Recipes/RecipeEngine.swift"},"region":{"startLine":312}}}],"partialFingerprints":{"codehealthFindingId/v1":"93a5a0265e1ed85c19f76d459c49932f51210f7d21bf414c2f5be11e70190555"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7\u20138 lines \u00D7 2): Sources/ghost/Doctor.swift:456-462 | Sources/ghost/SetupWizard.swift:70-77 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/ghost/Doctor.swift:456\u0060 it does not close everything it opens, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/Doctor.swift"},"region":{"startLine":456}}}],"partialFingerprints":{"codehealthFindingId/v1":"b2cd2aa18d3922d151f86ab8b1f3519544c0860af28ae3874e753bac59a53381"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (7 lines \u00D7 2): Sources/ghost/Doctor.swift:140-147 | Sources/ghost/SetupWizard.swift:253-259 \u2014 the copies sit in sibling files of one directory, so a shared home is within easy reach: extract the block into a single shared function the call sites can all reach \u2014 a file they already depend on, or a new one alongside them \u2014 and call it from both call sites, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/ghost/Doctor.swift:140\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/Doctor.swift"},"region":{"startLine":140}}}],"partialFingerprints":{"codehealthFindingId/v1":"64b4a5c5962f3020ce5ae2eeed2311939e9f9f49bf20cac24d460cd26c0f061f"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Sources/GhostOS/MCP/MCPDispatch.swift:187-191 | Sources/GhostOS/MCP/MCPDispatch.swift:245-249 | Sources/GhostOS/MCP/MCPDispatch.swift:255-259 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. \u2605 These copies have DRIFTED, and that is worth reading before extracting anything: just after the matched lines, \u0060Sources/GhostOS/MCP/MCPDispatch.swift:193\u0060 calls \u0060str\u0060 and \u0060Sources/GhostOS/MCP/MCPDispatch.swift:250\u0060 does not \u2014 after which the two agree again for 2 more lines. One of those two behaviours is the intended one and the other is what a copy-paste left behind, so decide which BEFORE unifying them: extracting the shared part will silently settle it, and if the copy that skips the call is the wrong one, that bug is already live."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/MCPDispatch.swift"},"region":{"startLine":187}}}],"partialFingerprints":{"codehealthFindingId/v1":"0787776c5484b31d1aba87adbaf8bbcd65a268aec53cd35bcb944b55109ea14d"}},{"ruleId":"D4","level":"warning","message":{"text":"Duplicated block (5 lines \u00D7 3): Sources/GhostOS/Recipes/RecipeEngine.swift:315-319 | Sources/GhostOS/Recipes/RecipeEngine.swift:326-330 | Sources/GhostOS/Recipes/RecipeEngine.swift:339-343 \u2014 all 3 copies are in the same file, so extract the block into one function there and call it from every one of those sites \u2014 resolving only two of them leaves the rest to drift apart the first time one is edited. Read the line range as the matched WINDOW rather than a finished unit: at \u0060Sources/GhostOS/Recipes/RecipeEngine.swift:315\u0060 it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand \u2014 widen the region to the smallest complete statement or declaration that contains it, and extract that."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Recipes/RecipeEngine.swift"},"region":{"startLine":315}}}],"partialFingerprints":{"codehealthFindingId/v1":"c23100c1da97237c0ed094f18e3ad96eb4509339879918755fdaa0abc2f2b95f"}},{"ruleId":"D5","level":"warning","message":{"text":"Off the main sequence: GhostOS: GhostOS: abstractness 0.00, instability 0.00, distance 1.00 \u2014 zone of pain \u2014 concrete and depended on by 1 project(s), so it\u0027s rigid to change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"8d870e30afea863685ef1b2641c7a2f18a90e20f3c2aac4969c5f6868af520a5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/GhostOS/MCP/MCPDispatch.swift: Sources/GhostOS/MCP/MCPDispatch.swift changed 8 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 60 in MCPDispatch.dispatch at line 132. 3 of those changes were fix/bug commits, and the other 5 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2025-12-23..2026-03-23, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272025-12-23 15:41:42 -07:00\u0027 --until=\u00272026-03-23 15:41:42 -07:00\u0027 --full-history --no-merges -- Sources/GhostOS/MCP/MCPDispatch.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/MCPDispatch.swift"},"region":{"startLine":132}}}],"partialFingerprints":{"codehealthFindingId/v1":"1da6819bcee0ba5e5aa47f7a08c46718e416b253f01a194c58e94c1a63984be0"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/GhostOS/Actions/Actions.swift: Sources/GhostOS/Actions/Actions.swift changed 13 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 34 in Actions.click at line 26. 10 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2025-12-23..2026-03-23, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272025-12-23 15:41:42 -07:00\u0027 --until=\u00272026-03-23 15:41:42 -07:00\u0027 --full-history --no-merges -- Sources/GhostOS/Actions/Actions.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":26}}}],"partialFingerprints":{"codehealthFindingId/v1":"9bb4a10618175b2b6eda7ae928e322949191d519265c142378fd7f91d8f2ec17"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/ghost/SetupWizard.swift: Sources/ghost/SetupWizard.swift changed 11 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 21 in SetupWizard.setupPythonVenv at line 477. 6 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2025-12-23..2026-03-23, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272025-12-23 15:41:42 -07:00\u0027 --until=\u00272026-03-23 15:41:42 -07:00\u0027 --full-history --no-merges -- Sources/ghost/SetupWizard.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/SetupWizard.swift"},"region":{"startLine":477}}}],"partialFingerprints":{"codehealthFindingId/v1":"c4c670a446d0f9ee9d88b310f531669e736a886be9c0a2ab8a9ea5e9080d49d5"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/GhostOS/Perception/Perception.swift: Sources/GhostOS/Perception/Perception.swift changed 6 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 30 in Perception.fullElementInfo at line 640. 3 of those changes were fix/bug commits, and the other 3 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2025-12-23..2026-03-23, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272025-12-23 15:41:42 -07:00\u0027 --until=\u00272026-03-23 15:41:42 -07:00\u0027 --full-history --no-merges -- Sources/GhostOS/Perception/Perception.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":640}}}],"partialFingerprints":{"codehealthFindingId/v1":"c11f0aef1cf3b744e4f523451e7fbe2657597e371ae9309276d631197813ce0c"}},{"ruleId":"D15","level":"warning","message":{"text":"Hotspot: Sources/GhostOS/Recipes/RecipeEngine.swift: Sources/GhostOS/Recipes/RecipeEngine.swift changed 3 times in last 90 days, and the most complex body those changes touched has cyclomatic complexity 17 in RecipeEngine.run at line 19. 1 of those changes was a fix/bug commit, and the other 2 changed it for other reasons \u2014 this file is under both repair and feature pressure. Before the next change lands here, make sure the area it touches is under test, then split that area out of the file so the following change is smaller than this one \u2014 a file this often edited pays the complexity back every time. Counted over 2025-12-23..2026-03-23, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272025-12-23 15:41:42 -07:00\u0027 --until=\u00272026-03-23 15:41:42 -07:00\u0027 --full-history --no-merges -- Sources/GhostOS/Recipes/RecipeEngine.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Recipes/RecipeEngine.swift"},"region":{"startLine":19}}}],"partialFingerprints":{"codehealthFindingId/v1":"8bcc74ba346ed7919c4d9a3009874c5242eef6b4ef7820cf58f34812feadd40e"}},{"ruleId":"D15","level":"warning","message":{"text":"Repeated repair: Sources/GhostOS/MCP/MCPServer.swift: Sources/GhostOS/MCP/MCPServer.swift changed 4 times in last 90 days and 3 of those changes were fix/bug commits, so repair is the majority of this file\u0027s churn. Its max cyclomatic complexity is 14 (its worst body is MCPServer.run at line 50), UNDER the 15 threshold, so this is deliberately not filed as a churn \u00D7 complexity hotspot \u2014 the difficulty here is in the behaviour the file has to get right, not in its control flow, and refactoring it for complexity would be the wrong move. The repairs counted were: \u201CBump to v2.0.5: harden vision sidecar, fix install paths, update README\u201D; \u201CFix screenshot crash: add @MainActor and ApplicationServices to MCPServer\u201D; \u201CFix MCP transport: match output framing to input format\u201D. Each one is a case this code did not handle. Before the next change lands here, check that every one of them is pinned by a test that fails without its fix; where the same area keeps coming back, the durable fix is usually at the interface that keeps being misused rather than at the line that was last corrected. Counted over 2025-12-23..2026-03-23, the 90 days ending at the analysed commit. Reproduce with \u0060git log --since=\u00272025-12-23 15:41:42 -07:00\u0027 --until=\u00272026-03-23 15:41:42 -07:00\u0027 --full-history --no-merges -- Sources/GhostOS/MCP/MCPServer.swift\u0060: merges are excluded because a merge re-states changes already counted at their own commits, and history is NOT path-simplified because a change that reached the file through a merged branch is still a change to it. That command counts raw commits and can read HIGHER than this row, which counts a cherry-picked re-land, and a revert together with the commit it undoes, once each \u2014 a difference of several commits on a file whose history was re-landed or reverted inside the window."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/MCPServer.swift"},"region":{"startLine":50}}}],"partialFingerprints":{"codehealthFindingId/v1":"d0447a213ceb87371c0c8814367b60ac60f29ff26edd4a3a8e6a522d1238e2f4"}},{"ruleId":"D20","level":"note","message":{"text":"No ADRs found: No ADRs found. No recognised ADR directory (\u0060docs/adr/\u0060, \u0060docs/decisions/\u0060, \u0060adr/\u0060, \u0060docs/rfcs/\u0060, an \u0060ADR0001/\u0060 folder, or their siblings) exists anywhere in this tree. What was searched, so you can tell an empty log from a search that missed one: every directory under the tree (build output, dependencies and VCS metadata excepted), for a document that is either any non-index page inside a recognised ADR directory, whatever its name and however deeply nested (\u0060docs/adr/use-postgres.md\u0060, \u0060docs/adr/2024/0001-x.md\u0060); or a file anywhere whose name is ADR-shaped (\u00600001-use-postgres.md\u0060, \u0060adr-012-caching.md\u0060); or, when neither turned anything up, a document carrying the decision-record signature (an \u0022Architecture Decision Record\u0022 heading, or Status / Context / Decision / Consequences as section headings). A decision log that clears none of these \u2014 unnumbered files outside any recognised directory, without those headings \u2014 is not seen by this check and this row is then wrong. If that is your case, say so rather than renaming anything; otherwise, consider recording architectural decisions in \u0060docs/adr/\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"d2bea044ff79d7d275f5a91a6e2f548586178eaf480274c33960ad020c854631"}},{"ruleId":"D34","level":"note","message":{"text":"Dormant codebase: 23 of 23 significant files have no living knowledge \u2014 the codebase as a whole is dormant, not 23 separate risks. Counted over 23 of the 28 production source files in this repository: the rest are under the ~2,400-byte size floor this dimension measures over. Re-engage owners or document before change."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"4c69f1e54b7dd6fe9029dd02df6ba8f8145b789f2f18dbdaa086c40ded49dba6"}},{"ruleId":"D34","level":"note","message":{"text":"Most significant orphaned file: One of the orphaned files carrying the most lost knowledge \u2014 ranked by size weighted by the file\u0027s role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/Actions.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2c38e876b69fdcfb8444f5d120682833b3d34baa4c26a0900e38735a5744a40f"}},{"ruleId":"D34","level":"note","message":{"text":"Most significant orphaned file: One of the orphaned files carrying the most lost knowledge \u2014 ranked by size weighted by the file\u0027s role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Perception.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"9645e2f4908d935b34a37a042fd05d8aefb0b1c0a116440470569198b2021cb7"}},{"ruleId":"D34","level":"note","message":{"text":"Most significant orphaned file: One of the orphaned files carrying the most lost knowledge \u2014 ranked by size weighted by the file\u0027s role in the codebase, the same weighting behind the score above, so core code outranks equally large plumbing. A reasonable place to start a read-through before the aggregate risk above bites."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/SetupWizard.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"8036f92ef705907a4f8bed9fa0e742d2ef079f6b271b8aa9519451753acf4c70"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"vision-sidecar/server.py"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"96a5cac2e7fbb816a52ff16d915ab6f6382cf58a25b8fe312320bd996a34d113"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/ghost/Doctor.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"69d2f0c3fc5f98f90ed27faa318fcf8e9dc298750eabf867f328b0d6d6498195"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/MCPDispatch.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"2cf214a862e4b6cacc90df6a4072a386984fb623d7b3fc106ac7504f41ef4a59"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/MCPTools.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"41f647c581896d5fd3431cf8719b18d60861c56ac188aebff65d6e1950fccde1"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Recipes/RecipeEngine.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f01ce0553eca90793952250a4b5773436dfa14a94c4698542ac29267bcdfac58"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Vision/VisionPerception.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"f320d391186e20bb3bec12f10227bbb5229f902a42ae82a0ce2320b80c5c8c20"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Perception/Annotate.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"c737203a17d2697d4e02277e25a7c0f0447153307081d7c0fea8aa374da65b0f"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Vision/VisionBridge.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"6ea57869d6beeb59974801d0aaf0a02c260cdb4d38efbabfb55b3ff7ac697024"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Screenshot/ScreenCapture.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1429da05f4e7079ec9a2d5e541609caa9295e68dc8a1cdf6f4f5eafd4f8efee8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Learning/LearningRecorder.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"eded84c5416f9e7ca2a5b0e126bfd4cb85137d98924a76ca4093ad5bcc66ad94"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Learning/EventHandlers.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"659f6b941562b6fb444aeffcf042ea4d5134efe01a4266f8a65e4f9048fdc86a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Vision/CDPBridge.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"11fe16153e029e5cd9b339eeb246ee324e4ff8dbeda7a8e9a1f89750a486421e"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/MCPServer.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"1162fc7625cc175834c466ac8561858e0d1414541f7979545a9b8ff127e6375a"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/MCP/WaitManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ce7d278e9f41003c8a18657b1c859f1ed8f812796baa29c2f5b8620a00f89713"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Learning/LearningTypes.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"066c770506cf24b940b3fd12028645f2faf3faa2ba35f36128f72d22208dc17d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Learning/LearningDispatch.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"b0018481d813e4a778e097e459e3664d149ed7099119e4491d05a5439790da1d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Common/Types.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"a3039970b6f105da748b50c8f9a6ba82cbe29a709da2b0be9184c18f60a9913d"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Recipes/RecipeStore.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"11ec06e839a1747eb89800dbf030365ad5e22e76ff3e8a8eb4d9dfab7af897f2"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Actions/FocusManager.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"0ef789efa5d38b5b278e51591087752709533aa9ab19fff74a31310bea9108c8"}},{"ruleId":"D34","level":"note","message":{"text":"Orphaned file: No one still active in this repository holds living knowledge of this file: everyone who made a meaningful change to it has gone quiet, or what the current team did to it (moves, reformatting, log-level or import edits, renames) never needed understanding it. If it breaks, no one currently understands it. Attach the read to the next change that touches it: have a second person review that change, and leave behind a short comment or test recording what the file is for."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Recipes/RecipeTypes.swift"},"region":{"startLine":1}}}],"partialFingerprints":{"codehealthFindingId/v1":"ab9348d779a8ec37c4ccb729354c93955f828b34500db080c06551164b885107"}},{"ruleId":"M2","level":"note","message":{"text":"No ADRs: No Architecture Decision Records found \u2014 no conventional ADR directory, no numbered \u0060NNNN-title\u0060 documents in any markup this check reads, and nothing ADR-shaped by content. Design rationale recorded elsewhere (a design-notes tree, a mailing list, pull-request discussion) is not visible to this check and is not re-findable per decision, so a future maintainer cannot ask why one choice was made and get an answer."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"670b3d6e36a756d63097d0dfbf90afd5fc761308800b9354894a07c3f4e4aa14"}},{"ruleId":"P1","level":"warning","message":{"text":"No CI pipeline: No CI workflow found (.github/workflows, azure-pipelines.yml, .gitlab-ci.yml, \u2026) \u2014 changes aren\u0027t gated by an automated build/test."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"44f01af96e50474fba2df84d95ddf4f7e1d34c29c307830b9efc9057daa6b670"}},{"ruleId":"P10","level":"note","message":{"text":"Large public API surface: 40/45 types (89%) declared in the published library are public. For a library, every public type is a stability contract \u2014 keep implementation types off the surface and expose only the intended API."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"ed2ba843444ae377c17142f58f714e281e4bd3f183ab100ee1fbef389875d3e6"}},{"ruleId":"P2","level":"note","message":{"text":"Logging is not universal: Only 1/2 runnable modules use logging (modules with no entry point or server are excluded \u2014 they are libraries a runnable module hosts). Silent: \u0060vision-sidecar\u0060."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"91a94e21d6d4d0e6a2003f94505b0b02b157176f0b24c4820f3f82b4447a97fe"}},{"ruleId":"P3","level":"note","message":{"text":"No SAST: No static application security testing detected. For this repository\u0027s stack, add CodeQL\u0027s Swift pack (Swift/Xcode) (or \u0060semgrep --config=auto\u0060, which runs on any language) \u2014 this repository has no CI pipeline yet, so run it locally to clear the existing findings, then make it a step of the first workflow you add so a regression fails the build. What was searched, so you can tell an absence from a miss: the 0 CI workflow file(s) in this repository, and the scanner and linter configuration checked in beside them. A scan that runs outside CI, one configured in your forge\u0027s web UI rather than in a committed file, or a tool whose name is none of those this check carries, is not seen \u2014 if that is your case the row is wrong, and saying so is more useful than adding a second scanner."},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"6e54424179c892f03ef2fd003130ac4bd43f39bbf3b1ca0a0143e25acb80ec87"}},{"ruleId":"P6","level":"note","message":{"text":"No changelog: No CHANGELOG/HISTORY/RELEASES file \u2014 what shipped when isn\u0027t easy to reconstruct for support or audit. (Versioning/tagging makes releases traceable, but a changelog records the what.)"},"locations":[],"partialFingerprints":{"codehealthFindingId/v1":"dda5aa5aed8cbb292c3ef2b733bc138f614293ae6426c85e98bf31ef330d9415"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (empty catch): An empty catch block silently discards the error \u2014 failures vanish with no log and no rethrow. Log it, handle it, or don\u0027t catch it."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"vision-sidecar/server.py"},"region":{"startLine":119}}}],"partialFingerprints":{"codehealthFindingId/v1":"ff4c03cc95e0d374b2af41ca06dc07d851e05985149d556131f8f2ada892e243"}},{"ruleId":"X3","level":"warning","message":{"text":"Swallowed exception (caught, then discarded): \u0060catch\u0060 takes every exception and records none of it \u2014 the body neither logs it, rethrows it, nor even names it, so the failure is discarded as completely as by an empty catch and only the substituted value survives. Log it through whatever this codebase already uses to report problems, narrow the catch to the exception this call can actually raise, or say in a comment on the catch why the failure genuinely cannot matter."},"locations":[{"physicalLocation":{"artifactLocation":{"uri":"Sources/GhostOS/Recipes/RecipeStore.swift"},"region":{"startLine":68}}}],"partialFingerprints":{"codehealthFindingId/v1":"b66a4f56e00ff5fcc8f9b52e5857d93b9b2a1e85333860e3a452ac696ce760c2"}}],"taxonomies":[{"name":"CWE","guid":"c3a2b1d0-7f3e-4b2a-9c1d-5e6f7a8b9c0d","organization":"MITRE","informationUri":"https://cwe.mitre.org/","isComprehensive":false,"shortDescription":{"text":"The MITRE Common Weakness Enumeration (CWE)."},"taxa":[{"id":"CWE-1395","guid":"800e09e7-c11a-8654-9fa6-86f398995fed","name":"Dependency on Vulnerable Third-Party Component","shortDescription":{"text":"Dependency on Vulnerable Third-Party Component"},"helpUri":"https://cwe.mitre.org/data/definitions/1395.html"},{"id":"CWE-259","guid":"ae9ad959-fbb6-9d5e-892d-3dca66da0b69","name":"Use of Hard-coded Password","shortDescription":{"text":"Use of Hard-coded Password"},"helpUri":"https://cwe.mitre.org/data/definitions/259.html"},{"id":"CWE-506","guid":"401d6455-56e3-0552-9a39-f77461673e3f","name":"Embedded Malicious Code","shortDescription":{"text":"Embedded Malicious Code"},"helpUri":"https://cwe.mitre.org/data/definitions/506.html"},{"id":"CWE-77","guid":"332c8ade-6612-9f56-a06b-d8d90b1a8750","name":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in a Command (\u0027Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/77.html"},{"id":"CWE-78","guid":"2e31ceaf-c7ae-2e5e-9661-cfb1362789cf","name":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an OS Command (\u0027OS Command Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/78.html"},{"id":"CWE-79","guid":"fd45580b-e8c4-fc5e-8c2f-aa8fab0b4dbf","name":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)","shortDescription":{"text":"Improper Neutralization of Input During Web Page Generation (\u0027Cross-site Scripting\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/79.html"},{"id":"CWE-798","guid":"5e8f057d-fee3-995a-a0cb-9fc5b0d174d1","name":"Use of Hard-coded Credentials","shortDescription":{"text":"Use of Hard-coded Credentials"},"helpUri":"https://cwe.mitre.org/data/definitions/798.html"},{"id":"CWE-89","guid":"6d08fdad-37eb-c150-bbf0-d7d946863407","name":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)","shortDescription":{"text":"Improper Neutralization of Special Elements used in an SQL Command (\u0027SQL Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/89.html"},{"id":"CWE-937","guid":"16f316ae-415c-b354-a59b-1f7905f756e9","name":"Using Components with Known Vulnerabilities","shortDescription":{"text":"Using Components with Known Vulnerabilities"},"helpUri":"https://cwe.mitre.org/data/definitions/937.html"},{"id":"CWE-94","guid":"75e7f50c-6c2f-dd52-bf40-bf6c52b861fd","name":"Improper Control of Generation of Code (\u0027Code Injection\u0027)","shortDescription":{"text":"Improper Control of Generation of Code (\u0027Code Injection\u0027)"},"helpUri":"https://cwe.mitre.org/data/definitions/94.html"}]},{"name":"OWASP Top 10","guid":"7d1f0c2e-4b6a-4e39-9a51-0b2e8c3d5f61","version":"2025","organization":"OWASP Foundation","informationUri":"https://top10.owasp.org/2025/","isComprehensive":false,"shortDescription":{"text":"The OWASP Top 10:2025 web application security risks."},"taxa":[{"id":"A03:2025","guid":"168e227c-7735-2e57-bc6e-997affe644c5","name":"Software Supply Chain Failures","shortDescription":{"text":"Software Supply Chain Failures"},"helpUri":"https://top10.owasp.org/2025/A03_2025-Software_Supply_Chain_Failures/"},{"id":"A05:2025","guid":"87e86033-3231-8458-8e4a-5cb82743553a","name":"Injection","shortDescription":{"text":"Injection"},"helpUri":"https://top10.owasp.org/2025/A05_2025-Injection/"},{"id":"A07:2025","guid":"334ddd78-539d-d35c-83dd-253647eb7eaf","name":"Authentication Failures","shortDescription":{"text":"Authentication Failures"},"helpUri":"https://top10.owasp.org/2025/A07_2025-Authentication_Failures/"},{"id":"A08:2025","guid":"84b0c297-710e-9a5f-9335-936ecb260c36","name":"Software or Data Integrity Failures","shortDescription":{"text":"Software or Data Integrity Failures"},"helpUri":"https://top10.owasp.org/2025/A08_2025-Software_or_Data_Integrity_Failures/"}]}],"properties":{"codehealthPublication":{"public":true,"notice":"This is the PUBLIC form of this artifact. Findings are listed in full, but the details of SECURITY findings \u2014 which rule fired, in which file, on which line, and how to fix it \u2014 are deliberately withheld, and any secret-scanner results are excluded entirely. Where detail is absent here it was REMOVED FOR PUBLICATION; it is not missing from the analysis. The complete artifact is available from the repository owner.","securityFindingsRedacted":0,"secretScannerRunsExcluded":0}}}]}