fix: create command now properly supports multi-source configs

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 <source>

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 <noreply@anthropic.com>
This commit is contained in:
yusyus
2026-02-15 21:17:04 +03:00
parent c3abb83fc8
commit 18a6157617
3 changed files with 117 additions and 3 deletions

106
configs/godot_unified.json Normal file
View File

@@ -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"
}
}

View File

@@ -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}")

View File

@@ -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 != "":