Repository Analysis

YILING0013/AI_NovelGenerator

使用ai生成多章节的长篇小说,自动衔接上下文、伏笔

15.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of YILING0013/AI_NovelGenerator, a Python project with 5,781 GitHub stars. SynthScan v2.0 examined 10,984 lines of code across 48 source files, recording 173 pattern matches distributed across 5 syntactic categories. The overall adjusted score of 15.5 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).

15.5
Adjusted Score
15.5
Raw Score
100%
Time Factor
2026-08-01
Last Push
5.8K
Stars
Python
Language
11.0K
Lines of Code
48
Files
173
Pattern Hits
2026-08-02
Scan Date
0.00
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 0MEDIUM 5LOW 168

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 173 distinct pattern matches across 5 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.

Excessive Try-Catch Wrapping66 hits · 72 pts
SeverityFileLineSnippetContext
LOWllm_adapters.py230 except Exception as e:CODE
LOWllm_adapters.py280 except Exception as e:CODE
LOWllm_adapters.py315 except Exception as e:CODE
LOWllm_adapters.py349 except Exception as e:CODE
LOWllm_adapters.py388 except Exception as e:CODE
LOWconfig_manager.py254 except Exception:CODE
LOWconfig_manager.py286 except Exception as e:CODE
LOWconfig_manager.py313 except Exception as e:CODE
MEDIUMconfig_manager.py264def task():CODE
MEDIUMconfig_manager.py294def task():CODE
LOWutils.py14 except Exception as e:CODE
LOWutils.py42 except Exception as e:CODE
LOWutils.py51 except Exception as e:CODE
LOWembedding_adapters.py202 except Exception as e:CODE
LOWembedding_adapters.py221 except Exception as e:CODE
LOWui/main_window.py50 except Exception:CODE
LOWui/main_window.py411 except Exception as e:CODE
MEDIUMui/main_window.py195def safe_get_int(self, var, default=1):CODE
LOWui/other_settings.py59 except Exception as e:CODE
MEDIUMui/other_settings.py56def task():CODE
MEDIUMui/generation_handlers.py707def batch_task():CODE
LOWui/generation_handlers.py776 except Exception:CODE
LOWui/generation_handlers.py784 except Exception as e:CODE
LOWui/generation_handlers.py71 except Exception:CODE
LOWui/generation_handlers.py117 except Exception:CODE
LOWui/generation_handlers.py214 except Exception as e:CODE
LOWui/generation_handlers.py312 except Exception:CODE
LOWui/generation_handlers.py408 except Exception:CODE
LOWui/generation_handlers.py457 except Exception:CODE
LOWui/generation_handlers.py606 except Exception as e:CODE
LOWui/generation_handlers.py714 except Exception:CODE
LOWui/generation_handlers.py744 except Exception as e:CODE
LOWui/config_tab.py234 except Exception as e:CODE
LOWui/role_library.py301 except Exception as e:CODE
LOWui/role_library.py305 except Exception as e:CODE
LOWui/role_library.py425 except Exception as e:CODE
LOWui/role_library.py446 except Exception as e:CODE
LOWui/role_library.py521 except Exception as e:CODE
LOWui/role_library.py677 except Exception as e:CODE
LOWui/role_library.py717 except Exception as e:CODE
LOWui/role_library.py773 except Exception as e:CODE
LOWui/role_library.py804 except Exception as e:CODE
LOWui/role_library.py903 except Exception as e:CODE
LOWui/role_library.py1007 except Exception as e:CODE
LOWui/role_library.py1019 except Exception as e:CODE
LOWui/role_library.py1362 except Exception as e:CODE
LOWui/role_library.py1502 except Exception as e:CODE
LOWui/role_library.py1519 except Exception as e:CODE
LOWui/role_library.py1578 except Exception as e:CODE
LOWnovel_generator/chapter.py112 except Exception as e:CODE
LOWnovel_generator/chapter.py281 except Exception as e:CODE
LOWnovel_generator/chapter.py388 except Exception as e:CODE
LOWnovel_generator/chapter.py491 except Exception as e:CODE
LOWnovel_generator/vectorstore_utils.py44 except Exception as e:CODE
LOWnovel_generator/vectorstore_utils.py87 except Exception as e:CODE
LOWnovel_generator/vectorstore_utils.py128 except Exception as e:CODE
LOWnovel_generator/vectorstore_utils.py202 except Exception as e:CODE
LOWnovel_generator/vectorstore_utils.py226 except Exception as e:CODE
LOWnovel_generator/vectorstore_utils.py242 except Exception as e:CODE
LOWnovel_generator/finalization.py32 except Exception:CODE
6 more matches not shown…
Hyper-Verbose Identifiers40 hits · 40 pts
SeverityFileLineSnippetContext
LOWchapter_directory_parser.py48def _strip_wrapping_punctuation(text: str) -> str:CODE
LOWchapter_directory_parser.py140def get_chapter_info_from_blueprint(blueprint_text: str, target_chapter_number: int):CODE
LOWprompt_definitions_en.py678def _inject_style_requirements(prompt_text):STRING
LOWui/main_window.py275 def show_character_import_window(self):CODE
LOWui/novel_params_tab.py101def build_optional_buttons_area(self, start_row=2):CODE
LOWui/novel_params_tab.py137def create_label_with_help_for_novel_params(self, parent, label_text, tooltip_key, row, column, font=None, sticky="e", pCODE
LOWui/generation_handlers.py788def clear_vectorstore_handler(self):CODE
LOWui/generation_handlers.py23def generate_novel_architecture_ui(self):CODE
LOWui/generation_handlers.py77def generate_chapter_blueprint_ui(self):CODE
LOWui/generation_handlers.py123def generate_chapter_draft_ui(self):CODE
LOWui/config_tab.py20def _sync_selected_llm_metadata(config_data, selected_name):CODE
LOWui/config_tab.py26def _replace_choose_config_references(config_data, old_name, new_name):CODE
LOWui/config_tab.py483def build_embeddings_config_tab(self):CODE
LOWui/config_tab.py484 def on_embedding_interface_changed(new_value):CODE
LOWui/role_library.py85 def _find_role_actual_category(self, role_name):CODE
LOWui/role_library.py680 def load_default_character_state(self, right_panel):CODE
LOWui/role_library.py836 def _check_role_name_conflict(self, new_name):CODE
LOWui/role_library.py1118 def _create_category_directory(self, category_name):CODE
LOWui/role_library.py1365 def _create_attribute_section(self, attr_name, items):CODE
LOWui/role_library.py1488 def _read_file_with_fallback_encoding(self, file_path):CODE
LOWnovel_generator/chapter.py42def summarize_recent_chapters(CODE
LOWnovel_generator/chapter.py116def extract_summary_from_response(response_text: str) -> str:CODE
LOWnovel_generator/chapter.py218def get_filtered_knowledge_context(CODE
LOWnovel_generator/vectorstore_utils.py144def split_text_for_vectorstore(chapter_text: str, max_length: int = 500, similarity_threshold: float = 0.7):CODE
LOWnovel_generator/vectorstore_utils.py206def get_relevant_context_from_vector_store(embedding_adapter, query: str, filepath: str, k: int = 2) -> str:CODE
LOWnovel_generator/vectorstore_utils.py231def _get_sentence_transformer(model_name: str = 'paraphrase-MiniLM-L6-v2'):CODE
LOWnovel_generator/architecture.py22def load_partial_architecture_data(filepath: str) -> dict:CODE
LOWnovel_generator/architecture.py38def save_partial_architecture_data(filepath: str, data: dict):CODE
LOWtests/test_common.py26 def test_remove_think_tags_strips_reasoning_blocks(self):CODE
LOWtests/test_common.py31 def test_invoke_with_cleaning_removes_think_tags_from_llm_output(self):CODE
LOWtests/test_chapter_directory_parser.py11 def test_parses_adjacent_chinese_chapters_without_blank_lines(self):CODE
LOWtests/test_chapter_directory_parser.py38 def test_parses_markdown_and_colon_style_chinese_output(self):CODE
LOWtests/test_chapter_directory_parser.py58 def test_parses_english_chapter_blueprint(self):CODE
LOWtests/test_chapter_directory_parser.py79 def test_returns_default_info_when_chapter_is_missing(self):CODE
LOWtests/test_text_utils.py20 def test_fallback_splits_chinese_sentences_without_spaces(self):CODE
LOWtests/test_text_utils.py27 def test_split_sentences_falls_back_when_nltk_is_unavailable(self):CODE
LOWtests/test_config_manager.py12 def test_default_config_uses_current_model_presets(self):CODE
LOWtests/test_config_manager.py28 def test_normalize_config_migrates_legacy_task_choices(self):CODE
LOWtests/test_config_manager.py51 def test_config_example_has_valid_task_references(self):CODE
LOWtests/test_config_manager.py60 def test_embedding_ui_options_match_supported_adapters(self):CODE
Unused Imports35 hits · 34 pts
SeverityFileLineSnippetContext
LOWllm_adapters.py12CODE
LOWutils.py3CODE
LOWui/main_window.py4CODE
LOWui/main_window.py8CODE
LOWui/main_window.py13CODE
LOWui/main_window.py14CODE
LOWui/main_window.py14CODE
LOWui/main_window.py14CODE
LOWui/main_window.py17CODE
LOWui/main_window.py18CODE
LOWui/main_window.py18CODE
LOWui/main_window.py36CODE
LOWui/novel_params_tab.py4CODE
LOWui/generation_handlers.py5CODE
LOWui/generation_handlers.py8CODE
LOWui/__init__.py2CODE
LOWui/main_tab.py4CODE
LOWui/role_library.py10CODE
LOWnovel_generator/chapter.py7CODE
LOWnovel_generator/vectorstore_utils.py9CODE
LOWnovel_generator/vectorstore_utils.py182CODE
LOWnovel_generator/vectorstore_utils.py182CODE
LOWnovel_generator/vectorstore_utils.py182CODE
LOWnovel_generator/__init__.py2CODE
LOWnovel_generator/__init__.py3CODE
LOWnovel_generator/__init__.py4CODE
LOWnovel_generator/__init__.py4CODE
LOWnovel_generator/__init__.py4CODE
LOWnovel_generator/__init__.py4CODE
LOWnovel_generator/__init__.py4CODE
LOWnovel_generator/__init__.py11CODE
LOWnovel_generator/__init__.py11CODE
LOWnovel_generator/__init__.py12CODE
LOWnovel_generator/__init__.py13CODE
LOWnovel_generator/architecture.py9CODE
Deep Nesting30 hits · 21 pts
SeverityFileLineSnippetContext
LOWllm_adapters.py392CODE
LOWconfig_manager.py244CODE
LOWembedding_adapters.py284CODE
LOWui/main_window.py275CODE
LOWui/main_window.py389CODE
LOWui/other_settings.py284CODE
LOWui/generation_handlers.py123CODE
LOWui/generation_handlers.py462CODE
LOWui/generation_handlers.py720CODE
LOWui/generation_handlers.py129CODE
LOWui/generation_handlers.py551CODE
LOWui/generation_handlers.py726CODE
LOWui/generation_handlers.py187CODE
LOWui/config_tab.py483CODE
LOWui/config_tab.py484CODE
LOWui/role_library.py403CODE
LOWui/role_library.py503CODE
LOWui/role_library.py525CODE
LOWui/role_library.py720CODE
LOWui/role_library.py810CODE
LOWui/role_library.py836CODE
LOWui/role_library.py906CODE
LOWui/role_library.py1176CODE
LOWui/role_library.py1238CODE
LOWui/role_library.py1289CODE
LOWui/role_library.py1451CODE
LOWui/role_library.py1488CODE
LOWui/role_library.py1204CODE
LOWnovel_generator/chapter.py176CODE
LOWnovel_generator/chapter.py285CODE
AI Structural Patterns2 hits · 2 pts
SeverityFileLineSnippetContext
LOWnovel_generator/vectorstore_utils.py76CODE
LOWnovel_generator/vectorstore_utils.py119CODE