Repository Analysis

dsphper/lanhu-mcp

⚡ 需求分析效率提升 200%!全球首个为 AI 编程时代设计的团队协作 MCP 服务器,自动分析需求自动编写前后端代码,下载切图

28.3 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of dsphper/lanhu-mcp, a Python project with 1,943 GitHub stars. SynthScan v2.0 examined 13,461 lines of code across 33 source files, recording 174 pattern matches distributed across 12 syntactic categories. The overall adjusted score of 28.3 places this repository in the Moderate 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).

28.3
Adjusted Score
28.3
Raw Score
100%
Time Factor
2026-07-14
Last Push
1.9K
Stars
Python
Language
13.5K
Lines of Code
33
Files
174
Pattern Hits
2026-07-14
Scan Date
1.06
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

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

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 35MEDIUM 36LOW 103

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 174 distinct pattern matches across 12 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.

Cross-Language Confusion33 hits · 196 pts
SeverityFileLineSnippetContext
HIGHlanhu_mcp_server.py1252 let vm = null; let node = el;CODE
HIGHlanhu_mcp_server.py1258 const dw = (layers[0]?.width || 750) / 2;CODE
HIGHlanhu_mcp_server.py1259 const dh = (layers[0]?.height || 1334) / 2;CODE
HIGHlanhu_mcp_server.py1263 for (let i = 1; i < layers.length && i < items.length; i++) {CODE
HIGHlanhu_mcp_server.py1270 results.push({CODE
HIGHlanhu_mcp_server.py1274 textInfo: L.textInfo || null,CODE
HIGHlanhu_mcp_server.py1274 textInfo: L.textInfo || null,CODE
HIGHlanhu_mcp_server.py4099 .filter(t => t.length > 0 && t.length < 200)CODE
HIGHlanhu_mcp_server.py4102 sections.push("[Important Tips/Warnings]\\n" + redContent.join("\\n"));CODE
HIGHlanhu_mcp_server.py4112 if (text && text.length > 0 && text.length < 100) {CODE
HIGHlanhu_mcp_server.py4113 shapeTexts.push(text);CODE
HIGHlanhu_mcp_server.py4119 sections.push("[Flowchart/Component Text]\\n" + uniqueShapes.slice(0, 20).join(" | ")); // max 2CODE
HIGHlanhu_mcp_server.py4125 sections.push("[Full Page Text]\\n" + bodyText.trim());CODE
HIGHlanhu_mcp_server.py4137 const data = window.__lanhuAxurePageData || null;CODE
HIGHlanhu_mcp_server.py4137 const data = window.__lanhuAxurePageData || null;CODE
HIGHlanhu_mcp_server.py4145 if (!node) return null;CODE
HIGHlanhu_mcp_server.py4164 const ownerId = annotation.ownerId || null;CODE
HIGHlanhu_mcp_server.py4164 const ownerId = annotation.ownerId || null;CODE
HIGHlanhu_mcp_server.py4165 const scriptId = ownerId && objectPaths[ownerId]CODE
HIGHlanhu_mcp_server.py4167 : null;CODE
HIGHlanhu_mcp_server.py4168 const noteHtml = annotation['注释'] || annotation.note || annotation.description || '';CODE
HIGHlanhu_mcp_server.py4171 fn: annotation.fn ?? null,CODE
HIGHlanhu_mcp_server.py4176 scriptId: scriptId || nullCODE
HIGHlanhu_mcp_server.py4198 located.push({CODE
HIGHlanhu_mcp_server.py4199 fn: record?.fn ?? null,CODE
HIGHlanhu_mcp_server.py4200 ownerId: record?.ownerId ?? null,CODE
HIGHlanhu_mcp_server.py4271 if (bg && bg !== 'rgba(0, 0, 0, 0)' && bg !== 'transparent') {CODE
HIGHlanhu_mcp_server.py4277 if (bgImg && bgImg !== 'none') {CODE
HIGHlanhu_mcp_server.py4280 images.push({ src: m[1], type: 'bg', w: Math.round(rect.width), h: Math.round(rect.heighCODE
HIGHlanhu_mcp_server.py4287 if (img.src && img.naturalWidth > 0 && !img.src.startsWith('data:')) {CODE
HIGHlanhu_mcp_server.py4288 images.push({ src: img.src, type: 'img', w: img.naturalWidth, h: img.naturalHeight });CODE
HIGHlanhu_mcp_server.py4256 if (rect.width < 1 || rect.height < 1) return;CODE
HIGHlanhu_mcp_server.py4260 n => n.nodeType === 3 && n.textContent.trim().length > 0CODE
Decorative Section Separators36 hits · 112 pts
SeverityFileLineSnippetContext
MEDIUMsetup-env.sh61# ==============================================COMMENT
MEDIUMsetup-env.sh63# ==============================================COMMENT
MEDIUMsetup-env.sh68# ==============================================COMMENT
MEDIUMsetup-env.sh70# ==============================================COMMENT
MEDIUMsetup-env.sh78# ==============================================COMMENT
MEDIUMsetup-env.sh80# ==============================================COMMENT
MEDIUMsetup-env.sh85# ==============================================COMMENT
MEDIUMsetup-env.sh87# ==============================================COMMENT
MEDIUMsetup-env.sh92# ==============================================COMMENT
MEDIUMsetup-env.sh94# ==============================================COMMENT
MEDIUMsetup-env.sh105# ==============================================COMMENT
MEDIUMsetup-env.sh107# ==============================================COMMENT
MEDIUMeasy-install.sh35# ============================================COMMENT
MEDIUMeasy-install.sh37# ============================================COMMENT
MEDIUMeasy-install.sh78# ============================================COMMENT
MEDIUMeasy-install.sh80# ============================================COMMENT
MEDIUMeasy-install.sh122# ============================================COMMENT
MEDIUMeasy-install.sh124# ============================================COMMENT
MEDIUMeasy-install.sh218# ============================================COMMENT
MEDIUMeasy-install.sh220# ============================================COMMENT
MEDIUMeasy-install.sh234# ============================================COMMENT
MEDIUMeasy-install.sh236# ============================================COMMENT
MEDIUMdocker-compose.yml25# ============================================COMMENT
MEDIUMdocker-compose.yml27# ============================================COMMENT
MEDIUMlanhu_mcp_server.py1975# ============================================STRING
MEDIUMlanhu_mcp_server.py1977# ============================================STRING
MEDIUMlanhu_mcp_server.py1817# ============================================STRING
MEDIUMlanhu_mcp_server.py1819# ============================================STRING
MEDIUMlanhu_mcp_server.py4915# ============================================STRING
MEDIUMlanhu_mcp_server.py4917# ============================================STRING
MEDIUMtests/test_product_documents.py22# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_product_documents.py24# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_product_documents.py42# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_product_documents.py44# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_product_documents.py61# ---------------------------------------------------------------------------COMMENT
MEDIUMtests/test_product_documents.py63# ---------------------------------------------------------------------------COMMENT
Hyper-Verbose Identifiers30 hits · 25 pts
SeverityFileLineSnippetContext
LOWlanhu_mcp_server.py452def _resolve_loop_placeholder(value: str, loop_item: dict) -> str:CODE
LOWlanhu_mcp_server.py634 def _has_only_transparent_solid(fills: list) -> bool:CODE
LOWlanhu_mcp_server.py4379async def lanhu_resolve_invite_link(CODE
LOWlanhu_mcp_server.py4459def _get_analysis_mode_options_by_role(user_role: str) -> str:CODE
LOWlanhu_mcp_server.py5664async def lanhu_get_ai_analyze_design_result(CODE
LOWlanhu_mcp_server.py1283def _extract_full_annotations_from_sketch(sketch_data: dict, design_scale: float = 2.0) -> str:STRING
LOWlanhu_mcp_server.py2628 async def _find_current_axure_doc_id(self, project_id: str, team_id: str,STRING
LOWlanhu_mcp_server.py3668 async def _get_version_id_by_image_id(self, project_id: str, team_id: str = None, image_id: str = None) -> str:STRING
LOWlanhu_mcp_server.py3779def _format_axure_annotations_for_text(axure_annotations: Optional[dict]) -> str:STRING
LOWlanhu_mcp_server.py4533async def lanhu_list_product_documents(STRING
LOWlanhu_mcp_server.py5154def _get_analysis_mode_prompt(analysis_mode: str) -> dict:STRING
LOWlanhu_mcp_server.py5188async def lanhu_get_ai_analyze_page_result(STRING
LOWlanhu_mcp_server.py5478def _normalize_design_sectors(sectors: List[dict]) -> tuple[List[dict], dict[str, List[dict]]]:STRING
LOWtests/test_basic.py37def test_data_directory_creation():CODE
LOWtests/test_product_documents.py46def test_parse_url_extracts_tid_and_pid_for_product_documents_call():CODE
LOWtests/test_product_documents.py157def test_list_product_documents_hits_correct_endpoint_with_query_params():CODE
LOWtests/test_product_documents.py170def test_list_product_documents_simplifies_shape_and_preserves_order():CODE
LOWtests/test_product_documents.py190def test_list_product_documents_per_item_fields_are_minimal_and_normalized():CODE
LOWtests/test_product_documents.py224def test_list_product_documents_propagates_api_error():CODE
LOWtests/test_product_documents.py242def test_list_product_documents_handles_empty_resources():CODE
LOWtests/test_css_utils.py6def test_camel_to_kebab_basic():CODE
LOWtests/test_css_utils.py11def test_format_css_value_unit_handling():CODE
LOWtests/test_css_utils.py17def test_format_css_value_numeric_string_handling():CODE
LOWtests/test_css_utils.py22def test_merge_padding_compacts_to_shorthand():CODE
LOWtests/test_axure_annotations.py12def test_format_axure_annotations_includes_native_note_position_and_content():CODE
LOWtests/test_axure_annotations.py50def test_format_axure_annotations_returns_empty_text_without_annotations():CODE
LOWtests/test_design_sectors.py6def test_get_designs_internal_normalizes_sector_paths_and_multi_group_membership():CODE
LOW.github/workflows/docs-sync.yml52 def update_documentation_metadata():CODE
LOW.github/workflows/docs-sync.yml100 def update_config_review_date():CODE
LOW.github/workflows/docs-sync.yml136 def update_deploy_guide_metadata():CODE
Excessive Try-Catch Wrapping32 hits · 14 pts
SeverityFileLineSnippetContext
LOWlanhu_mcp_server.py4318 except Exception:CODE
LOWlanhu_mcp_server.py4325 except Exception:CODE
LOWlanhu_mcp_server.py4332 except Exception:CODE
LOWlanhu_mcp_server.py56 except Exception:CODE
LOWlanhu_mcp_server.py4352 except Exception as e:CODE
LOWlanhu_mcp_server.py4372 except Exception:CODE
LOWlanhu_mcp_server.py4439 except Exception as e:CODE
LOWlanhu_mcp_server.py4450 except Exception as e:CODE
LOWlanhu_mcp_server.py5570 except Exception as e:CODE
LOWlanhu_mcp_server.py5896 except Exception as e:CODE
LOWlanhu_mcp_server.py5933 except Exception as e:CODE
LOWlanhu_mcp_server.py5984 except Exception:CODE
LOWlanhu_mcp_server.py6487 except Exception as e:CODE
LOWlanhu_mcp_server.py6615 except Exception as e:CODE
LOWlanhu_mcp_server.py7055 except Exception as e:CODE
LOWlanhu_mcp_server.py1970 except Exception as e:STRING
LOWlanhu_mcp_server.py4002 except Exception:STRING
LOWlanhu_mcp_server.py4011 except Exception:STRING
LOWlanhu_mcp_server.py4019 except Exception:STRING
LOWlanhu_mcp_server.py2007 except Exception:STRING
LOWlanhu_mcp_server.py2205 except Exception:STRING
LOWlanhu_mcp_server.py2313 except Exception:STRING
LOWlanhu_mcp_server.py2427 except Exception:STRING
LOWlanhu_mcp_server.py2454 except Exception:STRING
LOWlanhu_mcp_server.py2460 except Exception:STRING
LOWlanhu_mcp_server.py2682 except Exception:STRING
LOWlanhu_mcp_server.py2767 except Exception:STRING
LOWlanhu_mcp_server.py2872 except Exception:STRING
LOWlanhu_mcp_server.py2963 except Exception:STRING
LOWlanhu_mcp_server.py3175 except Exception:STRING
LOWlanhu_mcp_server.py3979 except Exception:STRING
LOWtests/test_product_documents.py232 except Exception as e:CODE
Deep Nesting20 hits · 10 pts
SeverityFileLineSnippetContext
LOWlanhu_mcp_server.py279CODE
LOWlanhu_mcp_server.py317CODE
LOWlanhu_mcp_server.py416CODE
LOWlanhu_mcp_server.py574CODE
LOWlanhu_mcp_server.py809CODE
LOWlanhu_mcp_server.py1283CODE
LOWlanhu_mcp_server.py1821CODE
LOWlanhu_mcp_server.py2354CODE
LOWlanhu_mcp_server.py3836CODE
LOWlanhu_mcp_server.py3961CODE
LOWlanhu_mcp_server.py5188CODE
LOWlanhu_mcp_server.py5664CODE
LOWlanhu_mcp_server.py6208CODE
LOWlanhu_mcp_server.py6645CODE
LOWlanhu_mcp_server.py695CODE
LOWlanhu_mcp_server.py1391CODE
LOWlanhu_mcp_server.py1873CODE
LOWlanhu_mcp_server.py2628CODE
LOWlanhu_mcp_server.py3277CODE
LOWlanhu_mcp_server.py3329CODE
Docstring Block Structure2 hits · 8 pts
SeverityFileLineSnippetContext
HIGHCONTRIBUTING.md124 从蓝湖URL获取元数据 Args: url: 蓝湖文档URL use_cache: 是否使用缓存,默认为True Returns: 包含元数据的字典 RSTRING
HIGHlanhu_mcp_server.py2630文档被替换后旧 docId 失效,通过 product_documents 定位当前有效 axure 文档。 Args: project_id: 项目 ID team_id:STRING
Unused Imports7 hits · 6 pts
SeverityFileLineSnippetContext
LOWlanhu_mcp_server.py11CODE
LOWlanhu_mcp_server.py6270CODE
LOWtests/test_basic.py19CODE
LOWtests/test_basic.py20CODE
LOWtests/test_basic.py21CODE
LOWtests/test_basic.py22CODE
LOWtests/test_basic.py23CODE
Over-Commented Block5 hits · 4 pts
SeverityFileLineSnippetContext
LOWsetup-env.sh61# ==============================================COMMENT
LOWdocker-compose.yml21 - SERVER_PORT=8000COMMENT
LOWdocker-compose.yml41# docker-compose downCOMMENT
LOWdocker-compose.yml61#COMMENT
LOWlanhu_mcp_server.py4821 #### 异常场景(P1)COMMENT
Redundant / Tautological Comments2 hits · 3 pts
SeverityFileLineSnippetContext
LOW.github/workflows/docs-sync.yml78 # Check if marker existsCOMMENT
LOW.github/workflows/docs-sync.yml152 # Check if marker existsCOMMENT
Verbosity Indicators3 hits · 1 pts
SeverityFileLineSnippetContext
LOWlanhu_mcp_server.py1695 # Step 1: 从 CSS 规则中收集 url -> class_name 映射STRING
LOWlanhu_mcp_server.py1705 # Step 2: 替换 <img src="...">,优先用 img 的 class 属性STRING
LOWlanhu_mcp_server.py1720 # Step 3: 替换 CSS url(...) 背景图,用 CSS 类名作文件名STRING
Structural Annotation Overuse3 hits · 1 pts
SeverityFileLineSnippetContext
LOWlanhu_mcp_server.py1695 # Step 1: 从 CSS 规则中收集 url -> class_name 映射STRING
LOWlanhu_mcp_server.py1705 # Step 2: 替换 <img src="...">,优先用 img 的 class 属性STRING
LOWlanhu_mcp_server.py1720 # Step 3: 替换 CSS url(...) 背景图,用 CSS 类名作文件名STRING
AI Structural Patterns1 hit · 0 pts
SeverityFileLineSnippetContext
LOWlanhu_mcp_server.py2074CODE