Repository Analysis

tconbeer/harlequin

The SQL IDE for Your Terminal.

14.7 Low AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of tconbeer/harlequin, a Python project with 6,315 GitHub stars. SynthScan v2.0 examined 22,224 lines of code across 143 source files, recording 312 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 14.7 places this repository in the Low AI signal band.

The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).

14.7
Adjusted Score
14.7
Raw Score
100%
Time Factor
2026-08-09
Last Push
6.3K
Stars
Python
Language
22.2K
Lines of Code
143
Files
312
Pattern Hits
2026-08-09
Scan Date
0.03
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.

No multi-scan history yet — run the scanner again to build trend data.

Severity Breakdown

Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.

CRITICAL 0HIGH 4MEDIUM 1LOW 307

Directory Score Breakdown

This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.

Pattern Findings

The scanner identified 312 distinct pattern matches across 11 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.

Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.

Unused Imports130 hits · 129 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py1CODE
LOWtests/unit_tests/test_statements.py8CODE
LOWtests/unit_tests/conftest.py1CODE
LOWtests/unit_tests/test_plugins.py1CODE
LOWtests/unit_tests/test_import_hygiene.py9CODE
LOWtests/unit_tests/test_s3_tree.py1CODE
LOWtests/unit_tests/test_exception.py1CODE
LOWtests/unit_tests/test_config.py1CODE
LOWtests/unit_tests/test_query.py1CODE
LOWtests/functional_tests/test_keys_app.py1CODE
LOWtests/functional_tests/test_results_viewer.py1CODE
LOWtests/functional_tests/test_keymap_vscode.py1CODE
LOWtests/functional_tests/test_run_query_bar.py1CODE
LOWtests/functional_tests/test_query_editor.py1CODE
LOWtests/functional_tests/test_history_screen.py1CODE
LOWtests/functional_tests/test_app.py1CODE
LOWtests/functional_tests/test_keymap_from_config.py1CODE
LOWtests/adapter_tests/test_duckdb.py1CODE
LOWtests/adapter_tests/test_sqlite.py1CODE
LOWscripts/catalog_lag.py14CODE
LOWscripts/cold_start.py18CODE
LOWsrc/harlequin_sqlite/catalog.py1CODE
LOWsrc/harlequin_sqlite/catalog.py17CODE
LOWsrc/harlequin_sqlite/adapter.py1CODE
LOWsrc/harlequin_sqlite/__init__.py1CODE
LOWsrc/harlequin_sqlite/__init__.py2CODE
LOWsrc/harlequin_sqlite/completions.py1CODE
LOWsrc/harlequin_sqlite/cli_options.py1CODE
LOWsrc/harlequin_sqlite/interactions.py1CODE
LOWsrc/harlequin_sqlite/interactions.py6CODE
LOWsrc/harlequin_sqlite/interactions.py10CODE
LOWsrc/harlequin_sqlite/interactions.py11CODE
LOWsrc/harlequin_sqlite/interactions.py11CODE
LOWsrc/harlequin/catalog.py1CODE
LOWsrc/harlequin/catalog.py7CODE
LOWsrc/harlequin/catalog.py8CODE
LOWsrc/harlequin/keys_app.py1CODE
LOWsrc/harlequin/options.py1CODE
LOWsrc/harlequin/plugins.py1CODE
LOWsrc/harlequin/catalog_cache.py1CODE
LOWsrc/harlequin/config.py1CODE
LOWsrc/harlequin/query.py15CODE
LOWsrc/harlequin/config_wizard.py1CODE
LOWsrc/harlequin/adapter.py1CODE
LOWsrc/harlequin/copy_formats.py1CODE
LOWsrc/harlequin/cache.py7CODE
LOWsrc/harlequin/cache.py7CODE
LOWsrc/harlequin/actions.py1CODE
LOWsrc/harlequin/__init__.py15CODE
LOWsrc/harlequin/__init__.py15CODE
LOWsrc/harlequin/__init__.py15CODE
LOWsrc/harlequin/__init__.py20CODE
LOWsrc/harlequin/__init__.py21CODE
LOWsrc/harlequin/__init__.py22CODE
LOWsrc/harlequin/__init__.py22CODE
LOWsrc/harlequin/__init__.py23CODE
LOWsrc/harlequin/__init__.py24CODE
LOWsrc/harlequin/__init__.py24CODE
LOWsrc/harlequin/__init__.py25CODE
LOWsrc/harlequin/copy_widgets.py1CODE
70 more matches not shown…
Hyper-Verbose Identifiers119 hits · 124 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py165def app_all_adapters_small_db(CODE
LOWtests/conftest.py186def _create_sqlite_db_from_data_dir(data_dir: Path, db_path: Path) -> None:CODE
LOWtests/unit_tests/test_completers.py22def test_completer_fixed_first(iris_completer: WordCompleter) -> None:CODE
LOWtests/unit_tests/test_completers.py27def test_completer_fuzzy_match(iris_completer: WordCompleter) -> None:CODE
LOWtests/unit_tests/test_completers.py54def test_extend_catalog_merges_by_default(parent_item: CatalogItem) -> None:CODE
LOWtests/unit_tests/test_completers.py60def test_extend_catalog_defer_merge(parent_item: CatalogItem) -> None:CODE
LOWtests/unit_tests/test_statements.py119def test_find_separators_agrees_with_split(script: str, expected: list[str]) -> None:CODE
LOWtests/unit_tests/test_statements.py141def test_find_separators_returns_character_columns() -> None:CODE
LOWtests/unit_tests/test_statements.py152def test_find_separators_on_multiple_lines() -> None:CODE
LOWtests/unit_tests/test_statements.py157def test_find_separators_are_sorted() -> None:CODE
LOWtests/unit_tests/test_statements.py165def test_statements_are_indexed_in_order() -> None:CODE
LOWtests/unit_tests/test_statements.py178def test_dollar_quoted_body_is_not_split() -> None:CODE
LOWtests/unit_tests/test_plugins.py22def test_do_not_load_keymaps_that_duplicate_plugin_names() -> None:CODE
LOWtests/unit_tests/test_plugins.py29def test_plugin_load_failure_goes_to_stderr(CODE
LOWtests/unit_tests/test_import_hygiene.py40def test_headless_imports_do_not_load_the_tui(CODE
LOWtests/unit_tests/test_import_hygiene.py52def test_public_names_still_resolve() -> None:CODE
LOWtests/unit_tests/test_import_hygiene.py93def test_unknown_attribute_still_raises_attribute_error() -> None:CODE
LOWtests/unit_tests/test_exception.py7def test_pretty_print_warning_goes_to_stderr(CODE
LOWtests/unit_tests/test_config.py64def test_load_bad_keymap_raises(CODE
LOWtests/unit_tests/test_config.py90def test_load_default_profile(data_dir: Path, filename: str) -> None:CODE
LOWtests/unit_tests/test_config.py126def test_config_file_discovery(CODE
LOWtests/unit_tests/test_query.py24 def test_unlimited_asks_for_everything(self) -> None:CODE
LOWtests/unit_tests/test_query.py28 def test_plain_limit_asks_for_exactly_that_many(self) -> None:CODE
LOWtests/unit_tests/test_query.py31 def test_overflow_detection_asks_for_one_more(self) -> None:CODE
LOWtests/unit_tests/test_query.py37 def test_yields_one_result_per_statement(CODE
LOWtests/unit_tests/test_query.py45 def test_ddl_yields_no_cursor(self, connection: HarlequinConnection) -> None:CODE
LOWtests/unit_tests/test_query.py61 def test_stops_at_the_first_error_by_default(CODE
LOWtests/unit_tests/test_query.py71 def test_continues_past_an_error_when_asked(CODE
LOWtests/unit_tests/test_query.py82 def test_applies_the_fetch_limit(self, connection: HarlequinConnection) -> None:CODE
LOWtests/unit_tests/test_query.py90 def test_overflow_detection_fetches_one_extra_row(CODE
LOWtests/unit_tests/test_query.py103 def test_returns_columns_and_rows(self, connection: HarlequinConnection) -> None:CODE
LOWtests/unit_tests/test_query.py113 def test_a_query_that_matches_nothing_returns_zero_rows(CODE
LOWtests/unit_tests/test_query.py125 def test_a_cursor_that_returns_none_has_no_backend(self) -> None:CODE
LOWtests/unit_tests/test_query.py150 def test_rejects_a_statement_with_no_cursor(CODE
LOWtests/unit_tests/test_query.py157 def test_the_row_cap_is_not_the_fetch_limit(CODE
LOWtests/unit_tests/test_query.py175 def test_truncation_is_detected_from_one_extra_row(CODE
LOWtests/unit_tests/test_query.py191 def test_an_unlimited_fetch_is_never_truncated(CODE
LOWtests/unit_tests/test_query.py207 def test_a_raw_driver_exception_does_not_escape(self) -> None:CODE
LOWtests/unit_tests/test_query.py221 def test_keyboard_interrupt_propagates(self) -> None:CODE
LOWtests/unit_tests/test_query.py249def test_every_shape_a_cursor_may_return_is_normalized(returned: Any) -> None:CODE
LOWtests/unit_tests/test_cli.py323def test_config_path_fron_env(CODE
LOWtests/unit_tests/test_cli.py380def test_sqlite_extension_not_supported(CODE
LOWtests/functional_tests/conftest.py183 async def wait_for_filtered_workers(app: Harlequin) -> None:CODE
LOWtests/functional_tests/conftest.py218def transaction_button_visible() -> Callable[[Harlequin], bool]:CODE
LOWtests/functional_tests/test_results_viewer.py87async def test_data_truncated_with_tooltip(CODE
LOWtests/functional_tests/test_keymap_vscode.py171async def test_results_viewer_bindings(CODE
LOWtests/functional_tests/test_query_editor.py355async def test_selected_queries_split_on_character_columns(CODE
LOWtests/functional_tests/test_history_screen.py65async def test_history_screen_crash(CODE
LOWtests/functional_tests/test_cache.py62async def test_harlequin_loads_cache(cache: Cache, app: Harlequin) -> None:CODE
LOWtests/functional_tests/test_cache.py77async def test_harlequin_writes_cache(app: Harlequin) -> None:CODE
LOWtests/functional_tests/test_app.py76async def test_queries_do_not_crash_all_adapters(CODE
LOWtests/functional_tests/test_app.py134async def test_queries_do_not_crash(CODE
LOWtests/functional_tests/test_app.py227async def test_single_query_terminated_with_semicolon(CODE
LOWtests/functional_tests/test_app.py345async def test_adapter_raises_unexpected_error(CODE
LOWtests/functional_tests/test_data_catalog.py154async def test_double_click_inserts_node_into_editor(CODE
LOWtests/functional_tests/test_data_catalog.py349async def test_file_tree_refreshes_after_editor_save(CODE
LOWtests/functional_tests/test_data_catalog.py385async def test_file_tree_refreshes_after_export(CODE
LOWtests/functional_tests/test_data_catalog.py439async def test_reload_while_loader_is_fetching(CODE
LOWtests/functional_tests/test_keymap_from_config.py31async def test_results_viewer_bindings(CODE
LOWtests/adapter_tests/test_duckdb.py283def test_initialize_adapter_ignores_extra_kwargs() -> None:CODE
59 more matches not shown…
Modern Structural Boilerplate20 hits · 20 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py63def set_locale_to_enUS() -> None:CODE
LOWtests/functional_tests/conftest.py172 def set_paste(x: str) -> None:CODE
LOWsrc/harlequin/keys_app.py396 def update_binding(new_binding: HarlequinKeyBinding | None) -> None:CODE
LOWsrc/harlequin/keys_app.py427 def update_keymap_name(self, message: ActiveKeymapFound) -> None:CODE
LOWsrc/harlequin/locale_manager.py6def set_locale(locale_config: str) -> None:CODE
LOWsrc/harlequin/cache.py9__all__ = ["BufferState", "Cache"]CODE
LOWsrc/harlequin/__init__.py27__all__ = [CODE
LOWsrc/harlequin/app.py514 def update_limit_tooltip(self, message: Input.Changed) -> None:CODE
LOWsrc/harlequin/app.py778 def update_transaction_button_label(self, message: TransactionModeChanged) -> None:CODE
LOWsrc/harlequin/app.py799 def update_editor_completers(self, message: CompletersReady) -> None:CODE
LOWsrc/harlequin/app.py1210 def update_completers(self, catalog: Catalog) -> None:CODE
LOWsrc/harlequin/app.py1251 def update_schema_data(self) -> None:CODE
LOWsrc/harlequin/autocomplete/__init__.py8__all__ = [CODE
LOWsrc/harlequin/autocomplete/completers.py61 def update_catalog(self, catalog: Catalog) -> None:CODE
LOWsrc/harlequin/components/__init__.py11__all__ = [CODE
LOWsrc/harlequin/components/run_query_bar.py93 def set_not_responsive(self) -> None:CODE
LOWsrc/harlequin/components/run_query_bar.py100 def set_responsive(self) -> None:CODE
LOWsrc/harlequin/components/data_catalog/__init__.py190 def update_database_tree(self, catalog: Catalog) -> None:CODE
LOWsrc/harlequin/components/data_catalog/__init__.py193 def update_file_tree(self) -> None:CODE
LOWsrc/harlequin/components/data_catalog/__init__.py197 def update_s3_tree(self) -> None:CODE
Docstring Block Structure3 hits · 15 pts
SeverityFileLineSnippetContext
HIGHsrc/harlequin/adapter.py84 Executes query and returns a cursor (for a select stmt) or None. Raises HarlequinQueryError if the dataSTRING
HIGHsrc/harlequin/adapter.py132 Exports data returned by query to a file or directory at path, using options. Args: STRING
HIGHsrc/harlequin/adapter.py150 Parses text as one or more queries; returns text if parsing does not result in an error; otherwise retuSTRING
Deep Nesting14 hits · 13 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py186CODE
LOWscripts/export_screenshots.py34CODE
LOWsrc/harlequin_sqlite/adapter.py189CODE
LOWsrc/harlequin_sqlite/adapter.py308CODE
LOWsrc/harlequin/config.py200CODE
LOWsrc/harlequin/windows_timezone.py17CODE
LOWsrc/harlequin/cli.py158CODE
LOWsrc/harlequin/app.py708CODE
LOWsrc/harlequin/app.py809CODE
LOWsrc/harlequin/components/help_screen.py40CODE
LOWsrc/harlequin/components/debug_info.py229CODE
LOWsrc/harlequin/components/debug_info.py239CODE
LOWsrc/harlequin/components/data_catalog/s3_tree.py96CODE
LOWsrc/harlequin_duckdb/adapter.py301CODE
Excessive Try-Catch Wrapping14 hits · 12 pts
SeverityFileLineSnippetContext
LOWsrc/harlequin/options.py177 except Exception as e:CODE
LOWsrc/harlequin/query.py134 except Exception as e:CODE
LOWsrc/harlequin/windows_timezone.py58 except Exception as e:CODE
LOWsrc/harlequin/copy_widgets.py36 except Exception as e:CODE
LOWsrc/harlequin/bindings.py34 except Exception as e:CODE
LOWsrc/harlequin/app.py1115 except Exception as e:CODE
LOWsrc/harlequin/app.py1233 except Exception:CODE
LOWsrc/harlequin/app.py1301 except Exception as e:CODE
LOWsrc/harlequin/app.py1327 except Exception as e:CODE
LOWsrc/harlequin/app.py1353 except Exception as e:CODE
LOWsrc/harlequin/app.py1375 except Exception as e:CODE
LOWsrc/harlequin/components/debug_info.py66 except Exception:CODE
LOWsrc/harlequin/components/debug_info.py70 except Exception:CODE
MEDIUMsrc/harlequin/components/debug_info.py63def parse_info(self) -> List[DebugWidget]:CODE
AI Structural Patterns7 hits · 6 pts
SeverityFileLineSnippetContext
LOWsrc/harlequin_sqlite/adapter.py248CODE
LOWsrc/harlequin/options.py301CODE
LOWsrc/harlequin/export.py128CODE
LOWsrc/harlequin/cli.py132CODE
LOWsrc/harlequin/app.py187CODE
LOWsrc/harlequin/components/results_viewer.py36CODE
LOWsrc/harlequin_duckdb/adapter.py256CODE
Cross-Language Confusion1 hit · 2 pts
SeverityFileLineSnippetContext
HIGHsrc/harlequin/query.py11null, how a nested struct comes out) in two places, and the disagreement wouldSTRING
Fake / Example Data2 hits · 2 pts
SeverityFileLineSnippetContext
LOWsrc/harlequin/options.py138 placeholder = self.placeholder or getattr(other, "placeholder", None)CODE
LOWsrc/harlequin/options.py353 placeholder = self.placeholder or getattr(other, "placeholder", None)CODE
AI Slop Vocabulary1 hit · 2 pts
SeverityFileLineSnippetContext
LOWsrc/harlequin/catalog_cache.py30 # Never raise a TypeError, just use the reprCOMMENT
Over-Commented Block1 hit · 1 pts
SeverityFileLineSnippetContext
LOWsrc/harlequin/components/data_catalog/database_tree.py461 except WorkerCancelled:COMMENT