Public report — spec-kit, published 5 Aug 2026.
Concrete security findings (CVE IDs, secret matches, dependency versions) are hidden in this version;
ask the repo owner for the full report.
438findings with an exact file:lineof 448 — the remainder are repo-wide signals (a dimension-level measurement, not a single line); open any file:line and verify
22/94dimensions across the health lenses48030 LoC — wide & deep
Executive summary
Read through the Production lens — the standard calibration. *Green* means good enough to run in production. The score is absolute and comparable across repos.
github/spec-kit is in good overall health (71%), but at least one category below sits in Adequate-or-worse territory — most items are improvements, and the weakest category contains work to schedule, not shelve.
It is strongest in Architecture (100%) — the structure is clean and changes stay contained. Readiness (83%) is solid too.
The area that most needs attention is Code Health (66%) — changes there are slower and more error-prone.
Leadership focus, highest impact first: 'Architecture' / 'How it works' section to the root README (Documentation (README)); Record significant decisions one document per decision (Architecture documentation); 3 High finding(s) (Static Analysis (SAST)).
For scale: Medium (~48,030 production lines); rebuilding it from scratch would take roughly ~1.2 person-years (~1–3 engineers). Approximate, ±~30%.
It builds on a genuinely strong Architecture foundation (100%); the priorities above are the highest-leverage way to bring the rest up to that level.
How the score is built — each lens's share of the headlineWidth is the lens's weight in the worst-heaviest fold (the weakest area pulls hardest); colour is that lens's own band. A lens fixes the score in proportion to its width.
Raise Code Health 66 → 70 (the Healthy floor) ⇒ headline 71 → ~73.
Code composition — where the lines go
Tests 100%
New since the last scan (100+)
204 finding(s) are new versus the previous scan (2026-07-29) — surfaced by this scheduled scan itself, no pull request required. Showing the first 100; the full set is in the report.
A full-fidelity diff against the previous run's complete recorded findings — line-move tolerant: a finding that only shifted line counts as unchanged, only genuinely new titles/files surface here.
1.0× (at 71% quality) — the last 20% of quality is most of the work
Size & shape
Medium · effort split not classified (source measured from disk; the effort-tier breakdown is a C#-only syntax walk)
This codebase represents roughly ~1.2 person-years of build effort (about ~€180,000 to rebuild). Its weakest lens is Code Health at 66% — the part of that asset most exposed by the findings below.
How we model this: boilerplate at a scaffolding rate + logic × domain Standard (×1.0) — standard service × a 1.0× quality factor, at €60–95/h; indicative, ±~30% · size measured directly from source · effort from total production LoC as straight-line logic (the tier split is a C#-only syntax walk), a conservative lower bound. Indicative only — most sensitive to the hourly rate and the domain tier (both tunable in config).
Top priorities
The highest-leverage moves; the full ranked list is in the Roadmap below.
1
Resolve the 3 High finding(s) in Static Analysis (SAST) — start with publish-pypi.yml (2), dependabot.yml.
The top-ranked fix costs roughly 1–3 engineer-days once. Not doing it costs about 82.2–493 engineer-days every year, paid as drag on the ~633,198 lines this team changes annually — a bill that arrives whether or not anyone books it. On those figures the fix breaks even in roughly 1–2 months and is free after that. Method, stated so this is not read as a quotation: debt from the ranked task's effort band; interest = annual changed lines (measured, annualised from the 90-day window) ÷ an ASSUMED 150–400 lines per engineer-day × the 5–12% drag implied by the code-quality signals; breaking point = debt ÷ annual interest. A modelled planning range built from measured inputs and one named assumption — not a quotation, a valuation, or a certified figure.
Evidence: D15 churn: 156,131 line(s) changed over a 90-day window ⇒ ~633,198/year · D1/D2/D4 code quality: averaging 5.9/10 ⇒ a 5–12% drag on each change · top-ranked remediation: Low effort ⇒ about 1–3 engineer-day(s)
→ Do the top-ranked fix now if this code will still be yours in 2 months.
Highest-leverage move · Medium · Leverage
Of everything flagged, the best return on effort is: Add an 'Architecture' / 'How it works' section to the root README — the high-level shape. The rest can wait behind it.
Evidence: priority ranking: top of 5 ranked by impact/effort
→ Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
A velocity tax on every change · Medium · Economics
The code-quality signals (complexity, duplication, cohesion) average 5.9/10, which acts as a tax on every change in the weaker areas: modifications there plausibly cost on the order of 5–12% more than in clean code, and the tax compounds as the codebase grows. (A modelled estimate, not a measured fact.)
Evidence: D1/D2/D4 code quality: averaging 5.9/10 across the code-quality signals actually measured
→ Pay it down where churn is highest — the hotspots — not everywhere; that's where the tax is actually paid.
Architecture — module dependency matrix
209 modules, 123 dependencies — every dependency points down the layering, so there are no cycles. Rows and columns are the same modules, ordered so that a module only depends on ones above it. A cell means the row depends on the column, and its number is how many type pairs create that dependency. Read one thing: is anything above the diagonal? A mark there is a dependency cycle. (A cycle is all this shows — an unusual but cycle-free dependency sits below the diagonal like any other.)
At a glance — Code Health · 66% · Adequate · gated by D2
Findings mapped to OWASP categories; the specific CVEs/secrets are in the Security dimension cards below and findings.md (redacted only on the public version of this report).
OWASP category
Findings
Severity
A03:2021 — Injection
4
High / Critical
Roadmap
Begin by enhancing the root README with a clear 'Architecture' or 'How it works' section to improve high-level documentation. Next, establish a structured approach to record significant architectural decisions as dated, context-rich documents in a dedicated directory. Then, address the three high-priority static analysis findings, starting with the publish-pypi and dependabot configurations. Finally, ensure supply chain security by generating an SBOM and implementing artifact signing to verify provenance.
Ranked by impact ÷ effort. "Helps" is the estimated gain on the 0–100 health score.
Do this
Helps
Effort
Dimension
Resolve the 3 High finding(s) in Static Analysis (SAST) — start with publish-pypi.yml (2), dependabot.yml.
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
Watchdog is a deep, periodic assessment — run each sprint, monthly, or quarterly, taking the time to go wider and deeper than a quick check and surfacing in one coherent report what you'd otherwise piece together from a dozen separate tools. It scores deterministically: the same commit yields the same score, every run. 21 of 22 evaluated dimensions are computed purely by tools and static analysis (confidence 1.0); 1 documentation/naming judgement(s) are LLM-assisted and labelled advisory. Overall confidence is 0.5 — the weighted average across measured dimensions; it falls as more of the score leans on LLM-assisted judgement and rises when it's fully tool-backed.
Every figure here is one of three kinds, and we label which: ✓ Measured — a deterministic fact (LoC, complexity, coverage); ~ Modeled — an estimate from a stated model (cost, effort, value-at-risk), always a range with its assumptions, never a precise fact; ◐ Advisory — an LLM prose judgement. We never present a modelled estimate as if it were measured. Perfect or absent scores carry their provenance too (ADR-0011): ✓ Tool-verified means the property itself was measured across the surface; ○ Nothing flagged means the probes came back clean — a claim bounded by what a repository can show; ⊘ Not evidenced means a working control (a tested restore, an automated rollback) showed no positive evidence — absence of evidence is not evidence of a control, so it's excluded from the score rather than awarded a spurious 10; ◐ Sampled · advisory marks an LLM verdict over a bounded sample — advisory, never a deterministic measurement.
What we checked — 22 dimensions across the health lenses
Each chip is a dimension scored from real signals across architecture, testing, dependencies, security & compliance, documentation, git-history and code quality — in one coherent pass. A surface report typically covers a handful.
How to trust any code-health report — three questions
Can you open the finding? Real findings cite a repo-relative file and line you can open at the cited line — never an absolute scratch path. Here, 438 of 448 do; the remainder are repo-wide signals — a dimension-level measurement, not a single line. (Every path in this report is repo-relative by construction: paths are normalized at the producer and the report is rejected if any rooted path leaks through.)
Is there a tool behind the number? Every score below names the method that produced it — Roslyn, git, a scanner, or (for a handful of documentation/naming dimensions) an LLM labelled sampled · advisory — not a narrative.
Does re-running give the same result? Run it again on the same commit and the score — and this report, byte for byte — is identical. A report whose numbers move between runs is describing the run, not the code.
This report answers yes to all three. That's the bar to hold any assessment to.
Tools & methods
The actual versions used this run (captured at analysis time) — re-run on the same commit for the identical score.
Method
Backs
Version
Evaluator
Roslyn static analysis
Complexity, cohesion, coupling, dead code, API surface, layering
What ran differently this time — a tool absent, degraded, or that fell back to an estimate. Named openly, not folded silently into the scores. A degraded run also records its exact cause in diagnostics.md.
D19 Documentation Quality — LLM provider failed — The model provider returned an unusable result, so this LLM-assisted dimension fell back to a measurement gap (confidence 0) rather than a penalty. Re-run with a reachable provider to score it.
D30 Dependency Vulnerabilities — scanner not present in this environment — The backing tool was not installed where this scan ran, so this dimension was not scored. Install the tool (or run in the hosted environment, where it is always present) for a graded result.
Repo exclusion declarations: 1 pattern(s) declared (.gitattributes linguist-generated/vendored, .editorconfig generated_code) excluded 0 source file(s) from code-quality scoring. Declarations are the repo's own visible statement that a tree is machine-written or vendored — auditable in any diff, honored by GitHub the same way.
Limitations & what we did not check
Watchdog assesses the repository exactly as committed, and only the repository. By design it does not reach outside the source tree: the live cloud account, the running CI/CD pipeline, the host's branch-protection and approval rules, the production configuration, or a restore actually exercised against a backup are all out of scope. That boundary is a feature, not a gap — a repo-relative, deterministic scan re-runs identically on any commit and every finding opens at a real file and line, where a live audit can neither be reproduced nor traced. The visible consequence is that controls which leave no in-repo evidence are reported as "not evidenced" and excluded from the score rather than awarded a number a static scan cannot justify.
Per-dimension blind spots
For each dimension that was measured, what a static, repo-only scan structurally cannot see — the honest edge of the measurement, not a failure of it.
D1 Cyclomatic Complexity: Cyclomatic complexity counts branches statically — it cannot tell an essential decision tree from accidental tangle, nor see complexity that lives in data or configuration (large switch-case token tables, DSL lexers/parsers, data-as-code rule tables) rather than control flow: a tokenizer's many single-character cases read as high complexity though each branch is trivial.
D2 Cognitive Complexity: Cognitive-complexity heuristics approximate how hard code is to follow; genuine domain difficulty and well-named intent that eases reading are not captured.
D3 God Classes: "God class" is sized by members and responsibilities visible in the type — a deliberately broad facade over a coherent subsystem can read the same as an accidental grab-bag. For front-end JS the file-length check is cohesion-aware (a single-responsibility module — one class/IIFE — earns a 3× threshold), but cohesion is approximated from top-level declarations, not true dependency structure.
D4 Code Duplication: Duplication is token-similarity (jscpd) — it finds copy-paste, not semantic duplication expressed differently. Committed machine-written code (scaffolded migrations, designer/codegen output, protobuf/OpenAPI stubs, model snapshots) is EXCLUDED — its repetition is the tool's, not the team's — so the score reflects hand-written duplication only.
D13 Secret Scanning: Secret detection is signature- and entropy-based on the current tree — a secret that does not match a known pattern, or one already rotated, will not be flagged (a clean scan is "nothing matched", not "no secrets exist").
D15 Churn × Complexity Hotspots: Churn hotspots come from git history — a freshly imported or squashed repository has no churn signal, and recent rewrites can mask a historically risky file.
D16 Bus Factor: Bus-factor is a time-decayed model of commit attribution (who has recently, repeatedly worked a file), not comprehension — pairing, review and reading-without-committing spread knowledge it can't see; bot commits and shared accounts still distort it.
D21 Naming Consistency: Naming quality is an LLM judgement over a bounded sample — it assesses clarity/consistency of the names it sees, not domain-correctness, and is advisory.
D28 Secrets (history): Secret-history scanning sweeps the git log for known patterns — a secret that predates the available history, or never matched a signature, is not found (clean means "nothing matched in the history we can see").
D29 Static Analysis (SAST): SAST findings are pattern-based (semgrep) — it finds classes of bug it has rules for; logic flaws, auth/authorization gaps and issues needing runtime context are out of reach (and clean means "no rule matched").
D34 Knowledge Freshness: Freshness is decayed commit RECENCY, not comprehension — code read often but rarely committed reads as orphaned, and stable code that genuinely needs no changes is penalised the same as forgotten code; bot/squash commits distort it like the bus factor.
D35 Change Coupling: Change coupling is co-change in COMMITS — files split across separate commits, or coupled only through a shared config/build step, read as uncoupled, and a sweeping commit (rename/format) is excluded so it doesn't couple everything. It shows that files change together, not WHY: a high coupling can be a healthy cohesive pair as readily as a hidden leak.
M4 Documentation accuracy: Onboarding quality is an LLM read of the docs/setup present — it cannot run the onboarding or measure how long a real new joiner takes; the verdict is sampled and advisory.
P4 Deployment & Rollback: Approval/branch-protection rules live in repository settings the scan cannot see — only their in-repo evidence (config files, workflows) is checked, so a control enforced purely in the host's settings reads as "not evidenced".
P6 Release Hygiene: Rollback/observability controls are inferred from repo artefacts (pipelines, dashboards-as-code) — controls configured in external tooling, with no in-repo trace, cannot be credited.
The LLM boundary
LLM-set scores this run (2): D21, M4 (model: Local LLM). For these, a model reads a bounded sample and sets the numeric score (documentation, ADR quality, naming, comment value, onboarding) — D25 sets the ADR-conformance fraction over sampled code, D22 judges API accuracy over a sample. These are sampled and advisory by design: they vary at the margins between runs and are never a deterministic measurement. Every other score in this report is tool-computed at confidence 1.0.
What it measures: How tangled the control flow is — methods with many branches are hard to test and change.
Method: Cyclomatic complexity per method (1 + decision points), computed exhaustively across production source; test projects separated by convention. Deterministic.
+ 101 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 _commands.extension_update (cyclomatic 165) finding(s) in Cyclomatic Complexity — start with _commands.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 PresetManager.register_enabled_presets_for_agent (cyclomatic 75) finding(s) in Cyclomatic Complexity — start with __init__.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 ExtensionManifest._validate (cyclomatic 67) finding(s) in Cyclomatic Complexity — start with __init__.py. — One of this dimension's main actionable groups (1 warning-level).
Enforce Cyclomatic Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d1_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: How hard the code is for a person to follow, beyond raw branching.
Method: Cognitive complexity per method (Sonar-style nesting-penalized score), computed exhaustively over production code, excluding test projects. Deterministic.
+ 179 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 1 _commands.extension_update (cognitive 455) finding(s) in Cognitive Complexity — start with _commands.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 PresetManager._reconcile_composed_commands (cognitive 162) finding(s) in Cognitive Complexity — start with __init__.py. — One of this dimension's main actionable groups (1 warning-level).
Resolve the 1 shared_infra.install_shared_infra (cognitive 159) finding(s) in Cognitive Complexity — start with shared_infra.py. — One of this dimension's main actionable groups (1 warning-level).
Enforce Cognitive Complexity in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d2_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D3 · God Classes8.5 / 10Strong✓ Tool-verified
What it measures: Over-large classes that try to do too much ("god classes").
Method: God-class detection by line and method-count thresholds per logical type (partial classes unified), filtered for generated code and registration/contract false positives. Deterministic.
Resolve the 15 FileTooLong finding(s) in God Classes — start with __init__.py (3), _commands.py (3), catalog.py (2). — One of this dimension's main actionable groups (15 warning-level).
Resolve the 3 TooManyMethods finding(s) in God Classes — start with __init__.py (2), base.py. — One of this dimension's main actionable groups (3 warning-level).
Enforce God Classes in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Prevented — provenance only; does not change the score.
Detailed fixes: d3_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Copy-pasted code that should be shared instead.
Method: Code duplication via token-stream sliding windows with type-aware normalization (locals masked, type names preserved), density-scored per KLoC of production code. Deterministic.
+ 27 more group(s) — more in Appendix A; the complete list is findings.md.
What to do
Resolve the 12 Duplicated block (10 lines × 2) finding(s) in Code Duplication — start with __init__.py (3), _commands.py (3), catalog.py (3). — One of this dimension's main actionable groups (12 warning-level).
Resolve the 11 Duplicated block (13 lines × 2) finding(s) in Code Duplication — start with __init__.py (3), events.py (2), _commands.py (2). — One of this dimension's main actionable groups (11 warning-level).
Resolve the 9 Duplicated block (12 lines × 2) finding(s) in Code Duplication — start with __init__.py (4), base.py (2), catalog.py (2). — One of this dimension's main actionable groups (9 warning-level).
Enforce Code Duplication in CI to reach Verified (currently Documented). — Hardens enforcement from Documented toward Verified — provenance only; does not change the score.
Detailed fixes: d4_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether any secrets (keys, tokens, passwords) have leaked into the code.
Method: In-process native secret scanner (entropy plus signature patterns) across all tracked files; no external tool. A clean result is a measured 10, not no-data zero. Deterministic.
What it measures: Files that change often and are also complex — the riskiest hotspots.
Method: Per production file churn times cyclomatic complexity over a rolling window, computed from git and Roslyn/JS/Razor analysis. Exhaustive, deterministic per commit date.
Detailed fixes: d15_recommendation.md · top locations in Appendix A, every location in findings.md.
Do you agree with this assessment?
D16 · Bus Factor9.5 / 10Exemplary✓ Tool-verified
What it measures: Whether knowledge is concentrated in too few people (the "bus factor").
Method: Living knowledge per author via time-decayed commit attribution (6-month half-life, focus weighting) across largest source files. Deterministic, avoids blame's mechanical-refactor false positives.
5 source file(s) have their living knowledge concentrated in one author (≥90% of recent, decayed contribution). The largest is src/specify_cli/integration_status.py.
Off-boarding risk: anonymized user #1
Further sole-owners (lower concentration)
✓ On the Gold path — maintain.
Detailed fixes: d16_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether names — types, methods, variables — are clear and consistent.
Method: Judged by language model at low temperature (0.0-0.1) on a deterministic random symbol sample (fixed size, not exhaustive), with disclosed confidence band. Advisory, sampled.
What it measures: Whether any secrets were ever committed — scanned across the full git history, not just now.
Method: Git-history secret scan via gitleaks detect over full history in an isolated checkout; each match flagged High. Exhaustive; degrades cleanly when tool absent.
What it measures: Real static-analysis (SAST) findings — likely security bugs in the code, any language.
Method: Polyglot static analysis via semgrep across the repo using the pinned, image-baked p/security-audit + p/owasp-top-ten rulesets (no scan-time registry fetch); severity rules (ERROR/WARNING/INFO) map to a full-band severity-weighted score. Exhaustive, deterministic; degrades on parse failure.
Coverage: semgrep pattern rules over all files — exhaustive for the rule set, blind to classes of bug without a rule (clean = no rule matched).
High: dependabot-missing-cooldown · ×3.github/dependabot.yml:2detected by semgrep finding
Low: subprocess-shell-truesrc/specify_cli/workflows/steps/shell/__init__.py:58detected by semgrep finding
What to do
Resolve the 3 High finding(s) in Static Analysis (SAST) — start with publish-pypi.yml (2), dependabot.yml. — One of this dimension's main actionable groups (3 issue-level).
Resolve the 1 Low finding(s) in Static Analysis (SAST) — start with __init__.py. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d29_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether anyone still has living knowledge of each file, or it has been orphaned — last understood long ago by someone now gone quiet. The sibling of the bus factor: D16 asks who owns it, D34 asks whether anyone still knows it.
Method: File orphaning as total living-knowledge decay below one focused-commit's worth within a year, computed per-file from the D16 decay model. Exhaustive, deterministic over fixed history.
What it measures: Whether files that change together actually belong together — pairs that repeatedly co-change in git history despite having no explicit code dependency, surfacing the hidden/logical coupling (and boundaries in the wrong place) a static scan can't see.
Method: Pairwise co-occurrence over the per-commit file sets in git history (production source only — tests and generated dropped): Degree-of-Coupling = shared ÷ min individual revisions, reported above noise floors (each file ≥10 revisions, ≥5 shared commits, ≥50% strength); sweeping commits excluded. Deterministic over fixed history.
Coverage: Population: PRODUCTION source files only — test and generated files are dropped before pairing, so a class co-changing with its own test (trivially ~100%) can't drown the real production↔production coupling. Pairs ranked by Degree-of-Coupling; coupling through a build step, config, or non-source file isn't seen.
What it measures: Whether the build pipeline provides supply-chain integrity — generated provenance/attestation, signed artifacts (cosign/sigstore), an SBOM, and pinned build actions. Presence of the configuration, not a runtime guarantee.
Method: Supply-chain provenance/signing read deterministically from CI/build config (.github/workflows, .gitlab-ci.yml, azure-pipelines, Jenkinsfile, .circleci) + the release surface: four signals — generated provenance/attestation (SLSA/in-toto/actions-attest), artifact signing (cosign/sigstore/gitsign), an SBOM (syft/sbom-action/*.spdx.json/*.cdx.json), and SHA-pinned build actions — scored 10·present/denom. NotApplicable without a build pipeline. Detects configuration presence, not runtime enforcement.
Resolve the 1 No build provenance finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 No artifact signing finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Resolve the 1 No SBOM finding(s) in Supply-chain Provenance & Signing. — One of this dimension's main actionable groups (1 recommendation-level).
Detailed fixes: d36_recommendation.md · top locations in Appendix A, every location in findings.md.
What it measures: Whether the repository publishes a coordinated-vulnerability-disclosure policy (SECURITY.md or security.txt) with a reporting contact, so finders know how to report a vulnerability. Presence of a policy file with a contact, not whether the policy is adequate or honoured.
Method: Vulnerability-disclosure policy read deterministically from the repo: a SECURITY.md (root/.github/docs) or .well-known/security.txt / security.txt, regex-checked for a reporting contact (email / URL / mailto). Present + contact → 10; present without a contact → 4; NotApplicable when no policy file exists (it may live off-repo). Detects the policy file's presence + contact, not its adequacy.
Maturity · Maturity — Whether the repo and its projects have a README, and whether it's substantive and current.
Method: Filesystem scan: README presence, word count, and headings for depth; git history for staleness. Exhaustive across root and project dirs, deterministic.
What to do
Add an 'Architecture' / 'How it works' section to the root README — the high-level shape.
Maturity · Maturity — Whether key decisions (ADRs) and the high-level shape (C4/diagrams) are written down.
Method: Filesystem scan: ADR folder/naming conventions or content, plus Mermaid/PlantUML/C4/architecture.md discovery. Exhaustive, deterministic.
No Architecture Decision Records found — no conventional ADR directory, no `NNNN-title.md` documents 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.
What to do
Record significant decisions one document per decision — dated, stating the context, the decision and its consequences — and keep them together wherever your design docs already live (a conventional `docs/adr/` tree with `NNNN-title.md` names is the most discoverable form).
Maturity · Maturity — Whether the README actually describes the code that exists (LLM-judged, advisory).
Method: Judged by language model at low temperature: README accuracy versus actual projects, within a disclosed tolerance. Advisory, not a measured number.
Readiness · Readiness — Whether SAST, secret/dependency scanning and performance benchmarking are wired in (presence, not runtime).
Method: Filesystem scan: SAST configuration, dependency-update automation, secret scanning, and a benchmark harness or benchmark step — in this repository's own ecosystem. Exhaustive, deterministic.
What to do
Add gitleaks/trufflehog in CI to block PRs that introduce committed secrets.
Readiness · Readiness — Whether releases are automated and safely reversible (probes, rolling updates, approval gates) — from manifests/pipeline files, not the live environment.
Method: Filesystem scan: deployment manifests/IaC (K8s YAML, Helm, Terraform) for rolling updates, probes, approval gates, migration hooks. Exhaustive, deterministic.
Readiness · Readiness — Whether releases are traceable — a maintained changelog and explicit version stamping.
Method: Filesystem scan: changelog file presence and version tags in csproj or git tags. Exhaustive, deterministic.
Do you agree with this assessment?
Reference — by lens
The score is the rank-weighted fold of these lenses (worst-heaviest), each including its meta-dimensions; a lens with a Critical contributor is capped at Fair (its band reads "gated by …") and is never the strongest area however high its average.
Capped at Fair by a Critical contributor — resolve it before relying on this lens.
Not included — 72 check(s) not relevant to this codebase
These checks had nothing to measure here (no tests, no git history, the codebase is small, or the architecture style doesn't apply), so they're omitted above rather than scored low.
AC1 Text alternatives — No web markup found — accessibility is not applicable to this repository.
AC2 Forms & labels — No web markup found — accessibility is not applicable to this repository.
AC3 Page structure — No web markup found — accessibility is not applicable to this repository.
AC4 Keyboard semantics — No web markup found — accessibility is not applicable to this repository.
AC5 ARIA correctness — No web markup found — accessibility is not applicable to this repository.
AC6 Visual & motion safety — No web markup found — accessibility is not applicable to this repository.
AC7 A11y enforcement — No web markup found — accessibility is not applicable to this repository.
AX1 Captive dependencies — no DI registrations detected
AX10 Code composition — not assessed — code composition is computed by ROLE over a document set that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX2 Stateful singletons — no singleton implementations detected
AX3 Project dependency cycles — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX4 Dependency direction — not assessed — project cycles and dependency direction are computed over a project-reference graph that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX5 Architecture & structure — not assessed — architecture style/structure is computed from a project graph (projects, types, module namespaces) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX6 Interface segregation — not assessed — interface segregation is computed over a type surface that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX7 Slice cohesion — not applicable — not a vertical-slice architecture
AX8 Test isolation — not assessed — test isolation is computed from a project graph (which projects are test projects, and what they reference) that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
AX9 CQS / query purity — no CQRS query handlers detected — query purity is not applicable to this codebase
AXB2 Runtime readiness — Advisory — this card reports evidence and never carries a score, so there is nothing missing here.
C1 Data Protection — Not assessed: these personal data controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks personal data controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C2 Access Controls — Not assessed: these authorization controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks authorization controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C3 Audit Trail — Not assessed: these audit controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks audit controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C4 Data Retention — Not assessed: these retention controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks retention controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
C5 Data-Subject Rights — Not assessed: these data-subject rights controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks data-subject rights controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
D10 Test Quality — ~84381 lines of test source are present (.py) but the test-quality collector reads C# only, so skipped/assertion-free tests couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
D11 Test Reliability — Test reliability not included
D12 Dependency Hygiene — Dependency hygiene not measured — dependency manifest found but not parsed for hygiene
D14 License Compliance — Not scored — this repository's package manifest is not parsed for licence data yet. A gap in the analyzer's language coverage, NOT a finding that the repository's licenses are compliant (a Python pyproject.toml/requirements.txt (pip/uv/Poetry)), which this pass does not parse yet — so this dimension asserts nothing about this repository's licensing in either direction.
D17 Explicit Debt — explicit-debt markers are read through a C# workspace today, so they were not read for this repository's language — this asserts nothing about how many markers the code carries. Not scored — this is a gap in the analyzer, not a finding about this repository
D18 Solution Shape — D18 scores the shape of a .NET solution; this repository has no .NET solution or project files, so the dimension does not apply.
D19 Documentation Quality — LLM evaluation failed
D20 ADR Quality — N/A — ADRs are expected on deployable products with a user-facing host, not consumed libraries; no ADR log is required here.
D22 Internal API Consistency — No exposed public API
D23 Boundary Type-Coupling — Production source is present (.py) but bounded contexts are resolved over the C#/VB project set, which exposed none, so context scope could not be assessed. Not scored — this is a gap in the analyzer, not a verdict about this repository. Declaring the codebase's bounded contexts (≥2) would let cross-boundary type coupling be assessed — see the recommendation on this dimension for where. Declare them in `.codehealth/config.yaml` at the repository root (create it if absent), mapping each context name to the module-path or namespace prefixes that belong to it — e.g. `architecture:` → `contexts:` → `Billing: ["src/billing", "Acme.Billing"]`, `Catalog: ["src/catalog", "Acme.Catalog"]`.
D24 Comment Value — No inline comments to assess — comment value is not applicable here.
D25 ADR Conformance — no ADRs to check
D26 Project Cohesion — Project cohesion is assessed over the .NET project set; this target exposed no projects, so project size and spread could not be assessed. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D27 Navigability — No calls could be sampled, so navigability was not assessed — tracing effort is measured over resolved call sites and this target exposed none. Not scored — this is a gap in the analyzer's reach, not a verdict about this repository.
D30 Dependency Vulnerabilities — Not scored — no dependency manifest in a supported ecosystem was read for this repository. A gap in the analyzer's language coverage, NOT a finding that the repository is free of vulnerable dependencies (a Python pyproject.toml/requirements.txt (pip/uv/Poetry) — not scanned yet) — where an OSV-supported manifest exists, dependency vulnerabilities for this repository are reported under D38 instead.
D31 IaC & Container Security — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.
D32 Data Compliance (PII/GDPR) — No PII/GDPR-handling patterns detected (p/gdpr ruleset) — no data-compliance surface to assess.
D33 JS/npm Dependency Vulnerabilities — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
D38 OSV Dependency Vulnerabilities — No supported non-.NET dependency lockfile found outside build output (npm package-lock/yarn/pnpm/bun, Go go.mod, Rust Cargo.lock, Maven pom.xml, Gradle lockfiles, Python requirements.txt/poetry.lock/Pipfile.lock/pdm.lock, PHP composer.lock, Ruby Gemfile.lock, Elixir mix.lock, Dart pubspec.lock, Swift Package.resolved); nothing for OSV to scan. A NuGet-only repo stays NotApplicable — .NET CVEs are D30's domain.
D39 IL Efficiency — D39 measures the IL emitted by a .NET build; this repository has no .NET solution or project files, so the dimension does not apply.
D40 Network Egress Confinement — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
D41 Kernel & Syscall Confinement — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
D42 Runtime Threat Enforcement — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
D5 Coupling — Inter-project coupling could not be assessed — no analyzable project graph was found for this repository. Not scored: a gap in the analyzer's reach, not a verdict about this repository. (Coupling here is Martin afferent/efferent/instability plus reference cycles across a project-reference graph, read today from .NET project files; other ecosystems' module graphs are not read yet.)
D6 Cohesion (LCOM4) — Cohesion (LCOM4) is measured over a C#/VB class graph, and this repository's production source is .py, which this pass does not read — so no class could be assessed. Not scored — this is a gap in the analyzer, not a finding about this repository.
D7 Architectural Integrity — no checkable ADRs, and no project-reference graph for the cycle pass to read — so this dimension makes no claim about dependency cycles in either direction (where this repository's language has an import-cycle lens, cycles are reported there). Architectural integrity not assessed
D8 Code Coverage — Coverage not included — suite not readable by the collector
D9 Test Distribution — Test source is present (.py) but the test-pyramid classifier reads C# only, so its unit/integration/BDD/E2E split couldn't be counted. Not scored — this is a gap in the analyzer, not a finding about this repository.
DM1 Domain Modelling — not scored — this repository shows only 1 of the 3 signals this check looks for (39 value object(s))
ED1 Event-Driven — not scored — this repository shows none of the 3 signals this check looks for
ED5 Idempotency — no mutating command handlers or message consumers detected — idempotency check not applicable
ES1 Event Sourcing — not scored — this repository shows none of the 3 signals this check looks for
GD1 Unfinished & placeholder code — no source files
IC1 Incompleteness & stubs — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P12 CI test-gate honesty — Reported, not scored — and nothing was matched here. The coverage check applies to any stack, but the checks for excluded tests, skipped tests and sleep-based synchronisation currently recognise only some ecosystems' test-runner idioms, so on a repository built with another stack the zeros below mean 'not checked', not 'clean'.
P2 Observability — Observability was not assessed: this check reads a source model that does not carry this repository's product — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of a logging idiom this check recognises is NOT evidence that this repo lacks structured logging (it may log through its own ecosystem's logger). This is a gap in the analyzer, not a finding about this repository.
P5 DR & Backup — not evidenced — repo shows no backup/RTO/RPO controls; absence of evidence is not evidence of a working control
P7 Outbound HTTP resilience — not measured — the application kind could not be determined for this repo
P8 Schema migrations — not assessed — schema-migration practice is read from a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
P9 Domain vs controller coverage — no coverage report found on disk — produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored, or wire coverage collection into CI, to enable this cross-layer check
PF1 Benchmark discipline — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF2 Allocation hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
PF3 Async & latency hygiene — Performance was not assessed: this lens reads a source model that was not loaded for this repository, because the repository is written in a language this lens does not yet model or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository — in particular it is NOT a statement that this repo is unpackaged or performance-careless.
S1 Web-Security Posture — Not assessed: these web-security controls are read from a source model (declarative annotations, request middleware, entity/column names, guard methods) that was not loaded for this repository — because the repository is written in a language this check does not yet model, or because its projects failed to load. Absence of an idiom this check recognises is NOT evidence that this repository lacks web-security controls: it may implement them entirely in its own ecosystem. This is a gap in the analyzer's language coverage, not a finding about this repository.
X1 Async correctness — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X2 Cancellation propagation — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X3 Exception handling — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X4 Structured logging — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
X5 Nullable reference types — not analysed — these correctness checks read a source model that was not loaded for this repository, because the repository is written in a language this check does not yet model, or because its projects failed to load. This is a gap in the analyzer, not a finding about this repository
Appendix A — Findings (grouped)
The findings behind the scores, grouped by severity, then by dimension and kind. The high-severity issues are enumerated in full below; items per group are capped at 25 with any overflow stated explicitly per group, never silently truncated. The complete machine-readable list of every finding (all severities) is the companion findings.md in this report's bundle.
High: dependabot-missing-cooldown .github/dependabot.yml:2— This Dependabot configuration does not set a cooldown period. Newly published packages can be malicious or unstable. Add a `cooldown` block with `default-days: 7` to each `package-ecosystem` entry under `updates` to wait 7 days before proposing updates to newly published package versions. Reference: https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#cooldown. This is a semgrep security-AUDIT rule reporting a POLICY that is absent or weaker than its recommendation, not an exploitable defect. Confirm whether the current setting is a deliberate decision for this repository — and apply the change where it is not; where it is (a policy your release process already enforces elsewhere, or one this repository has consciously opted out of), record the decision and leave the configuration as it is. This configuration file has 2 such entries; one cooldown decision clears them all — reported once.
High: run-shell-injection .github/workflows/publish-pypi.yml:22— Using variable interpolation `${{...}}` with a workflow input in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. A workflow input is not bounded by this step and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
High: run-shell-injection .github/workflows/publish-pypi.yml:43— Using variable interpolation `${{...}}` with a workflow input in a `run:` step could allow an attacker to inject their own code into the runner. This would allow them to steal secrets and code. A workflow input is not bounded by this step and should be treated as untrusted. Instead, use an intermediate environment variable with `env:` to store the data and use the environment variable in the `run:` script. Reference it as a shell VARIABLE rather than a `${{ }}` interpolation, using your shell's own syntax (`"$ENVVAR"` in bash, `$env:ENVVAR` in PowerShell), so the value is passed as data and never re-expanded as code.
FileTooLong: presets/__init__.py src/specify_cli/presets/__init__.py:0— FileTooLong — 3397 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: extensions/__init__.py src/specify_cli/extensions/__init__.py:0— FileTooLong — 2784 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: workflows/_commands.py src/specify_cli/workflows/_commands.py:0— FileTooLong — 2711 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: extensions/_commands.py src/specify_cli/extensions/_commands.py:0— FileTooLong — 1842 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: workflows/catalog.py src/specify_cli/workflows/catalog.py:0— FileTooLong — 1006 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: integrations/base.py src/specify_cli/integrations/base.py:0— FileTooLong — 985 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: workflows/engine.py src/specify_cli/workflows/engine.py:0— FileTooLong — 974 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: specify_cli/_version.py src/specify_cli/_version.py:0— FileTooLong — 929 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: specify_cli/agents.py src/specify_cli/agents.py:0— FileTooLong — 805 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: commands/init.py src/specify_cli/commands/init.py:0— FileTooLong — 759 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: bundle/__init__.py src/specify_cli/commands/bundle/__init__.py:0— FileTooLong — 709 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: integrations/_migrate_commands.py src/specify_cli/integrations/_migrate_commands.py:0— FileTooLong — 627 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: presets/_commands.py src/specify_cli/presets/_commands.py:0— FileTooLong — 610 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: integrations/catalog.py src/specify_cli/integrations/catalog.py:0— FileTooLong — 542 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
FileTooLong: specify_cli/integration_status.py src/specify_cli/integration_status.py:0— FileTooLong — 518 significant lines (blank, comment-only and punctuation-only lines excluded). To reduce it, split the file along the responsibilities already in it: move each cohesive group of declarations into its own sibling file in the same module or package, so no one file has to be read whole to change one of them.
Duplicated block (10 lines × 2) src/specify_cli/bundler/services/primitives.py:200— src/specify_cli/bundler/services/primitives.py:200-209 | src/specify_cli/bundler/services/primitives.py:283-294 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/specify_cli/events.py:2027— src/specify_cli/events.py:2027-2036 | src/specify_cli/events.py:2115-2127 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (10 lines × 2) src/specify_cli/extensions/__init__.py:2274— src/specify_cli/extensions/__init__.py:2274-2287 | src/specify_cli/extensions/__init__.py:2308-2317 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/specify_cli/extensions/_commands.py:285— src/specify_cli/extensions/_commands.py:285-294 | src/specify_cli/extensions/_commands.py:353-362 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/extensions/_commands.py:285` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/specify_cli/extensions/_commands.py:444— src/specify_cli/extensions/_commands.py:444-453 | src/specify_cli/presets/_commands.py:683-692 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (10 lines × 2) src/specify_cli/integrations/_migrate_commands.py:78— src/specify_cli/integrations/_migrate_commands.py:78-87 | src/specify_cli/integrations/_migrate_commands.py:106-115 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/integrations/_migrate_commands.py:78` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/specify_cli/presets/__init__.py:1591— src/specify_cli/presets/__init__.py:1591-1600 | src/specify_cli/presets/__init__.py:2082-2091 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (10 lines × 2) src/specify_cli/workflows/_commands.py:2189— src/specify_cli/workflows/_commands.py:2189-2198 | src/specify_cli/workflows/_commands.py:3166-3177 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (10 lines × 2) src/specify_cli/workflows/catalog.py:491— src/specify_cli/workflows/catalog.py:491-500 | src/specify_cli/workflows/catalog.py:1186-1195 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (10 lines × 2) src/specify_cli/workflows/catalog.py:628— src/specify_cli/workflows/catalog.py:628-637 | src/specify_cli/workflows/catalog.py:1319-1328 — both copies are in the same file, so extract the block into one function there and call it from each site — 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. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (10 lines × 2) src/specify_cli/workflows/catalog.py:805— src/specify_cli/workflows/catalog.py:805-814 | src/specify_cli/workflows/catalog.py:1484-1495 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/workflows/catalog.py:805` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (10 lines × 2) src/specify_cli/workflows/steps/command/__init__.py:46— src/specify_cli/workflows/steps/command/__init__.py:46-60 | src/specify_cli/workflows/steps/command/__init__.py:117-126 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/workflows/steps/command/__init__.py:46` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
Duplicated block (13 lines × 2) src/specify_cli/_version.py:534— src/specify_cli/_version.py:534-546 | src/specify_cli/_version.py:554-566 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/_version.py:534` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) src/specify_cli/bundler/lib/yamlio.py:153— src/specify_cli/bundler/lib/yamlio.py:153-165 | src/specify_cli/workflows/catalog.py:184-196 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/workflows/catalog.py:184` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) src/specify_cli/events.py:1399— src/specify_cli/events.py:1399-1412 | src/specify_cli/events.py:1430-1442 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) src/specify_cli/events.py:2062— src/specify_cli/events.py:2062-2074 | src/specify_cli/events.py:2307-2323 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (13 lines × 2) src/specify_cli/extensions/__init__.py:3920— src/specify_cli/extensions/__init__.py:3920-3932 | src/specify_cli/presets/__init__.py:4602-4614 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/extensions/__init__.py:3920` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 2) src/specify_cli/integrations/_install_commands.py:227— src/specify_cli/integrations/_install_commands.py:227-239 | src/specify_cli/integrations/_migrate_commands.py:599-611 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (13 lines × 2) src/specify_cli/integrations/base.py:1796— src/specify_cli/integrations/base.py:1796-1808 | src/specify_cli/integrations/hermes/__init__.py:164-176 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/integrations/base.py:1796` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (13 lines × 2) src/specify_cli/presets/__init__.py:2892— src/specify_cli/presets/__init__.py:2892-2904 | src/specify_cli/presets/__init__.py:3228-3240 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (13 lines × 2) src/specify_cli/presets/__init__.py:3406— src/specify_cli/presets/__init__.py:3406-3418 | src/specify_cli/presets/__init__.py:3454-3466 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) src/specify_cli/workflows/_commands.py:1897— src/specify_cli/workflows/_commands.py:1897-1909 | src/specify_cli/workflows/_commands.py:2134-2146 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (13 lines × 2) src/specify_cli/workflows/overlays/_commands.py:81— src/specify_cli/workflows/overlays/_commands.py:81-93 | src/specify_cli/workflows/overlays/_commands.py:138-150 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Hotspot: src/specify_cli/extensions/_commands.py src/specify_cli/extensions/_commands.py— src/specify_cli/extensions/_commands.py changed 16 times in last 90 days, max complexity 165. 9 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: src/specify_cli/extensions/__init__.py src/specify_cli/extensions/__init__.py— src/specify_cli/extensions/__init__.py changed 37 times in last 90 days, max complexity 67. 29 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: src/specify_cli/presets/__init__.py src/specify_cli/presets/__init__.py— src/specify_cli/presets/__init__.py changed 32 times in last 90 days, max complexity 75. 27 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: src/specify_cli/agents.py src/specify_cli/agents.py— src/specify_cli/agents.py changed 27 times in last 90 days, max complexity 44. 19 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: src/specify_cli/__init__.py src/specify_cli/__init__.py— src/specify_cli/__init__.py changed 53 times in last 90 days, max complexity 21. 21 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: src/specify_cli/workflows/_commands.py src/specify_cli/workflows/_commands.py— src/specify_cli/workflows/_commands.py changed 20 times in last 90 days, max complexity 53. 13 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: src/specify_cli/workflows/engine.py src/specify_cli/workflows/engine.py— src/specify_cli/workflows/engine.py changed 25 times in last 90 days, max complexity 35. 14 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: src/specify_cli/shared_infra.py src/specify_cli/shared_infra.py— src/specify_cli/shared_infra.py changed 12 times in last 90 days, max complexity 56. 9 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: src/specify_cli/integrations/base.py src/specify_cli/integrations/base.py— src/specify_cli/integrations/base.py changed 25 times in last 90 days, max complexity 20. 12 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Hotspot: src/specify_cli/workflows/expressions.py src/specify_cli/workflows/expressions.py— src/specify_cli/workflows/expressions.py changed 15 times in last 90 days, max complexity 29. 12 of those changes were fix/bug commits, so the churn is repair rather than feature work. Before the next change lands here, cover the area it touches with tests, then split that area out of the file so the following change is smaller than this one — a file this often edited pays the complexity back every time.
Duplicated block (12 lines × 2) src/specify_cli/_download_security.py:675— src/specify_cli/_download_security.py:675-686 | src/specify_cli/_download_security.py:792-803 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/_download_security.py:675` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/specify_cli/extensions/__init__.py:2560— src/specify_cli/extensions/__init__.py:2560-2573 | src/specify_cli/presets/__init__.py:3689-3700 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/extensions/__init__.py:2560` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/specify_cli/extensions/__init__.py:4021— src/specify_cli/extensions/__init__.py:4021-4032 | src/specify_cli/presets/__init__.py:4701-4712 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/extensions/__init__.py:4021` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) src/specify_cli/integrations/base.py:1162— src/specify_cli/integrations/base.py:1162-1173 | src/specify_cli/integrations/base.py:1366-1377 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (12 lines × 2) src/specify_cli/integrations/base.py:1716— src/specify_cli/integrations/base.py:1716-1734 | src/specify_cli/integrations/hermes/__init__.py:115-126 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/integrations/base.py:1716` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/specify_cli/integrations/catalog.py:403— src/specify_cli/integrations/catalog.py:403-414 | src/specify_cli/integrations/catalog.py:516-528 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (12 lines × 2) src/specify_cli/presets/__init__.py:2780— src/specify_cli/presets/__init__.py:2780-2791 | src/specify_cli/presets/__init__.py:3451-3462 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/presets/__init__.py:2780` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (12 lines × 2) src/specify_cli/presets/__init__.py:3236— src/specify_cli/presets/__init__.py:3236-3247 | src/specify_cli/presets/__init__.py:3328-3339 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (12 lines × 2) src/specify_cli/workflows/catalog.py:406— src/specify_cli/workflows/catalog.py:406-417 | src/specify_cli/workflows/catalog.py:1101-1112 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/workflows/catalog.py:406` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) scripts/python/check_prerequisites.py:95— scripts/python/check_prerequisites.py:95-102 | scripts/python/setup_tasks.py:46-53 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (8 lines × 2) src/specify_cli/agents.py:969— src/specify_cli/agents.py:969-979 | src/specify_cli/extensions/__init__.py:1568-1575 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) src/specify_cli/catalogs.py:166— src/specify_cli/catalogs.py:166-175 | src/specify_cli/presets/__init__.py:4263-4270 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/catalogs.py:166` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) src/specify_cli/extensions/_commands.py:560— src/specify_cli/extensions/_commands.py:560-567 | src/specify_cli/presets/_commands.py:814-821 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (8 lines × 2) src/specify_cli/extensions/_commands.py:1079— src/specify_cli/extensions/_commands.py:1079-1086 | src/specify_cli/extensions/_commands.py:2589-2596 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/extensions/_commands.py:1079` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/specify_cli/integrations/_install_commands.py:52— src/specify_cli/integrations/_install_commands.py:52-59 | src/specify_cli/integrations/_migrate_commands.py:245-252 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (8 lines × 2) src/specify_cli/presets/_commands.py:512— src/specify_cli/presets/_commands.py:512-520 | src/specify_cli/workflows/_commands.py:3675-3682 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/workflows/_commands.py:3675` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (8 lines × 2) src/specify_cli/workflows/catalog.py:420— src/specify_cli/workflows/catalog.py:420-427 | src/specify_cli/workflows/catalog.py:1115-1122 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/workflows/catalog.py:420` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (8 lines × 2) src/specify_cli/workflows/overlays/merge.py:72— src/specify_cli/workflows/overlays/merge.py:72-79 | src/specify_cli/workflows/overlays/merge.py:87-94 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/specify_cli/bundler/commands_impl/catalog_config.py:56— src/specify_cli/bundler/commands_impl/catalog_config.py:56-66 | src/specify_cli/bundler/models/catalog.py:291-301 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/bundler/commands_impl/catalog_config.py:56` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) src/specify_cli/bundler/services/adapters.py:77— src/specify_cli/bundler/services/adapters.py:77-87 | src/specify_cli/commands/bundle/__init__.py:872-882 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (11 lines × 2) src/specify_cli/extensions/__init__.py:1660— src/specify_cli/extensions/__init__.py:1660-1671 | src/specify_cli/extensions/__init__.py:1834-1844 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/extensions/__init__.py:1660` it does not close everything it opens, so those exact lines cannot be lifted as they stand — 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.
Duplicated block (11 lines × 2) src/specify_cli/integrations/alquimia/__init__.py:47— src/specify_cli/integrations/alquimia/__init__.py:47-57 | src/specify_cli/integrations/claude/__init__.py:117-127 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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.
Duplicated block (11 lines × 2) src/specify_cli/workflows/_commands.py:3290— src/specify_cli/workflows/_commands.py:3290-3300 | src/specify_cli/workflows/_commands.py:3503-3514 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (11 lines × 2) src/specify_cli/workflows/catalog.py:382— src/specify_cli/workflows/catalog.py:382-393 | src/specify_cli/workflows/catalog.py:1078-1088 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/workflows/catalog.py:382` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
Duplicated block (11 lines × 2) src/specify_cli/workflows/catalog.py:1396— src/specify_cli/workflows/catalog.py:1396-1406 | src/specify_cli/workflows/catalog.py:1465-1475 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (11 lines × 2) src/specify_cli/workflows/engine.py:996— src/specify_cli/workflows/engine.py:996-1006 | src/specify_cli/workflows/engine.py:1076-1086 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (15 lines × 2) src/specify_cli/agents.py:845— src/specify_cli/agents.py:845-861 | src/specify_cli/agents.py:925-939 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (15 lines × 2) src/specify_cli/extensions/__init__.py:4155— src/specify_cli/extensions/__init__.py:4155-4169 | src/specify_cli/presets/__init__.py:4847-4861 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/extensions/__init__.py:4155` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) src/specify_cli/extensions/_commands.py:515— src/specify_cli/extensions/_commands.py:515-529 | src/specify_cli/presets/_commands.py:761-775 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (15 lines × 2) src/specify_cli/workflows/_commands.py:1844— src/specify_cli/workflows/_commands.py:1844-1858 | src/specify_cli/workflows/_commands.py:2486-2500 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/workflows/_commands.py:1844` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (15 lines × 2) src/specify_cli/workflows/steps/command/__init__.py:135— src/specify_cli/workflows/steps/command/__init__.py:135-151 | src/specify_cli/workflows/steps/prompt/__init__.py:105-119 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/workflows/steps/command/__init__.py:135` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
Duplicated block (15 lines × 2) src/specify_cli/workflows/steps/command/__init__.py:259— src/specify_cli/workflows/steps/command/__init__.py:259-273 | src/specify_cli/workflows/steps/prompt/__init__.py:278-292 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/workflows/steps/command/__init__.py:259` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (14 lines × 2) src/specify_cli/_download_security.py:979— src/specify_cli/_download_security.py:979-996 | src/specify_cli/_download_security.py:1163-1176 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/specify_cli/extensions/__init__.py:4136— src/specify_cli/extensions/__init__.py:4136-4149 | src/specify_cli/presets/__init__.py:4830-4843 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/extensions/__init__.py:4136` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (14 lines × 2) src/specify_cli/extensions/_commands.py:2535— src/specify_cli/extensions/_commands.py:2535-2548 | src/specify_cli/extensions/_commands.py:2605-2618 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/specify_cli/presets/_commands.py:583— src/specify_cli/presets/_commands.py:583-596 | src/specify_cli/presets/_commands.py:620-633 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/specify_cli/workflows/_commands.py:1431— src/specify_cli/workflows/_commands.py:1431-1444 | src/specify_cli/workflows/_commands.py:1546-1559 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (14 lines × 2) src/specify_cli/workflows/catalog.py:658— src/specify_cli/workflows/catalog.py:658-671 | src/specify_cli/workflows/catalog.py:1349-1362 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) extensions/git/scripts/python/auto_commit.py:179— extensions/git/scripts/python/auto_commit.py:179-187 | extensions/git/scripts/python/initialize_repo.py:72-81 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once.
Duplicated block (9 lines × 2) src/specify_cli/extensions/__init__.py:510— src/specify_cli/extensions/__init__.py:510-518 | src/specify_cli/extensions/__init__.py:537-545 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/extensions/__init__.py:510` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (9 lines × 2) src/specify_cli/extensions/_commands.py:1415— src/specify_cli/extensions/_commands.py:1415-1423 | src/specify_cli/extensions/_commands.py:1429-1437 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (9 lines × 2) src/specify_cli/extensions/_commands.py:1565— src/specify_cli/extensions/_commands.py:1565-1574 | src/specify_cli/workflows/_commands.py:2689-2697 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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.
Duplicated block (9 lines × 2) src/specify_cli/presets/__init__.py:5161— src/specify_cli/presets/__init__.py:5161-5170 | src/specify_cli/presets/__init__.py:5530-5538 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (9 lines × 2) src/specify_cli/workflows/overlays/_commands.py:215— src/specify_cli/workflows/overlays/_commands.py:215-225 | src/specify_cli/workflows/overlays/_commands.py:268-276 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/specify_cli/extensions/_commands.py:1436— src/specify_cli/extensions/_commands.py:1436-1442 | src/specify_cli/extensions/_commands.py:1479-1485 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (7 lines × 2) src/specify_cli/integrations/_query_commands.py:333— src/specify_cli/integrations/_query_commands.py:333-339 | src/specify_cli/integrations/_query_commands.py:411-417 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/specify_cli/integrations/catalog.py:790— src/specify_cli/integrations/catalog.py:790-796 | src/specify_cli/integrations/catalog.py:799-805 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/integrations/catalog.py:790` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (7 lines × 2) src/specify_cli/workflows/_commands.py:1501— src/specify_cli/workflows/_commands.py:1501-1507 | src/specify_cli/workflows/_commands.py:1590-1596 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/specify_cli/workflows/_commands.py:3641— src/specify_cli/workflows/_commands.py:3641-3647 | src/specify_cli/workflows/_commands.py:3667-3673 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (7 lines × 2) src/specify_cli/workflows/catalog.py:600— src/specify_cli/workflows/catalog.py:600-606 | src/specify_cli/workflows/catalog.py:1294-1300 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (18 lines × 2) src/specify_cli/extensions/__init__.py:3711— src/specify_cli/extensions/__init__.py:3711-3732 | src/specify_cli/presets/__init__.py:4423-4440 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (18 lines × 2) src/specify_cli/extensions/__init__.py:3843— src/specify_cli/extensions/__init__.py:3843-3860 | src/specify_cli/presets/__init__.py:4520-4539 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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.
Duplicated block (18 lines × 2) src/specify_cli/integrations/_install_commands.py:144— src/specify_cli/integrations/_install_commands.py:144-162 | src/specify_cli/integrations/_migrate_commands.py:471-488 — the copies sit in sibling files of one directory: extract the block into a single shared function in that directory and call it from each site, so a change lands once. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/integrations/_install_commands.py:144` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (18 lines × 2) src/specify_cli/workflows/_commands.py:1335— src/specify_cli/workflows/_commands.py:1335-1353 | src/specify_cli/workflows/_commands.py:1473-1490 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (18 lines × 2) src/specify_cli/workflows/steps/command/__init__.py:81— src/specify_cli/workflows/steps/command/__init__.py:81-98 | src/specify_cli/workflows/steps/prompt/__init__.py:58-75 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (21 lines × 2) src/specify_cli/integrations/agy/__init__.py:48— src/specify_cli/integrations/agy/__init__.py:48-68 | src/specify_cli/integrations/cline/__init__.py:100-120 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/integrations/agy/__init__.py:48` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) src/specify_cli/presets/__init__.py:1293— src/specify_cli/presets/__init__.py:1293-1313 | src/specify_cli/presets/__init__.py:1339-1363 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/presets/__init__.py:1293` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) src/specify_cli/workflows/catalog.py:548— src/specify_cli/workflows/catalog.py:548-568 | src/specify_cli/workflows/catalog.py:1243-1263 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/workflows/catalog.py:548` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (21 lines × 2) src/specify_cli/workflows/steps/do_while/__init__.py:67— src/specify_cli/workflows/steps/do_while/__init__.py:67-87 | src/specify_cli/workflows/steps/while_loop/__init__.py:76-96 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/workflows/steps/do_while/__init__.py:67` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) src/specify_cli/events.py:1282— src/specify_cli/events.py:1282-1297 | src/specify_cli/events.py:1376-1392 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) src/specify_cli/events.py:1947— src/specify_cli/events.py:1947-1962 | src/specify_cli/events.py:1979-1997 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (16 lines × 2) src/specify_cli/extensions/__init__.py:4170— src/specify_cli/extensions/__init__.py:4170-4185 | src/specify_cli/presets/__init__.py:4862-4877 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/extensions/__init__.py:4170` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (16 lines × 2) src/specify_cli/workflows/_commands.py:1880— src/specify_cli/workflows/_commands.py:1880-1895 | src/specify_cli/workflows/_commands.py:2117-2132 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
TooManyMethods: PresetManager src/specify_cli/presets/__init__.py:752— TooManyMethods — 39 methods. 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.
TooManyMethods: IntegrationBase src/specify_cli/integrations/base.py:102— TooManyMethods — 34 methods. 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.
TooManyMethods: ExtensionManager src/specify_cli/extensions/__init__.py:864— TooManyMethods — 33 methods. 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.
Duplicated block (22 lines × 2) src/specify_cli/extensions/__init__.py:687— src/specify_cli/extensions/__init__.py:687-713 | src/specify_cli/presets/__init__.py:597-618 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (22 lines × 2) src/specify_cli/extensions/__init__.py:830— src/specify_cli/extensions/__init__.py:830-851 | src/specify_cli/presets/__init__.py:706-727 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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.
Duplicated block (22 lines × 2) src/specify_cli/extensions/__init__.py:3738— src/specify_cli/extensions/__init__.py:3738-3759 | src/specify_cli/presets/__init__.py:4446-4467 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/extensions/__init__.py:3738` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (19 lines × 2) src/specify_cli/extensions/__init__.py:725— src/specify_cli/extensions/__init__.py:725-745 | src/specify_cli/presets/__init__.py:630-648 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (19 lines × 2) src/specify_cli/integrations/_install_commands.py:251— src/specify_cli/integrations/_install_commands.py:251-269 | src/specify_cli/integrations/_install_commands.py:299-318 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (19 lines × 2) src/specify_cli/workflows/catalog.py:516— src/specify_cli/workflows/catalog.py:516-535 | src/specify_cli/workflows/catalog.py:1212-1230 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) src/specify_cli/extensions/__init__.py:3814— src/specify_cli/extensions/__init__.py:3814-3838 | src/specify_cli/integrations/catalog.py:268-284 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/extensions/__init__.py:3814` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (17 lines × 2) src/specify_cli/extensions/_commands.py:1234— src/specify_cli/extensions/_commands.py:1234-1250 | src/specify_cli/extensions/_commands.py:1451-1467 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
Duplicated block (17 lines × 2) src/specify_cli/integrations/base.py:881— src/specify_cli/integrations/base.py:881-900 | src/specify_cli/integrations/forge/__init__.py:113-129 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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.
Duplicated block (20 lines × 2) src/specify_cli/integrations/alquimia/__init__.py:68— src/specify_cli/integrations/alquimia/__init__.py:68-87 | src/specify_cli/integrations/claude/__init__.py:70-89 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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.
Duplicated block (20 lines × 2) src/specify_cli/shared_infra.py:525— src/specify_cli/shared_infra.py:525-544 | src/specify_cli/shared_infra.py:581-600 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/shared_infra.py:525` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (6 lines × 2) src/specify_cli/extensions/__init__.py:3666— src/specify_cli/extensions/__init__.py:3666-3671 | src/specify_cli/integrations/catalog.py:168-173 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (6 lines × 2) src/specify_cli/extensions/_commands.py:1401— src/specify_cli/extensions/_commands.py:1401-1406 | src/specify_cli/presets/_commands.py:497-504 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/presets/_commands.py:497` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that. 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 — the matched region ends inside that line. Extract the lines above it, and read the last line of each site separately.
Duplicated block (5 lines × 3) src/specify_cli/extensions/_commands.py:1478— src/specify_cli/extensions/_commands.py:1478-1482 | src/specify_cli/presets/_commands.py:511-519 | src/specify_cli/workflows/_commands.py:3674-3680 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times.
Duplicated block (5 lines × 3) src/specify_cli/presets/_commands.py:69— src/specify_cli/presets/_commands.py:69-73 | src/specify_cli/presets/_commands.py:504-510 | src/specify_cli/workflows/_commands.py:2954-2958 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart.
Duplicated block (5 lines × 2) src/specify_cli/presets/_commands.py:339— src/specify_cli/presets/_commands.py:339-344 | src/specify_cli/workflows/_commands.py:2856-2860 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/presets/_commands.py:339` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (5 lines × 2) src/specify_cli/workflows/_commands.py:1697— src/specify_cli/workflows/_commands.py:1697-1701 | src/specify_cli/workflows/_commands.py:3607-3613 — both copies are in the same file, so extract the block into one function there and call it from each site — the copies drift apart the first time only one of them is edited.
_commands.extension_update (cyclomatic 165) src/specify_cli/extensions/_commands.py:1508— _commands.extension_update has cyclomatic complexity 165 (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.
PresetManager.register_enabled_presets_for_agent (cyclomatic 75) src/specify_cli/presets/__init__.py:961— PresetManager.register_enabled_presets_for_agent has cyclomatic complexity 75 (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.
ExtensionManifest._validate (cyclomatic 67) src/specify_cli/extensions/__init__.py:255— ExtensionManifest._validate has cyclomatic complexity 67 (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.
ExtensionManager.install_from_directory (cyclomatic 64) src/specify_cli/extensions/__init__.py:1898— ExtensionManager.install_from_directory has cyclomatic complexity 64 (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.
shared_infra.install_shared_infra (cyclomatic 56) src/specify_cli/shared_infra.py:388— shared_infra.install_shared_infra has cyclomatic complexity 56 (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.
_commands.workflow_step_add (cyclomatic 53) src/specify_cli/workflows/_commands.py:3153— _commands.workflow_step_add has cyclomatic complexity 53 (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.
PresetManager._reconcile_composed_commands (cyclomatic 50) src/specify_cli/presets/__init__.py:1626— PresetManager._reconcile_composed_commands has cyclomatic complexity 50 (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.
PresetManager.remove (cyclomatic 48) src/specify_cli/presets/__init__.py:3722— PresetManager.remove has cyclomatic complexity 48 (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.
ExtensionManager.register_enabled_extensions_for_agent (cyclomatic 47) src/specify_cli/extensions/__init__.py:2954— ExtensionManager.register_enabled_extensions_for_agent has cyclomatic complexity 47 (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.
PresetResolver.collect_all_layers (cyclomatic 47) src/specify_cli/presets/__init__.py:5311— PresetResolver.collect_all_layers has cyclomatic complexity 47 (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.
_commands.workflow_add (cyclomatic 46) src/specify_cli/workflows/_commands.py:1706— _commands.workflow_add has cyclomatic complexity 46 (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.
CommandRegistrar.register_commands (cyclomatic 44) src/specify_cli/agents.py:606— CommandRegistrar.register_commands has cyclomatic complexity 44 (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.
_commands.extension_add (cyclomatic 43) src/specify_cli/extensions/_commands.py:848— _commands.extension_add has cyclomatic complexity 43 (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.
IntegrationDescriptor._validate (cyclomatic 43) src/specify_cli/integrations/catalog.py:681— IntegrationDescriptor._validate has cyclomatic complexity 43 (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.
create_new_feature_branch.main (cyclomatic 42) extensions/git/scripts/python/create_new_feature_branch.py:420— create_new_feature_branch.main has cyclomatic complexity 42 (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.
PresetResolver.resolve (cyclomatic 41) src/specify_cli/presets/__init__.py:5037— PresetResolver.resolve has cyclomatic complexity 41 (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.
_commands._install_workflow_from_catalog (cyclomatic 41) src/specify_cli/workflows/_commands.py:2153— _commands._install_workflow_from_catalog has cyclomatic complexity 41 (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.
config.load_auth_config (cyclomatic 36) src/specify_cli/authentication/config.py:70— config.load_auth_config has cyclomatic complexity 36 (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.
PresetManager._register_skills (cyclomatic 36) src/specify_cli/presets/__init__.py:2614— PresetManager._register_skills has cyclomatic complexity 36 (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.
events.install_integration_events (cyclomatic 35) src/specify_cli/events.py:1198— events.install_integration_events has cyclomatic complexity 35 (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.
engine.validate_workflow (cyclomatic 35) src/specify_cli/workflows/engine.py:143— engine.validate_workflow has cyclomatic complexity 35 (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.
engine._validate_steps (cyclomatic 35) src/specify_cli/workflows/engine.py:325— engine._validate_steps has cyclomatic complexity 35 (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.
integration_status.build_integration_status_report (cyclomatic 34) src/specify_cli/integration_status.py:352— integration_status.build_integration_status_report has cyclomatic complexity 34 (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.
PresetManifest._validate (cyclomatic 34) src/specify_cli/presets/__init__.py:288— PresetManifest._validate 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.
_version.self_upgrade (cyclomatic 32) src/specify_cli/_version.py:1224— _version.self_upgrade has cyclomatic complexity 32 (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.
CommandRegistrar.register_commands_for_all_agents (cyclomatic 32) src/specify_cli/agents.py:1048— CommandRegistrar.register_commands_for_all_agents has cyclomatic complexity 32 (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.
_migrate_commands.integration_upgrade (cyclomatic 32) src/specify_cli/integrations/_migrate_commands.py:584— _migrate_commands.integration_upgrade has cyclomatic complexity 32 (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.
PresetManager.unregister_agent_artifacts (cyclomatic 31) src/specify_cli/presets/__init__.py:1401— PresetManager.unregister_agent_artifacts has cyclomatic complexity 31 (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.
_commands._install_workflow_package (cyclomatic 31) src/specify_cli/workflows/_commands.py:963— _commands._install_workflow_package has cyclomatic complexity 31 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
create_new_feature.main (cyclomatic 30) scripts/python/create_new_feature.py:244— create_new_feature.main has cyclomatic complexity 30 (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.
_download_security.safe_extract_tar (cyclomatic 30) src/specify_cli/_download_security.py:1052— _download_security.safe_extract_tar has cyclomatic complexity 30 (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.
ExtensionManager._register_extension_skills (cyclomatic 30) src/specify_cli/extensions/__init__.py:1381— ExtensionManager._register_extension_skills has cyclomatic complexity 30 (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.
PresetManager._unregister_skills_in_dir (cyclomatic 30) src/specify_cli/presets/__init__.py:3254— PresetManager._unregister_skills_in_dir has cyclomatic complexity 30 (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.
WorkflowEngine._execute_steps (cyclomatic 30) src/specify_cli/workflows/engine.py:1107— WorkflowEngine._execute_steps has cyclomatic complexity 30 (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.
expressions._evaluate_simple_expression (cyclomatic 29) src/specify_cli/workflows/expressions.py:437— expressions._evaluate_simple_expression has cyclomatic complexity 29 (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.
_migrate_commands.integration_switch (cyclomatic 28) src/specify_cli/integrations/_migrate_commands.py:232— _migrate_commands.integration_switch 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.
_commands._print_extension_info (cyclomatic 27) src/specify_cli/extensions/_commands.py:1386— _commands._print_extension_info 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.
PresetManager._reconcile_skills (cyclomatic 27) src/specify_cli/presets/__init__.py:2093— PresetManager._reconcile_skills 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.
PresetResolver.resolve_content (cyclomatic 27) src/specify_cli/presets/__init__.py:5552— PresetResolver.resolve_content 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.
_download_security._preflight_zip_central_directory (cyclomatic 26) src/specify_cli/_download_security.py:705— _download_security._preflight_zip_central_directory 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.
HookExecutor.register_hooks (cyclomatic 26) src/specify_cli/extensions/__init__.py:4745— HookExecutor.register_hooks 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.
_install_commands.integration_uninstall (cyclomatic 26) src/specify_cli/integrations/_install_commands.py:218— _install_commands.integration_uninstall 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.
GateStep.execute (cyclomatic 26) src/specify_cli/workflows/steps/gate/__init__.py:39— GateStep.execute 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.
_download_security.safe_extract_zip (cyclomatic 25) src/specify_cli/_download_security.py:887— _download_security.safe_extract_zip has cyclomatic complexity 25 (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.
_version._detect_install_method (cyclomatic 25) src/specify_cli/_version.py:481— _version._detect_install_method has cyclomatic complexity 25 (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.
_version._emit_failure (cyclomatic 25) src/specify_cli/_version.py:1015— _version._emit_failure has cyclomatic complexity 25 (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.
workflows.load_custom_steps (cyclomatic 25) src/specify_cli/workflows/__init__.py:75— workflows.load_custom_steps has cyclomatic complexity 25 (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.
_commands.preset_add (cyclomatic 24) src/specify_cli/presets/_commands.py:79— _commands.preset_add has cyclomatic complexity 24 (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.
InitStep.execute (cyclomatic 24) src/specify_cli/workflows/steps/init/__init__.py:78— InitStep.execute has cyclomatic complexity 24 (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.
events._find_command_template (cyclomatic 23) src/specify_cli/events.py:458— events._find_command_template has cyclomatic complexity 23 (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.
_commands.workflow_run (cyclomatic 23) src/specify_cli/workflows/_commands.py:1309— _commands.workflow_run has cyclomatic complexity 23 (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.
_install_commands.integration_install (cyclomatic 22) src/specify_cli/integrations/_install_commands.py:40— _install_commands.integration_install 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.
_commands.workflow_update (cyclomatic 22) src/specify_cli/workflows/_commands.py:2636— _commands.workflow_update 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.
merge._traverse_and_apply (cyclomatic 22) src/specify_cli/workflows/overlays/merge.py:233— merge._traverse_and_apply 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.
auto_commit._parse_auto_commit_config (cyclomatic 21) extensions/git/scripts/python/auto_commit.py:49— auto_commit._parse_auto_commit_config 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.
specify_cli.ensure_executable_scripts (cyclomatic 21) src/specify_cli/__init__.py:217— specify_cli.ensure_executable_scripts 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.
_github_http.resolve_github_release_asset_api_url (cyclomatic 21) src/specify_cli/_github_http.py:67— _github_http.resolve_github_release_asset_api_url has cyclomatic complexity 21 (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.
IntegrationCatalog.remove_catalog (cyclomatic 21) src/specify_cli/integrations/catalog.py:497— IntegrationCatalog.remove_catalog 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.
IntegrationManifest.uninstall (cyclomatic 21) src/specify_cli/integrations/manifest.py:325— IntegrationManifest.uninstall has cyclomatic complexity 21 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PresetManager._unregister_skills (cyclomatic 21) src/specify_cli/presets/__init__.py:3057— PresetManager._unregister_skills 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.
_version._run_installer (cyclomatic 20) src/specify_cli/_version.py:768— _version._run_installer has cyclomatic complexity 20 (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.
BundleManifest.structural_errors (cyclomatic 20) src/specify_cli/bundler/models/manifest.py:162— BundleManifest.structural_errors has cyclomatic complexity 20 (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.
installer.install_bundle (cyclomatic 20) src/specify_cli/bundler/services/installer.py:59— installer.install_bundle has cyclomatic complexity 20 (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.
events.resolve_events (cyclomatic 20) src/specify_cli/events.py:803— events.resolve_events has cyclomatic complexity 20 (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.
events.collect_extension_events (cyclomatic 20) src/specify_cli/events.py:944— events.collect_extension_events has cyclomatic complexity 20 (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.
_query_commands.integration_list (cyclomatic 20) src/specify_cli/integrations/_query_commands.py:28— _query_commands.integration_list has cyclomatic complexity 20 (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.
IntegrationBase.process_template (cyclomatic 20) src/specify_cli/integrations/base.py:759— IntegrationBase.process_template has cyclomatic complexity 20 (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.
CommandStep.execute (cyclomatic 20) src/specify_cli/workflows/steps/command/__init__.py:31— CommandStep.execute has cyclomatic complexity 20 (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.
update_agent_context._upsert_section (cyclomatic 19) extensions/agent-context/scripts/python/update_agent_context.py:244— update_agent_context._upsert_section 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.
_download_security.detect_archive_format (cyclomatic 19) src/specify_cli/_download_security.py:111— _download_security.detect_archive_format has cyclomatic complexity 19 (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.
CommandRegistrar.unregister_commands (cyclomatic 19) src/specify_cli/agents.py:1278— CommandRegistrar.unregister_commands 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.
bundle.bundle_info (cyclomatic 19) src/specify_cli/commands/bundle/__init__.py:204— bundle.bundle_info 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.
events._resolve_event_command_argv (cyclomatic 19) src/specify_cli/events.py:536— events._resolve_event_command_argv has cyclomatic complexity 19 (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.
ExtensionManager._find_extension_skill_dirs (cyclomatic 19) src/specify_cli/extensions/__init__.py:1595— ExtensionManager._find_extension_skill_dirs 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.
ExtensionManager.scaffold_config (cyclomatic 19) src/specify_cli/extensions/__init__.py:2620— ExtensionManager.scaffold_config 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.
_query_commands.integration_info (cyclomatic 19) src/specify_cli/integrations/_query_commands.py:366— _query_commands.integration_info 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.
PresetCatalog.download_pack (cyclomatic 19) src/specify_cli/presets/__init__.py:4744— PresetCatalog.download_pack has cyclomatic complexity 19 (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.
_commands.workflow_info (cyclomatic 19) src/specify_cli/workflows/_commands.py:2864— _commands.workflow_info 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.
ExtensionCatalog.search (cyclomatic 18) src/specify_cli/extensions/__init__.py:3974— ExtensionCatalog.search has cyclomatic complexity 18 (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.
ExtensionCatalog.download_extension (cyclomatic 18) src/specify_cli/extensions/__init__.py:4060— ExtensionCatalog.download_extension has cyclomatic complexity 18 (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.
_commands.extension_info (cyclomatic 18) src/specify_cli/extensions/_commands.py:1277— _commands.extension_info has cyclomatic complexity 18 (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.
kimi._migrate_legacy_kimi_skills_dir (cyclomatic 18) src/specify_cli/integrations/kimi/__init__.py:217— kimi._migrate_legacy_kimi_skills_dir has cyclomatic complexity 18 (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.
PresetManager._infer_legacy_skill_provenance (cyclomatic 18) src/specify_cli/presets/__init__.py:2806— PresetManager._infer_legacy_skill_provenance has cyclomatic complexity 18 (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.
_commands._commit_workflow_file (cyclomatic 18) src/specify_cli/workflows/_commands.py:723— _commands._commit_workflow_file has cyclomatic complexity 18 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
PromptStep.execute (cyclomatic 18) src/specify_cli/workflows/steps/prompt/__init__.py:40— PromptStep.execute has cyclomatic complexity 18 (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.
CatalogStackBase._load_catalog_config (cyclomatic 17) src/specify_cli/catalogs.py:98— CatalogStackBase._load_catalog_config 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.
init._install_extension_during_init (cyclomatic 17) src/specify_cli/commands/init.py:85— init._install_extension_during_init 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.
ExtensionManager._extension_owned_skill_names (cyclomatic 17) src/specify_cli/extensions/__init__.py:1762— ExtensionManager._extension_owned_skill_names 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.
ExtensionManager.remove (cyclomatic 17) src/specify_cli/extensions/__init__.py:2746— ExtensionManager.remove 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.
_commands.extension_search (cyclomatic 17) src/specify_cli/extensions/_commands.py:1182— _commands.extension_search 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.
IntegrationCatalog.search (cyclomatic 17) src/specify_cli/integrations/catalog.py:292— IntegrationCatalog.search 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.
IntegrationCatalog.add_catalog (cyclomatic 17) src/specify_cli/integrations/catalog.py:384— IntegrationCatalog.add_catalog 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.
yamlio.dump_json (cyclomatic 16) src/specify_cli/bundler/lib/yamlio.py:126— yamlio.dump_json has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
ExtensionManager._get_skills_dir (cyclomatic 16) src/specify_cli/extensions/__init__.py:1143— ExtensionManager._get_skills_dir 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.
_migrate_commands._installed_presets_affecting_agent (cyclomatic 16) src/specify_cli/integrations/_migrate_commands.py:131— _migrate_commands._installed_presets_affecting_agent 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.
_query_commands.integration_search (cyclomatic 16) src/specify_cli/integrations/_query_commands.py:270— _query_commands.integration_search 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.
CopilotIntegration.is_skills_mode (cyclomatic 16) src/specify_cli/integrations/copilot/__init__.py:175— CopilotIntegration.is_skills_mode 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.
PresetManager._register_commands (cyclomatic 16) src/specify_cli/presets/__init__.py:828— PresetManager._register_commands 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.
_commands.preset_info (cyclomatic 16) src/specify_cli/presets/_commands.py:434— _commands.preset_info 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.
_commands.workflow_resume (cyclomatic 16) src/specify_cli/workflows/_commands.py:1458— _commands.workflow_resume has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
_commands.workflow_step_remove (cyclomatic 16) src/specify_cli/workflows/_commands.py:3490— _commands.workflow_step_remove has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
WorkflowRegistry.save (cyclomatic 16) src/specify_cli/workflows/catalog.py:140— WorkflowRegistry.save has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
WorkflowEngine._run_fan_out (cyclomatic 16) src/specify_cli/workflows/engine.py:1345— WorkflowEngine._run_fan_out has cyclomatic complexity 16 (threshold 15). To reduce it, separate the branches: extract each independent case into its own named function so the top-level body reads as a short sequence of named decisions.
WorkflowEngine._coerce_input (cyclomatic 16) src/specify_cli/workflows/engine.py:1628— WorkflowEngine._coerce_input 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.
ProjectOverlaySource.collect (cyclomatic 16) src/specify_cli/workflows/overlays/layer_sources.py:127— ProjectOverlaySource.collect 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.
schema._parse_edit (cyclomatic 16) src/specify_cli/workflows/overlays/schema.py:61— schema._parse_edit has cyclomatic complexity 16 (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.
LLM evaluation failed — JSON parse error: Expected end of string, but instead reached end of data. Path: $.findings[1].suggestion | LineNumber: 0 | BytePositionInLine: 1215.
_commands.extension_update (cognitive 455) src/specify_cli/extensions/_commands.py:1508— _commands.extension_update has cognitive complexity 455 (threshold 15). Drivers by points: if/else 296, loops 78, error handling 49, boolean chains 26, ternaries 6 (nesting depth added 288). 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.
PresetManager._reconcile_composed_commands (cognitive 162) src/specify_cli/presets/__init__.py:1626— PresetManager._reconcile_composed_commands has cognitive complexity 162 (threshold 15). Drivers by points: if/else 110, loops 35, boolean chains 10, error handling 7 (nesting depth added 111). 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.
shared_infra.install_shared_infra (cognitive 159) src/specify_cli/shared_infra.py:388— shared_infra.install_shared_infra has cognitive complexity 159 (threshold 15). Drivers by points: if/else 105, loops 23, error handling 21, boolean chains 7, ternaries 3 (nesting depth added 101). 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.
PresetManager.register_enabled_presets_for_agent (cognitive 148) src/specify_cli/presets/__init__.py:961— PresetManager.register_enabled_presets_for_agent has cognitive complexity 148 (threshold 15). Drivers by points: if/else 102, loops 22, boolean chains 19, error handling 5 (nesting depth added 73). 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.
PresetResolver.collect_all_layers (cognitive 133) src/specify_cli/presets/__init__.py:5311— PresetResolver.collect_all_layers has cognitive complexity 133 (threshold 15). Drivers by points: if/else 103, loops 13, error handling 9, boolean chains 4, ternaries 4 (nesting depth added 87). 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.
ExtensionManifest._validate (cognitive 130) src/specify_cli/extensions/__init__.py:255— ExtensionManifest._validate has cognitive complexity 130 (threshold 15). Drivers by points: if/else 100, loops 15, boolean chains 11, ternaries 3, error handling 1 (nesting depth added 61). 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.
ExtensionManager.register_enabled_extensions_for_agent (cognitive 129) src/specify_cli/extensions/__init__.py:2954— ExtensionManager.register_enabled_extensions_for_agent has cognitive complexity 129 (threshold 15). Drivers by points: if/else 99, loops 14, boolean chains 11, error handling 5 (nesting depth added 81). 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.
ExtensionManager.install_from_directory (cognitive 103) src/specify_cli/extensions/__init__.py:1898— ExtensionManager.install_from_directory has cognitive complexity 103 (threshold 15). Drivers by points: if/else 52, error handling 20, loops 18, boolean chains 13 (nesting depth added 48). 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.
create_new_feature_branch.main (cognitive 99) extensions/git/scripts/python/create_new_feature_branch.py:420— create_new_feature_branch.main has cognitive complexity 99 (threshold 15). Drivers by points: if/else 84, boolean chains 7, ternaries 4, error handling 2, loops 2 (nesting depth added 51). 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.
PresetManager.remove (cognitive 98) src/specify_cli/presets/__init__.py:3722— PresetManager.remove has cognitive complexity 98 (threshold 15). Drivers by points: if/else 58, ternaries 14, loops 10, error handling 9, boolean chains 7 (nesting depth added 51). 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.
_commands.workflow_add (cognitive 90) src/specify_cli/workflows/_commands.py:1706— _commands.workflow_add has cognitive complexity 90 (threshold 15). Drivers by points: if/else 49, error handling 21, ternaries 14, boolean chains 6 (nesting depth added 44). 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.
CommandRegistrar.register_commands (cognitive 84) src/specify_cli/agents.py:606— CommandRegistrar.register_commands has cognitive complexity 84 (threshold 15). Drivers by points: if/else 57, loops 10, ternaries 7, boolean chains 5, error handling 5 (nesting depth added 44). 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.
PresetResolver.resolve (cognitive 78) src/specify_cli/presets/__init__.py:5037— PresetResolver.resolve has cognitive complexity 78 (threshold 15). Drivers by points: if/else 69, loops 8, boolean chains 1 (nesting depth added 39). 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.
engine._validate_steps (cognitive 75) src/specify_cli/workflows/engine.py:325— engine._validate_steps has cognitive complexity 75 (threshold 15). Drivers by points: if/else 56, loops 10, ternaries 5, boolean chains 4 (nesting depth added 45). 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.
WorkflowEngine._execute_steps (cognitive 74) src/specify_cli/workflows/engine.py:1107— WorkflowEngine._execute_steps has cognitive complexity 74 (threshold 15). Drivers by points: if/else 55, loops 10, boolean chains 9 (nesting depth added 44). 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.
_commands.extension_add (cognitive 72) src/specify_cli/extensions/_commands.py:848— _commands.extension_add has cognitive complexity 72 (threshold 15). Drivers by points: if/else 58, error handling 5, boolean chains 4, loops 4, ternaries 1 (nesting depth added 30). 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.
PresetManager.unregister_agent_artifacts (cognitive 70) src/specify_cli/presets/__init__.py:1401— PresetManager.unregister_agent_artifacts has cognitive complexity 70 (threshold 15). Drivers by points: if/else 57, boolean chains 7, loops 5, error handling 1 (nesting depth added 40). 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.
CommandRegistrar.register_commands_for_all_agents (cognitive 67) src/specify_cli/agents.py:1048— CommandRegistrar.register_commands_for_all_agents has cognitive complexity 67 (threshold 15). Drivers by points: if/else 41, error handling 14, boolean chains 10, loops 1, ternaries 1 (nesting depth added 36). 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.
create_new_feature.main (cognitive 65) scripts/python/create_new_feature.py:244— create_new_feature.main has cognitive complexity 65 (threshold 15). Drivers by points: if/else 53, boolean chains 4, loops 4, ternaries 4 (nesting depth added 30). 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.
events.install_integration_events (cognitive 65) src/specify_cli/events.py:1198— events.install_integration_events has cognitive complexity 65 (threshold 15). Drivers by points: if/else 39, loops 26 (nesting depth added 35). 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.
PresetManager._unregister_skills_in_dir (cognitive 65) src/specify_cli/presets/__init__.py:3254— PresetManager._unregister_skills_in_dir has cognitive complexity 65 (threshold 15). Drivers by points: if/else 47, ternaries 10, boolean chains 4, error handling 3, loops 1 (nesting depth added 35). 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.
_commands.workflow_step_add (cognitive 62) src/specify_cli/workflows/_commands.py:3153— _commands.workflow_step_add has cognitive complexity 62 (threshold 15). Drivers by points: if/else 32, boolean chains 15, error handling 14, loops 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
config.load_auth_config (cognitive 58) src/specify_cli/authentication/config.py:70— config.load_auth_config has cognitive complexity 58 (threshold 15). Drivers by points: if/else 39, boolean chains 11, loops 6, error handling 2 (nesting depth added 24). 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.
_migrate_commands.integration_switch (cognitive 58) src/specify_cli/integrations/_migrate_commands.py:232— _migrate_commands.integration_switch has cognitive complexity 58 (threshold 15). Drivers by points: if/else 42, error handling 13, boolean chains 3 (nesting depth added 27). 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.
IntegrationDescriptor._validate (cognitive 58) src/specify_cli/integrations/catalog.py:681— IntegrationDescriptor._validate has cognitive complexity 58 (threshold 15). Drivers by points: if/else 40, boolean chains 11, loops 6, error handling 1 (nesting depth added 16). 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.
PresetManager._register_skills (cognitive 57) src/specify_cli/presets/__init__.py:2614— PresetManager._register_skills has cognitive complexity 57 (threshold 15). Drivers by points: if/else 39, boolean chains 9, loops 6, ternaries 3 (nesting depth added 22). 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.
_download_security.safe_extract_tar (cognitive 54) src/specify_cli/_download_security.py:1052— _download_security.safe_extract_tar has cognitive complexity 54 (threshold 15). Drivers by points: if/else 36, error handling 10, loops 5, boolean chains 2, ternaries 1 (nesting depth added 25). 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.
_version._detect_install_method (cognitive 54) src/specify_cli/_version.py:481— _version._detect_install_method has cognitive complexity 54 (threshold 15). Drivers by points: if/else 34, ternaries 7, error handling 6, boolean chains 4, loops 3 (nesting depth added 30). 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.
CommandRegistrar.unregister_commands (cognitive 54) src/specify_cli/agents.py:1278— CommandRegistrar.unregister_commands has cognitive complexity 54 (threshold 15). Drivers by points: if/else 28, error handling 12, loops 10, boolean chains 4 (nesting depth added 36). 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.
ExtensionManager._register_extension_skills (cognitive 53) src/specify_cli/extensions/__init__.py:1381— ExtensionManager._register_extension_skills has cognitive complexity 53 (threshold 15). Drivers by points: if/else 32, error handling 11, boolean chains 9, loops 1 (nesting depth added 24). 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.
merge._traverse_and_apply (cognitive 53) src/specify_cli/workflows/overlays/merge.py:233— merge._traverse_and_apply has cognitive complexity 53 (threshold 15). Drivers by points: if/else 29, loops 17, ternaries 4, boolean chains 3 (nesting depth added 30). 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.
engine.validate_workflow (cognitive 52) src/specify_cli/workflows/engine.py:143— engine.validate_workflow has cognitive complexity 52 (threshold 15). Drivers by points: if/else 34, boolean chains 9, error handling 4, loops 4, ternaries 1 (nesting depth added 22). 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.
events.resolve_events (cognitive 51) src/specify_cli/events.py:803— events.resolve_events has cognitive complexity 51 (threshold 15). Drivers by points: if/else 30, error handling 8, loops 8, boolean chains 3, ternaries 2 (nesting depth added 30). 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.
PresetManifest._validate (cognitive 50) src/specify_cli/presets/__init__.py:288— PresetManifest._validate has cognitive complexity 50 (threshold 15). Drivers by points: if/else 39, loops 6, boolean chains 4, error handling 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.
HookExecutor.register_hooks (cognitive 49) src/specify_cli/extensions/__init__.py:4745— HookExecutor.register_hooks has cognitive complexity 49 (threshold 15). Drivers by points: if/else 39, loops 6, boolean chains 4 (nesting depth added 22). 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.
expressions._evaluate_simple_expression (cognitive 48) src/specify_cli/workflows/expressions.py:437— expressions._evaluate_simple_expression has cognitive complexity 48 (threshold 15). Drivers by points: if/else 40, boolean chains 4, loops 3, error handling 1 (nesting depth added 20). 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.
specify_cli.ensure_executable_scripts (cognitive 47) src/specify_cli/__init__.py:217— specify_cli.ensure_executable_scripts has cognitive complexity 47 (threshold 15). Drivers by points: if/else 30, error handling 6, loops 6, ternaries 4, boolean chains 1 (nesting depth added 26). 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.
events._find_command_template (cognitive 47) src/specify_cli/events.py:458— events._find_command_template has cognitive complexity 47 (threshold 15). Drivers by points: if/else 33, loops 10, boolean chains 2, error handling 1, ternaries 1 (nesting depth added 25). 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.
_download_security.safe_extract_zip (cognitive 46) src/specify_cli/_download_security.py:887— _download_security.safe_extract_zip has cognitive complexity 46 (threshold 15). Drivers by points: if/else 28, error handling 11, loops 5, boolean chains 2 (nesting depth added 22). 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.
_commands._install_workflow_from_catalog (cognitive 46) src/specify_cli/workflows/_commands.py:2153— _commands._install_workflow_from_catalog has cognitive complexity 46 (threshold 15). Drivers by points: if/else 21, error handling 14, boolean chains 8, loops 2, ternaries 1 (nesting depth added 6). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
PresetManager._reconcile_skills (cognitive 45) src/specify_cli/presets/__init__.py:2093— PresetManager._reconcile_skills has cognitive complexity 45 (threshold 15). Drivers by points: if/else 32, loops 6, ternaries 4, boolean chains 3 (nesting depth added 19). 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.
ExtensionCatalog.search (cognitive 44) src/specify_cli/extensions/__init__.py:3974— ExtensionCatalog.search has cognitive complexity 44 (threshold 15). Drivers by points: if/else 26, ternaries 16, boolean chains 1, loops 1 (nesting depth added 27). 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.
integration_status.build_integration_status_report (cognitive 44) src/specify_cli/integration_status.py:352— integration_status.build_integration_status_report has cognitive complexity 44 (threshold 15). Drivers by points: if/else 27, boolean chains 7, loops 5, error handling 4, ternaries 1 (nesting depth added 9). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
workflows.load_custom_steps (cognitive 44) src/specify_cli/workflows/__init__.py:75— workflows.load_custom_steps has cognitive complexity 44 (threshold 15). Drivers by points: if/else 27, loops 7, boolean chains 5, error handling 5 (nesting depth added 20). 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.
_commands.extension_info (cognitive 42) src/specify_cli/extensions/_commands.py:1277— _commands.extension_info has cognitive complexity 42 (threshold 15). Drivers by points: if/else 33, ternaries 5, loops 4 (nesting depth added 23). 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.
_migrate_commands.integration_upgrade (cognitive 42) src/specify_cli/integrations/_migrate_commands.py:584— _migrate_commands.integration_upgrade has cognitive complexity 42 (threshold 15). Drivers by points: if/else 27, error handling 8, boolean chains 5, loops 2 (nesting depth added 10). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
PresetResolver.resolve_content (cognitive 42) src/specify_cli/presets/__init__.py:5552— PresetResolver.resolve_content has cognitive complexity 42 (threshold 15). Drivers by points: if/else 34, loops 5, boolean chains 3 (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.
IntegrationBase.process_template (cognitive 41) src/specify_cli/integrations/base.py:759— IntegrationBase.process_template has cognitive complexity 41 (threshold 15). Drivers by points: if/else 37, loops 2, boolean chains 1, ternaries 1 (nesting depth added 21). 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.
_commands.preset_add (cognitive 41) src/specify_cli/presets/_commands.py:79— _commands.preset_add has cognitive complexity 41 (threshold 15). Drivers by points: if/else 26, error handling 7, ternaries 6, boolean chains 2 (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.
_version.self_upgrade (cognitive 40) src/specify_cli/_version.py:1224— _version.self_upgrade has cognitive complexity 40 (threshold 15). Drivers by points: if/else 27, boolean chains 5, ternaries 4, error handling 2, loops 2 (nesting depth added 8). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
_install_commands.integration_uninstall (cognitive 40) src/specify_cli/integrations/_install_commands.py:218— _install_commands.integration_uninstall has cognitive complexity 40 (threshold 15). Drivers by points: if/else 27, ternaries 7, boolean chains 3, loops 2, error handling 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.
IntegrationCatalog.search (cognitive 40) src/specify_cli/integrations/catalog.py:292— IntegrationCatalog.search has cognitive complexity 40 (threshold 15). Drivers by points: if/else 20, ternaries 18, boolean chains 1, loops 1 (nesting depth added 24). 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.
auto_commit._parse_auto_commit_config (cognitive 38) extensions/git/scripts/python/auto_commit.py:49— auto_commit._parse_auto_commit_config has cognitive complexity 38 (threshold 15). Drivers by points: if/else 33, boolean chains 3, error handling 1, loops 1 (nesting depth added 19). 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.
_commands._print_extension_info (cognitive 38) src/specify_cli/extensions/_commands.py:1386— _commands._print_extension_info has cognitive complexity 38 (threshold 15). Drivers by points: if/else 23, ternaries 11, loops 3, boolean chains 1 (nesting depth added 12). 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.
_commands._install_workflow_package (cognitive 38) src/specify_cli/workflows/_commands.py:963— _commands._install_workflow_package has cognitive complexity 38 (threshold 15). Drivers by points: if/else 16, error handling 13, boolean chains 7, loops 2 (nesting depth added 8). 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.
_commands.workflow_info (cognitive 38) src/specify_cli/workflows/_commands.py:2864— _commands.workflow_info has cognitive complexity 38 (threshold 15). Drivers by points: if/else 23, loops 6, ternaries 5, error handling 3, boolean chains 1 (nesting depth added 19). 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.
IntegrationManifest.uninstall (cognitive 37) src/specify_cli/integrations/manifest.py:325— IntegrationManifest.uninstall has cognitive complexity 37 (threshold 15). Drivers by points: error handling 15, if/else 13, loops 5, boolean chains 4 (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.
PresetManager._unregister_skills (cognitive 37) src/specify_cli/presets/__init__.py:3057— PresetManager._unregister_skills has cognitive complexity 37 (threshold 15). Drivers by points: if/else 20, ternaries 8, loops 7, boolean chains 2 (nesting depth added 17). 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.
GateStep.execute (cognitive 37) src/specify_cli/workflows/steps/gate/__init__.py:39— GateStep.execute has cognitive complexity 37 (threshold 15). Drivers by points: if/else 30, boolean chains 7 (nesting depth added 12). 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.
events.collect_extension_events (cognitive 36) src/specify_cli/events.py:944— events.collect_extension_events has cognitive complexity 36 (threshold 15). Drivers by points: if/else 22, error handling 7, boolean chains 4, loops 3 (nesting depth added 17). 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.
ExtensionManager._find_extension_skill_dirs (cognitive 36) src/specify_cli/extensions/__init__.py:1595— ExtensionManager._find_extension_skill_dirs has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18, error handling 8, ternaries 5, loops 3, boolean chains 2 (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.
ExtensionManager._extension_owned_skill_names (cognitive 36) src/specify_cli/extensions/__init__.py:1762— ExtensionManager._extension_owned_skill_names has cognitive complexity 36 (threshold 15). Drivers by points: if/else 21, error handling 8, loops 3, ternaries 3, boolean chains 1 (nesting depth added 20). 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.
PresetManager._register_command_from_path (cognitive 36) src/specify_cli/presets/__init__.py:1916— PresetManager._register_command_from_path has cognitive complexity 36 (threshold 15). Drivers by points: if/else 25, loops 7, boolean chains 2, error handling 2 (nesting depth added 24). 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.
PresetCatalog.search (cognitive 36) src/specify_cli/presets/__init__.py:4658— PresetCatalog.search has cognitive complexity 36 (threshold 15). Drivers by points: if/else 18, ternaries 16, error handling 1, loops 1 (nesting depth added 22). 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.
_commands.workflow_update (cognitive 36) src/specify_cli/workflows/_commands.py:2636— _commands.workflow_update has cognitive complexity 36 (threshold 15). Drivers by points: if/else 25, error handling 8, loops 3 (nesting depth added 13). 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.
_version._emit_failure (cognitive 34) src/specify_cli/_version.py:1015— _version._emit_failure has cognitive complexity 34 (threshold 15). Drivers by points: if/else 21, boolean chains 9, ternaries 4 (nesting depth added 8). 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.
_install_commands.integration_install (cognitive 34) src/specify_cli/integrations/_install_commands.py:40— _install_commands.integration_install has cognitive complexity 34 (threshold 15). Drivers by points: if/else 24, boolean chains 5, error handling 3, loops 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.
PresetManager._infer_legacy_skill_provenance (cognitive 34) src/specify_cli/presets/__init__.py:2806— PresetManager._infer_legacy_skill_provenance has cognitive complexity 34 (threshold 15). Drivers by points: if/else 19, loops 6, ternaries 5, error handling 3, boolean chains 1 (nesting depth added 17). 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.
_commands.preset_resolve (cognitive 34) src/specify_cli/presets/_commands.py:348— _commands.preset_resolve has cognitive complexity 34 (threshold 15). Drivers by points: if/else 23, loops 6, error handling 3, boolean chains 2 (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.
_download_security._preflight_zip_central_directory (cognitive 33) src/specify_cli/_download_security.py:705— _download_security._preflight_zip_central_directory has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, boolean chains 6, loops 2 (nesting depth added 8). 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.
installer.install_bundle (cognitive 33) src/specify_cli/bundler/services/installer.py:59— installer.install_bundle has cognitive complexity 33 (threshold 15). Drivers by points: if/else 23, boolean chains 3, loops 3, error handling 2, ternaries 2 (nesting depth added 13). 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.
ExtensionManager.remove (cognitive 33) src/specify_cli/extensions/__init__.py:2746— ExtensionManager.remove has cognitive complexity 33 (threshold 15). Drivers by points: if/else 23, loops 6, boolean chains 2, ternaries 2 (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.
IntegrationCatalog.remove_catalog (cognitive 33) src/specify_cli/integrations/catalog.py:497— IntegrationCatalog.remove_catalog has cognitive complexity 33 (threshold 15). Drivers by points: if/else 25, error handling 6, boolean chains 1, loops 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.
_commands._commit_workflow_file (cognitive 33) src/specify_cli/workflows/_commands.py:723— _commands._commit_workflow_file has cognitive complexity 33 (threshold 15). Drivers by points: error handling 18, if/else 11, boolean chains 3, ternaries 1 (nesting depth added 16). 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.
update_agent_context._upsert_section (cognitive 32) extensions/agent-context/scripts/python/update_agent_context.py:244— update_agent_context._upsert_section has cognitive complexity 32 (threshold 15). Drivers by points: if/else 21, boolean chains 6, ternaries 5 (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.
ExtensionManager._collect_manifest_command_names (cognitive 32) src/specify_cli/extensions/__init__.py:927— ExtensionManager._collect_manifest_command_names has cognitive complexity 32 (threshold 15). Drivers by points: if/else 29, loops 3 (nesting depth added 20). 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.
bundle.bundle_info (cognitive 31) src/specify_cli/commands/bundle/__init__.py:204— bundle.bundle_info has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16, loops 9, boolean chains 3, ternaries 2, error handling 1 (nesting depth added 12). 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.
_commands.extension_search (cognitive 31) src/specify_cli/extensions/_commands.py:1182— _commands.extension_search has cognitive complexity 31 (threshold 15). Drivers by points: if/else 22, ternaries 5, boolean chains 2, error handling 1, loops 1 (nesting depth added 13). 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.
_query_commands.integration_list (cognitive 31) src/specify_cli/integrations/_query_commands.py:28— _query_commands.integration_list has cognitive complexity 31 (threshold 15). Drivers by points: if/else 16, ternaries 8, loops 3, boolean chains 2, error handling 2 (nesting depth added 13). 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.
SkillsIntegration.setup (cognitive 31) src/specify_cli/integrations/base.py:1677— SkillsIntegration.setup has cognitive complexity 31 (threshold 15). Drivers by points: if/else 24, error handling 5, loops 1, ternaries 1 (nesting depth added 17). 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.
_query_commands.integration_info (cognitive 29) src/specify_cli/integrations/_query_commands.py:366— _query_commands.integration_info has cognitive complexity 29 (threshold 15). Drivers by points: if/else 23, ternaries 3, boolean chains 2, error handling 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.
IntegrationCatalog.add_catalog (cognitive 29) src/specify_cli/integrations/catalog.py:384— IntegrationCatalog.add_catalog has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19, error handling 7, boolean chains 1, loops 1, ternaries 1 (nesting depth added 12). 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.
PresetManager._register_commands (cognitive 29) src/specify_cli/presets/__init__.py:828— PresetManager._register_commands has cognitive complexity 29 (threshold 15). Drivers by points: if/else 25, boolean chains 2, error handling 1, loops 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.
StepCatalog._get_merged_steps (cognitive 29) src/specify_cli/workflows/catalog.py:1302— StepCatalog._get_merged_steps has cognitive complexity 29 (threshold 15). Drivers by points: if/else 19, loops 7, error handling 2, 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.
update_agent_context._collect_context_files (cognitive 28) extensions/agent-context/scripts/python/update_agent_context.py:45— update_agent_context._collect_context_files has cognitive complexity 28 (threshold 15). Drivers by points: if/else 10, ternaries 9, error handling 5, boolean chains 2, loops 2 (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.
kimi._migrate_legacy_kimi_skills_dir (cognitive 28) src/specify_cli/integrations/kimi/__init__.py:217— kimi._migrate_legacy_kimi_skills_dir has cognitive complexity 28 (threshold 15). Drivers by points: if/else 20, boolean chains 4, error handling 3, loops 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.
_commands.workflow_run (cognitive 28) src/specify_cli/workflows/_commands.py:1309— _commands.workflow_run has cognitive complexity 28 (threshold 15). Drivers by points: if/else 15, error handling 4, ternaries 4, boolean chains 3, loops 2 (nesting depth added 4). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
merge.find_step (cognitive 28) src/specify_cli/workflows/overlays/merge.py:32— merge.find_step has cognitive complexity 28 (threshold 15). Drivers by points: if/else 22, loops 6 (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.
InitStep.execute (cognitive 28) src/specify_cli/workflows/steps/init/__init__.py:78— InitStep.execute has cognitive complexity 28 (threshold 15). Drivers by points: if/else 19, boolean chains 5, error handling 2, loops 2 (nesting depth added 5). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
events.validate_events (cognitive 27) src/specify_cli/events.py:1674— events.validate_events has cognitive complexity 27 (threshold 15). Drivers by points: if/else 21, boolean chains 4, loops 2 (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.
PresetManager._delete_agent_preset_skills (cognitive 27) src/specify_cli/presets/__init__.py:3196— PresetManager._delete_agent_preset_skills has cognitive complexity 27 (threshold 15). Drivers by points: if/else 15, loops 7, error handling 2, ternaries 2, boolean chains 1 (nesting depth added 13). 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.
WorkflowEngine._run_fan_out (cognitive 27) src/specify_cli/workflows/engine.py:1345— WorkflowEngine._run_fan_out has cognitive complexity 27 (threshold 15). Drivers by points: if/else 12, loops 11, error handling 3, boolean chains 1 (nesting depth added 12). 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.
merge._remove_sources_recursively (cognitive 27) src/specify_cli/workflows/overlays/merge.py:182— merge._remove_sources_recursively has cognitive complexity 27 (threshold 15). Drivers by points: if/else 16, loops 10, boolean chains 1 (nesting depth added 16). 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.
ExtensionManager.scaffold_config (cognitive 26) src/specify_cli/extensions/__init__.py:2620— ExtensionManager.scaffold_config has cognitive complexity 26 (threshold 15). Drivers by points: if/else 13, boolean chains 6, error handling 4, ternaries 2, loops 1 (nesting depth added 8). 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.
integration_status._manifest_file_status (cognitive 26) src/specify_cli/integration_status.py:234— integration_status._manifest_file_status has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, error handling 9, 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.
WorkflowCatalog.search (cognitive 26) src/specify_cli/workflows/catalog.py:650— WorkflowCatalog.search has cognitive complexity 26 (threshold 15). Drivers by points: if/else 18, boolean chains 4, ternaries 3, loops 1 (nesting depth added 13). 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.
merge._record_sources_recursively (cognitive 26) src/specify_cli/workflows/overlays/merge.py:153— merge._record_sources_recursively has cognitive complexity 26 (threshold 15). Drivers by points: if/else 16, loops 10 (nesting depth added 16). 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.
update_agent_context._resolve_plan_path (cognitive 25) extensions/agent-context/scripts/python/update_agent_context.py:141— update_agent_context._resolve_plan_path has cognitive complexity 25 (threshold 15). Drivers by points: if/else 13, error handling 9, ternaries 2, boolean chains 1 (nesting depth added 13). 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.
BundleManifest.structural_errors (cognitive 25) src/specify_cli/bundler/models/manifest.py:162— BundleManifest.structural_errors has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, boolean chains 7, loops 3 (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.
CatalogStackBase._load_catalog_config (cognitive 25) src/specify_cli/catalogs.py:98— CatalogStackBase._load_catalog_config has cognitive complexity 25 (threshold 15). Drivers by points: if/else 17, error handling 5, ternaries 2, loops 1 (nesting depth added 8). 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.
_commands.workflow_step_remove (cognitive 25) src/specify_cli/workflows/_commands.py:3490— _commands.workflow_step_remove has cognitive complexity 25 (threshold 15). Drivers by points: error handling 12, if/else 10, boolean chains 3 (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.
WorkflowCatalog._get_merged_workflows (cognitive 25) src/specify_cli/workflows/catalog.py:608— WorkflowCatalog._get_merged_workflows has cognitive complexity 25 (threshold 15). Drivers by points: if/else 15, loops 7, error handling 2, boolean chains 1 (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.
ExtensionManager.unregister_agent_artifacts (cognitive 24) src/specify_cli/extensions/__init__.py:2837— ExtensionManager.unregister_agent_artifacts has cognitive complexity 24 (threshold 15). Drivers by points: if/else 20, boolean chains 3, loops 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.
_query_commands.integration_search (cognitive 24) src/specify_cli/integrations/_query_commands.py:270— _query_commands.integration_search has cognitive complexity 24 (threshold 15). Drivers by points: if/else 19, boolean chains 2, error handling 2, loops 1 (nesting depth added 8). 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.
HermesIntegration.setup (cognitive 24) src/specify_cli/integrations/hermes/__init__.py:76— HermesIntegration.setup has cognitive complexity 24 (threshold 15). Drivers by points: if/else 18, error handling 4, loops 1, ternaries 1 (nesting depth added 13). 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.
_github_http.resolve_github_release_asset_api_url (cognitive 23) src/specify_cli/_github_http.py:67— _github_http.resolve_github_release_asset_api_url has cognitive complexity 23 (threshold 15). Drivers by points: if/else 10, boolean chains 6, error handling 4, ternaries 2, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
init._install_extension_during_init (cognitive 23) src/specify_cli/commands/init.py:85— init._install_extension_during_init has cognitive complexity 23 (threshold 15). Drivers by points: if/else 19, boolean chains 2, error handling 2 (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.
_commands.extension_remove (cognitive 23) src/specify_cli/extensions/_commands.py:1110— _commands.extension_remove has cognitive complexity 23 (threshold 15). Drivers by points: if/else 16, ternaries 7 (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.
CopilotIntegration.is_skills_mode (cognitive 23) src/specify_cli/integrations/copilot/__init__.py:175— CopilotIntegration.is_skills_mode has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, boolean chains 7, error handling 3 (nesting depth added 8). 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.
PresetManager._build_extension_skill_restore_index (cognitive 23) src/specify_cli/presets/__init__.py:2561— PresetManager._build_extension_skill_restore_index has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, error handling 5, loops 3, boolean chains 1 (nesting depth added 13). 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.
PresetResolver.resolve_extension_command_via_manifest (cognitive 23) src/specify_cli/presets/__init__.py:5201— PresetResolver.resolve_extension_command_via_manifest has cognitive complexity 23 (threshold 15). Drivers by points: if/else 15, error handling 5, loops 3 (nesting depth added 13). 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.
PresetResolver._find_bundled_core (cognitive 23) src/specify_cli/presets/__init__.py:5502— PresetResolver._find_bundled_core has cognitive complexity 23 (threshold 15). Drivers by points: if/else 17, loops 4, boolean chains 1, error handling 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.
_commands.workflow_status (cognitive 23) src/specify_cli/workflows/_commands.py:1569— _commands.workflow_status has cognitive complexity 23 (threshold 15). Drivers by points: if/else 14, loops 5, error handling 4 (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.
WorkflowRegistry.save (cognitive 23) src/specify_cli/workflows/catalog.py:140— WorkflowRegistry.save has cognitive complexity 23 (threshold 15). Drivers by points: error handling 10, if/else 9, boolean chains 4 (nesting depth added 8). 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.
ProjectOverlaySource.collect (cognitive 23) src/specify_cli/workflows/overlays/layer_sources.py:127— ProjectOverlaySource.collect has cognitive complexity 23 (threshold 15). Drivers by points: if/else 13, error handling 5, boolean chains 4, loops 1 (nesting depth added 8). 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.
_version._run_installer (cognitive 22) src/specify_cli/_version.py:768— _version._run_installer has cognitive complexity 22 (threshold 15). Drivers by points: if/else 13, error handling 6, boolean chains 3 (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.
packager._collect_files (cognitive 22) src/specify_cli/bundler/services/packager.py:113— packager._collect_files has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, boolean chains 3, loops 3 (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.
events._build_opencode_plugin (cognitive 22) src/specify_cli/events.py:1728— events._build_opencode_plugin has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, loops 3, boolean chains 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.
_commands.catalog_list (cognitive 22) src/specify_cli/extensions/_commands.py:420— _commands.catalog_list has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, error handling 6, boolean chains 2, ternaries 2, loops 1 (nesting depth added 8). 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.
_helpers._parse_integration_options (cognitive 22) src/specify_cli/integrations/_helpers.py:187— _helpers._parse_integration_options has cognitive complexity 22 (threshold 15). Drivers by points: if/else 18, boolean chains 2, error handling 1, 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.
GenericIntegration._resolve_commands_dir (cognitive 22) src/specify_cli/integrations/generic/__init__.py:46— GenericIntegration._resolve_commands_dir has cognitive complexity 22 (threshold 15). Drivers by points: if/else 16, boolean chains 4, loops 2 (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.
_commands.preset_catalog_list (cognitive 22) src/specify_cli/presets/_commands.py:658— _commands.preset_catalog_list has cognitive complexity 22 (threshold 15). Drivers by points: if/else 11, error handling 6, boolean chains 2, ternaries 2, loops 1 (nesting depth added 8). 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.
common.resolve_template (cognitive 21) scripts/python/common.py:216— common.resolve_template has cognitive complexity 21 (threshold 15). Drivers by points: if/else 15, loops 4, error handling 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.
_download_security.detect_archive_format (cognitive 21) src/specify_cli/_download_security.py:111— _download_security.detect_archive_format has cognitive complexity 21 (threshold 15). Drivers by points: if/else 9, boolean chains 6, error handling 5, ternaries 1 (nesting depth added 3). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
yamlio.dump_json (cognitive 21) src/specify_cli/bundler/lib/yamlio.py:126— yamlio.dump_json has cognitive complexity 21 (threshold 15). Drivers by points: error handling 9, if/else 9, boolean chains 3 (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.
ConfigManager._get_env_config (cognitive 21) src/specify_cli/extensions/__init__.py:4329— ConfigManager._get_env_config has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, loops 4 (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.
_migrate_commands._installed_presets_affecting_agent (cognitive 21) src/specify_cli/integrations/_migrate_commands.py:131— _migrate_commands._installed_presets_affecting_agent has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, boolean chains 5, error handling 1, 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.
AlquimiaAIIntegration._inject_frontmatter_flag (cognitive 21) src/specify_cli/integrations/alquimia/__init__.py:115— AlquimiaAIIntegration._inject_frontmatter_flag has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, boolean chains 2, loops 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.
ClaudeIntegration._inject_frontmatter_flag (cognitive 21) src/specify_cli/integrations/claude/__init__.py:136— ClaudeIntegration._inject_frontmatter_flag has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, boolean chains 2, loops 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.
VibeIntegration._inject_frontmatter_flag (cognitive 21) src/specify_cli/integrations/vibe/__init__.py:44— VibeIntegration._inject_frontmatter_flag has cognitive complexity 21 (threshold 15). Drivers by points: if/else 17, boolean chains 2, loops 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.
_commands.preset_info (cognitive 21) src/specify_cli/presets/_commands.py:434— _commands.preset_info has cognitive complexity 21 (threshold 15). Drivers by points: if/else 14, boolean chains 2, loops 2, ternaries 2, error handling 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.
CommandStep.execute (cognitive 21) src/specify_cli/workflows/steps/command/__init__.py:31— CommandStep.execute has cognitive complexity 21 (threshold 15). Drivers by points: if/else 13, boolean chains 7, loops 1 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
CommandRegistrar.register_commands_for_non_skill_agents (cognitive 20) src/specify_cli/agents.py:1199— CommandRegistrar.register_commands_for_non_skill_agents has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, error handling 3, boolean chains 1, loops 1, ternaries 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.
events._resolve_event_command_argv (cognitive 20) src/specify_cli/events.py:536— events._resolve_event_command_argv has cognitive complexity 20 (threshold 15). Drivers by points: if/else 13, boolean chains 4, error handling 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
ExtensionManager._get_installed_command_name_map (cognitive 20) src/specify_cli/extensions/__init__.py:1008— ExtensionManager._get_installed_command_name_map has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, loops 6 (nesting depth added 12). 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.
ExtensionManager._get_skills_dir (cognitive 20) src/specify_cli/extensions/__init__.py:1143— ExtensionManager._get_skills_dir has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, boolean chains 4, error handling 3, ternaries 2 (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.
HookExecutor._evaluate_condition (cognitive 20) src/specify_cli/extensions/__init__.py:4930— HookExecutor._evaluate_condition has cognitive complexity 20 (threshold 15). Drivers by points: if/else 17, ternaries 3 (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.
integration_scaffold.scaffold_integration (cognitive 20) src/specify_cli/integration_scaffold.py:203— integration_scaffold.scaffold_integration has cognitive complexity 20 (threshold 15). Drivers by points: if/else 9, error handling 7, loops 3, boolean chains 1 (nesting depth added 8). 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.
_query_commands.integration_catalog_list (cognitive 20) src/specify_cli/integrations/_query_commands.py:467— _query_commands.integration_catalog_list has cognitive complexity 20 (threshold 15). Drivers by points: if/else 11, ternaries 6, boolean chains 1, error handling 1, 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.
PresetResolver.resolve_with_source (cognitive 20) src/specify_cli/presets/__init__.py:5249— PresetResolver.resolve_with_source has cognitive complexity 20 (threshold 15). Drivers by points: if/else 8, error handling 5, loops 3, ternaries 3, boolean chains 1 (nesting depth added 8). 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.
WorkflowCatalog._load_catalog_config (cognitive 20) src/specify_cli/workflows/catalog.py:331— WorkflowCatalog._load_catalog_config has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, error handling 3, loops 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.
StepCatalog._load_catalog_config (cognitive 20) src/specify_cli/workflows/catalog.py:1039— StepCatalog._load_catalog_config has cognitive complexity 20 (threshold 15). Drivers by points: if/else 16, error handling 3, loops 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.
StepCatalog._fetch_single_catalog (cognitive 20) src/specify_cli/workflows/catalog.py:1200— StepCatalog._fetch_single_catalog has cognitive complexity 20 (threshold 15). Drivers by points: if/else 10, error handling 8, boolean chains 2 (nesting depth added 8). 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.
expressions._interpolate_expressions (cognitive 20) src/specify_cli/workflows/expressions.py:227— expressions._interpolate_expressions has cognitive complexity 20 (threshold 15). Drivers by points: if/else 14, loops 3, ternaries 2, 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.
ExtensionCatalog._fetch_single_catalog (cognitive 19) src/specify_cli/extensions/__init__.py:3635— ExtensionCatalog._fetch_single_catalog has cognitive complexity 19 (threshold 15). Drivers by points: if/else 9, error handling 8, boolean chains 2 (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.
_commands.extension_enable (cognitive 19) src/specify_cli/extensions/_commands.py:2532— _commands.extension_enable has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, loops 7, boolean chains 1, error handling 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.
AlquimiaAIIntegration.inject_argument_hint (cognitive 19) src/specify_cli/integrations/alquimia/__init__.py:67— AlquimiaAIIntegration.inject_argument_hint has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 2 (nesting depth added 8). 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.
IntegrationCatalog._fetch_single_catalog (cognitive 19) src/specify_cli/integrations/catalog.py:156— IntegrationCatalog._fetch_single_catalog has cognitive complexity 19 (threshold 15). Drivers by points: if/else 10, error handling 8, boolean chains 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.
ClaudeIntegration.inject_argument_hint (cognitive 19) src/specify_cli/integrations/claude/__init__.py:69— ClaudeIntegration.inject_argument_hint has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 2, loops 2 (nesting depth added 8). 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.
PresetManager.install_from_directory (cognitive 19) src/specify_cli/presets/__init__.py:3474— PresetManager.install_from_directory has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, error handling 5, boolean chains 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.
PresetCatalog._load_catalog_config (cognitive 19) src/specify_cli/presets/__init__.py:4200— PresetCatalog._load_catalog_config has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, error handling 3, boolean chains 1, 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.
WorkflowEngine._coerce_input (cognitive 19) src/specify_cli/workflows/engine.py:1628— WorkflowEngine._coerce_input has cognitive complexity 19 (threshold 15). Drivers by points: if/else 15, boolean chains 2, error handling 2 (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.
StepListComposer._collect_base_step_ids (cognitive 19) src/specify_cli/workflows/overlays/composer.py:79— StepListComposer._collect_base_step_ids has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 6 (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.
merge._all_base_step_ids (cognitive 19) src/specify_cli/workflows/overlays/merge.py:63— merge._all_base_step_ids has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 6 (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.
merge._init_sources_recursively (cognitive 19) src/specify_cli/workflows/overlays/merge.py:132— merge._init_sources_recursively has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 6 (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.
merge._build_attribution (cognitive 19) src/specify_cli/workflows/overlays/merge.py:209— merge._build_attribution has cognitive complexity 19 (threshold 15). Drivers by points: if/else 13, loops 6 (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.
PromptStep.execute (cognitive 19) src/specify_cli/workflows/steps/prompt/__init__.py:40— PromptStep.execute has cognitive complexity 19 (threshold 15). Drivers by points: if/else 12, boolean chains 7 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
setup_plan.main (cognitive 18) scripts/python/setup_plan.py:29— setup_plan.main has cognitive complexity 18 (threshold 15). Drivers by points: if/else 11, ternaries 4, boolean chains 1, error handling 1, loops 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.
YamlIntegration.setup (cognitive 18) src/specify_cli/integrations/base.py:1470— YamlIntegration.setup has cognitive complexity 18 (threshold 15). Drivers by points: if/else 8, ternaries 7, boolean chains 1, error handling 1, 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.
ForgeIntegration._apply_forge_transformations (cognitive 18) src/specify_cli/integrations/forge/__init__.py:168— ForgeIntegration._apply_forge_transformations has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 3, loops 2 (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.
PresetManager._merge_pack_registered_skills (cognitive 18) src/specify_cli/presets/__init__.py:2040— PresetManager._merge_pack_registered_skills has cognitive complexity 18 (threshold 15). Drivers by points: if/else 13, boolean chains 2, ternaries 2, loops 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.
PresetCatalog.download_pack (cognitive 18) src/specify_cli/presets/__init__.py:4744— PresetCatalog.download_pack has cognitive complexity 18 (threshold 15). Drivers by points: if/else 10, error handling 3, ternaries 3, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
expressions._filter_map (cognitive 18) src/specify_cli/workflows/expressions.py:56— expressions._filter_map has cognitive complexity 18 (threshold 15). Drivers by points: if/else 12, loops 6 (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.
schema.validate_overlay_yaml (cognitive 18) src/specify_cli/workflows/overlays/schema.py:115— schema.validate_overlay_yaml has cognitive complexity 18 (threshold 15). Drivers by points: if/else 16, loops 2 (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.
_utils.merge_json_files (cognitive 17) src/specify_cli/_utils.py:222— _utils.merge_json_files has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, error handling 4 (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.
catalog_config.add_source (cognitive 17) src/specify_cli/bundler/commands_impl/catalog_config.py:135— catalog_config.add_source has cognitive complexity 17 (threshold 15). Drivers by points: if/else 10, boolean chains 5, error handling 1, loops 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.
ExtensionCatalog.download_extension (cognitive 17) src/specify_cli/extensions/__init__.py:4060— ExtensionCatalog.download_extension has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, error handling 3, ternaries 3, boolean chains 2. To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
_commands.extension_list (cognitive 17) src/specify_cli/extensions/_commands.py:384— _commands.extension_list has cognitive complexity 17 (threshold 15). Drivers by points: ternaries 9, boolean chains 3, if/else 3, loops 2 (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.
integration_state.normalize_integration_settings (cognitive 17) src/specify_cli/integration_state.py:127— integration_state.normalize_integration_settings has cognitive complexity 17 (threshold 15). Drivers by points: if/else 13, 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.
shared_infra._ensure_safe_shared_directory (cognitive 17) src/specify_cli/shared_infra.py:163— shared_infra._ensure_safe_shared_directory has cognitive complexity 17 (threshold 15). Drivers by points: if/else 11, error handling 5, loops 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.
_commands._stage_workflow_file (cognitive 17) src/specify_cli/workflows/_commands.py:615— _commands._stage_workflow_file has cognitive complexity 17 (threshold 15). Drivers by points: error handling 10, if/else 7 (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.
_commands.workflow_resume (cognitive 17) src/specify_cli/workflows/_commands.py:1458— _commands.workflow_resume has cognitive complexity 17 (threshold 15). Drivers by points: error handling 10, if/else 6, boolean chains 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.
WorkflowCatalog._fetch_single_catalog (cognitive 17) src/specify_cli/workflows/catalog.py:505— WorkflowCatalog._fetch_single_catalog has cognitive complexity 17 (threshold 15). Drivers by points: if/else 9, error handling 7, boolean chains 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.
merge.validate_edits (cognitive 17) src/specify_cli/workflows/overlays/merge.py:374— merge.validate_edits has cognitive complexity 17 (threshold 15). Drivers by points: if/else 15, boolean chains 1, loops 1 (nesting depth added 8). 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.
create_new_feature._parse_args (cognitive 16) scripts/python/create_new_feature.py:101— create_new_feature._parse_args has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 1, 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.
setup_tasks.main (cognitive 16) scripts/python/setup_tasks.py:68— setup_tasks.main has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, ternaries 3, boolean chains 1, error handling 1, loops 1 (nesting depth added 3). To reduce it, split the body: most of this score is breadth rather than depth — checks laid out side by side rather than stacked — 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.
DroidIntegration._inject_frontmatter_flag (cognitive 16) src/specify_cli/integrations/droid/__init__.py:36— DroidIntegration._inject_frontmatter_flag has cognitive complexity 16 (threshold 15). Drivers by points: if/else 12, boolean chains 2, loops 2 (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.
HermesIntegration.teardown (cognitive 16) src/specify_cli/integrations/hermes/__init__.py:192— HermesIntegration.teardown has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, error handling 4, boolean chains 3, loops 2 (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.
KimiIntegration.teardown (cognitive 16) src/specify_cli/integrations/kimi/__init__.py:129— KimiIntegration.teardown has cognitive complexity 16 (threshold 15). Drivers by points: if/else 7, error handling 6, loops 2, 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.
shared_infra.refresh_shared_templates (cognitive 16) src/specify_cli/shared_infra.py:329— shared_infra.refresh_shared_templates has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, loops 4, boolean chains 3 (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.
_commands._read_response_within_limit (cognitive 16) src/specify_cli/workflows/_commands.py:419— _commands._read_response_within_limit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 9, error handling 5, boolean chains 1, 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.
_commands._workflow_install_transaction (cognitive 16) src/specify_cli/workflows/_commands.py:674— _commands._workflow_install_transaction has cognitive complexity 16 (threshold 15). Drivers by points: if/else 10, error handling 4, loops 2 (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.
expressions._apply_filter (cognitive 16) src/specify_cli/workflows/expressions.py:369— expressions._apply_filter has cognitive complexity 16 (threshold 15). Drivers by points: if/else 14, boolean chains 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.
schema._parse_edit (cognitive 16) src/specify_cli/workflows/overlays/schema.py:61— schema._parse_edit has cognitive complexity 16 (threshold 15). Drivers by points: if/else 13, boolean chains 3 (nesting depth added 1). To reduce it, split the body: this score is breadth rather than depth — many checks laid out side by side rather than nested inside one another, so inverting conditions into early returns has nothing left to flatten. 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.
Duplicated block (32 lines × 2) src/specify_cli/workflows/catalog.py:448— src/specify_cli/workflows/catalog.py:448-479 | src/specify_cli/workflows/catalog.py:1143-1174 — both copies are in the same file, so extract the block into one function there and call it from each site — 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 `src/specify_cli/workflows/catalog.py:448` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
Duplicated block (31 lines × 2) src/specify_cli/integrations/base.py:388— src/specify_cli/integrations/base.py:388-421 | src/specify_cli/integrations/copilot/__init__.py:398-428 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. 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.
Duplicated block (29 lines × 2) src/specify_cli/extensions/__init__.py:3934— src/specify_cli/extensions/__init__.py:3934-3962 | src/specify_cli/presets/__init__.py:4616-4644 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/extensions/__init__.py:3934` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (28 lines × 2) src/specify_cli/extensions/__init__.py:3552— src/specify_cli/extensions/__init__.py:3552-3579 | src/specify_cli/presets/__init__.py:4281-4308 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere both call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made twice.
Duplicated block (25 lines × 2) src/specify_cli/workflows/catalog.py:745— src/specify_cli/workflows/catalog.py:745-769 | src/specify_cli/workflows/catalog.py:1422-1446 — both copies are in the same file, so extract the block into one function there and call it from each site — 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.
Duplicated block (17 lines × 3) src/specify_cli/_assets.py:36— src/specify_cli/_assets.py:36-52 | src/specify_cli/_assets.py:59-75 | src/specify_cli/_assets.py:82-98 — 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 — resolving only two of them leaves the rest to drift apart the first time one 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.
Duplicated block (14 lines × 4) src/specify_cli/integrations/alquimia/__init__.py:116— src/specify_cli/integrations/alquimia/__init__.py:116-129 | src/specify_cli/integrations/claude/__init__.py:137-150 | src/specify_cli/integrations/droid/__init__.py:37-55 | src/specify_cli/integrations/vibe/__init__.py:45-61 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 4 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 4 times. 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.
Duplicated block (13 lines × 4) src/specify_cli/integrations/base.py:1045— src/specify_cli/integrations/base.py:1045-1057 | src/specify_cli/integrations/base.py:1255-1267 | src/specify_cli/integrations/base.py:1486-1498 | src/specify_cli/integrations/forge/__init__.py:127-139 — there are 4 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 4 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/integrations/base.py:1045` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (13 lines × 3) src/specify_cli/workflows/steps/command/__init__.py:232— src/specify_cli/workflows/steps/command/__init__.py:232-245 | src/specify_cli/workflows/steps/prompt/__init__.py:262-276 | src/specify_cli/workflows/steps/shell/__init__.py:145-157 — the copies span different directories, so extracting a shared function means choosing where it lives: put it somewhere all 3 call sites can already reach — a location they all depend on today, or a new shared one if there is none — and call it from each site; until then, every change has to be made 3 times. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/workflows/steps/command/__init__.py:232` it does not close everything it opens, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Duplicated block (11 lines × 3) src/specify_cli/presets/_commands.py:539— src/specify_cli/presets/_commands.py:539-549 | src/specify_cli/presets/_commands.py:588-598 | src/specify_cli/presets/_commands.py:625-635 — 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 — resolving only two of them leaves the rest to drift apart the first time one is edited.
Duplicated block (10 lines × 3) src/specify_cli/presets/__init__.py:4238— src/specify_cli/presets/__init__.py:4238-4251 | src/specify_cli/workflows/catalog.py:384-394 | src/specify_cli/workflows/catalog.py:1080-1089 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/presets/__init__.py:4238` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — 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.
Duplicated block (8 lines × 3) src/specify_cli/integrations/base.py:1019— src/specify_cli/integrations/base.py:1019-1026 | src/specify_cli/integrations/base.py:1110-1117 | src/specify_cli/integrations/base.py:1579-1586 — 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 — resolving only two of them leaves the rest to drift apart the first time one 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.
Duplicated block (7 lines × 3) src/specify_cli/presets/__init__.py:4271— src/specify_cli/presets/__init__.py:4271-4277 | src/specify_cli/workflows/catalog.py:419-426 | src/specify_cli/workflows/catalog.py:1114-1121 — there are 3 copies across 2 file(s) — more copies than files, so at least one file holds the block twice. Extract it once into a single shared function every call site can reach and call it from all 3 sites; resolving a subset leaves the remainder to drift apart. Read the line range as the matched WINDOW rather than a finished unit: at `src/specify_cli/presets/__init__.py:4271` it begins part-way through the construct above it, so those exact lines cannot be lifted as they stand — widen the region to the smallest complete statement or declaration that contains it, and extract that.
Recommendation — 8 finding(s)
D11 · Test Reliability· Test reliability not included · ×1
Test reliability not included — Test source is present (.py) but the built-in reliability runner does not support this repository's ecosystem, so flakiness couldn't be assessed. Not scored — this is a gap in the analyzer's language coverage, not a finding about this repository.
Off-boarding risk: anonymized user #1 — If anonymized user #1 becomes unavailable, 1 significant file(s) lose their only recent owner: src/specify_cli/integration_status.py. Pair on, review, or document these before any departure.
D16 · Bus Factor· Further sole-owners (lower concentration) · ×1
Further sole-owners (lower concentration) — 3 other contributor(s) are each the sole owner of a small amount of code below the off-boarding threshold — folded into the bus-factor score and metrics (5 single-owned of 96 analysed files in total, counted over production source files of roughly 100 lines or more, excluding tests, vendored, generated and example/demo trees, largest first). They are anonymized user #2 (1 file(s)), anonymized user #3 (1 file(s)), anonymized user #4 (1 file(s)) — spread or document their files in the same way, at lower priority than the named off-boarding risks above.
Low: subprocess-shell-true src/specify_cli/workflows/steps/shell/__init__.py:58— Found 'subprocess' function 'run' with 'shell=True'. This is dangerous because this call will spawn the command using a shell process. Doing so propagates current shell settings and variables, which makes it much easier for a malicious actor to execute commands. Use 'shell=False' instead. This is a semgrep security-AUDIT rule: it reports that a sensitive construct is present, not that it is exploitable here. Confirm whether this site handles untrusted input or is reachable across a trust boundary — and apply the change where it is; where the construct is required by the platform or protocol it calls into, and carries no untrusted data (a syscall/FFI shim, a build- or debug-gated tool, a fixed local surface), record the review and leave the code as it is.
No build provenance — No SLSA provenance generation or build attestation found in CI — nothing binds a released artifact to the build that produced it, so a consumer cannot tell your artifact from a substituted one. On GitHub Actions, `actions/attest-build-provenance` (or slsa-github-generator) emits one from the job's own OIDC identity; elsewhere, run `cosign attest` over the released artifact from the release pipeline and publish the attestation beside it.
No artifact signing — No artifact signing found in CI — sign your released artifacts with whatever your ecosystem ships (a GPG/minisign detached signature — or `cosign sign-blob` — over the release archives, or over a checksum file published alongside them, PEP 740 attestations via `pypa/gh-action-pypi-publish` under PyPI Trusted Publishing (OIDC) for wheels/sdists) so consumers can verify what you built.
D36 · Supply-chain Provenance & Signing· No SBOM · ×1
No SBOM — No SBOM generation or committed SBOM found — produce one with what your ecosystem ships (`cyclonedx-py` over the resolved Python environment/lockfile, `syft` (or `anchore/sbom-action` in CI) over the source tree or released image). Publish it as a release asset (`*.spdx.json` / `*.cdx.json`) so consumers can see what they are installing.
Coverage not included — suite not readable by the collector — Coverage NOT MEASURED: test source is present (.py) but the built-in coverage collector has no runner for this repository's ecosystem — so this suite was never executed by it. Not scored — this is a gap in the analyzer's language coverage, not a defect in the repo. To have real coverage read, produce a coverage report in a standard format (`coverage run -m pytest` then `coverage xml`) into the repo working tree before the scan — a CI step is the usual place, since the artefact is commonly gitignored.
Info — 2 finding(s)
D12 · Dependency Hygiene· Dependency hygiene not measured · ×1
Dependency hygiene not measured — dependency manifest found but not parsed for hygiene — This repository's dependency manifest (a Python pyproject.toml/requirements.txt (pip/uv/Poetry)) was found, but this pass cannot parse it for hygiene, so no package was assessed. Zero packages read is NOT a clean dependency tree, so this is NOT SCORED — a gap in the analyzer, not a verdict about this repository. This row is about dependency HYGIENE — outdated, deprecated or unmaintained direct dependencies; known CVEs in the same dependency graph are a separate question, reported under D38 wherever the manifest is OSV-readable.
D22 · Internal API Consistency· No exposed public API · ×1
No exposed public API — No intentionally-exposed types (IsPackable or .Contracts) to evaluate.
Appendix B — Reproduction & audit trail
Every external tool invocation behind a deep-scan dimension — the tool, its captured version, the exact command, how many findings it yielded, and a link to the retained raw output. To reproduce any finding: check out the same commit and run the command shown (repo-relative — never an absolute scratch path). The complete raw scanner output is retained verbatim under artifacts/raw/ (indexed in artifacts/raw/index.json); per-invocation exit codes and wall-clock durations are in sidecar.json — kept out of this table so the rendered report stays byte-identical across runs of the same commit.
trivy: not applicable — No Infrastructure-as-Code or container manifests found (Dockerfile, Terraform, Kubernetes/Helm, CloudFormation); nothing to scan.
trivy: not applicable — No JS/npm manifest or lockfile found outside build output (package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, bun.lockb); no JS dependencies to scan.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; network egress policy is a cluster-native control that may live at the platform/firewall layer, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; seccomp/AppArmor/SELinux confinement is a workload-level control, so there is nothing to assess here.
runtime-hardening: not applicable — No Kubernetes/orchestration workloads found in the repository manifests; runtime threat-detection and admission-control policy are cluster-level controls, so there is nothing to assess here.
0
—
Run 019fd08b-863f-7f0c-aa91-853ae374f70e · every finding is also locatable in findings.md, and the complete scoring record (with exit codes + durations) in sidecar.json.
Issues: 3 · Warnings: 435 · Recommendations: 8 · Info: 2 — Appendix A · all findings · full markdown report.
Generated by Watchdog — deterministic code-health analysis. 05-08-2026 @ 06:10 UTC.
Downloadable artifacts
Machine-readable and reproducible from this commit + frozen rubric — drop them straight into a contract appendix, a CRA dossier, or a downstream SCA / VEX tool.