thachvd-kit 1.0.29 → 1.0.30
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 +50 -149
- package/bin/cli.js +356 -284
- package/package.json +1 -10
- package/.agent/agents/backend-specialist.md +0 -263
- package/.agent/agents/code-archaeologist.md +0 -106
- package/.agent/agents/database-architect.md +0 -226
- package/.agent/agents/debugger.md +0 -225
- package/.agent/agents/devops-engineer.md +0 -242
- package/.agent/agents/documentation-writer.md +0 -104
- package/.agent/agents/explorer-agent.md +0 -73
- package/.agent/agents/frontend-specialist.md +0 -593
- package/.agent/agents/game-developer.md +0 -162
- package/.agent/agents/mobile-developer.md +0 -377
- package/.agent/agents/orchestrator.md +0 -416
- package/.agent/agents/penetration-tester.md +0 -188
- package/.agent/agents/performance-optimizer.md +0 -187
- package/.agent/agents/product-manager.md +0 -112
- package/.agent/agents/product-owner.md +0 -95
- package/.agent/agents/project-planner.md +0 -406
- package/.agent/agents/qa-automation-engineer.md +0 -103
- package/.agent/agents/security-auditor.md +0 -170
- package/.agent/agents/seo-specialist.md +0 -111
- package/.agent/agents/test-engineer.md +0 -158
- package/.agent/docs/architecture.md +0 -15
- package/.agent/docs/conventions.md +0 -16
- package/.agent/docs/getting-started.md +0 -95
- package/.agent/docs/project.md +0 -59
- package/.agent/docs/tooling.md +0 -136
- package/.agent/docs/workflow.md +0 -79
- package/.agent/rules/GEMINI.md +0 -62
- package/.agent/skills/api-design/SKILL.md +0 -156
- package/.agent/skills/api-patterns/SKILL.md +0 -81
- package/.agent/skills/api-patterns/api-style.md +0 -42
- package/.agent/skills/api-patterns/auth.md +0 -24
- package/.agent/skills/api-patterns/documentation.md +0 -26
- package/.agent/skills/api-patterns/graphql.md +0 -41
- package/.agent/skills/api-patterns/rate-limiting.md +0 -31
- package/.agent/skills/api-patterns/response.md +0 -37
- package/.agent/skills/api-patterns/rest.md +0 -40
- package/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
- package/.agent/skills/api-patterns/security-testing.md +0 -122
- package/.agent/skills/api-patterns/trpc.md +0 -41
- package/.agent/skills/api-patterns/versioning.md +0 -22
- package/.agent/skills/app-builder/SKILL.md +0 -75
- package/.agent/skills/app-builder/agent-coordination.md +0 -71
- package/.agent/skills/app-builder/feature-building.md +0 -53
- package/.agent/skills/app-builder/project-detection.md +0 -34
- package/.agent/skills/app-builder/scaffolding.md +0 -118
- package/.agent/skills/app-builder/tech-stack.md +0 -40
- package/.agent/skills/app-builder/templates/SKILL.md +0 -39
- package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
- package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
- package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
- package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
- package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
- package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
- package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
- package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
- package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
- package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
- package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
- package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
- package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
- package/.agent/skills/architecture/SKILL.md +0 -55
- package/.agent/skills/architecture/context-discovery.md +0 -43
- package/.agent/skills/architecture/examples.md +0 -94
- package/.agent/skills/architecture/pattern-selection.md +0 -68
- package/.agent/skills/architecture/patterns-reference.md +0 -50
- package/.agent/skills/architecture/trade-off-analysis.md +0 -77
- package/.agent/skills/bash-linux/SKILL.md +0 -199
- package/.agent/skills/behavioral-modes/SKILL.md +0 -242
- package/.agent/skills/brainstorming/SKILL.md +0 -163
- package/.agent/skills/brainstorming/dynamic-questioning.md +0 -350
- package/.agent/skills/clean-code/SKILL.md +0 -201
- package/.agent/skills/code-review-checklist/SKILL.md +0 -109
- package/.agent/skills/database-design/SKILL.md +0 -52
- package/.agent/skills/database-design/database-selection.md +0 -43
- package/.agent/skills/database-design/indexing.md +0 -39
- package/.agent/skills/database-design/migrations.md +0 -48
- package/.agent/skills/database-design/optimization.md +0 -36
- package/.agent/skills/database-design/orm-selection.md +0 -30
- package/.agent/skills/database-design/schema-design.md +0 -56
- package/.agent/skills/database-design/scripts/schema_validator.py +0 -172
- package/.agent/skills/deployment-procedures/SKILL.md +0 -241
- package/.agent/skills/desktop-design/SKILL.md +0 -25
- package/.agent/skills/dispatching-parallel-agents/SKILL.md +0 -112
- package/.agent/skills/doc.md +0 -177
- package/.agent/skills/docker-patterns/SKILL.md +0 -232
- package/.agent/skills/documentation-templates/SKILL.md +0 -194
- package/.agent/skills/executing-plans/SKILL.md +0 -61
- package/.agent/skills/finishing-a-development-branch/SKILL.md +0 -135
- package/.agent/skills/frontend-design/SKILL.md +0 -418
- package/.agent/skills/frontend-design/animation-guide.md +0 -331
- package/.agent/skills/frontend-design/color-system.md +0 -311
- package/.agent/skills/frontend-design/decision-trees.md +0 -418
- package/.agent/skills/frontend-design/motion-graphics.md +0 -306
- package/.agent/skills/frontend-design/scripts/accessibility_checker.py +0 -183
- package/.agent/skills/frontend-design/scripts/ux_audit.py +0 -722
- package/.agent/skills/frontend-design/typography-system.md +0 -345
- package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
- package/.agent/skills/frontend-design/visual-effects.md +0 -383
- package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
- package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
- package/.agent/skills/game-development/SKILL.md +0 -167
- package/.agent/skills/game-development/game-art/SKILL.md +0 -185
- package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
- package/.agent/skills/game-development/game-design/SKILL.md +0 -129
- package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
- package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
- package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
- package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
- package/.agent/skills/game-development/web-games/SKILL.md +0 -150
- package/.agent/skills/geo-fundamentals/SKILL.md +0 -156
- package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +0 -289
- package/.agent/skills/golang-patterns/SKILL.md +0 -226
- package/.agent/skills/golang-testing/SKILL.md +0 -182
- package/.agent/skills/i18n-localization/SKILL.md +0 -154
- package/.agent/skills/i18n-localization/scripts/i18n_checker.py +0 -241
- package/.agent/skills/intelligent-routing/SKILL.md +0 -335
- package/.agent/skills/laravel-patterns/SKILL.md +0 -224
- package/.agent/skills/laravel-security/SKILL.md +0 -171
- package/.agent/skills/laravel-tdd/SKILL.md +0 -149
- package/.agent/skills/lint-and-validate/SKILL.md +0 -45
- package/.agent/skills/lint-and-validate/scripts/lint_runner.py +0 -184
- package/.agent/skills/lint-and-validate/scripts/type_coverage.py +0 -173
- package/.agent/skills/mcp-builder/SKILL.md +0 -176
- package/.agent/skills/mobile-design/SKILL.md +0 -394
- package/.agent/skills/mobile-design/decision-trees.md +0 -516
- package/.agent/skills/mobile-design/mobile-backend.md +0 -491
- package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
- package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
- package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
- package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
- package/.agent/skills/mobile-design/mobile-performance.md +0 -767
- package/.agent/skills/mobile-design/mobile-testing.md +0 -356
- package/.agent/skills/mobile-design/mobile-typography.md +0 -433
- package/.agent/skills/mobile-design/platform-android.md +0 -666
- package/.agent/skills/mobile-design/platform-ios.md +0 -561
- package/.agent/skills/mobile-design/scripts/mobile_audit.py +0 -670
- package/.agent/skills/mobile-design/touch-psychology.md +0 -537
- package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
- package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
- package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
- package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
- package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
- package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
- package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
- package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
- package/.agent/skills/nextjs-react-expert/SKILL.md +0 -286
- package/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
- package/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
- package/.agent/skills/nodejs-best-practices/SKILL.md +0 -333
- package/.agent/skills/parallel-agents/SKILL.md +0 -175
- package/.agent/skills/performance-profiling/SKILL.md +0 -143
- package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
- package/.agent/skills/plan-writing/SKILL.md +0 -152
- package/.agent/skills/powershell-windows/SKILL.md +0 -167
- package/.agent/skills/project-onboarding/SKILL.md +0 -42
- package/.agent/skills/python-patterns/SKILL.md +0 -441
- package/.agent/skills/react-frontend/SKILL.md +0 -25
- package/.agent/skills/receiving-code-review/SKILL.md +0 -120
- package/.agent/skills/red-team-tactics/SKILL.md +0 -199
- package/.agent/skills/requesting-code-review/SKILL.md +0 -67
- package/.agent/skills/rust-pro/SKILL.md +0 -176
- package/.agent/skills/seo-fundamentals/SKILL.md +0 -129
- package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
- package/.agent/skills/server-management/SKILL.md +0 -161
- package/.agent/skills/subagent-driven-development/SKILL.md +0 -76
- package/.agent/skills/systematic-debugging/SKILL.md +0 -109
- package/.agent/skills/tailwind-patterns/SKILL.md +0 -269
- package/.agent/skills/tdd-workflow/SKILL.md +0 -149
- package/.agent/skills/testing-patterns/SKILL.md +0 -178
- package/.agent/skills/testing-patterns/scripts/test_runner.py +0 -219
- package/.agent/skills/using-git-worktrees/SKILL.md +0 -121
- package/.agent/skills/verification-before-completion/SKILL.md +0 -99
- package/.agent/skills/vulnerability-scanner/SKILL.md +0 -276
- package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
- package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
- package/.agent/skills/web-design-guidelines/SKILL.md +0 -57
- package/.agent/skills/webapp-testing/SKILL.md +0 -187
- package/.agent/skills/webapp-testing/scripts/playwright_runner.py +0 -173
- package/.agent/skills/writing-skills/SKILL.md +0 -170
- package/.agent/workflows/brainstorm.md +0 -113
- package/.agent/workflows/create.md +0 -59
- package/.agent/workflows/debug.md +0 -103
- package/.agent/workflows/deploy.md +0 -176
- package/.agent/workflows/enhance.md +0 -63
- package/.agent/workflows/forge-debug.md +0 -12
- package/.agent/workflows/forge-fast.md +0 -22
- package/.agent/workflows/forge-release.md +0 -12
- package/.agent/workflows/forge-research.md +0 -24
- package/.agent/workflows/forge-review.md +0 -12
- package/.agent/workflows/forge-task.md +0 -37
- package/.agent/workflows/orchestrate.md +0 -237
- package/.agent/workflows/plan.md +0 -89
- package/.agent/workflows/preview.md +0 -81
- package/.agent/workflows/release.md +0 -42
- package/.agent/workflows/review.md +0 -125
- package/.agent/workflows/simple.md +0 -42
- package/.agent/workflows/spec.md +0 -140
- package/.agent/workflows/status.md +0 -86
- package/.agent/workflows/task.md +0 -59
- package/.agent/workflows/test.md +0 -144
- package/.agent/workflows/ui-ux-pro-max.md +0 -296
- package/agents/backend-specialist.md +0 -263
- package/agents/code-archaeologist.md +0 -106
- package/agents/database-architect.md +0 -226
- package/agents/debugger.md +0 -225
- package/agents/devops-engineer.md +0 -242
- package/agents/documentation-writer.md +0 -104
- package/agents/explorer-agent.md +0 -73
- package/agents/frontend-specialist.md +0 -593
- package/agents/game-developer.md +0 -162
- package/agents/mobile-developer.md +0 -377
- package/agents/orchestrator.md +0 -416
- package/agents/penetration-tester.md +0 -188
- package/agents/performance-optimizer.md +0 -187
- package/agents/product-manager.md +0 -112
- package/agents/product-owner.md +0 -95
- package/agents/project-planner.md +0 -406
- package/agents/qa-automation-engineer.md +0 -103
- package/agents/security-auditor.md +0 -170
- package/agents/seo-specialist.md +0 -111
- package/agents/test-engineer.md +0 -158
- package/commands/forge-debug.md +0 -12
- package/commands/forge-fast.md +0 -22
- package/commands/forge-release.md +0 -12
- package/commands/forge-research.md +0 -24
- package/commands/forge-review.md +0 -12
- package/commands/forge-task.md +0 -37
- package/kit/PROMPT_RECIPE.md +0 -30
- package/kit/README.md +0 -30
- package/prompts/debug.md +0 -11
- package/prompts/release.md +0 -11
- package/prompts/simple.md +0 -11
- package/prompts/spec.md +0 -11
- package/prompts/task.md +0 -12
- package/rules/GEMINI.md +0 -45
- package/scripts/auto_preview.py +0 -148
- package/scripts/checklist.py +0 -217
- package/scripts/session_manager.py +0 -120
- package/scripts/verify_all.py +0 -327
- package/skills/api-design/SKILL.md +0 -156
- package/skills/api-patterns/SKILL.md +0 -81
- package/skills/api-patterns/api-style.md +0 -42
- package/skills/api-patterns/auth.md +0 -24
- package/skills/api-patterns/documentation.md +0 -26
- package/skills/api-patterns/graphql.md +0 -41
- package/skills/api-patterns/rate-limiting.md +0 -31
- package/skills/api-patterns/response.md +0 -37
- package/skills/api-patterns/rest.md +0 -40
- package/skills/api-patterns/scripts/api_validator.py +0 -211
- package/skills/api-patterns/security-testing.md +0 -122
- package/skills/api-patterns/trpc.md +0 -41
- package/skills/api-patterns/versioning.md +0 -22
- package/skills/app-builder/SKILL.md +0 -75
- package/skills/app-builder/agent-coordination.md +0 -71
- package/skills/app-builder/feature-building.md +0 -53
- package/skills/app-builder/project-detection.md +0 -34
- package/skills/app-builder/scaffolding.md +0 -118
- package/skills/app-builder/tech-stack.md +0 -40
- package/skills/app-builder/templates/SKILL.md +0 -39
- package/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
- package/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
- package/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
- package/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
- package/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
- package/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
- package/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
- package/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
- package/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
- package/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
- package/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
- package/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
- package/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
- package/skills/architecture/SKILL.md +0 -55
- package/skills/architecture/context-discovery.md +0 -43
- package/skills/architecture/examples.md +0 -94
- package/skills/architecture/pattern-selection.md +0 -68
- package/skills/architecture/patterns-reference.md +0 -50
- package/skills/architecture/trade-off-analysis.md +0 -77
- package/skills/bash-linux/SKILL.md +0 -199
- package/skills/behavioral-modes/SKILL.md +0 -242
- package/skills/brainstorming/SKILL.md +0 -163
- package/skills/brainstorming/dynamic-questioning.md +0 -350
- package/skills/clean-code/SKILL.md +0 -201
- package/skills/code-review-checklist/SKILL.md +0 -142
- package/skills/database-design/SKILL.md +0 -52
- package/skills/database-design/database-selection.md +0 -43
- package/skills/database-design/indexing.md +0 -39
- package/skills/database-design/migrations.md +0 -48
- package/skills/database-design/optimization.md +0 -36
- package/skills/database-design/orm-selection.md +0 -30
- package/skills/database-design/schema-design.md +0 -56
- package/skills/database-design/scripts/schema_validator.py +0 -172
- package/skills/deployment-procedures/SKILL.md +0 -241
- package/skills/desktop-design/SKILL.md +0 -25
- package/skills/dispatching-parallel-agents/SKILL.md +0 -112
- package/skills/doc.md +0 -177
- package/skills/docker-patterns/SKILL.md +0 -232
- package/skills/documentation-templates/SKILL.md +0 -194
- package/skills/executing-plans/SKILL.md +0 -61
- package/skills/finishing-a-development-branch/SKILL.md +0 -135
- package/skills/frontend-design/SKILL.md +0 -418
- package/skills/frontend-design/animation-guide.md +0 -331
- package/skills/frontend-design/color-system.md +0 -311
- package/skills/frontend-design/decision-trees.md +0 -418
- package/skills/frontend-design/motion-graphics.md +0 -306
- package/skills/frontend-design/scripts/accessibility_checker.py +0 -183
- package/skills/frontend-design/scripts/ux_audit.py +0 -722
- package/skills/frontend-design/typography-system.md +0 -345
- package/skills/frontend-design/ux-psychology.md +0 -1116
- package/skills/frontend-design/visual-effects.md +0 -383
- package/skills/game-development/2d-games/SKILL.md +0 -119
- package/skills/game-development/3d-games/SKILL.md +0 -135
- package/skills/game-development/SKILL.md +0 -167
- package/skills/game-development/game-art/SKILL.md +0 -185
- package/skills/game-development/game-audio/SKILL.md +0 -190
- package/skills/game-development/game-design/SKILL.md +0 -129
- package/skills/game-development/mobile-games/SKILL.md +0 -108
- package/skills/game-development/multiplayer/SKILL.md +0 -132
- package/skills/game-development/pc-games/SKILL.md +0 -144
- package/skills/game-development/vr-ar/SKILL.md +0 -123
- package/skills/game-development/web-games/SKILL.md +0 -150
- package/skills/geo-fundamentals/SKILL.md +0 -156
- package/skills/geo-fundamentals/scripts/geo_checker.py +0 -289
- package/skills/golang-patterns/SKILL.md +0 -226
- package/skills/golang-testing/SKILL.md +0 -182
- package/skills/i18n-localization/SKILL.md +0 -154
- package/skills/i18n-localization/scripts/i18n_checker.py +0 -241
- package/skills/intelligent-routing/SKILL.md +0 -335
- package/skills/laravel-patterns/SKILL.md +0 -224
- package/skills/laravel-security/SKILL.md +0 -171
- package/skills/laravel-tdd/SKILL.md +0 -149
- package/skills/lint-and-validate/SKILL.md +0 -45
- package/skills/lint-and-validate/scripts/lint_runner.py +0 -184
- package/skills/lint-and-validate/scripts/type_coverage.py +0 -173
- package/skills/mcp-builder/SKILL.md +0 -176
- package/skills/mobile-design/SKILL.md +0 -394
- package/skills/mobile-design/decision-trees.md +0 -516
- package/skills/mobile-design/mobile-backend.md +0 -491
- package/skills/mobile-design/mobile-color-system.md +0 -420
- package/skills/mobile-design/mobile-debugging.md +0 -122
- package/skills/mobile-design/mobile-design-thinking.md +0 -357
- package/skills/mobile-design/mobile-navigation.md +0 -458
- package/skills/mobile-design/mobile-performance.md +0 -767
- package/skills/mobile-design/mobile-testing.md +0 -356
- package/skills/mobile-design/mobile-typography.md +0 -433
- package/skills/mobile-design/platform-android.md +0 -666
- package/skills/mobile-design/platform-ios.md +0 -561
- package/skills/mobile-design/scripts/mobile_audit.py +0 -670
- package/skills/mobile-design/touch-psychology.md +0 -537
- package/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
- package/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
- package/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
- package/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
- package/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
- package/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
- package/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
- package/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
- package/skills/nextjs-react-expert/SKILL.md +0 -286
- package/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
- package/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
- package/skills/nodejs-best-practices/SKILL.md +0 -333
- package/skills/parallel-agents/SKILL.md +0 -175
- package/skills/performance-profiling/SKILL.md +0 -143
- package/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
- package/skills/plan-writing/SKILL.md +0 -152
- package/skills/powershell-windows/SKILL.md +0 -167
- package/skills/project-onboarding/SKILL.md +0 -42
- package/skills/python-patterns/SKILL.md +0 -441
- package/skills/react-frontend/SKILL.md +0 -25
- package/skills/receiving-code-review/SKILL.md +0 -120
- package/skills/red-team-tactics/SKILL.md +0 -199
- package/skills/requesting-code-review/SKILL.md +0 -67
- package/skills/rust-pro/SKILL.md +0 -176
- package/skills/seo-fundamentals/SKILL.md +0 -129
- package/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
- package/skills/server-management/SKILL.md +0 -161
- package/skills/subagent-driven-development/SKILL.md +0 -76
- package/skills/systematic-debugging/SKILL.md +0 -109
- package/skills/tailwind-patterns/SKILL.md +0 -269
- package/skills/tdd-workflow/SKILL.md +0 -173
- package/skills/testing-patterns/SKILL.md +0 -178
- package/skills/testing-patterns/scripts/test_runner.py +0 -219
- package/skills/using-git-worktrees/SKILL.md +0 -121
- package/skills/verification-before-completion/SKILL.md +0 -113
- package/skills/vulnerability-scanner/SKILL.md +0 -276
- package/skills/vulnerability-scanner/checklists.md +0 -121
- package/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
- package/skills/web-design-guidelines/SKILL.md +0 -57
- package/skills/webapp-testing/SKILL.md +0 -187
- package/skills/webapp-testing/scripts/playwright_runner.py +0 -173
- package/skills/writing-skills/SKILL.md +0 -170
- package/workflows/brainstorm.md +0 -113
- package/workflows/create.md +0 -59
- package/workflows/debug.md +0 -103
- package/workflows/deploy.md +0 -176
- package/workflows/enhance.md +0 -63
- package/workflows/orchestrate.md +0 -237
- package/workflows/plan.md +0 -89
- package/workflows/preview.md +0 -81
- package/workflows/release.md +0 -42
- package/workflows/simple.md +0 -42
- package/workflows/status.md +0 -86
- package/workflows/task.md +0 -59
- package/workflows/test.md +0 -144
- package/workflows/ui-ux-pro-max.md +0 -296
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: laravel-security
|
|
3
|
-
description: Laravel security best practices. Use when adding authentication or authorization, handling user input and file uploads, building new API endpoints, managing secrets, or hardening production deployments.
|
|
4
|
-
allowed-tools: Read, Edit, Grep
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Laravel Security Best Practices
|
|
8
|
-
|
|
9
|
-
## Core Security Settings
|
|
10
|
-
|
|
11
|
-
- `APP_DEBUG=false` in production
|
|
12
|
-
- `APP_KEY` must be set and rotated on compromise
|
|
13
|
-
- `SESSION_SECURE_COOKIE=true` and `SESSION_SAME_SITE=lax` (or `strict` for sensitive apps)
|
|
14
|
-
- Configure trusted proxies for correct HTTPS detection
|
|
15
|
-
|
|
16
|
-
## Authentication and Tokens (Sanctum)
|
|
17
|
-
|
|
18
|
-
```php
|
|
19
|
-
Route::middleware('auth:sanctum')->get('/me', function (Request $request) {
|
|
20
|
-
return $request->user();
|
|
21
|
-
});
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
- Use short-lived tokens with refresh flows for sensitive data
|
|
25
|
-
- Revoke tokens on logout and compromised accounts
|
|
26
|
-
|
|
27
|
-
## Password Security
|
|
28
|
-
|
|
29
|
-
```php
|
|
30
|
-
$validated = $request->validate([
|
|
31
|
-
'password' => ['required', 'string', Password::min(12)->letters()->mixedCase()->numbers()->symbols()],
|
|
32
|
-
]);
|
|
33
|
-
|
|
34
|
-
$user->update(['password' => Hash::make($validated['password'])]);
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Authorization: Policies and Gates
|
|
38
|
-
|
|
39
|
-
```php
|
|
40
|
-
// In controller
|
|
41
|
-
$this->authorize('update', $project);
|
|
42
|
-
|
|
43
|
-
// Route-level enforcement
|
|
44
|
-
Route::put('/projects/{project}', [ProjectController::class, 'update'])
|
|
45
|
-
->middleware(['auth:sanctum', 'can:update,project']);
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
## Rate Limiting
|
|
49
|
-
|
|
50
|
-
```php
|
|
51
|
-
RateLimiter::for('login', function (Request $request) {
|
|
52
|
-
return [
|
|
53
|
-
Limit::perMinute(5)->by($request->ip()),
|
|
54
|
-
Limit::perMinute(5)->by(strtolower((string) $request->input('email'))),
|
|
55
|
-
];
|
|
56
|
-
});
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## File Upload Safety
|
|
60
|
-
|
|
61
|
-
```php
|
|
62
|
-
final class UploadInvoiceRequest extends FormRequest
|
|
63
|
-
{
|
|
64
|
-
public function authorize(): bool
|
|
65
|
-
{
|
|
66
|
-
return (bool) $this->user()?->can('upload-invoice');
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
public function rules(): array
|
|
70
|
-
{
|
|
71
|
-
return [
|
|
72
|
-
'invoice' => ['required', 'file', 'mimes:pdf', 'max:5120'],
|
|
73
|
-
];
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// Store outside public path
|
|
78
|
-
$path = $request->file('invoice')->store('invoices', 'local');
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Mass Assignment Protection
|
|
82
|
-
|
|
83
|
-
- Use `$fillable` or `$guarded` — avoid `Model::unguard()`
|
|
84
|
-
- Prefer DTOs or explicit attribute mapping
|
|
85
|
-
|
|
86
|
-
## SQL Injection Prevention
|
|
87
|
-
|
|
88
|
-
- Use Eloquent or query builder parameter binding
|
|
89
|
-
- Avoid raw SQL unless strictly necessary
|
|
90
|
-
|
|
91
|
-
```php
|
|
92
|
-
DB::select('select * from users where email = ?', [$email]);
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
## XSS Prevention
|
|
96
|
-
|
|
97
|
-
- Blade escapes output by default (`{{ }}`)
|
|
98
|
-
- Use `{!! !!}` only for trusted, sanitized HTML
|
|
99
|
-
|
|
100
|
-
## CSRF Protection
|
|
101
|
-
|
|
102
|
-
- Keep `VerifyCsrfToken` middleware enabled
|
|
103
|
-
- Include `@csrf` in forms
|
|
104
|
-
- For SPA + Sanctum: configure stateful domains
|
|
105
|
-
|
|
106
|
-
```php
|
|
107
|
-
// config/sanctum.php
|
|
108
|
-
'stateful' => explode(',', env('SANCTUM_STATEFUL_DOMAINS', 'localhost')),
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
## Encrypted Attributes
|
|
112
|
-
|
|
113
|
-
```php
|
|
114
|
-
protected $casts = [
|
|
115
|
-
'api_token' => 'encrypted',
|
|
116
|
-
];
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Security Headers Middleware
|
|
120
|
-
|
|
121
|
-
```php
|
|
122
|
-
final class SecurityHeaders
|
|
123
|
-
{
|
|
124
|
-
public function handle(Request $request, \Closure $next): Response
|
|
125
|
-
{
|
|
126
|
-
$response = $next($request);
|
|
127
|
-
$response->headers->add([
|
|
128
|
-
'Content-Security-Policy' => "default-src 'self'",
|
|
129
|
-
'Strict-Transport-Security' => 'max-age=31536000',
|
|
130
|
-
'X-Frame-Options' => 'DENY',
|
|
131
|
-
'X-Content-Type-Options' => 'nosniff',
|
|
132
|
-
'Referrer-Policy' => 'no-referrer',
|
|
133
|
-
]);
|
|
134
|
-
return $response;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## CORS Configuration
|
|
140
|
-
|
|
141
|
-
```php
|
|
142
|
-
// config/cors.php
|
|
143
|
-
return [
|
|
144
|
-
'paths' => ['api/*', 'sanctum/csrf-cookie'],
|
|
145
|
-
'allowed_origins' => ['https://app.example.com'], // Never wildcard for auth routes
|
|
146
|
-
'supports_credentials' => true,
|
|
147
|
-
];
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
## Logging and PII
|
|
151
|
-
|
|
152
|
-
```php
|
|
153
|
-
// Never log passwords, tokens, card data
|
|
154
|
-
Log::info('User updated profile', [
|
|
155
|
-
'user_id' => $user->id,
|
|
156
|
-
'email' => '[REDACTED]',
|
|
157
|
-
]);
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
## Signed URLs
|
|
161
|
-
|
|
162
|
-
```php
|
|
163
|
-
$url = URL::temporarySignedRoute('downloads.invoice', now()->addMinutes(15), ['invoice' => $invoice->id]);
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
## Secrets Management
|
|
167
|
-
|
|
168
|
-
- Never commit secrets to source control
|
|
169
|
-
- Use environment variables and secret managers (AWS SSM, Vault)
|
|
170
|
-
- Rotate keys after exposure and invalidate sessions
|
|
171
|
-
- Run `composer audit` regularly for dependency vulnerabilities
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: laravel-tdd
|
|
3
|
-
description: Laravel TDD workflow with PHPUnit and Pest. Use when writing tests for Laravel applications, implementing red-green-refactor cycle, testing HTTP endpoints, auth, queues, events, or setting up test configuration.
|
|
4
|
-
allowed-tools: Bash, Read, Edit, Write
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Laravel TDD Workflow
|
|
8
|
-
|
|
9
|
-
## Red-Green-Refactor Cycle
|
|
10
|
-
|
|
11
|
-
1. Write a failing test (RED)
|
|
12
|
-
2. Implement the minimal change to pass (GREEN)
|
|
13
|
-
3. Refactor while keeping tests green (REFACTOR)
|
|
14
|
-
|
|
15
|
-
## Test Layers
|
|
16
|
-
|
|
17
|
-
| Layer | Use For |
|
|
18
|
-
|-------|---------|
|
|
19
|
-
| **Unit** | Pure PHP classes, value objects, services |
|
|
20
|
-
| **Feature** | HTTP endpoints, auth, validation, policies |
|
|
21
|
-
| **Integration** | DB + queue + external boundaries together |
|
|
22
|
-
|
|
23
|
-
## Database Strategy
|
|
24
|
-
|
|
25
|
-
- **`RefreshDatabase`** — Default for tests touching the DB. Runs migrations once per run, wraps each test in a transaction.
|
|
26
|
-
- **`DatabaseTransactions`** — When schema is already migrated, only need per-test rollback.
|
|
27
|
-
- **`DatabaseMigrations`** — When you need full migrate/fresh for every test.
|
|
28
|
-
|
|
29
|
-
## Testing Framework
|
|
30
|
-
|
|
31
|
-
- Default to **Pest** for new tests when available
|
|
32
|
-
- Use **PHPUnit** if project has standardized on it
|
|
33
|
-
|
|
34
|
-
## PHPUnit Example
|
|
35
|
-
|
|
36
|
-
```php
|
|
37
|
-
use App\Models\User;
|
|
38
|
-
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
39
|
-
use Tests\TestCase;
|
|
40
|
-
|
|
41
|
-
final class ProjectControllerTest extends TestCase
|
|
42
|
-
{
|
|
43
|
-
use RefreshDatabase;
|
|
44
|
-
|
|
45
|
-
public function test_owner_can_create_project(): void
|
|
46
|
-
{
|
|
47
|
-
$user = User::factory()->create();
|
|
48
|
-
|
|
49
|
-
$response = $this->actingAs($user)->postJson('/api/projects', [
|
|
50
|
-
'name' => 'New Project',
|
|
51
|
-
]);
|
|
52
|
-
|
|
53
|
-
$response->assertCreated();
|
|
54
|
-
$this->assertDatabaseHas('projects', ['name' => 'New Project']);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Pest Example
|
|
60
|
-
|
|
61
|
-
```php
|
|
62
|
-
use App\Models\User;
|
|
63
|
-
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
64
|
-
|
|
65
|
-
uses(RefreshDatabase::class);
|
|
66
|
-
|
|
67
|
-
test('owner can create project', function () {
|
|
68
|
-
$user = User::factory()->create();
|
|
69
|
-
|
|
70
|
-
$response = actingAs($user)->postJson('/api/projects', [
|
|
71
|
-
'name' => 'New Project',
|
|
72
|
-
]);
|
|
73
|
-
|
|
74
|
-
$response->assertCreated();
|
|
75
|
-
assertDatabaseHas('projects', ['name' => 'New Project']);
|
|
76
|
-
});
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
## Factories and States
|
|
80
|
-
|
|
81
|
-
```php
|
|
82
|
-
$user = User::factory()->state(['role' => 'admin'])->create();
|
|
83
|
-
|
|
84
|
-
// Factory sequences
|
|
85
|
-
User::factory()->count(3)->for($project)->create();
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## Fakes for Side Effects
|
|
89
|
-
|
|
90
|
-
```php
|
|
91
|
-
Queue::fake();
|
|
92
|
-
dispatch(new SendOrderConfirmation($order->id));
|
|
93
|
-
Queue::assertPushed(SendOrderConfirmation::class);
|
|
94
|
-
|
|
95
|
-
Mail::fake();
|
|
96
|
-
Notification::fake();
|
|
97
|
-
Event::fake();
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Auth Testing (Sanctum)
|
|
101
|
-
|
|
102
|
-
```php
|
|
103
|
-
use Laravel\Sanctum\Sanctum;
|
|
104
|
-
|
|
105
|
-
Sanctum::actingAs($user);
|
|
106
|
-
|
|
107
|
-
$response = $this->getJson('/api/projects');
|
|
108
|
-
$response->assertOk();
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
## HTTP and External Services
|
|
112
|
-
|
|
113
|
-
```php
|
|
114
|
-
// Isolate external APIs
|
|
115
|
-
Http::fake(['api.stripe.com/*' => Http::response(['id' => 'evt_123'], 200)]);
|
|
116
|
-
Http::assertSent(fn ($request) => $request->url() === 'https://api.stripe.com/...');
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
## Authorization Tests
|
|
120
|
-
|
|
121
|
-
```php
|
|
122
|
-
$this->assertTrue(Gate::forUser($user)->allows('update', $project));
|
|
123
|
-
$this->assertFalse(Gate::forUser($otherUser)->allows('update', $project));
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
## Coverage Targets
|
|
127
|
-
|
|
128
|
-
- Enforce 80%+ coverage for unit + feature tests
|
|
129
|
-
- Use `pcov` or `XDEBUG_MODE=coverage` in CI
|
|
130
|
-
|
|
131
|
-
## Test Commands
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
php artisan test
|
|
135
|
-
php artisan test --parallel # Parallel execution
|
|
136
|
-
vendor/bin/pest
|
|
137
|
-
vendor/bin/phpunit
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
## Test Configuration (phpunit.xml)
|
|
141
|
-
|
|
142
|
-
```xml
|
|
143
|
-
<php>
|
|
144
|
-
<env name="DB_CONNECTION" value="sqlite"/>
|
|
145
|
-
<env name="DB_DATABASE" value=":memory:"/>
|
|
146
|
-
<env name="CACHE_DRIVER" value="array"/>
|
|
147
|
-
<env name="QUEUE_CONNECTION" value="sync"/>
|
|
148
|
-
</php>
|
|
149
|
-
```
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lint-and-validate
|
|
3
|
-
description: Automatic quality control, linting, and static analysis procedures. Use after every code modification to ensure syntax correctness and project standards. Triggers onKeywords: lint, format, check, validate, types, static analysis.
|
|
4
|
-
allowed-tools: Read, Glob, Grep, Bash
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Lint and Validate Skill
|
|
8
|
-
|
|
9
|
-
> **MANDATORY:** Run appropriate validation tools after EVERY code change. Do not finish a task until the code is error-free.
|
|
10
|
-
|
|
11
|
-
### Procedures by Ecosystem
|
|
12
|
-
|
|
13
|
-
#### Node.js / TypeScript
|
|
14
|
-
1. **Lint/Fix:** `npm run lint` or `npx eslint "path" --fix`
|
|
15
|
-
2. **Types:** `npx tsc --noEmit`
|
|
16
|
-
3. **Security:** `npm audit --audit-level=high`
|
|
17
|
-
|
|
18
|
-
#### Python
|
|
19
|
-
1. **Linter (Ruff):** `ruff check "path" --fix` (Fast & Modern)
|
|
20
|
-
2. **Security (Bandit):** `bandit -r "path" -ll`
|
|
21
|
-
3. **Types (MyPy):** `mypy "path"`
|
|
22
|
-
|
|
23
|
-
## The Quality Loop
|
|
24
|
-
1. **Write/Edit Code**
|
|
25
|
-
2. **Run Audit:** `npm run lint && npx tsc --noEmit`
|
|
26
|
-
3. **Analyze Report:** Check the "FINAL AUDIT REPORT" section.
|
|
27
|
-
4. **Fix & Repeat:** Submitting code with "FINAL AUDIT" failures is NOT allowed.
|
|
28
|
-
|
|
29
|
-
## Error Handling
|
|
30
|
-
- If `lint` fails: Fix the style or syntax issues immediately.
|
|
31
|
-
- If `tsc` fails: Correct type mismatches before proceeding.
|
|
32
|
-
- If no tool is configured: Check the project root for `.eslintrc`, `tsconfig.json`, `pyproject.toml` and suggest creating one.
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
**Strict Rule:** No code should be committed or reported as "done" without passing these checks.
|
|
36
|
-
|
|
37
|
-
---
|
|
38
|
-
|
|
39
|
-
## Scripts
|
|
40
|
-
|
|
41
|
-
| Script | Purpose | Command |
|
|
42
|
-
|--------|---------|---------|
|
|
43
|
-
| `scripts/lint_runner.py` | Unified lint check | `python scripts/lint_runner.py <project_path>` |
|
|
44
|
-
| `scripts/type_coverage.py` | Type coverage analysis | `python scripts/type_coverage.py <project_path>` |
|
|
45
|
-
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
Lint Runner - Unified linting and type checking
|
|
4
|
-
Runs appropriate linters based on project type.
|
|
5
|
-
|
|
6
|
-
Usage:
|
|
7
|
-
python lint_runner.py <project_path>
|
|
8
|
-
|
|
9
|
-
Supports:
|
|
10
|
-
- Node.js: npm run lint, npx tsc --noEmit
|
|
11
|
-
- Python: ruff check, mypy
|
|
12
|
-
"""
|
|
13
|
-
|
|
14
|
-
import subprocess
|
|
15
|
-
import sys
|
|
16
|
-
import json
|
|
17
|
-
import platform
|
|
18
|
-
import shutil
|
|
19
|
-
from pathlib import Path
|
|
20
|
-
from datetime import datetime
|
|
21
|
-
|
|
22
|
-
# Fix Windows console encoding
|
|
23
|
-
try:
|
|
24
|
-
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
|
|
25
|
-
except:
|
|
26
|
-
pass
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
def detect_project_type(project_path: Path) -> dict:
|
|
30
|
-
"""Detect project type and available linters."""
|
|
31
|
-
result = {
|
|
32
|
-
"type": "unknown",
|
|
33
|
-
"linters": []
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
# Node.js project
|
|
37
|
-
package_json = project_path / "package.json"
|
|
38
|
-
if package_json.exists():
|
|
39
|
-
result["type"] = "node"
|
|
40
|
-
try:
|
|
41
|
-
pkg = json.loads(package_json.read_text(encoding='utf-8'))
|
|
42
|
-
scripts = pkg.get("scripts", {})
|
|
43
|
-
deps = {**pkg.get("dependencies", {}), **pkg.get("devDependencies", {})}
|
|
44
|
-
|
|
45
|
-
# Check for lint script
|
|
46
|
-
if "lint" in scripts:
|
|
47
|
-
result["linters"].append({"name": "npm lint", "cmd": ["npm", "run", "lint"]})
|
|
48
|
-
elif "eslint" in deps:
|
|
49
|
-
result["linters"].append({"name": "eslint", "cmd": ["npx", "eslint", "."]})
|
|
50
|
-
|
|
51
|
-
# Check for TypeScript
|
|
52
|
-
if "typescript" in deps or (project_path / "tsconfig.json").exists():
|
|
53
|
-
result["linters"].append({"name": "tsc", "cmd": ["npx", "tsc", "--noEmit"]})
|
|
54
|
-
|
|
55
|
-
except:
|
|
56
|
-
pass
|
|
57
|
-
|
|
58
|
-
# Python project
|
|
59
|
-
if (project_path / "pyproject.toml").exists() or (project_path / "requirements.txt").exists():
|
|
60
|
-
result["type"] = "python"
|
|
61
|
-
|
|
62
|
-
# Check for ruff
|
|
63
|
-
result["linters"].append({"name": "ruff", "cmd": ["ruff", "check", "."]})
|
|
64
|
-
|
|
65
|
-
# Check for mypy
|
|
66
|
-
if (project_path / "mypy.ini").exists() or (project_path / "pyproject.toml").exists():
|
|
67
|
-
result["linters"].append({"name": "mypy", "cmd": ["mypy", "."]})
|
|
68
|
-
|
|
69
|
-
return result
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
def run_linter(linter: dict, cwd: Path) -> dict:
|
|
73
|
-
"""Run a single linter and return results."""
|
|
74
|
-
result = {
|
|
75
|
-
"name": linter["name"],
|
|
76
|
-
"passed": False,
|
|
77
|
-
"output": "",
|
|
78
|
-
"error": ""
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
try:
|
|
82
|
-
cmd = linter["cmd"]
|
|
83
|
-
|
|
84
|
-
# Windows compatibility for npm/npx
|
|
85
|
-
if platform.system() == "Windows":
|
|
86
|
-
if cmd[0] in ["npm", "npx"]:
|
|
87
|
-
# Force .cmd extension on Windows
|
|
88
|
-
if not cmd[0].lower().endswith(".cmd"):
|
|
89
|
-
cmd[0] = f"{cmd[0]}.cmd"
|
|
90
|
-
|
|
91
|
-
proc = subprocess.run(
|
|
92
|
-
cmd,
|
|
93
|
-
cwd=str(cwd),
|
|
94
|
-
capture_output=True,
|
|
95
|
-
text=True,
|
|
96
|
-
encoding='utf-8',
|
|
97
|
-
errors='replace',
|
|
98
|
-
timeout=120,
|
|
99
|
-
shell=platform.system() == "Windows" # Shell=True often helps with path resolution on Windows
|
|
100
|
-
)
|
|
101
|
-
|
|
102
|
-
result["output"] = proc.stdout[:2000] if proc.stdout else ""
|
|
103
|
-
result["error"] = proc.stderr[:500] if proc.stderr else ""
|
|
104
|
-
result["passed"] = proc.returncode == 0
|
|
105
|
-
|
|
106
|
-
except FileNotFoundError:
|
|
107
|
-
result["error"] = f"Command not found: {linter['cmd'][0]}"
|
|
108
|
-
except subprocess.TimeoutExpired:
|
|
109
|
-
result["error"] = "Timeout after 120s"
|
|
110
|
-
except Exception as e:
|
|
111
|
-
result["error"] = str(e)
|
|
112
|
-
|
|
113
|
-
return result
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
def main():
|
|
117
|
-
project_path = Path(sys.argv[1] if len(sys.argv) > 1 else ".").resolve()
|
|
118
|
-
|
|
119
|
-
print(f"\n{'='*60}")
|
|
120
|
-
print(f"[LINT RUNNER] Unified Linting")
|
|
121
|
-
print(f"{'='*60}")
|
|
122
|
-
print(f"Project: {project_path}")
|
|
123
|
-
print(f"Time: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
|
|
124
|
-
|
|
125
|
-
# Detect project type
|
|
126
|
-
project_info = detect_project_type(project_path)
|
|
127
|
-
print(f"Type: {project_info['type']}")
|
|
128
|
-
print(f"Linters: {len(project_info['linters'])}")
|
|
129
|
-
print("-"*60)
|
|
130
|
-
|
|
131
|
-
if not project_info["linters"]:
|
|
132
|
-
print("No linters found for this project type.")
|
|
133
|
-
output = {
|
|
134
|
-
"script": "lint_runner",
|
|
135
|
-
"project": str(project_path),
|
|
136
|
-
"type": project_info["type"],
|
|
137
|
-
"checks": [],
|
|
138
|
-
"passed": True,
|
|
139
|
-
"message": "No linters configured"
|
|
140
|
-
}
|
|
141
|
-
print(json.dumps(output, indent=2))
|
|
142
|
-
sys.exit(0)
|
|
143
|
-
|
|
144
|
-
# Run each linter
|
|
145
|
-
results = []
|
|
146
|
-
all_passed = True
|
|
147
|
-
|
|
148
|
-
for linter in project_info["linters"]:
|
|
149
|
-
print(f"\nRunning: {linter['name']}...")
|
|
150
|
-
result = run_linter(linter, project_path)
|
|
151
|
-
results.append(result)
|
|
152
|
-
|
|
153
|
-
if result["passed"]:
|
|
154
|
-
print(f" [PASS] {linter['name']}")
|
|
155
|
-
else:
|
|
156
|
-
print(f" [FAIL] {linter['name']}")
|
|
157
|
-
if result["error"]:
|
|
158
|
-
print(f" Error: {result['error'][:200]}")
|
|
159
|
-
all_passed = False
|
|
160
|
-
|
|
161
|
-
# Summary
|
|
162
|
-
print("\n" + "="*60)
|
|
163
|
-
print("SUMMARY")
|
|
164
|
-
print("="*60)
|
|
165
|
-
|
|
166
|
-
for r in results:
|
|
167
|
-
icon = "[PASS]" if r["passed"] else "[FAIL]"
|
|
168
|
-
print(f"{icon} {r['name']}")
|
|
169
|
-
|
|
170
|
-
output = {
|
|
171
|
-
"script": "lint_runner",
|
|
172
|
-
"project": str(project_path),
|
|
173
|
-
"type": project_info["type"],
|
|
174
|
-
"checks": results,
|
|
175
|
-
"passed": all_passed
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
print("\n" + json.dumps(output, indent=2))
|
|
179
|
-
|
|
180
|
-
sys.exit(0 if all_passed else 1)
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
if __name__ == "__main__":
|
|
184
|
-
main()
|