使用ai生成多章节的长篇小说,自动衔接上下文、伏笔
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).
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.
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.
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.
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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | llm_adapters.py | 230 | except Exception as e: | CODE |
| LOW | llm_adapters.py | 280 | except Exception as e: | CODE |
| LOW | llm_adapters.py | 315 | except Exception as e: | CODE |
| LOW | llm_adapters.py | 349 | except Exception as e: | CODE |
| LOW | llm_adapters.py | 388 | except Exception as e: | CODE |
| LOW | config_manager.py | 254 | except Exception: | CODE |
| LOW | config_manager.py | 286 | except Exception as e: | CODE |
| LOW | config_manager.py | 313 | except Exception as e: | CODE |
| MEDIUM | config_manager.py | 264 | def task(): | CODE |
| MEDIUM | config_manager.py | 294 | def task(): | CODE |
| LOW | utils.py | 14 | except Exception as e: | CODE |
| LOW | utils.py | 42 | except Exception as e: | CODE |
| LOW | utils.py | 51 | except Exception as e: | CODE |
| LOW | embedding_adapters.py | 202 | except Exception as e: | CODE |
| LOW | embedding_adapters.py | 221 | except Exception as e: | CODE |
| LOW | ui/main_window.py | 50 | except Exception: | CODE |
| LOW | ui/main_window.py | 411 | except Exception as e: | CODE |
| MEDIUM | ui/main_window.py | 195 | def safe_get_int(self, var, default=1): | CODE |
| LOW | ui/other_settings.py | 59 | except Exception as e: | CODE |
| MEDIUM | ui/other_settings.py | 56 | def task(): | CODE |
| MEDIUM | ui/generation_handlers.py | 707 | def batch_task(): | CODE |
| LOW⚡ | ui/generation_handlers.py | 776 | except Exception: | CODE |
| LOW⚡ | ui/generation_handlers.py | 784 | except Exception as e: | CODE |
| LOW | ui/generation_handlers.py | 71 | except Exception: | CODE |
| LOW | ui/generation_handlers.py | 117 | except Exception: | CODE |
| LOW | ui/generation_handlers.py | 214 | except Exception as e: | CODE |
| LOW | ui/generation_handlers.py | 312 | except Exception: | CODE |
| LOW | ui/generation_handlers.py | 408 | except Exception: | CODE |
| LOW | ui/generation_handlers.py | 457 | except Exception: | CODE |
| LOW | ui/generation_handlers.py | 606 | except Exception as e: | CODE |
| LOW | ui/generation_handlers.py | 714 | except Exception: | CODE |
| LOW | ui/generation_handlers.py | 744 | except Exception as e: | CODE |
| LOW | ui/config_tab.py | 234 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 301 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 305 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 425 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 446 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 521 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 677 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 717 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 773 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 804 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 903 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 1007 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 1019 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 1362 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 1502 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 1519 | except Exception as e: | CODE |
| LOW | ui/role_library.py | 1578 | except Exception as e: | CODE |
| LOW | novel_generator/chapter.py | 112 | except Exception as e: | CODE |
| LOW | novel_generator/chapter.py | 281 | except Exception as e: | CODE |
| LOW | novel_generator/chapter.py | 388 | except Exception as e: | CODE |
| LOW | novel_generator/chapter.py | 491 | except Exception as e: | CODE |
| LOW | novel_generator/vectorstore_utils.py | 44 | except Exception as e: | CODE |
| LOW | novel_generator/vectorstore_utils.py | 87 | except Exception as e: | CODE |
| LOW | novel_generator/vectorstore_utils.py | 128 | except Exception as e: | CODE |
| LOW | novel_generator/vectorstore_utils.py | 202 | except Exception as e: | CODE |
| LOW | novel_generator/vectorstore_utils.py | 226 | except Exception as e: | CODE |
| LOW | novel_generator/vectorstore_utils.py | 242 | except Exception as e: | CODE |
| LOW | novel_generator/finalization.py | 32 | except Exception: | CODE |
| 6 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | chapter_directory_parser.py | 48 | def _strip_wrapping_punctuation(text: str) -> str: | CODE |
| LOW | chapter_directory_parser.py | 140 | def get_chapter_info_from_blueprint(blueprint_text: str, target_chapter_number: int): | CODE |
| LOW | prompt_definitions_en.py | 678 | def _inject_style_requirements(prompt_text): | STRING |
| LOW | ui/main_window.py | 275 | def show_character_import_window(self): | CODE |
| LOW | ui/novel_params_tab.py | 101 | def build_optional_buttons_area(self, start_row=2): | CODE |
| LOW | ui/novel_params_tab.py | 137 | def create_label_with_help_for_novel_params(self, parent, label_text, tooltip_key, row, column, font=None, sticky="e", p | CODE |
| LOW⚡ | ui/generation_handlers.py | 788 | def clear_vectorstore_handler(self): | CODE |
| LOW | ui/generation_handlers.py | 23 | def generate_novel_architecture_ui(self): | CODE |
| LOW | ui/generation_handlers.py | 77 | def generate_chapter_blueprint_ui(self): | CODE |
| LOW | ui/generation_handlers.py | 123 | def generate_chapter_draft_ui(self): | CODE |
| LOW | ui/config_tab.py | 20 | def _sync_selected_llm_metadata(config_data, selected_name): | CODE |
| LOW | ui/config_tab.py | 26 | def _replace_choose_config_references(config_data, old_name, new_name): | CODE |
| LOW | ui/config_tab.py | 483 | def build_embeddings_config_tab(self): | CODE |
| LOW | ui/config_tab.py | 484 | def on_embedding_interface_changed(new_value): | CODE |
| LOW | ui/role_library.py | 85 | def _find_role_actual_category(self, role_name): | CODE |
| LOW | ui/role_library.py | 680 | def load_default_character_state(self, right_panel): | CODE |
| LOW | ui/role_library.py | 836 | def _check_role_name_conflict(self, new_name): | CODE |
| LOW | ui/role_library.py | 1118 | def _create_category_directory(self, category_name): | CODE |
| LOW | ui/role_library.py | 1365 | def _create_attribute_section(self, attr_name, items): | CODE |
| LOW | ui/role_library.py | 1488 | def _read_file_with_fallback_encoding(self, file_path): | CODE |
| LOW | novel_generator/chapter.py | 42 | def summarize_recent_chapters( | CODE |
| LOW | novel_generator/chapter.py | 116 | def extract_summary_from_response(response_text: str) -> str: | CODE |
| LOW | novel_generator/chapter.py | 218 | def get_filtered_knowledge_context( | CODE |
| LOW | novel_generator/vectorstore_utils.py | 144 | def split_text_for_vectorstore(chapter_text: str, max_length: int = 500, similarity_threshold: float = 0.7): | CODE |
| LOW | novel_generator/vectorstore_utils.py | 206 | def get_relevant_context_from_vector_store(embedding_adapter, query: str, filepath: str, k: int = 2) -> str: | CODE |
| LOW | novel_generator/vectorstore_utils.py | 231 | def _get_sentence_transformer(model_name: str = 'paraphrase-MiniLM-L6-v2'): | CODE |
| LOW | novel_generator/architecture.py | 22 | def load_partial_architecture_data(filepath: str) -> dict: | CODE |
| LOW⚡ | novel_generator/architecture.py | 38 | def save_partial_architecture_data(filepath: str, data: dict): | CODE |
| LOW | tests/test_common.py | 26 | def test_remove_think_tags_strips_reasoning_blocks(self): | CODE |
| LOW | tests/test_common.py | 31 | def test_invoke_with_cleaning_removes_think_tags_from_llm_output(self): | CODE |
| LOW | tests/test_chapter_directory_parser.py | 11 | def test_parses_adjacent_chinese_chapters_without_blank_lines(self): | CODE |
| LOW | tests/test_chapter_directory_parser.py | 38 | def test_parses_markdown_and_colon_style_chinese_output(self): | CODE |
| LOW | tests/test_chapter_directory_parser.py | 58 | def test_parses_english_chapter_blueprint(self): | CODE |
| LOW | tests/test_chapter_directory_parser.py | 79 | def test_returns_default_info_when_chapter_is_missing(self): | CODE |
| LOW | tests/test_text_utils.py | 20 | def test_fallback_splits_chinese_sentences_without_spaces(self): | CODE |
| LOW | tests/test_text_utils.py | 27 | def test_split_sentences_falls_back_when_nltk_is_unavailable(self): | CODE |
| LOW | tests/test_config_manager.py | 12 | def test_default_config_uses_current_model_presets(self): | CODE |
| LOW | tests/test_config_manager.py | 28 | def test_normalize_config_migrates_legacy_task_choices(self): | CODE |
| LOW | tests/test_config_manager.py | 51 | def test_config_example_has_valid_task_references(self): | CODE |
| LOW | tests/test_config_manager.py | 60 | def test_embedding_ui_options_match_supported_adapters(self): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | llm_adapters.py | 12 | CODE | |
| LOW | utils.py | 3 | CODE | |
| LOW | ui/main_window.py | 4 | CODE | |
| LOW | ui/main_window.py | 8 | CODE | |
| LOW | ui/main_window.py | 13 | CODE | |
| LOW | ui/main_window.py | 14 | CODE | |
| LOW | ui/main_window.py | 14 | CODE | |
| LOW | ui/main_window.py | 14 | CODE | |
| LOW | ui/main_window.py | 17 | CODE | |
| LOW | ui/main_window.py | 18 | CODE | |
| LOW | ui/main_window.py | 18 | CODE | |
| LOW | ui/main_window.py | 36 | CODE | |
| LOW | ui/novel_params_tab.py | 4 | CODE | |
| LOW | ui/generation_handlers.py | 5 | CODE | |
| LOW | ui/generation_handlers.py | 8 | CODE | |
| LOW | ui/__init__.py | 2 | CODE | |
| LOW | ui/main_tab.py | 4 | CODE | |
| LOW | ui/role_library.py | 10 | CODE | |
| LOW | novel_generator/chapter.py | 7 | CODE | |
| LOW | novel_generator/vectorstore_utils.py | 9 | CODE | |
| LOW | novel_generator/vectorstore_utils.py | 182 | CODE | |
| LOW | novel_generator/vectorstore_utils.py | 182 | CODE | |
| LOW | novel_generator/vectorstore_utils.py | 182 | CODE | |
| LOW | novel_generator/__init__.py | 2 | CODE | |
| LOW | novel_generator/__init__.py | 3 | CODE | |
| LOW | novel_generator/__init__.py | 4 | CODE | |
| LOW | novel_generator/__init__.py | 4 | CODE | |
| LOW | novel_generator/__init__.py | 4 | CODE | |
| LOW | novel_generator/__init__.py | 4 | CODE | |
| LOW | novel_generator/__init__.py | 4 | CODE | |
| LOW | novel_generator/__init__.py | 11 | CODE | |
| LOW | novel_generator/__init__.py | 11 | CODE | |
| LOW | novel_generator/__init__.py | 12 | CODE | |
| LOW | novel_generator/__init__.py | 13 | CODE | |
| LOW | novel_generator/architecture.py | 9 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | llm_adapters.py | 392 | CODE | |
| LOW | config_manager.py | 244 | CODE | |
| LOW | embedding_adapters.py | 284 | CODE | |
| LOW | ui/main_window.py | 275 | CODE | |
| LOW | ui/main_window.py | 389 | CODE | |
| LOW | ui/other_settings.py | 284 | CODE | |
| LOW | ui/generation_handlers.py | 123 | CODE | |
| LOW | ui/generation_handlers.py | 462 | CODE | |
| LOW | ui/generation_handlers.py | 720 | CODE | |
| LOW | ui/generation_handlers.py | 129 | CODE | |
| LOW | ui/generation_handlers.py | 551 | CODE | |
| LOW | ui/generation_handlers.py | 726 | CODE | |
| LOW | ui/generation_handlers.py | 187 | CODE | |
| LOW | ui/config_tab.py | 483 | CODE | |
| LOW | ui/config_tab.py | 484 | CODE | |
| LOW | ui/role_library.py | 403 | CODE | |
| LOW | ui/role_library.py | 503 | CODE | |
| LOW | ui/role_library.py | 525 | CODE | |
| LOW | ui/role_library.py | 720 | CODE | |
| LOW | ui/role_library.py | 810 | CODE | |
| LOW | ui/role_library.py | 836 | CODE | |
| LOW | ui/role_library.py | 906 | CODE | |
| LOW | ui/role_library.py | 1176 | CODE | |
| LOW | ui/role_library.py | 1238 | CODE | |
| LOW | ui/role_library.py | 1289 | CODE | |
| LOW | ui/role_library.py | 1451 | CODE | |
| LOW | ui/role_library.py | 1488 | CODE | |
| LOW | ui/role_library.py | 1204 | CODE | |
| LOW | novel_generator/chapter.py | 176 | CODE | |
| LOW | novel_generator/chapter.py | 285 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | novel_generator/vectorstore_utils.py | 76 | CODE | |
| LOW | novel_generator/vectorstore_utils.py | 119 | CODE |