feat: add workflow support to unified_scraper (fixes gap #1)
unified_scraper.py was the only scraper missing --enhance-workflow, --enhance-stage, --var, and --workflow-dry-run support. All other scrapers (doc_scraper, github_scraper, pdf_scraper, codebase_scraper) already called run_workflows() after building the skill. Changes: - arguments/unified.py: add 4 workflow args to UNIFIED_ARGUMENTS so the unified CLI subparser picks them up automatically - unified_scraper.py main(): register the same 4 workflow args in the standalone parser - unified_scraper.py run(): accept optional `args` parameter and call run_workflows() after build_skill(), passing unified context (name + description) consistent with doc_scraper pattern Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -40,6 +40,38 @@ UNIFIED_ARGUMENTS: dict[str, dict[str, Any]] = {
|
||||
"help": "Dry run mode",
|
||||
},
|
||||
},
|
||||
# Enhancement Workflow arguments (mirrors scrape/github/pdf/codebase scrapers)
|
||||
"enhance_workflow": {
|
||||
"flags": ("--enhance-workflow",),
|
||||
"kwargs": {
|
||||
"action": "append",
|
||||
"help": "Apply enhancement workflow (file path or preset: security-focus, minimal, api-documentation, architecture-comprehensive). Can use multiple times to chain workflows.",
|
||||
"metavar": "WORKFLOW",
|
||||
},
|
||||
},
|
||||
"enhance_stage": {
|
||||
"flags": ("--enhance-stage",),
|
||||
"kwargs": {
|
||||
"action": "append",
|
||||
"help": "Add inline enhancement stage (format: 'name:prompt'). Can be used multiple times.",
|
||||
"metavar": "STAGE",
|
||||
},
|
||||
},
|
||||
"var": {
|
||||
"flags": ("--var",),
|
||||
"kwargs": {
|
||||
"action": "append",
|
||||
"help": "Override workflow variable (format: 'key=value'). Can be used multiple times.",
|
||||
"metavar": "VAR",
|
||||
},
|
||||
},
|
||||
"workflow_dry_run": {
|
||||
"flags": ("--workflow-dry-run",),
|
||||
"kwargs": {
|
||||
"action": "store_true",
|
||||
"help": "Preview workflow stages without executing (requires --enhance-workflow)",
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user