feat: add CONFIG_ARGUMENTS and fix _route_config for unified scraper parity

Previously _route_config only forwarded --dry-run, silently dropping
all enhancement workflows, --merge-mode, and --skip-codebase-analysis.

Changes:
- arguments/create.py: add CONFIG_ARGUMENTS dict with merge_mode and
  skip_codebase_analysis; wire into get_source_specific_arguments(),
  get_compatible_arguments(), and add_create_arguments(mode='config')
- create_command.py: fix _route_config to forward --fresh, --merge-mode,
  --skip-codebase-analysis, and all 4 workflow flags; add --help-config
  handler (skill-seekers create --help-config) matching other help modes
- parsers/create_parser.py: add --help-config flag for unified CLI parity
- tests/test_create_arguments.py: import CONFIG_ARGUMENTS; update config
  source tests to assert correct content instead of empty dict

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
yusyus
2026-02-21 23:51:04 +03:00
parent 4b70c5a860
commit 47226340ac
4 changed files with 78 additions and 12 deletions

View File

@@ -389,6 +389,28 @@ PDF_ARGUMENTS: dict[str, dict[str, Any]] = {
},
}
# Multi-source config specific (from unified_scraper.py)
CONFIG_ARGUMENTS: dict[str, dict[str, Any]] = {
"merge_mode": {
"flags": ("--merge-mode",),
"kwargs": {
"type": str,
"choices": ["rule-based", "claude-enhanced"],
"help": "Override merge mode from config (rule-based or claude-enhanced)",
"metavar": "MODE",
},
},
"skip_codebase_analysis": {
"flags": ("--skip-codebase-analysis",),
"kwargs": {
"action": "store_true",
"help": "Skip C3.x codebase analysis for GitHub sources in unified config",
},
},
# Note: --fresh is intentionally omitted here — it already lives in WEB_ARGUMENTS.
# For unified config files, use `skill-seekers unified --fresh` directly.
}
# =============================================================================
# TIER 3: ADVANCED/RARE ARGUMENTS
# =============================================================================
@@ -449,7 +471,7 @@ def get_source_specific_arguments(source_type: str) -> dict[str, dict[str, Any]]
"github": GITHUB_ARGUMENTS,
"local": LOCAL_ARGUMENTS,
"pdf": PDF_ARGUMENTS,
"config": {}, # Config files don't have extra args
"config": CONFIG_ARGUMENTS,
}
return source_args.get(source_type, {})
@@ -521,6 +543,10 @@ def add_create_arguments(parser: argparse.ArgumentParser, mode: str = "default")
for arg_name, arg_def in PDF_ARGUMENTS.items():
parser.add_argument(*arg_def["flags"], **arg_def["kwargs"])
if mode in ["config", "all"]:
for arg_name, arg_def in CONFIG_ARGUMENTS.items():
parser.add_argument(*arg_def["flags"], **arg_def["kwargs"])
# Add advanced arguments if requested
if mode in ["advanced", "all"]:
for arg_name, arg_def in ADVANCED_ARGUMENTS.items():