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

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