From 18a6157617c9255fb0ca74159c926bbb3c57f263 Mon Sep 17 00:00:00 2001 From: yusyus Date: Sun, 15 Feb 2026 21:17:04 +0300 Subject: [PATCH] fix: create command now properly supports multi-source configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes 3 critical bugs to enable unified create command for all config types: 1. Fixed _route_config() passing unsupported args to unified_scraper - Only pass --dry-run (the only supported behavioral flag) - Removed --name, --output, etc. (read from config file) 2. Fixed "source" not recognized as positional argument - Added "source" to positional args list in main.py - Enables: skill-seekers create 3. Fixed "config" incorrectly treated as positional - Removed from positional args list (it's a --config flag) - Fixes backward compatibility with unified command Added: configs/godot_unified.json - Multi-source config example (docs + source code) - Demonstrates documentation + codebase analysis Result: ✅ skill-seekers create configs/godot_unified.json (works!) ✅ skill-seekers unified --config configs/godot_unified.json (still works!) ✅ 118 passed, 0 failures ✅ True single entry point achieved Co-Authored-By: Claude Sonnet 4.5 --- configs/godot_unified.json | 106 ++++++++++++++++++++++++ src/skill_seekers/cli/create_command.py | 12 ++- src/skill_seekers/cli/main.py | 2 +- 3 files changed, 117 insertions(+), 3 deletions(-) create mode 100644 configs/godot_unified.json diff --git a/configs/godot_unified.json b/configs/godot_unified.json new file mode 100644 index 0000000..5044c5c --- /dev/null +++ b/configs/godot_unified.json @@ -0,0 +1,106 @@ +{ + "name": "godot", + "description": "Godot Engine 4.x - Complete open source game engine (documentation + source code + signal flow analysis)", + "output_dir": "output/godot-unified/", + + "sources": [ + { + "type": "local", + "path": "/mnt/1ece809a-2821-4f10-aecb-fcdf34760c0b/Git/godot-docs", + "name": "documentation", + "description": "Official Godot 4.x documentation (RST + Markdown)", + "weight": 0.4, + "file_patterns": ["*.rst", "*.md"], + "skip_patterns": [ + "build/", + "_build/", + ".git/", + "node_modules/", + "__pycache__/" + ], + "categories": { + "getting_started": ["getting_started", "introduction", "tutorial"], + "core_concepts": ["classes", "nodes", "scenes", "signals"], + "api": ["api", "reference", "class_reference"], + "tutorials": ["tutorials", "how_to", "examples"], + "advanced": ["advanced", "performance", "optimization"] + } + }, + { + "type": "local", + "path": "/mnt/1ece809a-2821-4f10-aecb-fcdf34760c0b/Git/godot", + "name": "source_code", + "description": "Godot Engine C++ source code + GDScript core", + "weight": 0.6, + "languages": ["cpp", "gdscript", "python", "glsl"], + "skip_patterns": [ + ".git/", + "thirdparty/", + "tests/", + "doc/", + "misc/", + "drivers/", + "platform/android/", + "platform/ios/", + "platform/web/", + "*.obj", + "*.o", + "*.a", + "*.so" + ], + "focus_dirs": [ + "core/", + "scene/", + "servers/", + "modules/gdscript/", + "editor/" + ], + "analysis_depth": "full", + "extract_patterns": true, + "extract_tests": true, + "extract_signals": true, + "extract_config": true + } + ], + + "merge_strategy": "unified", + "conflict_resolution": "code_first", + "detect_conflicts": true, + + "analysis_features": { + "pattern_detection": true, + "test_extraction": true, + "how_to_guides": true, + "config_extraction": true, + "architecture_overview": true, + "signal_flow_analysis": true, + "api_reference": true, + "dependency_graph": true + }, + + "enhancement": { + "enabled": true, + "level": 3, + "mode": "LOCAL" + }, + + "chunking": { + "enabled": true, + "chunk_size": 1000, + "chunk_overlap": 200 + }, + + "output_formats": [ + "claude", + "markdown" + ], + + "metadata": { + "version": "4.x", + "framework": "godot", + "language": "cpp+gdscript", + "tags": ["game-engine", "godot", "cpp", "gdscript", "signals", "nodes"], + "documentation_url": "https://docs.godotengine.org/", + "repository_url": "https://github.com/godotengine/godot" + } +} diff --git a/src/skill_seekers/cli/create_command.py b/src/skill_seekers/cli/create_command.py index 46b924a..4757a67 100644 --- a/src/skill_seekers/cli/create_command.py +++ b/src/skill_seekers/cli/create_command.py @@ -298,8 +298,16 @@ class CreateCommand: config_path = self.source_info.parsed["config_path"] argv.extend(["--config", config_path]) - # Add universal arguments (unified scraper supports most) - self._add_common_args(argv) + # Add only the arguments that unified_scraper actually supports + # unified_scraper has its own config format that includes: + # name, description, output_dir, enhancement, etc. + # So we only pass behavioral flags here: + + if self.args.dry_run: + argv.append("--dry-run") + + # Note: unified_scraper gets name, output, enhancement from config file + # not from CLI args. The config format includes these fields. # Call unified_scraper with modified argv logger.debug(f"Calling unified_scraper with argv: {argv}") diff --git a/src/skill_seekers/cli/main.py b/src/skill_seekers/cli/main.py index 9879cd2..76b1b29 100644 --- a/src/skill_seekers/cli/main.py +++ b/src/skill_seekers/cli/main.py @@ -139,13 +139,13 @@ def _reconstruct_argv(command: str, args: argparse.Namespace) -> list[str]: # Handle positional arguments (no -- prefix) if key in [ + "source", # create command "url", "directory", "file", "job_id", "skill_directory", "zip_file", - "config", "input_file", ]: if value is not None and value != "":