baseline repo characteristics no longer crowd the candidate graph

This commit is contained in:
2026-05-03 00:14:59 +02:00
parent 4672ac6edc
commit 6c4b0e6dcb
7 changed files with 338 additions and 64 deletions

View File

@@ -474,7 +474,11 @@ class DeterministicScanner:
return "ci_tooling"
if lower.startswith(("tests/", "test/")) or name.startswith("test_"):
return "test_evidence"
if name.startswith("readme") or lower.startswith(("docs/", "doc/", "wiki/")):
if (
name.startswith("readme")
or name.endswith(".md")
or lower.startswith(("docs/", "doc/", "wiki/", "workplans/", "architecture/"))
):
return "product_documentation"
if name in MANIFEST_FRAMEWORK_HINTS or name.endswith((".lock", ".mod")):
return "dependency_declaration"
@@ -483,13 +487,21 @@ class DeterministicScanner:
return "implementation_source"
def _has_provider_signal(self, lower_text: str, needle: str) -> bool:
pattern = re.compile(rf"(?<![a-z0-9-]){re.escape(needle.lower())}(?![a-z0-9-])")
if f"{needle.lower()}_api_key" in lower_text:
return True
pattern = re.compile(rf"(?<![a-z0-9_-]){re.escape(needle.lower())}(?![a-z0-9_-])")
for match in pattern.finditer(lower_text):
context = lower_text[max(0, match.start() - 20) : match.end() + 20]
if needle == "claude" and (
"claude.md" in context
or "claude code" in context
or "claude.ai/code" in context
or "claude mcp" in context
or "mcp" in context
or ".claude" in context
or "claude.json" in context
or "claude plugin" in context
or "claude prompt" in context
):
continue
return True