novahiz 0.1.0
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.
- package/LICENSE +202 -0
- package/NOTICE.md +46 -0
- package/README.md +123 -0
- package/adapters/README.md +13 -0
- package/adapters/opencode/agent/novahiz-agent.md +31 -0
- package/adapters/opencode/commands/novahiz-clean.md +15 -0
- package/adapters/opencode/commands/novahiz-doctor.md +9 -0
- package/adapters/opencode/commands/novahiz-plan.md +24 -0
- package/adapters/opencode/commands/novahiz-status.md +11 -0
- package/adapters/opencode/instructions.md +69 -0
- package/adapters/opencode/novahiz.ts +266 -0
- package/bin/novahiz.cmd +2 -0
- package/bin/novahiz.mjs +7 -0
- package/bundled-skills/AGENTS.md +50 -0
- package/bundled-skills/LICENSE +21 -0
- package/bundled-skills/README.md +202 -0
- package/bundled-skills/SKILL.md +313 -0
- package/bundled-skills/a11y-audit/SKILL.md +211 -0
- package/bundled-skills/a11y-audit/assets/sample-component.tsx +51 -0
- package/bundled-skills/a11y-audit/expected_outputs/sample-contrast-output.txt +39 -0
- package/bundled-skills/a11y-audit/expected_outputs/sample-scan-output.json +34 -0
- package/bundled-skills/a11y-audit/expected_outputs/sample-scan-report.md +63 -0
- package/bundled-skills/a11y-audit/references/aria-patterns.md +223 -0
- package/bundled-skills/a11y-audit/references/audit-report-template.md +46 -0
- package/bundled-skills/a11y-audit/references/ci-cd-integration.md +127 -0
- package/bundled-skills/a11y-audit/references/color-contrast-guide.md +83 -0
- package/bundled-skills/a11y-audit/references/examples-by-framework.md +312 -0
- package/bundled-skills/a11y-audit/references/framework-a11y-patterns.md +661 -0
- package/bundled-skills/a11y-audit/references/testing-checklist.md +41 -0
- package/bundled-skills/a11y-audit/references/wcag-22-new-criteria.md +79 -0
- package/bundled-skills/a11y-audit/references/wcag-quick-ref.md +113 -0
- package/bundled-skills/a11y-audit/scripts/a11y_scanner.py +684 -0
- package/bundled-skills/a11y-audit/scripts/contrast_checker.py +504 -0
- package/bundled-skills/ab-testing/SKILL.md +353 -0
- package/bundled-skills/ab-testing/evals/evals.json +105 -0
- package/bundled-skills/ab-testing/references/sample-size-guide.md +263 -0
- package/bundled-skills/ab-testing/references/test-templates.md +277 -0
- package/bundled-skills/ad-creative/SKILL.md +425 -0
- package/bundled-skills/ad-creative/assets/creative-review-template.html +400 -0
- package/bundled-skills/ad-creative/evals/evals.json +217 -0
- package/bundled-skills/ad-creative/references/creative-review-page.md +106 -0
- package/bundled-skills/ad-creative/references/creative-roadmap.md +118 -0
- package/bundled-skills/ad-creative/references/generative-tools.md +637 -0
- package/bundled-skills/ad-creative/references/hook-system.md +115 -0
- package/bundled-skills/ad-creative/references/imessage-video-ads.md +201 -0
- package/bundled-skills/ad-creative/references/meta-creative-formats.md +114 -0
- package/bundled-skills/ad-creative/references/motion-video-ads.md +126 -0
- package/bundled-skills/ad-creative/references/platform-specs.md +213 -0
- package/bundled-skills/ad-creative/references/short-form-video-specs.md +213 -0
- package/bundled-skills/ad-creative/references/static-ad-templates.md +308 -0
- package/bundled-skills/ads/SKILL.md +499 -0
- package/bundled-skills/ads/evals/evals.json +157 -0
- package/bundled-skills/ads/references/abm-playbook.md +93 -0
- package/bundled-skills/ads/references/ad-copy-templates.md +207 -0
- package/bundled-skills/ads/references/audience-targeting.md +243 -0
- package/bundled-skills/ads/references/audit-guardrails.md +83 -0
- package/bundled-skills/ads/references/b2b-paid-playbook.md +115 -0
- package/bundled-skills/ads/references/conversion-tracking.md +361 -0
- package/bundled-skills/ads/references/creative-research-automation.md +103 -0
- package/bundled-skills/ads/references/google-ads-audit-checklist.md +84 -0
- package/bundled-skills/ads/references/google-search-playbook.md +120 -0
- package/bundled-skills/ads/references/linkedin-b2b-playbook.md +107 -0
- package/bundled-skills/ads/references/meta-decision-system.md +176 -0
- package/bundled-skills/ads/references/payback-period.md +69 -0
- package/bundled-skills/ads/references/platform-setup-checklists.md +277 -0
- package/bundled-skills/ads/references/rsa-output-spec.md +88 -0
- package/bundled-skills/adversarial-reviewer/SKILL.md +247 -0
- package/bundled-skills/agent-device/SKILL.md +20 -0
- package/bundled-skills/ai-seo/SKILL.md +488 -0
- package/bundled-skills/ai-seo/evals/evals.json +135 -0
- package/bundled-skills/ai-seo/references/agent-readiness.md +57 -0
- package/bundled-skills/ai-seo/references/citations-vs-recommendations.md +85 -0
- package/bundled-skills/ai-seo/references/content-patterns.md +287 -0
- package/bundled-skills/ai-seo/references/content-types.md +71 -0
- package/bundled-skills/ai-seo/references/format-volatility.md +98 -0
- package/bundled-skills/ai-seo/references/okf.md +104 -0
- package/bundled-skills/ai-seo/references/platform-ranking-factors.md +154 -0
- package/bundled-skills/ai-seo/references/youtube-ai-citations.md +60 -0
- package/bundled-skills/analytics/SKILL.md +310 -0
- package/bundled-skills/analytics/evals/evals.json +90 -0
- package/bundled-skills/analytics/references/event-library.md +260 -0
- package/bundled-skills/analytics/references/ga4-implementation.md +300 -0
- package/bundled-skills/analytics/references/gtm-implementation.md +390 -0
- package/bundled-skills/android-emulator/SKILL.md +32 -0
- package/bundled-skills/anti-AI-design/SKILL.md +189 -0
- package/bundled-skills/anti-pattern-detector/SKILL.md +185 -0
- package/bundled-skills/anti-pattern-detector/references/async-network-patterns.md +581 -0
- package/bundled-skills/anti-pattern-detector/references/build-deploy-patterns.md +554 -0
- package/bundled-skills/anti-pattern-detector/references/cache-patterns.md +446 -0
- package/bundled-skills/anti-pattern-detector/references/cloud-infra-patterns.md +538 -0
- package/bundled-skills/anti-pattern-detector/references/concurrency-patterns.md +558 -0
- package/bundled-skills/anti-pattern-detector/references/language-specific-patterns.md +740 -0
- package/bundled-skills/anti-pattern-detector/references/monitoring-patterns.md +456 -0
- package/bundled-skills/api-design-reviewer/SKILL.md +433 -0
- package/bundled-skills/api-design-reviewer/references/api_antipatterns.md +680 -0
- package/bundled-skills/api-design-reviewer/references/rest_design_rules.md +487 -0
- package/bundled-skills/api-design-reviewer/scripts/api_linter.py +956 -0
- package/bundled-skills/api-design-reviewer/scripts/api_scorecard.py +1661 -0
- package/bundled-skills/api-design-reviewer/scripts/breaking_change_detector.py +1102 -0
- package/bundled-skills/apple-hig-expert/SKILL.md +108 -0
- package/bundled-skills/apple-hig-expert/references/accessibility.md +55 -0
- package/bundled-skills/apple-hig-expert/references/platform-specifics.md +48 -0
- package/bundled-skills/apple-hig-expert/references/visual-design.md +69 -0
- package/bundled-skills/apple-hig-expert/scripts/hig_checker.py +97 -0
- package/bundled-skills/apple-hig-expert/templates/hig-audit-template.md +83 -0
- package/bundled-skills/build-graph/SKILL.md +38 -0
- package/bundled-skills/claude-history-ingest/SKILL.md +463 -0
- package/bundled-skills/claude-history-ingest/references/claude-data-format.md +118 -0
- package/bundled-skills/clean-code/SKILL.md +99 -0
- package/bundled-skills/code-reviewer/README.md +92 -0
- package/bundled-skills/code-reviewer/SKILL.md +183 -0
- package/bundled-skills/code-reviewer/assets/sample_c_clean.c +71 -0
- package/bundled-skills/code-reviewer/assets/sample_c_smells.c +66 -0
- package/bundled-skills/code-reviewer/assets/sample_csharp_clean.cs +100 -0
- package/bundled-skills/code-reviewer/assets/sample_csharp_smells.cs +78 -0
- package/bundled-skills/code-reviewer/assets/sample_java_clean.java +55 -0
- package/bundled-skills/code-reviewer/assets/sample_java_smells.java +56 -0
- package/bundled-skills/code-reviewer/expected_outputs/sample_c_clean_quality.json +65 -0
- package/bundled-skills/code-reviewer/expected_outputs/sample_c_smells_quality.json +155 -0
- package/bundled-skills/code-reviewer/expected_outputs/sample_csharp_clean_quality.json +135 -0
- package/bundled-skills/code-reviewer/expected_outputs/sample_csharp_smells_quality.json +143 -0
- package/bundled-skills/code-reviewer/expected_outputs/sample_java_clean_quality.json +53 -0
- package/bundled-skills/code-reviewer/expected_outputs/sample_java_smells_quality.json +83 -0
- package/bundled-skills/code-reviewer/languages/c.md +103 -0
- package/bundled-skills/code-reviewer/languages/cpp.md +103 -0
- package/bundled-skills/code-reviewer/languages/csharp.md +97 -0
- package/bundled-skills/code-reviewer/languages/dart.md +108 -0
- package/bundled-skills/code-reviewer/languages/go.md +92 -0
- package/bundled-skills/code-reviewer/languages/java.md +103 -0
- package/bundled-skills/code-reviewer/languages/kotlin.md +88 -0
- package/bundled-skills/code-reviewer/languages/php.md +109 -0
- package/bundled-skills/code-reviewer/languages/python.md +94 -0
- package/bundled-skills/code-reviewer/languages/ruby.md +105 -0
- package/bundled-skills/code-reviewer/languages/rust.md +99 -0
- package/bundled-skills/code-reviewer/languages/swift.md +88 -0
- package/bundled-skills/code-reviewer/languages/typescript.md +97 -0
- package/bundled-skills/code-reviewer/rules/universal.md +49 -0
- package/bundled-skills/code-reviewer/scripts/code_quality_checker.py +1020 -0
- package/bundled-skills/code-reviewer/scripts/pr_analyzer.py +535 -0
- package/bundled-skills/code-reviewer/scripts/review_report_generator.py +505 -0
- package/bundled-skills/code-understand/SKILL.md +90 -0
- package/bundled-skills/codex-history-ingest/SKILL.md +248 -0
- package/bundled-skills/codex-history-ingest/references/codex-data-format.md +82 -0
- package/bundled-skills/cold-email/SKILL.md +159 -0
- package/bundled-skills/cold-email/evals/evals.json +94 -0
- package/bundled-skills/cold-email/references/benchmarks.md +83 -0
- package/bundled-skills/cold-email/references/follow-up-sequences.md +81 -0
- package/bundled-skills/cold-email/references/frameworks.md +90 -0
- package/bundled-skills/cold-email/references/personalization.md +79 -0
- package/bundled-skills/cold-email/references/subject-lines.md +53 -0
- package/bundled-skills/competitor-profiling/SKILL.md +415 -0
- package/bundled-skills/competitor-profiling/evals/evals.json +85 -0
- package/bundled-skills/competitor-profiling/references/templates.md +167 -0
- package/bundled-skills/competitor-profiling/references/tool-reference.md +179 -0
- package/bundled-skills/computer-use/SKILL.md +41 -0
- package/bundled-skills/content-strategy/SKILL.md +439 -0
- package/bundled-skills/content-strategy/evals/evals.json +116 -0
- package/bundled-skills/content-strategy/references/content-distribution.md +83 -0
- package/bundled-skills/content-strategy/references/headless-cms.md +194 -0
- package/bundled-skills/copilot-history-ingest/SKILL.md +376 -0
- package/bundled-skills/copilot-history-ingest/references/copilot-data-format.md +321 -0
- package/bundled-skills/copy-editing/SKILL.md +457 -0
- package/bundled-skills/copy-editing/evals/evals.json +89 -0
- package/bundled-skills/copy-editing/references/checklist.md +66 -0
- package/bundled-skills/copy-editing/references/content-refresh.md +38 -0
- package/bundled-skills/copy-editing/references/plain-english-alternatives.md +394 -0
- package/bundled-skills/copywriting/SKILL.md +256 -0
- package/bundled-skills/copywriting/evals/evals.json +126 -0
- package/bundled-skills/copywriting/references/copy-frameworks.md +433 -0
- package/bundled-skills/copywriting/references/natural-transitions.md +272 -0
- package/bundled-skills/cro/SKILL.md +187 -0
- package/bundled-skills/cro/evals/evals.json +111 -0
- package/bundled-skills/cro/references/experiments.md +248 -0
- package/bundled-skills/cro/references/form.md +422 -0
- package/bundled-skills/cross-linker/SKILL.md +309 -0
- package/bundled-skills/customer-research/SKILL.md +305 -0
- package/bundled-skills/customer-research/evals/evals.json +176 -0
- package/bundled-skills/customer-research/references/interviews-and-surveys.md +155 -0
- package/bundled-skills/customer-research/references/source-guides.md +401 -0
- package/bundled-skills/daily-update/SKILL.md +223 -0
- package/bundled-skills/dart-add-unit-test/SKILL.md +122 -0
- package/bundled-skills/dart-build-cli-app/SKILL.md +185 -0
- package/bundled-skills/dart-collect-coverage/SKILL.md +141 -0
- package/bundled-skills/dart-fix-runtime-errors/SKILL.md +166 -0
- package/bundled-skills/dart-generate-test-mocks/SKILL.md +155 -0
- package/bundled-skills/dart-migrate-to-checks-package/SKILL.md +528 -0
- package/bundled-skills/dart-resolve-package-conflicts/SKILL.md +116 -0
- package/bundled-skills/dart-run-static-analysis/SKILL.md +104 -0
- package/bundled-skills/dart-setup-ffi-assets/SKILL.md +419 -0
- package/bundled-skills/dart-use-doc-examples/SKILL.md +96 -0
- package/bundled-skills/dart-use-ffigen/SKILL.md +218 -0
- package/bundled-skills/dart-use-pattern-matching/SKILL.md +146 -0
- package/bundled-skills/dart-use-primary-constructors/SKILL.md +262 -0
- package/bundled-skills/dart-write-documentation/SKILL.md +136 -0
- package/bundled-skills/database-designer/README.md +388 -0
- package/bundled-skills/database-designer/SKILL.md +314 -0
- package/bundled-skills/database-designer/assets/sample_query_patterns.json +375 -0
- package/bundled-skills/database-designer/assets/sample_schema.json +372 -0
- package/bundled-skills/database-designer/assets/sample_schema.sql +207 -0
- package/bundled-skills/database-designer/expected_outputs/index_optimization_sample.txt +60 -0
- package/bundled-skills/database-designer/expected_outputs/migration_sample.txt +124 -0
- package/bundled-skills/database-designer/expected_outputs/schema_analysis_sample.txt +222 -0
- package/bundled-skills/database-designer/index_optimizer.py +926 -0
- package/bundled-skills/database-designer/migration_generator.py +1199 -0
- package/bundled-skills/database-designer/references/database-design-reference.md +476 -0
- package/bundled-skills/database-designer/references/database_selection_decision_tree.md +373 -0
- package/bundled-skills/database-designer/references/index_strategy_patterns.md +424 -0
- package/bundled-skills/database-designer/references/normalization_guide.md +354 -0
- package/bundled-skills/database-designer/schema_analyzer.py +982 -0
- package/bundled-skills/debug-issue/SKILL.md +28 -0
- package/bundled-skills/defuddle/SKILL.md +41 -0
- package/bundled-skills/dependency-auditor/README.md +524 -0
- package/bundled-skills/dependency-auditor/SKILL.md +85 -0
- package/bundled-skills/dependency-auditor/assets/sample_go.mod +53 -0
- package/bundled-skills/dependency-auditor/assets/sample_package.json +72 -0
- package/bundled-skills/dependency-auditor/assets/sample_requirements.txt +71 -0
- package/bundled-skills/dependency-auditor/expected_outputs/sample_license_report.txt +37 -0
- package/bundled-skills/dependency-auditor/expected_outputs/sample_upgrade_plan.txt +59 -0
- package/bundled-skills/dependency-auditor/expected_outputs/sample_vulnerability_report.json +71 -0
- package/bundled-skills/dependency-auditor/references/dependency_management_best_practices.md +643 -0
- package/bundled-skills/dependency-auditor/references/license_compatibility_matrix.md +238 -0
- package/bundled-skills/dependency-auditor/references/vulnerability_assessment_guide.md +461 -0
- package/bundled-skills/dependency-auditor/scripts/dep_scanner.py +794 -0
- package/bundled-skills/dependency-auditor/scripts/license_checker.py +996 -0
- package/bundled-skills/dependency-auditor/scripts/upgrade_planner.py +1029 -0
- package/bundled-skills/dependency-auditor/test-inventory.json +421 -0
- package/bundled-skills/dependency-auditor/test-project/package.json +72 -0
- package/bundled-skills/design-taste-frontend/SKILL.md +247 -0
- package/bundled-skills/dogfood/SKILL.md +27 -0
- package/bundled-skills/eas-app-stores/SKILL.md +176 -0
- package/bundled-skills/eas-app-stores/agents/openai.yaml +4 -0
- package/bundled-skills/eas-app-stores/references/app-store-metadata.md +497 -0
- package/bundled-skills/eas-app-stores/references/ios-app-store.md +376 -0
- package/bundled-skills/eas-app-stores/references/native-ios.md +167 -0
- package/bundled-skills/eas-app-stores/references/play-store.md +244 -0
- package/bundled-skills/eas-app-stores/references/testflight.md +62 -0
- package/bundled-skills/eas-app-stores/references/workflows.md +120 -0
- package/bundled-skills/eas-hosting/SKILL.md +431 -0
- package/bundled-skills/eas-hosting/agents/openai.yaml +4 -0
- package/bundled-skills/eas-observe/SKILL.md +54 -0
- package/bundled-skills/eas-observe/agents/openai.yaml +4 -0
- package/bundled-skills/eas-observe/references/metrics.md +98 -0
- package/bundled-skills/eas-observe/references/queries.md +403 -0
- package/bundled-skills/eas-observe/references/setup.md +476 -0
- package/bundled-skills/eas-observe/references/third-party.md +136 -0
- package/bundled-skills/eas-simulator/SKILL.md +208 -0
- package/bundled-skills/eas-simulator/agents/openai.yaml +4 -0
- package/bundled-skills/eas-simulator/references/controllers.md +106 -0
- package/bundled-skills/eas-simulator/references/run-your-app.md +224 -0
- package/bundled-skills/eas-simulator/references/troubleshooting.md +44 -0
- package/bundled-skills/eas-update/SKILL.md +146 -0
- package/bundled-skills/eas-update/agents/openai.yaml +4 -0
- package/bundled-skills/eas-update-insights/SKILL.md +238 -0
- package/bundled-skills/eas-update-insights/agents/openai.yaml +4 -0
- package/bundled-skills/eas-update-insights/references/channel-insights-schema.md +47 -0
- package/bundled-skills/eas-update-insights/references/update-insights-schema.md +69 -0
- package/bundled-skills/eas-workflows/SKILL.md +99 -0
- package/bundled-skills/eas-workflows/agents/openai.yaml +4 -0
- package/bundled-skills/eas-workflows/scripts/fetch.js +109 -0
- package/bundled-skills/eas-workflows/scripts/package.json +6 -0
- package/bundled-skills/emails/SKILL.md +311 -0
- package/bundled-skills/emails/evals/evals.json +93 -0
- package/bundled-skills/emails/references/copy-guidelines.md +113 -0
- package/bundled-skills/emails/references/email-types.md +515 -0
- package/bundled-skills/emails/references/sequence-templates.md +168 -0
- package/bundled-skills/engineering-standards/SKILL.md +736 -0
- package/bundled-skills/env-secrets-manager/SKILL.md +260 -0
- package/bundled-skills/env-secrets-manager/references/secret-patterns.md +41 -0
- package/bundled-skills/env-secrets-manager/references/validation-detection-rotation.md +358 -0
- package/bundled-skills/env-secrets-manager/scripts/env_auditor.py +145 -0
- package/bundled-skills/explore-codebase/SKILL.md +29 -0
- package/bundled-skills/expo-animation/LICENSE +21 -0
- package/bundled-skills/expo-animation/RECIPES.md +385 -0
- package/bundled-skills/expo-animation/SKILL.md +267 -0
- package/bundled-skills/expo-animation/agents/openai.yaml +4 -0
- package/bundled-skills/expo-app-clip/SKILL.md +290 -0
- package/bundled-skills/expo-app-clip/agents/openai.yaml +4 -0
- package/bundled-skills/expo-app-clip/references/native-module.md +96 -0
- package/bundled-skills/expo-brownfield/SKILL.md +62 -0
- package/bundled-skills/expo-brownfield/agents/openai.yaml +4 -0
- package/bundled-skills/expo-brownfield/references/brownfield-integrated.md +526 -0
- package/bundled-skills/expo-brownfield/references/brownfield-isolated.md +451 -0
- package/bundled-skills/expo-brownfield/references/comparison.md +63 -0
- package/bundled-skills/expo-brownfield/references/troubleshooting.md +88 -0
- package/bundled-skills/expo-data-fetching/SKILL.md +478 -0
- package/bundled-skills/expo-data-fetching/agents/openai.yaml +4 -0
- package/bundled-skills/expo-data-fetching/references/expo-router-loaders.md +341 -0
- package/bundled-skills/expo-data-fetching/references/offline-and-cancellation.md +68 -0
- package/bundled-skills/expo-design-system/SKILL.md +376 -0
- package/bundled-skills/expo-design-system/agents/openai.yaml +4 -0
- package/bundled-skills/expo-design-system/references/audit.md +190 -0
- package/bundled-skills/expo-design-system/references/native-slop.md +74 -0
- package/bundled-skills/expo-dev-client/SKILL.md +182 -0
- package/bundled-skills/expo-dev-client/agents/openai.yaml +4 -0
- package/bundled-skills/expo-dom/SKILL.md +425 -0
- package/bundled-skills/expo-dom/agents/openai.yaml +4 -0
- package/bundled-skills/expo-examples/SKILL.md +106 -0
- package/bundled-skills/expo-examples/agents/openai.yaml +4 -0
- package/bundled-skills/expo-examples/references/catalog.md +105 -0
- package/bundled-skills/expo-migrate-module/SKILL.md +113 -0
- package/bundled-skills/expo-migrate-module/agents/openai.yaml +4 -0
- package/bundled-skills/expo-migrate-module/references/compatibility.md +73 -0
- package/bundled-skills/expo-migrate-module/references/example.md +212 -0
- package/bundled-skills/expo-migrate-module/references/migration-map.md +306 -0
- package/bundled-skills/expo-module/SKILL.md +151 -0
- package/bundled-skills/expo-module/agents/openai.yaml +4 -0
- package/bundled-skills/expo-module/references/config-plugin.md +90 -0
- package/bundled-skills/expo-module/references/create-expo-module.md +206 -0
- package/bundled-skills/expo-module/references/lifecycle.md +127 -0
- package/bundled-skills/expo-module/references/module-config.md +48 -0
- package/bundled-skills/expo-module/references/native-module.md +286 -0
- package/bundled-skills/expo-module/references/native-view.md +171 -0
- package/bundled-skills/expo-native-ui/SKILL.md +201 -0
- package/bundled-skills/expo-native-ui/agents/openai.yaml +4 -0
- package/bundled-skills/expo-native-ui/references/controls.md +231 -0
- package/bundled-skills/expo-native-ui/references/gradients.md +106 -0
- package/bundled-skills/expo-native-ui/references/icons.md +232 -0
- package/bundled-skills/expo-native-ui/references/media.md +193 -0
- package/bundled-skills/expo-native-ui/references/storage.md +121 -0
- package/bundled-skills/expo-native-ui/references/visual-effects.md +198 -0
- package/bundled-skills/expo-native-ui/references/webgpu-three.md +605 -0
- package/bundled-skills/expo-overview/SKILL.md +115 -0
- package/bundled-skills/expo-overview/agents/openai.yaml +4 -0
- package/bundled-skills/expo-project-structure/SKILL.md +114 -0
- package/bundled-skills/expo-project-structure/agents/openai.yaml +4 -0
- package/bundled-skills/expo-router/SKILL.md +240 -0
- package/bundled-skills/expo-router/agents/openai.yaml +4 -0
- package/bundled-skills/expo-router/references/form-sheet.md +253 -0
- package/bundled-skills/expo-router/references/route-structure.md +229 -0
- package/bundled-skills/expo-router/references/search.md +248 -0
- package/bundled-skills/expo-router/references/tabs.md +433 -0
- package/bundled-skills/expo-router/references/toolbar-and-headers.md +284 -0
- package/bundled-skills/expo-router/references/zoom-transitions.md +158 -0
- package/bundled-skills/expo-skill-eval/SKILL.md +314 -0
- package/bundled-skills/expo-skill-eval/agents/visual-grader.md +52 -0
- package/bundled-skills/expo-skill-eval/references/design-rubric.md +45 -0
- package/bundled-skills/expo-skill-eval/references/runtime-matrix.md +34 -0
- package/bundled-skills/expo-skill-eval/scripts/check-static.sh +64 -0
- package/bundled-skills/expo-skill-eval/scripts/clean-fixture.sh +56 -0
- package/bundled-skills/expo-skill-eval/scripts/generate_viewer.py +450 -0
- package/bundled-skills/expo-skill-eval/scripts/latest-sdk.sh +46 -0
- package/bundled-skills/expo-skill-eval/scripts/make-fixture.sh +95 -0
- package/bundled-skills/expo-skill-eval/scripts/make-workspace.sh +31 -0
- package/bundled-skills/expo-skill-eval/scripts/snapshot-android.sh +284 -0
- package/bundled-skills/expo-skill-eval/scripts/snapshot-ios.sh +132 -0
- package/bundled-skills/expo-skill-eval/scripts/snapshot-web.sh +61 -0
- package/bundled-skills/expo-skill-feedback/SKILL.md +87 -0
- package/bundled-skills/expo-skill-feedback/agents/openai.yaml +4 -0
- package/bundled-skills/expo-skill-feedback/scripts/skill-event.cjs +180 -0
- package/bundled-skills/expo-skill-feedback/scripts/telemetry.cjs +65 -0
- package/bundled-skills/expo-skill-feedback/scripts/telemetry_common.cjs +171 -0
- package/bundled-skills/expo-ui/SKILL.md +101 -0
- package/bundled-skills/expo-ui/agents/openai.yaml +4 -0
- package/bundled-skills/expo-ui/references/drop-in-replacements.md +27 -0
- package/bundled-skills/expo-ui/references/jetpack-compose.md +73 -0
- package/bundled-skills/expo-ui/references/swift-ui.md +73 -0
- package/bundled-skills/expo-ui/references/universal.md +104 -0
- package/bundled-skills/expo-ui/scripts/list-components.js +193 -0
- package/bundled-skills/expo-upgrade/SKILL.md +150 -0
- package/bundled-skills/expo-upgrade/agents/openai.yaml +4 -0
- package/bundled-skills/expo-upgrade/references/expo-av-to-audio.md +132 -0
- package/bundled-skills/expo-upgrade/references/expo-av-to-video.md +160 -0
- package/bundled-skills/expo-upgrade/references/native-tabs.md +124 -0
- package/bundled-skills/expo-upgrade/references/new-architecture.md +79 -0
- package/bundled-skills/expo-upgrade/references/react-19.md +79 -0
- package/bundled-skills/expo-upgrade/references/react-compiler.md +59 -0
- package/bundled-skills/expo-upgrade/references/react-navigation-to-expo-router.md +61 -0
- package/bundled-skills/expo-web-to-native/SKILL.md +91 -0
- package/bundled-skills/expo-web-to-native/agents/openai.yaml +4 -0
- package/bundled-skills/expo-web-to-native/references/false-friends.md +119 -0
- package/bundled-skills/expo-web-to-native/references/native-patterns.md +39 -0
- package/bundled-skills/expo-web-to-native/references/run-as-goal.md +48 -0
- package/bundled-skills/expo-web-to-native/references/verify-on-device.md +45 -0
- package/bundled-skills/find-skills/SKILL.md +141 -0
- package/bundled-skills/fix/SKILL.md +113 -0
- package/bundled-skills/fix/flaky-taxonomy.md +134 -0
- package/bundled-skills/flutter-add-integration-test/SKILL.md +163 -0
- package/bundled-skills/flutter-add-widget-preview/SKILL.md +145 -0
- package/bundled-skills/flutter-add-widget-test/SKILL.md +154 -0
- package/bundled-skills/flutter-apply-architecture-best-practices/SKILL.md +162 -0
- package/bundled-skills/flutter-build-responsive-layout/SKILL.md +139 -0
- package/bundled-skills/flutter-fix-layout-issues/SKILL.md +130 -0
- package/bundled-skills/flutter-implement-json-serialization/SKILL.md +153 -0
- package/bundled-skills/flutter-setup-declarative-routing/SKILL.md +255 -0
- package/bundled-skills/flutter-setup-localization/SKILL.md +210 -0
- package/bundled-skills/flutter-use-http-package/SKILL.md +174 -0
- package/bundled-skills/gate/SKILL.md +13 -0
- package/bundled-skills/graph-colorize/SKILL.md +180 -0
- package/bundled-skills/hermes-history-ingest/SKILL.md +239 -0
- package/bundled-skills/hermes-history-ingest/references/hermes-data-format.md +131 -0
- package/bundled-skills/humanizer/SKILL.md +374 -0
- package/bundled-skills/impeccable/SKILL.md +89 -0
- package/bundled-skills/impeccable/reference/adapt.md +312 -0
- package/bundled-skills/impeccable/reference/adapt.native.md +58 -0
- package/bundled-skills/impeccable/reference/android.md +46 -0
- package/bundled-skills/impeccable/reference/animate.md +89 -0
- package/bundled-skills/impeccable/reference/audit.md +136 -0
- package/bundled-skills/impeccable/reference/audit.native.md +139 -0
- package/bundled-skills/impeccable/reference/bolder.md +33 -0
- package/bundled-skills/impeccable/reference/clarify.md +94 -0
- package/bundled-skills/impeccable/reference/colorize.md +86 -0
- package/bundled-skills/impeccable/reference/craft-floor.md +44 -0
- package/bundled-skills/impeccable/reference/craft.md +5 -0
- package/bundled-skills/impeccable/reference/critique.md +806 -0
- package/bundled-skills/impeccable/reference/degraded/asset-producer.md +37 -0
- package/bundled-skills/impeccable/reference/degraded/documenter.md +24 -0
- package/bundled-skills/impeccable/reference/degraded/finish-reviewer.md +38 -0
- package/bundled-skills/impeccable/reference/degraded/manual-edit-applier.md +92 -0
- package/bundled-skills/impeccable/reference/delight.md +70 -0
- package/bundled-skills/impeccable/reference/distill.md +111 -0
- package/bundled-skills/impeccable/reference/doctor.md +54 -0
- package/bundled-skills/impeccable/reference/document.md +416 -0
- package/bundled-skills/impeccable/reference/extract.md +69 -0
- package/bundled-skills/impeccable/reference/harden.md +336 -0
- package/bundled-skills/impeccable/reference/hooks.md +111 -0
- package/bundled-skills/impeccable/reference/init.md +131 -0
- package/bundled-skills/impeccable/reference/ios.md +51 -0
- package/bundled-skills/impeccable/reference/layout.md +84 -0
- package/bundled-skills/impeccable/reference/live-setup.md +104 -0
- package/bundled-skills/impeccable/reference/live.md +325 -0
- package/bundled-skills/impeccable/reference/new-work.md +145 -0
- package/bundled-skills/impeccable/reference/onboard.md +234 -0
- package/bundled-skills/impeccable/reference/operate.md +61 -0
- package/bundled-skills/impeccable/reference/optimize.md +258 -0
- package/bundled-skills/impeccable/reference/overdrive.md +127 -0
- package/bundled-skills/impeccable/reference/polish.md +105 -0
- package/bundled-skills/impeccable/reference/quieter.md +99 -0
- package/bundled-skills/impeccable/reference/routing.md +24 -0
- package/bundled-skills/impeccable/reference/shape.md +59 -0
- package/bundled-skills/impeccable/reference/typeset.md +80 -0
- package/bundled-skills/impeccable/reference/visualize.md +46 -0
- package/bundled-skills/impeccable/scripts/VERSION +1 -0
- package/bundled-skills/impeccable/scripts/bin/windows-x64/impeccable.exe +0 -0
- package/bundled-skills/impeccable/scripts/command-metadata.json +94 -0
- package/bundled-skills/impeccable/scripts/data/font-index-failures.json +121 -0
- package/bundled-skills/impeccable/scripts/data/font-index.json +1 -0
- package/bundled-skills/impeccable/scripts/impeccable +206 -0
- package/bundled-skills/impeccable/scripts/impeccable.cmd +214 -0
- package/bundled-skills/impeccable/scripts/live-browser-dom.js +167 -0
- package/bundled-skills/impeccable/scripts/live-browser-ignores.js +242 -0
- package/bundled-skills/impeccable/scripts/live-browser-session.js +144 -0
- package/bundled-skills/impeccable/scripts/live-browser.js +12990 -0
- package/bundled-skills/impeccable/scripts/modern-screenshot.umd.js +14 -0
- package/bundled-skills/impl-validator/SKILL.md +118 -0
- package/bundled-skills/ios-simulator/SKILL.md +32 -0
- package/bundled-skills/json-canvas/SKILL.md +244 -0
- package/bundled-skills/json-canvas/references/EXAMPLES.md +329 -0
- package/bundled-skills/launch/SKILL.md +381 -0
- package/bundled-skills/launch/evals/evals.json +106 -0
- package/bundled-skills/llm-wiki/SKILL.md +661 -0
- package/bundled-skills/llm-wiki/references/WRITING.md +28 -0
- package/bundled-skills/llm-wiki/references/karpathy-pattern.md +45 -0
- package/bundled-skills/marketing-plan/SKILL.md +300 -0
- package/bundled-skills/marketing-plan/evals/evals.json +112 -0
- package/bundled-skills/marketing-plan/references/aarrr-framework.md +180 -0
- package/bundled-skills/marketing-plan/references/budget-planning.md +168 -0
- package/bundled-skills/marketing-plan/references/client-types.md +373 -0
- package/bundled-skills/marketing-plan/references/current-state-rubric.md +255 -0
- package/bundled-skills/marketing-plan/references/example-quietude.md +972 -0
- package/bundled-skills/marketing-plan/references/funding-stage-unlocks.md +230 -0
- package/bundled-skills/marketing-plan/references/growth-patterns.md +190 -0
- package/bundled-skills/marketing-plan/references/idea-cross-reference.md +265 -0
- package/bundled-skills/marketing-plan/references/measurement-framework.md +213 -0
- package/bundled-skills/marketing-plan/references/methodology.md +363 -0
- package/bundled-skills/marketing-plan/references/ops-stack-mapping.md +197 -0
- package/bundled-skills/marketing-plan/references/plan-template.md +494 -0
- package/bundled-skills/marketing-plan/references/team-and-agency-model.md +278 -0
- package/bundled-skills/marketing-psychology/SKILL.md +455 -0
- package/bundled-skills/marketing-psychology/evals/evals.json +88 -0
- package/bundled-skills/mcp-server-builder/README.md +50 -0
- package/bundled-skills/mcp-server-builder/SKILL.md +100 -0
- package/bundled-skills/mcp-server-builder/references/openapi-extraction-guide.md +34 -0
- package/bundled-skills/mcp-server-builder/references/production-hardening-guide.md +78 -0
- package/bundled-skills/mcp-server-builder/references/python-server-template.md +22 -0
- package/bundled-skills/mcp-server-builder/references/typescript-server-template.md +19 -0
- package/bundled-skills/mcp-server-builder/references/validation-checklist.md +30 -0
- package/bundled-skills/mcp-server-builder/scripts/mcp_validator.py +186 -0
- package/bundled-skills/mcp-server-builder/scripts/openapi_to_mcp.py +284 -0
- package/bundled-skills/memory/SKILL.md +10 -0
- package/bundled-skills/memory-bridge/SKILL.md +163 -0
- package/bundled-skills/memory-save/SKILL.md +88 -0
- package/bundled-skills/migrate/SKILL.md +135 -0
- package/bundled-skills/migrate/cypress-mapping.md +79 -0
- package/bundled-skills/migrate/selenium-mapping.md +94 -0
- package/bundled-skills/novahiz-analyse/SKILL.md +74 -0
- package/bundled-skills/novahiz-audit/SKILL.md +75 -0
- package/bundled-skills/novahiz-clarify/SKILL.md +94 -0
- package/bundled-skills/novahiz-converge/SKILL.md +76 -0
- package/bundled-skills/novahiz-gate/SKILL.md +82 -0
- package/bundled-skills/novahiz-implement/SKILL.md +80 -0
- package/bundled-skills/novahiz-memory/SKILL.md +58 -0
- package/bundled-skills/novahiz-plan/SKILL.md +100 -0
- package/bundled-skills/novahiz-planner/SKILL.md +104 -0
- package/bundled-skills/novahiz-task/SKILL.md +105 -0
- package/bundled-skills/obsidian-bases/SKILL.md +499 -0
- package/bundled-skills/obsidian-bases/references/FUNCTIONS_REFERENCE.md +173 -0
- package/bundled-skills/obsidian-cli/SKILL.md +106 -0
- package/bundled-skills/obsidian-layout-adjustment/SKILL.md +226 -0
- package/bundled-skills/obsidian-layout-adjustment/evals/evals.json +53 -0
- package/bundled-skills/obsidian-layout-adjustment/references/workflow-reference.md +212 -0
- package/bundled-skills/obsidian-markdown/SKILL.md +196 -0
- package/bundled-skills/obsidian-markdown/references/CALLOUTS.md +58 -0
- package/bundled-skills/obsidian-markdown/references/EMBEDS.md +70 -0
- package/bundled-skills/obsidian-markdown/references/PROPERTIES.md +61 -0
- package/bundled-skills/offers/SKILL.md +155 -0
- package/bundled-skills/offers/evals/evals.json +21 -0
- package/bundled-skills/offers/references/bonus-stacking.md +150 -0
- package/bundled-skills/offers/references/examples.md +215 -0
- package/bundled-skills/offers/references/guarantee-design.md +172 -0
- package/bundled-skills/offers/references/offer-anatomy.md +203 -0
- package/bundled-skills/offers/references/offer-formats.md +240 -0
- package/bundled-skills/offers/references/saas-offers.md +116 -0
- package/bundled-skills/offers/references/scarcity-urgency.md +175 -0
- package/bundled-skills/offers/references/value-equation.md +134 -0
- package/bundled-skills/onboarding/SKILL.md +261 -0
- package/bundled-skills/onboarding/evals/evals.json +108 -0
- package/bundled-skills/onboarding/references/activation-models.md +57 -0
- package/bundled-skills/onboarding/references/experiments.md +258 -0
- package/bundled-skills/onboarding/references/minimum-path-to-value.md +49 -0
- package/bundled-skills/openclaw-history-ingest/SKILL.md +257 -0
- package/bundled-skills/openclaw-history-ingest/references/openclaw-data-format.md +154 -0
- package/bundled-skills/orchestration/SKILL.md +69 -0
- package/bundled-skills/pi-history-ingest/SKILL.md +312 -0
- package/bundled-skills/playwright-agent/SKILL.md +142 -0
- package/bundled-skills/postgresql-optimization/SKILL.md +179 -0
- package/bundled-skills/pricing/SKILL.md +295 -0
- package/bundled-skills/pricing/evals/evals.json +119 -0
- package/bundled-skills/pricing/references/pricing-models.md +66 -0
- package/bundled-skills/pricing/references/pricing-page-teardown.md +85 -0
- package/bundled-skills/pricing/references/research-methods.md +152 -0
- package/bundled-skills/pricing/references/tier-structure.md +232 -0
- package/bundled-skills/product-marketing/SKILL.md +255 -0
- package/bundled-skills/product-marketing/evals/evals.json +98 -0
- package/bundled-skills/prospecting/SKILL.md +262 -0
- package/bundled-skills/prospecting/evals/evals.json +122 -0
- package/bundled-skills/prospecting/references/b2b-prospecting.md +106 -0
- package/bundled-skills/prospecting/references/compliance.md +123 -0
- package/bundled-skills/prospecting/references/data-sources.md +287 -0
- package/bundled-skills/prospecting/references/demand-signals.md +129 -0
- package/bundled-skills/prospecting/references/local-prospecting.md +165 -0
- package/bundled-skills/prospecting/references/saas-prospecting.md +123 -0
- package/bundled-skills/refactor-safely/SKILL.md +29 -0
- package/bundled-skills/review-changes/SKILL.md +30 -0
- package/bundled-skills/review-delta/SKILL.md +46 -0
- package/bundled-skills/review-pr/SKILL.md +66 -0
- package/bundled-skills/sales-enablement/SKILL.md +359 -0
- package/bundled-skills/sales-enablement/evals/evals.json +91 -0
- package/bundled-skills/sales-enablement/references/deck-frameworks.md +263 -0
- package/bundled-skills/sales-enablement/references/demo-scripts.md +355 -0
- package/bundled-skills/sales-enablement/references/objection-library.md +270 -0
- package/bundled-skills/sales-enablement/references/one-pager-templates.md +208 -0
- package/bundled-skills/security-guidance/SKILL.md +161 -0
- package/bundled-skills/security-guidance/references/pretooluse_hook_canon.md +141 -0
- package/bundled-skills/senior-architect/SKILL.md +343 -0
- package/bundled-skills/senior-architect/references/architecture_patterns.md +470 -0
- package/bundled-skills/senior-architect/references/system_design_workflows.md +536 -0
- package/bundled-skills/senior-architect/references/tech_decision_guide.md +412 -0
- package/bundled-skills/senior-architect/scripts/architecture_diagram_generator.py +660 -0
- package/bundled-skills/senior-architect/scripts/dependency_analyzer.py +615 -0
- package/bundled-skills/senior-architect/scripts/project_architect.py +749 -0
- package/bundled-skills/senior-backend/SKILL.md +467 -0
- package/bundled-skills/senior-backend/profiles/django-monolith.json +57 -0
- package/bundled-skills/senior-backend/profiles/fastapi-python.json +58 -0
- package/bundled-skills/senior-backend/profiles/go-or-rust-microservice.json +62 -0
- package/bundled-skills/senior-backend/profiles/node-express.json +57 -0
- package/bundled-skills/senior-backend/references/api_design_patterns.md +530 -0
- package/bundled-skills/senior-backend/references/backend_security_practices.md +1075 -0
- package/bundled-skills/senior-backend/references/composition_map.md +58 -0
- package/bundled-skills/senior-backend/references/database_optimization_guide.md +593 -0
- package/bundled-skills/senior-backend/references/forcing_questions.md +100 -0
- package/bundled-skills/senior-backend/scripts/api_load_tester.py +607 -0
- package/bundled-skills/senior-backend/scripts/api_scaffolder.py +645 -0
- package/bundled-skills/senior-backend/scripts/backend_decision_engine.py +397 -0
- package/bundled-skills/senior-backend/scripts/database_migration_tool.py +858 -0
- package/bundled-skills/seo-audit/SKILL.md +499 -0
- package/bundled-skills/seo-audit/evals/evals.json +136 -0
- package/bundled-skills/seo-audit/references/ai-writing-detection.md +200 -0
- package/bundled-skills/seo-audit/references/international-seo.md +230 -0
- package/bundled-skills/session-brain/SKILL.md +101 -0
- package/bundled-skills/session-search/SKILL.md +97 -0
- package/bundled-skills/skill-creator/LICENSE.txt +202 -0
- package/bundled-skills/skill-creator/SKILL.md +485 -0
- package/bundled-skills/skill-creator/agents/analyzer.md +274 -0
- package/bundled-skills/skill-creator/agents/comparator.md +202 -0
- package/bundled-skills/skill-creator/agents/grader.md +223 -0
- package/bundled-skills/skill-creator/assets/eval_review.html +146 -0
- package/bundled-skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/bundled-skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/bundled-skills/skill-creator/references/schemas.md +430 -0
- package/bundled-skills/skill-creator/scripts/__init__.py +0 -0
- package/bundled-skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/bundled-skills/skill-creator/scripts/generate_report.py +326 -0
- package/bundled-skills/skill-creator/scripts/improve_description.py +247 -0
- package/bundled-skills/skill-creator/scripts/package_skill.py +136 -0
- package/bundled-skills/skill-creator/scripts/quick_validate.py +103 -0
- package/bundled-skills/skill-creator/scripts/run_eval.py +310 -0
- package/bundled-skills/skill-creator/scripts/run_loop.py +328 -0
- package/bundled-skills/skill-creator/scripts/utils.py +47 -0
- package/bundled-skills/social/SKILL.md +413 -0
- package/bundled-skills/social/evals/evals.json +107 -0
- package/bundled-skills/social/references/carousel-frameworks.md +141 -0
- package/bundled-skills/social/references/listening-sources-template.md +123 -0
- package/bundled-skills/social/references/listening.md +283 -0
- package/bundled-skills/social/references/platform-limits.md +110 -0
- package/bundled-skills/social/references/platforms.md +170 -0
- package/bundled-skills/social/references/post-templates.md +179 -0
- package/bundled-skills/social/references/reverse-engineering.md +195 -0
- package/bundled-skills/social/references/short-form-video.md +237 -0
- package/bundled-skills/spec-driven-workflow/SKILL.md +333 -0
- package/bundled-skills/spec-driven-workflow/references/acceptance_criteria_patterns.md +497 -0
- package/bundled-skills/spec-driven-workflow/references/bounded_autonomy_rules.md +273 -0
- package/bundled-skills/spec-driven-workflow/references/spec_format_guide.md +531 -0
- package/bundled-skills/spec-driven-workflow/scripts/spec_generator.py +338 -0
- package/bundled-skills/spec-driven-workflow/scripts/spec_validator.py +461 -0
- package/bundled-skills/spec-driven-workflow/scripts/test_extractor.py +431 -0
- package/bundled-skills/supabase/CHANGELOG.md +78 -0
- package/bundled-skills/supabase/SKILL.md +149 -0
- package/bundled-skills/supabase/assets/feedback-issue-template.md +17 -0
- package/bundled-skills/supabase/references/skill-feedback.md +17 -0
- package/bundled-skills/supabase-postgres-best-practices/CHANGELOG.md +73 -0
- package/bundled-skills/supabase-postgres-best-practices/SKILL.md +64 -0
- package/bundled-skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
- package/bundled-skills/supabase-postgres-best-practices/references/_sections.md +39 -0
- package/bundled-skills/supabase-postgres-best-practices/references/_template.md +34 -0
- package/bundled-skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
- package/bundled-skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
- package/bundled-skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
- package/bundled-skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
- package/bundled-skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
- package/bundled-skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
- package/bundled-skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
- package/bundled-skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
- package/bundled-skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
- package/bundled-skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
- package/bundled-skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
- package/bundled-skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
- package/bundled-skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
- package/bundled-skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
- package/bundled-skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
- package/bundled-skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
- package/bundled-skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
- package/bundled-skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
- package/bundled-skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
- package/bundled-skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
- package/bundled-skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
- package/bundled-skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
- package/bundled-skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
- package/bundled-skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
- package/bundled-skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
- package/bundled-skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
- package/bundled-skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
- package/bundled-skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
- package/bundled-skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
- package/bundled-skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
- package/bundled-skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
- package/bundled-skills/tag-taxonomy/SKILL.md +218 -0
- package/bundled-skills/typescript-expert/SKILL.md +431 -0
- package/bundled-skills/typescript-expert/references/tsconfig-strict.json +45 -0
- package/bundled-skills/typescript-expert/references/typescript-cheatsheet.md +383 -0
- package/bundled-skills/typescript-expert/references/utility-types.ts +335 -0
- package/bundled-skills/typescript-expert/scripts/ts_diagnostic.py +203 -0
- package/bundled-skills/ui-design-system/SKILL.md +379 -0
- package/bundled-skills/ui-design-system/assets/design_system_doc_template.md +180 -0
- package/bundled-skills/ui-design-system/references/component-architecture.md +396 -0
- package/bundled-skills/ui-design-system/references/developer-handoff.md +509 -0
- package/bundled-skills/ui-design-system/references/responsive-calculations.md +390 -0
- package/bundled-skills/ui-design-system/references/token-generation.md +324 -0
- package/bundled-skills/ui-design-system/scripts/design_token_generator.py +590 -0
- package/bundled-skills/vault-skill-factory/SKILL.md +143 -0
- package/bundled-skills/video/SKILL.md +346 -0
- package/bundled-skills/video/evals/evals.json +103 -0
- package/bundled-skills/video/references/ai-video-prompting.md +175 -0
- package/bundled-skills/video/references/edit-anatomy.md +84 -0
- package/bundled-skills/wiki-agent/SKILL.md +322 -0
- package/bundled-skills/wiki-capture/SKILL.md +337 -0
- package/bundled-skills/wiki-capture/references/RAW-FORMAT.md +115 -0
- package/bundled-skills/wiki-context-pack/SKILL.md +89 -0
- package/bundled-skills/wiki-dashboard/SKILL.md +472 -0
- package/bundled-skills/wiki-dedup/SKILL.md +320 -0
- package/bundled-skills/wiki-digest/SKILL.md +243 -0
- package/bundled-skills/wiki-export/SKILL.md +445 -0
- package/bundled-skills/wiki-history-ingest/SKILL.md +61 -0
- package/bundled-skills/wiki-import/SKILL.md +276 -0
- package/bundled-skills/wiki-ingest/SKILL.md +563 -0
- package/bundled-skills/wiki-ingest/references/ingest-prompts.md +54 -0
- package/bundled-skills/wiki-ingest/references/pageindex.md +72 -0
- package/bundled-skills/wiki-ingest/references/url-sources.md +295 -0
- package/bundled-skills/wiki-lint/SKILL.md +643 -0
- package/bundled-skills/wiki-narrate/SKILL.md +120 -0
- package/bundled-skills/wiki-narrate/references/voices.md +29 -0
- package/bundled-skills/wiki-query/SKILL.md +307 -0
- package/bundled-skills/wiki-rebuild/SKILL.md +212 -0
- package/bundled-skills/wiki-research/SKILL.md +319 -0
- package/bundled-skills/wiki-setup/SKILL.md +359 -0
- package/bundled-skills/wiki-stage-commit/SKILL.md +164 -0
- package/bundled-skills/wiki-status/SKILL.md +556 -0
- package/bundled-skills/wiki-switch/SKILL.md +115 -0
- package/bundled-skills/wiki-synthesize/SKILL.md +212 -0
- package/bundled-skills/wiki-update/SKILL.md +271 -0
- package/bundled-skills/write-a-skill/SKILL.md +141 -0
- package/bundled-skills/write-a-skill/references/companion_tooling.md +67 -0
- package/bundled-skills/write-a-skill/references/description_design_patterns.md +139 -0
- package/bundled-skills/write-a-skill/references/progressive_disclosure_principles.md +89 -0
- package/bundled-skills/write-a-skill/references/quality_gates_for_skills.md +158 -0
- package/bundled-skills/write-a-skill/scripts/skill_description_validator.py +255 -0
- package/bundled-skills/write-a-skill/scripts/skill_review_checklist_runner.py +268 -0
- package/bundled-skills/write-a-skill/scripts/skill_structure_validator.py +277 -0
- package/bundled-skills/zero-hallucination-coder/SKILL.md +271 -0
- package/catalog/categories.json +1030 -0
- package/catalog/overrides.json +525 -0
- package/catalog/providers.json +145 -0
- package/catalog/rules.json +112 -0
- package/docs/ARCHITECTURE.md +82 -0
- package/docs/CONSTITUTION.md +60 -0
- package/docs/EXECUTION.md +79 -0
- package/docs/HARNESSES.md +38 -0
- package/docs/INSTALL.md +123 -0
- package/docs/PROVIDERS.md +128 -0
- package/docs/ROADMAPS.md +74 -0
- package/docs/RULES.md +85 -0
- package/docs/TOKENS.md +48 -0
- package/install/bootstrap.mjs +273 -0
- package/install/install.mjs +466 -0
- package/install/install.ps1 +3 -0
- package/install/install.sh +4 -0
- package/install/lib.mjs +198 -0
- package/install/prompt.mjs +16 -0
- package/install/uninstall.mjs +109 -0
- package/mcp/novahiz-tools/README.md +26 -0
- package/mcp/novahiz-tools/index.mjs +452 -0
- package/novahiz.config.example.json +39 -0
- package/package.json +76 -0
- package/skills/a11y-audit/SKILL.md +211 -0
- package/skills/a11y-audit/assets/sample-component.tsx +51 -0
- package/skills/a11y-audit/expected_outputs/sample-contrast-output.txt +39 -0
- package/skills/a11y-audit/expected_outputs/sample-scan-output.json +34 -0
- package/skills/a11y-audit/expected_outputs/sample-scan-report.md +63 -0
- package/skills/a11y-audit/references/aria-patterns.md +223 -0
- package/skills/a11y-audit/references/audit-report-template.md +46 -0
- package/skills/a11y-audit/references/ci-cd-integration.md +127 -0
- package/skills/a11y-audit/references/color-contrast-guide.md +83 -0
- package/skills/a11y-audit/references/examples-by-framework.md +312 -0
- package/skills/a11y-audit/references/framework-a11y-patterns.md +661 -0
- package/skills/a11y-audit/references/testing-checklist.md +41 -0
- package/skills/a11y-audit/references/wcag-22-new-criteria.md +79 -0
- package/skills/a11y-audit/references/wcag-quick-ref.md +113 -0
- package/skills/a11y-audit/scripts/a11y_scanner.py +684 -0
- package/skills/a11y-audit/scripts/contrast_checker.py +504 -0
- package/skills/adversarial-reviewer/SKILL.md +247 -0
- package/skills/ai-security/SKILL.md +364 -0
- package/skills/ai-security/references/atlas-coverage.md +150 -0
- package/skills/ai-security/scripts/ai_threat_scanner.py +564 -0
- package/skills/anti-AI-design/SKILL.md +189 -0
- package/skills/anti-pattern-detector/SKILL.md +185 -0
- package/skills/anti-pattern-detector/references/async-network-patterns.md +581 -0
- package/skills/anti-pattern-detector/references/build-deploy-patterns.md +554 -0
- package/skills/anti-pattern-detector/references/cache-patterns.md +446 -0
- package/skills/anti-pattern-detector/references/cloud-infra-patterns.md +538 -0
- package/skills/anti-pattern-detector/references/concurrency-patterns.md +558 -0
- package/skills/anti-pattern-detector/references/language-specific-patterns.md +740 -0
- package/skills/anti-pattern-detector/references/monitoring-patterns.md +456 -0
- package/skills/api-design-reviewer/SKILL.md +433 -0
- package/skills/api-design-reviewer/references/api_antipatterns.md +680 -0
- package/skills/api-design-reviewer/references/rest_design_rules.md +487 -0
- package/skills/api-design-reviewer/scripts/api_linter.py +956 -0
- package/skills/api-design-reviewer/scripts/api_scorecard.py +1661 -0
- package/skills/api-design-reviewer/scripts/breaking_change_detector.py +1102 -0
- package/skills/apple-hig-expert/SKILL.md +108 -0
- package/skills/apple-hig-expert/references/accessibility.md +55 -0
- package/skills/apple-hig-expert/references/platform-specifics.md +48 -0
- package/skills/apple-hig-expert/references/visual-design.md +69 -0
- package/skills/apple-hig-expert/scripts/hig_checker.py +97 -0
- package/skills/apple-hig-expert/templates/hig-audit-template.md +83 -0
- package/skills/clean-code/SKILL.md +99 -0
- package/skills/code-reviewer/README.md +92 -0
- package/skills/code-reviewer/SKILL.md +183 -0
- package/skills/code-reviewer/assets/sample_c_clean.c +71 -0
- package/skills/code-reviewer/assets/sample_c_smells.c +66 -0
- package/skills/code-reviewer/assets/sample_csharp_clean.cs +100 -0
- package/skills/code-reviewer/assets/sample_csharp_smells.cs +78 -0
- package/skills/code-reviewer/assets/sample_java_clean.java +55 -0
- package/skills/code-reviewer/assets/sample_java_smells.java +56 -0
- package/skills/code-reviewer/expected_outputs/sample_c_clean_quality.json +65 -0
- package/skills/code-reviewer/expected_outputs/sample_c_smells_quality.json +155 -0
- package/skills/code-reviewer/expected_outputs/sample_csharp_clean_quality.json +135 -0
- package/skills/code-reviewer/expected_outputs/sample_csharp_smells_quality.json +143 -0
- package/skills/code-reviewer/expected_outputs/sample_java_clean_quality.json +53 -0
- package/skills/code-reviewer/expected_outputs/sample_java_smells_quality.json +83 -0
- package/skills/code-reviewer/languages/c.md +103 -0
- package/skills/code-reviewer/languages/cpp.md +103 -0
- package/skills/code-reviewer/languages/csharp.md +97 -0
- package/skills/code-reviewer/languages/dart.md +108 -0
- package/skills/code-reviewer/languages/go.md +92 -0
- package/skills/code-reviewer/languages/java.md +103 -0
- package/skills/code-reviewer/languages/kotlin.md +88 -0
- package/skills/code-reviewer/languages/php.md +109 -0
- package/skills/code-reviewer/languages/python.md +94 -0
- package/skills/code-reviewer/languages/ruby.md +105 -0
- package/skills/code-reviewer/languages/rust.md +99 -0
- package/skills/code-reviewer/languages/swift.md +88 -0
- package/skills/code-reviewer/languages/typescript.md +97 -0
- package/skills/code-reviewer/rules/universal.md +49 -0
- package/skills/code-reviewer/scripts/code_quality_checker.py +1020 -0
- package/skills/code-reviewer/scripts/pr_analyzer.py +535 -0
- package/skills/code-reviewer/scripts/review_report_generator.py +505 -0
- package/skills/code-understand/SKILL.md +90 -0
- package/skills/database-designer/README.md +388 -0
- package/skills/database-designer/SKILL.md +314 -0
- package/skills/database-designer/assets/sample_query_patterns.json +375 -0
- package/skills/database-designer/assets/sample_schema.json +372 -0
- package/skills/database-designer/assets/sample_schema.sql +207 -0
- package/skills/database-designer/expected_outputs/index_optimization_sample.txt +60 -0
- package/skills/database-designer/expected_outputs/migration_sample.txt +124 -0
- package/skills/database-designer/expected_outputs/schema_analysis_sample.txt +222 -0
- package/skills/database-designer/index_optimizer.py +926 -0
- package/skills/database-designer/migration_generator.py +1199 -0
- package/skills/database-designer/references/database-design-reference.md +476 -0
- package/skills/database-designer/references/database_selection_decision_tree.md +373 -0
- package/skills/database-designer/references/index_strategy_patterns.md +424 -0
- package/skills/database-designer/references/normalization_guide.md +354 -0
- package/skills/database-designer/schema_analyzer.py +982 -0
- package/skills/defuddle/SKILL.md +41 -0
- package/skills/dependency-auditor/README.md +524 -0
- package/skills/dependency-auditor/SKILL.md +85 -0
- package/skills/dependency-auditor/assets/sample_go.mod +53 -0
- package/skills/dependency-auditor/assets/sample_package.json +72 -0
- package/skills/dependency-auditor/assets/sample_requirements.txt +71 -0
- package/skills/dependency-auditor/expected_outputs/sample_license_report.txt +37 -0
- package/skills/dependency-auditor/expected_outputs/sample_upgrade_plan.txt +59 -0
- package/skills/dependency-auditor/expected_outputs/sample_vulnerability_report.json +71 -0
- package/skills/dependency-auditor/references/dependency_management_best_practices.md +643 -0
- package/skills/dependency-auditor/references/license_compatibility_matrix.md +238 -0
- package/skills/dependency-auditor/references/vulnerability_assessment_guide.md +461 -0
- package/skills/dependency-auditor/scripts/dep_scanner.py +794 -0
- package/skills/dependency-auditor/scripts/license_checker.py +996 -0
- package/skills/dependency-auditor/scripts/upgrade_planner.py +1029 -0
- package/skills/dependency-auditor/test-inventory.json +421 -0
- package/skills/dependency-auditor/test-project/package.json +72 -0
- package/skills/design-taste-frontend/SKILL.md +247 -0
- package/skills/engineering-standards/SKILL.md +736 -0
- package/skills/env-secrets-manager/SKILL.md +260 -0
- package/skills/env-secrets-manager/references/secret-patterns.md +41 -0
- package/skills/env-secrets-manager/references/validation-detection-rotation.md +358 -0
- package/skills/env-secrets-manager/scripts/env_auditor.py +145 -0
- package/skills/fix/SKILL.md +113 -0
- package/skills/fix/flaky-taxonomy.md +134 -0
- package/skills/gate/SKILL.md +13 -0
- package/skills/humanizer/SKILL.md +374 -0
- package/skills/mcp-server-builder/README.md +50 -0
- package/skills/mcp-server-builder/SKILL.md +100 -0
- package/skills/mcp-server-builder/references/openapi-extraction-guide.md +34 -0
- package/skills/mcp-server-builder/references/production-hardening-guide.md +78 -0
- package/skills/mcp-server-builder/references/python-server-template.md +22 -0
- package/skills/mcp-server-builder/references/typescript-server-template.md +19 -0
- package/skills/mcp-server-builder/references/validation-checklist.md +30 -0
- package/skills/mcp-server-builder/scripts/mcp_validator.py +186 -0
- package/skills/mcp-server-builder/scripts/openapi_to_mcp.py +284 -0
- package/skills/memory/SKILL.md +10 -0
- package/skills/migrate/SKILL.md +135 -0
- package/skills/migrate/cypress-mapping.md +79 -0
- package/skills/migrate/selenium-mapping.md +94 -0
- package/skills/novahiz-analyse/SKILL.md +74 -0
- package/skills/novahiz-audit/SKILL.md +75 -0
- package/skills/novahiz-clarify/SKILL.md +94 -0
- package/skills/novahiz-converge/SKILL.md +76 -0
- package/skills/novahiz-gate/SKILL.md +82 -0
- package/skills/novahiz-implement/SKILL.md +80 -0
- package/skills/novahiz-memory/SKILL.md +58 -0
- package/skills/novahiz-plan/SKILL.md +99 -0
- package/skills/novahiz-planner/SKILL.md +104 -0
- package/skills/novahiz-task/SKILL.md +105 -0
- package/skills/playwright-agent/SKILL.md +142 -0
- package/skills/postgresql-optimization/SKILL.md +179 -0
- package/skills/review-changes/SKILL.md +30 -0
- package/skills/security-guidance/SKILL.md +160 -0
- package/skills/security-guidance/references/pretooluse_hook_canon.md +141 -0
- package/skills/senior-architect/SKILL.md +343 -0
- package/skills/senior-architect/references/architecture_patterns.md +470 -0
- package/skills/senior-architect/references/system_design_workflows.md +536 -0
- package/skills/senior-architect/references/tech_decision_guide.md +412 -0
- package/skills/senior-architect/scripts/architecture_diagram_generator.py +660 -0
- package/skills/senior-architect/scripts/dependency_analyzer.py +615 -0
- package/skills/senior-architect/scripts/project_architect.py +749 -0
- package/skills/senior-backend/SKILL.md +467 -0
- package/skills/senior-backend/profiles/django-monolith.json +57 -0
- package/skills/senior-backend/profiles/fastapi-python.json +58 -0
- package/skills/senior-backend/profiles/go-or-rust-microservice.json +62 -0
- package/skills/senior-backend/profiles/node-express.json +57 -0
- package/skills/senior-backend/references/api_design_patterns.md +530 -0
- package/skills/senior-backend/references/backend_security_practices.md +1075 -0
- package/skills/senior-backend/references/composition_map.md +58 -0
- package/skills/senior-backend/references/database_optimization_guide.md +593 -0
- package/skills/senior-backend/references/forcing_questions.md +100 -0
- package/skills/senior-backend/scripts/api_load_tester.py +607 -0
- package/skills/senior-backend/scripts/api_scaffolder.py +645 -0
- package/skills/senior-backend/scripts/backend_decision_engine.py +397 -0
- package/skills/senior-backend/scripts/database_migration_tool.py +858 -0
- package/skills/senior-secops/SKILL.md +505 -0
- package/skills/senior-secops/references/compliance_requirements.md +792 -0
- package/skills/senior-secops/references/security_standards.md +718 -0
- package/skills/senior-secops/references/vulnerability_management_guide.md +487 -0
- package/skills/senior-secops/scripts/compliance_checker.py +1107 -0
- package/skills/senior-secops/scripts/security_scanner.py +471 -0
- package/skills/senior-secops/scripts/vulnerability_assessor.py +563 -0
- package/skills/skill-creator/LICENSE.txt +202 -0
- package/skills/skill-creator/SKILL.md +485 -0
- package/skills/skill-creator/agents/analyzer.md +274 -0
- package/skills/skill-creator/agents/comparator.md +202 -0
- package/skills/skill-creator/agents/grader.md +223 -0
- package/skills/skill-creator/assets/eval_review.html +146 -0
- package/skills/skill-creator/eval-viewer/generate_review.py +471 -0
- package/skills/skill-creator/eval-viewer/viewer.html +1325 -0
- package/skills/skill-creator/references/schemas.md +430 -0
- package/skills/skill-creator/scripts/__init__.py +0 -0
- package/skills/skill-creator/scripts/aggregate_benchmark.py +401 -0
- package/skills/skill-creator/scripts/generate_report.py +326 -0
- package/skills/skill-creator/scripts/improve_description.py +247 -0
- package/skills/skill-creator/scripts/package_skill.py +136 -0
- package/skills/skill-creator/scripts/quick_validate.py +103 -0
- package/skills/skill-creator/scripts/run_eval.py +310 -0
- package/skills/skill-creator/scripts/run_loop.py +328 -0
- package/skills/skill-creator/scripts/utils.py +47 -0
- package/skills/spec-driven-workflow/SKILL.md +333 -0
- package/skills/spec-driven-workflow/references/acceptance_criteria_patterns.md +497 -0
- package/skills/spec-driven-workflow/references/bounded_autonomy_rules.md +273 -0
- package/skills/spec-driven-workflow/references/spec_format_guide.md +531 -0
- package/skills/spec-driven-workflow/scripts/spec_generator.py +338 -0
- package/skills/spec-driven-workflow/scripts/spec_validator.py +461 -0
- package/skills/spec-driven-workflow/scripts/test_extractor.py +431 -0
- package/skills/supabase/CHANGELOG.md +78 -0
- package/skills/supabase/SKILL.md +149 -0
- package/skills/supabase/assets/feedback-issue-template.md +17 -0
- package/skills/supabase/references/skill-feedback.md +17 -0
- package/skills/supabase-postgres-best-practices/CHANGELOG.md +73 -0
- package/skills/supabase-postgres-best-practices/SKILL.md +64 -0
- package/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
- package/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
- package/skills/supabase-postgres-best-practices/references/_template.md +34 -0
- package/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
- package/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
- package/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
- package/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
- package/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
- package/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
- package/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
- package/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
- package/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
- package/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
- package/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
- package/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
- package/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
- package/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
- package/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
- package/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
- package/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
- package/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
- package/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
- package/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
- package/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
- package/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
- package/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
- package/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
- package/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
- package/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
- package/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
- package/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
- package/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
- package/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
- package/skills/supabase-postgres-best-practices/references/security-rls-performance.md +63 -0
- package/skills/typescript-expert/SKILL.md +431 -0
- package/skills/typescript-expert/references/tsconfig-strict.json +45 -0
- package/skills/typescript-expert/references/typescript-cheatsheet.md +383 -0
- package/skills/typescript-expert/references/utility-types.ts +335 -0
- package/skills/typescript-expert/scripts/ts_diagnostic.py +203 -0
- package/skills/ui-design-system/SKILL.md +379 -0
- package/skills/ui-design-system/assets/design_system_doc_template.md +180 -0
- package/skills/ui-design-system/references/component-architecture.md +396 -0
- package/skills/ui-design-system/references/developer-handoff.md +509 -0
- package/skills/ui-design-system/references/responsive-calculations.md +390 -0
- package/skills/ui-design-system/references/token-generation.md +324 -0
- package/skills/ui-design-system/scripts/design_token_generator.py +590 -0
- package/skills/write-a-skill/SKILL.md +141 -0
- package/skills/write-a-skill/references/companion_tooling.md +67 -0
- package/skills/write-a-skill/references/description_design_patterns.md +139 -0
- package/skills/write-a-skill/references/progressive_disclosure_principles.md +89 -0
- package/skills/write-a-skill/references/quality_gates_for_skills.md +158 -0
- package/skills/write-a-skill/scripts/skill_description_validator.py +255 -0
- package/skills/write-a-skill/scripts/skill_review_checklist_runner.py +268 -0
- package/skills/write-a-skill/scripts/skill_structure_validator.py +277 -0
- package/skills/zero-hallucination-coder/SKILL.md +271 -0
- package/src/catalog.ts +266 -0
- package/src/classify.ts +201 -0
- package/src/cli.ts +115 -0
- package/src/commands/clean.ts +114 -0
- package/src/commands/context.ts +130 -0
- package/src/commands/doctor.ts +191 -0
- package/src/commands/gate.ts +192 -0
- package/src/commands/inspect.ts +296 -0
- package/src/commands/report.ts +85 -0
- package/src/commands/task.ts +310 -0
- package/src/commands/tokens.ts +85 -0
- package/src/content.ts +70 -0
- package/src/db.ts +143 -0
- package/src/deps.ts +36 -0
- package/src/exec.ts +85 -0
- package/src/gate.ts +261 -0
- package/src/ledger.ts +468 -0
- package/src/providers.ts +52 -0
- package/src/relevance.ts +73 -0
- package/src/render.ts +107 -0
- package/src/spec.ts +306 -0
- package/src/targets.ts +296 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,1102 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Breaking Change Detector - Compares API specification versions to identify breaking changes.
|
|
4
|
+
|
|
5
|
+
This script analyzes two versions of an API specification and detects potentially
|
|
6
|
+
breaking changes including:
|
|
7
|
+
- Removed endpoints
|
|
8
|
+
- Modified response structures
|
|
9
|
+
- Removed or renamed fields
|
|
10
|
+
- Field type changes
|
|
11
|
+
- New required fields
|
|
12
|
+
- HTTP status code changes
|
|
13
|
+
- Parameter changes
|
|
14
|
+
|
|
15
|
+
Generates detailed reports with migration guides for each breaking change.
|
|
16
|
+
"""
|
|
17
|
+
|
|
18
|
+
import argparse
|
|
19
|
+
import json
|
|
20
|
+
import sys
|
|
21
|
+
from typing import Any, Dict, List, Set, Optional, Tuple, Union
|
|
22
|
+
from dataclasses import dataclass, field
|
|
23
|
+
from enum import Enum
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
class ChangeType(Enum):
|
|
27
|
+
"""Types of API changes."""
|
|
28
|
+
BREAKING = "breaking"
|
|
29
|
+
POTENTIALLY_BREAKING = "potentially_breaking"
|
|
30
|
+
NON_BREAKING = "non_breaking"
|
|
31
|
+
ENHANCEMENT = "enhancement"
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
class ChangeSeverity(Enum):
|
|
35
|
+
"""Severity levels for changes."""
|
|
36
|
+
CRITICAL = "critical" # Will definitely break clients
|
|
37
|
+
HIGH = "high" # Likely to break some clients
|
|
38
|
+
MEDIUM = "medium" # May break clients depending on usage
|
|
39
|
+
LOW = "low" # Minor impact, unlikely to break clients
|
|
40
|
+
INFO = "info" # Informational, no breaking impact
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
@dataclass
|
|
44
|
+
class Change:
|
|
45
|
+
"""Represents a detected change between API versions."""
|
|
46
|
+
change_type: ChangeType
|
|
47
|
+
severity: ChangeSeverity
|
|
48
|
+
category: str
|
|
49
|
+
path: str
|
|
50
|
+
message: str
|
|
51
|
+
old_value: Any = None
|
|
52
|
+
new_value: Any = None
|
|
53
|
+
migration_guide: str = ""
|
|
54
|
+
impact_description: str = ""
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Convert change to dictionary for JSON serialization."""
|
|
58
|
+
return {
|
|
59
|
+
"changeType": self.change_type.value,
|
|
60
|
+
"severity": self.severity.value,
|
|
61
|
+
"category": self.category,
|
|
62
|
+
"path": self.path,
|
|
63
|
+
"message": self.message,
|
|
64
|
+
"oldValue": self.old_value,
|
|
65
|
+
"newValue": self.new_value,
|
|
66
|
+
"migrationGuide": self.migration_guide,
|
|
67
|
+
"impactDescription": self.impact_description
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
@dataclass
|
|
72
|
+
class ComparisonReport:
|
|
73
|
+
"""Complete comparison report between two API versions."""
|
|
74
|
+
changes: List[Change] = field(default_factory=list)
|
|
75
|
+
summary: Dict[str, int] = field(default_factory=dict)
|
|
76
|
+
|
|
77
|
+
def add_change(self, change: Change) -> None:
|
|
78
|
+
"""Add a change to the report."""
|
|
79
|
+
self.changes.append(change)
|
|
80
|
+
|
|
81
|
+
def calculate_summary(self) -> None:
|
|
82
|
+
"""Calculate summary statistics."""
|
|
83
|
+
self.summary = {
|
|
84
|
+
"total_changes": len(self.changes),
|
|
85
|
+
"breaking_changes": len([c for c in self.changes if c.change_type == ChangeType.BREAKING]),
|
|
86
|
+
"potentially_breaking_changes": len([c for c in self.changes if c.change_type == ChangeType.POTENTIALLY_BREAKING]),
|
|
87
|
+
"non_breaking_changes": len([c for c in self.changes if c.change_type == ChangeType.NON_BREAKING]),
|
|
88
|
+
"enhancements": len([c for c in self.changes if c.change_type == ChangeType.ENHANCEMENT]),
|
|
89
|
+
"critical_severity": len([c for c in self.changes if c.severity == ChangeSeverity.CRITICAL]),
|
|
90
|
+
"high_severity": len([c for c in self.changes if c.severity == ChangeSeverity.HIGH]),
|
|
91
|
+
"medium_severity": len([c for c in self.changes if c.severity == ChangeSeverity.MEDIUM]),
|
|
92
|
+
"low_severity": len([c for c in self.changes if c.severity == ChangeSeverity.LOW]),
|
|
93
|
+
"info_severity": len([c for c in self.changes if c.severity == ChangeSeverity.INFO])
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
def has_breaking_changes(self) -> bool:
|
|
97
|
+
"""Check if report contains any breaking changes."""
|
|
98
|
+
return any(c.change_type in [ChangeType.BREAKING, ChangeType.POTENTIALLY_BREAKING]
|
|
99
|
+
for c in self.changes)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
class BreakingChangeDetector:
|
|
103
|
+
"""Main breaking change detection engine."""
|
|
104
|
+
|
|
105
|
+
def __init__(self):
|
|
106
|
+
self.report = ComparisonReport()
|
|
107
|
+
self.old_spec: Optional[Dict] = None
|
|
108
|
+
self.new_spec: Optional[Dict] = None
|
|
109
|
+
|
|
110
|
+
def compare_specs(self, old_spec: Dict[str, Any], new_spec: Dict[str, Any]) -> ComparisonReport:
|
|
111
|
+
"""Compare two API specifications and detect changes."""
|
|
112
|
+
self.old_spec = old_spec
|
|
113
|
+
self.new_spec = new_spec
|
|
114
|
+
self.report = ComparisonReport()
|
|
115
|
+
|
|
116
|
+
# Compare different sections of the API specification
|
|
117
|
+
self._compare_info_section()
|
|
118
|
+
self._compare_servers_section()
|
|
119
|
+
self._compare_paths_section()
|
|
120
|
+
self._compare_components_section()
|
|
121
|
+
self._compare_security_section()
|
|
122
|
+
|
|
123
|
+
# Calculate summary statistics
|
|
124
|
+
self.report.calculate_summary()
|
|
125
|
+
|
|
126
|
+
return self.report
|
|
127
|
+
|
|
128
|
+
def _compare_info_section(self) -> None:
|
|
129
|
+
"""Compare API info sections."""
|
|
130
|
+
old_info = self.old_spec.get('info', {})
|
|
131
|
+
new_info = self.new_spec.get('info', {})
|
|
132
|
+
|
|
133
|
+
# Version comparison
|
|
134
|
+
old_version = old_info.get('version', '')
|
|
135
|
+
new_version = new_info.get('version', '')
|
|
136
|
+
|
|
137
|
+
if old_version != new_version:
|
|
138
|
+
self.report.add_change(Change(
|
|
139
|
+
change_type=ChangeType.NON_BREAKING,
|
|
140
|
+
severity=ChangeSeverity.INFO,
|
|
141
|
+
category="versioning",
|
|
142
|
+
path="/info/version",
|
|
143
|
+
message=f"API version changed from '{old_version}' to '{new_version}'",
|
|
144
|
+
old_value=old_version,
|
|
145
|
+
new_value=new_version,
|
|
146
|
+
impact_description="Version change indicates API evolution"
|
|
147
|
+
))
|
|
148
|
+
|
|
149
|
+
# Title comparison
|
|
150
|
+
old_title = old_info.get('title', '')
|
|
151
|
+
new_title = new_info.get('title', '')
|
|
152
|
+
|
|
153
|
+
if old_title != new_title:
|
|
154
|
+
self.report.add_change(Change(
|
|
155
|
+
change_type=ChangeType.NON_BREAKING,
|
|
156
|
+
severity=ChangeSeverity.INFO,
|
|
157
|
+
category="metadata",
|
|
158
|
+
path="/info/title",
|
|
159
|
+
message=f"API title changed from '{old_title}' to '{new_title}'",
|
|
160
|
+
old_value=old_title,
|
|
161
|
+
new_value=new_title,
|
|
162
|
+
impact_description="Title change is cosmetic and doesn't affect functionality"
|
|
163
|
+
))
|
|
164
|
+
|
|
165
|
+
def _compare_servers_section(self) -> None:
|
|
166
|
+
"""Compare server configurations."""
|
|
167
|
+
old_servers = self.old_spec.get('servers', [])
|
|
168
|
+
new_servers = self.new_spec.get('servers', [])
|
|
169
|
+
|
|
170
|
+
old_urls = {server.get('url', '') for server in old_servers if isinstance(server, dict)}
|
|
171
|
+
new_urls = {server.get('url', '') for server in new_servers if isinstance(server, dict)}
|
|
172
|
+
|
|
173
|
+
# Removed servers
|
|
174
|
+
removed_urls = old_urls - new_urls
|
|
175
|
+
for url in removed_urls:
|
|
176
|
+
self.report.add_change(Change(
|
|
177
|
+
change_type=ChangeType.BREAKING,
|
|
178
|
+
severity=ChangeSeverity.HIGH,
|
|
179
|
+
category="servers",
|
|
180
|
+
path="/servers",
|
|
181
|
+
message=f"Server URL removed: {url}",
|
|
182
|
+
old_value=url,
|
|
183
|
+
new_value=None,
|
|
184
|
+
migration_guide=f"Update client configurations to use alternative server URLs: {list(new_urls)}",
|
|
185
|
+
impact_description="Clients configured to use removed server URL will fail to connect"
|
|
186
|
+
))
|
|
187
|
+
|
|
188
|
+
# Added servers
|
|
189
|
+
added_urls = new_urls - old_urls
|
|
190
|
+
for url in added_urls:
|
|
191
|
+
self.report.add_change(Change(
|
|
192
|
+
change_type=ChangeType.ENHANCEMENT,
|
|
193
|
+
severity=ChangeSeverity.INFO,
|
|
194
|
+
category="servers",
|
|
195
|
+
path="/servers",
|
|
196
|
+
message=f"New server URL added: {url}",
|
|
197
|
+
old_value=None,
|
|
198
|
+
new_value=url,
|
|
199
|
+
impact_description="New server option provides additional deployment flexibility"
|
|
200
|
+
))
|
|
201
|
+
|
|
202
|
+
def _compare_paths_section(self) -> None:
|
|
203
|
+
"""Compare API paths and operations."""
|
|
204
|
+
old_paths = self.old_spec.get('paths', {})
|
|
205
|
+
new_paths = self.new_spec.get('paths', {})
|
|
206
|
+
|
|
207
|
+
# Find removed, added, and modified paths
|
|
208
|
+
old_path_set = set(old_paths.keys())
|
|
209
|
+
new_path_set = set(new_paths.keys())
|
|
210
|
+
|
|
211
|
+
removed_paths = old_path_set - new_path_set
|
|
212
|
+
added_paths = new_path_set - old_path_set
|
|
213
|
+
common_paths = old_path_set & new_path_set
|
|
214
|
+
|
|
215
|
+
# Handle removed paths
|
|
216
|
+
for path in removed_paths:
|
|
217
|
+
old_operations = self._extract_operations(old_paths[path])
|
|
218
|
+
for method in old_operations:
|
|
219
|
+
self.report.add_change(Change(
|
|
220
|
+
change_type=ChangeType.BREAKING,
|
|
221
|
+
severity=ChangeSeverity.CRITICAL,
|
|
222
|
+
category="endpoints",
|
|
223
|
+
path=f"/paths{path}",
|
|
224
|
+
message=f"Endpoint removed: {method.upper()} {path}",
|
|
225
|
+
old_value=f"{method.upper()} {path}",
|
|
226
|
+
new_value=None,
|
|
227
|
+
migration_guide=self._generate_endpoint_removal_migration(path, method, new_paths),
|
|
228
|
+
impact_description="Clients using this endpoint will receive 404 errors"
|
|
229
|
+
))
|
|
230
|
+
|
|
231
|
+
# Handle added paths
|
|
232
|
+
for path in added_paths:
|
|
233
|
+
new_operations = self._extract_operations(new_paths[path])
|
|
234
|
+
for method in new_operations:
|
|
235
|
+
self.report.add_change(Change(
|
|
236
|
+
change_type=ChangeType.ENHANCEMENT,
|
|
237
|
+
severity=ChangeSeverity.INFO,
|
|
238
|
+
category="endpoints",
|
|
239
|
+
path=f"/paths{path}",
|
|
240
|
+
message=f"New endpoint added: {method.upper()} {path}",
|
|
241
|
+
old_value=None,
|
|
242
|
+
new_value=f"{method.upper()} {path}",
|
|
243
|
+
impact_description="New functionality available to clients"
|
|
244
|
+
))
|
|
245
|
+
|
|
246
|
+
# Handle modified paths
|
|
247
|
+
for path in common_paths:
|
|
248
|
+
self._compare_path_operations(path, old_paths[path], new_paths[path])
|
|
249
|
+
|
|
250
|
+
def _extract_operations(self, path_object: Dict[str, Any]) -> List[str]:
|
|
251
|
+
"""Extract HTTP operations from a path object."""
|
|
252
|
+
http_methods = {'get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace'}
|
|
253
|
+
return [method for method in path_object.keys() if method.lower() in http_methods]
|
|
254
|
+
|
|
255
|
+
def _compare_path_operations(self, path: str, old_path_obj: Dict, new_path_obj: Dict) -> None:
|
|
256
|
+
"""Compare operations within a specific path."""
|
|
257
|
+
old_operations = set(self._extract_operations(old_path_obj))
|
|
258
|
+
new_operations = set(self._extract_operations(new_path_obj))
|
|
259
|
+
|
|
260
|
+
# Removed operations
|
|
261
|
+
removed_ops = old_operations - new_operations
|
|
262
|
+
for method in removed_ops:
|
|
263
|
+
self.report.add_change(Change(
|
|
264
|
+
change_type=ChangeType.BREAKING,
|
|
265
|
+
severity=ChangeSeverity.CRITICAL,
|
|
266
|
+
category="endpoints",
|
|
267
|
+
path=f"/paths{path}/{method}",
|
|
268
|
+
message=f"HTTP method removed: {method.upper()} {path}",
|
|
269
|
+
old_value=f"{method.upper()} {path}",
|
|
270
|
+
new_value=None,
|
|
271
|
+
migration_guide=self._generate_method_removal_migration(path, method, new_operations),
|
|
272
|
+
impact_description="Clients using this method will receive 405 Method Not Allowed errors"
|
|
273
|
+
))
|
|
274
|
+
|
|
275
|
+
# Added operations
|
|
276
|
+
added_ops = new_operations - old_operations
|
|
277
|
+
for method in added_ops:
|
|
278
|
+
self.report.add_change(Change(
|
|
279
|
+
change_type=ChangeType.ENHANCEMENT,
|
|
280
|
+
severity=ChangeSeverity.INFO,
|
|
281
|
+
category="endpoints",
|
|
282
|
+
path=f"/paths{path}/{method}",
|
|
283
|
+
message=f"New HTTP method added: {method.upper()} {path}",
|
|
284
|
+
old_value=None,
|
|
285
|
+
new_value=f"{method.upper()} {path}",
|
|
286
|
+
impact_description="New method provides additional functionality for this resource"
|
|
287
|
+
))
|
|
288
|
+
|
|
289
|
+
# Modified operations
|
|
290
|
+
common_ops = old_operations & new_operations
|
|
291
|
+
for method in common_ops:
|
|
292
|
+
self._compare_operation_details(path, method, old_path_obj[method], new_path_obj[method])
|
|
293
|
+
|
|
294
|
+
def _compare_operation_details(self, path: str, method: str, old_op: Dict, new_op: Dict) -> None:
|
|
295
|
+
"""Compare details of individual operations."""
|
|
296
|
+
operation_path = f"/paths{path}/{method}"
|
|
297
|
+
|
|
298
|
+
# Compare parameters
|
|
299
|
+
self._compare_parameters(operation_path, old_op.get('parameters', []), new_op.get('parameters', []))
|
|
300
|
+
|
|
301
|
+
# Compare request body
|
|
302
|
+
self._compare_request_body(operation_path, old_op.get('requestBody'), new_op.get('requestBody'))
|
|
303
|
+
|
|
304
|
+
# Compare responses
|
|
305
|
+
self._compare_responses(operation_path, old_op.get('responses', {}), new_op.get('responses', {}))
|
|
306
|
+
|
|
307
|
+
# Compare security requirements
|
|
308
|
+
self._compare_security_requirements(operation_path, old_op.get('security'), new_op.get('security'))
|
|
309
|
+
|
|
310
|
+
def _compare_parameters(self, base_path: str, old_params: List[Dict], new_params: List[Dict]) -> None:
|
|
311
|
+
"""Compare operation parameters."""
|
|
312
|
+
# Create lookup dictionaries
|
|
313
|
+
old_param_map = {(p.get('name'), p.get('in')): p for p in old_params}
|
|
314
|
+
new_param_map = {(p.get('name'), p.get('in')): p for p in new_params}
|
|
315
|
+
|
|
316
|
+
old_param_keys = set(old_param_map.keys())
|
|
317
|
+
new_param_keys = set(new_param_map.keys())
|
|
318
|
+
|
|
319
|
+
# Removed parameters
|
|
320
|
+
removed_params = old_param_keys - new_param_keys
|
|
321
|
+
for param_key in removed_params:
|
|
322
|
+
name, location = param_key
|
|
323
|
+
self.report.add_change(Change(
|
|
324
|
+
change_type=ChangeType.BREAKING,
|
|
325
|
+
severity=ChangeSeverity.HIGH,
|
|
326
|
+
category="parameters",
|
|
327
|
+
path=f"{base_path}/parameters",
|
|
328
|
+
message=f"Parameter removed: {name} (in: {location})",
|
|
329
|
+
old_value=old_param_map[param_key],
|
|
330
|
+
new_value=None,
|
|
331
|
+
migration_guide=f"Remove '{name}' parameter from {location} when calling this endpoint",
|
|
332
|
+
impact_description="Clients sending this parameter may receive validation errors"
|
|
333
|
+
))
|
|
334
|
+
|
|
335
|
+
# Added parameters
|
|
336
|
+
added_params = new_param_keys - old_param_keys
|
|
337
|
+
for param_key in added_params:
|
|
338
|
+
name, location = param_key
|
|
339
|
+
new_param = new_param_map[param_key]
|
|
340
|
+
is_required = new_param.get('required', False)
|
|
341
|
+
|
|
342
|
+
if is_required:
|
|
343
|
+
self.report.add_change(Change(
|
|
344
|
+
change_type=ChangeType.BREAKING,
|
|
345
|
+
severity=ChangeSeverity.CRITICAL,
|
|
346
|
+
category="parameters",
|
|
347
|
+
path=f"{base_path}/parameters",
|
|
348
|
+
message=f"New required parameter added: {name} (in: {location})",
|
|
349
|
+
old_value=None,
|
|
350
|
+
new_value=new_param,
|
|
351
|
+
migration_guide=f"Add required '{name}' parameter to {location} when calling this endpoint",
|
|
352
|
+
impact_description="Clients not providing this parameter will receive 400 Bad Request errors"
|
|
353
|
+
))
|
|
354
|
+
else:
|
|
355
|
+
self.report.add_change(Change(
|
|
356
|
+
change_type=ChangeType.NON_BREAKING,
|
|
357
|
+
severity=ChangeSeverity.INFO,
|
|
358
|
+
category="parameters",
|
|
359
|
+
path=f"{base_path}/parameters",
|
|
360
|
+
message=f"New optional parameter added: {name} (in: {location})",
|
|
361
|
+
old_value=None,
|
|
362
|
+
new_value=new_param,
|
|
363
|
+
impact_description="Optional parameter provides additional functionality"
|
|
364
|
+
))
|
|
365
|
+
|
|
366
|
+
# Modified parameters
|
|
367
|
+
common_params = old_param_keys & new_param_keys
|
|
368
|
+
for param_key in common_params:
|
|
369
|
+
name, location = param_key
|
|
370
|
+
old_param = old_param_map[param_key]
|
|
371
|
+
new_param = new_param_map[param_key]
|
|
372
|
+
self._compare_parameter_details(base_path, name, location, old_param, new_param)
|
|
373
|
+
|
|
374
|
+
def _compare_parameter_details(self, base_path: str, name: str, location: str,
|
|
375
|
+
old_param: Dict, new_param: Dict) -> None:
|
|
376
|
+
"""Compare individual parameter details."""
|
|
377
|
+
param_path = f"{base_path}/parameters/{name}"
|
|
378
|
+
|
|
379
|
+
# Required status change
|
|
380
|
+
old_required = old_param.get('required', False)
|
|
381
|
+
new_required = new_param.get('required', False)
|
|
382
|
+
|
|
383
|
+
if old_required != new_required:
|
|
384
|
+
if new_required:
|
|
385
|
+
self.report.add_change(Change(
|
|
386
|
+
change_type=ChangeType.BREAKING,
|
|
387
|
+
severity=ChangeSeverity.HIGH,
|
|
388
|
+
category="parameters",
|
|
389
|
+
path=param_path,
|
|
390
|
+
message=f"Parameter '{name}' is now required (was optional)",
|
|
391
|
+
old_value=old_required,
|
|
392
|
+
new_value=new_required,
|
|
393
|
+
migration_guide=f"Ensure '{name}' parameter is always provided when calling this endpoint",
|
|
394
|
+
impact_description="Clients not providing this parameter will receive validation errors"
|
|
395
|
+
))
|
|
396
|
+
else:
|
|
397
|
+
self.report.add_change(Change(
|
|
398
|
+
change_type=ChangeType.NON_BREAKING,
|
|
399
|
+
severity=ChangeSeverity.INFO,
|
|
400
|
+
category="parameters",
|
|
401
|
+
path=param_path,
|
|
402
|
+
message=f"Parameter '{name}' is now optional (was required)",
|
|
403
|
+
old_value=old_required,
|
|
404
|
+
new_value=new_required,
|
|
405
|
+
impact_description="Parameter is now optional, providing more flexibility to clients"
|
|
406
|
+
))
|
|
407
|
+
|
|
408
|
+
# Schema/type changes
|
|
409
|
+
old_schema = old_param.get('schema', {})
|
|
410
|
+
new_schema = new_param.get('schema', {})
|
|
411
|
+
|
|
412
|
+
if old_schema != new_schema:
|
|
413
|
+
self._compare_schemas(param_path, old_schema, new_schema, f"parameter '{name}'")
|
|
414
|
+
|
|
415
|
+
def _compare_request_body(self, base_path: str, old_body: Optional[Dict], new_body: Optional[Dict]) -> None:
|
|
416
|
+
"""Compare request body specifications."""
|
|
417
|
+
body_path = f"{base_path}/requestBody"
|
|
418
|
+
|
|
419
|
+
# Request body added
|
|
420
|
+
if old_body is None and new_body is not None:
|
|
421
|
+
is_required = new_body.get('required', False)
|
|
422
|
+
if is_required:
|
|
423
|
+
self.report.add_change(Change(
|
|
424
|
+
change_type=ChangeType.BREAKING,
|
|
425
|
+
severity=ChangeSeverity.HIGH,
|
|
426
|
+
category="request_body",
|
|
427
|
+
path=body_path,
|
|
428
|
+
message="Required request body added",
|
|
429
|
+
old_value=None,
|
|
430
|
+
new_value=new_body,
|
|
431
|
+
migration_guide="Include request body with appropriate content type when calling this endpoint",
|
|
432
|
+
impact_description="Clients not providing request body will receive validation errors"
|
|
433
|
+
))
|
|
434
|
+
else:
|
|
435
|
+
self.report.add_change(Change(
|
|
436
|
+
change_type=ChangeType.NON_BREAKING,
|
|
437
|
+
severity=ChangeSeverity.INFO,
|
|
438
|
+
category="request_body",
|
|
439
|
+
path=body_path,
|
|
440
|
+
message="Optional request body added",
|
|
441
|
+
old_value=None,
|
|
442
|
+
new_value=new_body,
|
|
443
|
+
impact_description="Optional request body provides additional functionality"
|
|
444
|
+
))
|
|
445
|
+
|
|
446
|
+
# Request body removed
|
|
447
|
+
elif old_body is not None and new_body is None:
|
|
448
|
+
self.report.add_change(Change(
|
|
449
|
+
change_type=ChangeType.BREAKING,
|
|
450
|
+
severity=ChangeSeverity.HIGH,
|
|
451
|
+
category="request_body",
|
|
452
|
+
path=body_path,
|
|
453
|
+
message="Request body removed",
|
|
454
|
+
old_value=old_body,
|
|
455
|
+
new_value=None,
|
|
456
|
+
migration_guide="Remove request body when calling this endpoint",
|
|
457
|
+
impact_description="Clients sending request body may receive validation errors"
|
|
458
|
+
))
|
|
459
|
+
|
|
460
|
+
# Request body modified
|
|
461
|
+
elif old_body is not None and new_body is not None:
|
|
462
|
+
self._compare_request_body_details(body_path, old_body, new_body)
|
|
463
|
+
|
|
464
|
+
def _compare_request_body_details(self, base_path: str, old_body: Dict, new_body: Dict) -> None:
|
|
465
|
+
"""Compare request body details."""
|
|
466
|
+
# Required status change
|
|
467
|
+
old_required = old_body.get('required', False)
|
|
468
|
+
new_required = new_body.get('required', False)
|
|
469
|
+
|
|
470
|
+
if old_required != new_required:
|
|
471
|
+
if new_required:
|
|
472
|
+
self.report.add_change(Change(
|
|
473
|
+
change_type=ChangeType.BREAKING,
|
|
474
|
+
severity=ChangeSeverity.HIGH,
|
|
475
|
+
category="request_body",
|
|
476
|
+
path=base_path,
|
|
477
|
+
message="Request body is now required (was optional)",
|
|
478
|
+
old_value=old_required,
|
|
479
|
+
new_value=new_required,
|
|
480
|
+
migration_guide="Always include request body when calling this endpoint",
|
|
481
|
+
impact_description="Clients not providing request body will receive validation errors"
|
|
482
|
+
))
|
|
483
|
+
else:
|
|
484
|
+
self.report.add_change(Change(
|
|
485
|
+
change_type=ChangeType.NON_BREAKING,
|
|
486
|
+
severity=ChangeSeverity.INFO,
|
|
487
|
+
category="request_body",
|
|
488
|
+
path=base_path,
|
|
489
|
+
message="Request body is now optional (was required)",
|
|
490
|
+
old_value=old_required,
|
|
491
|
+
new_value=new_required,
|
|
492
|
+
impact_description="Request body is now optional, providing more flexibility"
|
|
493
|
+
))
|
|
494
|
+
|
|
495
|
+
# Content type changes
|
|
496
|
+
old_content = old_body.get('content', {})
|
|
497
|
+
new_content = new_body.get('content', {})
|
|
498
|
+
self._compare_content_types(base_path, old_content, new_content, "request body")
|
|
499
|
+
|
|
500
|
+
def _compare_responses(self, base_path: str, old_responses: Dict, new_responses: Dict) -> None:
|
|
501
|
+
"""Compare response specifications."""
|
|
502
|
+
responses_path = f"{base_path}/responses"
|
|
503
|
+
|
|
504
|
+
old_status_codes = set(old_responses.keys())
|
|
505
|
+
new_status_codes = set(new_responses.keys())
|
|
506
|
+
|
|
507
|
+
# Removed status codes
|
|
508
|
+
removed_codes = old_status_codes - new_status_codes
|
|
509
|
+
for code in removed_codes:
|
|
510
|
+
self.report.add_change(Change(
|
|
511
|
+
change_type=ChangeType.BREAKING,
|
|
512
|
+
severity=ChangeSeverity.HIGH,
|
|
513
|
+
category="responses",
|
|
514
|
+
path=f"{responses_path}/{code}",
|
|
515
|
+
message=f"Response status code {code} removed",
|
|
516
|
+
old_value=old_responses[code],
|
|
517
|
+
new_value=None,
|
|
518
|
+
migration_guide=f"Handle alternative status codes: {list(new_status_codes)}",
|
|
519
|
+
impact_description=f"Clients expecting status code {code} need to handle different responses"
|
|
520
|
+
))
|
|
521
|
+
|
|
522
|
+
# Added status codes
|
|
523
|
+
added_codes = new_status_codes - old_status_codes
|
|
524
|
+
for code in added_codes:
|
|
525
|
+
self.report.add_change(Change(
|
|
526
|
+
change_type=ChangeType.NON_BREAKING,
|
|
527
|
+
severity=ChangeSeverity.INFO,
|
|
528
|
+
category="responses",
|
|
529
|
+
path=f"{responses_path}/{code}",
|
|
530
|
+
message=f"New response status code {code} added",
|
|
531
|
+
old_value=None,
|
|
532
|
+
new_value=new_responses[code],
|
|
533
|
+
impact_description="New status code provides more specific response information"
|
|
534
|
+
))
|
|
535
|
+
|
|
536
|
+
# Modified responses
|
|
537
|
+
common_codes = old_status_codes & new_status_codes
|
|
538
|
+
for code in common_codes:
|
|
539
|
+
self._compare_response_details(responses_path, code, old_responses[code], new_responses[code])
|
|
540
|
+
|
|
541
|
+
def _compare_response_details(self, base_path: str, status_code: str,
|
|
542
|
+
old_response: Dict, new_response: Dict) -> None:
|
|
543
|
+
"""Compare individual response details."""
|
|
544
|
+
response_path = f"{base_path}/{status_code}"
|
|
545
|
+
|
|
546
|
+
# Compare content types and schemas
|
|
547
|
+
old_content = old_response.get('content', {})
|
|
548
|
+
new_content = new_response.get('content', {})
|
|
549
|
+
|
|
550
|
+
self._compare_content_types(response_path, old_content, new_content, f"response {status_code}")
|
|
551
|
+
|
|
552
|
+
def _compare_content_types(self, base_path: str, old_content: Dict, new_content: Dict, context: str) -> None:
|
|
553
|
+
"""Compare content types and their schemas."""
|
|
554
|
+
old_types = set(old_content.keys())
|
|
555
|
+
new_types = set(new_content.keys())
|
|
556
|
+
|
|
557
|
+
# Removed content types
|
|
558
|
+
removed_types = old_types - new_types
|
|
559
|
+
for content_type in removed_types:
|
|
560
|
+
self.report.add_change(Change(
|
|
561
|
+
change_type=ChangeType.BREAKING,
|
|
562
|
+
severity=ChangeSeverity.HIGH,
|
|
563
|
+
category="content_types",
|
|
564
|
+
path=f"{base_path}/content",
|
|
565
|
+
message=f"Content type '{content_type}' removed from {context}",
|
|
566
|
+
old_value=content_type,
|
|
567
|
+
new_value=None,
|
|
568
|
+
migration_guide=f"Use alternative content types: {list(new_types)}",
|
|
569
|
+
impact_description=f"Clients expecting '{content_type}' need to handle different formats"
|
|
570
|
+
))
|
|
571
|
+
|
|
572
|
+
# Added content types
|
|
573
|
+
added_types = new_types - old_types
|
|
574
|
+
for content_type in added_types:
|
|
575
|
+
self.report.add_change(Change(
|
|
576
|
+
change_type=ChangeType.ENHANCEMENT,
|
|
577
|
+
severity=ChangeSeverity.INFO,
|
|
578
|
+
category="content_types",
|
|
579
|
+
path=f"{base_path}/content",
|
|
580
|
+
message=f"New content type '{content_type}' added to {context}",
|
|
581
|
+
old_value=None,
|
|
582
|
+
new_value=content_type,
|
|
583
|
+
impact_description=f"Additional format option available for {context}"
|
|
584
|
+
))
|
|
585
|
+
|
|
586
|
+
# Modified schemas for common content types
|
|
587
|
+
common_types = old_types & new_types
|
|
588
|
+
for content_type in common_types:
|
|
589
|
+
old_media = old_content[content_type]
|
|
590
|
+
new_media = new_content[content_type]
|
|
591
|
+
|
|
592
|
+
old_schema = old_media.get('schema', {})
|
|
593
|
+
new_schema = new_media.get('schema', {})
|
|
594
|
+
|
|
595
|
+
if old_schema != new_schema:
|
|
596
|
+
schema_path = f"{base_path}/content/{content_type}/schema"
|
|
597
|
+
self._compare_schemas(schema_path, old_schema, new_schema, f"{context} ({content_type})")
|
|
598
|
+
|
|
599
|
+
def _compare_schemas(self, base_path: str, old_schema: Dict, new_schema: Dict, context: str) -> None:
|
|
600
|
+
"""Compare schema definitions."""
|
|
601
|
+
# Type changes
|
|
602
|
+
old_type = old_schema.get('type')
|
|
603
|
+
new_type = new_schema.get('type')
|
|
604
|
+
|
|
605
|
+
if old_type != new_type and old_type is not None and new_type is not None:
|
|
606
|
+
self.report.add_change(Change(
|
|
607
|
+
change_type=ChangeType.BREAKING,
|
|
608
|
+
severity=ChangeSeverity.CRITICAL,
|
|
609
|
+
category="schema",
|
|
610
|
+
path=base_path,
|
|
611
|
+
message=f"Schema type changed from '{old_type}' to '{new_type}' for {context}",
|
|
612
|
+
old_value=old_type,
|
|
613
|
+
new_value=new_type,
|
|
614
|
+
migration_guide=f"Update client code to handle {new_type} instead of {old_type}",
|
|
615
|
+
impact_description="Type change will break client parsing and validation"
|
|
616
|
+
))
|
|
617
|
+
|
|
618
|
+
# Property changes for object types
|
|
619
|
+
if old_schema.get('type') == 'object' and new_schema.get('type') == 'object':
|
|
620
|
+
self._compare_object_properties(base_path, old_schema, new_schema, context)
|
|
621
|
+
|
|
622
|
+
# Array item changes
|
|
623
|
+
if old_schema.get('type') == 'array' and new_schema.get('type') == 'array':
|
|
624
|
+
old_items = old_schema.get('items', {})
|
|
625
|
+
new_items = new_schema.get('items', {})
|
|
626
|
+
if old_items != new_items:
|
|
627
|
+
self._compare_schemas(f"{base_path}/items", old_items, new_items, f"{context} items")
|
|
628
|
+
|
|
629
|
+
def _compare_object_properties(self, base_path: str, old_schema: Dict, new_schema: Dict, context: str) -> None:
|
|
630
|
+
"""Compare object schema properties."""
|
|
631
|
+
old_props = old_schema.get('properties', {})
|
|
632
|
+
new_props = new_schema.get('properties', {})
|
|
633
|
+
old_required = set(old_schema.get('required', []))
|
|
634
|
+
new_required = set(new_schema.get('required', []))
|
|
635
|
+
|
|
636
|
+
old_prop_names = set(old_props.keys())
|
|
637
|
+
new_prop_names = set(new_props.keys())
|
|
638
|
+
|
|
639
|
+
# Removed properties
|
|
640
|
+
removed_props = old_prop_names - new_prop_names
|
|
641
|
+
for prop_name in removed_props:
|
|
642
|
+
severity = ChangeSeverity.CRITICAL if prop_name in old_required else ChangeSeverity.HIGH
|
|
643
|
+
self.report.add_change(Change(
|
|
644
|
+
change_type=ChangeType.BREAKING,
|
|
645
|
+
severity=severity,
|
|
646
|
+
category="schema",
|
|
647
|
+
path=f"{base_path}/properties",
|
|
648
|
+
message=f"Property '{prop_name}' removed from {context}",
|
|
649
|
+
old_value=old_props[prop_name],
|
|
650
|
+
new_value=None,
|
|
651
|
+
migration_guide=f"Remove references to '{prop_name}' property in client code",
|
|
652
|
+
impact_description="Clients expecting this property will receive incomplete data"
|
|
653
|
+
))
|
|
654
|
+
|
|
655
|
+
# Added properties
|
|
656
|
+
added_props = new_prop_names - old_prop_names
|
|
657
|
+
for prop_name in added_props:
|
|
658
|
+
if prop_name in new_required:
|
|
659
|
+
# This is handled separately in required field changes
|
|
660
|
+
pass
|
|
661
|
+
else:
|
|
662
|
+
self.report.add_change(Change(
|
|
663
|
+
change_type=ChangeType.NON_BREAKING,
|
|
664
|
+
severity=ChangeSeverity.INFO,
|
|
665
|
+
category="schema",
|
|
666
|
+
path=f"{base_path}/properties",
|
|
667
|
+
message=f"New optional property '{prop_name}' added to {context}",
|
|
668
|
+
old_value=None,
|
|
669
|
+
new_value=new_props[prop_name],
|
|
670
|
+
impact_description="New property provides additional data without breaking existing clients"
|
|
671
|
+
))
|
|
672
|
+
|
|
673
|
+
# Required field changes
|
|
674
|
+
added_required = new_required - old_required
|
|
675
|
+
removed_required = old_required - new_required
|
|
676
|
+
|
|
677
|
+
for prop_name in added_required:
|
|
678
|
+
self.report.add_change(Change(
|
|
679
|
+
change_type=ChangeType.BREAKING,
|
|
680
|
+
severity=ChangeSeverity.CRITICAL,
|
|
681
|
+
category="schema",
|
|
682
|
+
path=f"{base_path}/properties",
|
|
683
|
+
message=f"Property '{prop_name}' is now required in {context}",
|
|
684
|
+
old_value=False,
|
|
685
|
+
new_value=True,
|
|
686
|
+
migration_guide=f"Ensure '{prop_name}' is always provided when sending {context}",
|
|
687
|
+
impact_description="Clients not providing this property will receive validation errors"
|
|
688
|
+
))
|
|
689
|
+
|
|
690
|
+
for prop_name in removed_required:
|
|
691
|
+
self.report.add_change(Change(
|
|
692
|
+
change_type=ChangeType.NON_BREAKING,
|
|
693
|
+
severity=ChangeSeverity.INFO,
|
|
694
|
+
category="schema",
|
|
695
|
+
path=f"{base_path}/properties",
|
|
696
|
+
message=f"Property '{prop_name}' is no longer required in {context}",
|
|
697
|
+
old_value=True,
|
|
698
|
+
new_value=False,
|
|
699
|
+
impact_description="Property is now optional, providing more flexibility"
|
|
700
|
+
))
|
|
701
|
+
|
|
702
|
+
# Modified properties
|
|
703
|
+
common_props = old_prop_names & new_prop_names
|
|
704
|
+
for prop_name in common_props:
|
|
705
|
+
old_prop = old_props[prop_name]
|
|
706
|
+
new_prop = new_props[prop_name]
|
|
707
|
+
if old_prop != new_prop:
|
|
708
|
+
self._compare_schemas(f"{base_path}/properties/{prop_name}",
|
|
709
|
+
old_prop, new_prop, f"{context}.{prop_name}")
|
|
710
|
+
|
|
711
|
+
def _compare_security_requirements(self, base_path: str, old_security: Optional[List],
|
|
712
|
+
new_security: Optional[List]) -> None:
|
|
713
|
+
"""Compare security requirements."""
|
|
714
|
+
# Simplified security comparison - could be expanded
|
|
715
|
+
if old_security != new_security:
|
|
716
|
+
severity = ChangeSeverity.HIGH if new_security else ChangeSeverity.CRITICAL
|
|
717
|
+
change_type = ChangeType.BREAKING
|
|
718
|
+
|
|
719
|
+
if old_security is None and new_security is not None:
|
|
720
|
+
message = "Security requirements added"
|
|
721
|
+
migration_guide = "Ensure proper authentication/authorization when calling this endpoint"
|
|
722
|
+
impact = "Endpoint now requires authentication"
|
|
723
|
+
elif old_security is not None and new_security is None:
|
|
724
|
+
message = "Security requirements removed"
|
|
725
|
+
migration_guide = "Authentication is no longer required for this endpoint"
|
|
726
|
+
impact = "Endpoint is now publicly accessible"
|
|
727
|
+
severity = ChangeSeverity.MEDIUM # Less severe, more permissive
|
|
728
|
+
else:
|
|
729
|
+
message = "Security requirements modified"
|
|
730
|
+
migration_guide = "Update authentication/authorization method for this endpoint"
|
|
731
|
+
impact = "Different authentication method required"
|
|
732
|
+
|
|
733
|
+
self.report.add_change(Change(
|
|
734
|
+
change_type=change_type,
|
|
735
|
+
severity=severity,
|
|
736
|
+
category="security",
|
|
737
|
+
path=f"{base_path}/security",
|
|
738
|
+
message=message,
|
|
739
|
+
old_value=old_security,
|
|
740
|
+
new_value=new_security,
|
|
741
|
+
migration_guide=migration_guide,
|
|
742
|
+
impact_description=impact
|
|
743
|
+
))
|
|
744
|
+
|
|
745
|
+
def _compare_components_section(self) -> None:
|
|
746
|
+
"""Compare components sections."""
|
|
747
|
+
old_components = self.old_spec.get('components', {})
|
|
748
|
+
new_components = self.new_spec.get('components', {})
|
|
749
|
+
|
|
750
|
+
# Compare schemas
|
|
751
|
+
old_schemas = old_components.get('schemas', {})
|
|
752
|
+
new_schemas = new_components.get('schemas', {})
|
|
753
|
+
|
|
754
|
+
old_schema_names = set(old_schemas.keys())
|
|
755
|
+
new_schema_names = set(new_schemas.keys())
|
|
756
|
+
|
|
757
|
+
# Removed schemas
|
|
758
|
+
removed_schemas = old_schema_names - new_schema_names
|
|
759
|
+
for schema_name in removed_schemas:
|
|
760
|
+
self.report.add_change(Change(
|
|
761
|
+
change_type=ChangeType.BREAKING,
|
|
762
|
+
severity=ChangeSeverity.HIGH,
|
|
763
|
+
category="components",
|
|
764
|
+
path=f"/components/schemas/{schema_name}",
|
|
765
|
+
message=f"Schema '{schema_name}' removed from components",
|
|
766
|
+
old_value=old_schemas[schema_name],
|
|
767
|
+
new_value=None,
|
|
768
|
+
migration_guide=f"Remove references to schema '{schema_name}' or use alternative schemas",
|
|
769
|
+
impact_description="References to this schema will fail validation"
|
|
770
|
+
))
|
|
771
|
+
|
|
772
|
+
# Added schemas
|
|
773
|
+
added_schemas = new_schema_names - old_schema_names
|
|
774
|
+
for schema_name in added_schemas:
|
|
775
|
+
self.report.add_change(Change(
|
|
776
|
+
change_type=ChangeType.ENHANCEMENT,
|
|
777
|
+
severity=ChangeSeverity.INFO,
|
|
778
|
+
category="components",
|
|
779
|
+
path=f"/components/schemas/{schema_name}",
|
|
780
|
+
message=f"New schema '{schema_name}' added to components",
|
|
781
|
+
old_value=None,
|
|
782
|
+
new_value=new_schemas[schema_name],
|
|
783
|
+
impact_description="New reusable schema available"
|
|
784
|
+
))
|
|
785
|
+
|
|
786
|
+
# Modified schemas
|
|
787
|
+
common_schemas = old_schema_names & new_schema_names
|
|
788
|
+
for schema_name in common_schemas:
|
|
789
|
+
old_schema = old_schemas[schema_name]
|
|
790
|
+
new_schema = new_schemas[schema_name]
|
|
791
|
+
if old_schema != new_schema:
|
|
792
|
+
self._compare_schemas(f"/components/schemas/{schema_name}",
|
|
793
|
+
old_schema, new_schema, f"schema '{schema_name}'")
|
|
794
|
+
|
|
795
|
+
def _compare_security_section(self) -> None:
|
|
796
|
+
"""Compare security definitions."""
|
|
797
|
+
old_security_schemes = self.old_spec.get('components', {}).get('securitySchemes', {})
|
|
798
|
+
new_security_schemes = self.new_spec.get('components', {}).get('securitySchemes', {})
|
|
799
|
+
|
|
800
|
+
if old_security_schemes != new_security_schemes:
|
|
801
|
+
# Simplified comparison - could be more detailed
|
|
802
|
+
self.report.add_change(Change(
|
|
803
|
+
change_type=ChangeType.POTENTIALLY_BREAKING,
|
|
804
|
+
severity=ChangeSeverity.MEDIUM,
|
|
805
|
+
category="security",
|
|
806
|
+
path="/components/securitySchemes",
|
|
807
|
+
message="Security scheme definitions changed",
|
|
808
|
+
old_value=old_security_schemes,
|
|
809
|
+
new_value=new_security_schemes,
|
|
810
|
+
migration_guide="Review authentication implementation for compatibility with new security schemes",
|
|
811
|
+
impact_description="Authentication mechanisms may have changed"
|
|
812
|
+
))
|
|
813
|
+
|
|
814
|
+
def _generate_endpoint_removal_migration(self, removed_path: str, method: str,
|
|
815
|
+
remaining_paths: Dict[str, Any]) -> str:
|
|
816
|
+
"""Generate migration guide for removed endpoints."""
|
|
817
|
+
# Look for similar endpoints
|
|
818
|
+
similar_paths = []
|
|
819
|
+
path_segments = removed_path.strip('/').split('/')
|
|
820
|
+
|
|
821
|
+
for existing_path in remaining_paths.keys():
|
|
822
|
+
existing_segments = existing_path.strip('/').split('/')
|
|
823
|
+
if len(existing_segments) == len(path_segments):
|
|
824
|
+
# Check similarity
|
|
825
|
+
similarity = sum(1 for i, seg in enumerate(path_segments)
|
|
826
|
+
if i < len(existing_segments) and seg == existing_segments[i])
|
|
827
|
+
if similarity >= len(path_segments) * 0.5: # At least 50% similar
|
|
828
|
+
similar_paths.append(existing_path)
|
|
829
|
+
|
|
830
|
+
if similar_paths:
|
|
831
|
+
return f"Consider using alternative endpoints: {', '.join(similar_paths[:3])}"
|
|
832
|
+
else:
|
|
833
|
+
return "No direct replacement available. Review API documentation for alternative approaches."
|
|
834
|
+
|
|
835
|
+
def _generate_method_removal_migration(self, path: str, removed_method: str,
|
|
836
|
+
remaining_methods: Set[str]) -> str:
|
|
837
|
+
"""Generate migration guide for removed HTTP methods."""
|
|
838
|
+
method_alternatives = {
|
|
839
|
+
'get': ['head'],
|
|
840
|
+
'post': ['put', 'patch'],
|
|
841
|
+
'put': ['post', 'patch'],
|
|
842
|
+
'patch': ['put', 'post'],
|
|
843
|
+
'delete': []
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
alternatives = []
|
|
847
|
+
for alt_method in method_alternatives.get(removed_method.lower(), []):
|
|
848
|
+
if alt_method in remaining_methods:
|
|
849
|
+
alternatives.append(alt_method.upper())
|
|
850
|
+
|
|
851
|
+
if alternatives:
|
|
852
|
+
return f"Use alternative methods: {', '.join(alternatives)}"
|
|
853
|
+
else:
|
|
854
|
+
return f"No alternative HTTP methods available for {path}"
|
|
855
|
+
|
|
856
|
+
def generate_json_report(self) -> str:
|
|
857
|
+
"""Generate JSON format report."""
|
|
858
|
+
report_data = {
|
|
859
|
+
"summary": self.report.summary,
|
|
860
|
+
"hasBreakingChanges": self.report.has_breaking_changes(),
|
|
861
|
+
"changes": [change.to_dict() for change in self.report.changes]
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
return json.dumps(report_data, indent=2)
|
|
865
|
+
|
|
866
|
+
def generate_text_report(self) -> str:
|
|
867
|
+
"""Generate human-readable text report."""
|
|
868
|
+
lines = [
|
|
869
|
+
"═══════════════════════════════════════════════════════════════",
|
|
870
|
+
" BREAKING CHANGE ANALYSIS REPORT",
|
|
871
|
+
"═══════════════════════════════════════════════════════════════",
|
|
872
|
+
"",
|
|
873
|
+
"SUMMARY:",
|
|
874
|
+
f" Total Changes: {self.report.summary.get('total_changes', 0)}",
|
|
875
|
+
f" 🔴 Breaking Changes: {self.report.summary.get('breaking_changes', 0)}",
|
|
876
|
+
f" 🟡 Potentially Breaking: {self.report.summary.get('potentially_breaking_changes', 0)}",
|
|
877
|
+
f" 🟢 Non-Breaking Changes: {self.report.summary.get('non_breaking_changes', 0)}",
|
|
878
|
+
f" ✨ Enhancements: {self.report.summary.get('enhancements', 0)}",
|
|
879
|
+
"",
|
|
880
|
+
"SEVERITY BREAKDOWN:",
|
|
881
|
+
f" 🚨 Critical: {self.report.summary.get('critical_severity', 0)}",
|
|
882
|
+
f" ⚠️ High: {self.report.summary.get('high_severity', 0)}",
|
|
883
|
+
f" ⚪ Medium: {self.report.summary.get('medium_severity', 0)}",
|
|
884
|
+
f" 🔵 Low: {self.report.summary.get('low_severity', 0)}",
|
|
885
|
+
f" ℹ️ Info: {self.report.summary.get('info_severity', 0)}",
|
|
886
|
+
""
|
|
887
|
+
]
|
|
888
|
+
|
|
889
|
+
if not self.report.changes:
|
|
890
|
+
lines.extend([
|
|
891
|
+
"🎉 No changes detected between the API versions!",
|
|
892
|
+
""
|
|
893
|
+
])
|
|
894
|
+
else:
|
|
895
|
+
# Group changes by type and severity
|
|
896
|
+
breaking_changes = [c for c in self.report.changes if c.change_type == ChangeType.BREAKING]
|
|
897
|
+
potentially_breaking = [c for c in self.report.changes if c.change_type == ChangeType.POTENTIALLY_BREAKING]
|
|
898
|
+
non_breaking = [c for c in self.report.changes if c.change_type == ChangeType.NON_BREAKING]
|
|
899
|
+
enhancements = [c for c in self.report.changes if c.change_type == ChangeType.ENHANCEMENT]
|
|
900
|
+
|
|
901
|
+
# Breaking changes section
|
|
902
|
+
if breaking_changes:
|
|
903
|
+
lines.extend([
|
|
904
|
+
"🔴 BREAKING CHANGES:",
|
|
905
|
+
"═" * 60
|
|
906
|
+
])
|
|
907
|
+
for change in sorted(breaking_changes, key=lambda x: x.severity.value):
|
|
908
|
+
self._add_change_to_report(lines, change)
|
|
909
|
+
lines.append("")
|
|
910
|
+
|
|
911
|
+
# Potentially breaking changes section
|
|
912
|
+
if potentially_breaking:
|
|
913
|
+
lines.extend([
|
|
914
|
+
"🟡 POTENTIALLY BREAKING CHANGES:",
|
|
915
|
+
"═" * 60
|
|
916
|
+
])
|
|
917
|
+
for change in sorted(potentially_breaking, key=lambda x: x.severity.value):
|
|
918
|
+
self._add_change_to_report(lines, change)
|
|
919
|
+
lines.append("")
|
|
920
|
+
|
|
921
|
+
# Non-breaking changes section
|
|
922
|
+
if non_breaking:
|
|
923
|
+
lines.extend([
|
|
924
|
+
"🟢 NON-BREAKING CHANGES:",
|
|
925
|
+
"═" * 60
|
|
926
|
+
])
|
|
927
|
+
for change in non_breaking:
|
|
928
|
+
self._add_change_to_report(lines, change)
|
|
929
|
+
lines.append("")
|
|
930
|
+
|
|
931
|
+
# Enhancements section
|
|
932
|
+
if enhancements:
|
|
933
|
+
lines.extend([
|
|
934
|
+
"✨ ENHANCEMENTS:",
|
|
935
|
+
"═" * 60
|
|
936
|
+
])
|
|
937
|
+
for change in enhancements:
|
|
938
|
+
self._add_change_to_report(lines, change)
|
|
939
|
+
lines.append("")
|
|
940
|
+
|
|
941
|
+
# Add overall assessment
|
|
942
|
+
lines.extend([
|
|
943
|
+
"═══════════════════════════════════════════════════════════════",
|
|
944
|
+
"OVERALL ASSESSMENT:",
|
|
945
|
+
"═══════════════════════════════════════════════════════════════"
|
|
946
|
+
])
|
|
947
|
+
|
|
948
|
+
if self.report.has_breaking_changes():
|
|
949
|
+
breaking_count = self.report.summary.get('breaking_changes', 0)
|
|
950
|
+
potentially_breaking_count = self.report.summary.get('potentially_breaking_changes', 0)
|
|
951
|
+
|
|
952
|
+
if breaking_count > 0:
|
|
953
|
+
lines.extend([
|
|
954
|
+
f"⛔ MAJOR VERSION BUMP REQUIRED",
|
|
955
|
+
f" This API version contains {breaking_count} breaking changes that will",
|
|
956
|
+
f" definitely break existing clients. A major version bump is required.",
|
|
957
|
+
""
|
|
958
|
+
])
|
|
959
|
+
elif potentially_breaking_count > 0:
|
|
960
|
+
lines.extend([
|
|
961
|
+
f"⚠️ MINOR VERSION BUMP RECOMMENDED",
|
|
962
|
+
f" This API version contains {potentially_breaking_count} potentially breaking",
|
|
963
|
+
f" changes. Consider a minor version bump and communicate changes to clients.",
|
|
964
|
+
""
|
|
965
|
+
])
|
|
966
|
+
else:
|
|
967
|
+
lines.extend([
|
|
968
|
+
"✅ PATCH VERSION BUMP ACCEPTABLE",
|
|
969
|
+
" No breaking changes detected. This version is backward compatible",
|
|
970
|
+
" with existing clients.",
|
|
971
|
+
""
|
|
972
|
+
])
|
|
973
|
+
|
|
974
|
+
return "\n".join(lines)
|
|
975
|
+
|
|
976
|
+
def _add_change_to_report(self, lines: List[str], change: Change) -> None:
|
|
977
|
+
"""Add a change to the text report."""
|
|
978
|
+
severity_icons = {
|
|
979
|
+
ChangeSeverity.CRITICAL: "🚨",
|
|
980
|
+
ChangeSeverity.HIGH: "⚠️ ",
|
|
981
|
+
ChangeSeverity.MEDIUM: "⚪",
|
|
982
|
+
ChangeSeverity.LOW: "🔵",
|
|
983
|
+
ChangeSeverity.INFO: "ℹ️ "
|
|
984
|
+
}
|
|
985
|
+
|
|
986
|
+
icon = severity_icons.get(change.severity, "❓")
|
|
987
|
+
|
|
988
|
+
lines.extend([
|
|
989
|
+
f"{icon} {change.severity.value.upper()}: {change.message}",
|
|
990
|
+
f" Path: {change.path}",
|
|
991
|
+
f" Category: {change.category}"
|
|
992
|
+
])
|
|
993
|
+
|
|
994
|
+
if change.impact_description:
|
|
995
|
+
lines.append(f" Impact: {change.impact_description}")
|
|
996
|
+
|
|
997
|
+
if change.migration_guide:
|
|
998
|
+
lines.append(f" 💡 Migration: {change.migration_guide}")
|
|
999
|
+
|
|
1000
|
+
lines.append("")
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
def main():
|
|
1004
|
+
"""Main CLI entry point."""
|
|
1005
|
+
parser = argparse.ArgumentParser(
|
|
1006
|
+
description="Compare API specification versions to detect breaking changes",
|
|
1007
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
1008
|
+
epilog="""
|
|
1009
|
+
Examples:
|
|
1010
|
+
python breaking_change_detector.py v1.json v2.json
|
|
1011
|
+
python breaking_change_detector.py --format json v1.json v2.json > changes.json
|
|
1012
|
+
python breaking_change_detector.py --output report.txt v1.json v2.json
|
|
1013
|
+
"""
|
|
1014
|
+
)
|
|
1015
|
+
|
|
1016
|
+
parser.add_argument(
|
|
1017
|
+
'old_spec',
|
|
1018
|
+
help='Old API specification file (JSON format)'
|
|
1019
|
+
)
|
|
1020
|
+
|
|
1021
|
+
parser.add_argument(
|
|
1022
|
+
'new_spec',
|
|
1023
|
+
help='New API specification file (JSON format)'
|
|
1024
|
+
)
|
|
1025
|
+
|
|
1026
|
+
parser.add_argument(
|
|
1027
|
+
'--format',
|
|
1028
|
+
choices=['text', 'json'],
|
|
1029
|
+
default='text',
|
|
1030
|
+
help='Output format (default: text)'
|
|
1031
|
+
)
|
|
1032
|
+
|
|
1033
|
+
parser.add_argument(
|
|
1034
|
+
'--output',
|
|
1035
|
+
help='Output file (default: stdout)'
|
|
1036
|
+
)
|
|
1037
|
+
|
|
1038
|
+
parser.add_argument(
|
|
1039
|
+
'--exit-on-breaking',
|
|
1040
|
+
action='store_true',
|
|
1041
|
+
help='Exit with code 1 if breaking changes are detected'
|
|
1042
|
+
)
|
|
1043
|
+
|
|
1044
|
+
args = parser.parse_args()
|
|
1045
|
+
|
|
1046
|
+
# Load specification files
|
|
1047
|
+
try:
|
|
1048
|
+
with open(args.old_spec, 'r') as f:
|
|
1049
|
+
old_spec = json.load(f)
|
|
1050
|
+
except FileNotFoundError:
|
|
1051
|
+
print(f"Error: Old specification file '{args.old_spec}' not found.", file=sys.stderr)
|
|
1052
|
+
return 1
|
|
1053
|
+
except json.JSONDecodeError as e:
|
|
1054
|
+
print(f"Error: Invalid JSON in '{args.old_spec}': {e}", file=sys.stderr)
|
|
1055
|
+
return 1
|
|
1056
|
+
|
|
1057
|
+
try:
|
|
1058
|
+
with open(args.new_spec, 'r') as f:
|
|
1059
|
+
new_spec = json.load(f)
|
|
1060
|
+
except FileNotFoundError:
|
|
1061
|
+
print(f"Error: New specification file '{args.new_spec}' not found.", file=sys.stderr)
|
|
1062
|
+
return 1
|
|
1063
|
+
except json.JSONDecodeError as e:
|
|
1064
|
+
print(f"Error: Invalid JSON in '{args.new_spec}': {e}", file=sys.stderr)
|
|
1065
|
+
return 1
|
|
1066
|
+
|
|
1067
|
+
# Initialize detector and compare specifications
|
|
1068
|
+
detector = BreakingChangeDetector()
|
|
1069
|
+
|
|
1070
|
+
try:
|
|
1071
|
+
report = detector.compare_specs(old_spec, new_spec)
|
|
1072
|
+
except Exception as e:
|
|
1073
|
+
print(f"Error during comparison: {e}", file=sys.stderr)
|
|
1074
|
+
return 1
|
|
1075
|
+
|
|
1076
|
+
# Generate report
|
|
1077
|
+
if args.format == 'json':
|
|
1078
|
+
output = detector.generate_json_report()
|
|
1079
|
+
else:
|
|
1080
|
+
output = detector.generate_text_report()
|
|
1081
|
+
|
|
1082
|
+
# Write output
|
|
1083
|
+
if args.output:
|
|
1084
|
+
try:
|
|
1085
|
+
with open(args.output, 'w') as f:
|
|
1086
|
+
f.write(output)
|
|
1087
|
+
print(f"Breaking change report written to {args.output}")
|
|
1088
|
+
except IOError as e:
|
|
1089
|
+
print(f"Error writing to '{args.output}': {e}", file=sys.stderr)
|
|
1090
|
+
return 1
|
|
1091
|
+
else:
|
|
1092
|
+
print(output)
|
|
1093
|
+
|
|
1094
|
+
# Exit with appropriate code
|
|
1095
|
+
if args.exit_on_breaking and report.has_breaking_changes():
|
|
1096
|
+
return 1
|
|
1097
|
+
|
|
1098
|
+
return 0
|
|
1099
|
+
|
|
1100
|
+
|
|
1101
|
+
if __name__ == '__main__':
|
|
1102
|
+
sys.exit(main())
|