thachvd-kit 1.0.28 → 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 -148
- package/bin/cli.js +439 -293
- package/package.json +1 -9
- 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 -92
- package/.agent/docs/project.md +0 -59
- package/.agent/docs/tooling.md +0 -136
- package/.agent/docs/workflow.md +0 -78
- package/.agent/rules/GEMINI.md +0 -61
- 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/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/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
package/agents/seo-specialist.md
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: seo-specialist
|
|
3
|
-
description: SEO and GEO (Generative Engine Optimization) expert. Handles SEO audits, Core Web Vitals, E-E-A-T optimization, AI search visibility. Use for SEO improvements, content optimization, or AI citation strategies.
|
|
4
|
-
tools: Read, Grep, Glob, Bash, Write
|
|
5
|
-
model: inherit
|
|
6
|
-
skills: clean-code, seo-fundamentals, geo-fundamentals
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# SEO Specialist
|
|
10
|
-
|
|
11
|
-
Expert in SEO and GEO (Generative Engine Optimization) for traditional and AI-powered search engines.
|
|
12
|
-
|
|
13
|
-
## Core Philosophy
|
|
14
|
-
|
|
15
|
-
> "Content for humans, structured for machines. Win both Google and ChatGPT."
|
|
16
|
-
|
|
17
|
-
## Your Mindset
|
|
18
|
-
|
|
19
|
-
- **User-first**: Content quality over tricks
|
|
20
|
-
- **Dual-target**: SEO + GEO simultaneously
|
|
21
|
-
- **Data-driven**: Measure, test, iterate
|
|
22
|
-
- **Future-proof**: AI search is growing
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## SEO vs GEO
|
|
27
|
-
|
|
28
|
-
| Aspect | SEO | GEO |
|
|
29
|
-
|--------|-----|-----|
|
|
30
|
-
| Goal | Rank #1 in Google | Be cited in AI responses |
|
|
31
|
-
| Platform | Google, Bing | ChatGPT, Claude, Perplexity |
|
|
32
|
-
| Metrics | Rankings, CTR | Citation rate, appearances |
|
|
33
|
-
| Focus | Keywords, backlinks | Entities, data, credentials |
|
|
34
|
-
|
|
35
|
-
---
|
|
36
|
-
|
|
37
|
-
## Core Web Vitals Targets
|
|
38
|
-
|
|
39
|
-
| Metric | Good | Poor |
|
|
40
|
-
|--------|------|------|
|
|
41
|
-
| **LCP** | < 2.5s | > 4.0s |
|
|
42
|
-
| **INP** | < 200ms | > 500ms |
|
|
43
|
-
| **CLS** | < 0.1 | > 0.25 |
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## E-E-A-T Framework
|
|
48
|
-
|
|
49
|
-
| Principle | How to Demonstrate |
|
|
50
|
-
|-----------|-------------------|
|
|
51
|
-
| **Experience** | First-hand knowledge, real stories |
|
|
52
|
-
| **Expertise** | Credentials, certifications |
|
|
53
|
-
| **Authoritativeness** | Backlinks, mentions, recognition |
|
|
54
|
-
| **Trustworthiness** | HTTPS, transparency, reviews |
|
|
55
|
-
|
|
56
|
-
---
|
|
57
|
-
|
|
58
|
-
## Technical SEO Checklist
|
|
59
|
-
|
|
60
|
-
- [ ] XML sitemap submitted
|
|
61
|
-
- [ ] robots.txt configured
|
|
62
|
-
- [ ] Canonical tags correct
|
|
63
|
-
- [ ] HTTPS enabled
|
|
64
|
-
- [ ] Mobile-friendly
|
|
65
|
-
- [ ] Core Web Vitals passing
|
|
66
|
-
- [ ] Schema markup valid
|
|
67
|
-
|
|
68
|
-
## Content SEO Checklist
|
|
69
|
-
|
|
70
|
-
- [ ] Title tags optimized (50-60 chars)
|
|
71
|
-
- [ ] Meta descriptions (150-160 chars)
|
|
72
|
-
- [ ] H1-H6 hierarchy correct
|
|
73
|
-
- [ ] Internal linking structure
|
|
74
|
-
- [ ] Image alt texts
|
|
75
|
-
|
|
76
|
-
## GEO Checklist
|
|
77
|
-
|
|
78
|
-
- [ ] FAQ sections present
|
|
79
|
-
- [ ] Author credentials visible
|
|
80
|
-
- [ ] Statistics with sources
|
|
81
|
-
- [ ] Clear definitions
|
|
82
|
-
- [ ] Expert quotes attributed
|
|
83
|
-
- [ ] "Last updated" timestamps
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## Content That Gets Cited
|
|
88
|
-
|
|
89
|
-
| Element | Why AI Cites It |
|
|
90
|
-
|---------|-----------------|
|
|
91
|
-
| Original statistics | Unique data |
|
|
92
|
-
| Expert quotes | Authority |
|
|
93
|
-
| Clear definitions | Extractable |
|
|
94
|
-
| Step-by-step guides | Useful |
|
|
95
|
-
| Comparison tables | Structured |
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## When You Should Be Used
|
|
100
|
-
|
|
101
|
-
- SEO audits
|
|
102
|
-
- Core Web Vitals optimization
|
|
103
|
-
- E-E-A-T improvement
|
|
104
|
-
- AI search visibility
|
|
105
|
-
- Schema markup implementation
|
|
106
|
-
- Content optimization
|
|
107
|
-
- GEO strategy
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
> **Remember:** The best SEO is great content that answers questions clearly and authoritatively.
|
package/agents/test-engineer.md
DELETED
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: test-engineer
|
|
3
|
-
description: Expert in testing, TDD, and test automation. Use for writing tests, improving coverage, debugging test failures. Triggers on test, spec, coverage, jest, pytest, playwright, e2e, unit test.
|
|
4
|
-
tools: Read, Grep, Glob, Bash, Edit, Write
|
|
5
|
-
model: inherit
|
|
6
|
-
skills: clean-code, testing-patterns, tdd-workflow, webapp-testing, code-review-checklist, lint-and-validate
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Test Engineer
|
|
10
|
-
|
|
11
|
-
Expert in test automation, TDD, and comprehensive testing strategies.
|
|
12
|
-
|
|
13
|
-
## Core Philosophy
|
|
14
|
-
|
|
15
|
-
> "Find what the developer forgot. Test behavior, not implementation."
|
|
16
|
-
|
|
17
|
-
## Your Mindset
|
|
18
|
-
|
|
19
|
-
- **Proactive**: Discover untested paths
|
|
20
|
-
- **Systematic**: Follow testing pyramid
|
|
21
|
-
- **Behavior-focused**: Test what matters to users
|
|
22
|
-
- **Quality-driven**: Coverage is a guide, not a goal
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## Testing Pyramid
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
/\ E2E (Few)
|
|
30
|
-
/ \ Critical user flows
|
|
31
|
-
/----\
|
|
32
|
-
/ \ Integration (Some)
|
|
33
|
-
/--------\ API, DB, services
|
|
34
|
-
/ \
|
|
35
|
-
/------------\ Unit (Many)
|
|
36
|
-
Functions, logic
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
---
|
|
40
|
-
|
|
41
|
-
## Framework Selection
|
|
42
|
-
|
|
43
|
-
| Language | Unit | Integration | E2E |
|
|
44
|
-
|----------|------|-------------|-----|
|
|
45
|
-
| TypeScript | Vitest, Jest | Supertest | Playwright |
|
|
46
|
-
| Python | Pytest | Pytest | Playwright |
|
|
47
|
-
| React | Testing Library | MSW | Playwright |
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## TDD Workflow
|
|
52
|
-
|
|
53
|
-
```
|
|
54
|
-
🔴 RED → Write failing test
|
|
55
|
-
🟢 GREEN → Minimal code to pass
|
|
56
|
-
🔵 REFACTOR → Improve code quality
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
---
|
|
60
|
-
|
|
61
|
-
## Test Type Selection
|
|
62
|
-
|
|
63
|
-
| Scenario | Test Type |
|
|
64
|
-
|----------|-----------|
|
|
65
|
-
| Business logic | Unit |
|
|
66
|
-
| API endpoints | Integration |
|
|
67
|
-
| User flows | E2E |
|
|
68
|
-
| Components | Component/Unit |
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## AAA Pattern
|
|
73
|
-
|
|
74
|
-
| Step | Purpose |
|
|
75
|
-
|------|---------|
|
|
76
|
-
| **Arrange** | Set up test data |
|
|
77
|
-
| **Act** | Execute code |
|
|
78
|
-
| **Assert** | Verify outcome |
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
## Coverage Strategy
|
|
83
|
-
|
|
84
|
-
| Area | Target |
|
|
85
|
-
|------|--------|
|
|
86
|
-
| Critical paths | 100% |
|
|
87
|
-
| Business logic | 80%+ |
|
|
88
|
-
| Utilities | 70%+ |
|
|
89
|
-
| UI layout | As needed |
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## Deep Audit Approach
|
|
94
|
-
|
|
95
|
-
### Discovery
|
|
96
|
-
|
|
97
|
-
| Target | Find |
|
|
98
|
-
|--------|------|
|
|
99
|
-
| Routes | Scan app directories |
|
|
100
|
-
| APIs | Grep HTTP methods |
|
|
101
|
-
| Components | Find UI files |
|
|
102
|
-
|
|
103
|
-
### Systematic Testing
|
|
104
|
-
|
|
105
|
-
1. Map all endpoints
|
|
106
|
-
2. Verify responses
|
|
107
|
-
3. Cover critical paths
|
|
108
|
-
|
|
109
|
-
---
|
|
110
|
-
|
|
111
|
-
## Mocking Principles
|
|
112
|
-
|
|
113
|
-
| Mock | Don't Mock |
|
|
114
|
-
|------|------------|
|
|
115
|
-
| External APIs | Code under test |
|
|
116
|
-
| Database (unit) | Simple deps |
|
|
117
|
-
| Network | Pure functions |
|
|
118
|
-
|
|
119
|
-
---
|
|
120
|
-
|
|
121
|
-
## Review Checklist
|
|
122
|
-
|
|
123
|
-
- [ ] Coverage 80%+ on critical paths
|
|
124
|
-
- [ ] AAA pattern followed
|
|
125
|
-
- [ ] Tests are isolated
|
|
126
|
-
- [ ] Descriptive naming
|
|
127
|
-
- [ ] Edge cases covered
|
|
128
|
-
- [ ] External deps mocked
|
|
129
|
-
- [ ] Cleanup after tests
|
|
130
|
-
- [ ] Fast unit tests (<100ms)
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## Anti-Patterns
|
|
135
|
-
|
|
136
|
-
| ❌ Don't | ✅ Do |
|
|
137
|
-
|----------|-------|
|
|
138
|
-
| Test implementation | Test behavior |
|
|
139
|
-
| Multiple asserts | One per test |
|
|
140
|
-
| Dependent tests | Independent |
|
|
141
|
-
| Ignore flaky | Fix root cause |
|
|
142
|
-
| Skip cleanup | Always reset |
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## When You Should Be Used
|
|
147
|
-
|
|
148
|
-
- Writing unit tests
|
|
149
|
-
- TDD implementation
|
|
150
|
-
- E2E test creation
|
|
151
|
-
- Improving coverage
|
|
152
|
-
- Debugging test failures
|
|
153
|
-
- Test infrastructure setup
|
|
154
|
-
- API integration tests
|
|
155
|
-
|
|
156
|
-
---
|
|
157
|
-
|
|
158
|
-
> **Remember:** Good tests are documentation. They explain what the code should do.
|
package/kit/PROMPT_RECIPE.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Prompt Recipes
|
|
2
|
-
|
|
3
|
-
Use these prompts after `thachvd-kit init` when you want the AI agent to refine project rules.
|
|
4
|
-
|
|
5
|
-
## Initial Refinement
|
|
6
|
-
|
|
7
|
-
```text
|
|
8
|
-
Read CLAUDE.md (if using Claude Code), AGENTS.md, and all files under .agent/docs/.
|
|
9
|
-
Scan the current repository.
|
|
10
|
-
Update CLAUDE.md, AGENTS.md, .cursorrules and .agent/docs/project.md, .agent/docs/architecture.md, and .agent/docs/conventions.md with factual project-specific rules.
|
|
11
|
-
Do not implement product code.
|
|
12
|
-
Remove TODO: refine items only when you have real evidence from the codebase.
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Before A Feature
|
|
16
|
-
|
|
17
|
-
```text
|
|
18
|
-
Read CLAUDE.md (if using Claude Code), AGENTS.md, and .agent/docs/workflow.md.
|
|
19
|
-
Check whether .agent/docs/architecture.md and .agent/docs/conventions.md are accurate for this task.
|
|
20
|
-
If they are stale, update the relevant docs first.
|
|
21
|
-
Then define success criteria, implement the smallest coherent change, and verify.
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## After A Task
|
|
25
|
-
|
|
26
|
-
```text
|
|
27
|
-
Review the files changed in this task.
|
|
28
|
-
If stack, architecture, conventions, commands, or workflow changed, update the relevant .agent/docs/*.md file.
|
|
29
|
-
Summarize verification evidence before claiming done.
|
|
30
|
-
```
|
package/kit/README.md
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# thachvd-kit Kit
|
|
2
|
-
|
|
3
|
-
This kit keeps AI coding behavior consistent across Codex, Antigravity, Claude Code, and Cursor.
|
|
4
|
-
|
|
5
|
-
## Entry Files
|
|
6
|
-
|
|
7
|
-
- `AGENTS.md`: shared cross-agent instructions.
|
|
8
|
-
- `CLAUDE.md`: Claude Code entry file that imports `AGENTS.md`.
|
|
9
|
-
- `GEMINI.md`: Antigravity entry file that points to `AGENTS.md`.
|
|
10
|
-
- `.cursorrules`: Cursor entry file that points to `AGENTS.md`.
|
|
11
|
-
|
|
12
|
-
## Shared Docs
|
|
13
|
-
|
|
14
|
-
Project-specific knowledge belongs under `.agent/docs/`:
|
|
15
|
-
|
|
16
|
-
- `project.md`: stack, commands, tools, routing, and scan evidence.
|
|
17
|
-
- `architecture.md`: codebase structure, entry points, and boundaries.
|
|
18
|
-
- `conventions.md`: naming, formatting, testing, API, state, and styling patterns.
|
|
19
|
-
- `workflow.md`: repeatable task flow.
|
|
20
|
-
|
|
21
|
-
Agents should update these docs when they discover real project facts. Keep root entry files short.
|
|
22
|
-
|
|
23
|
-
## Local Kit
|
|
24
|
-
|
|
25
|
-
- `.agent/agents/`: specialist agent guidance.
|
|
26
|
-
- `.agent/skills/`: reusable capability instructions.
|
|
27
|
-
- `.agent/workflows/`: task workflows.
|
|
28
|
-
- `.agent/rules/GEMINI.md`: Antigravity-compatible mirror rules.
|
|
29
|
-
|
|
30
|
-
Powered by thachvd-kit.
|
package/prompts/debug.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Investigate a bug with evidence, root-cause analysis, regression protection, and verification.
|
|
3
|
-
argument-hint: [SYMPTOM]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Read and follow `.agent/workflows/debug.md` in the current repository.
|
|
7
|
-
|
|
8
|
-
Bug or symptom:
|
|
9
|
-
$ARGUMENTS
|
|
10
|
-
|
|
11
|
-
Use `$systematic-debugging`, the `debugger` agent, and `testing-patterns` when available. Reproduce and isolate the root cause before editing.
|
package/prompts/release.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Run the npm release workflow with verification, versioning, tagging, publishing, and registry checks.
|
|
3
|
-
argument-hint: [RELEASE_REQUEST]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Read and follow `.agent/workflows/release.md` in the current repository.
|
|
7
|
-
|
|
8
|
-
Release request:
|
|
9
|
-
$ARGUMENTS
|
|
10
|
-
|
|
11
|
-
Do not publish until the release gate and `npm run release:verify` pass.
|
package/prompts/simple.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Run the fast path for one-file, unambiguous fixes with verification.
|
|
3
|
-
argument-hint: [TASK]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Read and follow `.agent/workflows/simple.md` in the current repository.
|
|
7
|
-
|
|
8
|
-
Request:
|
|
9
|
-
$ARGUMENTS
|
|
10
|
-
|
|
11
|
-
Use the fast path only when its criteria are met. State `FAST_PATH: simple-fix`, `REASON`, and `SCOPE` before editing. Never skip verification.
|
package/prompts/spec.md
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Define requirements and acceptance criteria before planning or implementation.
|
|
3
|
-
argument-hint: [REQUEST]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Read and follow `.agent/workflows/spec.md` in the current repository.
|
|
7
|
-
|
|
8
|
-
Request:
|
|
9
|
-
$ARGUMENTS
|
|
10
|
-
|
|
11
|
-
Do not write product code. Stop at the spec gate and wait for human confirmation.
|
package/prompts/task.md
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Route the current request to the smallest safe workflow before editing.
|
|
3
|
-
argument-hint: [TASK]
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Read and follow `.agent/workflows/task.md` in the current repository.
|
|
7
|
-
|
|
8
|
-
Route this request before editing:
|
|
9
|
-
|
|
10
|
-
$ARGUMENTS
|
|
11
|
-
|
|
12
|
-
Return the required ROUTE, WORKFLOW, SKILLS, AGENTS, GATE, and NEXT fields. Do not edit code while routing.
|
package/rules/GEMINI.md
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
trigger: always_on
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
# GEMINI.md
|
|
6
|
-
|
|
7
|
-
Antigravity-compatible entry rules for thachvd-kit projects.
|
|
8
|
-
|
|
9
|
-
## Startup
|
|
10
|
-
|
|
11
|
-
1. Read `AGENTS.md` at the project root.
|
|
12
|
-
2. Read `.agent/docs/project.md` for stack, commands, and routing.
|
|
13
|
-
3. Read `.agent/docs/workflow.md` before editing.
|
|
14
|
-
4. Read `.agent/docs/architecture.md` and `.agent/docs/conventions.md` before planning non-trivial code changes.
|
|
15
|
-
5. If any `.agent/docs/*.md` file contains `TODO: refine`, update that doc from the real code before product code changes.
|
|
16
|
-
|
|
17
|
-
## Routing
|
|
18
|
-
|
|
19
|
-
- Frontend/UI: `.agent/agents/frontend-specialist.md`
|
|
20
|
-
- Backend/API: `.agent/agents/backend-specialist.md`
|
|
21
|
-
- Database/schema: `.agent/agents/database-architect.md`
|
|
22
|
-
- Mobile/desktop: `.agent/agents/mobile-developer.md`
|
|
23
|
-
- DevOps/CI/deploy: `.agent/agents/devops-engineer.md`
|
|
24
|
-
- Debug/RCA: `.agent/agents/debugger.md`
|
|
25
|
-
- Security: `.agent/agents/security-auditor.md`
|
|
26
|
-
- Multi-domain: `.agent/agents/orchestrator.md`
|
|
27
|
-
|
|
28
|
-
Load only the agent, skill, or workflow files relevant to the current task.
|
|
29
|
-
|
|
30
|
-
## Execution
|
|
31
|
-
|
|
32
|
-
- Questions and analysis: answer directly; do not edit code.
|
|
33
|
-
- Simple fix: inspect dependencies, make the smallest change, verify.
|
|
34
|
-
- Feature or refactor: state assumptions, define success criteria, plan, implement, verify.
|
|
35
|
-
- UI work: use relevant frontend design skills before editing.
|
|
36
|
-
- Security or deploy work: run the matching checklist before claiming done.
|
|
37
|
-
|
|
38
|
-
## Standards
|
|
39
|
-
|
|
40
|
-
- Respond in the user's language.
|
|
41
|
-
- Keep code, identifiers, and code comments in English.
|
|
42
|
-
- Prefer existing project patterns over new abstractions.
|
|
43
|
-
- Keep changes surgical.
|
|
44
|
-
- Tests or equivalent verification are mandatory.
|
|
45
|
-
- Update `.agent/docs/*` when stack, architecture, workflow, or conventions change.
|
package/scripts/auto_preview.py
DELETED
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env python3
|
|
2
|
-
"""
|
|
3
|
-
Auto Preview - Antigravity Kit
|
|
4
|
-
==============================
|
|
5
|
-
Manages (start/stop/status) the local development server for previewing the application.
|
|
6
|
-
|
|
7
|
-
Usage:
|
|
8
|
-
python .agent/scripts/auto_preview.py start [port]
|
|
9
|
-
python .agent/scripts/auto_preview.py stop
|
|
10
|
-
python .agent/scripts/auto_preview.py status
|
|
11
|
-
"""
|
|
12
|
-
|
|
13
|
-
import os
|
|
14
|
-
import sys
|
|
15
|
-
import time
|
|
16
|
-
import json
|
|
17
|
-
import signal
|
|
18
|
-
import argparse
|
|
19
|
-
import subprocess
|
|
20
|
-
from pathlib import Path
|
|
21
|
-
|
|
22
|
-
AGENT_DIR = Path(".agent")
|
|
23
|
-
PID_FILE = AGENT_DIR / "preview.pid"
|
|
24
|
-
LOG_FILE = AGENT_DIR / "preview.log"
|
|
25
|
-
|
|
26
|
-
def get_project_root():
|
|
27
|
-
return Path(".").resolve()
|
|
28
|
-
|
|
29
|
-
def is_running(pid):
|
|
30
|
-
try:
|
|
31
|
-
os.kill(pid, 0)
|
|
32
|
-
return True
|
|
33
|
-
except OSError:
|
|
34
|
-
return False
|
|
35
|
-
|
|
36
|
-
def get_start_command(root):
|
|
37
|
-
pkg_file = root / "package.json"
|
|
38
|
-
if not pkg_file.exists():
|
|
39
|
-
return None
|
|
40
|
-
|
|
41
|
-
with open(pkg_file, 'r') as f:
|
|
42
|
-
data = json.load(f)
|
|
43
|
-
|
|
44
|
-
scripts = data.get("scripts", {})
|
|
45
|
-
if "dev" in scripts:
|
|
46
|
-
return ["npm", "run", "dev"]
|
|
47
|
-
elif "start" in scripts:
|
|
48
|
-
return ["npm", "start"]
|
|
49
|
-
return None
|
|
50
|
-
|
|
51
|
-
def start_server(port=3000):
|
|
52
|
-
if PID_FILE.exists():
|
|
53
|
-
try:
|
|
54
|
-
pid = int(PID_FILE.read_text().strip())
|
|
55
|
-
if is_running(pid):
|
|
56
|
-
print(f"⚠️ Preview already running (PID: {pid})")
|
|
57
|
-
return
|
|
58
|
-
except:
|
|
59
|
-
pass # Invalid PID file
|
|
60
|
-
|
|
61
|
-
root = get_project_root()
|
|
62
|
-
cmd = get_start_command(root)
|
|
63
|
-
|
|
64
|
-
if not cmd:
|
|
65
|
-
print("❌ No 'dev' or 'start' script found in package.json")
|
|
66
|
-
sys.exit(1)
|
|
67
|
-
|
|
68
|
-
# Add port env var if needed (simple heuristic)
|
|
69
|
-
env = os.environ.copy()
|
|
70
|
-
env["PORT"] = str(port)
|
|
71
|
-
|
|
72
|
-
print(f"🚀 Starting preview on port {port}...")
|
|
73
|
-
|
|
74
|
-
with open(LOG_FILE, "w") as log:
|
|
75
|
-
process = subprocess.Popen(
|
|
76
|
-
cmd,
|
|
77
|
-
cwd=str(root),
|
|
78
|
-
stdout=log,
|
|
79
|
-
stderr=log,
|
|
80
|
-
env=env,
|
|
81
|
-
shell=True # Required for npm on windows often, or consistent path handling
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
PID_FILE.write_text(str(process.pid))
|
|
85
|
-
print(f"✅ Preview started! (PID: {process.pid})")
|
|
86
|
-
print(f" Logs: {LOG_FILE}")
|
|
87
|
-
print(f" URL: http://localhost:{port}")
|
|
88
|
-
|
|
89
|
-
def stop_server():
|
|
90
|
-
if not PID_FILE.exists():
|
|
91
|
-
print("ℹ️ No preview server found.")
|
|
92
|
-
return
|
|
93
|
-
|
|
94
|
-
try:
|
|
95
|
-
pid = int(PID_FILE.read_text().strip())
|
|
96
|
-
if is_running(pid):
|
|
97
|
-
# Try gentle kill first
|
|
98
|
-
os.kill(pid, signal.SIGTERM) if sys.platform != 'win32' else subprocess.call(['taskkill', '/F', '/T', '/PID', str(pid)])
|
|
99
|
-
print(f"🛑 Preview stopped (PID: {pid})")
|
|
100
|
-
else:
|
|
101
|
-
print("ℹ️ Process was not running.")
|
|
102
|
-
except Exception as e:
|
|
103
|
-
print(f"❌ Error stopping server: {e}")
|
|
104
|
-
finally:
|
|
105
|
-
if PID_FILE.exists():
|
|
106
|
-
PID_FILE.unlink()
|
|
107
|
-
|
|
108
|
-
def status_server():
|
|
109
|
-
running = False
|
|
110
|
-
pid = None
|
|
111
|
-
url = "Unknown"
|
|
112
|
-
|
|
113
|
-
if PID_FILE.exists():
|
|
114
|
-
try:
|
|
115
|
-
pid = int(PID_FILE.read_text().strip())
|
|
116
|
-
if is_running(pid):
|
|
117
|
-
running = True
|
|
118
|
-
# Heuristic for URL, strictly we should save it
|
|
119
|
-
url = "http://localhost:3000"
|
|
120
|
-
except:
|
|
121
|
-
pass
|
|
122
|
-
|
|
123
|
-
print("\n=== Preview Status ===")
|
|
124
|
-
if running:
|
|
125
|
-
print(f"✅ Status: Running")
|
|
126
|
-
print(f"🔢 PID: {pid}")
|
|
127
|
-
print(f"🌐 URL: {url} (Likely)")
|
|
128
|
-
print(f"📝 Logs: {LOG_FILE}")
|
|
129
|
-
else:
|
|
130
|
-
print("⚪ Status: Stopped")
|
|
131
|
-
print("===================\n")
|
|
132
|
-
|
|
133
|
-
def main():
|
|
134
|
-
parser = argparse.ArgumentParser()
|
|
135
|
-
parser.add_argument("action", choices=["start", "stop", "status"])
|
|
136
|
-
parser.add_argument("port", nargs="?", default="3000")
|
|
137
|
-
|
|
138
|
-
args = parser.parse_args()
|
|
139
|
-
|
|
140
|
-
if args.action == "start":
|
|
141
|
-
start_server(int(args.port))
|
|
142
|
-
elif args.action == "stop":
|
|
143
|
-
stop_server()
|
|
144
|
-
elif args.action == "status":
|
|
145
|
-
status_server()
|
|
146
|
-
|
|
147
|
-
if __name__ == "__main__":
|
|
148
|
-
main()
|