Commit Graph

414 Commits

Author SHA1 Message Date
yusyus
3e6c448aca fix: Add GDScript-specific dependency extraction to eliminate syntax errors
PROBLEM:
- 265+ "Syntax error in *.gd" warnings during analysis
- GDScript files were routed to Python AST parser (_extract_python_imports)
- Python AST failed because GDScript syntax differs (extends, signal, @export)

SOLUTION:
- Created dedicated _extract_gdscript_imports() method using regex
- Parses GDScript-specific patterns:
  * const/var = preload("res://path")
  * const/var = load("res://path")
  * extends "res://path/to/base.gd"
  * extends MyBaseClass (with built-in Godot class filtering)
- Converts res:// paths to relative paths
- Routes GDScript files to new extractor instead of Python AST

CHANGES:
- dependency_analyzer.py (line 114-116): Route GDScript to new extractor
- dependency_analyzer.py (line 201-318): Add _extract_gdscript_imports()
- Updated module docstring: 9 → 10 languages + Godot ecosystem
- Updated analyze_file() docstring with GDScript support

IMPACT:
- Eliminates all 265+ syntax error warnings
- Correctly extracts GDScript dependencies (preload/load/extends)
- Completes C3.10 Signal Flow Analysis integration

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 21:56:42 +03:00
yusyus
1831c1bb47 feat: Add Signal-Based How-To Guides (C3.10.1) - Complete C3.10
Final piece of Signal Flow Analysis - AI-generated tutorial guides:

## Signal-Based How-To Guides (C3.10.1)
Completes the 5th and final proposed feature for C3.10.

### Implementation
Added to SignalFlowAnalyzer class:
- extract_signal_usage_patterns(): Identifies top 10 most-used signals
- generate_how_to_guides(): Creates tutorial-style guides
- _generate_signal_guide(): Builds structured guide for each signal

### Guide Structure (3-Step Pattern)
Each guide includes:
1. **Step 1: Connect to the signal**
   - Code example with actual handler names from codebase
   - File context (which file to add connection in)

2. **Step 2: Emit the signal**
   - Code example with actual parameters from codebase
   - File context (where emission happens)

3. **Step 3: Handle the signal**
   - Function implementation template
   - Proper parameter handling

4. **Common Usage Locations**
   - Connected in: file.gd → handler()
   - Emitted from: file.gd

### Output
Generates signal_how_to_guides.md with:
- Table of Contents (10 signals)
- Tutorial guide for each signal
- Real code examples extracted from codebase
- Actual file locations and handler names

### Test Results (Cosmic Ideler)
Generated guides for 10 most-used signals:
- camera_3d_resource_property_changed (most used)
- changed
- wait_started
- dead_zone_changed
- display_refresh_needed
- pressed
- pcam_priority_override
- dead_zone_reached
- noise_emitted
- viewfinder_update

File: signal_how_to_guides.md (6.1KB)

## C3.10 Status: 5/5 Features Complete 

1.  Signal Connection Mapping (634 connections tracked)
2.  Event-Driven Architecture Detection (3 patterns)
3.  Signal Flow Visualization (Mermaid diagrams)
4.  Signal Documentation Extraction (docs in reference)
5.  Signal-Based How-To Guides (10 tutorials) - NEW

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 21:48:55 +03:00
yusyus
281f6f7916 feat: Add Signal Flow Analysis (C3.10) and Test Framework Detection
Comprehensive Godot signal analysis and test framework support:

## Signal Flow Analysis (C3.10)
Enhanced GDScript analyzer to extract:
- Signal declarations with documentation comments
- Signal connections (.connect() calls)
- Signal emissions (.emit() calls)
- Signal flow chains (source → signal → handler)

Created SignalFlowAnalyzer class:
- Analyzes 208 signals, 634 connections, 298 emissions (Cosmic Ideler)
- Detects event patterns:
  - EventBus Pattern (centralized event system)
  - Observer Pattern (multi-connected signals)
  - Event Chains (cascading signal emissions)
- Generates:
  - signal_flow.json (full analysis data)
  - signal_flow.mmd (Mermaid diagram)
  - signal_reference.md (human-readable docs)

Statistics:
- Signal density calculation (signals per file)
- Most connected signals ranking
- Most emitted signals ranking

## Test Framework Detection
Added support for 3 Godot test frameworks:
- **GUT** (Godot Unit Test) - extends GutTest, test_* functions
- **gdUnit4** - @suite and @test annotations
- **WAT** (WizAds Test) - extends WAT.Test

Detection results (Cosmic Ideler):
- 20 GUT test files
- 396 test cases detected

## Integration
Updated codebase_scraper.py:
- Signal flow analysis runs automatically for Godot projects
- Test framework detection integrated into code analysis
- SKILL.md shows signal statistics and test framework info
- New section: 📡 Signal Flow Analysis (C3.10)

## Results (Tested on Cosmic Ideler)
- 443/452 files analyzed (98%)
- 208 signals documented
- 634 signal connections mapped
- 298 signal emissions tracked
- 3 event patterns detected (EventBus, Observer, Event Chains)
- 20 GUT test files found with 396 test cases

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 21:44:26 +03:00
yusyus
b252f43d0e feat: Add comprehensive Godot file type support
Complete support for all Godot file types:
- GDScript (.gd) - Regex-based parser for Godot-specific syntax
- Godot Scenes (.tscn) - Node hierarchy and script attachments
- Godot Resources (.tres) - Properties and dependencies
- Godot Shaders (.gdshader) - Uniforms and shader functions

Implementation details:
- Added 4 new analyzer methods to CodeAnalyzer class
  - _analyze_gdscript(): Functions, signals, @export vars, class_name
  - _analyze_godot_scene(): Node hierarchy, scripts, resources
  - _analyze_godot_resource(): Resource type, properties, script refs
  - _analyze_godot_shader(): Shader type, uniforms, varyings, functions

- Updated dependency_analyzer.py
  - Added _extract_godot_resources() for ext_resource and preload()
  - Fixed DependencyInfo calls (removed invalid 'alias' parameter)

- Updated codebase_scraper.py
  - Added Godot file extensions to LANGUAGE_EXTENSIONS
  - Extended content filter to accept Godot-specific keys
    (nodes, properties, uniforms, signals, exports)

Tested on Cosmic Ideler Godot project:
- 443/452 files successfully analyzed (98%)
- 265 GDScript, 118 .tscn, 38 .tres, 9 .gdshader, 13 .cs

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 21:36:56 +03:00
yusyus
583a774b00 feat: Add GDScript (.gd) language support for Godot projects
**Problem:**
Godot projects with 267 GDScript files were only analyzing 13 C# files,
missing 95%+ of the codebase.

**Changes:**
1. Added `.gd` → "GDScript" to LANGUAGE_EXTENSIONS mapping
2. Added GDScript support to code_analyzer.py (uses Python AST parser)
3. Added GDScript support to dependency_analyzer.py (uses Python import extraction)

**Known Limitation:**
GDScript has syntax differences from Python (extends, @export, signals, etc.)
so Python AST parser may fail on some files. Future enhancement needed:
- Create GDScript-specific regex-based parser
- Handle Godot-specific keywords (extends, signal, @export, preload, etc.)

**Test Results:**
Before: 13 files analyzed (C# only)
After:  280 files detected (13 C# + 267 GDScript)
Status: GDScript files detected but analysis may fail due to syntax differences

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 21:22:51 +03:00
yusyus
6fe3e48b8a fix: Framework detection now checks directory structure for game engines
**Problem:**
Framework detection only checked analyzed source files, missing game
engine marker files like project.godot, .unity, .uproject (config files).

**Root Cause:**
_detect_frameworks() only scanned files_analysis list which contains
source code (.cs, .py, .js) but not config files.

**Solution:**
- Now scans actual directory structure using directory.iterdir()
- Checks BOTH analyzed files AND directory contents
- Game engines checked FIRST with priority (prevents false positives)
- Returns early if game engine found (avoids Unity→ASP.NET confusion)

**Test Results:**
Before: frameworks_detected: []
After:  frameworks_detected: ["Godot"] 

Tested with: Cosmic Ideler (Godot 4.6 RC2 project)
- Correctly detects project.godot file
- No longer requires source code to have "godot" in paths

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 21:20:17 +03:00
yusyus
32e080da1f feat: Complete Unity/game engine support and local source type validation
Completes the implementation for Unity/Unreal/Godot game engine support
and adds missing "local" source type validation.

Changes:
- Add "local" to VALID_SOURCE_TYPES in config_validator.py
- Add _validate_local_source() method with full validation
- Add Unity/Unreal/Godot to FRAMEWORK_MARKERS for priority detection
- Add game engine directory exclusions to all 3 scrapers:
  * Unity: Library/, Temp/, Logs/, UserSettings/, etc.
  * Unreal: Intermediate/, Saved/, DerivedDataCache/
  * Godot: .godot/, .import/
- Prevents scanning massive build cache directories (saves GBs + hours)

This completes all features mentioned in PR #278:
 Unity/Unreal/Godot framework detection with priority
 Pattern enhancement performance fix (grouped approach)
 Game engine directory exclusions
 Phase 5 SKILL.md AI enhancement
 Local source references copying
 "local" source type validation
 Config field name compatibility
 C# test example extraction

Tested:
- All unified config tests pass (18/18)
- All config validation tests pass (28/28)
- Ready for Unity project testing

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 21:06:01 +03:00
yusyus
03ac78173b chore: Remove client-specific docs, fix linter errors, update documentation
- Remove SPYKE-related client documentation files
- Fix critical ruff linter errors:
  - Remove unused 'os' import in test_analyze_e2e.py
  - Remove unused 'setups' variable in test_test_example_extractor.py
  - Prefix unused output_dir parameter with underscore in codebase_scraper.py
  - Fix import sorting in test_integration.py
- Update CHANGELOG.md with comprehensive C3.9 and enhancement features
- Update CLAUDE.md with --enhance-level documentation

All critical code quality issues resolved.
2026-01-31 14:38:15 +03:00
YusufKaraaslanSpyke
170dd0fd75 feat(C3.9): Add project documentation extraction from markdown files
- Scan ALL .md files in project (README, docs/, etc.)
- Smart categorization by folder/filename (overview, architecture, guides, etc.)
- Processing depth: surface=raw copy, deep=parse+summarize, full=AI-enhanced
- AI enhancement at level 2+ adds topic extraction and cross-references
- New "Project Documentation" section in SKILL.md with summaries
- Output to references/documentation/ organized by category
- Default ON, use --skip-docs to disable
- Add skip_docs parameter to MCP scrape_codebase_tool
- Add 15 new tests for markdown documentation features

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 13:54:56 +03:00
YusufKaraaslanSpyke
4cfb94e14f feat: Add default_enhance_level to config system
- Add default_enhance_level setting (default: 1 = SKILL.md only)
- --enhance flag now uses config default instead of hardcoded 1
- Show enhance level in config --show output

Users can change default via config file:
~/.config/skill-seekers/config.json
  "ai_enhancement": {
    "default_enhance_level": 2,
    ...
  }

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:45:46 +03:00
YusufKaraaslanSpyke
3abdf2d1f0 feat: Update MCP scrape_codebase_tool with enhance-level support
- Add enhance_level parameter (0-3) for granular AI control
- Add skip_* parameters for feature control (skip_patterns, skip_test_examples, etc.)
- Remove deprecated --build-* flags (features are now ON by default)
- Adjust timeout based on enhance_level (10min base, up to 60min for level 3)
- Update documentation with examples

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:43:46 +03:00
YusufKaraaslanSpyke
e953fc6276 fix: Correct LocalSkillEnhancer import and method call
- Fix import: SkillEnhancer → LocalSkillEnhancer
- Fix method: enhance() → run(headless=True, timeout=600)
- Fix constructor: pass force=True separately

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:39:11 +03:00
YusufKaraaslanSpyke
d7aa34a3af feat: Add --enhance-level for granular AI enhancement control
Levels:
- 0 (off): No AI enhancement (default)
- 1 (minimal): SKILL.md enhancement only (fast, high value)
- 2 (standard): SKILL.md + Architecture + Config enhancement
- 3 (full): Everything including patterns and test examples

--comprehensive and --enhance-level are INDEPENDENT:
- --comprehensive: Controls depth and features (full depth + all features)
- --enhance-level: Controls AI enhancement level

Usage examples:
  skill-seekers analyze --directory . --enhance-level 1  # SKILL.md AI only
  skill-seekers analyze --directory . --enhance          # Same as level 1
  skill-seekers analyze --directory . --comprehensive    # All features, no AI
  skill-seekers analyze --directory . --comprehensive --enhance-level 2  # All features + standard AI

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:32:07 +03:00
YusufKaraaslanSpyke
b8b5e9d6ef perf: Optimize LOCAL mode AI enhancement with parallel execution
- Increase default batch size from 5 to 20 patterns per CLI call
- Add parallel execution with 3 concurrent workers (configurable)
- Add ai_enhancement settings to config_manager:
  - local_batch_size: patterns per Claude CLI call (default: 20)
  - local_parallel_workers: concurrent CLI calls (default: 3)
- Expected speedup: 6-12x faster for large codebases

Config settings can be changed via:
  skill-seekers config (coming soon) or editing ~/.config/skill-seekers/config.json

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 14:07:20 +03:00
YusufKaraaslanSpyke
8a0c1f5fc6 feat: Add LOCAL mode fallback for all AI enhancements
When no ANTHROPIC_API_KEY is set, ai_enhancer.py now falls back to LOCAL
mode (Claude Code CLI) instead of disabling AI enhancement entirely.

Changes to AIEnhancer base class:
- AUTO mode now falls back to LOCAL instead of disabling
- Added _check_claude_cli() to verify Claude CLI is available
- Added _call_claude_local() method using Claude Code CLI
- Refactored _call_claude() to dispatch to API or LOCAL mode
- 2 minute timeout per LOCAL call (reasonable for batch processing)

This affects all AI enhancements:
- Design pattern enhancement (C3.1) → LOCAL fallback 
- Test example enhancement (C3.2) → LOCAL fallback 
- Architectural analysis (C3.7) → LOCAL fallback 

Before (bad UX):
  ℹ️  AI enhancement disabled (no API key found)

After (good UX):
  ℹ️  No API key found, using LOCAL mode (Claude Code CLI)
   AI enhancement enabled (using LOCAL mode - Claude Code CLI)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:15:54 +03:00
YusufKaraaslanSpyke
a8372b8f9d feat: Auto-enhance SKILL.md when --enhance or --comprehensive flag is used
UX improvement: When running `skill-seekers analyze --enhance` or
`skill-seekers analyze --comprehensive`, the SKILL.md is now automatically
enhanced as the final step. No need for a separate `skill-seekers enhance`
command.

Changes:
- After analyze_main() completes successfully, check if --enhance or
  --comprehensive was used
- If SKILL.md exists, automatically run SkillEnhancer in headless mode
- Use force=True to skip all prompts (consistent with --comprehensive UX)
- 10 minute timeout for large codebases
- Graceful fallback with retry instructions if enhancement fails

Before (bad UX):
  skill-seekers analyze --directory /path --enhance
  # Then separately:
  skill-seekers enhance output/codebase/

After (good UX):
  skill-seekers analyze --directory /path --enhance
  # Everything done in one command!

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 11:07:33 +03:00
YusufKaraaslanSpyke
22e2edbc7f fix: Rewrite config_enhancer LOCAL mode to use Claude CLI properly
The previous implementation had a design flaw - it ran `claude prompt_file`
and expected Claude to magically create a JSON file in a temp directory.
This never worked because Claude CLI is interactive and doesn't auto-save.

Changes:
- Use `--dangerously-skip-permissions` flag to bypass permission prompts
- Create a dedicated temp directory for each enhancement session
- Embed absolute output file path in the prompt so Claude knows where to write
- Run Claude from the temp directory as working_dir
- Improved prompt with explicit Write tool instruction
- Better error handling and logging (file not found, JSON parse errors)
- Show settings preview in prompt for better AI context

The LOCAL mode now follows the same pattern as enhance_skill_local.py
which works correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 10:48:49 +03:00
YusufKaraaslanSpyke
be2353cf2f fix: Add C# test example extraction and fix config_type field mismatch
Bug fixes:
- Fix KeyError in config_enhancer.py where "config_type" was expected but
  config_extractor saves as "type". Now supports both field names for
  backward compatibility.
- Fix settings "value_type" vs "type" mismatch in the same file.

New features:
- Add C# support for regex-based test example extraction
- Add language alias mapping (C# -> csharp, C++ -> cpp)
- Enhanced C# patterns for NUnit, xUnit, MSTest test frameworks
- Support for mock patterns (NSubstitute, Moq)
- Support for Zenject dependency injection patterns
- Support for setup/teardown method extraction

Tests:
- Add 2 new C# test extraction tests (NUnit tests, mock patterns)
- All 1257 tests pass (165 skipped)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 10:12:45 +03:00
yusyus
5a78522dbc docs: Update all documentation to use new 'analyze' command
- Update Chinese README (README.zh-CN.md) with new preset flags
- Update docs/features/*.md (PATTERN_DETECTION, HOW_TO_GUIDES, BOOTSTRAP_SKILL_TECHNICAL)
- Update scripts/bootstrap_skill.sh to use 'skill-seekers analyze'
- Update scripts/skill_header.md command examples
- Update tests/test_bootstrap_skill.py assertions
- Fix CHANGELOG.md historical entry with correct command name

All references to 'skill-seekers-codebase' updated to 'skill-seekers analyze'
except where needed for backward compatibility (pyproject.toml, E2E tests).

Related to Phase 1 implementation from previous commits.
2026-01-29 22:56:33 +03:00
yusyus
41fdafa13d test: Add comprehensive E2E tests for analyze command
Adds 13 end-to-end tests that verify real-world usage of the new
'skill-seekers analyze' command with actual subprocess execution.

Test Coverage:
- Command discoverability (appears in help)
- Subcommand help text
- Quick preset execution
- Custom output directory
- Skip flags functionality
- Invalid directory handling
- Missing required arguments
- Backward compatibility (old --depth flag)
- Output structure validation
- References generation
- Old command still works (skill-seekers-codebase)
- Integration with verbose flag
- Multi-step analysis workflow

Key Features Tested:
 Real command execution via subprocess
 Actual file system operations
 Output validation (SKILL.md generation)
 Error handling for invalid inputs
 Backward compatibility with old flags
 Help text and documentation

All 13 E2E tests: PASSING 

Test Results:
- test_analyze_help_shows_command: PASSED
- test_analyze_subcommand_help: PASSED
- test_analyze_quick_preset: PASSED
- test_analyze_with_custom_output: PASSED
- test_analyze_skip_flags_work: PASSED
- test_analyze_invalid_directory: PASSED
- test_analyze_missing_directory_arg: PASSED
- test_backward_compatibility_depth_flag: PASSED
- test_analyze_generates_references: PASSED
- test_analyze_output_structure: PASSED
- test_old_command_still_exists: PASSED
- test_analyze_then_check_output: PASSED
- test_analyze_verbose_flag: PASSED

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-29 22:38:58 +03:00
yusyus
61c07c796d fix: Update integration tests for unified config format
Fixes 2 failing integration tests to match current validation behavior:

1. test_load_config_with_validation_errors:
   - Legacy validator is intentionally lenient for backward compatibility
   - Only validates presence of fields, not format
   - Updated test to use config that's truly invalid (missing all type fields)

2. test_godot_config:
   - godot.json uses unified format (sources array), not legacy format
   - Old validate_config() expects legacy format with top-level base_url
   - Updated to use ConfigValidator which supports both formats

Changes:
- Import ConfigValidator for unified format validation
- Fix test_load_config_with_validation_errors to trigger actual validation error
- Fix test_godot_config to use ConfigValidator instead of old validate_config

Test Results:
- Both previously failing tests now PASS 
- All 71 related tests PASS 
- No regressions introduced

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-29 22:24:17 +03:00
yusyus
380a71c714 feat: Add discoverable 'analyze' subcommand with preset flags (Phase 1 UX improvement)
Implements Phase 1 of the codebase analysis UX improvement plan, making the
command discoverable and adding intuitive preset flags while maintaining 100%
backward compatibility.

New Features:
- Add 'analyze' subcommand to main CLI (skill-seekers analyze)
- Add --quick preset: Fast analysis (1-2 min, basic features only)
- Add --comprehensive preset: Full analysis (20-60 min, all features + AI)
- Add --enhance flag: Simple AI enhancement with auto-detection
- Improve help text with timing estimates and mode descriptions

Files Modified:
- src/skill_seekers/cli/main.py: Add analyze subcommand (lines 15, 273-311, 542-589)
- src/skill_seekers/cli/codebase_scraper.py: Add preset logic and improve help text
- tests/test_analyze_command.py: NEW - 20 comprehensive tests
- tests/test_cli_paths.py: Fix version check (2.7.0 -> 2.7.2)
- tests/test_package_structure.py: Fix 4 version checks (2.7.0 -> 2.7.2)
- README.md: Update examples to use 'analyze' command
- CLAUDE.md: Update examples to use 'analyze' command

Test Results:
- 81 tests related to Phase 1: ALL PASSING 
- 20 new tests for analyze command: ALL PASSING 
- Zero regressions introduced
- 100% backward compatibility maintained

Backward Compatibility:
- Old 'skill-seekers-codebase' command still works
- All existing flags (--depth, --ai-mode, --skip-*) still functional
- No breaking changes

Usage Examples:
  skill-seekers analyze --directory . --quick
  skill-seekers analyze --directory . --comprehensive
  skill-seekers analyze --directory . --enhance

Fixes #262 (codebase UX issues)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-29 21:52:46 +03:00
yusyus
b72073a482 docs: Add user config directory documentation (ref #262)
Updated documentation to clarify the three config file locations:

1. README.md:
   - Added "Where to Place Custom Configs" section
   - Explains all three options: user dir, current dir, absolute path
   - Shows config resolution order

2. BULLETPROOF_QUICKSTART.md:
   - Added "Where to Save Custom Configs" section
   - Practical examples for beginners
   - Clarifies when to use each option

3. TROUBLESHOOTING.md:
   - Enhanced "Config File Not Found" section
   - Shows all search locations
   - Provides 5 clear solutions

These docs address the confusion reported in #262 about where to
place custom config files. Users now have clear guidance on using
the new ~/.config/skill-seekers/configs/ directory.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 22:03:37 +03:00
yusyus
cf3da6dff3 fix: Improve config path resolution and error messages (fixes #262)
Three critical UX improvements for custom config handling:

1. User config directory support:
   - Added ~/.config/skill-seekers/configs/ to search path
   - Users can now place custom configs in their home directory
   - Path resolution order: exact path → ./configs/ → user config dir → API

2. Better error messages:
   - Show all searched absolute paths when config not found
   - Added get_last_searched_paths() function to track locations
   - Clear guidance on where to place custom configs

3. Auto-create config.json:
   - ConfigManager now creates config.json on first initialization
   - Creates configs/ subdirectory for user custom configs
   - Display shows custom configs directory path

Fixes reported by @melamers in issue #262 where:
- Config path shown by `skill-seekers config` didn't exist
- Unclear where to save custom configs
- Error messages didn't show exact paths searched

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 22:01:04 +03:00
yusyus
746e335fae fix: Auto-fetch preset configs from API when not found locally
Fixes #264

Users reported that preset configs (react.json, godot.json, etc.) were not
found after installing via pip/uv, causing immediate failure on first use.

Solution: Instead of bundling configs in the package, the CLI now automatically
fetches missing configs from the SkillSeekersWeb.com API.

Changes:
- Created config_fetcher.py with smart config resolution:
  1. Check local path (backward compatible)
  2. Check with configs/ prefix
  3. Auto-fetch from SkillSeekersWeb.com API (new!)
- Updated doc_scraper.py to use ConfigValidator (supports unified configs)
- Added 15 comprehensive tests for auto-fetch functionality

User Experience:
- Zero configuration needed - presets work immediately after install
- Better error messages showing available configs from API
- Downloaded configs are cached locally for future use
- Fully backward compatible with existing local configs

Testing:
- 15 new unit tests (all passing)
- 2 integration tests with real API
- Full test suite: 1387 tests passing
- No breaking changes

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 21:41:20 +03:00
xuintl
6aec0e3688 Refine wording and formatting in README.zh-CN.md
Updated formatting and wording for clarity in the README.
2026-01-27 21:16:38 +03:00
yusyus
8f720670f2 style: Format code with ruff
- Format 5 files affected by PDF scraper changes
- Ensures CI/CD code quality checks pass

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 21:11:21 +03:00
yusyus
3fc4b54164 fix: Remove duplicate import os statements causing UnboundLocalError
## Critical Bugs Fixed

### 1. UnboundLocalError in AI Enhancement Modules (BLOCKING)
**Issue**: Duplicate `import os` statements inside conditional blocks caused
UnboundLocalError when accessing os.environ before the import was reached.

**Files Fixed**:
- src/skill_seekers/cli/guide_enhancer.py (lines 92, 112)
- src/skill_seekers/cli/ai_enhancer.py (line 77)
- src/skill_seekers/cli/config_enhancer.py (line 82)

**Root Cause**: `os` was already imported at file top, but re-imported inside
conditional blocks, creating a local variable scope issue.

**Solution**: Removed duplicate import statements - os is already available
from the top-level import.

**Impact**: Fixed 30 failing guide_enhancer tests

### 2. PDF Scraper Test Expectations (BREAKING CHANGE)
**Issue**: Tests expected old keyword-based categorization behavior, but PR
introduced new single-file strategy for single PDF sources.

**Files Fixed**:
- tests/test_pdf_scraper.py (5 tests updated)

**Tests Updated**:
1. test_categorize_by_keywords
2. test_build_skill_creates_reference_files
3. test_code_blocks_included_in_references
4. test_high_quality_code_preferred
5. test_image_references_in_markdown

**Solution**: Updated test expectations to match new single-file strategy
behavior (single PDF → single category named after PDF basename).

**Impact**: Fixed 5 failing PDF scraper tests

## Test Results

**Before Fixes**: 35 tests failing
**After Fixes**: 130 tests passing, 5 skipped 

### Tested Modules:
-  PDF scraper (18 tests)
-  Guide enhancer (30 tests)
-  All adaptors (82 tests)

## Verification

```bash
pytest tests/test_pdf_scraper.py tests/test_guide_enhancer.py tests/test_adaptors/ -v
# Result: 130 passed, 5 skipped in 1.11s
```

## Notes

The original PR features (GLM-4.7 support + PDF scraper improvements) are
excellent and working correctly. These fixes only address the import scoping
bug introduced during implementation and update tests for the new behavior.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-27 21:11:04 +03:00
Zhichang Yu
9435d2911d feat: Add GLM-4.7 support and fix PDF scraper issues (#266)
Merging with admin override due to known issues:

 **What Works**:
- GLM-4.7 Claude-compatible API support (correctly implemented)
- PDF scraper improvements (content truncation fixed, page traceability added)  
- Documentation updates comprehensive

⚠️ **Known Issues (will be fixed in next commit)**:
1. Import bugs in 3 files causing UnboundLocalError (30 tests failing)
2. PDF scraper test expectations need updating for new behavior (5 tests failing)
3. test_godot_config failure (pre-existing, not caused by this PR - 1 test failing)

**Action Plan**:
Fixes for issues #1 and #2 are ready and will be committed immediately after merge.
Issue #3 requires separate investigation as it's a pre-existing problem.

Total: 36 failing tests, 35 will be fixed in next commit.
2026-01-27 21:10:40 +03:00
yusyus
ffa745fbc7 fix: Add CSS selectors to test config in BULLETPROOF_QUICKSTART.md
The test config was missing CSS selectors, causing the scraper to fail
with "No content" errors on Tailwind CSS documentation.

Changes:
- Added selectors section with proper CSS selectors for Tailwind docs
- Added Windows PowerShell alternative since cat/EOF doesn't work there
- Includes main_content, title, and code_blocks selectors

This fixes the "No content" error reported in issue #261.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 22:59:51 +03:00
yusyus
393d9e3c88 fix: Add missing package installation step in BULLETPROOF_QUICKSTART.md
Fixes #261

The guide was missing the critical `pip install -e .` step, which caused
the skill-seekers command to not be found on Windows (and all platforms).

Changes:
- Updated Step 4 to use `pip install -e .` instead of manually installing deps
- Added explanation of what the command does
- Updated troubleshooting section for "command not found" errors
- Added fallback for pip command issues

This ensures the package is properly installed and console scripts are
registered, making the skill-seekers command available in PATH.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 20:31:09 +03:00
yusyus
a16eee0e7f docs: Add social media badges and links
- Add Twitter/X follow badge to both READMEs (English and Chinese)
- Add GitHub stars badge for social proof
- Add Author link to pyproject.toml pointing to X profile
- Set repository homepage URL to skillseekersweb.com

These changes improve discoverability and community engagement.
2026-01-22 00:40:25 +03:00
yusyus
2855b59165 chore: Bump version to 2.7.4 for language link fix
This patch release fixes the broken Chinese language selector link
on PyPI by using absolute GitHub URLs instead of relative paths.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 00:12:08 +03:00
yusyus
897295a5bc fix: Use absolute URLs for language selector links
Changed relative links (README.zh-CN.md) to absolute GitHub URLs
so they work correctly on PyPI, GitHub, and any other platform
that displays the README.

This fixes the broken Chinese link in the language selector.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 00:08:49 +03:00
yusyus
41832d72ea docs: Update version badges to 2.7.3 in both READMEs
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 00:00:59 +03:00
yusyus
02ce5b4a33 chore: Bump version to 2.7.3 for i18n documentation release
This patch release focuses on internationalization and making Skill Seekers
accessible to the Chinese developer community.

Key updates:
- Complete Chinese (简体中文) README translation
- PyPI metadata updated with i18n support
- Natural Language classifiers added
- Community engagement issue created

See CHANGELOG.md for complete release notes.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-22 00:00:27 +03:00
yusyus
75508565d7 docs: Update PyPI metadata to highlight Chinese i18n support
- Add Chinese (简体中文) mention in package description
- Add i18n, chinese, international keywords for better discoverability
- Add Natural Language classifiers for English and Chinese (Simplified)
- Add direct link to Chinese README in project URLs

This makes the Chinese translation more discoverable on PyPI and
appeals to the massive Chinese developer market.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 23:59:18 +03:00
yusyus
7a94535932 feat: Add Chinese (zh-CN) README translation
- Add comprehensive Chinese translation (README.zh-CN.md)
- Add language selector badges to both English and Chinese READMEs
- Mark translation as AI-generated with disclaimer
- Create GitHub issue #260 for community review and improvements

The Chinese translation makes Skill Seekers accessible to the massive
Chinese developer community. It's marked as machine-translated to set
expectations and invite community contributions for improvement.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 23:51:01 +03:00
yusyus
ac53017ec8 chore: Bump version to 2.7.2 for hotfix release
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 23:23:33 +03:00
yusyus
cc76efa29a fix: Critical CLI bug fixes for issues #258 and #259
This hotfix resolves 4 critical bugs reported by users:

Issue #258: install command fails with unified_scraper
- Added --fresh and --dry-run flags to unified_scraper.py
- Updated main.py to pass both flags to unified scraper
- Fixed "unrecognized arguments" error

Issue #259 (Original): scrape command doesn't accept positional URL and --max-pages
- Added positional URL argument to scrape command
- Added --max-pages flag with safety warnings (>1000 pages, <10 pages)
- Updated doc_scraper.py and main.py argument parsers

Issue #259 (Comment A): Version shows 2.7.0 instead of actual version
- Fixed hardcoded version in main.py
- Now reads version dynamically from __init__.py

Issue #259 (Comment B): PDF command shows empty "Error: " message
- Improved exception handler in main.py to show exception type if message is empty
- Added proper error handling in pdf_scraper.py with context-specific messages
- Added traceback support in verbose mode

All fixes tested and verified with exact commands from issue reports.

Resolves: #258, #259

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-21 23:22:03 +03:00
yusyus
35cd0759e5 chore: Bump development version to 2.8.0-dev
After releasing v2.7.1 hotfix, development branch returns to 2.8.0-dev
for continued feature development.

Version Changes:
- pyproject.toml: 2.7.1 → 2.8.0-dev
- src/skill_seekers/__init__.py: 2.7.1 → 2.8.0-dev
- src/skill_seekers/cli/__init__.py: 2.7.1 → 2.8.0-dev
- src/skill_seekers/mcp/__init__.py: 2.7.1 → 2.8.0-dev
- src/skill_seekers/mcp/tools/__init__.py: 2.7.1 → 2.8.0-dev

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-18 22:41:45 +03:00
yusyus
dc6b82f06d chore: Bump version to 2.7.1 for hotfix release
Version Bump:
- pyproject.toml: 2.8.0-dev → 2.7.1
- src/skill_seekers/__init__.py: 2.8.0-dev → 2.7.1
- src/skill_seekers/cli/__init__.py: 2.8.0-dev → 2.7.1
- src/skill_seekers/mcp/__init__.py: 2.8.0-dev → 2.7.1
- src/skill_seekers/mcp/tools/__init__.py: 2.8.0-dev → 2.7.1

CHANGELOG:
- Added v2.7.1 entry documenting critical config download bug fix
- Root cause, solution, files fixed, impact, and testing documented

This hotfix resolves the critical 404 error bug when downloading configs
from the skillseekersweb.com API.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-18 22:39:34 +03:00
yusyus
86a0d53172 Merge branch 'development' 2026-01-18 22:38:00 +03:00
yusyus
f1d97facbc fix: Use download_url from API response instead of constructing URL
CRITICAL BUG FIX - Resolves 404 errors when fetching configs from API

Root Cause:
The code was constructing download URLs manually:
  download_url = f"{API_BASE_URL}/api/download/{config_name}.json"

This fails because the API provides download_url in the response, which
may differ from the constructed path (e.g., CDN URLs, version-specific paths).

Solution:
Changed both MCP server implementations to use download_url from API:
  download_url = config_info.get("download_url")

Added validation check for missing download_url field.

Files Modified:
- src/skill_seekers/mcp/tools/source_tools.py (FastMCP server, line 285-297)
- src/skill_seekers/mcp/server_legacy.py (Legacy server, line 1483-1494)

Bug Report:
User reported: skill-seekers install --config godot --unlimited
- API check: /api/configs/godot → 200 OK 
- Download: /api/download/godot.json → 404 Not Found 

After Fix:
- Uses download_url from API response → Works correctly 

Testing:
 All 15 source tools tests pass (test_mcp_fastmcp.py::TestSourceTools)
 All 8 fetch_config tests pass
 test_fetch_config_download_api: PASSED
 test_fetch_config_from_source: PASSED

Impact:
- Fixes config downloads from official API (skillseekersweb.com)
- Fixes config downloads from private Git repositories
- Prevents all future 404 errors from URL construction mismatch
- No breaking changes - fully backward compatible

Related Issue: Bug reported by user when testing Godot skill

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-18 22:25:35 +03:00
yusyus
e44977c8da docs: Add official website https://skillseekersweb.com/ to repository
- Added website badge to README.md
- Updated pyproject.toml URLs (Homepage, Documentation, Config Browser)
- Added website links to CLAUDE.md
- Website features: browse 24+ configs, share configs, complete documentation
2026-01-18 21:38:27 +03:00
yusyus
b13a5c67af docs: Add missing items to v2.7.0 CHANGELOG
Added:
- Git Submodules for Configuration Management
- Config Discovery Enhancements (--all flag)
2026-01-18 14:49:45 +03:00
yusyus
208357c8b0 Merge development for v2.7.0 release
Merging all v2.7.0 changes from development to main:

Major Changes:
- Documentation overhaul (7 new files, 10 updated files)
- MCP setup modernization (PR #252, venv auto-detection)
- Code quality improvements (21 ruff errors fixed)
- Version synchronization (Issue #248 fix)
- CI fixes for release workflow (uv install, submodules)

Test Suite: 1200+ tests passing

Co-Authored-By: MiaoDX <miaodx@hotmail.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-18 14:25:35 +03:00
yusyus
d6f91029f6 chore: Bump version to 2.8.0-dev
Start development cycle for v2.8.0.

Version updated in 5 locations:
- pyproject.toml
- src/skill_seekers/__init__.py
- src/skill_seekers/cli/__init__.py
- src/skill_seekers/mcp/__init__.py
- src/skill_seekers/mcp/tools/__init__.py

All version numbers synchronized to prevent Issue #248.

[Unreleased] section in CHANGELOG.md ready for v2.8.0 changes.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-18 14:24:06 +03:00
yusyus
97272a8989 ci: Fix release workflow - install uv and initialize submodules
Fixes release build failures:

1. Install uv for bootstrap skill tests
   - Added step to install uv from astral.sh
   - Fixes 7 bootstrap test failures (test_bootstrap_skill*.py)

2. Initialize git submodules
   - Added 'submodules: recursive' to checkout action
   - Fixes test_cli_all_flag_lists_configs (needs configs submodule)

This ensures all 1200+ tests pass in release builds.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-18 14:22:10 +03:00
yusyus
84f0f99595 docs: Update CHANGELOG.md for v2.7.0 release
Added all changes from 2026-01-18 to v2.7.0 section:

### Added
- Documentation overhaul (7 new files, 10 updated files)

### Fixed
- Code quality improvements (21 ruff errors fixed)
- Version synchronization (Issue #248)
- Case-insensitive regex (Issue #236)
- Test fixture error
- MCP setup modernization (PR #252)

Updated release date to 2026-01-18.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-18 14:15:52 +03:00