flyee 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/bin/install.js +357 -0
- package/bridge/bridge.py +1780 -0
- package/bridge/local_tracker.py +722 -0
- package/core/agents/backend-specialist.md +266 -0
- package/core/agents/code-archaeologist.md +106 -0
- package/core/agents/database-architect.md +226 -0
- package/core/agents/debugger.md +225 -0
- package/core/agents/devops-engineer.md +323 -0
- package/core/agents/documentation-writer.md +104 -0
- package/core/agents/explorer-agent.md +73 -0
- package/core/agents/frontend-specialist.md +743 -0
- package/core/agents/game-developer.md +162 -0
- package/core/agents/mobile-developer.md +377 -0
- package/core/agents/orchestrator.md +416 -0
- package/core/agents/penetration-tester.md +188 -0
- package/core/agents/performance-optimizer.md +187 -0
- package/core/agents/product-manager.md +112 -0
- package/core/agents/product-owner.md +95 -0
- package/core/agents/project-planner.md +470 -0
- package/core/agents/qa-automation-engineer.md +103 -0
- package/core/agents/security-auditor.md +170 -0
- package/core/agents/seo-specialist.md +111 -0
- package/core/agents/stitch-designer.md +190 -0
- package/core/agents/tdd-reviewer.md +282 -0
- package/core/agents/test-engineer.md +158 -0
- package/core/scripts/auto_preview.py +148 -0
- package/core/scripts/checklist.py +243 -0
- package/core/scripts/cost_report.py +149 -0
- package/core/scripts/doc-sync-check.py +461 -0
- package/core/scripts/parse_user_stories.py +79 -0
- package/core/scripts/prepare_notion_updates.py +172 -0
- package/core/scripts/print_create_payload.py +18 -0
- package/core/scripts/session_manager.py +120 -0
- package/core/scripts/task_complete.py +127 -0
- package/core/scripts/verify_all.py +327 -0
- package/core/skills/analytics-strategy/SKILL.md +128 -0
- package/core/skills/api-patterns/SKILL.md +81 -0
- package/core/skills/api-patterns/api-style.md +42 -0
- package/core/skills/api-patterns/auth.md +24 -0
- package/core/skills/api-patterns/documentation.md +26 -0
- package/core/skills/api-patterns/graphql.md +41 -0
- package/core/skills/api-patterns/rate-limiting.md +31 -0
- package/core/skills/api-patterns/response.md +37 -0
- package/core/skills/api-patterns/rest.md +40 -0
- package/core/skills/api-patterns/scripts/api_validator.py +211 -0
- package/core/skills/api-patterns/security-testing.md +122 -0
- package/core/skills/api-patterns/trpc.md +41 -0
- package/core/skills/api-patterns/versioning.md +22 -0
- package/core/skills/app-builder/SKILL.md +75 -0
- package/core/skills/app-builder/agent-coordination.md +71 -0
- package/core/skills/app-builder/feature-building.md +53 -0
- package/core/skills/app-builder/project-detection.md +34 -0
- package/core/skills/app-builder/scaffolding.md +118 -0
- package/core/skills/app-builder/tech-stack.md +40 -0
- package/core/skills/app-builder/templates/SKILL.md +39 -0
- package/core/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
- package/core/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
- package/core/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
- package/core/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
- package/core/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
- package/core/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
- package/core/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
- package/core/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +82 -0
- package/core/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
- package/core/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
- package/core/skills/app-builder/templates/nuxt-app/TEMPLATE.md +101 -0
- package/core/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
- package/core/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
- package/core/skills/architecture/SKILL.md +55 -0
- package/core/skills/architecture/context-discovery.md +43 -0
- package/core/skills/architecture/examples.md +94 -0
- package/core/skills/architecture/pattern-selection.md +68 -0
- package/core/skills/architecture/patterns-reference.md +50 -0
- package/core/skills/architecture/trade-off-analysis.md +77 -0
- package/core/skills/atomic-design/SKILL.md +282 -0
- package/core/skills/atomic-design/references/classification-guide.md +132 -0
- package/core/skills/atomic-design/references/quality-checklist.md +60 -0
- package/core/skills/atomic-design/references/stacks/stack-blade.md +254 -0
- package/core/skills/atomic-design/references/stacks/stack-nextjs.md +272 -0
- package/core/skills/atomic-design/references/stacks/stack-react.md +239 -0
- package/core/skills/atomic-design/references/stacks/stack-vue.md +224 -0
- package/core/skills/bash-linux/SKILL.md +199 -0
- package/core/skills/behavioral-modes/SKILL.md +242 -0
- package/core/skills/brainstorming/SKILL.md +163 -0
- package/core/skills/brainstorming/dynamic-questioning.md +373 -0
- package/core/skills/checkpointing-patterns/SKILL.md +163 -0
- package/core/skills/clean-code/SKILL.md +201 -0
- package/core/skills/code-review-checklist/SKILL.md +109 -0
- package/core/skills/code-truth-validation/SKILL.md +149 -0
- package/core/skills/component-library-discovery/SKILL.md +154 -0
- package/core/skills/content-strategy/SKILL.md +222 -0
- package/core/skills/context-budget/SKILL.md +155 -0
- package/core/skills/context-gathering-patterns/SKILL.md +278 -0
- package/core/skills/cost-tracking/SKILL.md +206 -0
- package/core/skills/database-design/SKILL.md +52 -0
- package/core/skills/database-design/database-selection.md +43 -0
- package/core/skills/database-design/indexing.md +39 -0
- package/core/skills/database-design/migrations.md +48 -0
- package/core/skills/database-design/optimization.md +36 -0
- package/core/skills/database-design/orm-selection.md +30 -0
- package/core/skills/database-design/schema-design.md +56 -0
- package/core/skills/database-design/scripts/schema_validator.py +172 -0
- package/core/skills/deployment-procedures/SKILL.md +295 -0
- package/core/skills/design-md/README.md +34 -0
- package/core/skills/design-md/SKILL.md +172 -0
- package/core/skills/design-md/examples/DESIGN.md +154 -0
- package/core/skills/design-system-enforcement/SKILL.md +339 -0
- package/core/skills/doc.md +177 -0
- package/core/skills/document-registry/SKILL.md +130 -0
- package/core/skills/documentation-publishing/SKILL.md +174 -0
- package/core/skills/documentation-templates/SKILL.md +194 -0
- package/core/skills/enhance-prompt/README.md +34 -0
- package/core/skills/enhance-prompt/SKILL.md +204 -0
- package/core/skills/enhance-prompt/references/KEYWORDS.md +114 -0
- package/core/skills/frontend-design/SKILL.md +430 -0
- package/core/skills/frontend-design/animation-guide.md +331 -0
- package/core/skills/frontend-design/color-system.md +311 -0
- package/core/skills/frontend-design/decision-trees.md +418 -0
- package/core/skills/frontend-design/motion-graphics.md +306 -0
- package/core/skills/frontend-design/scripts/accessibility_checker.py +183 -0
- package/core/skills/frontend-design/scripts/ux_audit.py +722 -0
- package/core/skills/frontend-design/typography-system.md +345 -0
- package/core/skills/frontend-design/ux-psychology.md +541 -0
- package/core/skills/frontend-design/visual-effects.md +383 -0
- package/core/skills/game-development/2d-games/SKILL.md +119 -0
- package/core/skills/game-development/3d-games/SKILL.md +135 -0
- package/core/skills/game-development/SKILL.md +167 -0
- package/core/skills/game-development/game-art/SKILL.md +185 -0
- package/core/skills/game-development/game-audio/SKILL.md +190 -0
- package/core/skills/game-development/game-design/SKILL.md +129 -0
- package/core/skills/game-development/mobile-games/SKILL.md +108 -0
- package/core/skills/game-development/multiplayer/SKILL.md +132 -0
- package/core/skills/game-development/pc-games/SKILL.md +144 -0
- package/core/skills/game-development/vr-ar/SKILL.md +123 -0
- package/core/skills/game-development/web-games/SKILL.md +150 -0
- package/core/skills/geo-fundamentals/SKILL.md +156 -0
- package/core/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
- package/core/skills/git-workflow/SKILL.md +263 -0
- package/core/skills/history-check-patterns/SKILL.md +125 -0
- package/core/skills/i18n-localization/SKILL.md +154 -0
- package/core/skills/i18n-localization/scripts/i18n_checker.py +241 -0
- package/core/skills/integration-completeness/SKILL.md +219 -0
- package/core/skills/intelligent-routing/SKILL.md +370 -0
- package/core/skills/lint-and-validate/SKILL.md +45 -0
- package/core/skills/lint-and-validate/scripts/lint_runner.py +173 -0
- package/core/skills/lint-and-validate/scripts/type_coverage.py +173 -0
- package/core/skills/local-verification/SKILL.md +195 -0
- package/core/skills/mcp-builder/SKILL.md +176 -0
- package/core/skills/mobile-design/SKILL.md +394 -0
- package/core/skills/mobile-design/decision-trees.md +516 -0
- package/core/skills/mobile-design/mobile-backend.md +491 -0
- package/core/skills/mobile-design/mobile-color-system.md +420 -0
- package/core/skills/mobile-design/mobile-debugging.md +122 -0
- package/core/skills/mobile-design/mobile-design-thinking.md +357 -0
- package/core/skills/mobile-design/mobile-navigation.md +458 -0
- package/core/skills/mobile-design/mobile-performance.md +767 -0
- package/core/skills/mobile-design/mobile-testing.md +356 -0
- package/core/skills/mobile-design/mobile-typography.md +433 -0
- package/core/skills/mobile-design/platform-android.md +666 -0
- package/core/skills/mobile-design/platform-ios.md +561 -0
- package/core/skills/mobile-design/scripts/mobile_audit.py +670 -0
- package/core/skills/mobile-design/touch-psychology.md +537 -0
- package/core/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
- package/core/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
- package/core/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
- package/core/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
- package/core/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
- package/core/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
- package/core/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
- package/core/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
- package/core/skills/nextjs-react-expert/SKILL.md +267 -0
- package/core/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
- package/core/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
- package/core/skills/nodejs-best-practices/SKILL.md +333 -0
- package/core/skills/notion-task-patterns/SKILL.md +2529 -0
- package/core/skills/page-specifications/SKILL.md +367 -0
- package/core/skills/parallel-agents/SKILL.md +175 -0
- package/core/skills/performance-profiling/SKILL.md +143 -0
- package/core/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
- package/core/skills/plan-writing/SKILL.md +190 -0
- package/core/skills/powershell-windows/SKILL.md +167 -0
- package/core/skills/project-foundation/SKILL.md +117 -0
- package/core/skills/project-setup/SKILL.md +141 -0
- package/core/skills/project-tracking-patterns/SKILL.md +357 -0
- package/core/skills/project-type-discovery/SKILL.md +239 -0
- package/core/skills/python-patterns/SKILL.md +441 -0
- package/core/skills/qa-test-generation/SKILL.md +156 -0
- package/core/skills/react-components/README.md +36 -0
- package/core/skills/react-components/SKILL.md +47 -0
- package/core/skills/react-components/examples/gold-standard-card.tsx +80 -0
- package/core/skills/react-components/package-lock.json +231 -0
- package/core/skills/react-components/package.json +16 -0
- package/core/skills/react-components/resources/architecture-checklist.md +15 -0
- package/core/skills/react-components/resources/component-template.tsx +37 -0
- package/core/skills/react-components/resources/stitch-api-reference.md +14 -0
- package/core/skills/react-components/resources/style-guide.json +27 -0
- package/core/skills/react-components/scripts/fetch-stitch.sh +30 -0
- package/core/skills/react-components/scripts/validate.js +68 -0
- package/core/skills/red-team-tactics/SKILL.md +199 -0
- package/core/skills/remotion/README.md +105 -0
- package/core/skills/remotion/SKILL.md +393 -0
- package/core/skills/remotion/examples/WalkthroughComposition.tsx +78 -0
- package/core/skills/remotion/examples/screens.json +56 -0
- package/core/skills/remotion/resources/composition-checklist.md +124 -0
- package/core/skills/remotion/resources/screen-slide-template.tsx +123 -0
- package/core/skills/remotion/scripts/download-stitch-asset.sh +38 -0
- package/core/skills/seo-fundamentals/SKILL.md +129 -0
- package/core/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
- package/core/skills/server-management/SKILL.md +161 -0
- package/core/skills/session-resilience/SKILL.md +199 -0
- package/core/skills/shadcn-ui/README.md +248 -0
- package/core/skills/shadcn-ui/SKILL.md +326 -0
- package/core/skills/shadcn-ui/examples/auth-layout.tsx +177 -0
- package/core/skills/shadcn-ui/examples/data-table.tsx +313 -0
- package/core/skills/shadcn-ui/examples/form-pattern.tsx +177 -0
- package/core/skills/shadcn-ui/resources/component-catalog.md +481 -0
- package/core/skills/shadcn-ui/resources/customization-guide.md +516 -0
- package/core/skills/shadcn-ui/resources/migration-guide.md +463 -0
- package/core/skills/shadcn-ui/resources/setup-guide.md +412 -0
- package/core/skills/shadcn-ui/scripts/verify-setup.sh +134 -0
- package/core/skills/state-machine/SKILL.md +264 -0
- package/core/skills/stitch-loop/README.md +54 -0
- package/core/skills/stitch-loop/SKILL.md +203 -0
- package/core/skills/stitch-loop/examples/SITE.md +73 -0
- package/core/skills/stitch-loop/examples/next-prompt.md +25 -0
- package/core/skills/stitch-loop/resources/baton-schema.md +61 -0
- package/core/skills/stitch-loop/resources/site-template.md +104 -0
- package/core/skills/systematic-debugging/SKILL.md +109 -0
- package/core/skills/tailwind-patterns/SKILL.md +284 -0
- package/core/skills/tdd-validation/SKILL.md +243 -0
- package/core/skills/tdd-workflow/SKILL.md +284 -0
- package/core/skills/testing-patterns/SKILL.md +196 -0
- package/core/skills/testing-patterns/scripts/test_runner.py +219 -0
- package/core/skills/ui-ux-discovery/SKILL.md +329 -0
- package/core/skills/ui-validation/SKILL.md +190 -0
- package/core/skills/ui-validation/scripts/ui_antipattern_check.py +317 -0
- package/core/skills/verification-gate/SKILL.md +205 -0
- package/core/skills/vulnerability-scanner/SKILL.md +276 -0
- package/core/skills/vulnerability-scanner/checklists.md +121 -0
- package/core/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
- package/core/skills/web-design-guidelines/SKILL.md +57 -0
- package/core/skills/webapp-testing/SKILL.md +187 -0
- package/core/skills/webapp-testing/scripts/playwright_runner.py +173 -0
- package/core/templates/ARCHITECTURE.template.md +407 -0
- package/core/templates/project-resources.example.json +71 -0
- package/core/workflows/atomic.md +182 -0
- package/core/workflows/brainstorm.md +134 -0
- package/core/workflows/check-task.md +242 -0
- package/core/workflows/copy-collect.md +306 -0
- package/core/workflows/create-agent.md +33 -0
- package/core/workflows/create-skill.md +39 -0
- package/core/workflows/create-workflow.md +33 -0
- package/core/workflows/create.md +92 -0
- package/core/workflows/debug.md +186 -0
- package/core/workflows/demand.md +443 -0
- package/core/workflows/deploy.md +260 -0
- package/core/workflows/discovery.md +267 -0
- package/core/workflows/document.md +272 -0
- package/core/workflows/ds-components.md +296 -0
- package/core/workflows/ds-init.md +58 -0
- package/core/workflows/ds-refactor.md +245 -0
- package/core/workflows/ds-references.md +197 -0
- package/core/workflows/ds-styleguide.md +237 -0
- package/core/workflows/ds-token-diff.md +103 -0
- package/core/workflows/ds-tokens.md +317 -0
- package/core/workflows/ds-validate.md +309 -0
- package/core/workflows/execute.md +483 -0
- package/core/workflows/extract-template.md +278 -0
- package/core/workflows/fix-failed-tests.md +160 -0
- package/core/workflows/init-project.md +386 -0
- package/core/workflows/legacy-project.md +849 -0
- package/core/workflows/log.md +97 -0
- package/core/workflows/new-project.md +610 -0
- package/core/workflows/new-project.md.bak +3292 -0
- package/core/workflows/new-task.md +404 -0
- package/core/workflows/orchestrate.md +237 -0
- package/core/workflows/page-build.md +296 -0
- package/core/workflows/plan.md +89 -0
- package/core/workflows/prd.md +255 -0
- package/core/workflows/preview.md +81 -0
- package/core/workflows/review-page.md +304 -0
- package/core/workflows/status.md +86 -0
- package/core/workflows/stitch.md +226 -0
- package/core/workflows/task-complete.md +473 -0
- package/core/workflows/task-update.md +163 -0
- package/core/workflows/tdd.md +344 -0
- package/core/workflows/test.md +251 -0
- package/core/workflows/ui-ux-pro-max.md +437 -0
- package/core/workflows/ux-mobile-optimize.md +262 -0
- package/core/workflows/ux-mobile-validate.md +297 -0
- package/engine-files/GEMINI.md +69 -0
- package/package.json +47 -0
- package/runtime-adapters/antigravity.js +26 -0
- package/runtime-adapters/claude.js +57 -0
- package/runtime-adapters/codex.js +51 -0
- package/runtime-adapters/copilot.js +51 -0
- package/runtime-adapters/cursor.js +51 -0
- package/runtime-adapters/gemini-cli.js +30 -0
- package/runtime-adapters/opencode.js +51 -0
- package/runtime-adapters/windsurf.js +51 -0
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
"""
|
|
3
|
+
Test Runner - Unified test execution and coverage reporting
|
|
4
|
+
Runs tests and generates coverage report based on project type.
|
|
5
|
+
|
|
6
|
+
Usage:
|
|
7
|
+
python test_runner.py <project_path> [--coverage]
|
|
8
|
+
|
|
9
|
+
Supports:
|
|
10
|
+
- Node.js: npm test, jest, vitest
|
|
11
|
+
- Python: pytest, unittest
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
import subprocess
|
|
15
|
+
import sys
|
|
16
|
+
import json
|
|
17
|
+
from pathlib import Path
|
|
18
|
+
from datetime import datetime
|
|
19
|
+
|
|
20
|
+
# Fix Windows console encoding
|
|
21
|
+
try:
|
|
22
|
+
sys.stdout.reconfigure(encoding='utf-8', errors='replace')
|
|
23
|
+
except:
|
|
24
|
+
pass
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def detect_test_framework(project_path: Path) -> dict:
|
|
28
|
+
"""Detect test framework and commands."""
|
|
29
|
+
result = {
|
|
30
|
+
"type": "unknown",
|
|
31
|
+
"framework": None,
|
|
32
|
+
"cmd": None,
|
|
33
|
+
"coverage_cmd": None
|
|
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 test script
|
|
46
|
+
if "test" in scripts:
|
|
47
|
+
result["framework"] = "npm test"
|
|
48
|
+
result["cmd"] = ["npm", "test"]
|
|
49
|
+
|
|
50
|
+
# Try to detect specific framework for coverage
|
|
51
|
+
if "vitest" in deps:
|
|
52
|
+
result["framework"] = "vitest"
|
|
53
|
+
result["coverage_cmd"] = ["npx", "vitest", "run", "--coverage"]
|
|
54
|
+
elif "jest" in deps:
|
|
55
|
+
result["framework"] = "jest"
|
|
56
|
+
result["coverage_cmd"] = ["npx", "jest", "--coverage"]
|
|
57
|
+
elif "vitest" in deps:
|
|
58
|
+
result["framework"] = "vitest"
|
|
59
|
+
result["cmd"] = ["npx", "vitest", "run"]
|
|
60
|
+
result["coverage_cmd"] = ["npx", "vitest", "run", "--coverage"]
|
|
61
|
+
elif "jest" in deps:
|
|
62
|
+
result["framework"] = "jest"
|
|
63
|
+
result["cmd"] = ["npx", "jest"]
|
|
64
|
+
result["coverage_cmd"] = ["npx", "jest", "--coverage"]
|
|
65
|
+
|
|
66
|
+
except:
|
|
67
|
+
pass
|
|
68
|
+
|
|
69
|
+
# Python project
|
|
70
|
+
if (project_path / "pyproject.toml").exists() or (project_path / "requirements.txt").exists():
|
|
71
|
+
result["type"] = "python"
|
|
72
|
+
result["framework"] = "pytest"
|
|
73
|
+
result["cmd"] = ["python", "-m", "pytest", "-v"]
|
|
74
|
+
result["coverage_cmd"] = ["python", "-m", "pytest", "--cov", "--cov-report=term-missing"]
|
|
75
|
+
|
|
76
|
+
return result
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def run_tests(cmd: list, cwd: Path) -> dict:
|
|
80
|
+
"""Run tests and return results."""
|
|
81
|
+
result = {
|
|
82
|
+
"passed": False,
|
|
83
|
+
"output": "",
|
|
84
|
+
"error": "",
|
|
85
|
+
"tests_run": 0,
|
|
86
|
+
"tests_passed": 0,
|
|
87
|
+
"tests_failed": 0
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
try:
|
|
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=300 # 5 min timeout for tests
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
result["output"] = proc.stdout[:3000] if proc.stdout else ""
|
|
102
|
+
result["error"] = proc.stderr[:500] if proc.stderr else ""
|
|
103
|
+
result["passed"] = proc.returncode == 0
|
|
104
|
+
|
|
105
|
+
# Try to parse test counts from output
|
|
106
|
+
output = proc.stdout or ""
|
|
107
|
+
|
|
108
|
+
# Jest/Vitest pattern: "Tests: X passed, Y failed, Z total"
|
|
109
|
+
if "passed" in output.lower() and "failed" in output.lower():
|
|
110
|
+
import re
|
|
111
|
+
match = re.search(r'(\d+)\s+passed', output, re.IGNORECASE)
|
|
112
|
+
if match:
|
|
113
|
+
result["tests_passed"] = int(match.group(1))
|
|
114
|
+
match = re.search(r'(\d+)\s+failed', output, re.IGNORECASE)
|
|
115
|
+
if match:
|
|
116
|
+
result["tests_failed"] = int(match.group(1))
|
|
117
|
+
result["tests_run"] = result["tests_passed"] + result["tests_failed"]
|
|
118
|
+
|
|
119
|
+
# Pytest pattern: "X passed, Y failed"
|
|
120
|
+
if "pytest" in str(cmd):
|
|
121
|
+
import re
|
|
122
|
+
match = re.search(r'(\d+)\s+passed', output)
|
|
123
|
+
if match:
|
|
124
|
+
result["tests_passed"] = int(match.group(1))
|
|
125
|
+
match = re.search(r'(\d+)\s+failed', output)
|
|
126
|
+
if match:
|
|
127
|
+
result["tests_failed"] = int(match.group(1))
|
|
128
|
+
result["tests_run"] = result["tests_passed"] + result["tests_failed"]
|
|
129
|
+
|
|
130
|
+
except FileNotFoundError:
|
|
131
|
+
result["error"] = f"Command not found: {cmd[0]}"
|
|
132
|
+
except subprocess.TimeoutExpired:
|
|
133
|
+
result["error"] = "Timeout after 300s"
|
|
134
|
+
except Exception as e:
|
|
135
|
+
result["error"] = str(e)
|
|
136
|
+
|
|
137
|
+
return result
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
def main():
|
|
141
|
+
project_path = Path(sys.argv[1] if len(sys.argv) > 1 else ".").resolve()
|
|
142
|
+
with_coverage = "--coverage" in sys.argv
|
|
143
|
+
|
|
144
|
+
print(f"\n{'='*60}")
|
|
145
|
+
print(f"[TEST RUNNER] Unified Test Execution")
|
|
146
|
+
print(f"{'='*60}")
|
|
147
|
+
print(f"Project: {project_path}")
|
|
148
|
+
print(f"Coverage: {'enabled' if with_coverage else 'disabled'}")
|
|
149
|
+
print(f"Time: {datetime.now().strftime('%Y-%m-%d %H:%M:%S')}")
|
|
150
|
+
|
|
151
|
+
# Detect test framework
|
|
152
|
+
test_info = detect_test_framework(project_path)
|
|
153
|
+
print(f"Type: {test_info['type']}")
|
|
154
|
+
print(f"Framework: {test_info['framework']}")
|
|
155
|
+
print("-"*60)
|
|
156
|
+
|
|
157
|
+
if not test_info["cmd"]:
|
|
158
|
+
print("No test framework found for this project.")
|
|
159
|
+
output = {
|
|
160
|
+
"script": "test_runner",
|
|
161
|
+
"project": str(project_path),
|
|
162
|
+
"type": test_info["type"],
|
|
163
|
+
"framework": None,
|
|
164
|
+
"passed": True,
|
|
165
|
+
"message": "No tests configured"
|
|
166
|
+
}
|
|
167
|
+
print(json.dumps(output, indent=2))
|
|
168
|
+
sys.exit(0)
|
|
169
|
+
|
|
170
|
+
# Choose command
|
|
171
|
+
cmd = test_info["coverage_cmd"] if with_coverage and test_info["coverage_cmd"] else test_info["cmd"]
|
|
172
|
+
|
|
173
|
+
print(f"Running: {' '.join(cmd)}")
|
|
174
|
+
print("-"*60)
|
|
175
|
+
|
|
176
|
+
# Run tests
|
|
177
|
+
result = run_tests(cmd, project_path)
|
|
178
|
+
|
|
179
|
+
# Print output (truncated)
|
|
180
|
+
if result["output"]:
|
|
181
|
+
lines = result["output"].split("\n")
|
|
182
|
+
for line in lines[:30]:
|
|
183
|
+
print(line)
|
|
184
|
+
if len(lines) > 30:
|
|
185
|
+
print(f"... ({len(lines) - 30} more lines)")
|
|
186
|
+
|
|
187
|
+
# Summary
|
|
188
|
+
print("\n" + "="*60)
|
|
189
|
+
print("SUMMARY")
|
|
190
|
+
print("="*60)
|
|
191
|
+
|
|
192
|
+
if result["passed"]:
|
|
193
|
+
print("[PASS] All tests passed")
|
|
194
|
+
else:
|
|
195
|
+
print("[FAIL] Some tests failed")
|
|
196
|
+
if result["error"]:
|
|
197
|
+
print(f"Error: {result['error'][:200]}")
|
|
198
|
+
|
|
199
|
+
if result["tests_run"] > 0:
|
|
200
|
+
print(f"Tests: {result['tests_run']} total, {result['tests_passed']} passed, {result['tests_failed']} failed")
|
|
201
|
+
|
|
202
|
+
output = {
|
|
203
|
+
"script": "test_runner",
|
|
204
|
+
"project": str(project_path),
|
|
205
|
+
"type": test_info["type"],
|
|
206
|
+
"framework": test_info["framework"],
|
|
207
|
+
"tests_run": result["tests_run"],
|
|
208
|
+
"tests_passed": result["tests_passed"],
|
|
209
|
+
"tests_failed": result["tests_failed"],
|
|
210
|
+
"passed": result["passed"]
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
print("\n" + json.dumps(output, indent=2))
|
|
214
|
+
|
|
215
|
+
sys.exit(0 if result["passed"] else 1)
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
if __name__ == "__main__":
|
|
219
|
+
main()
|
|
@@ -0,0 +1,329 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ui-ux-discovery
|
|
3
|
+
description: Padrões centralizados para descoberta de UI/UX em projetos. Perguntas granulares por aspecto visual (cores, tipografia, layout, efeitos, logo). Validação híbrida manter vs. modernizar.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# UI/UX Discovery Patterns
|
|
7
|
+
|
|
8
|
+
> **Single Source of Truth** para todos os workflows que definem Design System.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🎯 PROPÓSITO
|
|
13
|
+
|
|
14
|
+
Garantir consistência em:
|
|
15
|
+
1. **Extração de Identidade** - Analisar identidade visual existente
|
|
16
|
+
2. **Perguntas Granulares** - Decisões por aspecto (não tudo ou nada)
|
|
17
|
+
3. **Integração** - Sempre usar `/ui-ux-pro-max` para recomendações
|
|
18
|
+
4. **Consolidação** - Combinar decisões mantidas + modernizadas
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 🔗 QUANDO USAR?
|
|
23
|
+
|
|
24
|
+
| Workflow | Fase | Trigger |
|
|
25
|
+
|----------|------|---------|
|
|
26
|
+
| `/legacy-project` | Phase 5.5 | Após TDD Reverso |
|
|
27
|
+
| `/new-project` | Phase 2.5, 5.3 | Após TDD / Implementação |
|
|
28
|
+
| `/new-task` | Styling | Quando inclui mudanças visuais |
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 📊 PROCESSO COMPLETO (5 Passos)
|
|
33
|
+
|
|
34
|
+
### PASSO 1: Extrair Identidade Visual Atual
|
|
35
|
+
|
|
36
|
+
> **Pulado se:** Projeto é novo (sem código existente)
|
|
37
|
+
|
|
38
|
+
Analisar código existente e extrair:
|
|
39
|
+
|
|
40
|
+
```markdown
|
|
41
|
+
## 📊 Identidade Visual Atual (Extraída)
|
|
42
|
+
|
|
43
|
+
### Cores Principais
|
|
44
|
+
| Uso | Cor | Hex |
|
|
45
|
+
|-----|-----|-----|
|
|
46
|
+
| Primária | {cor} | #XXXXXX |
|
|
47
|
+
| Secundária | {cor} | #XXXXXX |
|
|
48
|
+
| Acento | {cor} | #XXXXXX |
|
|
49
|
+
| Background | {cor} | #XXXXXX |
|
|
50
|
+
| Texto | {cor} | #XXXXXX |
|
|
51
|
+
|
|
52
|
+
### Tipografia Atual
|
|
53
|
+
- Heading: {fonte}
|
|
54
|
+
- Body: {fonte}
|
|
55
|
+
|
|
56
|
+
### Elementos Visuais
|
|
57
|
+
- Logo: {descrição}
|
|
58
|
+
- Ícones: {tipo}
|
|
59
|
+
- Layout: {descrição}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
### PASSO 1.5: Armazenar Referências Visuais (Se Fornecidas) ⭐
|
|
65
|
+
|
|
66
|
+
> **Trigger:** Usuário envia imagens de referência para Design System
|
|
67
|
+
|
|
68
|
+
> [!IMPORTANT]
|
|
69
|
+
> **OBRIGATÓRIO:** Se o usuário fornecer imagens de referência, copiá-las para o projeto ANTES de gerar MASTER.md.
|
|
70
|
+
|
|
71
|
+
**Ações:**
|
|
72
|
+
|
|
73
|
+
1. **Criar pasta de referências:**
|
|
74
|
+
```bash
|
|
75
|
+
# PowerShell
|
|
76
|
+
New-Item -ItemType Directory -Force -Path "design-system/{projeto}/references/"
|
|
77
|
+
|
|
78
|
+
# Bash
|
|
79
|
+
mkdir -p design-system/{projeto}/references/
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
2. **Copiar imagens para o projeto:**
|
|
83
|
+
```bash
|
|
84
|
+
# PowerShell
|
|
85
|
+
Copy-Item "{path_da_imagem}" "design-system/{projeto}/references/" -Force
|
|
86
|
+
|
|
87
|
+
# Bash
|
|
88
|
+
cp "{path_da_imagem}" "design-system/{projeto}/references/"
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
3. **Documentar no MASTER.md:**
|
|
92
|
+
Adicionar seção após a geração:
|
|
93
|
+
```markdown
|
|
94
|
+
## 📸 Reference Images
|
|
95
|
+
|
|
96
|
+
Imagens de referência fornecidas pelo usuário:
|
|
97
|
+
- 
|
|
98
|
+
- 
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Estrutura Final:**
|
|
102
|
+
```
|
|
103
|
+
design-system/
|
|
104
|
+
├── {projeto}/
|
|
105
|
+
│ ├── MASTER.md ← Source of Truth
|
|
106
|
+
│ ├── references/ ← NEW: Imagens de referência
|
|
107
|
+
│ │ ├── ref_001.png
|
|
108
|
+
│ │ └── ref_002.png
|
|
109
|
+
│ └── pages/
|
|
110
|
+
│ └── ...
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
> [!CAUTION]
|
|
114
|
+
> **NÃO** deixar imagens de referência apenas no brain/conversation. **SEMPRE** copiar para o projeto.
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### PASSO 2: Executar `/ui-ux-pro-max`
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
> [!IMPORTANT]
|
|
122
|
+
> **OBRIGATÓRIO:** Sempre executar para ter recomendações profissionais.
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
python3 .agent/.shared/ui-ux-pro-max/scripts/search.py "{tipo} {indústria}" --design-system -p "{Projeto}"
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Capturar:**
|
|
129
|
+
- Style moderno sugerido
|
|
130
|
+
- Paleta de cores recomendada
|
|
131
|
+
- Tipografia moderna
|
|
132
|
+
- Efeitos visuais
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
### PASSO 3: Perguntas Granulares (OBRIGATÓRIO) ⭐
|
|
137
|
+
|
|
138
|
+
> [!CAUTION]
|
|
139
|
+
> **BLOQUEADOR:** ANTES de definir Design System, fazer estas perguntas ao usuário.
|
|
140
|
+
> NÃO assumir que vai manter tudo ou renovar tudo.
|
|
141
|
+
|
|
142
|
+
**Template de Perguntas:**
|
|
143
|
+
|
|
144
|
+
```markdown
|
|
145
|
+
## 🎨 Decisões de Design System
|
|
146
|
+
|
|
147
|
+
Analisei o projeto e tenho recomendações modernas.
|
|
148
|
+
Por favor, decida **para cada aspecto** o que deseja:
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
### 1. 🎨 CORES
|
|
153
|
+
|
|
154
|
+
**Atual:** {cores extraídas ou "N/A para projeto novo"}
|
|
155
|
+
**Recomendação:** {paleta do ui-ux-pro-max}
|
|
156
|
+
|
|
157
|
+
Qual direção?
|
|
158
|
+
- [ ] A) **Manter cores atuais** (sem alteração)
|
|
159
|
+
- [ ] B) **Manter primária/secundária**, modernizar o resto
|
|
160
|
+
- [ ] C) **Renovar completamente** (usar recomendação)
|
|
161
|
+
- [ ] D) **Definir manualmente** (me informe as cores)
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### 2. ✏️ TIPOGRAFIA
|
|
166
|
+
|
|
167
|
+
**Atual:** {fontes extraídas ou "N/A"}
|
|
168
|
+
**Recomendação:** {fontes do ui-ux-pro-max}
|
|
169
|
+
|
|
170
|
+
Qual direção?
|
|
171
|
+
- [ ] A) **Manter fontes atuais**
|
|
172
|
+
- [ ] B) **Modernizar** (usar recomendação)
|
|
173
|
+
- [ ] C) **Definir manualmente** (me informe as fontes)
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### 3. 📐 LAYOUT E ESTRUTURA
|
|
178
|
+
|
|
179
|
+
**Atual:** {descrição do layout ou "N/A"}
|
|
180
|
+
**Recomendação:** {layout moderno do ui-ux-pro-max}
|
|
181
|
+
|
|
182
|
+
Qual direção?
|
|
183
|
+
- [ ] A) **Manter estrutura similar** (mesmas seções)
|
|
184
|
+
- [ ] B) **Reorganizar** seguindo tendências modernas
|
|
185
|
+
- [ ] C) **Definir manualmente** (me descreva a estrutura)
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
### 4. ✨ EFEITOS VISUAIS
|
|
190
|
+
|
|
191
|
+
**Atual:** {efeitos atuais ou "nenhum"}
|
|
192
|
+
**Recomendação:** {glassmorphism, gradients, shadows, micro-animations}
|
|
193
|
+
|
|
194
|
+
Quais efeitos incluir? (marque todos que deseja)
|
|
195
|
+
- [ ] Glassmorphism (transparência com blur)
|
|
196
|
+
- [ ] Gradients sutis
|
|
197
|
+
- [ ] Shadows modernas
|
|
198
|
+
- [ ] Micro-animations (hover, loading)
|
|
199
|
+
- [ ] Dark mode
|
|
200
|
+
- [ ] Nenhum efeito especial
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
### 5. 🖼️ LOGO E BRANDING
|
|
205
|
+
|
|
206
|
+
Qual direção?
|
|
207
|
+
- [ ] A) **Manter logo atual** exatamente como está
|
|
208
|
+
- [ ] B) **Manter logo**, atualizar aplicação (cores, tamanhos)
|
|
209
|
+
- [ ] C) **Novo logo** será fornecido depois
|
|
210
|
+
- [ ] D) **N/A** (projeto sem logo definido ainda)
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
Por favor, responda com as letras/opções de cada aspecto.
|
|
215
|
+
Exemplo: "1-B, 2-B, 3-B, 4-Glassmorphism+Animations+Dark, 5-A"
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
### PASSO 4: Consolidar Decisões
|
|
221
|
+
|
|
222
|
+
Baseado nas respostas:
|
|
223
|
+
|
|
224
|
+
1. Combinar elementos mantidos + modernizados
|
|
225
|
+
2. Aplicar recomendações do `/ui-ux-pro-max` conforme decisões
|
|
226
|
+
3. Gerar `design-system/{projeto}/MASTER.md` com escolhas híbridas
|
|
227
|
+
|
|
228
|
+
**Template de Consolidação:**
|
|
229
|
+
|
|
230
|
+
```markdown
|
|
231
|
+
## design-system/{projeto}/MASTER.md
|
|
232
|
+
|
|
233
|
+
> Gerado via `/ui-ux-pro-max` + decisões do usuário em {data}
|
|
234
|
+
|
|
235
|
+
### Decisões Tomadas
|
|
236
|
+
| Aspecto | Decisão | Resultado |
|
|
237
|
+
|---------|---------|-----------|
|
|
238
|
+
| Cores | {A/B/C/D} | {descrição} |
|
|
239
|
+
| Tipografia | {A/B/C} | {descrição} |
|
|
240
|
+
| Layout | {A/B/C} | {descrição} |
|
|
241
|
+
| Efeitos | {lista} | {descrição} |
|
|
242
|
+
| Logo | {A/B/C/D} | {descrição} |
|
|
243
|
+
|
|
244
|
+
---
|
|
245
|
+
|
|
246
|
+
### Cores
|
|
247
|
+
- Primary: {cor final}
|
|
248
|
+
- Secondary: {cor final}
|
|
249
|
+
- Accent: {cor final}
|
|
250
|
+
- Background: {cor final}
|
|
251
|
+
- Surface: {cor final}
|
|
252
|
+
- Text: {cor final}
|
|
253
|
+
|
|
254
|
+
### Tipografia
|
|
255
|
+
- Heading: {fonte final}
|
|
256
|
+
- Body: {fonte final}
|
|
257
|
+
- Mono: {fonte para código}
|
|
258
|
+
|
|
259
|
+
### Layout
|
|
260
|
+
- {descrição do layout escolhido}
|
|
261
|
+
|
|
262
|
+
### Efeitos Visuais
|
|
263
|
+
- {lista de efeitos escolhidos}
|
|
264
|
+
|
|
265
|
+
### Logo
|
|
266
|
+
- {descrição}
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
### PASSO 5: Validar e Aprovar
|
|
272
|
+
|
|
273
|
+
- **AGUARDAR** aprovação humana do Design System consolidado
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
## ✅ GATE DE SAÍDA
|
|
278
|
+
|
|
279
|
+
```
|
|
280
|
+
[ ] Identidade visual atual extraída (se projeto existente)
|
|
281
|
+
[ ] Referências visuais armazenadas em design-system/{projeto}/references/ (se fornecidas)
|
|
282
|
+
[ ] /ui-ux-pro-max executado
|
|
283
|
+
[ ] Perguntas granulares respondidas pelo usuário
|
|
284
|
+
[ ] Design System consolidado com decisões híbridas
|
|
285
|
+
[ ] Design System aprovado pelo humano
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## 📋 VARIAÇÕES POR CONTEXTO
|
|
291
|
+
|
|
292
|
+
### Projeto Novo (sem código existente)
|
|
293
|
+
|
|
294
|
+
- **Pular** Passo 1 (extração)
|
|
295
|
+
- **Opções A)** nas perguntas ficam como "N/A - projeto novo"
|
|
296
|
+
- Foco em escolher entre recomendações ou definir manual
|
|
297
|
+
|
|
298
|
+
### Projeto Legado (com código)
|
|
299
|
+
|
|
300
|
+
- **Executar** todos os 5 passos
|
|
301
|
+
- Permitir decisões híbridas (manter primárias + modernizar resto)
|
|
302
|
+
|
|
303
|
+
### Enhancement (projeto ativo)
|
|
304
|
+
|
|
305
|
+
- Verificar se já existe `design-system/{projeto}/MASTER.md`
|
|
306
|
+
- Se existe: Apenas validar/atualizar aspectos afetados
|
|
307
|
+
- Se não existe: Executar processo completo
|
|
308
|
+
|
|
309
|
+
---
|
|
310
|
+
|
|
311
|
+
## 🔗 WORKFLOWS QUE USAM ESTA SKILL
|
|
312
|
+
|
|
313
|
+
| Workflow | Quando Referenciar |
|
|
314
|
+
|----------|-------------------|
|
|
315
|
+
| `/legacy-project` | Phase 5.5 - Design System |
|
|
316
|
+
| `/new-project` | Phase 2.5 e Phase 5.3 |
|
|
317
|
+
| `/new-task` | Quando envolve mudanças visuais |
|
|
318
|
+
| `/ui-ux-pro-max` | Como complemento às recomendações |
|
|
319
|
+
|
|
320
|
+
---
|
|
321
|
+
|
|
322
|
+
## 🔴 REGRAS CRÍTICAS
|
|
323
|
+
|
|
324
|
+
1. **SEMPRE** usar `/ui-ux-pro-max` para recomendações
|
|
325
|
+
2. **NUNCA** assumir tudo ou nada - perguntar por aspecto
|
|
326
|
+
3. **AGUARDAR** resposta do usuário antes de consolidar
|
|
327
|
+
4. **DOCUMENTAR** decisões tomadas no Design System
|
|
328
|
+
5. **VALIDAR** com usuário antes de prosseguir
|
|
329
|
+
|