@empline/preflight 1.0.20
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/README.md +540 -0
- package/dist/bin/approve.d.ts +24 -0
- package/dist/bin/approve.d.ts.map +1 -0
- package/dist/bin/approve.js +249 -0
- package/dist/bin/approve.js.map +1 -0
- package/dist/bin/audit.d.ts +64 -0
- package/dist/bin/audit.d.ts.map +1 -0
- package/dist/bin/audit.js +464 -0
- package/dist/bin/audit.js.map +1 -0
- package/dist/bin/install-hooks.d.ts +20 -0
- package/dist/bin/install-hooks.d.ts.map +1 -0
- package/dist/bin/install-hooks.js +204 -0
- package/dist/bin/install-hooks.js.map +1 -0
- package/dist/bin/preflight.d.ts +21 -0
- package/dist/bin/preflight.d.ts.map +1 -0
- package/dist/bin/preflight.js +218 -0
- package/dist/bin/preflight.js.map +1 -0
- package/dist/bin/preinstall.d.ts +15 -0
- package/dist/bin/preinstall.d.ts.map +1 -0
- package/dist/bin/preinstall.js +229 -0
- package/dist/bin/preinstall.js.map +1 -0
- package/dist/bin/review-drift.d.ts +17 -0
- package/dist/bin/review-drift.d.ts.map +1 -0
- package/dist/bin/review-drift.js +292 -0
- package/dist/bin/review-drift.js.map +1 -0
- package/dist/bin/review.d.ts +22 -0
- package/dist/bin/review.d.ts.map +1 -0
- package/dist/bin/review.js +179 -0
- package/dist/bin/review.js.map +1 -0
- package/dist/bin/submit-drift.d.ts +36 -0
- package/dist/bin/submit-drift.d.ts.map +1 -0
- package/dist/bin/submit-drift.js +534 -0
- package/dist/bin/submit-drift.js.map +1 -0
- package/dist/bin/submit.d.ts +23 -0
- package/dist/bin/submit.d.ts.map +1 -0
- package/dist/bin/submit.js +263 -0
- package/dist/bin/submit.js.map +1 -0
- package/dist/bin/watch.d.ts +27 -0
- package/dist/bin/watch.d.ts.map +1 -0
- package/dist/bin/watch.js +327 -0
- package/dist/bin/watch.js.map +1 -0
- package/dist/checks/ai/card-size-detection-validation.d.ts +22 -0
- package/dist/checks/ai/card-size-detection-validation.d.ts.map +1 -0
- package/dist/checks/ai/card-size-detection-validation.js +452 -0
- package/dist/checks/ai/card-size-detection-validation.js.map +1 -0
- package/dist/checks/ai/code-quality-ai.d.ts +17 -0
- package/dist/checks/ai/code-quality-ai.d.ts.map +1 -0
- package/dist/checks/ai/code-quality-ai.js +399 -0
- package/dist/checks/ai/code-quality-ai.js.map +1 -0
- package/dist/checks/ai/recognition-pipeline-validation.d.ts +27 -0
- package/dist/checks/ai/recognition-pipeline-validation.d.ts.map +1 -0
- package/dist/checks/ai/recognition-pipeline-validation.js +808 -0
- package/dist/checks/ai/recognition-pipeline-validation.js.map +1 -0
- package/dist/checks/ai/series-subset-hierarchy.d.ts +21 -0
- package/dist/checks/ai/series-subset-hierarchy.d.ts.map +1 -0
- package/dist/checks/ai/series-subset-hierarchy.js +373 -0
- package/dist/checks/ai/series-subset-hierarchy.js.map +1 -0
- package/dist/checks/api/api-completeness-check.d.ts +26 -0
- package/dist/checks/api/api-completeness-check.d.ts.map +1 -0
- package/dist/checks/api/api-completeness-check.js +311 -0
- package/dist/checks/api/api-completeness-check.js.map +1 -0
- package/dist/checks/api/api-contract-validation.d.ts +24 -0
- package/dist/checks/api/api-contract-validation.d.ts.map +1 -0
- package/dist/checks/api/api-contract-validation.js +219 -0
- package/dist/checks/api/api-contract-validation.js.map +1 -0
- package/dist/checks/api/pagination-validation.d.ts +21 -0
- package/dist/checks/api/pagination-validation.d.ts.map +1 -0
- package/dist/checks/api/pagination-validation.js +270 -0
- package/dist/checks/api/pagination-validation.js.map +1 -0
- package/dist/checks/api/response-consistency.d.ts +21 -0
- package/dist/checks/api/response-consistency.d.ts.map +1 -0
- package/dist/checks/api/response-consistency.js +238 -0
- package/dist/checks/api/response-consistency.js.map +1 -0
- package/dist/checks/api/response-schema-validation.d.ts +25 -0
- package/dist/checks/api/response-schema-validation.d.ts.map +1 -0
- package/dist/checks/api/response-schema-validation.js +288 -0
- package/dist/checks/api/response-schema-validation.js.map +1 -0
- package/dist/checks/api/response-time-budget.d.ts +17 -0
- package/dist/checks/api/response-time-budget.d.ts.map +1 -0
- package/dist/checks/api/response-time-budget.js +294 -0
- package/dist/checks/api/response-time-budget.js.map +1 -0
- package/dist/checks/api/variant-switching-integrity.d.ts +22 -0
- package/dist/checks/api/variant-switching-integrity.d.ts.map +1 -0
- package/dist/checks/api/variant-switching-integrity.js +306 -0
- package/dist/checks/api/variant-switching-integrity.js.map +1 -0
- package/dist/checks/architecture/admin-page-consistency.d.ts +27 -0
- package/dist/checks/architecture/admin-page-consistency.d.ts.map +1 -0
- package/dist/checks/architecture/admin-page-consistency.js +294 -0
- package/dist/checks/architecture/admin-page-consistency.js.map +1 -0
- package/dist/checks/architecture/backend-ui-coverage.d.ts +25 -0
- package/dist/checks/architecture/backend-ui-coverage.d.ts.map +1 -0
- package/dist/checks/architecture/backend-ui-coverage.js +562 -0
- package/dist/checks/architecture/backend-ui-coverage.js.map +1 -0
- package/dist/checks/architecture/component-architecture.d.ts +26 -0
- package/dist/checks/architecture/component-architecture.d.ts.map +1 -0
- package/dist/checks/architecture/component-architecture.js +513 -0
- package/dist/checks/architecture/component-architecture.js.map +1 -0
- package/dist/checks/architecture/component-consolidation-opportunities.d.ts +28 -0
- package/dist/checks/architecture/component-consolidation-opportunities.d.ts.map +1 -0
- package/dist/checks/architecture/component-consolidation-opportunities.js +338 -0
- package/dist/checks/architecture/component-consolidation-opportunities.js.map +1 -0
- package/dist/checks/architecture/orphaned-pages-detection.d.ts +34 -0
- package/dist/checks/architecture/orphaned-pages-detection.d.ts.map +1 -0
- package/dist/checks/architecture/orphaned-pages-detection.js +464 -0
- package/dist/checks/architecture/orphaned-pages-detection.js.map +1 -0
- package/dist/checks/architecture/primitive-component-enforcement.d.ts +25 -0
- package/dist/checks/architecture/primitive-component-enforcement.d.ts.map +1 -0
- package/dist/checks/architecture/primitive-component-enforcement.js +305 -0
- package/dist/checks/architecture/primitive-component-enforcement.js.map +1 -0
- package/dist/checks/architecture/shared-component-enforcement.d.ts +34 -0
- package/dist/checks/architecture/shared-component-enforcement.d.ts.map +1 -0
- package/dist/checks/architecture/shared-component-enforcement.js +725 -0
- package/dist/checks/architecture/shared-component-enforcement.js.map +1 -0
- package/dist/checks/async-cleanup-validation.d.ts +20 -0
- package/dist/checks/async-cleanup-validation.d.ts.map +1 -0
- package/dist/checks/async-cleanup-validation.js +179 -0
- package/dist/checks/async-cleanup-validation.js.map +1 -0
- package/dist/checks/auth/auth-page-consistency.d.ts +25 -0
- package/dist/checks/auth/auth-page-consistency.d.ts.map +1 -0
- package/dist/checks/auth/auth-page-consistency.js +581 -0
- package/dist/checks/auth/auth-page-consistency.js.map +1 -0
- package/dist/checks/auth/authenticated-redirect.d.ts +55 -0
- package/dist/checks/auth/authenticated-redirect.d.ts.map +1 -0
- package/dist/checks/auth/authenticated-redirect.js +389 -0
- package/dist/checks/auth/authenticated-redirect.js.map +1 -0
- package/dist/checks/auth/role-validation.d.ts +31 -0
- package/dist/checks/auth/role-validation.d.ts.map +1 -0
- package/dist/checks/auth/role-validation.js +252 -0
- package/dist/checks/auth/role-validation.js.map +1 -0
- package/dist/checks/auth/session-integrity-validation.d.ts +58 -0
- package/dist/checks/auth/session-integrity-validation.d.ts.map +1 -0
- package/dist/checks/auth/session-integrity-validation.js +402 -0
- package/dist/checks/auth/session-integrity-validation.js.map +1 -0
- package/dist/checks/auth/session-security.d.ts +67 -0
- package/dist/checks/auth/session-security.d.ts.map +1 -0
- package/dist/checks/auth/session-security.js +399 -0
- package/dist/checks/auth/session-security.js.map +1 -0
- package/dist/checks/auth/session-update-safety.d.ts +96 -0
- package/dist/checks/auth/session-update-safety.d.ts.map +1 -0
- package/dist/checks/auth/session-update-safety.js +697 -0
- package/dist/checks/auth/session-update-safety.js.map +1 -0
- package/dist/checks/auth/store-access-delegation.d.ts +33 -0
- package/dist/checks/auth/store-access-delegation.d.ts.map +1 -0
- package/dist/checks/auth/store-access-delegation.js +344 -0
- package/dist/checks/auth/store-access-delegation.js.map +1 -0
- package/dist/checks/business/business-invariants.d.ts +20 -0
- package/dist/checks/business/business-invariants.d.ts.map +1 -0
- package/dist/checks/business/business-invariants.js +174 -0
- package/dist/checks/business/business-invariants.js.map +1 -0
- package/dist/checks/business/currency-precision.d.ts +21 -0
- package/dist/checks/business/currency-precision.d.ts.map +1 -0
- package/dist/checks/business/currency-precision.js +433 -0
- package/dist/checks/business/currency-precision.js.map +1 -0
- package/dist/checks/business/idempotency-key-validation.d.ts +27 -0
- package/dist/checks/business/idempotency-key-validation.d.ts.map +1 -0
- package/dist/checks/business/idempotency-key-validation.js +275 -0
- package/dist/checks/business/idempotency-key-validation.js.map +1 -0
- package/dist/checks/business/image-metadata-injection.d.ts +19 -0
- package/dist/checks/business/image-metadata-injection.d.ts.map +1 -0
- package/dist/checks/business/image-metadata-injection.js +367 -0
- package/dist/checks/business/image-metadata-injection.js.map +1 -0
- package/dist/checks/business/image-upload-optimization.d.ts +20 -0
- package/dist/checks/business/image-upload-optimization.d.ts.map +1 -0
- package/dist/checks/business/image-upload-optimization.js +271 -0
- package/dist/checks/business/image-upload-optimization.js.map +1 -0
- package/dist/checks/business/inventory-atomicity-validation.d.ts +19 -0
- package/dist/checks/business/inventory-atomicity-validation.d.ts.map +1 -0
- package/dist/checks/business/inventory-atomicity-validation.js +257 -0
- package/dist/checks/business/inventory-atomicity-validation.js.map +1 -0
- package/dist/checks/business/order-state-machine-validation.d.ts +19 -0
- package/dist/checks/business/order-state-machine-validation.d.ts.map +1 -0
- package/dist/checks/business/order-state-machine-validation.js +289 -0
- package/dist/checks/business/order-state-machine-validation.js.map +1 -0
- package/dist/checks/business/price-calculation-validation.d.ts +20 -0
- package/dist/checks/business/price-calculation-validation.d.ts.map +1 -0
- package/dist/checks/business/price-calculation-validation.js +247 -0
- package/dist/checks/business/price-calculation-validation.js.map +1 -0
- package/dist/checks/business/price-display-validation.d.ts +22 -0
- package/dist/checks/business/price-display-validation.d.ts.map +1 -0
- package/dist/checks/business/price-display-validation.js +152 -0
- package/dist/checks/business/price-display-validation.js.map +1 -0
- package/dist/checks/business/resilient-recognition-validation.d.ts +26 -0
- package/dist/checks/business/resilient-recognition-validation.d.ts.map +1 -0
- package/dist/checks/business/resilient-recognition-validation.js +230 -0
- package/dist/checks/business/resilient-recognition-validation.js.map +1 -0
- package/dist/checks/business/store-approval-listing-filter.d.ts +19 -0
- package/dist/checks/business/store-approval-listing-filter.d.ts.map +1 -0
- package/dist/checks/business/store-approval-listing-filter.js +176 -0
- package/dist/checks/business/store-approval-listing-filter.js.map +1 -0
- package/dist/checks/business/timezone-handling.d.ts +28 -0
- package/dist/checks/business/timezone-handling.d.ts.map +1 -0
- package/dist/checks/business/timezone-handling.js +294 -0
- package/dist/checks/business/timezone-handling.js.map +1 -0
- package/dist/checks/code-hygiene/any-type-detection.d.ts +30 -0
- package/dist/checks/code-hygiene/any-type-detection.d.ts.map +1 -0
- package/dist/checks/code-hygiene/any-type-detection.js +210 -0
- package/dist/checks/code-hygiene/any-type-detection.js.map +1 -0
- package/dist/checks/code-hygiene/api-error-handling.d.ts +29 -0
- package/dist/checks/code-hygiene/api-error-handling.d.ts.map +1 -0
- package/dist/checks/code-hygiene/api-error-handling.js +285 -0
- package/dist/checks/code-hygiene/api-error-handling.js.map +1 -0
- package/dist/checks/code-hygiene/broken-template-literals.d.ts +24 -0
- package/dist/checks/code-hygiene/broken-template-literals.d.ts.map +1 -0
- package/dist/checks/code-hygiene/broken-template-literals.js +209 -0
- package/dist/checks/code-hygiene/broken-template-literals.js.map +1 -0
- package/dist/checks/code-hygiene/comment-hygiene.d.ts +26 -0
- package/dist/checks/code-hygiene/comment-hygiene.d.ts.map +1 -0
- package/dist/checks/code-hygiene/comment-hygiene.js +421 -0
- package/dist/checks/code-hygiene/comment-hygiene.js.map +1 -0
- package/dist/checks/code-hygiene/console-chars-sync.d.ts +26 -0
- package/dist/checks/code-hygiene/console-chars-sync.d.ts.map +1 -0
- package/dist/checks/code-hygiene/console-chars-sync.js +417 -0
- package/dist/checks/code-hygiene/console-chars-sync.js.map +1 -0
- package/dist/checks/code-hygiene/console-log-detection.d.ts +27 -0
- package/dist/checks/code-hygiene/console-log-detection.d.ts.map +1 -0
- package/dist/checks/code-hygiene/console-log-detection.js +204 -0
- package/dist/checks/code-hygiene/console-log-detection.js.map +1 -0
- package/dist/checks/code-hygiene/dead-code-detection.d.ts +28 -0
- package/dist/checks/code-hygiene/dead-code-detection.d.ts.map +1 -0
- package/dist/checks/code-hygiene/dead-code-detection.js +217 -0
- package/dist/checks/code-hygiene/dead-code-detection.js.map +1 -0
- package/dist/checks/code-hygiene/decorative-separators.d.ts +32 -0
- package/dist/checks/code-hygiene/decorative-separators.d.ts.map +1 -0
- package/dist/checks/code-hygiene/decorative-separators.js +251 -0
- package/dist/checks/code-hygiene/decorative-separators.js.map +1 -0
- package/dist/checks/code-hygiene/empty-catch-detection.d.ts +25 -0
- package/dist/checks/code-hygiene/empty-catch-detection.d.ts.map +1 -0
- package/dist/checks/code-hygiene/empty-catch-detection.js +184 -0
- package/dist/checks/code-hygiene/empty-catch-detection.js.map +1 -0
- package/dist/checks/code-hygiene/fix-hardcoded-emoji.d.ts +18 -0
- package/dist/checks/code-hygiene/fix-hardcoded-emoji.d.ts.map +1 -0
- package/dist/checks/code-hygiene/fix-hardcoded-emoji.js +332 -0
- package/dist/checks/code-hygiene/fix-hardcoded-emoji.js.map +1 -0
- package/dist/checks/code-hygiene/log-level-misuse.d.ts +25 -0
- package/dist/checks/code-hygiene/log-level-misuse.d.ts.map +1 -0
- package/dist/checks/code-hygiene/log-level-misuse.js +383 -0
- package/dist/checks/code-hygiene/log-level-misuse.js.map +1 -0
- package/dist/checks/code-hygiene/missing-logger-import.d.ts +16 -0
- package/dist/checks/code-hygiene/missing-logger-import.d.ts.map +1 -0
- package/dist/checks/code-hygiene/missing-logger-import.js +154 -0
- package/dist/checks/code-hygiene/missing-logger-import.js.map +1 -0
- package/dist/checks/code-hygiene/root-file-hygiene.d.ts +31 -0
- package/dist/checks/code-hygiene/root-file-hygiene.d.ts.map +1 -0
- package/dist/checks/code-hygiene/root-file-hygiene.js +285 -0
- package/dist/checks/code-hygiene/root-file-hygiene.js.map +1 -0
- package/dist/checks/code-hygiene/todo-tracking.d.ts +25 -0
- package/dist/checks/code-hygiene/todo-tracking.d.ts.map +1 -0
- package/dist/checks/code-hygiene/todo-tracking.js +205 -0
- package/dist/checks/code-hygiene/todo-tracking.js.map +1 -0
- package/dist/checks/code-hygiene/unicode-console-compatibility.d.ts +21 -0
- package/dist/checks/code-hygiene/unicode-console-compatibility.d.ts.map +1 -0
- package/dist/checks/code-hygiene/unicode-console-compatibility.js +229 -0
- package/dist/checks/code-hygiene/unicode-console-compatibility.js.map +1 -0
- package/dist/checks/code-quality/duplicate-logic-detection.d.ts +39 -0
- package/dist/checks/code-quality/duplicate-logic-detection.d.ts.map +1 -0
- package/dist/checks/code-quality/duplicate-logic-detection.js +270 -0
- package/dist/checks/code-quality/duplicate-logic-detection.js.map +1 -0
- package/dist/checks/code-quality/feature-flag-hygiene.d.ts +26 -0
- package/dist/checks/code-quality/feature-flag-hygiene.d.ts.map +1 -0
- package/dist/checks/code-quality/feature-flag-hygiene.js +353 -0
- package/dist/checks/code-quality/feature-flag-hygiene.js.map +1 -0
- package/dist/checks/code-quality/grading-config-usage.d.ts +29 -0
- package/dist/checks/code-quality/grading-config-usage.d.ts.map +1 -0
- package/dist/checks/code-quality/grading-config-usage.js +210 -0
- package/dist/checks/code-quality/grading-config-usage.js.map +1 -0
- package/dist/checks/code-quality/legacy-data-pattern-detection.d.ts +36 -0
- package/dist/checks/code-quality/legacy-data-pattern-detection.d.ts.map +1 -0
- package/dist/checks/code-quality/legacy-data-pattern-detection.js +450 -0
- package/dist/checks/code-quality/legacy-data-pattern-detection.js.map +1 -0
- package/dist/checks/code-quality/magic-number-detection.d.ts +30 -0
- package/dist/checks/code-quality/magic-number-detection.d.ts.map +1 -0
- package/dist/checks/code-quality/magic-number-detection.js +405 -0
- package/dist/checks/code-quality/magic-number-detection.js.map +1 -0
- package/dist/checks/code-quality/mock-function-detection.d.ts +32 -0
- package/dist/checks/code-quality/mock-function-detection.d.ts.map +1 -0
- package/dist/checks/code-quality/mock-function-detection.js +244 -0
- package/dist/checks/code-quality/mock-function-detection.js.map +1 -0
- package/dist/checks/code-quality/no-console-production.d.ts +26 -0
- package/dist/checks/code-quality/no-console-production.d.ts.map +1 -0
- package/dist/checks/code-quality/no-console-production.js +272 -0
- package/dist/checks/code-quality/no-console-production.js.map +1 -0
- package/dist/checks/code-quality/shared-utility-gaps.d.ts +27 -0
- package/dist/checks/code-quality/shared-utility-gaps.d.ts.map +1 -0
- package/dist/checks/code-quality/shared-utility-gaps.js +413 -0
- package/dist/checks/code-quality/shared-utility-gaps.js.map +1 -0
- package/dist/checks/code-quality/stub-script-detection.d.ts +32 -0
- package/dist/checks/code-quality/stub-script-detection.d.ts.map +1 -0
- package/dist/checks/code-quality/stub-script-detection.js +211 -0
- package/dist/checks/code-quality/stub-script-detection.js.map +1 -0
- package/dist/checks/code-quality/typescript-type-safety.d.ts +31 -0
- package/dist/checks/code-quality/typescript-type-safety.d.ts.map +1 -0
- package/dist/checks/code-quality/typescript-type-safety.js +228 -0
- package/dist/checks/code-quality/typescript-type-safety.js.map +1 -0
- package/dist/checks/component-imports.d.ts +15 -0
- package/dist/checks/component-imports.d.ts.map +1 -0
- package/dist/checks/component-imports.js +227 -0
- package/dist/checks/component-imports.js.map +1 -0
- package/dist/checks/config/env-completeness.d.ts +20 -0
- package/dist/checks/config/env-completeness.d.ts.map +1 -0
- package/dist/checks/config/env-completeness.js +193 -0
- package/dist/checks/config/env-completeness.js.map +1 -0
- package/dist/checks/coverage-gap-analysis.d.ts +21 -0
- package/dist/checks/coverage-gap-analysis.d.ts.map +1 -0
- package/dist/checks/coverage-gap-analysis.js +779 -0
- package/dist/checks/coverage-gap-analysis.js.map +1 -0
- package/dist/checks/css/dead-css-detection.d.ts +14 -0
- package/dist/checks/css/dead-css-detection.d.ts.map +1 -0
- package/dist/checks/css/dead-css-detection.js +222 -0
- package/dist/checks/css/dead-css-detection.js.map +1 -0
- package/dist/checks/css/sticky-header-validation.d.ts +19 -0
- package/dist/checks/css/sticky-header-validation.d.ts.map +1 -0
- package/dist/checks/css/sticky-header-validation.js +256 -0
- package/dist/checks/css/sticky-header-validation.js.map +1 -0
- package/dist/checks/data-integrity/cart-data-integrity.d.ts +19 -0
- package/dist/checks/data-integrity/cart-data-integrity.d.ts.map +1 -0
- package/dist/checks/data-integrity/cart-data-integrity.js +235 -0
- package/dist/checks/data-integrity/cart-data-integrity.js.map +1 -0
- package/dist/checks/data-integrity/enum-special-chars-validation.d.ts +26 -0
- package/dist/checks/data-integrity/enum-special-chars-validation.d.ts.map +1 -0
- package/dist/checks/data-integrity/enum-special-chars-validation.js +94 -0
- package/dist/checks/data-integrity/enum-special-chars-validation.js.map +1 -0
- package/dist/checks/data-integrity/notification-template-alignment.d.ts +21 -0
- package/dist/checks/data-integrity/notification-template-alignment.d.ts.map +1 -0
- package/dist/checks/data-integrity/notification-template-alignment.js +372 -0
- package/dist/checks/data-integrity/notification-template-alignment.js.map +1 -0
- package/dist/checks/data-integrity/product-data-flow-validation.d.ts +21 -0
- package/dist/checks/data-integrity/product-data-flow-validation.d.ts.map +1 -0
- package/dist/checks/data-integrity/product-data-flow-validation.js +569 -0
- package/dist/checks/data-integrity/product-data-flow-validation.js.map +1 -0
- package/dist/checks/data-integrity/store-data-integrity.d.ts +18 -0
- package/dist/checks/data-integrity/store-data-integrity.d.ts.map +1 -0
- package/dist/checks/data-integrity/store-data-integrity.js +398 -0
- package/dist/checks/data-integrity/store-data-integrity.js.map +1 -0
- package/dist/checks/data-integrity/unwired-functionality.d.ts +22 -0
- package/dist/checks/data-integrity/unwired-functionality.d.ts.map +1 -0
- package/dist/checks/data-integrity/unwired-functionality.js +550 -0
- package/dist/checks/data-integrity/unwired-functionality.js.map +1 -0
- package/dist/checks/database/block-db-push.d.ts +29 -0
- package/dist/checks/database/block-db-push.d.ts.map +1 -0
- package/dist/checks/database/block-db-push.js +138 -0
- package/dist/checks/database/block-db-push.js.map +1 -0
- package/dist/checks/database/grade-integrity.d.ts +13 -0
- package/dist/checks/database/grade-integrity.d.ts.map +1 -0
- package/dist/checks/database/grade-integrity.js +131 -0
- package/dist/checks/database/grade-integrity.js.map +1 -0
- package/dist/checks/database/migration-integrity.d.ts +26 -0
- package/dist/checks/database/migration-integrity.d.ts.map +1 -0
- package/dist/checks/database/migration-integrity.js +239 -0
- package/dist/checks/database/migration-integrity.js.map +1 -0
- package/dist/checks/database/migration-reversibility.d.ts +25 -0
- package/dist/checks/database/migration-reversibility.d.ts.map +1 -0
- package/dist/checks/database/migration-reversibility.js +277 -0
- package/dist/checks/database/migration-reversibility.js.map +1 -0
- package/dist/checks/database/migration-safety.d.ts +27 -0
- package/dist/checks/database/migration-safety.d.ts.map +1 -0
- package/dist/checks/database/migration-safety.js +243 -0
- package/dist/checks/database/migration-safety.js.map +1 -0
- package/dist/checks/database/prisma-client-db-sync.d.ts +24 -0
- package/dist/checks/database/prisma-client-db-sync.d.ts.map +1 -0
- package/dist/checks/database/prisma-client-db-sync.js +226 -0
- package/dist/checks/database/prisma-client-db-sync.js.map +1 -0
- package/dist/checks/database/prisma-drift-prevention.d.ts +29 -0
- package/dist/checks/database/prisma-drift-prevention.d.ts.map +1 -0
- package/dist/checks/database/prisma-drift-prevention.js +614 -0
- package/dist/checks/database/prisma-drift-prevention.js.map +1 -0
- package/dist/checks/database/prisma-overfetch-detection.d.ts +26 -0
- package/dist/checks/database/prisma-overfetch-detection.d.ts.map +1 -0
- package/dist/checks/database/prisma-overfetch-detection.js +666 -0
- package/dist/checks/database/prisma-overfetch-detection.js.map +1 -0
- package/dist/checks/database/prisma-precommit-guard.d.ts +25 -0
- package/dist/checks/database/prisma-precommit-guard.d.ts.map +1 -0
- package/dist/checks/database/prisma-precommit-guard.js +188 -0
- package/dist/checks/database/prisma-precommit-guard.js.map +1 -0
- package/dist/checks/database/prisma-schema-syntax.d.ts +17 -0
- package/dist/checks/database/prisma-schema-syntax.d.ts.map +1 -0
- package/dist/checks/database/prisma-schema-syntax.js +50 -0
- package/dist/checks/database/prisma-schema-syntax.js.map +1 -0
- package/dist/checks/database/prod-db-guardrail.d.ts +20 -0
- package/dist/checks/database/prod-db-guardrail.d.ts.map +1 -0
- package/dist/checks/database/prod-db-guardrail.js +184 -0
- package/dist/checks/database/prod-db-guardrail.js.map +1 -0
- package/dist/checks/database/schema-best-practices.d.ts +24 -0
- package/dist/checks/database/schema-best-practices.d.ts.map +1 -0
- package/dist/checks/database/schema-best-practices.js +393 -0
- package/dist/checks/database/schema-best-practices.js.map +1 -0
- package/dist/checks/database/schema-migration-column-sync.d.ts +33 -0
- package/dist/checks/database/schema-migration-column-sync.d.ts.map +1 -0
- package/dist/checks/database/schema-migration-column-sync.js +561 -0
- package/dist/checks/database/schema-migration-column-sync.js.map +1 -0
- package/dist/checks/database/seed-coverage-validation.d.ts +29 -0
- package/dist/checks/database/seed-coverage-validation.d.ts.map +1 -0
- package/dist/checks/database/seed-coverage-validation.js +595 -0
- package/dist/checks/database/seed-coverage-validation.js.map +1 -0
- package/dist/checks/database/soft-delete-consistency.d.ts +24 -0
- package/dist/checks/database/soft-delete-consistency.d.ts.map +1 -0
- package/dist/checks/database/soft-delete-consistency.js +273 -0
- package/dist/checks/database/soft-delete-consistency.js.map +1 -0
- package/dist/checks/database/tcg-seed-validation.d.ts +29 -0
- package/dist/checks/database/tcg-seed-validation.d.ts.map +1 -0
- package/dist/checks/database/tcg-seed-validation.js +281 -0
- package/dist/checks/database/tcg-seed-validation.js.map +1 -0
- package/dist/checks/database/transaction-integrity.d.ts +25 -0
- package/dist/checks/database/transaction-integrity.d.ts.map +1 -0
- package/dist/checks/database/transaction-integrity.js +275 -0
- package/dist/checks/database/transaction-integrity.js.map +1 -0
- package/dist/checks/database/unused-schema-detection.d.ts +28 -0
- package/dist/checks/database/unused-schema-detection.d.ts.map +1 -0
- package/dist/checks/database/unused-schema-detection.js +624 -0
- package/dist/checks/database/unused-schema-detection.js.map +1 -0
- package/dist/checks/dependencies/deprecated-packages.d.ts +17 -0
- package/dist/checks/dependencies/deprecated-packages.d.ts.map +1 -0
- package/dist/checks/dependencies/deprecated-packages.js +220 -0
- package/dist/checks/dependencies/deprecated-packages.js.map +1 -0
- package/dist/checks/dependencies/weekly-stable-updates.d.ts +27 -0
- package/dist/checks/dependencies/weekly-stable-updates.d.ts.map +1 -0
- package/dist/checks/dependencies/weekly-stable-updates.js +490 -0
- package/dist/checks/dependencies/weekly-stable-updates.js.map +1 -0
- package/dist/checks/deployment/esm-import-extensions.d.ts +23 -0
- package/dist/checks/deployment/esm-import-extensions.d.ts.map +1 -0
- package/dist/checks/deployment/esm-import-extensions.js +183 -0
- package/dist/checks/deployment/esm-import-extensions.js.map +1 -0
- package/dist/checks/deployment/pre-production-checklist-quick.d.ts +15 -0
- package/dist/checks/deployment/pre-production-checklist-quick.d.ts.map +1 -0
- package/dist/checks/deployment/pre-production-checklist-quick.js +140 -0
- package/dist/checks/deployment/pre-production-checklist-quick.js.map +1 -0
- package/dist/checks/deployment/pre-production-checklist.d.ts +18 -0
- package/dist/checks/deployment/pre-production-checklist.d.ts.map +1 -0
- package/dist/checks/deployment/pre-production-checklist.js +219 -0
- package/dist/checks/deployment/pre-production-checklist.js.map +1 -0
- package/dist/checks/deployment/production-config.d.ts +36 -0
- package/dist/checks/deployment/production-config.d.ts.map +1 -0
- package/dist/checks/deployment/production-config.js +424 -0
- package/dist/checks/deployment/production-config.js.map +1 -0
- package/dist/checks/deployment/production-env-validation.d.ts +18 -0
- package/dist/checks/deployment/production-env-validation.d.ts.map +1 -0
- package/dist/checks/deployment/production-env-validation.js +162 -0
- package/dist/checks/deployment/production-env-validation.js.map +1 -0
- package/dist/checks/deployment/rollback-compatibility.d.ts +27 -0
- package/dist/checks/deployment/rollback-compatibility.d.ts.map +1 -0
- package/dist/checks/deployment/rollback-compatibility.js +327 -0
- package/dist/checks/deployment/rollback-compatibility.js.map +1 -0
- package/dist/checks/deprecated-api-usage.d.ts +86 -0
- package/dist/checks/deprecated-api-usage.d.ts.map +1 -0
- package/dist/checks/deprecated-api-usage.js +382 -0
- package/dist/checks/deprecated-api-usage.js.map +1 -0
- package/dist/checks/drift-prevention/api-contract-consistency.d.ts +18 -0
- package/dist/checks/drift-prevention/api-contract-consistency.d.ts.map +1 -0
- package/dist/checks/drift-prevention/api-contract-consistency.js +279 -0
- package/dist/checks/drift-prevention/api-contract-consistency.js.map +1 -0
- package/dist/checks/drift-prevention/breaking-change-detection.d.ts +28 -0
- package/dist/checks/drift-prevention/breaking-change-detection.d.ts.map +1 -0
- package/dist/checks/drift-prevention/breaking-change-detection.js +364 -0
- package/dist/checks/drift-prevention/breaking-change-detection.js.map +1 -0
- package/dist/checks/drift-prevention/component-prop-consistency.d.ts +18 -0
- package/dist/checks/drift-prevention/component-prop-consistency.d.ts.map +1 -0
- package/dist/checks/drift-prevention/component-prop-consistency.js +289 -0
- package/dist/checks/drift-prevention/component-prop-consistency.js.map +1 -0
- package/dist/checks/drift-prevention/database-query-patterns.d.ts +19 -0
- package/dist/checks/drift-prevention/database-query-patterns.d.ts.map +1 -0
- package/dist/checks/drift-prevention/database-query-patterns.js +340 -0
- package/dist/checks/drift-prevention/database-query-patterns.js.map +1 -0
- package/dist/checks/drift-prevention/design-system-consistency.d.ts +18 -0
- package/dist/checks/drift-prevention/design-system-consistency.d.ts.map +1 -0
- package/dist/checks/drift-prevention/design-system-consistency.js +419 -0
- package/dist/checks/drift-prevention/design-system-consistency.js.map +1 -0
- package/dist/checks/drift-prevention/empty-state-consistency.d.ts +17 -0
- package/dist/checks/drift-prevention/empty-state-consistency.d.ts.map +1 -0
- package/dist/checks/drift-prevention/empty-state-consistency.js +257 -0
- package/dist/checks/drift-prevention/empty-state-consistency.js.map +1 -0
- package/dist/checks/drift-prevention/performance-regression-detection.d.ts +18 -0
- package/dist/checks/drift-prevention/performance-regression-detection.d.ts.map +1 -0
- package/dist/checks/drift-prevention/performance-regression-detection.js +444 -0
- package/dist/checks/drift-prevention/performance-regression-detection.js.map +1 -0
- package/dist/checks/drift-prevention/size-convention-consistency.d.ts +40 -0
- package/dist/checks/drift-prevention/size-convention-consistency.d.ts.map +1 -0
- package/dist/checks/drift-prevention/size-convention-consistency.js +219 -0
- package/dist/checks/drift-prevention/size-convention-consistency.js.map +1 -0
- package/dist/checks/drift-prevention/state-management-patterns.d.ts +18 -0
- package/dist/checks/drift-prevention/state-management-patterns.d.ts.map +1 -0
- package/dist/checks/drift-prevention/state-management-patterns.js +240 -0
- package/dist/checks/drift-prevention/state-management-patterns.js.map +1 -0
- package/dist/checks/e2e/e2e-action-outcome-validator.d.ts +21 -0
- package/dist/checks/e2e/e2e-action-outcome-validator.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-action-outcome-validator.js +292 -0
- package/dist/checks/e2e/e2e-action-outcome-validator.js.map +1 -0
- package/dist/checks/e2e/e2e-interaction-coverage-scan.d.ts +21 -0
- package/dist/checks/e2e/e2e-interaction-coverage-scan.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-interaction-coverage-scan.js +1688 -0
- package/dist/checks/e2e/e2e-interaction-coverage-scan.js.map +1 -0
- package/dist/checks/e2e/e2e-interaction-regression.d.ts +19 -0
- package/dist/checks/e2e/e2e-interaction-regression.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-interaction-regression.js +1039 -0
- package/dist/checks/e2e/e2e-interaction-regression.js.map +1 -0
- package/dist/checks/e2e/e2e-outcome-validation.d.ts +33 -0
- package/dist/checks/e2e/e2e-outcome-validation.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-outcome-validation.js +610 -0
- package/dist/checks/e2e/e2e-outcome-validation.js.map +1 -0
- package/dist/checks/e2e/e2e-performance-baseline.d.ts +14 -0
- package/dist/checks/e2e/e2e-performance-baseline.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-performance-baseline.js +289 -0
- package/dist/checks/e2e/e2e-performance-baseline.js.map +1 -0
- package/dist/checks/e2e/e2e-performance-patterns.d.ts +19 -0
- package/dist/checks/e2e/e2e-performance-patterns.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-performance-patterns.js +464 -0
- package/dist/checks/e2e/e2e-performance-patterns.js.map +1 -0
- package/dist/checks/e2e/e2e-performance-regression.d.ts +18 -0
- package/dist/checks/e2e/e2e-performance-regression.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-performance-regression.js +230 -0
- package/dist/checks/e2e/e2e-performance-regression.js.map +1 -0
- package/dist/checks/e2e/e2e-resource-monitoring.d.ts +17 -0
- package/dist/checks/e2e/e2e-resource-monitoring.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-resource-monitoring.js +368 -0
- package/dist/checks/e2e/e2e-resource-monitoring.js.map +1 -0
- package/dist/checks/e2e/e2e-test-redundancy-scan.d.ts +27 -0
- package/dist/checks/e2e/e2e-test-redundancy-scan.d.ts.map +1 -0
- package/dist/checks/e2e/e2e-test-redundancy-scan.js +477 -0
- package/dist/checks/e2e/e2e-test-redundancy-scan.js.map +1 -0
- package/dist/checks/e2e/playwright-config-validator.d.ts +25 -0
- package/dist/checks/e2e/playwright-config-validator.d.ts.map +1 -0
- package/dist/checks/e2e/playwright-config-validator.js +558 -0
- package/dist/checks/e2e/playwright-config-validator.js.map +1 -0
- package/dist/checks/environment/env-duplicates.d.ts +16 -0
- package/dist/checks/environment/env-duplicates.d.ts.map +1 -0
- package/dist/checks/environment/env-duplicates.js +166 -0
- package/dist/checks/environment/env-duplicates.js.map +1 -0
- package/dist/checks/event-listener-cleanup.d.ts +18 -0
- package/dist/checks/event-listener-cleanup.d.ts.map +1 -0
- package/dist/checks/event-listener-cleanup.js +187 -0
- package/dist/checks/event-listener-cleanup.js.map +1 -0
- package/dist/checks/file-naming-conventions.d.ts +21 -0
- package/dist/checks/file-naming-conventions.d.ts.map +1 -0
- package/dist/checks/file-naming-conventions.js +1258 -0
- package/dist/checks/file-naming-conventions.js.map +1 -0
- package/dist/checks/framework/framework-compatibility.d.ts +35 -0
- package/dist/checks/framework/framework-compatibility.d.ts.map +1 -0
- package/dist/checks/framework/framework-compatibility.js +159 -0
- package/dist/checks/framework/framework-compatibility.js.map +1 -0
- package/dist/checks/framework/turbopack-enforcement.d.ts +22 -0
- package/dist/checks/framework/turbopack-enforcement.d.ts.map +1 -0
- package/dist/checks/framework/turbopack-enforcement.js +171 -0
- package/dist/checks/framework/turbopack-enforcement.js.map +1 -0
- package/dist/checks/governance/check-ui-uniformity.d.ts +18 -0
- package/dist/checks/governance/check-ui-uniformity.d.ts.map +1 -0
- package/dist/checks/governance/check-ui-uniformity.js +127 -0
- package/dist/checks/governance/check-ui-uniformity.js.map +1 -0
- package/dist/checks/governance/codeowners-coverage.d.ts +26 -0
- package/dist/checks/governance/codeowners-coverage.d.ts.map +1 -0
- package/dist/checks/governance/codeowners-coverage.js +290 -0
- package/dist/checks/governance/codeowners-coverage.js.map +1 -0
- package/dist/checks/governance/naming-conventions.d.ts +7 -0
- package/dist/checks/governance/naming-conventions.d.ts.map +1 -0
- package/dist/checks/governance/naming-conventions.js +115 -0
- package/dist/checks/governance/naming-conventions.js.map +1 -0
- package/dist/checks/governance/seller-store-naming-consistency.d.ts +32 -0
- package/dist/checks/governance/seller-store-naming-consistency.d.ts.map +1 -0
- package/dist/checks/governance/seller-store-naming-consistency.js +241 -0
- package/dist/checks/governance/seller-store-naming-consistency.js.map +1 -0
- package/dist/checks/governance/store-seller-route-names.d.ts +17 -0
- package/dist/checks/governance/store-seller-route-names.d.ts.map +1 -0
- package/dist/checks/governance/store-seller-route-names.js +170 -0
- package/dist/checks/governance/store-seller-route-names.js.map +1 -0
- package/dist/checks/grading-config-usage.d.ts +23 -0
- package/dist/checks/grading-config-usage.d.ts.map +1 -0
- package/dist/checks/grading-config-usage.js +197 -0
- package/dist/checks/grading-config-usage.js.map +1 -0
- package/dist/checks/help-center-features-validation.d.ts +21 -0
- package/dist/checks/help-center-features-validation.d.ts.map +1 -0
- package/dist/checks/help-center-features-validation.js +529 -0
- package/dist/checks/help-center-features-validation.js.map +1 -0
- package/dist/checks/help-center-validation.d.ts +21 -0
- package/dist/checks/help-center-validation.d.ts.map +1 -0
- package/dist/checks/help-center-validation.js +325 -0
- package/dist/checks/help-center-validation.js.map +1 -0
- package/dist/checks/image/card-edge-protection.d.ts +33 -0
- package/dist/checks/image/card-edge-protection.d.ts.map +1 -0
- package/dist/checks/image/card-edge-protection.js +230 -0
- package/dist/checks/image/card-edge-protection.js.map +1 -0
- package/dist/checks/image/card-orientation-validation.d.ts +34 -0
- package/dist/checks/image/card-orientation-validation.d.ts.map +1 -0
- package/dist/checks/image/card-orientation-validation.js +519 -0
- package/dist/checks/image/card-orientation-validation.js.map +1 -0
- package/dist/checks/integrations/integrations-consolidated.d.ts +76 -0
- package/dist/checks/integrations/integrations-consolidated.d.ts.map +1 -0
- package/dist/checks/integrations/integrations-consolidated.js +493 -0
- package/dist/checks/integrations/integrations-consolidated.js.map +1 -0
- package/dist/checks/integrations/platform-feed-integrity.d.ts +75 -0
- package/dist/checks/integrations/platform-feed-integrity.d.ts.map +1 -0
- package/dist/checks/integrations/platform-feed-integrity.js +487 -0
- package/dist/checks/integrations/platform-feed-integrity.js.map +1 -0
- package/dist/checks/master-preflight.d.ts +56 -0
- package/dist/checks/master-preflight.d.ts.map +1 -0
- package/dist/checks/master-preflight.js +254 -0
- package/dist/checks/master-preflight.js.map +1 -0
- package/dist/checks/nextjs/dynamic-route-exports.d.ts +28 -0
- package/dist/checks/nextjs/dynamic-route-exports.d.ts.map +1 -0
- package/dist/checks/nextjs/dynamic-route-exports.js +201 -0
- package/dist/checks/nextjs/dynamic-route-exports.js.map +1 -0
- package/dist/checks/nextjs/essential-files-validation.d.ts +23 -0
- package/dist/checks/nextjs/essential-files-validation.d.ts.map +1 -0
- package/dist/checks/nextjs/essential-files-validation.js +355 -0
- package/dist/checks/nextjs/essential-files-validation.js.map +1 -0
- package/dist/checks/nextjs/ignore-build-errors.d.ts +15 -0
- package/dist/checks/nextjs/ignore-build-errors.d.ts.map +1 -0
- package/dist/checks/nextjs/ignore-build-errors.js +120 -0
- package/dist/checks/nextjs/ignore-build-errors.js.map +1 -0
- package/dist/checks/nextjs/metadata-api-placement.d.ts +29 -0
- package/dist/checks/nextjs/metadata-api-placement.d.ts.map +1 -0
- package/dist/checks/nextjs/metadata-api-placement.js +274 -0
- package/dist/checks/nextjs/metadata-api-placement.js.map +1 -0
- package/dist/checks/nextjs/nextjs-image-validation.d.ts +52 -0
- package/dist/checks/nextjs/nextjs-image-validation.d.ts.map +1 -0
- package/dist/checks/nextjs/nextjs-image-validation.js +253 -0
- package/dist/checks/nextjs/nextjs-image-validation.js.map +1 -0
- package/dist/checks/nextjs/nextjs16-compatibility.d.ts +39 -0
- package/dist/checks/nextjs/nextjs16-compatibility.d.ts.map +1 -0
- package/dist/checks/nextjs/nextjs16-compatibility.js +1208 -0
- package/dist/checks/nextjs/nextjs16-compatibility.js.map +1 -0
- package/dist/checks/nextjs/static-generation-check.d.ts +25 -0
- package/dist/checks/nextjs/static-generation-check.d.ts.map +1 -0
- package/dist/checks/nextjs/static-generation-check.js +178 -0
- package/dist/checks/nextjs/static-generation-check.js.map +1 -0
- package/dist/checks/observability/centralized-logging-validation.d.ts +22 -0
- package/dist/checks/observability/centralized-logging-validation.d.ts.map +1 -0
- package/dist/checks/observability/centralized-logging-validation.js +285 -0
- package/dist/checks/observability/centralized-logging-validation.js.map +1 -0
- package/dist/checks/order-number-consistency.d.ts +23 -0
- package/dist/checks/order-number-consistency.d.ts.map +1 -0
- package/dist/checks/order-number-consistency.js +288 -0
- package/dist/checks/order-number-consistency.js.map +1 -0
- package/dist/checks/organization/agent-steering-validation.d.ts +16 -0
- package/dist/checks/organization/agent-steering-validation.d.ts.map +1 -0
- package/dist/checks/organization/agent-steering-validation.js +186 -0
- package/dist/checks/organization/agent-steering-validation.js.map +1 -0
- package/dist/checks/organization/api-route-consolidation.d.ts +23 -0
- package/dist/checks/organization/api-route-consolidation.d.ts.map +1 -0
- package/dist/checks/organization/api-route-consolidation.js +364 -0
- package/dist/checks/organization/api-route-consolidation.js.map +1 -0
- package/dist/checks/organization/api-route-naming-validation.d.ts +23 -0
- package/dist/checks/organization/api-route-naming-validation.d.ts.map +1 -0
- package/dist/checks/organization/api-route-naming-validation.js +491 -0
- package/dist/checks/organization/api-route-naming-validation.js.map +1 -0
- package/dist/checks/organization/file-organization-validation.d.ts +18 -0
- package/dist/checks/organization/file-organization-validation.d.ts.map +1 -0
- package/dist/checks/organization/file-organization-validation.js +562 -0
- package/dist/checks/organization/file-organization-validation.js.map +1 -0
- package/dist/checks/organization/npm-script-bloat-prevention.d.ts +40 -0
- package/dist/checks/organization/npm-script-bloat-prevention.d.ts.map +1 -0
- package/dist/checks/organization/npm-script-bloat-prevention.js +412 -0
- package/dist/checks/organization/npm-script-bloat-prevention.js.map +1 -0
- package/dist/checks/organization/preflight-env-check.d.ts +12 -0
- package/dist/checks/organization/preflight-env-check.d.ts.map +1 -0
- package/dist/checks/organization/preflight-env-check.js +157 -0
- package/dist/checks/organization/preflight-env-check.js.map +1 -0
- package/dist/checks/organization/preflight-progress-consistency.d.ts +25 -0
- package/dist/checks/organization/preflight-progress-consistency.d.ts.map +1 -0
- package/dist/checks/organization/preflight-progress-consistency.js +227 -0
- package/dist/checks/organization/preflight-progress-consistency.js.map +1 -0
- package/dist/checks/organization/preflight-system-validation.d.ts +19 -0
- package/dist/checks/organization/preflight-system-validation.d.ts.map +1 -0
- package/dist/checks/organization/preflight-system-validation.js +487 -0
- package/dist/checks/organization/preflight-system-validation.js.map +1 -0
- package/dist/checks/organization/preflight-typescript-validation.d.ts +14 -0
- package/dist/checks/organization/preflight-typescript-validation.d.ts.map +1 -0
- package/dist/checks/organization/preflight-typescript-validation.js +43 -0
- package/dist/checks/organization/preflight-typescript-validation.js.map +1 -0
- package/dist/checks/organization/route-structure-validation.d.ts +18 -0
- package/dist/checks/organization/route-structure-validation.d.ts.map +1 -0
- package/dist/checks/organization/route-structure-validation.js +235 -0
- package/dist/checks/organization/route-structure-validation.js.map +1 -0
- package/dist/checks/organization/steering-bloat-prevention.d.ts +88 -0
- package/dist/checks/organization/steering-bloat-prevention.d.ts.map +1 -0
- package/dist/checks/organization/steering-bloat-prevention.js +1197 -0
- package/dist/checks/organization/steering-bloat-prevention.js.map +1 -0
- package/dist/checks/performance/bundle-optimization-drift.d.ts +18 -0
- package/dist/checks/performance/bundle-optimization-drift.d.ts.map +1 -0
- package/dist/checks/performance/bundle-optimization-drift.js +260 -0
- package/dist/checks/performance/bundle-optimization-drift.js.map +1 -0
- package/dist/checks/performance/bundle-size-regression.d.ts +14 -0
- package/dist/checks/performance/bundle-size-regression.d.ts.map +1 -0
- package/dist/checks/performance/bundle-size-regression.js +236 -0
- package/dist/checks/performance/bundle-size-regression.js.map +1 -0
- package/dist/checks/performance/core-web-vitals.d.ts +39 -0
- package/dist/checks/performance/core-web-vitals.d.ts.map +1 -0
- package/dist/checks/performance/core-web-vitals.js +445 -0
- package/dist/checks/performance/core-web-vitals.js.map +1 -0
- package/dist/checks/performance/mobile-performance-budget.d.ts +29 -0
- package/dist/checks/performance/mobile-performance-budget.d.ts.map +1 -0
- package/dist/checks/performance/mobile-performance-budget.js +415 -0
- package/dist/checks/performance/mobile-performance-budget.js.map +1 -0
- package/dist/checks/performance/runtime-regression.d.ts +17 -0
- package/dist/checks/performance/runtime-regression.d.ts.map +1 -0
- package/dist/checks/performance/runtime-regression.js +425 -0
- package/dist/checks/performance/runtime-regression.js.map +1 -0
- package/dist/checks/performance/unused-preload-detection.d.ts +17 -0
- package/dist/checks/performance/unused-preload-detection.d.ts.map +1 -0
- package/dist/checks/performance/unused-preload-detection.js +185 -0
- package/dist/checks/performance/unused-preload-detection.js.map +1 -0
- package/dist/checks/prisma/prisma7-compatibility.d.ts +29 -0
- package/dist/checks/prisma/prisma7-compatibility.d.ts.map +1 -0
- package/dist/checks/prisma/prisma7-compatibility.js +440 -0
- package/dist/checks/prisma/prisma7-compatibility.js.map +1 -0
- package/dist/checks/quality/component-size.d.ts +13 -0
- package/dist/checks/quality/component-size.d.ts.map +1 -0
- package/dist/checks/quality/component-size.js +104 -0
- package/dist/checks/quality/component-size.js.map +1 -0
- package/dist/checks/quality/critical-type-imports.d.ts +23 -0
- package/dist/checks/quality/critical-type-imports.d.ts.map +1 -0
- package/dist/checks/quality/critical-type-imports.js +632 -0
- package/dist/checks/quality/critical-type-imports.js.map +1 -0
- package/dist/checks/quality/development.d.ts +13 -0
- package/dist/checks/quality/development.d.ts.map +1 -0
- package/dist/checks/quality/development.js +98 -0
- package/dist/checks/quality/development.js.map +1 -0
- package/dist/checks/quality/docs-code-sync.d.ts +27 -0
- package/dist/checks/quality/docs-code-sync.d.ts.map +1 -0
- package/dist/checks/quality/docs-code-sync.js +368 -0
- package/dist/checks/quality/docs-code-sync.js.map +1 -0
- package/dist/checks/quality/duplicate-jsx-attributes.d.ts +23 -0
- package/dist/checks/quality/duplicate-jsx-attributes.d.ts.map +1 -0
- package/dist/checks/quality/duplicate-jsx-attributes.js +201 -0
- package/dist/checks/quality/duplicate-jsx-attributes.js.map +1 -0
- package/dist/checks/quality/file-size.d.ts +13 -0
- package/dist/checks/quality/file-size.d.ts.map +1 -0
- package/dist/checks/quality/file-size.js +97 -0
- package/dist/checks/quality/file-size.js.map +1 -0
- package/dist/checks/quality/file-validation.d.ts +13 -0
- package/dist/checks/quality/file-validation.d.ts.map +1 -0
- package/dist/checks/quality/file-validation.js +103 -0
- package/dist/checks/quality/file-validation.js.map +1 -0
- package/dist/checks/quality/i18n-hardcoded-strings.d.ts +28 -0
- package/dist/checks/quality/i18n-hardcoded-strings.d.ts.map +1 -0
- package/dist/checks/quality/i18n-hardcoded-strings.js +336 -0
- package/dist/checks/quality/i18n-hardcoded-strings.js.map +1 -0
- package/dist/checks/quality/lint-preflight.d.ts +70 -0
- package/dist/checks/quality/lint-preflight.d.ts.map +1 -0
- package/dist/checks/quality/lint-preflight.js +477 -0
- package/dist/checks/quality/lint-preflight.js.map +1 -0
- package/dist/checks/quality/react-namespace-import.d.ts +27 -0
- package/dist/checks/quality/react-namespace-import.d.ts.map +1 -0
- package/dist/checks/quality/react-namespace-import.js +212 -0
- package/dist/checks/quality/react-namespace-import.js.map +1 -0
- package/dist/checks/quality/strict-lint.d.ts +13 -0
- package/dist/checks/quality/strict-lint.d.ts.map +1 -0
- package/dist/checks/quality/strict-lint.js +41 -0
- package/dist/checks/quality/strict-lint.js.map +1 -0
- package/dist/checks/quality/syntax.d.ts +13 -0
- package/dist/checks/quality/syntax.d.ts.map +1 -0
- package/dist/checks/quality/syntax.js +94 -0
- package/dist/checks/quality/syntax.js.map +1 -0
- package/dist/checks/quality/unused-imports.d.ts +14 -0
- package/dist/checks/quality/unused-imports.d.ts.map +1 -0
- package/dist/checks/quality/unused-imports.js +172 -0
- package/dist/checks/quality/unused-imports.js.map +1 -0
- package/dist/checks/react/component-best-practices.d.ts +23 -0
- package/dist/checks/react/component-best-practices.d.ts.map +1 -0
- package/dist/checks/react/component-best-practices.js +273 -0
- package/dist/checks/react/component-best-practices.js.map +1 -0
- package/dist/checks/react/error-boundary-coverage.d.ts +26 -0
- package/dist/checks/react/error-boundary-coverage.d.ts.map +1 -0
- package/dist/checks/react/error-boundary-coverage.js +304 -0
- package/dist/checks/react/error-boundary-coverage.js.map +1 -0
- package/dist/checks/react/memory-leak-detection.d.ts +22 -0
- package/dist/checks/react/memory-leak-detection.d.ts.map +1 -0
- package/dist/checks/react/memory-leak-detection.js +268 -0
- package/dist/checks/react/memory-leak-detection.js.map +1 -0
- package/dist/checks/react/memory-leak-patterns.d.ts +27 -0
- package/dist/checks/react/memory-leak-patterns.d.ts.map +1 -0
- package/dist/checks/react/memory-leak-patterns.js +324 -0
- package/dist/checks/react/memory-leak-patterns.js.map +1 -0
- package/dist/checks/react/react19-compatibility.d.ts +14 -0
- package/dist/checks/react/react19-compatibility.d.ts.map +1 -0
- package/dist/checks/react/react19-compatibility.js +433 -0
- package/dist/checks/react/react19-compatibility.js.map +1 -0
- package/dist/checks/react/useeffect-loop-detector.d.ts +25 -0
- package/dist/checks/react/useeffect-loop-detector.d.ts.map +1 -0
- package/dist/checks/react/useeffect-loop-detector.js +216 -0
- package/dist/checks/react/useeffect-loop-detector.js.map +1 -0
- package/dist/checks/runtime/client-process-env-usage.d.ts +28 -0
- package/dist/checks/runtime/client-process-env-usage.d.ts.map +1 -0
- package/dist/checks/runtime/client-process-env-usage.js +190 -0
- package/dist/checks/runtime/client-process-env-usage.js.map +1 -0
- package/dist/checks/runtime/client-runtime-errors.d.ts +34 -0
- package/dist/checks/runtime/client-runtime-errors.d.ts.map +1 -0
- package/dist/checks/runtime/client-runtime-errors.js +308 -0
- package/dist/checks/runtime/client-runtime-errors.js.map +1 -0
- package/dist/checks/runtime/dev-error-monitoring-system.d.ts +22 -0
- package/dist/checks/runtime/dev-error-monitoring-system.d.ts.map +1 -0
- package/dist/checks/runtime/dev-error-monitoring-system.js +209 -0
- package/dist/checks/runtime/dev-error-monitoring-system.js.map +1 -0
- package/dist/checks/runtime/gtm-installation.d.ts +21 -0
- package/dist/checks/runtime/gtm-installation.d.ts.map +1 -0
- package/dist/checks/runtime/gtm-installation.js +341 -0
- package/dist/checks/runtime/gtm-installation.js.map +1 -0
- package/dist/checks/runtime/json-parse-safety.d.ts +22 -0
- package/dist/checks/runtime/json-parse-safety.d.ts.map +1 -0
- package/dist/checks/runtime/json-parse-safety.js +179 -0
- package/dist/checks/runtime/json-parse-safety.js.map +1 -0
- package/dist/checks/runtime/missing-public-env-import.d.ts +26 -0
- package/dist/checks/runtime/missing-public-env-import.d.ts.map +1 -0
- package/dist/checks/runtime/missing-public-env-import.js +175 -0
- package/dist/checks/runtime/missing-public-env-import.js.map +1 -0
- package/dist/checks/runtime/node-deprecations.d.ts +22 -0
- package/dist/checks/runtime/node-deprecations.d.ts.map +1 -0
- package/dist/checks/runtime/node-deprecations.js +157 -0
- package/dist/checks/runtime/node-deprecations.js.map +1 -0
- package/dist/checks/runtime/node25-compatibility.d.ts +28 -0
- package/dist/checks/runtime/node25-compatibility.d.ts.map +1 -0
- package/dist/checks/runtime/node25-compatibility.js +200 -0
- package/dist/checks/runtime/node25-compatibility.js.map +1 -0
- package/dist/checks/runtime/process-stdio-usage.d.ts +26 -0
- package/dist/checks/runtime/process-stdio-usage.d.ts.map +1 -0
- package/dist/checks/runtime/process-stdio-usage.js +179 -0
- package/dist/checks/runtime/process-stdio-usage.js.map +1 -0
- package/dist/checks/runtime/server-client-decimal.d.ts +25 -0
- package/dist/checks/runtime/server-client-decimal.d.ts.map +1 -0
- package/dist/checks/runtime/server-client-decimal.js +243 -0
- package/dist/checks/runtime/server-client-decimal.js.map +1 -0
- package/dist/checks/security/csrf-protection.d.ts +20 -0
- package/dist/checks/security/csrf-protection.d.ts.map +1 -0
- package/dist/checks/security/csrf-protection.js +249 -0
- package/dist/checks/security/csrf-protection.js.map +1 -0
- package/dist/checks/security/dependency-audit.d.ts +25 -0
- package/dist/checks/security/dependency-audit.d.ts.map +1 -0
- package/dist/checks/security/dependency-audit.js +219 -0
- package/dist/checks/security/dependency-audit.js.map +1 -0
- package/dist/checks/security/env-value-leakage.d.ts +21 -0
- package/dist/checks/security/env-value-leakage.d.ts.map +1 -0
- package/dist/checks/security/env-value-leakage.js +285 -0
- package/dist/checks/security/env-value-leakage.js.map +1 -0
- package/dist/checks/security/no-tracked-env-files.d.ts +18 -0
- package/dist/checks/security/no-tracked-env-files.d.ts.map +1 -0
- package/dist/checks/security/no-tracked-env-files.js +247 -0
- package/dist/checks/security/no-tracked-env-files.js.map +1 -0
- package/dist/checks/security/open-redirect-prevention.d.ts +19 -0
- package/dist/checks/security/open-redirect-prevention.d.ts.map +1 -0
- package/dist/checks/security/open-redirect-prevention.js +238 -0
- package/dist/checks/security/open-redirect-prevention.js.map +1 -0
- package/dist/checks/security/path-traversal-prevention.d.ts +25 -0
- package/dist/checks/security/path-traversal-prevention.d.ts.map +1 -0
- package/dist/checks/security/path-traversal-prevention.js +246 -0
- package/dist/checks/security/path-traversal-prevention.js.map +1 -0
- package/dist/checks/security/permission-security-validation.d.ts +19 -0
- package/dist/checks/security/permission-security-validation.d.ts.map +1 -0
- package/dist/checks/security/permission-security-validation.js +319 -0
- package/dist/checks/security/permission-security-validation.js.map +1 -0
- package/dist/checks/security/prod-command-detection.d.ts +17 -0
- package/dist/checks/security/prod-command-detection.d.ts.map +1 -0
- package/dist/checks/security/prod-command-detection.js +222 -0
- package/dist/checks/security/prod-command-detection.js.map +1 -0
- package/dist/checks/security/rate-limiting-validation.d.ts +19 -0
- package/dist/checks/security/rate-limiting-validation.d.ts.map +1 -0
- package/dist/checks/security/rate-limiting-validation.js +260 -0
- package/dist/checks/security/rate-limiting-validation.js.map +1 -0
- package/dist/checks/security/security-sla-enforcement.d.ts +34 -0
- package/dist/checks/security/security-sla-enforcement.d.ts.map +1 -0
- package/dist/checks/security/security-sla-enforcement.js +349 -0
- package/dist/checks/security/security-sla-enforcement.js.map +1 -0
- package/dist/checks/security/sensitive-data-exposure.d.ts +36 -0
- package/dist/checks/security/sensitive-data-exposure.d.ts.map +1 -0
- package/dist/checks/security/sensitive-data-exposure.js +540 -0
- package/dist/checks/security/sensitive-data-exposure.js.map +1 -0
- package/dist/checks/security/sql-injection-prevention.d.ts +25 -0
- package/dist/checks/security/sql-injection-prevention.d.ts.map +1 -0
- package/dist/checks/security/sql-injection-prevention.js +216 -0
- package/dist/checks/security/sql-injection-prevention.js.map +1 -0
- package/dist/checks/security/turnstile-scope-validation.d.ts +21 -0
- package/dist/checks/security/turnstile-scope-validation.d.ts.map +1 -0
- package/dist/checks/security/turnstile-scope-validation.js +237 -0
- package/dist/checks/security/turnstile-scope-validation.js.map +1 -0
- package/dist/checks/security/unvalidated-route-params.d.ts +28 -0
- package/dist/checks/security/unvalidated-route-params.d.ts.map +1 -0
- package/dist/checks/security/unvalidated-route-params.js +246 -0
- package/dist/checks/security/unvalidated-route-params.js.map +1 -0
- package/dist/checks/security/webhook-security-validation.d.ts +19 -0
- package/dist/checks/security/webhook-security-validation.d.ts.map +1 -0
- package/dist/checks/security/webhook-security-validation.js +258 -0
- package/dist/checks/security/webhook-security-validation.js.map +1 -0
- package/dist/checks/seo/missing-metadata.d.ts +26 -0
- package/dist/checks/seo/missing-metadata.d.ts.map +1 -0
- package/dist/checks/seo/missing-metadata.js +189 -0
- package/dist/checks/seo/missing-metadata.js.map +1 -0
- package/dist/checks/storage-keys-validation.d.ts +25 -0
- package/dist/checks/storage-keys-validation.d.ts.map +1 -0
- package/dist/checks/storage-keys-validation.js +312 -0
- package/dist/checks/storage-keys-validation.js.map +1 -0
- package/dist/checks/store-order-numbers.d.ts +19 -0
- package/dist/checks/store-order-numbers.d.ts.map +1 -0
- package/dist/checks/store-order-numbers.js +238 -0
- package/dist/checks/store-order-numbers.js.map +1 -0
- package/dist/checks/system/analyze-consolidation-candidates.d.ts +17 -0
- package/dist/checks/system/analyze-consolidation-candidates.d.ts.map +1 -0
- package/dist/checks/system/analyze-consolidation-candidates.js +221 -0
- package/dist/checks/system/analyze-consolidation-candidates.js.map +1 -0
- package/dist/checks/system/apply-universal-progress.d.ts +15 -0
- package/dist/checks/system/apply-universal-progress.d.ts.map +1 -0
- package/dist/checks/system/apply-universal-progress.js +292 -0
- package/dist/checks/system/apply-universal-progress.js.map +1 -0
- package/dist/checks/system/broken-preflight-detection.d.ts +30 -0
- package/dist/checks/system/broken-preflight-detection.d.ts.map +1 -0
- package/dist/checks/system/broken-preflight-detection.js +565 -0
- package/dist/checks/system/broken-preflight-detection.js.map +1 -0
- package/dist/checks/system/find-orphaned-preflights.d.ts +19 -0
- package/dist/checks/system/find-orphaned-preflights.d.ts.map +1 -0
- package/dist/checks/system/find-orphaned-preflights.js +157 -0
- package/dist/checks/system/find-orphaned-preflights.js.map +1 -0
- package/dist/checks/system/lint-preflight-consistency.d.ts +25 -0
- package/dist/checks/system/lint-preflight-consistency.d.ts.map +1 -0
- package/dist/checks/system/lint-preflight-consistency.js +374 -0
- package/dist/checks/system/lint-preflight-consistency.js.map +1 -0
- package/dist/checks/system/orphaned-scripts-detection.d.ts +24 -0
- package/dist/checks/system/orphaned-scripts-detection.d.ts.map +1 -0
- package/dist/checks/system/orphaned-scripts-detection.js +335 -0
- package/dist/checks/system/orphaned-scripts-detection.js.map +1 -0
- package/dist/checks/system/preflight-command-validation.d.ts +32 -0
- package/dist/checks/system/preflight-command-validation.d.ts.map +1 -0
- package/dist/checks/system/preflight-command-validation.js +631 -0
- package/dist/checks/system/preflight-command-validation.js.map +1 -0
- package/dist/checks/system/preflight-concurrency-support.d.ts +18 -0
- package/dist/checks/system/preflight-concurrency-support.d.ts.map +1 -0
- package/dist/checks/system/preflight-concurrency-support.js +207 -0
- package/dist/checks/system/preflight-concurrency-support.js.map +1 -0
- package/dist/checks/system/preflight-consolidation-safety.d.ts +16 -0
- package/dist/checks/system/preflight-consolidation-safety.d.ts.map +1 -0
- package/dist/checks/system/preflight-consolidation-safety.js +250 -0
- package/dist/checks/system/preflight-consolidation-safety.js.map +1 -0
- package/dist/checks/system/preflight-coverage-map.d.ts +26 -0
- package/dist/checks/system/preflight-coverage-map.d.ts.map +1 -0
- package/dist/checks/system/preflight-coverage-map.js +295 -0
- package/dist/checks/system/preflight-coverage-map.js.map +1 -0
- package/dist/checks/system/preflight-drift-detector.d.ts +28 -0
- package/dist/checks/system/preflight-drift-detector.d.ts.map +1 -0
- package/dist/checks/system/preflight-drift-detector.js +380 -0
- package/dist/checks/system/preflight-drift-detector.js.map +1 -0
- package/dist/checks/system/preflight-env-var-documentation.d.ts +25 -0
- package/dist/checks/system/preflight-env-var-documentation.d.ts.map +1 -0
- package/dist/checks/system/preflight-env-var-documentation.js +333 -0
- package/dist/checks/system/preflight-env-var-documentation.js.map +1 -0
- package/dist/checks/system/preflight-exit-code-validator.d.ts +30 -0
- package/dist/checks/system/preflight-exit-code-validator.d.ts.map +1 -0
- package/dist/checks/system/preflight-exit-code-validator.js +298 -0
- package/dist/checks/system/preflight-exit-code-validator.js.map +1 -0
- package/dist/checks/system/preflight-false-positive-tracker.d.ts +25 -0
- package/dist/checks/system/preflight-false-positive-tracker.d.ts.map +1 -0
- package/dist/checks/system/preflight-false-positive-tracker.js +262 -0
- package/dist/checks/system/preflight-false-positive-tracker.js.map +1 -0
- package/dist/checks/system/preflight-metadata-validator.d.ts +28 -0
- package/dist/checks/system/preflight-metadata-validator.d.ts.map +1 -0
- package/dist/checks/system/preflight-metadata-validator.js +220 -0
- package/dist/checks/system/preflight-metadata-validator.js.map +1 -0
- package/dist/checks/system/preflight-organization.d.ts +15 -0
- package/dist/checks/system/preflight-organization.d.ts.map +1 -0
- package/dist/checks/system/preflight-organization.js +212 -0
- package/dist/checks/system/preflight-organization.js.map +1 -0
- package/dist/checks/system/preflight-performance-optimizer.d.ts +17 -0
- package/dist/checks/system/preflight-performance-optimizer.d.ts.map +1 -0
- package/dist/checks/system/preflight-performance-optimizer.js +375 -0
- package/dist/checks/system/preflight-performance-optimizer.js.map +1 -0
- package/dist/checks/system/preflight-redundancy-detection.d.ts +28 -0
- package/dist/checks/system/preflight-redundancy-detection.d.ts.map +1 -0
- package/dist/checks/system/preflight-redundancy-detection.js +1168 -0
- package/dist/checks/system/preflight-redundancy-detection.js.map +1 -0
- package/dist/checks/system/preflight-reporting-standards.d.ts +17 -0
- package/dist/checks/system/preflight-reporting-standards.d.ts.map +1 -0
- package/dist/checks/system/preflight-reporting-standards.js +315 -0
- package/dist/checks/system/preflight-reporting-standards.js.map +1 -0
- package/dist/checks/system/preflight-runtime-health.d.ts +29 -0
- package/dist/checks/system/preflight-runtime-health.d.ts.map +1 -0
- package/dist/checks/system/preflight-runtime-health.js +346 -0
- package/dist/checks/system/preflight-runtime-health.js.map +1 -0
- package/dist/checks/system/preflight-schema-validator.d.ts +23 -0
- package/dist/checks/system/preflight-schema-validator.d.ts.map +1 -0
- package/dist/checks/system/preflight-schema-validator.js +322 -0
- package/dist/checks/system/preflight-schema-validator.js.map +1 -0
- package/dist/checks/system/preflight-test-coverage.d.ts +24 -0
- package/dist/checks/system/preflight-test-coverage.d.ts.map +1 -0
- package/dist/checks/system/preflight-test-coverage.js +242 -0
- package/dist/checks/system/preflight-test-coverage.js.map +1 -0
- package/dist/checks/system/script-path-validation.d.ts +30 -0
- package/dist/checks/system/script-path-validation.d.ts.map +1 -0
- package/dist/checks/system/script-path-validation.js +351 -0
- package/dist/checks/system/script-path-validation.js.map +1 -0
- package/dist/checks/system/stale-preflight-detection.d.ts +15 -0
- package/dist/checks/system/stale-preflight-detection.d.ts.map +1 -0
- package/dist/checks/system/stale-preflight-detection.js +200 -0
- package/dist/checks/system/stale-preflight-detection.js.map +1 -0
- package/dist/checks/system/universal-progress-reporter.d.ts +92 -0
- package/dist/checks/system/universal-progress-reporter.d.ts.map +1 -0
- package/dist/checks/system/universal-progress-reporter.js +272 -0
- package/dist/checks/system/universal-progress-reporter.js.map +1 -0
- package/dist/checks/tailwind/tailwind4-compatibility.d.ts +31 -0
- package/dist/checks/tailwind/tailwind4-compatibility.d.ts.map +1 -0
- package/dist/checks/tailwind/tailwind4-compatibility.js +490 -0
- package/dist/checks/tailwind/tailwind4-compatibility.js.map +1 -0
- package/dist/checks/tanstack/tanstack-query-compatibility.d.ts +31 -0
- package/dist/checks/tanstack/tanstack-query-compatibility.d.ts.map +1 -0
- package/dist/checks/tanstack/tanstack-query-compatibility.js +434 -0
- package/dist/checks/tanstack/tanstack-query-compatibility.js.map +1 -0
- package/dist/checks/ui/accessibility-critical.d.ts +18 -0
- package/dist/checks/ui/accessibility-critical.d.ts.map +1 -0
- package/dist/checks/ui/accessibility-critical.js +357 -0
- package/dist/checks/ui/accessibility-critical.js.map +1 -0
- package/dist/checks/ui/alert-button-gap.d.ts +26 -0
- package/dist/checks/ui/alert-button-gap.d.ts.map +1 -0
- package/dist/checks/ui/alert-button-gap.js +215 -0
- package/dist/checks/ui/alert-button-gap.js.map +1 -0
- package/dist/checks/ui/breadcrumb-consistency.d.ts +18 -0
- package/dist/checks/ui/breadcrumb-consistency.d.ts.map +1 -0
- package/dist/checks/ui/breadcrumb-consistency.js +237 -0
- package/dist/checks/ui/breadcrumb-consistency.js.map +1 -0
- package/dist/checks/ui/button-group-gap.d.ts +22 -0
- package/dist/checks/ui/button-group-gap.d.ts.map +1 -0
- package/dist/checks/ui/button-group-gap.js +194 -0
- package/dist/checks/ui/button-group-gap.js.map +1 -0
- package/dist/checks/ui/button-icon-prop.d.ts +40 -0
- package/dist/checks/ui/button-icon-prop.d.ts.map +1 -0
- package/dist/checks/ui/button-icon-prop.js +248 -0
- package/dist/checks/ui/button-icon-prop.js.map +1 -0
- package/dist/checks/ui/card-section-content-spacing.d.ts +31 -0
- package/dist/checks/ui/card-section-content-spacing.d.ts.map +1 -0
- package/dist/checks/ui/card-section-content-spacing.js +260 -0
- package/dist/checks/ui/card-section-content-spacing.js.map +1 -0
- package/dist/checks/ui/color-check.d.ts +7 -0
- package/dist/checks/ui/color-check.d.ts.map +1 -0
- package/dist/checks/ui/color-check.js +105 -0
- package/dist/checks/ui/color-check.js.map +1 -0
- package/dist/checks/ui/component-library-quality.d.ts +19 -0
- package/dist/checks/ui/component-library-quality.d.ts.map +1 -0
- package/dist/checks/ui/component-library-quality.js +231 -0
- package/dist/checks/ui/component-library-quality.js.map +1 -0
- package/dist/checks/ui/component-prop-validation.d.ts +22 -0
- package/dist/checks/ui/component-prop-validation.d.ts.map +1 -0
- package/dist/checks/ui/component-prop-validation.js +271 -0
- package/dist/checks/ui/component-prop-validation.js.map +1 -0
- package/dist/checks/ui/console-log-check.d.ts +7 -0
- package/dist/checks/ui/console-log-check.d.ts.map +1 -0
- package/dist/checks/ui/console-log-check.js +126 -0
- package/dist/checks/ui/console-log-check.js.map +1 -0
- package/dist/checks/ui/css-grid-gap-check.d.ts +24 -0
- package/dist/checks/ui/css-grid-gap-check.d.ts.map +1 -0
- package/dist/checks/ui/css-grid-gap-check.js +314 -0
- package/dist/checks/ui/css-grid-gap-check.js.map +1 -0
- package/dist/checks/ui/css-token-syntax.d.ts +22 -0
- package/dist/checks/ui/css-token-syntax.d.ts.map +1 -0
- package/dist/checks/ui/css-token-syntax.js +386 -0
- package/dist/checks/ui/css-token-syntax.js.map +1 -0
- package/dist/checks/ui/dark-mode-support.d.ts +95 -0
- package/dist/checks/ui/dark-mode-support.d.ts.map +1 -0
- package/dist/checks/ui/dark-mode-support.js +702 -0
- package/dist/checks/ui/dark-mode-support.js.map +1 -0
- package/dist/checks/ui/dashboard-section-patterns.d.ts +85 -0
- package/dist/checks/ui/dashboard-section-patterns.d.ts.map +1 -0
- package/dist/checks/ui/dashboard-section-patterns.js +1751 -0
- package/dist/checks/ui/dashboard-section-patterns.js.map +1 -0
- package/dist/checks/ui/dashboard-ui.d.ts +28 -0
- package/dist/checks/ui/dashboard-ui.d.ts.map +1 -0
- package/dist/checks/ui/dashboard-ui.js +503 -0
- package/dist/checks/ui/dashboard-ui.js.map +1 -0
- package/dist/checks/ui/dead-action-detector.d.ts +24 -0
- package/dist/checks/ui/dead-action-detector.d.ts.map +1 -0
- package/dist/checks/ui/dead-action-detector.js +457 -0
- package/dist/checks/ui/dead-action-detector.js.map +1 -0
- package/dist/checks/ui/doubled-padding-check.d.ts +21 -0
- package/dist/checks/ui/doubled-padding-check.d.ts.map +1 -0
- package/dist/checks/ui/doubled-padding-check.js +233 -0
- package/dist/checks/ui/doubled-padding-check.js.map +1 -0
- package/dist/checks/ui/dropdown-positioning-check.d.ts +26 -0
- package/dist/checks/ui/dropdown-positioning-check.d.ts.map +1 -0
- package/dist/checks/ui/dropdown-positioning-check.js +283 -0
- package/dist/checks/ui/dropdown-positioning-check.js.map +1 -0
- package/dist/checks/ui/feature-page-hero-consistency.d.ts +29 -0
- package/dist/checks/ui/feature-page-hero-consistency.d.ts.map +1 -0
- package/dist/checks/ui/feature-page-hero-consistency.js +228 -0
- package/dist/checks/ui/feature-page-hero-consistency.js.map +1 -0
- package/dist/checks/ui/filter-loading-states.d.ts +19 -0
- package/dist/checks/ui/filter-loading-states.d.ts.map +1 -0
- package/dist/checks/ui/filter-loading-states.js +193 -0
- package/dist/checks/ui/filter-loading-states.js.map +1 -0
- package/dist/checks/ui/flex-icon-text-gap.d.ts +30 -0
- package/dist/checks/ui/flex-icon-text-gap.d.ts.map +1 -0
- package/dist/checks/ui/flex-icon-text-gap.js +371 -0
- package/dist/checks/ui/flex-icon-text-gap.js.map +1 -0
- package/dist/checks/ui/form-control-layout-check.d.ts +30 -0
- package/dist/checks/ui/form-control-layout-check.d.ts.map +1 -0
- package/dist/checks/ui/form-control-layout-check.js +287 -0
- package/dist/checks/ui/form-control-layout-check.js.map +1 -0
- package/dist/checks/ui/form-field-consistency.d.ts +29 -0
- package/dist/checks/ui/form-field-consistency.d.ts.map +1 -0
- package/dist/checks/ui/form-field-consistency.js +270 -0
- package/dist/checks/ui/form-field-consistency.js.map +1 -0
- package/dist/checks/ui/gap-spacing-consistency.d.ts +35 -0
- package/dist/checks/ui/gap-spacing-consistency.d.ts.map +1 -0
- package/dist/checks/ui/gap-spacing-consistency.js +316 -0
- package/dist/checks/ui/gap-spacing-consistency.js.map +1 -0
- package/dist/checks/ui/header-action-text-color.d.ts +19 -0
- package/dist/checks/ui/header-action-text-color.d.ts.map +1 -0
- package/dist/checks/ui/header-action-text-color.js +122 -0
- package/dist/checks/ui/header-action-text-color.js.map +1 -0
- package/dist/checks/ui/header-vertical-alignment.d.ts +33 -0
- package/dist/checks/ui/header-vertical-alignment.d.ts.map +1 -0
- package/dist/checks/ui/header-vertical-alignment.js +205 -0
- package/dist/checks/ui/header-vertical-alignment.js.map +1 -0
- package/dist/checks/ui/image-component-check.d.ts +7 -0
- package/dist/checks/ui/image-component-check.d.ts.map +1 -0
- package/dist/checks/ui/image-component-check.js +92 -0
- package/dist/checks/ui/image-component-check.js.map +1 -0
- package/dist/checks/ui/inline-flex-gap-check.d.ts +26 -0
- package/dist/checks/ui/inline-flex-gap-check.d.ts.map +1 -0
- package/dist/checks/ui/inline-flex-gap-check.js +196 -0
- package/dist/checks/ui/inline-flex-gap-check.js.map +1 -0
- package/dist/checks/ui/inline-to-tailwind-check.d.ts +47 -0
- package/dist/checks/ui/inline-to-tailwind-check.d.ts.map +1 -0
- package/dist/checks/ui/inline-to-tailwind-check.js +329 -0
- package/dist/checks/ui/inline-to-tailwind-check.js.map +1 -0
- package/dist/checks/ui/input-label-gap.d.ts +34 -0
- package/dist/checks/ui/input-label-gap.d.ts.map +1 -0
- package/dist/checks/ui/input-label-gap.js +347 -0
- package/dist/checks/ui/input-label-gap.js.map +1 -0
- package/dist/checks/ui/input-width-consistency.d.ts +53 -0
- package/dist/checks/ui/input-width-consistency.d.ts.map +1 -0
- package/dist/checks/ui/input-width-consistency.js +342 -0
- package/dist/checks/ui/input-width-consistency.js.map +1 -0
- package/dist/checks/ui/js-responsive-visibility.d.ts +31 -0
- package/dist/checks/ui/js-responsive-visibility.d.ts.map +1 -0
- package/dist/checks/ui/js-responsive-visibility.js +213 -0
- package/dist/checks/ui/js-responsive-visibility.js.map +1 -0
- package/dist/checks/ui/label-description-spacing.d.ts +30 -0
- package/dist/checks/ui/label-description-spacing.d.ts.map +1 -0
- package/dist/checks/ui/label-description-spacing.js +285 -0
- package/dist/checks/ui/label-description-spacing.js.map +1 -0
- package/dist/checks/ui/layout-shift-detection.d.ts +31 -0
- package/dist/checks/ui/layout-shift-detection.d.ts.map +1 -0
- package/dist/checks/ui/layout-shift-detection.js +398 -0
- package/dist/checks/ui/layout-shift-detection.js.map +1 -0
- package/dist/checks/ui/margin-in-gap-container.d.ts +25 -0
- package/dist/checks/ui/margin-in-gap-container.d.ts.map +1 -0
- package/dist/checks/ui/margin-in-gap-container.js +619 -0
- package/dist/checks/ui/margin-in-gap-container.js.map +1 -0
- package/dist/checks/ui/mega-menu-dropdown-position.d.ts +25 -0
- package/dist/checks/ui/mega-menu-dropdown-position.d.ts.map +1 -0
- package/dist/checks/ui/mega-menu-dropdown-position.js +230 -0
- package/dist/checks/ui/mega-menu-dropdown-position.js.map +1 -0
- package/dist/checks/ui/mega-menu-scrollbar-overlap.d.ts +24 -0
- package/dist/checks/ui/mega-menu-scrollbar-overlap.d.ts.map +1 -0
- package/dist/checks/ui/mega-menu-scrollbar-overlap.js +283 -0
- package/dist/checks/ui/mega-menu-scrollbar-overlap.js.map +1 -0
- package/dist/checks/ui/mega-menu-spacing-check.d.ts +21 -0
- package/dist/checks/ui/mega-menu-spacing-check.d.ts.map +1 -0
- package/dist/checks/ui/mega-menu-spacing-check.js +244 -0
- package/dist/checks/ui/mega-menu-spacing-check.js.map +1 -0
- package/dist/checks/ui/notification-feedback-check.d.ts +37 -0
- package/dist/checks/ui/notification-feedback-check.d.ts.map +1 -0
- package/dist/checks/ui/notification-feedback-check.js +552 -0
- package/dist/checks/ui/notification-feedback-check.js.map +1 -0
- package/dist/checks/ui/overflow-clipping-detection.d.ts +17 -0
- package/dist/checks/ui/overflow-clipping-detection.d.ts.map +1 -0
- package/dist/checks/ui/overflow-clipping-detection.js +198 -0
- package/dist/checks/ui/overflow-clipping-detection.js.map +1 -0
- package/dist/checks/ui/page-layout-spacing.d.ts +29 -0
- package/dist/checks/ui/page-layout-spacing.d.ts.map +1 -0
- package/dist/checks/ui/page-layout-spacing.js +604 -0
- package/dist/checks/ui/page-layout-spacing.js.map +1 -0
- package/dist/checks/ui/path-alias-check.d.ts +7 -0
- package/dist/checks/ui/path-alias-check.d.ts.map +1 -0
- package/dist/checks/ui/path-alias-check.js +95 -0
- package/dist/checks/ui/path-alias-check.js.map +1 -0
- package/dist/checks/ui/product-image-animations.d.ts +70 -0
- package/dist/checks/ui/product-image-animations.d.ts.map +1 -0
- package/dist/checks/ui/product-image-animations.js +332 -0
- package/dist/checks/ui/product-image-animations.js.map +1 -0
- package/dist/checks/ui/search-width-consistency.d.ts +53 -0
- package/dist/checks/ui/search-width-consistency.d.ts.map +1 -0
- package/dist/checks/ui/search-width-consistency.js +276 -0
- package/dist/checks/ui/search-width-consistency.js.map +1 -0
- package/dist/checks/ui/section-spacing-check.d.ts +30 -0
- package/dist/checks/ui/section-spacing-check.d.ts.map +1 -0
- package/dist/checks/ui/section-spacing-check.js +248 -0
- package/dist/checks/ui/section-spacing-check.js.map +1 -0
- package/dist/checks/ui/sibling-spacing-check.d.ts +25 -0
- package/dist/checks/ui/sibling-spacing-check.d.ts.map +1 -0
- package/dist/checks/ui/sibling-spacing-check.js +329 -0
- package/dist/checks/ui/sibling-spacing-check.js.map +1 -0
- package/dist/checks/ui/sidebar-layout-gap.d.ts +34 -0
- package/dist/checks/ui/sidebar-layout-gap.d.ts.map +1 -0
- package/dist/checks/ui/sidebar-layout-gap.js +200 -0
- package/dist/checks/ui/sidebar-layout-gap.js.map +1 -0
- package/dist/checks/ui/skeleton-size-consistency.d.ts +50 -0
- package/dist/checks/ui/skeleton-size-consistency.d.ts.map +1 -0
- package/dist/checks/ui/skeleton-size-consistency.js +1239 -0
- package/dist/checks/ui/skeleton-size-consistency.js.map +1 -0
- package/dist/checks/ui/spacing-check.d.ts +7 -0
- package/dist/checks/ui/spacing-check.d.ts.map +1 -0
- package/dist/checks/ui/spacing-check.js +100 -0
- package/dist/checks/ui/spacing-check.js.map +1 -0
- package/dist/checks/ui/styling-standards.d.ts +71 -0
- package/dist/checks/ui/styling-standards.d.ts.map +1 -0
- package/dist/checks/ui/styling-standards.js +567 -0
- package/dist/checks/ui/styling-standards.js.map +1 -0
- package/dist/checks/ui/tailwind-consistency.d.ts +26 -0
- package/dist/checks/ui/tailwind-consistency.d.ts.map +1 -0
- package/dist/checks/ui/tailwind-consistency.js +345 -0
- package/dist/checks/ui/tailwind-consistency.js.map +1 -0
- package/dist/checks/ui/tailwind-contrast-check.d.ts +44 -0
- package/dist/checks/ui/tailwind-contrast-check.d.ts.map +1 -0
- package/dist/checks/ui/tailwind-contrast-check.js +457 -0
- package/dist/checks/ui/tailwind-contrast-check.js.map +1 -0
- package/dist/checks/ui/text-button-group-gap.d.ts +29 -0
- package/dist/checks/ui/text-button-group-gap.d.ts.map +1 -0
- package/dist/checks/ui/text-button-group-gap.js +242 -0
- package/dist/checks/ui/text-button-group-gap.js.map +1 -0
- package/dist/checks/ui/typography-check.d.ts +7 -0
- package/dist/checks/ui/typography-check.d.ts.map +1 -0
- package/dist/checks/ui/typography-check.js +114 -0
- package/dist/checks/ui/typography-check.js.map +1 -0
- package/dist/checks/ui/z-index-check.d.ts +25 -0
- package/dist/checks/ui/z-index-check.d.ts.map +1 -0
- package/dist/checks/ui/z-index-check.js +663 -0
- package/dist/checks/ui/z-index-check.js.map +1 -0
- package/dist/checks/zod/zod4-compatibility.d.ts +31 -0
- package/dist/checks/zod/zod4-compatibility.d.ts.map +1 -0
- package/dist/checks/zod/zod4-compatibility.js +412 -0
- package/dist/checks/zod/zod4-compatibility.js.map +1 -0
- package/dist/core/categories.d.ts +40 -0
- package/dist/core/categories.d.ts.map +1 -0
- package/dist/core/categories.js +153 -0
- package/dist/core/categories.js.map +1 -0
- package/dist/core/config.d.ts +87 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +176 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/types.d.ts +194 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +24 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +207 -0
- package/dist/index.js.map +1 -0
- package/dist/runner.d.ts +33 -0
- package/dist/runner.d.ts.map +1 -0
- package/dist/runner.js +457 -0
- package/dist/runner.js.map +1 -0
- package/dist/shared/concurrency-config.d.ts +57 -0
- package/dist/shared/concurrency-config.d.ts.map +1 -0
- package/dist/shared/concurrency-config.js +128 -0
- package/dist/shared/concurrency-config.js.map +1 -0
- package/dist/shared/design-tokens-config.d.ts +140 -0
- package/dist/shared/design-tokens-config.d.ts.map +1 -0
- package/dist/shared/design-tokens-config.js +290 -0
- package/dist/shared/design-tokens-config.js.map +1 -0
- package/dist/shared/design-tokens.d.ts +771 -0
- package/dist/shared/design-tokens.d.ts.map +1 -0
- package/dist/shared/design-tokens.js +873 -0
- package/dist/shared/design-tokens.js.map +1 -0
- package/dist/shared/file-cache.d.ts +379 -0
- package/dist/shared/file-cache.d.ts.map +1 -0
- package/dist/shared/file-cache.js +744 -0
- package/dist/shared/file-cache.js.map +1 -0
- package/dist/shared/glob-patterns.d.ts +200 -0
- package/dist/shared/glob-patterns.d.ts.map +1 -0
- package/dist/shared/glob-patterns.js +291 -0
- package/dist/shared/glob-patterns.js.map +1 -0
- package/dist/shared/layout-constants.d.ts +101 -0
- package/dist/shared/layout-constants.d.ts.map +1 -0
- package/dist/shared/layout-constants.js +172 -0
- package/dist/shared/layout-constants.js.map +1 -0
- package/dist/utils/config-loader.d.ts +34 -0
- package/dist/utils/config-loader.d.ts.map +1 -0
- package/dist/utils/config-loader.js +169 -0
- package/dist/utils/config-loader.js.map +1 -0
- package/dist/utils/console-chars.d.ts +388 -0
- package/dist/utils/console-chars.d.ts.map +1 -0
- package/dist/utils/console-chars.js +378 -0
- package/dist/utils/console-chars.js.map +1 -0
- package/dist/utils/file-scanner.d.ts +73 -0
- package/dist/utils/file-scanner.d.ts.map +1 -0
- package/dist/utils/file-scanner.js +203 -0
- package/dist/utils/file-scanner.js.map +1 -0
- package/dist/utils/findings-writer.d.ts +32 -0
- package/dist/utils/findings-writer.d.ts.map +1 -0
- package/dist/utils/findings-writer.js +69 -0
- package/dist/utils/findings-writer.js.map +1 -0
- package/dist/utils/plugin-loader.d.ts +76 -0
- package/dist/utils/plugin-loader.d.ts.map +1 -0
- package/dist/utils/plugin-loader.js +235 -0
- package/dist/utils/plugin-loader.js.map +1 -0
- package/dist/utils/preflight-runner.d.ts +29 -0
- package/dist/utils/preflight-runner.d.ts.map +1 -0
- package/dist/utils/preflight-runner.js +131 -0
- package/dist/utils/preflight-runner.js.map +1 -0
- package/dist/utils/progress-reporter.d.ts +92 -0
- package/dist/utils/progress-reporter.d.ts.map +1 -0
- package/dist/utils/progress-reporter.js +272 -0
- package/dist/utils/progress-reporter.js.map +1 -0
- package/package.json +78 -0
- package/templates/domain-specific/trading-card-system/tcg-seed-validation.ts +197 -0
- package/templates/new-check.ts.template +205 -0
- package/templates/preflight.config.ts.template +103 -0
|
@@ -0,0 +1,1197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Steering Quality & Bloat Prevention Preflight
|
|
4
|
+
*
|
|
5
|
+
* Ensures optimal agent steering quality and prevents token bloat:
|
|
6
|
+
*
|
|
7
|
+
* QUALITY CHECKS:
|
|
8
|
+
* - Front matter validation (inclusion, loadWith, lastUpdated)
|
|
9
|
+
* - Cross-reference integrity (no broken #references)
|
|
10
|
+
* - README index completeness (all files listed)
|
|
11
|
+
* - Best practices compliance
|
|
12
|
+
* - Date validation (future dates, invalid formats)
|
|
13
|
+
*
|
|
14
|
+
* BLOAT PREVENTION:
|
|
15
|
+
* - ASCII art diagrams (decorative boxes)
|
|
16
|
+
* - Verbose code examples (>25 lines)
|
|
17
|
+
* - Duplicate information across files
|
|
18
|
+
* - Always-loaded files that should be manual
|
|
19
|
+
* - Content redundancy between files
|
|
20
|
+
* - Redundant preflight commands
|
|
21
|
+
*
|
|
22
|
+
* DRIFT PREVENTION:
|
|
23
|
+
* - Orphaned files (not in README index)
|
|
24
|
+
* - Stale lastUpdated dates (>90 days)
|
|
25
|
+
* - Missing cross-references
|
|
26
|
+
* - Token budget trend tracking
|
|
27
|
+
* - Cross-reference dependency graph
|
|
28
|
+
*
|
|
29
|
+
* COST OPTIMIZATION:
|
|
30
|
+
* - Token budget tracking with historical trends
|
|
31
|
+
* - Always-loaded content minimization
|
|
32
|
+
* - Redundancy elimination suggestions
|
|
33
|
+
* - Whitelisted large files (comprehensive references)
|
|
34
|
+
*
|
|
35
|
+
* Run: pnpm preflight:steering-quality
|
|
36
|
+
* pnpm preflight:steering-quality --fix (auto-fix suggestions)
|
|
37
|
+
* pnpm preflight:steering-quality --graph (show dependency graph)
|
|
38
|
+
* Created: 2025-12-26
|
|
39
|
+
* Enhanced: 2026-01-04
|
|
40
|
+
*/
|
|
41
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
42
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
43
|
+
};
|
|
44
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
+
exports.tags = exports.description = exports.blocking = exports.category = exports.name = exports.id = void 0;
|
|
46
|
+
exports.validateSteeringQuality = validateSteeringQuality;
|
|
47
|
+
exports.validateSteeringBloat = validateSteeringQuality;
|
|
48
|
+
const fs_1 = __importDefault(require("fs"));
|
|
49
|
+
const glob_1 = require("glob");
|
|
50
|
+
const path_1 = __importDefault(require("path"));
|
|
51
|
+
const console_chars_1 = require("../../utils/console-chars");
|
|
52
|
+
// Check metadata
|
|
53
|
+
exports.id = "organization/steering-bloat-prevention";
|
|
54
|
+
exports.name = "Steering Bloat Prevention";
|
|
55
|
+
exports.category = "organization";
|
|
56
|
+
exports.blocking = false;
|
|
57
|
+
exports.description = "Steering Quality & Bloat Prevention Preflight";
|
|
58
|
+
exports.tags = ["organization"];
|
|
59
|
+
// CONFIGURATION
|
|
60
|
+
const CONFIG = {
|
|
61
|
+
// Token limits (approximate - 1 token ≈ 4 chars)
|
|
62
|
+
MAX_ALWAYS_LOADED_TOKENS: 2000,
|
|
63
|
+
MAX_SINGLE_FILE_TOKENS: 8000,
|
|
64
|
+
WARN_FILE_TOKENS: 5000,
|
|
65
|
+
// Line limits
|
|
66
|
+
MAX_ALWAYS_LOADED_LINES: 150,
|
|
67
|
+
MAX_MANUAL_FILE_LINES: 500,
|
|
68
|
+
WARN_FILE_LINES: 400,
|
|
69
|
+
// Code block limits
|
|
70
|
+
MAX_CODE_BLOCK_LINES: 25,
|
|
71
|
+
WARN_CODE_BLOCK_LINES: 22,
|
|
72
|
+
// Staleness (days)
|
|
73
|
+
STALE_THRESHOLD_DAYS: 90,
|
|
74
|
+
// Similarity threshold for redundancy
|
|
75
|
+
SIMILARITY_THRESHOLD: 0.7,
|
|
76
|
+
// Token trend threshold (percentage)
|
|
77
|
+
TOKEN_TREND_WARN_THRESHOLD: 5,
|
|
78
|
+
// Files that should always be in README index
|
|
79
|
+
REQUIRED_INDEX_ENTRIES: ["core-rules.md", "quick-decisions.md", "preflight-reference.md"],
|
|
80
|
+
// Whitelisted large files (intentionally comprehensive)
|
|
81
|
+
WHITELISTED_LARGE_FILES: [
|
|
82
|
+
"all-rules.md", // Comprehensive 75-rule reference
|
|
83
|
+
"database-guide.md", // Comprehensive Prisma guide
|
|
84
|
+
"CHANGELOG.md", // Historical record
|
|
85
|
+
],
|
|
86
|
+
// Canonical files for specific content
|
|
87
|
+
CANONICAL_CONTENT: {
|
|
88
|
+
"order-status": "business-operations.md",
|
|
89
|
+
"payment-flow": "business-operations.md",
|
|
90
|
+
"seller-setup": "business-operations.md",
|
|
91
|
+
"preflight-commands": "preflight-reference.md",
|
|
92
|
+
"component-patterns": "components-guide.md",
|
|
93
|
+
"ui-styling": "ui-guide.md",
|
|
94
|
+
"database-patterns": "database-guide.md",
|
|
95
|
+
"schema-updates": "database-guide.md",
|
|
96
|
+
"regression-tests": "e2e-testing.md",
|
|
97
|
+
"e2e-tests": "e2e-testing.md",
|
|
98
|
+
"design-system": "components-guide.md",
|
|
99
|
+
"listing-workflow": "business-workflows.md",
|
|
100
|
+
},
|
|
101
|
+
// Workflow files should only be index/reference (not duplicates)
|
|
102
|
+
WORKFLOW_MAX_LINES: 150,
|
|
103
|
+
WORKFLOW_DIR: ".kiro/steering/workflows/",
|
|
104
|
+
// Token history file
|
|
105
|
+
TOKEN_HISTORY_FILE: ".kiro/steering/.token-history.json",
|
|
106
|
+
};
|
|
107
|
+
// MAIN VALIDATION FUNCTION
|
|
108
|
+
async function validateSteeringQuality(options = {}) {
|
|
109
|
+
const issues = [];
|
|
110
|
+
const contentBlocks = [];
|
|
111
|
+
// Load all steering files
|
|
112
|
+
const steeringFiles = await loadSteeringFiles();
|
|
113
|
+
// Load README for index validation
|
|
114
|
+
const readmeContent = fs_1.default.existsSync(".kiro/steering/README.md")
|
|
115
|
+
? fs_1.default.readFileSync(".kiro/steering/README.md", "utf-8")
|
|
116
|
+
: "";
|
|
117
|
+
// Calculate token budget
|
|
118
|
+
const tokenBudget = calculateTokenBudget(steeringFiles);
|
|
119
|
+
// Build cross-reference graph
|
|
120
|
+
const graph = buildCrossRefGraph(steeringFiles);
|
|
121
|
+
// Run all validation checks
|
|
122
|
+
for (const file of steeringFiles) {
|
|
123
|
+
// Quality checks
|
|
124
|
+
validateFrontMatter(file, issues);
|
|
125
|
+
validateFrontMatterDate(file, issues);
|
|
126
|
+
validateCrossReferences(file, steeringFiles, issues);
|
|
127
|
+
checkBestPractices(file, issues);
|
|
128
|
+
// Bloat prevention
|
|
129
|
+
checkAsciiArt(file, issues);
|
|
130
|
+
checkVerboseCode(file, issues);
|
|
131
|
+
checkFileLength(file, issues);
|
|
132
|
+
checkDuplicateContent(file, issues);
|
|
133
|
+
// Workflow redundancy check
|
|
134
|
+
checkWorkflowRedundancy(file, steeringFiles, issues);
|
|
135
|
+
// Drift prevention
|
|
136
|
+
checkStaleness(file, issues);
|
|
137
|
+
checkIndexPresence(file, readmeContent, issues);
|
|
138
|
+
// Extract content blocks for cross-file analysis
|
|
139
|
+
extractContentBlocks(file, contentBlocks);
|
|
140
|
+
}
|
|
141
|
+
// Cross-file analysis
|
|
142
|
+
analyzeContentRedundancy(contentBlocks, issues);
|
|
143
|
+
analyzePreflightRedundancy(contentBlocks, issues);
|
|
144
|
+
// Token budget validation (with whitelist)
|
|
145
|
+
validateTokenBudget(tokenBudget, issues);
|
|
146
|
+
// Check README completeness
|
|
147
|
+
validateReadmeIndex(steeringFiles, readmeContent, issues);
|
|
148
|
+
// Analyze cross-reference graph for orphans
|
|
149
|
+
analyzeGraphForOrphans(graph, steeringFiles, issues);
|
|
150
|
+
// Check token trends
|
|
151
|
+
const tokenTrend = await checkTokenTrend(tokenBudget, steeringFiles, issues);
|
|
152
|
+
// Save current token history
|
|
153
|
+
await saveTokenHistory(tokenBudget, steeringFiles);
|
|
154
|
+
// Calculate stats
|
|
155
|
+
const alwaysLoadedFiles = steeringFiles.filter((f) => f.frontMatter?.inclusion === "always");
|
|
156
|
+
return {
|
|
157
|
+
errors: issues.filter((i) => i.severity === "error"),
|
|
158
|
+
warnings: issues.filter((i) => i.severity === "warning"),
|
|
159
|
+
info: issues.filter((i) => i.severity === "info"),
|
|
160
|
+
stats: {
|
|
161
|
+
totalFiles: steeringFiles.length,
|
|
162
|
+
alwaysLoadedFiles: alwaysLoadedFiles.length,
|
|
163
|
+
totalTokens: tokenBudget.total,
|
|
164
|
+
alwaysLoadedTokens: tokenBudget.alwaysLoaded,
|
|
165
|
+
tokenTrend,
|
|
166
|
+
},
|
|
167
|
+
graph: options.showGraph ? graph : undefined,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
// FILE LOADING
|
|
171
|
+
async function loadSteeringFiles() {
|
|
172
|
+
const filePaths = await (0, glob_1.glob)(".kiro/steering/*.md");
|
|
173
|
+
// Also load workflow files for redundancy checking
|
|
174
|
+
const workflowPaths = await (0, glob_1.glob)(".kiro/steering/workflows/*.md");
|
|
175
|
+
const allPaths = [...filePaths, ...workflowPaths];
|
|
176
|
+
return allPaths.map((filePath) => {
|
|
177
|
+
const content = fs_1.default.readFileSync(filePath, "utf-8");
|
|
178
|
+
const lines = content.split("\n");
|
|
179
|
+
const frontMatter = parseFrontMatter(content);
|
|
180
|
+
const tokenEstimate = Math.ceil(content.length / 4);
|
|
181
|
+
return {
|
|
182
|
+
path: filePath,
|
|
183
|
+
name: path_1.default.basename(filePath),
|
|
184
|
+
content,
|
|
185
|
+
lines,
|
|
186
|
+
frontMatter,
|
|
187
|
+
lineCount: lines.length,
|
|
188
|
+
tokenEstimate,
|
|
189
|
+
};
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
function parseFrontMatter(content) {
|
|
193
|
+
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---/);
|
|
194
|
+
if (!match)
|
|
195
|
+
return null;
|
|
196
|
+
const yaml = match[1];
|
|
197
|
+
const inclusion = yaml.match(/inclusion:\s*(always|manual|fileMatch)/)?.[1];
|
|
198
|
+
const loadWith = yaml.match(/loadWith:\s*["']?([^"'\n]+)["']?/)?.[1];
|
|
199
|
+
const lastUpdated = yaml.match(/lastUpdated:\s*(\d{4}-\d{2}-\d{2})/)?.[1];
|
|
200
|
+
const fileMatchPattern = yaml.match(/fileMatchPattern:\s*["']?([^"'\n]+)["']?/)?.[1];
|
|
201
|
+
if (!inclusion)
|
|
202
|
+
return null;
|
|
203
|
+
return { inclusion, loadWith, lastUpdated, fileMatchPattern };
|
|
204
|
+
}
|
|
205
|
+
function calculateTokenBudget(files) {
|
|
206
|
+
const budget = {
|
|
207
|
+
alwaysLoaded: 0,
|
|
208
|
+
manualFiles: new Map(),
|
|
209
|
+
total: 0,
|
|
210
|
+
};
|
|
211
|
+
for (const file of files) {
|
|
212
|
+
budget.total += file.tokenEstimate;
|
|
213
|
+
if (file.frontMatter?.inclusion === "always") {
|
|
214
|
+
budget.alwaysLoaded += file.tokenEstimate;
|
|
215
|
+
}
|
|
216
|
+
else {
|
|
217
|
+
budget.manualFiles.set(file.name, file.tokenEstimate);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
return budget;
|
|
221
|
+
}
|
|
222
|
+
// CROSS-REFERENCE GRAPH
|
|
223
|
+
function buildCrossRefGraph(files) {
|
|
224
|
+
const nodes = files.map((f) => f.name);
|
|
225
|
+
const edges = [];
|
|
226
|
+
const incomingCount = new Map();
|
|
227
|
+
const outgoingCount = new Map();
|
|
228
|
+
// Initialize counts
|
|
229
|
+
for (const node of nodes) {
|
|
230
|
+
incomingCount.set(node, 0);
|
|
231
|
+
outgoingCount.set(node, 0);
|
|
232
|
+
}
|
|
233
|
+
for (const file of files) {
|
|
234
|
+
// Create new regex for each file to reset lastIndex
|
|
235
|
+
// Match #reference followed by whitespace, backtick, end, paren, pipe, or bracket
|
|
236
|
+
// Note: hyphen must be at end of character class or escaped
|
|
237
|
+
const refPattern = /#([a-z][a-z0-9-]*)(?=[\s`|)\]]|$)/g;
|
|
238
|
+
let match;
|
|
239
|
+
const seenRefs = new Set();
|
|
240
|
+
while ((match = refPattern.exec(file.content)) !== null) {
|
|
241
|
+
const ref = match[1];
|
|
242
|
+
if (seenRefs.has(ref))
|
|
243
|
+
continue;
|
|
244
|
+
seenRefs.add(ref);
|
|
245
|
+
// Find target file
|
|
246
|
+
const targetFile = files.find((f) => f.name === `${ref}.md` || f.frontMatter?.loadWith === `#${ref}`);
|
|
247
|
+
if (targetFile && targetFile.name !== file.name) {
|
|
248
|
+
edges.push({ from: file.name, to: targetFile.name });
|
|
249
|
+
outgoingCount.set(file.name, (outgoingCount.get(file.name) || 0) + 1);
|
|
250
|
+
incomingCount.set(targetFile.name, (incomingCount.get(targetFile.name) || 0) + 1);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
return { nodes, edges, incomingCount, outgoingCount };
|
|
255
|
+
}
|
|
256
|
+
function analyzeGraphForOrphans(graph, files, issues) {
|
|
257
|
+
// Find files with no incoming references (except README and core-rules)
|
|
258
|
+
const exemptFiles = ["README.md", "core-rules.md", "CHANGELOG.md"];
|
|
259
|
+
for (const [fileName, count] of graph.incomingCount) {
|
|
260
|
+
if (count === 0 && !exemptFiles.includes(fileName)) {
|
|
261
|
+
const file = files.find((f) => f.name === fileName);
|
|
262
|
+
if (file && file.frontMatter?.inclusion !== "always") {
|
|
263
|
+
issues.push({
|
|
264
|
+
file: `.kiro/steering/${fileName}`,
|
|
265
|
+
line: 1,
|
|
266
|
+
type: "orphaned-file",
|
|
267
|
+
message: `No incoming cross-references. Consider adding references from related guides.`,
|
|
268
|
+
severity: "info",
|
|
269
|
+
suggestion: `Add #${fileName.replace(".md", "")} reference in related steering files.`,
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
// TOKEN TREND TRACKING
|
|
276
|
+
async function loadTokenHistory() {
|
|
277
|
+
try {
|
|
278
|
+
if (fs_1.default.existsSync(CONFIG.TOKEN_HISTORY_FILE)) {
|
|
279
|
+
const content = fs_1.default.readFileSync(CONFIG.TOKEN_HISTORY_FILE, "utf-8");
|
|
280
|
+
return JSON.parse(content);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
catch {
|
|
284
|
+
// Ignore errors, return empty history
|
|
285
|
+
}
|
|
286
|
+
return [];
|
|
287
|
+
}
|
|
288
|
+
async function saveTokenHistory(budget, files) {
|
|
289
|
+
const history = await loadTokenHistory();
|
|
290
|
+
const entry = {
|
|
291
|
+
timestamp: new Date().toISOString(),
|
|
292
|
+
totalTokens: budget.total,
|
|
293
|
+
alwaysLoadedTokens: budget.alwaysLoaded,
|
|
294
|
+
fileCount: files.length,
|
|
295
|
+
files: Object.fromEntries(files.map((f) => [f.name, f.tokenEstimate])),
|
|
296
|
+
};
|
|
297
|
+
// Keep last 30 entries
|
|
298
|
+
history.push(entry);
|
|
299
|
+
if (history.length > 30) {
|
|
300
|
+
history.splice(0, history.length - 30);
|
|
301
|
+
}
|
|
302
|
+
// Ensure directory exists
|
|
303
|
+
const dir = path_1.default.dirname(CONFIG.TOKEN_HISTORY_FILE);
|
|
304
|
+
if (!fs_1.default.existsSync(dir)) {
|
|
305
|
+
fs_1.default.mkdirSync(dir, { recursive: true });
|
|
306
|
+
}
|
|
307
|
+
fs_1.default.writeFileSync(CONFIG.TOKEN_HISTORY_FILE, JSON.stringify(history, null, 2));
|
|
308
|
+
}
|
|
309
|
+
async function checkTokenTrend(budget, files, issues) {
|
|
310
|
+
const history = await loadTokenHistory();
|
|
311
|
+
if (history.length === 0) {
|
|
312
|
+
return undefined;
|
|
313
|
+
}
|
|
314
|
+
const lastEntry = history[history.length - 1];
|
|
315
|
+
const change = ((budget.total - lastEntry.totalTokens) / lastEntry.totalTokens) * 100;
|
|
316
|
+
let direction = "stable";
|
|
317
|
+
if (change > CONFIG.TOKEN_TREND_WARN_THRESHOLD) {
|
|
318
|
+
direction = "up";
|
|
319
|
+
issues.push({
|
|
320
|
+
file: ".kiro/steering/",
|
|
321
|
+
line: 1,
|
|
322
|
+
type: "token-trend",
|
|
323
|
+
message: `Token count increased by ${change.toFixed(1)}% since last check (${lastEntry.totalTokens} → ${budget.total}).`,
|
|
324
|
+
severity: "warning",
|
|
325
|
+
suggestion: "Review recent changes for unnecessary content growth.",
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
else if (change < -CONFIG.TOKEN_TREND_WARN_THRESHOLD) {
|
|
329
|
+
direction = "down";
|
|
330
|
+
}
|
|
331
|
+
// Check individual file growth
|
|
332
|
+
for (const file of files) {
|
|
333
|
+
const previousTokens = lastEntry.files[file.name];
|
|
334
|
+
if (previousTokens) {
|
|
335
|
+
const fileChange = ((file.tokenEstimate - previousTokens) / previousTokens) * 100;
|
|
336
|
+
if (fileChange > 20) {
|
|
337
|
+
issues.push({
|
|
338
|
+
file: file.path,
|
|
339
|
+
line: 1,
|
|
340
|
+
type: "token-trend",
|
|
341
|
+
message: `File grew by ${fileChange.toFixed(1)}% (${previousTokens} → ${file.tokenEstimate} tokens).`,
|
|
342
|
+
severity: "info",
|
|
343
|
+
suggestion: "Review recent additions for consolidation opportunities.",
|
|
344
|
+
});
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
return { change: Math.round(change * 10) / 10, direction };
|
|
349
|
+
}
|
|
350
|
+
// FRONT MATTER VALIDATION
|
|
351
|
+
function validateFrontMatter(file, issues) {
|
|
352
|
+
if (!file.frontMatter) {
|
|
353
|
+
issues.push({
|
|
354
|
+
file: file.path,
|
|
355
|
+
line: 1,
|
|
356
|
+
type: "missing-frontmatter",
|
|
357
|
+
message: "Missing front matter. Add inclusion, loadWith, and lastUpdated fields.",
|
|
358
|
+
severity: "error",
|
|
359
|
+
suggestion: `---\ninclusion: manual\nloadWith: "#${file.name.replace(".md", "")}"\nlastUpdated: ${new Date().toISOString().split("T")[0]}\n---`,
|
|
360
|
+
autoFixable: true,
|
|
361
|
+
});
|
|
362
|
+
return;
|
|
363
|
+
}
|
|
364
|
+
if (file.frontMatter.inclusion === "manual" && !file.frontMatter.loadWith) {
|
|
365
|
+
issues.push({
|
|
366
|
+
file: file.path,
|
|
367
|
+
line: 1,
|
|
368
|
+
type: "missing-frontmatter",
|
|
369
|
+
message: 'Manual inclusion file missing "loadWith" field.',
|
|
370
|
+
severity: "warning",
|
|
371
|
+
suggestion: `loadWith: "#${file.name.replace(".md", "")}"`,
|
|
372
|
+
autoFixable: true,
|
|
373
|
+
});
|
|
374
|
+
}
|
|
375
|
+
if (!file.frontMatter.lastUpdated) {
|
|
376
|
+
issues.push({
|
|
377
|
+
file: file.path,
|
|
378
|
+
line: 1,
|
|
379
|
+
type: "missing-frontmatter",
|
|
380
|
+
message: 'Missing "lastUpdated" field for tracking staleness.',
|
|
381
|
+
severity: "warning",
|
|
382
|
+
suggestion: `lastUpdated: ${new Date().toISOString().split("T")[0]}`,
|
|
383
|
+
autoFixable: true,
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
if (file.frontMatter.inclusion === "fileMatch" && !file.frontMatter.fileMatchPattern) {
|
|
387
|
+
issues.push({
|
|
388
|
+
file: file.path,
|
|
389
|
+
line: 1,
|
|
390
|
+
type: "missing-frontmatter",
|
|
391
|
+
message: 'fileMatch inclusion requires "fileMatchPattern" field.',
|
|
392
|
+
severity: "error",
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
function validateFrontMatterDate(file, issues) {
|
|
397
|
+
if (!file.frontMatter?.lastUpdated)
|
|
398
|
+
return;
|
|
399
|
+
const dateStr = file.frontMatter.lastUpdated;
|
|
400
|
+
// Validate date format (YYYY-MM-DD)
|
|
401
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(dateStr)) {
|
|
402
|
+
issues.push({
|
|
403
|
+
file: file.path,
|
|
404
|
+
line: 1,
|
|
405
|
+
type: "invalid-date",
|
|
406
|
+
message: `Invalid date format "${dateStr}". Use YYYY-MM-DD format.`,
|
|
407
|
+
severity: "error",
|
|
408
|
+
suggestion: `lastUpdated: ${new Date().toISOString().split("T")[0]}`,
|
|
409
|
+
autoFixable: true,
|
|
410
|
+
});
|
|
411
|
+
return;
|
|
412
|
+
}
|
|
413
|
+
// Parse and validate date
|
|
414
|
+
const date = new Date(dateStr);
|
|
415
|
+
if (isNaN(date.getTime())) {
|
|
416
|
+
issues.push({
|
|
417
|
+
file: file.path,
|
|
418
|
+
line: 1,
|
|
419
|
+
type: "invalid-date",
|
|
420
|
+
message: `Invalid date "${dateStr}". Check month/day values.`,
|
|
421
|
+
severity: "error",
|
|
422
|
+
suggestion: `lastUpdated: ${new Date().toISOString().split("T")[0]}`,
|
|
423
|
+
autoFixable: true,
|
|
424
|
+
});
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
427
|
+
// Check for future dates
|
|
428
|
+
const now = new Date();
|
|
429
|
+
now.setHours(23, 59, 59, 999); // End of today
|
|
430
|
+
if (date > now) {
|
|
431
|
+
issues.push({
|
|
432
|
+
file: file.path,
|
|
433
|
+
line: 1,
|
|
434
|
+
type: "invalid-date",
|
|
435
|
+
message: `Future date "${dateStr}" detected. lastUpdated should be today or earlier.`,
|
|
436
|
+
severity: "warning",
|
|
437
|
+
suggestion: `lastUpdated: ${new Date().toISOString().split("T")[0]}`,
|
|
438
|
+
autoFixable: true,
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
// CROSS-REFERENCE VALIDATION
|
|
443
|
+
function validateCrossReferences(file, allFiles, issues) {
|
|
444
|
+
// Skip references inside code blocks
|
|
445
|
+
const codeBlockRanges = [];
|
|
446
|
+
const codeBlockPattern = /```[\s\S]*?```/g;
|
|
447
|
+
let codeMatch;
|
|
448
|
+
while ((codeMatch = codeBlockPattern.exec(file.content)) !== null) {
|
|
449
|
+
codeBlockRanges.push({
|
|
450
|
+
start: codeMatch.index,
|
|
451
|
+
end: codeMatch.index + codeMatch[0].length,
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
const isInCodeBlock = (index) => {
|
|
455
|
+
return codeBlockRanges.some((range) => index >= range.start && index < range.end);
|
|
456
|
+
};
|
|
457
|
+
// Example patterns that should be skipped
|
|
458
|
+
const examplePatterns = ["filename", "cross-reference", "category"];
|
|
459
|
+
// Historical references (consolidated files)
|
|
460
|
+
const historicalRefs = [
|
|
461
|
+
"payment-workflows",
|
|
462
|
+
"order-lifecycle",
|
|
463
|
+
"seller-onboarding",
|
|
464
|
+
"changelog-historical",
|
|
465
|
+
"ui-styling",
|
|
466
|
+
"ui-quality-checks",
|
|
467
|
+
"ui-spacing-standards",
|
|
468
|
+
];
|
|
469
|
+
const refPattern = /#([a-z-]+)(?:\s|`|$|\))/g;
|
|
470
|
+
let match;
|
|
471
|
+
while ((match = refPattern.exec(file.content)) !== null) {
|
|
472
|
+
const ref = match[1];
|
|
473
|
+
if (isInCodeBlock(match.index))
|
|
474
|
+
continue;
|
|
475
|
+
if (["if", "else", "endif", "define", "include", "pragma"].includes(ref))
|
|
476
|
+
continue;
|
|
477
|
+
if (examplePatterns.includes(ref))
|
|
478
|
+
continue;
|
|
479
|
+
const targetFile = allFiles.find((f) => f.name === `${ref}.md` || f.frontMatter?.loadWith === `#${ref}`);
|
|
480
|
+
if (!targetFile) {
|
|
481
|
+
const lineNum = file.content.substring(0, match.index).split("\n").length;
|
|
482
|
+
const isHistorical = historicalRefs.includes(ref);
|
|
483
|
+
const isInChangelog = file.name === "CHANGELOG.md";
|
|
484
|
+
if (isHistorical && isInChangelog) {
|
|
485
|
+
// Historical references in CHANGELOG are intentional - don't report
|
|
486
|
+
continue;
|
|
487
|
+
}
|
|
488
|
+
else if (isHistorical) {
|
|
489
|
+
issues.push({
|
|
490
|
+
file: file.path,
|
|
491
|
+
line: lineNum,
|
|
492
|
+
type: "broken-reference",
|
|
493
|
+
message: `Outdated reference "#${ref}" - file was consolidated.`,
|
|
494
|
+
severity: "warning",
|
|
495
|
+
suggestion: `Update to #business-operations or #ui-guide.`,
|
|
496
|
+
autoFixable: true,
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
else {
|
|
500
|
+
issues.push({
|
|
501
|
+
file: file.path,
|
|
502
|
+
line: lineNum,
|
|
503
|
+
type: "broken-reference",
|
|
504
|
+
message: `Broken cross-reference "#${ref}" - no matching file found.`,
|
|
505
|
+
severity: "error",
|
|
506
|
+
suggestion: `Check if ${ref}.md exists or update the reference.`,
|
|
507
|
+
});
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
// BEST PRACTICES
|
|
513
|
+
function checkBestPractices(file, issues) {
|
|
514
|
+
const fileName = file.name;
|
|
515
|
+
// Skip whitelisted files for best practice suggestions
|
|
516
|
+
if (CONFIG.WHITELISTED_LARGE_FILES.includes(fileName))
|
|
517
|
+
return;
|
|
518
|
+
// Tables vs lists
|
|
519
|
+
const listItemCount = (file.content.match(/^- /gm) || []).length;
|
|
520
|
+
const tableCount = (file.content.match(/^\|/gm) || []).length;
|
|
521
|
+
if (listItemCount > 20 && tableCount < 5 && !fileName.includes("CHANGELOG")) {
|
|
522
|
+
issues.push({
|
|
523
|
+
file: file.path,
|
|
524
|
+
line: 1,
|
|
525
|
+
type: "best-practice",
|
|
526
|
+
message: `${listItemCount} list items but only ${tableCount} table rows. Consider tables.`,
|
|
527
|
+
severity: "info",
|
|
528
|
+
suggestion: "Tables are more token-efficient and scannable.",
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
// Duplicate patterns - only flag if file doesn't already cross-reference the canonical source
|
|
532
|
+
const duplicatePatterns = [
|
|
533
|
+
{
|
|
534
|
+
pattern: /pnpm preflight:[a-z:-]+/g,
|
|
535
|
+
canonical: "preflight-reference.md",
|
|
536
|
+
topic: "preflight commands",
|
|
537
|
+
minMatches: 5,
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
pattern: /PENDING.*PAID.*SHIPPED/s,
|
|
541
|
+
canonical: "business-operations.md",
|
|
542
|
+
topic: "order status",
|
|
543
|
+
minMatches: 1,
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
pattern: /PayPal.*webhook.*capture/s,
|
|
547
|
+
canonical: "business-operations.md",
|
|
548
|
+
topic: "payment flow",
|
|
549
|
+
minMatches: 1,
|
|
550
|
+
},
|
|
551
|
+
];
|
|
552
|
+
for (const { pattern, canonical, topic, minMatches } of duplicatePatterns) {
|
|
553
|
+
if (pattern.test(file.content) && !file.name.includes(canonical.replace(".md", ""))) {
|
|
554
|
+
const matches = file.content.match(pattern);
|
|
555
|
+
if (matches && matches.length > minMatches) {
|
|
556
|
+
// Skip whitelisted files
|
|
557
|
+
if (CONFIG.WHITELISTED_LARGE_FILES.includes(file.name))
|
|
558
|
+
continue;
|
|
559
|
+
// Skip if file already cross-references the canonical source
|
|
560
|
+
const canonicalRef = `#${canonical.replace(".md", "")}`;
|
|
561
|
+
if (file.content.includes(canonicalRef))
|
|
562
|
+
continue;
|
|
563
|
+
// Skip README.md for preflight commands (it's an index)
|
|
564
|
+
if (file.name === "README.md" && topic === "preflight commands")
|
|
565
|
+
continue;
|
|
566
|
+
issues.push({
|
|
567
|
+
file: file.path,
|
|
568
|
+
line: 1,
|
|
569
|
+
type: "best-practice",
|
|
570
|
+
message: `Multiple ${topic} references. Cross-reference #${canonical.replace(".md", "")} instead.`,
|
|
571
|
+
severity: "info",
|
|
572
|
+
});
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
// Vague references - skip if in quotes (examples) or in code blocks
|
|
577
|
+
const vagueRefs = file.content.match(/[Ss]ee .+ for (more )?(details|information)/g) || [];
|
|
578
|
+
for (const ref of vagueRefs) {
|
|
579
|
+
if (!ref.includes("#") && !ref.includes(".md")) {
|
|
580
|
+
const lineNum = file.content.indexOf(ref);
|
|
581
|
+
const line = file.content.substring(0, lineNum).split("\n").length;
|
|
582
|
+
// Skip if this is in quotes (it's an example of what NOT to do)
|
|
583
|
+
const contextStart = Math.max(0, lineNum - 10);
|
|
584
|
+
const contextEnd = Math.min(file.content.length, lineNum + ref.length + 10);
|
|
585
|
+
const context = file.content.substring(contextStart, contextEnd);
|
|
586
|
+
if (context.includes(`"${ref}"`) ||
|
|
587
|
+
context.includes(`'${ref}'`) ||
|
|
588
|
+
context.includes(`\`${ref}\``)) {
|
|
589
|
+
continue;
|
|
590
|
+
}
|
|
591
|
+
issues.push({
|
|
592
|
+
file: file.path,
|
|
593
|
+
line,
|
|
594
|
+
type: "best-practice",
|
|
595
|
+
message: `Vague reference "${ref}". Use specific #cross-reference.`,
|
|
596
|
+
severity: "info",
|
|
597
|
+
});
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
// BLOAT DETECTION
|
|
602
|
+
function checkAsciiArt(file, issues) {
|
|
603
|
+
for (let i = 0; i < file.lines.length; i++) {
|
|
604
|
+
const line = file.lines[i];
|
|
605
|
+
// Skip markdown table lines (start with | or contain | for cell separators)
|
|
606
|
+
// Tables use | which is valid markdown, not decorative ASCII art
|
|
607
|
+
if (/^\s*\|/.test(line) || /\|.*\|/.test(line)) {
|
|
608
|
+
continue;
|
|
609
|
+
}
|
|
610
|
+
// Detect Unicode box-drawing characters (single-line)
|
|
611
|
+
// ┌ ┐ └ ┘ ├ ┤ ┬ ┴ ┼ ─ │
|
|
612
|
+
if (/[\u250c\u2510\u2514\u2518\u251c\u2524\u252c\u2534\u253c\u2500\u2502]{10,}/.test(line)) {
|
|
613
|
+
issues.push({
|
|
614
|
+
file: file.path,
|
|
615
|
+
line: i + 1,
|
|
616
|
+
type: "ascii-art",
|
|
617
|
+
message: "ASCII art diagram detected. Use simple text flow: A → B → C",
|
|
618
|
+
severity: "warning",
|
|
619
|
+
autoFixable: true,
|
|
620
|
+
});
|
|
621
|
+
}
|
|
622
|
+
// Detect Unicode box-drawing characters (double-line)
|
|
623
|
+
// ═ ║ ╔ ╗ ╚ ╝ ╠ ╣ ╦ ╩ ╬
|
|
624
|
+
if (/[\u2550\u2551\u2554\u2557\u255a\u255d\u2560\u2563\u2566\u2569\u256c]{5,}/.test(line)) {
|
|
625
|
+
issues.push({
|
|
626
|
+
file: file.path,
|
|
627
|
+
line: i + 1,
|
|
628
|
+
type: "ascii-art",
|
|
629
|
+
message: "Decorative double-line box characters detected. Simplify to plain text or table.",
|
|
630
|
+
severity: "warning",
|
|
631
|
+
autoFixable: true,
|
|
632
|
+
});
|
|
633
|
+
}
|
|
634
|
+
// Detect ASCII art using +, -, | patterns (but not markdown tables)
|
|
635
|
+
// Pattern: lines with multiple +---+ or | | patterns that form boxes
|
|
636
|
+
if (/\+[-=]{3,}\+/.test(line) || /^\s*[-=]{10,}\s*$/.test(line)) {
|
|
637
|
+
issues.push({
|
|
638
|
+
file: file.path,
|
|
639
|
+
line: i + 1,
|
|
640
|
+
type: "ascii-art",
|
|
641
|
+
message: "ASCII box pattern detected. Use markdown tables or simple text.",
|
|
642
|
+
severity: "warning",
|
|
643
|
+
autoFixable: true,
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
function checkVerboseCode(file, issues) {
|
|
649
|
+
let inCodeBlock = false;
|
|
650
|
+
let codeBlockStart = 0;
|
|
651
|
+
let codeBlockLines = 0;
|
|
652
|
+
for (let i = 0; i < file.lines.length; i++) {
|
|
653
|
+
const line = file.lines[i];
|
|
654
|
+
if (line.startsWith("```")) {
|
|
655
|
+
if (inCodeBlock) {
|
|
656
|
+
if (codeBlockLines > CONFIG.MAX_CODE_BLOCK_LINES) {
|
|
657
|
+
issues.push({
|
|
658
|
+
file: file.path,
|
|
659
|
+
line: codeBlockStart,
|
|
660
|
+
type: "verbose-code",
|
|
661
|
+
message: `Code block is ${codeBlockLines} lines (max ${CONFIG.MAX_CODE_BLOCK_LINES}). Condense to signature + comment.`,
|
|
662
|
+
severity: "warning",
|
|
663
|
+
autoFixable: true,
|
|
664
|
+
});
|
|
665
|
+
}
|
|
666
|
+
else if (codeBlockLines > CONFIG.WARN_CODE_BLOCK_LINES) {
|
|
667
|
+
issues.push({
|
|
668
|
+
file: file.path,
|
|
669
|
+
line: codeBlockStart,
|
|
670
|
+
type: "verbose-code",
|
|
671
|
+
message: `Code block is ${codeBlockLines} lines. Consider condensing.`,
|
|
672
|
+
severity: "info",
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
inCodeBlock = false;
|
|
676
|
+
codeBlockLines = 0;
|
|
677
|
+
}
|
|
678
|
+
else {
|
|
679
|
+
inCodeBlock = true;
|
|
680
|
+
codeBlockStart = i + 1;
|
|
681
|
+
codeBlockLines = 0;
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
else if (inCodeBlock) {
|
|
685
|
+
codeBlockLines++;
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
function checkFileLength(file, issues) {
|
|
690
|
+
const isAlwaysLoaded = file.frontMatter?.inclusion === "always";
|
|
691
|
+
const isWhitelisted = CONFIG.WHITELISTED_LARGE_FILES.includes(file.name);
|
|
692
|
+
// Always-loaded files have strict limits
|
|
693
|
+
if (isAlwaysLoaded && file.lineCount > CONFIG.MAX_ALWAYS_LOADED_LINES) {
|
|
694
|
+
issues.push({
|
|
695
|
+
file: file.path,
|
|
696
|
+
line: 1,
|
|
697
|
+
type: "wrong-inclusion",
|
|
698
|
+
message: `Always-loaded file has ${file.lineCount} lines (max ${CONFIG.MAX_ALWAYS_LOADED_LINES}). Change to manual or reduce.`,
|
|
699
|
+
severity: "error",
|
|
700
|
+
});
|
|
701
|
+
}
|
|
702
|
+
// Skip whitelisted files for length warnings
|
|
703
|
+
if (isWhitelisted)
|
|
704
|
+
return;
|
|
705
|
+
if (file.lineCount > CONFIG.MAX_MANUAL_FILE_LINES) {
|
|
706
|
+
issues.push({
|
|
707
|
+
file: file.path,
|
|
708
|
+
line: 1,
|
|
709
|
+
type: "verbose-code",
|
|
710
|
+
message: `File has ${file.lineCount} lines (max ${CONFIG.MAX_MANUAL_FILE_LINES}). Consider splitting.`,
|
|
711
|
+
severity: "warning",
|
|
712
|
+
});
|
|
713
|
+
}
|
|
714
|
+
else if (file.lineCount > CONFIG.WARN_FILE_LINES) {
|
|
715
|
+
issues.push({
|
|
716
|
+
file: file.path,
|
|
717
|
+
line: 1,
|
|
718
|
+
type: "verbose-code",
|
|
719
|
+
message: `File has ${file.lineCount} lines. Monitor for growth.`,
|
|
720
|
+
severity: "info",
|
|
721
|
+
});
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
function checkDuplicateContent(file, issues) {
|
|
725
|
+
// Skip whitelisted files
|
|
726
|
+
if (CONFIG.WHITELISTED_LARGE_FILES.includes(file.name))
|
|
727
|
+
return;
|
|
728
|
+
if (file.name === "quick-decisions.md")
|
|
729
|
+
return;
|
|
730
|
+
const content = file.content.toLowerCase();
|
|
731
|
+
const contentChecks = [
|
|
732
|
+
{
|
|
733
|
+
patterns: ["pending", "paid", "shipped", "delivered", "cancelled"],
|
|
734
|
+
minMatches: 4,
|
|
735
|
+
canonical: "business-operations.md",
|
|
736
|
+
topic: "order status",
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
patterns: ["paypal", "webhook", "capture", "refund"],
|
|
740
|
+
minMatches: 3,
|
|
741
|
+
canonical: "business-operations.md",
|
|
742
|
+
topic: "payment flow",
|
|
743
|
+
},
|
|
744
|
+
{
|
|
745
|
+
patterns: ["store setup", "seller verification", "payout"],
|
|
746
|
+
minMatches: 2,
|
|
747
|
+
canonical: "business-operations.md",
|
|
748
|
+
topic: "seller onboarding",
|
|
749
|
+
},
|
|
750
|
+
];
|
|
751
|
+
for (const check of contentChecks) {
|
|
752
|
+
const matchCount = check.patterns.filter((p) => content.includes(p)).length;
|
|
753
|
+
if (matchCount >= check.minMatches && !file.name.includes(check.canonical.replace(".md", ""))) {
|
|
754
|
+
issues.push({
|
|
755
|
+
file: file.path,
|
|
756
|
+
line: 1,
|
|
757
|
+
type: "duplicate-info",
|
|
758
|
+
message: `${check.topic} content detected. Reference #${check.canonical.replace(".md", "")} instead.`,
|
|
759
|
+
severity: "warning",
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
// WORKFLOW REDUNDANCY DETECTION
|
|
765
|
+
function checkWorkflowRedundancy(file, allFiles, issues) {
|
|
766
|
+
// Only check workflow files
|
|
767
|
+
if (!file.path.includes("/workflows/"))
|
|
768
|
+
return;
|
|
769
|
+
// README.md in workflows is the index - skip it
|
|
770
|
+
if (file.name === "README.md")
|
|
771
|
+
return;
|
|
772
|
+
// Check if workflow file is too large (should be cross-references, not duplicates)
|
|
773
|
+
if (file.lineCount > CONFIG.WORKFLOW_MAX_LINES) {
|
|
774
|
+
issues.push({
|
|
775
|
+
file: file.path,
|
|
776
|
+
line: 1,
|
|
777
|
+
type: "content-redundancy",
|
|
778
|
+
message: `Workflow file has ${file.lineCount} lines (max ${CONFIG.WORKFLOW_MAX_LINES}). Should be cross-references to canonical guides.`,
|
|
779
|
+
severity: "error",
|
|
780
|
+
suggestion: "Move detailed content to canonical steering file and use cross-references.",
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
// Check for content that should be in canonical files
|
|
784
|
+
const canonicalChecks = [
|
|
785
|
+
{
|
|
786
|
+
patterns: ["pnpm db:generate", "prisma format", "migration"],
|
|
787
|
+
canonical: "database-guide.md",
|
|
788
|
+
topic: "schema updates",
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
patterns: ["pnpm test:e2e", "playwright", "regression"],
|
|
792
|
+
canonical: "e2e-testing.md",
|
|
793
|
+
topic: "E2E testing",
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
patterns: ["pnpm preflight:", "preflight:all", "preflight:commit"],
|
|
797
|
+
canonical: "preflight-reference.md",
|
|
798
|
+
topic: "preflight commands",
|
|
799
|
+
},
|
|
800
|
+
{
|
|
801
|
+
patterns: ["UnifiedSkeleton", "UnifiedStatus", "design system"],
|
|
802
|
+
canonical: "components-guide.md",
|
|
803
|
+
topic: "design system",
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
patterns: ["listingStatus", "DRAFT", "admin approval"],
|
|
807
|
+
canonical: "business-workflows.md",
|
|
808
|
+
topic: "listing workflow",
|
|
809
|
+
},
|
|
810
|
+
];
|
|
811
|
+
const content = file.content.toLowerCase();
|
|
812
|
+
for (const check of canonicalChecks) {
|
|
813
|
+
const matchCount = check.patterns.filter((p) => content.includes(p.toLowerCase())).length;
|
|
814
|
+
if (matchCount >= 2) {
|
|
815
|
+
// Check if this workflow has significant content (not just references)
|
|
816
|
+
const codeBlockCount = (file.content.match(/```/g) || []).length / 2;
|
|
817
|
+
if (codeBlockCount >= 3) {
|
|
818
|
+
issues.push({
|
|
819
|
+
file: file.path,
|
|
820
|
+
line: 1,
|
|
821
|
+
type: "content-redundancy",
|
|
822
|
+
message: `Workflow duplicates ${check.topic} content. Use cross-reference to #${check.canonical.replace(".md", "")} instead.`,
|
|
823
|
+
severity: "warning",
|
|
824
|
+
suggestion: `Replace detailed content with: See \`#${check.canonical.replace(".md", "")}\` for ${check.topic}.`,
|
|
825
|
+
});
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
}
|
|
829
|
+
// Check similarity with canonical files
|
|
830
|
+
const mainFiles = allFiles.filter((f) => !f.path.includes("/workflows/"));
|
|
831
|
+
for (const mainFile of mainFiles) {
|
|
832
|
+
const similarity = calculateSimilarity(file.content, mainFile.content);
|
|
833
|
+
if (similarity > 0.4) {
|
|
834
|
+
// 40% similarity threshold for workflows
|
|
835
|
+
issues.push({
|
|
836
|
+
file: file.path,
|
|
837
|
+
line: 1,
|
|
838
|
+
type: "content-redundancy",
|
|
839
|
+
message: `${Math.round(similarity * 100)}% similar to ${mainFile.name}. Workflow should cross-reference, not duplicate.`,
|
|
840
|
+
severity: similarity > 0.6 ? "error" : "warning",
|
|
841
|
+
relatedFile: mainFile.path,
|
|
842
|
+
similarity,
|
|
843
|
+
suggestion: `Replace with cross-reference: See \`#${mainFile.name.replace(".md", "")}\``,
|
|
844
|
+
});
|
|
845
|
+
break; // Only report highest similarity
|
|
846
|
+
}
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
// DRIFT DETECTION
|
|
850
|
+
function checkStaleness(file, issues) {
|
|
851
|
+
if (!file.frontMatter?.lastUpdated)
|
|
852
|
+
return;
|
|
853
|
+
const lastUpdated = new Date(file.frontMatter.lastUpdated);
|
|
854
|
+
const now = new Date();
|
|
855
|
+
const daysSinceUpdate = Math.floor((now.getTime() - lastUpdated.getTime()) / (1000 * 60 * 60 * 24));
|
|
856
|
+
if (daysSinceUpdate > CONFIG.STALE_THRESHOLD_DAYS) {
|
|
857
|
+
issues.push({
|
|
858
|
+
file: file.path,
|
|
859
|
+
line: 1,
|
|
860
|
+
type: "stale-content",
|
|
861
|
+
message: `Last updated ${daysSinceUpdate} days ago (${file.frontMatter.lastUpdated}). Review for accuracy.`,
|
|
862
|
+
severity: "info",
|
|
863
|
+
suggestion: `Update lastUpdated to ${new Date().toISOString().split("T")[0]} after review.`,
|
|
864
|
+
autoFixable: true,
|
|
865
|
+
});
|
|
866
|
+
}
|
|
867
|
+
}
|
|
868
|
+
function checkIndexPresence(file, readmeContent, issues) {
|
|
869
|
+
if (file.name === "README.md" || file.name === "CHANGELOG.md")
|
|
870
|
+
return;
|
|
871
|
+
const fileRef = file.name.replace(".md", "");
|
|
872
|
+
const isInIndex = readmeContent.includes(file.name) ||
|
|
873
|
+
readmeContent.includes(`#${fileRef}`) ||
|
|
874
|
+
readmeContent.includes(`\`${fileRef}\``);
|
|
875
|
+
if (!isInIndex) {
|
|
876
|
+
issues.push({
|
|
877
|
+
file: file.path,
|
|
878
|
+
line: 1,
|
|
879
|
+
type: "orphaned-file",
|
|
880
|
+
message: "File not listed in README.md index. Add to Conditional Loading table or delete.",
|
|
881
|
+
severity: "warning",
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
}
|
|
885
|
+
function validateReadmeIndex(files, readmeContent, issues) {
|
|
886
|
+
for (const required of CONFIG.REQUIRED_INDEX_ENTRIES) {
|
|
887
|
+
if (!readmeContent.includes(required)) {
|
|
888
|
+
issues.push({
|
|
889
|
+
file: ".kiro/steering/README.md",
|
|
890
|
+
line: 1,
|
|
891
|
+
type: "missing-from-index",
|
|
892
|
+
message: `Required file "${required}" not found in README index.`,
|
|
893
|
+
severity: "error",
|
|
894
|
+
});
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
const fileRefs = readmeContent.match(/`([a-z-]+\.md)`/g) || [];
|
|
898
|
+
for (const ref of fileRefs) {
|
|
899
|
+
const fileName = ref.replace(/`/g, "");
|
|
900
|
+
const exists = files.some((f) => f.name === fileName);
|
|
901
|
+
if (!exists) {
|
|
902
|
+
issues.push({
|
|
903
|
+
file: ".kiro/steering/README.md",
|
|
904
|
+
line: 1,
|
|
905
|
+
type: "broken-reference",
|
|
906
|
+
message: `README references "${fileName}" but file doesn't exist.`,
|
|
907
|
+
severity: "error",
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
function validateTokenBudget(budget, issues) {
|
|
913
|
+
if (budget.alwaysLoaded > CONFIG.MAX_ALWAYS_LOADED_TOKENS) {
|
|
914
|
+
issues.push({
|
|
915
|
+
file: ".kiro/steering/",
|
|
916
|
+
line: 1,
|
|
917
|
+
type: "token-budget",
|
|
918
|
+
message: `Always-loaded uses ~${budget.alwaysLoaded} tokens (max ${CONFIG.MAX_ALWAYS_LOADED_TOKENS}). Reduce.`,
|
|
919
|
+
severity: "error",
|
|
920
|
+
});
|
|
921
|
+
}
|
|
922
|
+
for (const [fileName, tokens] of budget.manualFiles) {
|
|
923
|
+
// Skip whitelisted files
|
|
924
|
+
if (CONFIG.WHITELISTED_LARGE_FILES.includes(fileName))
|
|
925
|
+
continue;
|
|
926
|
+
if (tokens > CONFIG.MAX_SINGLE_FILE_TOKENS) {
|
|
927
|
+
issues.push({
|
|
928
|
+
file: `.kiro/steering/${fileName}`,
|
|
929
|
+
line: 1,
|
|
930
|
+
type: "token-budget",
|
|
931
|
+
message: `File uses ~${tokens} tokens (max ${CONFIG.MAX_SINGLE_FILE_TOKENS}). Consider splitting.`,
|
|
932
|
+
severity: "warning",
|
|
933
|
+
});
|
|
934
|
+
}
|
|
935
|
+
else if (tokens > CONFIG.WARN_FILE_TOKENS) {
|
|
936
|
+
issues.push({
|
|
937
|
+
file: `.kiro/steering/${fileName}`,
|
|
938
|
+
line: 1,
|
|
939
|
+
type: "token-budget",
|
|
940
|
+
message: `File uses ~${tokens} tokens. Monitor for growth.`,
|
|
941
|
+
severity: "info",
|
|
942
|
+
});
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
}
|
|
946
|
+
// CONTENT ANALYSIS
|
|
947
|
+
function extractContentBlocks(file, contentBlocks) {
|
|
948
|
+
let inCodeBlock = false;
|
|
949
|
+
let codeBlockStart = 0;
|
|
950
|
+
let codeBlockContent = [];
|
|
951
|
+
for (let i = 0; i < file.lines.length; i++) {
|
|
952
|
+
const line = file.lines[i];
|
|
953
|
+
if (line.startsWith("```")) {
|
|
954
|
+
if (inCodeBlock) {
|
|
955
|
+
if (codeBlockContent.length > 5) {
|
|
956
|
+
contentBlocks.push({
|
|
957
|
+
file: file.path,
|
|
958
|
+
content: codeBlockContent.join("\n"),
|
|
959
|
+
startLine: codeBlockStart,
|
|
960
|
+
endLine: i,
|
|
961
|
+
type: "code",
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
inCodeBlock = false;
|
|
965
|
+
codeBlockContent = [];
|
|
966
|
+
}
|
|
967
|
+
else {
|
|
968
|
+
inCodeBlock = true;
|
|
969
|
+
codeBlockStart = i + 1;
|
|
970
|
+
codeBlockContent = [];
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
else if (inCodeBlock) {
|
|
974
|
+
codeBlockContent.push(line);
|
|
975
|
+
}
|
|
976
|
+
if (line.includes("pnpm preflight:")) {
|
|
977
|
+
const matches = line.match(/pnpm preflight:[a-z:-]+/g);
|
|
978
|
+
if (matches) {
|
|
979
|
+
matches.forEach((command) => {
|
|
980
|
+
contentBlocks.push({
|
|
981
|
+
file: file.path,
|
|
982
|
+
content: command,
|
|
983
|
+
startLine: i + 1,
|
|
984
|
+
endLine: i + 1,
|
|
985
|
+
type: "preflight-command",
|
|
986
|
+
});
|
|
987
|
+
});
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
function analyzeContentRedundancy(contentBlocks, issues) {
|
|
993
|
+
const analyzed = new Set();
|
|
994
|
+
for (let i = 0; i < contentBlocks.length; i++) {
|
|
995
|
+
const block1 = contentBlocks[i];
|
|
996
|
+
if (block1.type !== "code")
|
|
997
|
+
continue;
|
|
998
|
+
// Skip whitelisted files
|
|
999
|
+
const fileName1 = path_1.default.basename(block1.file);
|
|
1000
|
+
if (CONFIG.WHITELISTED_LARGE_FILES.includes(fileName1))
|
|
1001
|
+
continue;
|
|
1002
|
+
const key1 = `${block1.file}:${block1.startLine}`;
|
|
1003
|
+
if (analyzed.has(key1))
|
|
1004
|
+
continue;
|
|
1005
|
+
for (let j = i + 1; j < contentBlocks.length; j++) {
|
|
1006
|
+
const block2 = contentBlocks[j];
|
|
1007
|
+
if (block2.type !== "code" || block1.file === block2.file)
|
|
1008
|
+
continue;
|
|
1009
|
+
// Skip if either file is whitelisted
|
|
1010
|
+
const fileName2 = path_1.default.basename(block2.file);
|
|
1011
|
+
if (CONFIG.WHITELISTED_LARGE_FILES.includes(fileName2))
|
|
1012
|
+
continue;
|
|
1013
|
+
const key2 = `${block2.file}:${block2.startLine}`;
|
|
1014
|
+
if (analyzed.has(key2))
|
|
1015
|
+
continue;
|
|
1016
|
+
const similarity = calculateSimilarity(block1.content, block2.content);
|
|
1017
|
+
if (similarity > CONFIG.SIMILARITY_THRESHOLD) {
|
|
1018
|
+
issues.push({
|
|
1019
|
+
file: block1.file,
|
|
1020
|
+
line: block1.startLine,
|
|
1021
|
+
type: "content-redundancy",
|
|
1022
|
+
message: `${Math.round(similarity * 100)}% similar code in ${fileName2}:${block2.startLine}. Consolidate.`,
|
|
1023
|
+
severity: similarity > 0.9 ? "warning" : "info",
|
|
1024
|
+
relatedFile: block2.file,
|
|
1025
|
+
similarity,
|
|
1026
|
+
});
|
|
1027
|
+
analyzed.add(key1);
|
|
1028
|
+
analyzed.add(key2);
|
|
1029
|
+
break;
|
|
1030
|
+
}
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
function analyzePreflightRedundancy(contentBlocks, issues) {
|
|
1035
|
+
const preflightCommands = contentBlocks.filter((b) => b.type === "preflight-command");
|
|
1036
|
+
const commandCounts = new Map();
|
|
1037
|
+
for (const block of preflightCommands) {
|
|
1038
|
+
if (!commandCounts.has(block.content)) {
|
|
1039
|
+
commandCounts.set(block.content, new Set());
|
|
1040
|
+
}
|
|
1041
|
+
commandCounts.get(block.content).add(block.file);
|
|
1042
|
+
}
|
|
1043
|
+
for (const [command, files] of commandCounts) {
|
|
1044
|
+
if (files.size >= 3) {
|
|
1045
|
+
const fileNames = Array.from(files).map((f) => path_1.default.basename(f));
|
|
1046
|
+
const firstFile = Array.from(files)[0];
|
|
1047
|
+
// Skip if preflight-reference.md is one of the files (it's the canonical source)
|
|
1048
|
+
if (fileNames.includes("preflight-reference.md"))
|
|
1049
|
+
continue;
|
|
1050
|
+
// Skip if all files are whitelisted
|
|
1051
|
+
const nonWhitelisted = fileNames.filter((f) => !CONFIG.WHITELISTED_LARGE_FILES.includes(f));
|
|
1052
|
+
if (nonWhitelisted.length < 3)
|
|
1053
|
+
continue;
|
|
1054
|
+
issues.push({
|
|
1055
|
+
file: firstFile,
|
|
1056
|
+
line: 1,
|
|
1057
|
+
type: "preflight-redundancy",
|
|
1058
|
+
message: `"${command}" in ${files.size} files. Consolidate in preflight-reference.md.`,
|
|
1059
|
+
severity: files.size >= 5 ? "warning" : "info",
|
|
1060
|
+
});
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
}
|
|
1064
|
+
function calculateSimilarity(text1, text2) {
|
|
1065
|
+
const normalize = (text) => text
|
|
1066
|
+
.toLowerCase()
|
|
1067
|
+
.replace(/[^\w\s]/g, " ")
|
|
1068
|
+
.replace(/\s+/g, " ")
|
|
1069
|
+
.trim();
|
|
1070
|
+
const norm1 = normalize(text1);
|
|
1071
|
+
const norm2 = normalize(text2);
|
|
1072
|
+
if (norm1.length === 0 || norm2.length === 0)
|
|
1073
|
+
return 0;
|
|
1074
|
+
const words1 = new Set(norm1.split(" "));
|
|
1075
|
+
const words2 = new Set(norm2.split(" "));
|
|
1076
|
+
const intersection = new Set([...words1].filter((w) => words2.has(w)));
|
|
1077
|
+
const union = new Set([...words1, ...words2]);
|
|
1078
|
+
return intersection.size / union.size;
|
|
1079
|
+
}
|
|
1080
|
+
// CLI RUNNER
|
|
1081
|
+
function printGraph(graph) {
|
|
1082
|
+
console.log(`\n${console_chars_1.emoji.chart} Cross-Reference Graph:\n`);
|
|
1083
|
+
// Sort by incoming references (most referenced first)
|
|
1084
|
+
const sortedNodes = [...graph.nodes].sort((a, b) => (graph.incomingCount.get(b) || 0) - (graph.incomingCount.get(a) || 0));
|
|
1085
|
+
console.log(" Most Referenced Files:");
|
|
1086
|
+
for (const node of sortedNodes.slice(0, 5)) {
|
|
1087
|
+
const incoming = graph.incomingCount.get(node) || 0;
|
|
1088
|
+
const outgoing = graph.outgoingCount.get(node) || 0;
|
|
1089
|
+
if (incoming > 0) {
|
|
1090
|
+
console.log(` ${node}: ${incoming} incoming, ${outgoing} outgoing`);
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
// Find files with no incoming references
|
|
1094
|
+
const orphans = sortedNodes.filter((n) => (graph.incomingCount.get(n) || 0) === 0 &&
|
|
1095
|
+
!["README.md", "core-rules.md", "CHANGELOG.md"].includes(n));
|
|
1096
|
+
if (orphans.length > 0) {
|
|
1097
|
+
console.log("\n Files with No Incoming References:");
|
|
1098
|
+
for (const orphan of orphans) {
|
|
1099
|
+
console.log(` ${orphan}`);
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
console.log("");
|
|
1103
|
+
}
|
|
1104
|
+
async function main() {
|
|
1105
|
+
const args = process.argv.slice(2);
|
|
1106
|
+
const verbose = args.includes("--verbose");
|
|
1107
|
+
const warnOnly = args.includes("--warn");
|
|
1108
|
+
const showGraph = args.includes("--graph");
|
|
1109
|
+
const fix = args.includes("--fix");
|
|
1110
|
+
console.log(`\n${console_chars_1.emoji.search} Steering Quality & Bloat Prevention Check\n`);
|
|
1111
|
+
const result = await validateSteeringQuality({ showGraph, fix });
|
|
1112
|
+
const { errors, warnings, info, stats, graph } = result;
|
|
1113
|
+
// Print stats
|
|
1114
|
+
console.log(`${console_chars_1.emoji.chart} Stats:`);
|
|
1115
|
+
console.log(` Files: ${stats.totalFiles} (${stats.alwaysLoadedFiles} always-loaded)`);
|
|
1116
|
+
console.log(` Tokens: ~${stats.totalTokens} total (~${stats.alwaysLoadedTokens} always-loaded)`);
|
|
1117
|
+
// Print token trend
|
|
1118
|
+
if (stats.tokenTrend) {
|
|
1119
|
+
const arrow = stats.tokenTrend.direction === "up" ? "↑" : stats.tokenTrend.direction === "down" ? "↓" : "→";
|
|
1120
|
+
const color = stats.tokenTrend.direction === "up"
|
|
1121
|
+
? console_chars_1.emoji.warning
|
|
1122
|
+
: stats.tokenTrend.direction === "down"
|
|
1123
|
+
? console_chars_1.emoji.success
|
|
1124
|
+
: console_chars_1.emoji.info;
|
|
1125
|
+
console.log(` Trend: ${color} ${arrow} ${Math.abs(stats.tokenTrend.change)}% since last check`);
|
|
1126
|
+
}
|
|
1127
|
+
console.log("");
|
|
1128
|
+
// Print whitelisted files info
|
|
1129
|
+
if (verbose) {
|
|
1130
|
+
console.log(`${console_chars_1.emoji.info} Whitelisted Large Files (no warnings):`);
|
|
1131
|
+
for (const file of CONFIG.WHITELISTED_LARGE_FILES) {
|
|
1132
|
+
console.log(` - ${file}`);
|
|
1133
|
+
}
|
|
1134
|
+
console.log("");
|
|
1135
|
+
}
|
|
1136
|
+
// Print errors
|
|
1137
|
+
if (errors.length > 0) {
|
|
1138
|
+
console.log(`${console_chars_1.emoji.error} ERRORS (${errors.length}):`);
|
|
1139
|
+
for (const issue of errors) {
|
|
1140
|
+
console.log(` ${path_1.default.basename(issue.file)}:${issue.line} - ${issue.message}`);
|
|
1141
|
+
if (verbose && issue.suggestion) {
|
|
1142
|
+
console.log(` ${console_chars_1.emoji.info} Suggestion: ${issue.suggestion}`);
|
|
1143
|
+
}
|
|
1144
|
+
if (fix && issue.autoFixable) {
|
|
1145
|
+
console.log(` ${console_chars_1.emoji.warning} Auto-fixable with --fix`);
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
console.log("");
|
|
1149
|
+
}
|
|
1150
|
+
// Print warnings
|
|
1151
|
+
if (warnings.length > 0) {
|
|
1152
|
+
console.log(`${console_chars_1.emoji.warning} WARNINGS (${warnings.length}):`);
|
|
1153
|
+
for (const issue of warnings) {
|
|
1154
|
+
console.log(` ${path_1.default.basename(issue.file)}:${issue.line} - ${issue.message}`);
|
|
1155
|
+
if (verbose && issue.suggestion) {
|
|
1156
|
+
console.log(` ${console_chars_1.emoji.info} Suggestion: ${issue.suggestion}`);
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
console.log("");
|
|
1160
|
+
}
|
|
1161
|
+
// Print info (only in verbose mode)
|
|
1162
|
+
if (verbose && info.length > 0) {
|
|
1163
|
+
console.log(`${console_chars_1.emoji.info} INFO (${info.length}):`);
|
|
1164
|
+
for (const issue of info) {
|
|
1165
|
+
console.log(` ${path_1.default.basename(issue.file)}:${issue.line} - ${issue.message}`);
|
|
1166
|
+
}
|
|
1167
|
+
console.log("");
|
|
1168
|
+
}
|
|
1169
|
+
// Print graph
|
|
1170
|
+
if (showGraph && graph) {
|
|
1171
|
+
printGraph(graph);
|
|
1172
|
+
}
|
|
1173
|
+
// Summary
|
|
1174
|
+
if (errors.length === 0 && warnings.length === 0) {
|
|
1175
|
+
console.log(`${console_chars_1.emoji.success} All steering files pass quality checks!`);
|
|
1176
|
+
}
|
|
1177
|
+
else {
|
|
1178
|
+
console.log(`${console_chars_1.emoji.chart} Summary: ${errors.length} errors, ${warnings.length} warnings` +
|
|
1179
|
+
(verbose ? `, ${info.length} info` : ""));
|
|
1180
|
+
}
|
|
1181
|
+
// Auto-fix count
|
|
1182
|
+
const autoFixable = [...errors, ...warnings, ...info].filter((i) => i.autoFixable);
|
|
1183
|
+
if (autoFixable.length > 0 && !fix) {
|
|
1184
|
+
console.log(`\n${console_chars_1.emoji.info} ${autoFixable.length} issues are auto-fixable. Run with --fix to see suggestions.`);
|
|
1185
|
+
}
|
|
1186
|
+
// Exit code
|
|
1187
|
+
if (errors.length > 0 && !warnOnly) {
|
|
1188
|
+
process.exit(1);
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
if (require.main === module) {
|
|
1192
|
+
main().catch((error) => {
|
|
1193
|
+
console.error("Error running steering quality check:", error);
|
|
1194
|
+
process.exit(1);
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
//# sourceMappingURL=steering-bloat-prevention.js.map
|