Skip to content

Commit 132f218

Browse files
Merge development: C3.10 Signal Flow Analysis + Complete Godot Support + PR #278
Major Release Content (v2.8.1 / v2.9.0): 🎮 C3.10: Signal Flow Analysis - 208 signals, 634 connections, 298 emissions analyzed - EventBus, Observer, and Event Chain pattern detection - Signal-based how-to guides generation - New signal_flow_analyzer.py (450+ lines) 🎮 Complete Godot Game Engine Support - GDScript (.gd), Scene (.tscn), Resource (.tres), Shader (.gdshader) - 265 GDScript files, 118 scenes, 38 resources analyzed - GUT/gdUnit4/WAT test framework support - 396 test cases from 20 test files extracted 📚 C3.9: Project Documentation Extraction (from PR #278) - Markdown file extraction and categorization - Smart categorization (overview, architecture, guides) - 96 markdown files processed in test project ⚡ Performance & UX (from PR #278) - Parallel LOCAL mode (6-12x faster) - --enhance-level flag (0-3 granular control) - Auto-enhancement workflow - LOCAL mode fallback 🐛 Godot-Specific Fixes: - GDScript dependency extraction (265+ syntax errors eliminated) - Framework detection false positive (Unity → Godot) - Circular dependencies (self-loops filtered) - Test discovery (0 → 32 test files) - Config array handling, progress indicators 📊 Quality Metrics: - SKILL.md: 31KB, 1,030 lines, 9/10 quality rating - 98% file coverage (443/452 files) - All tests passing on macOS (Ubuntu runners stuck due to GitHub infra) Co-authored-by: PR #278 contributors
2 parents 5c4b176 + 2d64a2b commit 132f218

16 files changed

Lines changed: 1574 additions & 157 deletions

CHANGELOG.md

Lines changed: 104 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,59 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10-
---
11-
12-
## [2.8.0] - 2026-02-01
13-
14-
### 🚀 Major Feature Release - Enhanced Code Analysis & Documentation
15-
16-
This release brings powerful new code analysis features, performance optimizations, and international API support. Special thanks to all our contributors who made this release possible!
17-
1810
### Added
1911

12+
#### C3.10: Signal Flow Analysis for Godot Projects (NEW)
13+
- **Complete Signal Flow Analysis System**: Analyze event-driven architectures in Godot game projects
14+
- Signal declaration extraction (`signal` keyword detection)
15+
- Connection mapping (`.connect()` calls with targets and methods)
16+
- Emission tracking (`.emit()` and `emit_signal()` calls)
17+
- **208 signals**, **634 connections**, and **298 emissions** detected in test project (Cosmic Idler)
18+
- Signal density metrics (signals per file)
19+
- Event chain detection (signals triggering other signals)
20+
- Output: `signal_flow.json`, `signal_flow.mmd` (Mermaid diagram), `signal_reference.md`
21+
22+
- **Signal Pattern Detection**: Three major patterns identified
23+
- **EventBus Pattern** (0.90 confidence): Centralized signal hub in autoload
24+
- **Observer Pattern** (0.85 confidence): Multi-observer signals (3+ listeners)
25+
- **Event Chains** (0.80 confidence): Cascading signal propagation
26+
27+
- **Signal-Based How-To Guides (C3.10.1)**: AI-generated usage guides
28+
- Step-by-step guides (Connect → Emit → Handle)
29+
- Real code examples from project
30+
- Common usage locations
31+
- Parameter documentation
32+
- Output: `signal_how_to_guides.md` (10 guides for Cosmic Idler)
33+
34+
#### Godot Game Engine Support
35+
- **Comprehensive Godot File Type Support**: Full analysis of Godot 4.x projects
36+
- **GDScript (.gd)**: 265 files analyzed in test project
37+
- **Scene files (.tscn)**: 118 scene files
38+
- **Resource files (.tres)**: 38 resource files
39+
- **Shader files (.gdshader, .gdshaderinc)**: 9 shader files
40+
- **C# integration**: Phantom Camera addon (13 files)
41+
42+
- **GDScript Language Support**: Complete GDScript parsing with regex-based extraction
43+
- Dependency extraction: `preload()`, `load()`, `extends` patterns
44+
- Test framework detection: GUT, gdUnit4, WAT
45+
- Test file patterns: `test_*.gd`, `*_test.gd`
46+
- Signal syntax: `signal`, `.connect()`, `.emit()`
47+
- Export decorators: `@export`, `@onready`
48+
- Test decorators: `@test` (gdUnit4)
49+
50+
- **Game Engine Framework Detection**: Improved detection for Unity, Unreal, Godot
51+
- **Godot markers**: `project.godot`, `.godot` directory, `.tscn`, `.tres`, `.gd` files
52+
- **Unity markers**: `Assembly-CSharp.csproj`, `UnityEngine.dll`, `ProjectSettings/ProjectVersion.txt`
53+
- **Unreal markers**: `.uproject`, `Source/`, `Config/DefaultEngine.ini`
54+
- Fixed false positive Unity detection (was using generic "Assets" keyword)
55+
56+
- **GDScript Test Extraction**: Extract usage examples from Godot test files
57+
- **396 test cases** extracted from 20 GUT test files in test project
58+
- Patterns: instantiation (`preload().new()`, `load().new()`), assertions (`assert_eq`, `assert_true`), signals
59+
- GUT framework: `extends GutTest`, `func test_*()`, `add_child_autofree()`
60+
- Test categories: instantiation, assertions, signal connections, setup/teardown
61+
- Real code examples from production test files
62+
2063
#### C3.9: Project Documentation Extraction
2164
- **Markdown Documentation Extraction**: Automatically extracts and categorizes all `.md` files from projects
2265
- Smart categorization by folder/filename (overview, architecture, guides, workflows, features, etc.)
@@ -74,7 +117,7 @@ This release brings powerful new code analysis features, performance optimizatio
74117
- Updated documentation with GLM-4.7 configuration examples
75118
- Rewritten LOCAL mode in `config_enhancer.py` to use Claude CLI properly with explicit output file paths
76119
- Updated MCP `scrape_codebase_tool` with `skip_docs` and `enhance_level` parameters
77-
- Updated CLAUDE.md with C3.9 documentation extraction feature and --enhance-level flag
120+
- Updated CLAUDE.md with C3.9 documentation extraction feature
78121
- Increased default batch size from 5 to 20 patterns for LOCAL mode
79122

80123
### Fixed
@@ -83,18 +126,60 @@ This release brings powerful new code analysis features, performance optimizatio
83126
- **LocalSkillEnhancer Import**: Fixed incorrect import and method call in `main.py` (SkillEnhancer → LocalSkillEnhancer)
84127
- **Code Quality**: Fixed 4 critical linter errors (unused imports, variables, arguments, import sorting)
85128

86-
### Removed
87-
- Removed client-specific documentation files from repository
88-
89-
### 🙏 Contributors
90-
91-
A huge thank you to everyone who contributed to this release:
129+
#### Godot Game Engine Fixes
130+
- **GDScript Dependency Extraction**: Fixed 265+ "Syntax error in *.gd" warnings (commit 3e6c448)
131+
- GDScript files were incorrectly routed to Python AST parser
132+
- Created dedicated `_extract_gdscript_imports()` with regex patterns
133+
- Now correctly parses `preload()`, `load()`, `extends` patterns
134+
- Result: 377 dependencies extracted with 0 warnings
135+
136+
- **Framework Detection False Positive**: Fixed Unity detection on Godot projects (commit 50b28fe)
137+
- Was detecting "Unity" due to generic "Assets" keyword in comments
138+
- Changed Unity markers to specific files: `Assembly-CSharp.csproj`, `UnityEngine.dll`, `Library/`
139+
- Now correctly detects Godot via `project.godot`, `.godot` directory
140+
141+
- **Circular Dependencies**: Fixed self-referential cycles (commit 50b28fe)
142+
- 3 self-loop warnings (files depending on themselves)
143+
- Added `target != file_path` check in dependency graph builder
144+
- Result: 0 circular dependencies detected
145+
146+
- **GDScript Test Discovery**: Fixed 0 test files found in Godot projects (commit 50b28fe)
147+
- Added GDScript test patterns: `test_*.gd`, `*_test.gd`
148+
- Added GDScript to LANGUAGE_MAP
149+
- Result: 32 test files discovered (20 GUT files with 396 tests)
150+
151+
- **GDScript Test Extraction**: Fixed "Language GDScript not supported" warning (commit c826690)
152+
- Added GDScript regex patterns to PATTERNS dictionary
153+
- Patterns: instantiation (`preload().new()`), assertions (`assert_eq`), signals (`.connect()`)
154+
- Result: 22 test examples extracted successfully
155+
156+
- **Config Extractor Array Handling**: Fixed JSON/YAML array parsing (commit fca0951)
157+
- Error: `'list' object has no attribute 'items'` on root-level arrays
158+
- Added isinstance checks for dict/list/primitive at root
159+
- Result: No JSON array errors, save.json parsed correctly
160+
161+
- **Progress Indicators**: Fixed missing progress for small batches (commit eec37f5)
162+
- Progress only shown every 5 batches, invisible for small jobs
163+
- Modified condition to always show for batches < 10
164+
- Result: "Progress: 1/2 batches completed" now visible
165+
166+
#### Other Fixes
167+
- **C# Test Extraction**: Fixed "Language C# not supported" error with language alias mapping
168+
- **Config Type Field Mismatch**: Fixed KeyError in `config_enhancer.py` by supporting both "type" and "config_type" fields
169+
- **LocalSkillEnhancer Import**: Fixed incorrect import and method call in `main.py` (SkillEnhancer → LocalSkillEnhancer)
170+
- **Code Quality**: Fixed 4 critical linter errors (unused imports, variables, arguments, import sorting)
92171

93-
- **[@xuintl](https://github.com/xuintl)** - Chinese README improvements and documentation refinements
94-
- **[@Zhichang Yu](https://github.com/yuzhichang)** - GLM-4.7 support and PDF scraper fixes
95-
- **[@YusufKaraaslanSpyke](https://github.com/yusufkaraaslan)** - Core features, bug fixes, and project maintenance
172+
### Tests
173+
- **GDScript Test Extraction Test**: Added comprehensive test case for GDScript GUT/gdUnit4 framework
174+
- Tests player instantiation with `preload()` and `load()`
175+
- Tests signal connections and emissions
176+
- Tests gdUnit4 `@test` annotation syntax
177+
- Tests game state management patterns
178+
- 4 test functions with 60+ lines of GDScript code
179+
- Validates extraction of instantiations, assertions, and signal patterns
96180

97-
Special thanks to all our community members who reported issues, provided feedback, and helped test new features. Your contributions make Skill Seekers better for everyone! 🎉
181+
### Removed
182+
- Removed client-specific documentation files from repository
98183

99184
---
100185

CLAUDE.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,27 @@ skill-seekers analyze --directory . --comprehensive
292292
# With AI enhancement (auto-detects API or LOCAL)
293293
skill-seekers analyze --directory . --enhance
294294

295+
# Granular AI enhancement control (NEW)
296+
skill-seekers analyze --directory . --enhance-level 1 # SKILL.md only
297+
skill-seekers analyze --directory . --enhance-level 2 # + Architecture + Config + Docs
298+
skill-seekers analyze --directory . --enhance-level 3 # Full enhancement (all features)
299+
295300
# Disable specific features
296301
skill-seekers analyze --directory . --skip-patterns --skip-how-to-guides
297302
```
298303

299304
- Generates 300+ line standalone SKILL.md files from codebases
300305
- All C3.x features integrated (patterns, tests, guides, config, architecture, docs)
301306
- Complete codebase analysis without documentation scraping
307+
- **NEW**: Granular AI enhancement control with `--enhance-level` (0-3)
308+
309+
**C3.9 Project Documentation Extraction** (`codebase_scraper.py`):
310+
- Extracts and categorizes all markdown files from the project
311+
- Auto-detects categories: overview, architecture, guides, workflows, features, etc.
312+
- Integrates documentation into SKILL.md with summaries
313+
- AI enhancement (level 2+) adds topic extraction and cross-references
314+
- Controlled by depth: surface=raw copy, deep=parse+summarize, full=AI-enhanced
315+
- Default ON, use `--skip-docs` to disable
302316

303317
**C3.9 Project Documentation Extraction** (`codebase_scraper.py`):
304318
- Extracts and categorizes all markdown files from the project

src/skill_seekers/cli/ai_enhancer.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
# Import config manager for settings
3737
try:
3838
from skill_seekers.cli.config_manager import get_config_manager
39-
4039
CONFIG_AVAILABLE = True
4140
except ImportError:
4241
CONFIG_AVAILABLE = False
@@ -108,9 +107,7 @@ def __init__(self, api_key: str | None = None, enabled: bool = True, mode: str =
108107
logger.warning("⚠️ anthropic package not installed, falling back to LOCAL mode")
109108
self.mode = "local"
110109
except Exception as e:
111-
logger.warning(
112-
f"⚠️ Failed to initialize API client: {e}, falling back to LOCAL mode"
113-
)
110+
logger.warning(f"⚠️ Failed to initialize API client: {e}, falling back to LOCAL mode")
114111
self.mode = "local"
115112

116113
if self.mode == "local" and self.enabled:
@@ -215,8 +212,7 @@ def _call_claude_local(self, prompt: str) -> str | None:
215212
except json.JSONDecodeError:
216213
# Try to find JSON in the response
217214
import re
218-
219-
json_match = re.search(r"\[[\s\S]*\]|\{[\s\S]*\}", response_text)
215+
json_match = re.search(r'\[[\s\S]*\]|\{[\s\S]*\}', response_text)
220216
if json_match:
221217
return json_match.group()
222218
logger.warning("⚠️ Could not parse JSON from LOCAL response")
@@ -302,7 +298,8 @@ def _enhance_patterns_parallel(self, batches: list[list[dict]], workers: int) ->
302298
try:
303299
results[idx] = future.result()
304300
completed += 1
305-
if completed % 5 == 0 or completed == total:
301+
# Show progress: always for small jobs (<10), every 5 for larger jobs
302+
if total < 10 or completed % 5 == 0 or completed == total:
306303
logger.info(f" Progress: {completed}/{total} batches completed")
307304
except Exception as e:
308305
logger.warning(f"⚠️ Batch {idx} failed: {e}")
@@ -439,7 +436,8 @@ def _enhance_examples_parallel(self, batches: list[list[dict]], workers: int) ->
439436
try:
440437
results[idx] = future.result()
441438
completed += 1
442-
if completed % 5 == 0 or completed == total:
439+
# Show progress: always for small jobs (<10), every 5 for larger jobs
440+
if total < 10 or completed % 5 == 0 or completed == total:
443441
logger.info(f" Progress: {completed}/{total} batches completed")
444442
except Exception as e:
445443
logger.warning(f"⚠️ Batch {idx} failed: {e}")

src/skill_seekers/cli/architectural_pattern_detector.py

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ class ArchitecturalPatternDetector:
8888

8989
# Framework detection patterns
9090
FRAMEWORK_MARKERS = {
91+
# Game Engines (checked first to avoid false positives)
92+
"Unity": ["Assembly-CSharp.csproj", "UnityEngine.dll", "ProjectSettings/ProjectVersion.txt", ".unity", "Library/"],
93+
"Unreal": ["Source/", ".uproject", "Config/DefaultEngine.ini", "Binaries/", "Content/"],
94+
"Godot": ["project.godot", ".godot", ".tscn", ".tres", ".gd"],
95+
# Web Frameworks
9196
"Django": ["django", "manage.py", "settings.py", "urls.py"],
9297
"Flask": ["flask", "app.py", "wsgi.py"],
9398
"Spring": ["springframework", "@Controller", "@Service", "@Repository"],
@@ -181,17 +186,48 @@ def _analyze_directory_structure(self, directory: Path) -> dict[str, int]:
181186

182187
return dict(structure)
183188

184-
def _detect_frameworks(self, _directory: Path, files: list[dict]) -> list[str]:
189+
def _detect_frameworks(self, directory: Path, files: list[dict]) -> list[str]:
185190
"""Detect frameworks being used"""
186191
detected = []
187192

188-
# Check file paths and content
193+
# Check file paths from analyzed files
189194
all_paths = [str(f.get("file", "")) for f in files]
190195
all_content = " ".join(all_paths)
191196

197+
# Also check actual directory structure for game engine markers
198+
# (project.godot, .unity, .uproject are config files, not in analyzed files)
199+
dir_files = []
200+
try:
201+
# Get all files and directories in the root (non-recursive for performance)
202+
for item in directory.iterdir():
203+
dir_files.append(item.name)
204+
except Exception as e:
205+
logger.warning(f"Could not scan directory for framework markers: {e}")
206+
207+
dir_content = " ".join(dir_files)
208+
209+
# Check game engines FIRST (priority detection)
210+
for framework in ["Unity", "Unreal", "Godot"]:
211+
if framework in self.FRAMEWORK_MARKERS:
212+
markers = self.FRAMEWORK_MARKERS[framework]
213+
# Check both analyzed files AND directory structure
214+
file_matches = sum(1 for marker in markers if marker.lower() in all_content.lower())
215+
dir_matches = sum(1 for marker in markers if marker.lower() in dir_content.lower())
216+
total_matches = file_matches + dir_matches
217+
218+
if total_matches >= 2:
219+
detected.append(framework)
220+
logger.info(f" 📦 Detected framework: {framework}")
221+
# Return early to prevent web framework false positives
222+
return detected
223+
224+
# Check other frameworks
192225
for framework, markers in self.FRAMEWORK_MARKERS.items():
226+
if framework in ["Unity", "Unreal", "Godot"]:
227+
continue # Already checked
228+
193229
matches = sum(1 for marker in markers if marker.lower() in all_content.lower())
194-
if matches >= 2: # Require at least 2 markers
230+
if matches >= 2:
195231
detected.append(framework)
196232
logger.info(f" 📦 Detected framework: {framework}")
197233

0 commit comments

Comments
 (0)