sanityops-cli 0.1.10__tar.gz → 2.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/.github/workflows/release.yml +0 -2
- sanityops_cli-2.0.1/.github/workflows/sync-skills.yml +54 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/CHANGELOG.md +45 -12
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/PKG-INFO +40 -32
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/README.md +36 -29
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/pyproject.toml +4 -3
- sanityops_cli-2.0.1/scripts/ci_sync_skills.py +319 -0
- sanityops_cli-2.0.1/scripts/sync_skills.py +274 -0
- sanityops_cli-2.0.1/src/sanityops_cli/__init__.py +1 -0
- sanityops_cli-2.0.1/src/sanityops_cli/__main__.py +3 -0
- sanityops_cli-2.0.1/src/sanityops_cli/agents/extract_agent/__init__.py +1 -0
- sanityops_cli-2.0.1/src/sanityops_cli/agents/extract_agent/agent.py +234 -0
- sanityops_cli-2.0.1/src/sanityops_cli/agents/extract_agent/prompts.py +138 -0
- sanityops_cli-2.0.1/src/sanityops_cli/agents/extract_agent/tools/read_file_tool.py +116 -0
- sanityops_cli-2.0.1/src/sanityops_cli/agents/extract_agent/tools/store_artifacts_tool.py +604 -0
- sanityops_cli-2.0.1/src/sanityops_cli/agents/extract_agent/tools/tool_registry.py +173 -0
- sanityops_cli-2.0.1/src/sanityops_cli/agents/inspect_agent/__init__.py +1 -0
- sanityops_cli-2.0.1/src/sanityops_cli/agents/inspect_agent/agent.py +205 -0
- sanityops_cli-2.0.1/src/sanityops_cli/agents/inspect_agent/prompts.py +176 -0
- sanityops_cli-2.0.1/src/sanityops_cli/agents/inspect_agent/tools/write_report_tool.py +253 -0
- sanityops_cli-2.0.1/src/sanityops_cli/agents/progress_hook.py +454 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/agents/repair_agent/agent.py +33 -43
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/agents/repair_agent/prompts.py +36 -29
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/agents/repair_agent/tools/store_repairs_tool.py +32 -60
- sanityops_cli-2.0.1/src/sanityops_cli/agents/termination.py +51 -0
- sanityops_cli-2.0.1/src/sanityops_cli/agents/tools/__init__.py +1 -0
- {sanityops_cli-0.1.10/src/sanityops_cli/agents/scanner_agent → sanityops_cli-2.0.1/src/sanityops_cli/agents}/tools/readfile_tool.py +167 -145
- sanityops_cli-2.0.1/src/sanityops_cli/api/__init__.py +5 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/api/client.py +176 -117
- sanityops_cli-2.0.1/src/sanityops_cli/code_contract_checker/__init__.py +21 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/code_contract_checker/checker.py +229 -99
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/code_contract_checker/markdown_reporter.py +3 -19
- sanityops_cli-2.0.1/src/sanityops_cli/code_contract_checker/models.py +337 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/code_contract_checker/renderer.py +15 -46
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/code_contract_checker/rules/__init__.py +24 -15
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/code_contract_checker/rules/qc0_baseline.py +46 -42
- sanityops_cli-2.0.1/src/sanityops_cli/code_contract_checker/rules/qc0_fence.py +215 -0
- sanityops_cli-2.0.1/src/sanityops_cli/code_contract_checker/rules/qc1_imports.py +200 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/code_contract_checker/rules/qc1_syntax.py +16 -34
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/code_contract_checker/rules/qc2_resource.py +24 -53
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/code_contract_checker/rules/qc3_pattern.py +36 -32
- sanityops_cli-2.0.1/src/sanityops_cli/code_contract_checker/rules/qc4_drift.py +296 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/commands/config.py +74 -104
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/commands/init.py +14 -42
- sanityops_cli-2.0.1/src/sanityops_cli/commands/inspect.py +2008 -0
- sanityops_cli-2.0.1/src/sanityops_cli/commands/project.py +1357 -0
- sanityops_cli-2.0.1/src/sanityops_cli/constants/config_defaults.py +7 -0
- sanityops_cli-2.0.1/src/sanityops_cli/constants/exit_codes.py +4 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/exceptions/api_exceptions.py +3 -18
- sanityops_cli-2.0.1/src/sanityops_cli/exceptions/base_exceptions.py +13 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/help_panel.py +3 -3
- sanityops_cli-2.0.1/src/sanityops_cli/inspect_pipeline/__init__.py +1 -0
- sanityops_cli-2.0.1/src/sanityops_cli/inspect_pipeline/context_guard.py +236 -0
- sanityops_cli-2.0.1/src/sanityops_cli/inspect_pipeline/ir_writer.py +333 -0
- sanityops_cli-2.0.1/src/sanityops_cli/inspect_pipeline/markdown_reporter.py +96 -0
- sanityops_cli-2.0.1/src/sanityops_cli/inspect_pipeline/models.py +157 -0
- sanityops_cli-2.0.1/src/sanityops_cli/inspect_pipeline/renderer.py +192 -0
- sanityops_cli-2.0.1/src/sanityops_cli/inspect_pipeline/report_parser.py +275 -0
- sanityops_cli-2.0.1/src/sanityops_cli/inspect_pipeline/skill_runtime.py +297 -0
- sanityops_cli-2.0.1/src/sanityops_cli/inspect_pipeline/token_estimator.py +34 -0
- sanityops_cli-2.0.1/src/sanityops_cli/logging/__init__.py +22 -0
- sanityops_cli-2.0.1/src/sanityops_cli/logging/config.py +163 -0
- sanityops_cli-2.0.1/src/sanityops_cli/logging/manager.py +382 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/main.py +31 -37
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/renderers/command_renderer/inspect_command_renderer.py +1 -15
- sanityops_cli-2.0.1/src/sanityops_cli/skills/VERSION.json +24 -0
- sanityops_cli-2.0.1/src/sanityops_cli/skills/code-contract-checklist.v2.md +105 -0
- sanityops_cli-2.0.1/src/sanityops_cli/skills/pre-inspect-extract/SKILL.md +438 -0
- sanityops_cli-2.0.1/src/sanityops_cli/skills/sanityops-inspect-lite/SKILL.md +361 -0
- sanityops_cli-2.0.1/src/sanityops_cli/skills/sanityops-inspect-lite/references/_meta.md +94 -0
- sanityops_cli-2.0.1/src/sanityops_cli/skills/sanityops-inspect-lite/references/code-contract-checklist.v2.md +105 -0
- sanityops_cli-2.0.1/src/sanityops_cli/skills/sanityops-inspect-lite/references/cross-checklist.v2.md +141 -0
- sanityops_cli-2.0.1/src/sanityops_cli/skills/sanityops-inspect-lite/references/explicit-checklist.v2.md +151 -0
- sanityops_cli-2.0.1/src/sanityops_cli/skills/sanityops-inspect-lite/references/permission-checklist.v2.md +210 -0
- sanityops_cli-2.0.1/src/sanityops_cli/skills/sanityops-inspect-lite/references/prompt-checklist.v2.md +193 -0
- sanityops_cli-2.0.1/src/sanityops_cli/skills/sanityops-inspect-lite/references/relevance-map.v2.md +365 -0
- sanityops_cli-2.0.1/src/sanityops_cli/skills/sanityops-inspect-lite/references/skill-checklist.v2.md +145 -0
- sanityops_cli-2.0.1/src/sanityops_cli/skills/sanityops-inspect-lite/references/tool-checklist.v2.md +146 -0
- sanityops_cli-2.0.1/src/sanityops_cli/templates/inspect_config.yaml +75 -0
- sanityops_cli-2.0.1/src/sanityops_cli/utils/__init__.py +0 -0
- sanityops_cli-2.0.1/src/sanityops_cli/utils/artifact_packer.py +457 -0
- sanityops_cli-2.0.1/src/sanityops_cli/utils/config_loader.py +447 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/utils/config_resolver.py +45 -126
- sanityops_cli-2.0.1/src/sanityops_cli/utils/llm_config.py +150 -0
- sanityops_cli-2.0.1/src/sanityops_cli/utils/thinking_config.py +101 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/utils/validators.py +2 -18
- sanityops_cli-2.0.1/tests/__init__.py +0 -0
- sanityops_cli-2.0.1/tests/commands/__init__.py +0 -0
- sanityops_cli-2.0.1/tests/integration/__init__.py +0 -0
- sanityops_cli-2.0.1/tests/integration/test_two_agent_pipeline.py +237 -0
- sanityops_cli-2.0.1/tests/unit/__init__.py +0 -0
- sanityops_cli-2.0.1/tests/unit/agents/__init__.py +0 -0
- sanityops_cli-2.0.1/tests/unit/agents/extract_agent/__init__.py +0 -0
- sanityops_cli-2.0.1/tests/unit/agents/extract_agent/test_extract_agent.py +398 -0
- sanityops_cli-2.0.1/tests/unit/agents/extract_agent/test_read_file_tool.py +111 -0
- sanityops_cli-2.0.1/tests/unit/agents/extract_agent/test_store_artifacts_tool.py +426 -0
- sanityops_cli-2.0.1/tests/unit/agents/inspect_agent/__init__.py +0 -0
- sanityops_cli-2.0.1/tests/unit/agents/inspect_agent/test_inspect_agent.py +196 -0
- sanityops_cli-2.0.1/tests/unit/agents/inspect_agent/test_write_report_tool.py +85 -0
- sanityops_cli-2.0.1/tests/unit/api/test_client.py +307 -0
- sanityops_cli-2.0.1/tests/unit/ci/__init__.py +0 -0
- sanityops_cli-2.0.1/tests/unit/ci/test_ci_sync_skills.py +137 -0
- sanityops_cli-2.0.1/tests/unit/code_contract_checker/__init__.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/unit/code_contract_checker/test_checker.py +4 -3
- sanityops_cli-2.0.1/tests/unit/code_contract_checker/test_qc_rules_v2.py +317 -0
- sanityops_cli-2.0.1/tests/unit/code_contract_checker/test_registry_meta.py +129 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/unit/code_contract_checker/test_rules.py +4 -4
- sanityops_cli-2.0.1/tests/unit/commands/test_inspect.py +649 -0
- sanityops_cli-2.0.1/tests/unit/inspect_pipeline/__init__.py +0 -0
- sanityops_cli-2.0.1/tests/unit/inspect_pipeline/test_context_guard.py +151 -0
- sanityops_cli-2.0.1/tests/unit/inspect_pipeline/test_ir_writer.py +241 -0
- sanityops_cli-2.0.1/tests/unit/inspect_pipeline/test_models.py +76 -0
- sanityops_cli-2.0.1/tests/unit/inspect_pipeline/test_renderer_reporter.py +178 -0
- sanityops_cli-2.0.1/tests/unit/inspect_pipeline/test_report_parser.py +131 -0
- sanityops_cli-2.0.1/tests/unit/inspect_pipeline/test_skill_runtime.py +169 -0
- sanityops_cli-2.0.1/tests/unit/inspect_pipeline/test_token_estimator.py +27 -0
- sanityops_cli-2.0.1/tests/unit/logging/__init__.py +0 -0
- sanityops_cli-2.0.1/tests/unit/progress/__init__.py +0 -0
- sanityops_cli-2.0.1/tests/unit/utils/test_artifact_packer.py +285 -0
- sanityops_cli-2.0.1/tests/unit/utils/test_artifact_packer_extracted.py +192 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/unit/utils/test_config_loader.py +92 -78
- sanityops_cli-2.0.1/tests/unit/utils/test_config_resolver.py +403 -0
- {sanityops_cli-0.1.10/tests/unit/defect_checker → sanityops_cli-2.0.1/tests/unit/utils}/test_llm_config.py +130 -96
- sanityops_cli-2.0.1/tests/unit/utils/test_thinking_config.py +163 -0
- sanityops_cli-0.1.10/src/sanityops_cli/__init__.py +0 -16
- sanityops_cli-0.1.10/src/sanityops_cli/agents/repair_agent/__init__.py +0 -19
- sanityops_cli-0.1.10/src/sanityops_cli/agents/repair_agent/tools/__init__.py +0 -19
- sanityops_cli-0.1.10/src/sanityops_cli/agents/scanner_agent/agent.py +0 -428
- sanityops_cli-0.1.10/src/sanityops_cli/agents/scanner_agent/hooks/progress_hook.py +0 -152
- sanityops_cli-0.1.10/src/sanityops_cli/agents/scanner_agent/models/finding.py +0 -198
- sanityops_cli-0.1.10/src/sanityops_cli/agents/scanner_agent/prompts.py +0 -419
- sanityops_cli-0.1.10/src/sanityops_cli/agents/scanner_agent/tools/grep_tool.py +0 -667
- sanityops_cli-0.1.10/src/sanityops_cli/agents/scanner_agent/tools/listfiles_tool.py +0 -88
- sanityops_cli-0.1.10/src/sanityops_cli/agents/scanner_agent/tools/storefindings_tool.py +0 -178
- sanityops_cli-0.1.10/src/sanityops_cli/api/__init__.py +0 -16
- sanityops_cli-0.1.10/src/sanityops_cli/code_contract_checker/__init__.py +0 -35
- sanityops_cli-0.1.10/src/sanityops_cli/code_contract_checker/models.py +0 -202
- sanityops_cli-0.1.10/src/sanityops_cli/commands/__init__.py +0 -14
- sanityops_cli-0.1.10/src/sanityops_cli/commands/inspect.py +0 -703
- sanityops_cli-0.1.10/src/sanityops_cli/constants/__init__.py +0 -14
- sanityops_cli-0.1.10/src/sanityops_cli/constants/config_defaults.py +0 -22
- sanityops_cli-0.1.10/src/sanityops_cli/constants/exit_codes.py +0 -19
- sanityops_cli-0.1.10/src/sanityops_cli/defect_checker/__init__.py +0 -16
- sanityops_cli-0.1.10/src/sanityops_cli/defect_checker/checker.py +0 -112
- sanityops_cli-0.1.10/src/sanityops_cli/defect_checker/llm_config.py +0 -115
- sanityops_cli-0.1.10/src/sanityops_cli/defect_checker/markdown_reporter.py +0 -414
- sanityops_cli-0.1.10/src/sanityops_cli/defect_checker/renderer.py +0 -299
- sanityops_cli-0.1.10/src/sanityops_cli/exceptions/__init__.py +0 -14
- sanityops_cli-0.1.10/src/sanityops_cli/exceptions/base_exceptions.py +0 -25
- sanityops_cli-0.1.10/src/sanityops_cli/logging/__init__.py +0 -18
- sanityops_cli-0.1.10/src/sanityops_cli/renderers/__init__.py +0 -14
- sanityops_cli-0.1.10/src/sanityops_cli/templates/__init__.py +0 -14
- sanityops_cli-0.1.10/src/sanityops_cli/templates/inspect_config.yaml +0 -55
- sanityops_cli-0.1.10/src/sanityops_cli/utils/__init__.py +0 -14
- sanityops_cli-0.1.10/src/sanityops_cli/utils/artifact_packer.py +0 -424
- sanityops_cli-0.1.10/src/sanityops_cli/utils/config_loader.py +0 -296
- sanityops_cli-0.1.10/tests/unit/agents/scanner_agent/models/test_finding.py +0 -146
- sanityops_cli-0.1.10/tests/unit/agents/scanner_agent/test_agent.py +0 -114
- sanityops_cli-0.1.10/tests/unit/agents/scanner_agent/test_deterministic_capture.py +0 -284
- sanityops_cli-0.1.10/tests/unit/agents/scanner_agent/test_progress_hook.py +0 -99
- sanityops_cli-0.1.10/tests/unit/agents/scanner_agent/test_prompts.py +0 -85
- sanityops_cli-0.1.10/tests/unit/api/__init__.py +0 -14
- sanityops_cli-0.1.10/tests/unit/api/test_client.py +0 -239
- sanityops_cli-0.1.10/tests/unit/commands/test_inspect.py +0 -337
- sanityops_cli-0.1.10/tests/unit/defect_checker/test_checker.py +0 -143
- sanityops_cli-0.1.10/tests/unit/defect_checker/test_markdown_reporter.py +0 -651
- sanityops_cli-0.1.10/tests/unit/defect_checker/test_renderer.py +0 -670
- sanityops_cli-0.1.10/tests/unit/utils/test_artifact_packer.py +0 -233
- sanityops_cli-0.1.10/tests/utils/test_config_resolver.py +0 -490
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/.github/dependabot.yml +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/.github/scripts/pr_review_bot.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/.github/workflows/ai-review.yml +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/.github/workflows/ci.yml +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/.gitignore +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/CODE_OF_CONDUCT.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/CONTRIBUTING.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/LICENSE +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/NOTICE +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/SECURITY.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/plans/2026-08-13-model-config-comments-in-init-template.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/plans/2026-08-14-loading-animations.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/plans/2026-08-14-skills-files-banner-readme.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/plans/2026-08-28-copyright-compliance.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/plans/2026-09-08-config-command.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/plans/2026-09-20-cross-artifact-rendering.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/plans/2026-09-20-help-panel-migration.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/plans/2026-09-20-repair-feature.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/specs/2026-08-13-model-config-comments-in-init-template-design.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/specs/2026-08-14-loading-animations-design.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/specs/2026-08-14-skills-files-banner-readme-design.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/specs/2026-08-28-copyright-compliance-design.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/specs/2026-09-08-config-command-design.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/specs/2026-09-20-cross-artifact-rendering-design.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/specs/2026-09-20-help-panel-migration-design.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/docs/superpowers/specs/2026-09-20-repair-feature-design.md +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/entry.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/release.sh +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/scripts/generate-checksums.ps1 +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/scripts/install.ps1 +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/scripts/install.sh +0 -0
- {sanityops_cli-0.1.10/tests → sanityops_cli-2.0.1/src/sanityops_cli/agents}/__init__.py +0 -0
- {sanityops_cli-0.1.10/tests/commands → sanityops_cli-2.0.1/src/sanityops_cli/agents/extract_agent/tools}/__init__.py +0 -0
- {sanityops_cli-0.1.10/tests/unit → sanityops_cli-2.0.1/src/sanityops_cli/agents/inspect_agent/tools}/__init__.py +0 -0
- {sanityops_cli-0.1.10/tests/unit/agents → sanityops_cli-2.0.1/src/sanityops_cli/agents/repair_agent}/__init__.py +0 -0
- {sanityops_cli-0.1.10/tests/unit/agents/scanner_agent → sanityops_cli-2.0.1/src/sanityops_cli/agents/repair_agent/tools}/__init__.py +0 -0
- {sanityops_cli-0.1.10/tests/unit/agents/scanner_agent/models → sanityops_cli-2.0.1/src/sanityops_cli/commands}/__init__.py +0 -0
- {sanityops_cli-0.1.10/tests/unit/code_contract_checker → sanityops_cli-2.0.1/src/sanityops_cli/constants}/__init__.py +0 -0
- {sanityops_cli-0.1.10/tests/unit/defect_checker → sanityops_cli-2.0.1/src/sanityops_cli/exceptions}/__init__.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/logging/logger.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/progress/__init__.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/src/sanityops_cli/progress/tracker.py +0 -0
- {sanityops_cli-0.1.10/tests/unit/logging → sanityops_cli-2.0.1/src/sanityops_cli/renderers}/__init__.py +0 -0
- {sanityops_cli-0.1.10/tests/unit/progress → sanityops_cli-2.0.1/src/sanityops_cli/templates}/__init__.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/commands/test_config.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/commands/test_init.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/commands/test_inspect_repair.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/test_help_panel.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/unit/agents/repair_agent/__init__.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/unit/agents/repair_agent/test_agent.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/unit/agents/repair_agent/test_store_repairs_tool.py +0 -0
- {sanityops_cli-0.1.10/src/sanityops_cli/agents → sanityops_cli-2.0.1/tests/unit/api}/__init__.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/unit/code_contract_checker/test_renderer.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/unit/commands/test_version.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/unit/logging/test_logger.py +0 -0
- {sanityops_cli-0.1.10 → sanityops_cli-2.0.1}/tests/unit/progress/test_tracker.py +0 -0
|
@@ -122,7 +122,6 @@ jobs:
|
|
|
122
122
|
fi
|
|
123
123
|
pyinstaller --onefile \
|
|
124
124
|
--name sanityops-cli-${{ matrix.platform }}-$ARCH \
|
|
125
|
-
--collect-data defect_check \
|
|
126
125
|
--collect-data sanityops_cli \
|
|
127
126
|
entry.py
|
|
128
127
|
|
|
@@ -130,7 +129,6 @@ jobs:
|
|
|
130
129
|
if: runner.os == 'Windows'
|
|
131
130
|
run: |
|
|
132
131
|
pyinstaller --onefile --name sanityops-cli-win-x64 `
|
|
133
|
-
--collect-data defect_check `
|
|
134
132
|
--collect-data sanityops_cli `
|
|
135
133
|
entry.py
|
|
136
134
|
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
name: Update vendored skills
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
# Daily at 03:17 UTC.
|
|
6
|
+
- cron: "17 3 * * *"
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
inputs:
|
|
9
|
+
force:
|
|
10
|
+
description: "Update even if the recorded commit is current"
|
|
11
|
+
type: boolean
|
|
12
|
+
default: false
|
|
13
|
+
dry_run:
|
|
14
|
+
description: "Clone, update, and test without creating a branch or PR"
|
|
15
|
+
type: boolean
|
|
16
|
+
default: false
|
|
17
|
+
repository_dispatch:
|
|
18
|
+
types: [skill-updated]
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: write
|
|
22
|
+
pull-requests: write
|
|
23
|
+
|
|
24
|
+
jobs:
|
|
25
|
+
update:
|
|
26
|
+
name: Update vendored inspect skills
|
|
27
|
+
runs-on: ubuntu-latest
|
|
28
|
+
steps:
|
|
29
|
+
- name: Checkout repository
|
|
30
|
+
uses: actions/checkout@v4
|
|
31
|
+
with:
|
|
32
|
+
fetch-depth: 0
|
|
33
|
+
|
|
34
|
+
- name: Set up Python
|
|
35
|
+
uses: actions/setup-python@v5
|
|
36
|
+
with:
|
|
37
|
+
python-version: "3.11"
|
|
38
|
+
|
|
39
|
+
- name: Install uv
|
|
40
|
+
uses: astral-sh/setup-uv@v5
|
|
41
|
+
|
|
42
|
+
- name: Install dependencies
|
|
43
|
+
run: uv sync --all-extras
|
|
44
|
+
|
|
45
|
+
- name: Update vendored skills
|
|
46
|
+
env:
|
|
47
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
48
|
+
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
49
|
+
UPSTREAM_SKILL_URL: https://github.com/sanityops-org/sanityops-inspect-lite.git
|
|
50
|
+
run: |
|
|
51
|
+
FLAGS=""
|
|
52
|
+
if [ "${{ inputs.force }}" = "true" ]; then FLAGS="$FLAGS --force"; fi
|
|
53
|
+
if [ "${{ inputs.dry_run }}" = "true" ]; then FLAGS="$FLAGS --dry-run"; fi
|
|
54
|
+
uv run python scripts/ci_sync_skills.py $FLAGS
|
|
@@ -9,24 +9,57 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
9
9
|
|
|
10
10
|
### Added
|
|
11
11
|
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
12
|
+
- Skill-based two-agent inspect pipeline: an ExtractAgent (vendored
|
|
13
|
+
`pre-inspect-extract` skill) segments configured documents into inspectable
|
|
14
|
+
artifacts with per-artifact completeness, tier (L), and verbatim evidence,
|
|
15
|
+
then an InspectAgent (vendored `sanityops-inspect-lite` skill) runs the
|
|
16
|
+
seven-stage SanityOps Framework inspection flow and emits the markdown
|
|
17
|
+
report plus a machine-readable summary block
|
|
18
|
+
- Vendored inspect skills under `src/sanityops_cli/skills/` with recorded
|
|
19
|
+
upstream provenance (`VERSION.json`), materialized at runtime and loaded
|
|
20
|
+
lazily through the agent skill tool
|
|
21
|
+
- `scripts/sync_skills.py` and `scripts/ci_sync_skills.py` plus a scheduled
|
|
22
|
+
GitHub Actions workflow that updates the vendored skills and opens a pull
|
|
23
|
+
request when upstream changes
|
|
24
|
+
- New `inspect` options: `--skip-extract` (inject configured files verbatim,
|
|
25
|
+
no upload) and `--strict`/`--fail-on-defect` (exit 1 on QC gate failure,
|
|
26
|
+
Inspect P0 defects, or missing report stages)
|
|
27
|
+
- New config keys: `report_language`, `attribution`, `context_window`, and
|
|
28
|
+
`qc_lint.declared_dependencies`
|
|
29
|
+
- Per-document IR audit files written to
|
|
30
|
+
`.sanityops/results/ir/<run-id>/` for every inspection run
|
|
31
|
+
- QC lint rules QC-0.4 (Fence Integrity), QC-0.5 (Language-Content Mismatch),
|
|
32
|
+
QC-1.2 (Invalid Import), QC-1.3 (Deprecated API Usage), QC-4.1
|
|
33
|
+
(Snippet-Artifact Declaration Mismatch), and QC-4.2 (Snippet-Body
|
|
34
|
+
Version/API Drift), bringing the program checker to the 17-item checklist
|
|
35
|
+
v2; hybrid items pre-screen deterministically and emit candidates for the
|
|
36
|
+
inspection agent to confirm instead of failing outright
|
|
15
37
|
|
|
16
38
|
### Changed
|
|
17
39
|
|
|
18
|
-
- **Breaking**:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
40
|
+
- **Breaking**: `inspect` no longer accepts `--skip-defect-check`; the
|
|
41
|
+
pipeline now always runs extraction followed by inspection
|
|
42
|
+
- `inspect` exit codes: `2` for configuration/manifest errors, extraction
|
|
43
|
+
failure, or an unparseable summary; `1` only under `--strict`
|
|
44
|
+
- Auto-upload now packs the extracted artifacts (not the previous scan
|
|
45
|
+
result); `--skip-extract` never uploads
|
|
46
|
+
- Project auto-creation during upload preserves the configured `project.name`
|
|
47
|
+
and writes the binding back to the exact config file passed via `--config`
|
|
22
48
|
|
|
23
|
-
###
|
|
49
|
+
### Removed
|
|
50
|
+
|
|
51
|
+
- **Breaking**: the `defect-check` SDK dependency and the local
|
|
52
|
+
`defect_checker/` module; inspection rules now come from the vendored
|
|
53
|
+
`sanityops-inspect-lite` skill
|
|
54
|
+
- The ScannerAgent (`agents/scanner_agent/`); extraction is performed by the
|
|
55
|
+
skill-driven ExtractAgent
|
|
24
56
|
|
|
25
|
-
|
|
26
|
-
misleading "No defects found" in markdown reports
|
|
27
|
-
- Duplicate defects reported under both `$.inputSchema` and `$.parameters`
|
|
28
|
-
are deduplicated in terminal and markdown output
|
|
57
|
+
### Fixed
|
|
29
58
|
|
|
59
|
+
- Tool schema uploads emit the provider-neutral flat format
|
|
60
|
+
`{name, description, parameters}` for all extracted tools
|
|
61
|
+
- Failed module inspections render a CAUTION callout instead of a misleading
|
|
62
|
+
"No defects found" in the seven-stage report
|
|
30
63
|
## [0.0.8] - 2026-09-21
|
|
31
64
|
|
|
32
65
|
### Added
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: sanityops-cli
|
|
3
|
-
Version: 0.1
|
|
3
|
+
Version: 2.0.1
|
|
4
4
|
Summary: CLI tool for static defect inspection of AI logical artifacts
|
|
5
5
|
Project-URL: Homepage, https://sanityops.org
|
|
6
6
|
Project-URL: Documentation, https://sanityops.org
|
|
@@ -22,12 +22,13 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
22
22
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
23
|
Classifier: Topic :: Software Development :: Quality Assurance
|
|
24
24
|
Requires-Python: >=3.11
|
|
25
|
+
Requires-Dist: anthropic<1.0,>=0.39
|
|
25
26
|
Requires-Dist: anyio>=4.0
|
|
26
|
-
Requires-Dist: defect-check>=0.0.1
|
|
27
27
|
Requires-Dist: httpx>=0.27
|
|
28
|
+
Requires-Dist: pydantic>=2.0
|
|
28
29
|
Requires-Dist: pyyaml>=6.0
|
|
29
30
|
Requires-Dist: rich>=13.0
|
|
30
|
-
Requires-Dist: sanityops-agent>=0.
|
|
31
|
+
Requires-Dist: sanityops-agent>=0.1.2
|
|
31
32
|
Requires-Dist: tomli-w>=1.0
|
|
32
33
|
Requires-Dist: tomli>=2.0
|
|
33
34
|
Requires-Dist: typer>=0.12
|
|
@@ -46,15 +47,16 @@ A command-line tool for static defect inspection of AI logical artifacts (System
|
|
|
46
47
|
|
|
47
48
|
## Features
|
|
48
49
|
|
|
49
|
-
- **
|
|
50
|
+
- **Skill-based two-stage inspection** — an extraction stage segments the documents into inspectable artifacts, then a seven-stage inspection flow checks them against the SanityOps Framework checklists
|
|
50
51
|
- **Multiple artifact types** — Inspect System Prompts, Skills, and Tool Schemas
|
|
51
|
-
- **
|
|
52
|
+
- **Code Contract (QC) lint** — a zero-token program check runs before any LLM spend
|
|
53
|
+
- **CI/CD friendly** — Non-interactive runs, configuration via environment variables, dated markdown reports for pipeline artifacts, `--strict` exit gates
|
|
52
54
|
- **Configurable rules** — Customize inspection behavior via YAML configuration
|
|
53
55
|
|
|
54
56
|
## Prerequisites
|
|
55
57
|
|
|
56
58
|
- **Python >= 3.11** — only needed when installing from PyPI or source; the curl/PowerShell installers ship a standalone binary with no Python requirement.
|
|
57
|
-
- **An LLM API key** — artifact
|
|
59
|
+
- **An LLM API key** — artifact extraction and inspection are LLM-powered. Use Anthropic, OpenAI, or any compatible provider, configured either in the `model:` section of the config file or via `LLM_*` environment variables (see [Environment Variables](#environment-variables)).
|
|
58
60
|
- **Optional: a Sanityops server API key** — only if you want scanned artifacts uploaded to the Sanityops web dashboard. See [Data Handling](#data-handling) before enabling this.
|
|
59
61
|
|
|
60
62
|
## Installation
|
|
@@ -134,37 +136,40 @@ tools:
|
|
|
134
136
|
- file: tools/search_tools.json
|
|
135
137
|
|
|
136
138
|
skills:
|
|
137
|
-
- file: skills/code_review.md # file
|
|
139
|
+
- file: skills/code_review.md # a file or a directory of SKILL.md files
|
|
138
140
|
```
|
|
139
141
|
|
|
140
142
|
### 3. Run Inspection
|
|
141
143
|
|
|
142
144
|
```bash
|
|
143
|
-
# Standard
|
|
145
|
+
# Standard run: extraction + seven-stage inspection
|
|
144
146
|
sanityops-cli inspect
|
|
145
147
|
|
|
146
|
-
#
|
|
147
|
-
sanityops-cli inspect --
|
|
148
|
-
|
|
149
|
-
# Deep inspection (L3 depth)
|
|
150
|
-
sanityops-cli inspect --check-level L3
|
|
151
|
-
|
|
152
|
-
# Skip defect check, only analyze artifacts
|
|
153
|
-
sanityops-cli inspect --skip-defect-check
|
|
148
|
+
# Skip the extraction stage (inject configured files verbatim, no upload)
|
|
149
|
+
sanityops-cli inspect --skip-extract
|
|
154
150
|
|
|
155
151
|
# Use custom config file
|
|
156
152
|
sanityops-cli inspect --config path/to/config.yaml
|
|
153
|
+
|
|
154
|
+
# CI gate: exit 1 on QC gate failure, P0 defects, or missing stages
|
|
155
|
+
sanityops-cli inspect --strict
|
|
157
156
|
```
|
|
158
157
|
|
|
159
|
-
> **Data upload notice:** if a Sanityops server API key is configured (`server.api_key` or `SANITYOPS_API_KEY`), `inspect` automatically uploads the
|
|
158
|
+
> **Data upload notice:** if a Sanityops server API key is configured (`server.api_key` or `SANITYOPS_API_KEY`), `inspect` automatically uploads the extracted artifacts to the Sanityops server after extraction (`--skip-extract` never uploads). Without an API key, everything stays on your machine. See [Data Handling](#data-handling).
|
|
159
|
+
|
|
160
|
+
`inspect` exit codes:
|
|
161
|
+
|
|
162
|
+
- `0` — run completed (defects, if any, are in the report)
|
|
163
|
+
- `1` — `--strict` and the QC gate failed, Inspect P0 defects were found, or report stages are missing
|
|
164
|
+
- `2` — configuration/manifest errors, extraction failure, or an unparseable inspection summary
|
|
160
165
|
|
|
161
|
-
|
|
166
|
+
Without `--strict`, the run exits `0` even when defects are found; CI pipelines should either pass `--strict` or gate on the generated report (`.sanityops/results/inspect-*.md`).
|
|
162
167
|
|
|
163
168
|
## Data Handling
|
|
164
169
|
|
|
165
170
|
What leaves your machine, and when:
|
|
166
171
|
|
|
167
|
-
- **Local by default.** Artifact
|
|
172
|
+
- **Local by default.** Artifact extraction and inspection run on your machine and send artifact content only to the LLM provider you configure (`model:` section or `LLM_*` environment variables). Without a Sanityops server API key, nothing is uploaded to the Sanityops server.
|
|
168
173
|
- **Auto-upload is keyed to the server API key.** If `server.api_key` (or `SANITYOPS_API_KEY`) is set, `inspect` uploads the scanned artifacts — System Prompts, Tool Schemas, Skills — to the Sanityops server after analysis, so they appear in the web dashboard. The first such run also creates the project on the server and binds `project.id`.
|
|
169
174
|
- **Server destination.** `server.base_url` defaults to the Sanityops SaaS service (`https://demo.sanityops.org`). Only change it if you run a private deployment:
|
|
170
175
|
|
|
@@ -220,7 +225,7 @@ This ordering ensures CI/CD pipelines can override any project config by injecti
|
|
|
220
225
|
| `SANITYOPS_BASE_URL` | Override `server.base_url` (default: `https://demo.sanityops.org`) |
|
|
221
226
|
| `SANITYOPS_API_KEY` | Override `server.api_key`; when set, `inspect` auto-uploads artifacts to the server |
|
|
222
227
|
| `LLM_PROVIDER` | LLM provider (e.g., `anthropic`, `openai`) |
|
|
223
|
-
| `LLM_API_KEY` | LLM API key for
|
|
228
|
+
| `LLM_API_KEY` | LLM API key for extraction and inspection |
|
|
224
229
|
| `LLM_MODEL_ID` | LLM model ID (e.g., `claude-sonnet-4-20250514`) |
|
|
225
230
|
| `LLM_BASE_URL` | Custom LLM base URL |
|
|
226
231
|
|
|
@@ -228,28 +233,31 @@ This ordering ensures CI/CD pipelines can override any project config by injecti
|
|
|
228
233
|
|
|
229
234
|
### Agent Settings
|
|
230
235
|
|
|
231
|
-
You can tune the
|
|
236
|
+
You can tune the inspect agents in `.sanityops/inspect_config.yaml`:
|
|
232
237
|
|
|
233
238
|
```yaml
|
|
234
239
|
agent:
|
|
235
|
-
max_loops: 60 # Maximum agent execution loops
|
|
236
|
-
token_budget: 200000 # Token budget
|
|
237
|
-
timeout: 1800 # Timeout in seconds (default: 1800 = 30min)
|
|
240
|
+
max_loops: 60 # Maximum agent execution loops per stage
|
|
241
|
+
token_budget: 200000 # Token budget per agent (inspect stage floors at 300000)
|
|
242
|
+
timeout: 1800 # Timeout in seconds per stage (default: 1800 = 30min)
|
|
243
|
+
|
|
244
|
+
# Pipeline settings
|
|
245
|
+
report_language: en # Report language for extraction IR and inspection report
|
|
246
|
+
attribution: auto # auto | single | collection — cross-artifact gating
|
|
247
|
+
context_window: 200000 # LLM context window used to derive the injection budget
|
|
248
|
+
qc_lint:
|
|
249
|
+
declared_dependencies: [] # External modules declared for QC-1.2 import checks
|
|
238
250
|
```
|
|
239
251
|
|
|
240
252
|
CLI flags (`--timeout`, `--token-budget`) override these values when explicitly set.
|
|
241
253
|
|
|
242
|
-
###
|
|
254
|
+
### Inspect Skills
|
|
243
255
|
|
|
244
|
-
|
|
256
|
+
The inspection rules are maintained in the [`sanityops-inspect-lite`](https://github.com/sanityops-org/sanityops-inspect-lite) repository and vendored into this package (`src/sanityops_cli/skills/`). The vendored copy records its upstream commit in `src/sanityops_cli/skills/VERSION.json`; a scheduled GitHub Actions workflow updates it and opens a pull request when upstream changes.
|
|
245
257
|
|
|
246
|
-
###
|
|
258
|
+
### Logging
|
|
247
259
|
|
|
248
|
-
|
|
249
|
-
|-------|-------------|----------|
|
|
250
|
-
| L1 | Fast | Quick validation during development |
|
|
251
|
-
| L2 | Standard | Default, balanced depth for regular use |
|
|
252
|
-
| L3 | Deep | Comprehensive analysis for production releases |
|
|
260
|
+
All CLI operations are logged to `~/.sanityops/logs/sanityops-cli-<YYYY-MM-DD>.log`. Logs include timestamps, log levels, and redacted API keys for security.
|
|
253
261
|
|
|
254
262
|
## Documentation
|
|
255
263
|
|
|
@@ -6,15 +6,16 @@ A command-line tool for static defect inspection of AI logical artifacts (System
|
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
-
- **
|
|
9
|
+
- **Skill-based two-stage inspection** — an extraction stage segments the documents into inspectable artifacts, then a seven-stage inspection flow checks them against the SanityOps Framework checklists
|
|
10
10
|
- **Multiple artifact types** — Inspect System Prompts, Skills, and Tool Schemas
|
|
11
|
-
- **
|
|
11
|
+
- **Code Contract (QC) lint** — a zero-token program check runs before any LLM spend
|
|
12
|
+
- **CI/CD friendly** — Non-interactive runs, configuration via environment variables, dated markdown reports for pipeline artifacts, `--strict` exit gates
|
|
12
13
|
- **Configurable rules** — Customize inspection behavior via YAML configuration
|
|
13
14
|
|
|
14
15
|
## Prerequisites
|
|
15
16
|
|
|
16
17
|
- **Python >= 3.11** — only needed when installing from PyPI or source; the curl/PowerShell installers ship a standalone binary with no Python requirement.
|
|
17
|
-
- **An LLM API key** — artifact
|
|
18
|
+
- **An LLM API key** — artifact extraction and inspection are LLM-powered. Use Anthropic, OpenAI, or any compatible provider, configured either in the `model:` section of the config file or via `LLM_*` environment variables (see [Environment Variables](#environment-variables)).
|
|
18
19
|
- **Optional: a Sanityops server API key** — only if you want scanned artifacts uploaded to the Sanityops web dashboard. See [Data Handling](#data-handling) before enabling this.
|
|
19
20
|
|
|
20
21
|
## Installation
|
|
@@ -94,37 +95,40 @@ tools:
|
|
|
94
95
|
- file: tools/search_tools.json
|
|
95
96
|
|
|
96
97
|
skills:
|
|
97
|
-
- file: skills/code_review.md # file
|
|
98
|
+
- file: skills/code_review.md # a file or a directory of SKILL.md files
|
|
98
99
|
```
|
|
99
100
|
|
|
100
101
|
### 3. Run Inspection
|
|
101
102
|
|
|
102
103
|
```bash
|
|
103
|
-
# Standard
|
|
104
|
+
# Standard run: extraction + seven-stage inspection
|
|
104
105
|
sanityops-cli inspect
|
|
105
106
|
|
|
106
|
-
#
|
|
107
|
-
sanityops-cli inspect --
|
|
108
|
-
|
|
109
|
-
# Deep inspection (L3 depth)
|
|
110
|
-
sanityops-cli inspect --check-level L3
|
|
111
|
-
|
|
112
|
-
# Skip defect check, only analyze artifacts
|
|
113
|
-
sanityops-cli inspect --skip-defect-check
|
|
107
|
+
# Skip the extraction stage (inject configured files verbatim, no upload)
|
|
108
|
+
sanityops-cli inspect --skip-extract
|
|
114
109
|
|
|
115
110
|
# Use custom config file
|
|
116
111
|
sanityops-cli inspect --config path/to/config.yaml
|
|
112
|
+
|
|
113
|
+
# CI gate: exit 1 on QC gate failure, P0 defects, or missing stages
|
|
114
|
+
sanityops-cli inspect --strict
|
|
117
115
|
```
|
|
118
116
|
|
|
119
|
-
> **Data upload notice:** if a Sanityops server API key is configured (`server.api_key` or `SANITYOPS_API_KEY`), `inspect` automatically uploads the
|
|
117
|
+
> **Data upload notice:** if a Sanityops server API key is configured (`server.api_key` or `SANITYOPS_API_KEY`), `inspect` automatically uploads the extracted artifacts to the Sanityops server after extraction (`--skip-extract` never uploads). Without an API key, everything stays on your machine. See [Data Handling](#data-handling).
|
|
118
|
+
|
|
119
|
+
`inspect` exit codes:
|
|
120
|
+
|
|
121
|
+
- `0` — run completed (defects, if any, are in the report)
|
|
122
|
+
- `1` — `--strict` and the QC gate failed, Inspect P0 defects were found, or report stages are missing
|
|
123
|
+
- `2` — configuration/manifest errors, extraction failure, or an unparseable inspection summary
|
|
120
124
|
|
|
121
|
-
|
|
125
|
+
Without `--strict`, the run exits `0` even when defects are found; CI pipelines should either pass `--strict` or gate on the generated report (`.sanityops/results/inspect-*.md`).
|
|
122
126
|
|
|
123
127
|
## Data Handling
|
|
124
128
|
|
|
125
129
|
What leaves your machine, and when:
|
|
126
130
|
|
|
127
|
-
- **Local by default.** Artifact
|
|
131
|
+
- **Local by default.** Artifact extraction and inspection run on your machine and send artifact content only to the LLM provider you configure (`model:` section or `LLM_*` environment variables). Without a Sanityops server API key, nothing is uploaded to the Sanityops server.
|
|
128
132
|
- **Auto-upload is keyed to the server API key.** If `server.api_key` (or `SANITYOPS_API_KEY`) is set, `inspect` uploads the scanned artifacts — System Prompts, Tool Schemas, Skills — to the Sanityops server after analysis, so they appear in the web dashboard. The first such run also creates the project on the server and binds `project.id`.
|
|
129
133
|
- **Server destination.** `server.base_url` defaults to the Sanityops SaaS service (`https://demo.sanityops.org`). Only change it if you run a private deployment:
|
|
130
134
|
|
|
@@ -180,7 +184,7 @@ This ordering ensures CI/CD pipelines can override any project config by injecti
|
|
|
180
184
|
| `SANITYOPS_BASE_URL` | Override `server.base_url` (default: `https://demo.sanityops.org`) |
|
|
181
185
|
| `SANITYOPS_API_KEY` | Override `server.api_key`; when set, `inspect` auto-uploads artifacts to the server |
|
|
182
186
|
| `LLM_PROVIDER` | LLM provider (e.g., `anthropic`, `openai`) |
|
|
183
|
-
| `LLM_API_KEY` | LLM API key for
|
|
187
|
+
| `LLM_API_KEY` | LLM API key for extraction and inspection |
|
|
184
188
|
| `LLM_MODEL_ID` | LLM model ID (e.g., `claude-sonnet-4-20250514`) |
|
|
185
189
|
| `LLM_BASE_URL` | Custom LLM base URL |
|
|
186
190
|
|
|
@@ -188,28 +192,31 @@ This ordering ensures CI/CD pipelines can override any project config by injecti
|
|
|
188
192
|
|
|
189
193
|
### Agent Settings
|
|
190
194
|
|
|
191
|
-
You can tune the
|
|
195
|
+
You can tune the inspect agents in `.sanityops/inspect_config.yaml`:
|
|
192
196
|
|
|
193
197
|
```yaml
|
|
194
198
|
agent:
|
|
195
|
-
max_loops: 60 # Maximum agent execution loops
|
|
196
|
-
token_budget: 200000 # Token budget
|
|
197
|
-
timeout: 1800 # Timeout in seconds (default: 1800 = 30min)
|
|
199
|
+
max_loops: 60 # Maximum agent execution loops per stage
|
|
200
|
+
token_budget: 200000 # Token budget per agent (inspect stage floors at 300000)
|
|
201
|
+
timeout: 1800 # Timeout in seconds per stage (default: 1800 = 30min)
|
|
202
|
+
|
|
203
|
+
# Pipeline settings
|
|
204
|
+
report_language: en # Report language for extraction IR and inspection report
|
|
205
|
+
attribution: auto # auto | single | collection — cross-artifact gating
|
|
206
|
+
context_window: 200000 # LLM context window used to derive the injection budget
|
|
207
|
+
qc_lint:
|
|
208
|
+
declared_dependencies: [] # External modules declared for QC-1.2 import checks
|
|
198
209
|
```
|
|
199
210
|
|
|
200
211
|
CLI flags (`--timeout`, `--token-budget`) override these values when explicitly set.
|
|
201
212
|
|
|
202
|
-
###
|
|
213
|
+
### Inspect Skills
|
|
203
214
|
|
|
204
|
-
|
|
215
|
+
The inspection rules are maintained in the [`sanityops-inspect-lite`](https://github.com/sanityops-org/sanityops-inspect-lite) repository and vendored into this package (`src/sanityops_cli/skills/`). The vendored copy records its upstream commit in `src/sanityops_cli/skills/VERSION.json`; a scheduled GitHub Actions workflow updates it and opens a pull request when upstream changes.
|
|
205
216
|
|
|
206
|
-
###
|
|
217
|
+
### Logging
|
|
207
218
|
|
|
208
|
-
|
|
209
|
-
|-------|-------------|----------|
|
|
210
|
-
| L1 | Fast | Quick validation during development |
|
|
211
|
-
| L2 | Standard | Default, balanced depth for regular use |
|
|
212
|
-
| L3 | Deep | Comprehensive analysis for production releases |
|
|
219
|
+
All CLI operations are logged to `~/.sanityops/logs/sanityops-cli-<YYYY-MM-DD>.log`. Logs include timestamps, log levels, and redacted API keys for security.
|
|
213
220
|
|
|
214
221
|
## Documentation
|
|
215
222
|
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "sanityops-cli"
|
|
7
|
-
version = "0.1
|
|
7
|
+
version = "2.0.1"
|
|
8
8
|
description = "CLI tool for static defect inspection of AI logical artifacts"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -31,9 +31,10 @@ dependencies = [
|
|
|
31
31
|
"httpx>=0.27",
|
|
32
32
|
"tomli>=2.0",
|
|
33
33
|
"tomli-w>=1.0",
|
|
34
|
-
"
|
|
34
|
+
"pydantic>=2.0",
|
|
35
|
+
"anthropic>=0.39,<1.0",
|
|
35
36
|
"pyyaml>=6.0",
|
|
36
|
-
"sanityops-agent>=0.
|
|
37
|
+
"sanityops-agent>=0.1.2",
|
|
37
38
|
"anyio>=4.0",
|
|
38
39
|
]
|
|
39
40
|
|