Problem
Running skillspector --help constructs the complete analysis graph before Typer can render help. On a machine without LLM credentials, the help-only command takes roughly 17 seconds and emits analyzer availability warnings after the usage text:
WARNING [skillspector.graph] Skipping analyzer semantic_developer_intent: required API key is missing
WARNING [skillspector.graph] Skipping analyzer semantic_quality_policy: required API key is missing
WARNING [skillspector.graph] Skipping analyzer semantic_security_discovery: required API key is missing
The same eager initialization affects --version and other import-only CLI paths. These commands do not run a scan, so analyzer availability is irrelevant and the warnings look like help-command failures.
Reproduction
With the current main, clear provider credentials and run:
The command renders valid help, then prints the missing-key warnings. The delay comes from the module-level graph = create_graph() in skillspector.graph, imported by the CLI before argument dispatch.
Expected behavior
Help and version commands should return promptly without constructing analyzers or emitting scan-time warnings. The graph should still be constructed, and unavailable-analyzer warnings should still be emitted, when a real scan first invokes it.
Proposed scope
Make the exported graph object compile on first graph operation rather than at module import, preserving the existing graph.invoke / graph.ainvoke API. Add subprocess coverage that proves --help stays quiet without credentials and focused coverage that first invocation still delegates to the compiled graph.
Problem
Running
skillspector --helpconstructs the complete analysis graph before Typer can render help. On a machine without LLM credentials, the help-only command takes roughly 17 seconds and emits analyzer availability warnings after the usage text:The same eager initialization affects
--versionand other import-only CLI paths. These commands do not run a scan, so analyzer availability is irrelevant and the warnings look like help-command failures.Reproduction
With the current
main, clear provider credentials and run:time skillspector --helpThe command renders valid help, then prints the missing-key warnings. The delay comes from the module-level
graph = create_graph()inskillspector.graph, imported by the CLI before argument dispatch.Expected behavior
Help and version commands should return promptly without constructing analyzers or emitting scan-time warnings. The graph should still be constructed, and unavailable-analyzer warnings should still be emitted, when a real scan first invokes it.
Proposed scope
Make the exported graph object compile on first graph operation rather than at module import, preserving the existing
graph.invoke/graph.ainvokeAPI. Add subprocess coverage that proves--helpstays quiet without credentials and focused coverage that first invocation still delegates to the compiled graph.