Repository Analysis

tobi/qmd

mini cli search engine for your docs, knowledge bases, meeting notes, whatever. Tracking current sota approaches while being all local

9.0 Low AI signal View on GitHub
9.0
Adjusted Score
9.0
Raw Score
100%
Time Factor
2026-05-29
Last Push
25,839
Stars
TypeScript
Language
45,442
Lines of Code
116
Files
265
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 1MEDIUM 130LOW 134

Pattern Findings

265 matches across 13 categories. Click a row to expand file-level details.

Decorative Section Separators47 hits · 147 pts
SeverityFileLineSnippet
MEDIUMfinetune/eval_retrieval.py37# =============================================================================
MEDIUMfinetune/eval_retrieval.py39# =============================================================================
MEDIUMfinetune/eval_retrieval.py75# =============================================================================
MEDIUMfinetune/eval_retrieval.py77# =============================================================================
MEDIUMfinetune/eval_retrieval.py154# =============================================================================
MEDIUMfinetune/eval_retrieval.py156# =============================================================================
MEDIUMfinetune/eval_retrieval.py255# =============================================================================
MEDIUMfinetune/eval_retrieval.py257# =============================================================================
MEDIUMfinetune/eval_retrieval.py328# =============================================================================
MEDIUMfinetune/eval_retrieval.py330# =============================================================================
MEDIUMfinetune/reward.py25# =============================================================================
MEDIUMfinetune/reward.py27# =============================================================================
MEDIUMfinetune/reward.py86# =============================================================================
MEDIUMfinetune/reward.py88# =============================================================================
MEDIUMfinetune/reward.py136# =============================================================================
MEDIUMfinetune/reward.py138# =============================================================================
MEDIUMfinetune/reward.py263# =============================================================================
MEDIUMfinetune/reward.py265# =============================================================================
MEDIUMfinetune/reward.py644# =============================================================================
MEDIUMfinetune/reward.py646# =============================================================================
MEDIUMfinetune/reward.py662# =============================================================================
MEDIUMfinetune/reward.py664# =============================================================================
MEDIUMfinetune/dataset/schema.py31# ---------------------------------------------------------------------------
MEDIUMfinetune/dataset/schema.py33# ---------------------------------------------------------------------------
MEDIUMfinetune/dataset/schema.py78# ---------------------------------------------------------------------------
MEDIUMfinetune/dataset/schema.py80# ---------------------------------------------------------------------------
MEDIUMfinetune/dataset/schema.py114# ---------------------------------------------------------------------------
MEDIUMfinetune/dataset/schema.py116# ---------------------------------------------------------------------------
MEDIUMfinetune/dataset/schema.py138# ---------------------------------------------------------------------------
MEDIUMfinetune/dataset/schema.py140# ---------------------------------------------------------------------------
MEDIUMfinetune/jobs/eval_common.py15# =============================================================================
MEDIUMfinetune/jobs/eval_common.py17# =============================================================================
MEDIUMfinetune/jobs/eval_common.py242# =============================================================================
MEDIUMfinetune/jobs/eval_common.py244# =============================================================================
MEDIUMfinetune/jobs/eval.py81# =============================================================================
MEDIUMfinetune/jobs/eval.py83# =============================================================================
MEDIUMfinetune/jobs/eval.py308# =============================================================================
MEDIUMfinetune/jobs/eval.py310# =============================================================================
MEDIUMfinetune/jobs/eval.py362# =============================================================================
MEDIUMfinetune/jobs/eval.py364# =============================================================================
MEDIUMsrc/index.ts223 // ── Search ──────────────────────────────────────────────────────────
MEDIUMsrc/index.ts237 // ── Document Retrieval ──────────────────────────────────────────────
MEDIUMsrc/index.ts248 // ── Collection Management ───────────────────────────────────────────
MEDIUMsrc/index.ts265 // ── Context Management ──────────────────────────────────────────────
MEDIUMsrc/index.ts282 // ── Indexing ────────────────────────────────────────────────────────
MEDIUMsrc/index.ts302 // ── Index Health ────────────────────────────────────────────────────
MEDIUMsrc/index.ts310 // ── Lifecycle ───────────────────────────────────────────────────────
Dead Code77 hits · 96 pts
SeverityFileLineSnippet
MEDIUMfinetune/train.py422
MEDIUMfinetune/train.py423
MEDIUMfinetune/train.py424
MEDIUMfinetune/train.py425
MEDIUMfinetune/train.py426
MEDIUMfinetune/train.py427
MEDIUMfinetune/train.py428
MEDIUMfinetune/train.py430
MEDIUMfinetune/train.py431
MEDIUMfinetune/train.py434
MEDIUMfinetune/train.py435
MEDIUMfinetune/train.py437
MEDIUMfinetune/train.py440
MEDIUMfinetune/train.py442
MEDIUMfinetune/train.py448
MEDIUMfinetune/train.py449
MEDIUMfinetune/train.py457
MEDIUMfinetune/train.py458
MEDIUMfinetune/train.py463
MEDIUMfinetune/train.py464
MEDIUMfinetune/train.py473
MEDIUMfinetune/train.py474
MEDIUMfinetune/train.py475
MEDIUMfinetune/train.py476
MEDIUMfinetune/train.py480
MEDIUMfinetune/train.py481
MEDIUMfinetune/train.py483
MEDIUMfinetune/train.py491
MEDIUMfinetune/train.py492
MEDIUMfinetune/train.py493
MEDIUMfinetune/train.py494
MEDIUMfinetune/train.py497
MEDIUMfinetune/train.py498
MEDIUMfinetune/train.py499
MEDIUMfinetune/train.py500
MEDIUMfinetune/train.py511
MEDIUMfinetune/train.py512
MEDIUMfinetune/train.py517
MEDIUMfinetune/train.py518
MEDIUMfinetune/train.py523
MEDIUMfinetune/train.py527
MEDIUMfinetune/train.py528
MEDIUMfinetune/train.py529
MEDIUMfinetune/train.py532
MEDIUMfinetune/train.py542
MEDIUMfinetune/train.py543
MEDIUMfinetune/train.py546
MEDIUMfinetune/train.py547
MEDIUMfinetune/train.py548
MEDIUMfinetune/train.py550
MEDIUMfinetune/train.py552
MEDIUMfinetune/train.py553
MEDIUMfinetune/train.py554
MEDIUMfinetune/train.py557
MEDIUMfinetune/train.py558
MEDIUMfinetune/train.py559
MEDIUMfinetune/train.py560
MEDIUMfinetune/train.py561
MEDIUMfinetune/train.py566
MEDIUMfinetune/train.py567
17 more matches not shown…
Verbosity Indicators31 hits · 51 pts
SeverityFileLineSnippet
LOWmigrate-schema.ts31 // Step 1: Add collection column to documents
LOWmigrate-schema.ts36 // Step 2: Populate collection names from collections table
LOWmigrate-schema.ts47 // Step 3: Verify no NULL values
LOWmigrate-schema.ts57 // Step 4: Create new documents table without collection_id
LOWmigrate-schema.ts76 // Step 5: Copy data
LOWmigrate-schema.ts88 // Step 6: Drop old table and rename new one
LOWmigrate-schema.ts94 // Step 7: Recreate indices
LOWmigrate-schema.ts100 // Step 8: Update FTS trigger to use collection name
LOWfinetune/convert_gguf.py117 # Step 1: Load and merge
LOWfinetune/convert_gguf.py133 # Step 2: Save merged model
LOWfinetune/convert_gguf.py139 # Step 3: Setup llama.cpp
LOWfinetune/convert_gguf.py147 # Step 4: Convert to FP16 GGUF
LOWfinetune/convert_gguf.py161 # Step 5: Quantize
LOWfinetune/convert_gguf.py180 # Step 6: Upload
LOWsrc/store.ts3479 // Step 1: Get vector matches from sqlite-vec (no JOINs allowed)
LOWsrc/store.ts3488 // Step 2: Get chunk info and document data
LOWsrc/store.ts4517 // Step 1: BM25 probe — strong signal skips expensive LLM expansion
LOWsrc/store.ts4531 // Step 2: Expand query (or skip if strong signal)
LOWsrc/store.ts4550 // Step 3: Route searches by query type
LOWsrc/store.ts4615 // Step 4: RRF fusion — original-query FTS and vector lists get 2x weight;
LOWsrc/store.ts4624 // Step 5: Chunk documents, pick best chunk per doc for reranking.
LOWsrc/store.ts4701 // Step 6: Rerank chunks (NOT full bodies)
LOWsrc/store.ts4715 // Step 7: Blend RRF position score with reranker score
LOWsrc/store.ts4767 // Step 8: Dedup by file (safety net — prevents duplicate output)
LOWsrc/store.ts4941 // Step 1: Run FTS for all lex searches (sync, instant)
LOWsrc/store.ts4962 // Step 2: Batch embed and run vector searches for vec/hyde
LOWsrc/store.ts5005 // Step 3: RRF fusion — first list gets 2x weight (assume caller ordered by importance)
LOWsrc/store.ts5015 // Step 4: Chunk documents, pick best chunk per doc for reranking
LOWsrc/store.ts5095 // Step 5: Rerank chunks
LOWsrc/store.ts5109 // Step 6: Blend RRF position score with reranker score
LOWsrc/store.ts5160 // Step 7: Dedup by file
Hyper-Verbose Identifiers34 hits · 30 pts
SeverityFileLineSnippet
LOWfinetune/convert_onnx.py294def write_transformers_js_config(onnx_dir: str, quantize_type: str = "q4"):
LOWfinetune/reward.py634def extract_query_from_prompt(prompt: str) -> str:
LOWfinetune/jobs/eval_common.py218def extract_query_from_prompt(prompt):
LOWsrc/collections.ts269export function getDefaultCollectionNames(): string[] {
LOWsrc/llm.ts35export function setNodeLlamaCppModuleForTest(module: NodeLlamaCppModule | null): void {
LOWsrc/llm.ts602export function resolveParallelismOverride(envValue = process.env.QMD_EMBED_PARALLELISM): number | undefined {
LOWsrc/llm.ts1990export function isDarwinMetalMitigationActive(): boolean {
LOWsrc/llm.ts2009export function isDarwinExitGuardInstalled(): boolean {
LOWsrc/store.ts275export function chunkDocumentWithBreakPoints(
LOWsrc/store.ts415export function getRelativePathFromPrefix(path: string, prefix: string): string | null {
LOWsrc/store.ts725function createSqliteVecUnavailableError(reason: string): Error {
LOWsrc/store.ts779function rebuildFTSForCjkNormalization(db: Database): void {
LOWsrc/store.ts1437function validatePositiveIntegerOption(name: string, value: number | undefined, fallback: number): number {
LOWsrc/store.ts1461function isContentVectorColumnError(error: unknown): boolean {
LOWsrc/store.ts1469function runContentVectorColumnRepairs(db: Database): void {
LOWsrc/store.ts2118export function getHashesNeedingEmbedding(db: Database, collection?: string, model: string = DEFAULT_EMBED_MODEL): numbe
LOWsrc/store.ts2152export async function maybeAdoptLegacyEmbeddingFingerprint(store: Store, model: string = DEFAULT_EMBED_MODEL): Promise<L
LOWsrc/store.ts2488export function findOrMigrateLegacyDocument(
LOWsrc/store.ts3146export function getCollectionsWithoutContext(db: Database): { name: string; pwd: string; doc_count: number }[] {
LOWsrc/store.ts3178export function getTopLevelPathsWithoutContext(db: Database, collectionName: string): string[] {
LOWsrc/store.ts3691function removeIncompleteEmbeddings(db: Database, expectedChunksByHash: Map<string, number>, model: string): number {
LOWsrc/cli/qmd.ts262export async function finishSuccessfulCliCommand(options: FinishSuccessfulCliCommandOptions): Promise<void> {
LOWsrc/cli/qmd.ts455function sanitizeDiagnosticMessage(message: string): string {
LOWsrc/cli/qmd.ts1940function ensureModelsConfiguredForCli(): { embed: string; generate: string; rerank: string } {
LOWsrc/cli/qmd.ts1966export function resolveGenerateModelForCli(): string {
LOWsrc/cli/qmd.ts3145function installedSkillStubContent(): string {
LOWsrc/cli/qmd.ts3332async function shouldCreateClaudeSymlink(linkPath: string, autoYes: boolean): Promise<boolean> {
LOWsrc/cli/qmd.ts3494function normalizedDoctorNextSteps(steps: string[]): string[] {
LOWsrc/cli/qmd.ts3537function formatModelDiagnosticPath(path: string): string {
LOWsrc/cli/qmd.ts3541function findCachedModelInspection(model: string): CachedModelInspection {
LOWsrc/cli/qmd.ts3574function collectEnvironmentOverrides(activeModels: { embed: string; generate: string; rerank: string }, configModels: Mo
LOWsrc/cli/qmd.ts3643function checkEnvironmentOverrides(activeModels: { embed: string; generate: string; rerank: string }, configModels: Mode
LOWsrc/cli/qmd.ts3727async function checkEmbeddingVectorSamples(db: Database, model: string, fingerprint: string, sampleSize: number = 3): Pr
LOWsrc/cli/qmd.ts3811function linuxCudaRuntimeDiagnostic(): string | null {
Excessive Try-Catch Wrapping19 hits · 22 pts
SeverityFileLineSnippet
LOWfinetune/train_unsloth.py169 except Exception as e:
LOWfinetune/train_unsloth.py180 except Exception as e:
MEDIUMfinetune/eval_retrieval.py368 print(f"Error: Golden data file not found: {args.golden}", file=sys.stderr)
LOWfinetune/train.py279 except Exception:
LOWfinetune/train.py409 except Exception:
LOWfinetune/train.py454 except Exception:
LOWfinetune/train.py628 except Exception:
LOWfinetune/train.py644 except Exception:
LOWfinetune/dataset/validate_schema.py38 except Exception as e:
MEDIUMfinetune/dataset/prepare_data.py111 print(f"Error: No files found matching: {args.input}")
MEDIUMfinetune/dataset/prepare_data.py117 print(f"Error: Input file not found: {input_path}")
MEDIUMfinetune/dataset/analyze_data.py218 print(f"Error: Could not find dataset at {input_path}")
LOWfinetune/dataset/schema.py133 except Exception as e:
LOWfinetune/dataset/schema.py186 except Exception:
LOWfinetune/dataset/schema.py220 except Exception:
LOWfinetune/experiments/gepa/dspy_gepa.py100 except Exception:
MEDIUMfinetune/experiments/gepa/dspy_gepa.py140 print("Error: DSPy expects provider/model format for LM strings (e.g., xai/grok-4-1-fast-reasoning).")
LOWfinetune/experiments/gepa/example.py114 except Exception as exc:
LOWfinetune/experiments/gepa/score.py32 except Exception:
Deep Nesting18 hits · 18 pts
SeverityFileLineSnippet
LOWfinetune/train_unsloth.py26
LOWfinetune/benchmark.py62
LOWfinetune/eval_retrieval.py79
LOWfinetune/eval_retrieval.py115
LOWfinetune/eval_retrieval.py332
LOWfinetune/reward.py90
LOWfinetune/reward.py140
LOWfinetune/reward.py267
LOWfinetune/reward.py408
LOWfinetune/dataset/analyze_data.py84
LOWfinetune/dataset/analyze_data.py196
LOWfinetune/dataset/schema.py142
LOWfinetune/experiments/gepa/generate.py32
LOWfinetune/jobs/eval_common.py42
LOWfinetune/jobs/eval_common.py67
LOWfinetune/jobs/eval.py108
LOWfinetune/jobs/eval.py133
LOWfinetune/jobs/eval.py204
Unused Imports17 hits · 16 pts
SeverityFileLineSnippet
LOWfinetune/train_unsloth.py14
LOWfinetune/train_unsloth.py67
LOWfinetune/train_unsloth.py111
LOWfinetune/train.py44
LOWfinetune/convert_onnx.py44
LOWfinetune/convert_onnx.py45
LOWfinetune/dataset/validate_schema.py8
LOWfinetune/dataset/score_data.py8
LOWfinetune/dataset/prepare_data_lfm2.py14
LOWfinetune/dataset/schema.py16
LOWfinetune/experiments/gepa/generate.py4
LOWfinetune/experiments/gepa/dspy_gepa.py4
LOWfinetune/experiments/gepa/example.py4
LOWfinetune/experiments/gepa/optimizer.py4
LOWfinetune/experiments/lfm2/sft_lfm2.py38
LOWfinetune/jobs/eval.py23
LOWfinetune/jobs/eval.py26
Over-Commented Block11 hits · 10 pts
SeverityFileLineSnippet
LOWtest/smoke-install.sh1#!/usr/bin/env bash
LOWfinetune/convert_gguf.py1#!/usr/bin/env python3
LOWfinetune/train.py1# /// script
LOWfinetune/convert_onnx.py1#!/usr/bin/env python3
LOWfinetune/experiments/lfm2/sft_lfm2.yaml1# SFT Training Config for QMD Query Expansion with LiquidAI LFM2
LOWfinetune/experiments/lfm2/sft_lfm2.py1# /// script
LOWfinetune/experiments/grpo/grpo.py1# /// script
LOWfinetune/jobs/sft.py1# /// script
LOWscripts/extract-changelog.sh1#!/usr/bin/env bash
LOWscripts/release.sh1#!/usr/bin/env bash
LOWsrc/llm.ts1961// `[rsets->data count] == 0` — but the keep_alive hasn't expired, so the
Fake / Example Data7 hits · 7 pts
SeverityFileLineSnippet
LOWtest/store.test.ts2154 const padLine = "Lorem ipsum dolor sit amet\n";
LOWtest/store.test.ts2154 const padLine = "Lorem ipsum dolor sit amet\n";
LOWtest/store.test.ts2168 const padding = "Lorem ipsum dolor sit amet\n".repeat(200);
LOWtest/store.test.ts2168 const padding = "Lorem ipsum dolor sit amet\n".repeat(200);
LOWtest/mcp.test.ts167 body: "# Large Document\n\n" + "Lorem ipsum ".repeat(2000), // ~24KB
LOWtest/ast-chunking.test.ts116 sections.push(`# Section ${i}\n\n${"Lorem ipsum dolor sit amet. ".repeat(40)}\n`);
LOWtest/ast-chunking.test.ts116 sections.push(`# Section ${i}\n\n${"Lorem ipsum dolor sit amet. ".repeat(40)}\n`);
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippet
HIGHfinetune/train.py419 print(" cd finetune && uv run python experiments/grpo/grpo.py")
Self-Referential Comments1 hit · 3 pts
SeverityFileLineSnippet
MEDIUMexample-index.yml4# This file defines all collections and their contexts.
Example Usage Blocks1 hit · 2 pts
SeverityFileLineSnippet
LOWtest/smoke-install.sh6# Usage:
Redundant / Tautological Comments1 hit · 1 pts
SeverityFileLineSnippet
LOWfinetune/train.py266 # Check if output looks like a HF Hub path (contains /)