bps-kit 1.0.2 → 1.0.4

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.
Files changed (85) hide show
  1. package/bin/cli.js +4 -4
  2. package/package.json +1 -1
  3. package/templates/{.agents → agents-template}/rules/GEMINI.md +5 -5
  4. package/templates/skills_extra/nodejs-best-practices/SKILL.md +8 -2
  5. package/templates/skills_normal/api-patterns/SKILL.md +7 -2
  6. package/templates/skills_normal/app-builder/SKILL.md +8 -3
  7. package/templates/skills_normal/app-builder/tech-stack.md +2 -2
  8. package/templates/skills_normal/app-builder/templates/SKILL.md +7 -2
  9. package/templates/skills_normal/app-builder/templates/nextjs-fullstack/TEMPLATE.md +39 -79
  10. package/templates/skills_normal/app-builder/templates/nextjs-saas/TEMPLATE.md +53 -75
  11. package/templates/skills_normal/app-builder/templates/nextjs-static/TEMPLATE.md +56 -119
  12. package/templates/skills_normal/app-builder/templates/nuxt-app/TEMPLATE.md +61 -94
  13. package/templates/skills_normal/app-builder/templates/react-native-app/TEMPLATE.md +56 -82
  14. package/templates/skills_normal/behavioral-modes/SKILL.md +7 -2
  15. package/templates/skills_normal/brainstorming/SKILL.md +173 -104
  16. package/templates/skills_normal/clean-code/SKILL.md +90 -197
  17. package/templates/skills_normal/database-design/SKILL.md +7 -2
  18. package/templates/skills_normal/frontend-design/LICENSE.txt +177 -0
  19. package/templates/skills_normal/frontend-design/SKILL.md +172 -313
  20. package/templates/skills_normal/lint-and-validate/SKILL.md +7 -2
  21. package/templates/skills_normal/lint-and-validate/scripts/lint_runner.py +2 -14
  22. package/templates/skills_normal/performance-profiling/SKILL.md +7 -2
  23. package/templates/skills_normal/plan-writing/SKILL.md +4 -2
  24. package/templates/skills_normal/seo-fundamentals/SKILL.md +125 -79
  25. package/templates/skills_normal/systematic-debugging/CREATION-LOG.md +119 -0
  26. package/templates/skills_normal/systematic-debugging/SKILL.md +275 -85
  27. package/templates/skills_normal/systematic-debugging/condition-based-waiting-example.ts +158 -0
  28. package/templates/skills_normal/systematic-debugging/condition-based-waiting.md +115 -0
  29. package/templates/skills_normal/systematic-debugging/defense-in-depth.md +122 -0
  30. package/templates/skills_normal/systematic-debugging/find-polluter.sh +63 -0
  31. package/templates/skills_normal/systematic-debugging/root-cause-tracing.md +169 -0
  32. package/templates/skills_normal/systematic-debugging/test-academic.md +14 -0
  33. package/templates/skills_normal/systematic-debugging/test-pressure-1.md +58 -0
  34. package/templates/skills_normal/systematic-debugging/test-pressure-2.md +68 -0
  35. package/templates/skills_normal/systematic-debugging/test-pressure-3.md +69 -0
  36. package/templates/skills_normal/tailwind-patterns/SKILL.md +8 -2
  37. package/templates/skills_normal/testing-patterns/SKILL.md +212 -125
  38. package/templates/skills_normal/vulnerability-scanner/SKILL.md +7 -2
  39. package/templates/.agents/agents/backend-specialist.md +0 -263
  40. package/templates/.agents/agents/code-archaeologist.md +0 -106
  41. package/templates/.agents/agents/database-architect.md +0 -226
  42. package/templates/.agents/agents/debugger.md +0 -225
  43. package/templates/.agents/agents/devops-engineer.md +0 -242
  44. package/templates/.agents/agents/documentation-writer.md +0 -104
  45. package/templates/.agents/agents/explorer-agent.md +0 -73
  46. package/templates/.agents/agents/frontend-specialist.md +0 -593
  47. package/templates/.agents/agents/game-developer.md +0 -162
  48. package/templates/.agents/agents/mobile-developer.md +0 -377
  49. package/templates/.agents/agents/orchestrator.md +0 -416
  50. package/templates/.agents/agents/penetration-tester.md +0 -188
  51. package/templates/.agents/agents/performance-optimizer.md +0 -187
  52. package/templates/.agents/agents/product-manager.md +0 -112
  53. package/templates/.agents/agents/product-owner.md +0 -95
  54. package/templates/.agents/agents/project-planner.md +0 -406
  55. package/templates/.agents/agents/qa-automation-engineer.md +0 -103
  56. package/templates/.agents/agents/security-auditor.md +0 -170
  57. package/templates/.agents/agents/seo-specialist.md +0 -111
  58. package/templates/.agents/agents/test-engineer.md +0 -158
  59. package/templates/.agents/scripts/auto_preview.py +0 -148
  60. package/templates/.agents/scripts/checklist.py +0 -217
  61. package/templates/.agents/scripts/session_manager.py +0 -120
  62. package/templates/.agents/scripts/verify_all.py +0 -327
  63. package/templates/.agents/workflows/brainstorm.md +0 -113
  64. package/templates/.agents/workflows/create.md +0 -59
  65. package/templates/.agents/workflows/debug.md +0 -103
  66. package/templates/.agents/workflows/deploy.md +0 -176
  67. package/templates/.agents/workflows/enhance.md +0 -63
  68. package/templates/.agents/workflows/orchestrate.md +0 -237
  69. package/templates/.agents/workflows/plan.md +0 -89
  70. package/templates/.agents/workflows/preview.md +0 -81
  71. package/templates/.agents/workflows/status.md +0 -86
  72. package/templates/.agents/workflows/test.md +0 -144
  73. package/templates/.agents/workflows/ui-ux-pro-max.md +0 -296
  74. package/templates/skills_normal/brainstorming/dynamic-questioning.md +0 -350
  75. package/templates/skills_normal/frontend-design/animation-guide.md +0 -331
  76. package/templates/skills_normal/frontend-design/color-system.md +0 -311
  77. package/templates/skills_normal/frontend-design/decision-trees.md +0 -418
  78. package/templates/skills_normal/frontend-design/motion-graphics.md +0 -306
  79. package/templates/skills_normal/frontend-design/scripts/accessibility_checker.py +0 -183
  80. package/templates/skills_normal/frontend-design/scripts/ux_audit.py +0 -722
  81. package/templates/skills_normal/frontend-design/typography-system.md +0 -345
  82. package/templates/skills_normal/frontend-design/ux-psychology.md +0 -1116
  83. package/templates/skills_normal/frontend-design/visual-effects.md +0 -383
  84. package/templates/skills_normal/testing-patterns/scripts/test_runner.py +0 -219
  85. /package/templates/{.agents → agents-template}/workflows/setup-brain.md +0 -0
@@ -1,383 +0,0 @@
1
- # Visual Effects Reference
2
-
3
- > Modern CSS effect principles and techniques - learn the concepts, create variations.
4
- > **No fixed values to copy - understand the patterns.**
5
-
6
- ---
7
-
8
- ## 1. Glassmorphism Principles
9
-
10
- ### What Makes Glassmorphism Work
11
-
12
- ```
13
- Key Properties:
14
- ├── Semi-transparent background (not solid)
15
- ├── Backdrop blur (frosted glass effect)
16
- ├── Subtle border (for definition)
17
- └── Often: light shadow for depth
18
- ```
19
-
20
- ### The Pattern (Customize Values)
21
-
22
- ```css
23
- .glass {
24
- /* Transparency: adjust opacity based on content readability */
25
- background: rgba(R, G, B, OPACITY);
26
- /* OPACITY: 0.1-0.3 for dark bg, 0.5-0.8 for light bg */
27
-
28
- /* Blur: higher = more frosted */
29
- backdrop-filter: blur(AMOUNT);
30
- /* AMOUNT: 8-12px subtle, 16-24px strong */
31
-
32
- /* Border: defines edges */
33
- border: 1px solid rgba(255, 255, 255, OPACITY);
34
- /* OPACITY: 0.1-0.3 typically */
35
-
36
- /* Radius: match your design system */
37
- border-radius: YOUR_RADIUS;
38
- }
39
- ```
40
-
41
- ### When to Use Glassmorphism
42
- - ✅ Over colorful/image backgrounds
43
- - ✅ Modals, overlays, cards
44
- - ✅ Navigation bars with scrolling content behind
45
- - ❌ Text-heavy content (readability issues)
46
- - ❌ Simple solid backgrounds (pointless)
47
-
48
- ### When NOT to Use
49
- - Low contrast situations
50
- - Accessibility-critical content
51
- - Performance-constrained devices
52
-
53
- ---
54
-
55
- ## 2. Neomorphism Principles
56
-
57
- ### What Makes Neomorphism Work
58
-
59
- ```
60
- Key Concept: Soft, extruded elements using DUAL shadows
61
- ├── Light shadow (from light source direction)
62
- ├── Dark shadow (opposite direction)
63
- └── Background matches surrounding (same color)
64
- ```
65
-
66
- ### The Pattern
67
-
68
- ```css
69
- .neo-raised {
70
- /* Background MUST match parent */
71
- background: SAME_AS_PARENT;
72
-
73
- /* Two shadows: light direction + dark direction */
74
- box-shadow:
75
- OFFSET OFFSET BLUR rgba(light-color),
76
- -OFFSET -OFFSET BLUR rgba(dark-color);
77
-
78
- /* OFFSET: typically 6-12px */
79
- /* BLUR: typically 12-20px */
80
- }
81
-
82
- .neo-pressed {
83
- /* Inset creates "pushed in" effect */
84
- box-shadow:
85
- inset OFFSET OFFSET BLUR rgba(dark-color),
86
- inset -OFFSET -OFFSET BLUR rgba(light-color);
87
- }
88
- ```
89
-
90
- ### Accessibility Warning
91
- ⚠️ **Low contrast** - use sparingly, ensure clear boundaries
92
-
93
- ### When to Use
94
- - Decorative elements
95
- - Subtle interactive states
96
- - Minimalist UI with flat colors
97
-
98
- ---
99
-
100
- ## 3. Shadow Hierarchy Principles
101
-
102
- ### Concept: Shadows Indicate Elevation
103
-
104
- ```
105
- Higher elevation = larger shadow
106
- ├── Level 0: No shadow (flat on surface)
107
- ├── Level 1: Subtle shadow (slightly raised)
108
- ├── Level 2: Medium shadow (cards, buttons)
109
- ├── Level 3: Large shadow (modals, dropdowns)
110
- └── Level 4: Deep shadow (floating elements)
111
- ```
112
-
113
- ### Shadow Properties to Adjust
114
-
115
- ```css
116
- box-shadow: OFFSET-X OFFSET-Y BLUR SPREAD COLOR;
117
-
118
- /* Offset: direction of shadow */
119
- /* Blur: softness (larger = softer) */
120
- /* Spread: size expansion */
121
- /* Color: typically black with low opacity */
122
- ```
123
-
124
- ### Principles for Natural Shadows
125
-
126
- 1. **Y-offset larger than X** (light comes from above)
127
- 2. **Low opacity** (5-15% for subtle, 15-25% for pronounced)
128
- 3. **Multiple layers** for realism (ambient + direct)
129
- 4. **Blur scales with offset** (larger offset = larger blur)
130
-
131
- ### Dark Mode Shadows
132
- - Shadows less visible on dark backgrounds
133
- - May need to increase opacity
134
- - Or use glow/highlight instead
135
-
136
- ---
137
-
138
- ## 4. Gradient Principles
139
-
140
- ### Types and When to Use
141
-
142
- | Type | Pattern | Use Case |
143
- |------|---------|----------|
144
- | **Linear** | Color A → Color B along line | Backgrounds, buttons, headers |
145
- | **Radial** | Center → outward | Spotlights, focal points |
146
- | **Conic** | Around center | Pie charts, creative effects |
147
-
148
- ### Creating Harmonious Gradients
149
-
150
- ```
151
- Good Gradient Rules:
152
- ├── Use ADJACENT colors on wheel (analogous)
153
- ├── Or same hue with different lightness
154
- ├── Avoid complementary (can look harsh)
155
- └── Add middle stops for smoother transitions
156
- ```
157
-
158
- ### Gradient Syntax Pattern
159
-
160
- ```css
161
- .gradient {
162
- background: linear-gradient(
163
- DIRECTION, /* angle or to-keyword */
164
- COLOR-STOP-1, /* color + optional position */
165
- COLOR-STOP-2,
166
- /* ... more stops */
167
- );
168
- }
169
-
170
- /* DIRECTION examples: */
171
- /* 90deg, 135deg, to right, to bottom right */
172
- ```
173
-
174
- ### Mesh Gradients
175
-
176
- ```
177
- Multiple radial gradients overlapped:
178
- ├── Each at different position
179
- ├── Each with transparent falloff
180
- ├── **Mandatory for "Wow" factor in Hero sections**
181
- └── Creates organic, colorful effect (Search: "Aurora Gradient CSS")
182
- ```
183
-
184
- ---
185
-
186
- ## 5. Border Effects Principles
187
-
188
- ### Gradient Borders
189
-
190
- ```
191
- Technique: Pseudo-element with gradient background
192
- ├── Element has padding = border width
193
- ├── Pseudo-element fills with gradient
194
- └── Mask or clip creates border effect
195
- ```
196
-
197
- ### Animated Borders
198
-
199
- ```
200
- Technique: Rotating gradient or conic sweep
201
- ├── Pseudo-element larger than content
202
- ├── Animation rotates the gradient
203
- └── Overflow hidden clips to shape
204
- ```
205
-
206
- ### Glow Borders
207
-
208
- ```css
209
- /* Multiple box-shadows create glow */
210
- box-shadow:
211
- 0 0 SMALL-BLUR COLOR,
212
- 0 0 MEDIUM-BLUR COLOR,
213
- 0 0 LARGE-BLUR COLOR;
214
-
215
- /* Each layer adds to the glow */
216
- ```
217
-
218
- ---
219
-
220
- ## 6. Glow Effects Principles
221
-
222
- ### Text Glow
223
-
224
- ```css
225
- text-shadow:
226
- 0 0 BLUR-1 COLOR,
227
- 0 0 BLUR-2 COLOR,
228
- 0 0 BLUR-3 COLOR;
229
-
230
- /* Multiple layers = stronger glow */
231
- /* Larger blur = softer spread */
232
- ```
233
-
234
- ### Element Glow
235
-
236
- ```css
237
- box-shadow:
238
- 0 0 BLUR-1 COLOR,
239
- 0 0 BLUR-2 COLOR;
240
-
241
- /* Use color matching element for realistic glow */
242
- /* Lower opacity for subtle, higher for neon */
243
- ```
244
-
245
- ### Pulsing Glow Animation
246
-
247
- ```css
248
- @keyframes glow-pulse {
249
- 0%, 100% { box-shadow: 0 0 SMALL-BLUR COLOR; }
250
- 50% { box-shadow: 0 0 LARGE-BLUR COLOR; }
251
- }
252
-
253
- /* Easing and duration affect feel */
254
- ```
255
-
256
- ---
257
-
258
- ## 7. Overlay Techniques
259
-
260
- ### Gradient Overlay on Images
261
-
262
- ```
263
- Purpose: Improve text readability over images
264
- Pattern: Gradient from transparent to opaque
265
- Position: Where text will appear
266
- ```
267
-
268
- ```css
269
- .overlay::after {
270
- content: '';
271
- position: absolute;
272
- inset: 0;
273
- background: linear-gradient(
274
- DIRECTION,
275
- transparent PERCENTAGE,
276
- rgba(0,0,0,OPACITY) 100%
277
- );
278
- }
279
- ```
280
-
281
- ### Colored Overlay
282
-
283
- ```css
284
- /* Blend mode or layered gradient */
285
- background:
286
- linear-gradient(YOUR-COLOR-WITH-OPACITY),
287
- url('image.jpg');
288
- ```
289
-
290
- ---
291
-
292
- ## 8. Modern CSS Techniques
293
-
294
- ### Container Queries (Concept)
295
-
296
- ```
297
- Instead of viewport breakpoints:
298
- ├── Component responds to ITS container
299
- ├── Truly modular, reusable components
300
- └── Syntax: @container (condition) { }
301
- ```
302
-
303
- ### :has() Selector (Concept)
304
-
305
- ```
306
- Parent styling based on children:
307
- ├── "Parent that has X child"
308
- ├── Enables previously impossible patterns
309
- └── Progressive enhancement approach
310
- ```
311
-
312
- ### Scroll-Driven Animations (Concept)
313
-
314
- ```
315
- Animation progress tied to scroll:
316
- ├── Entry/exit animations on scroll
317
- ├── Parallax effects
318
- ├── Progress indicators
319
- └── View-based or scroll-based timeline
320
- ```
321
-
322
- ---
323
-
324
- ## 9. Performance Principles
325
-
326
- ### GPU-Accelerated Properties
327
-
328
- ```
329
- CHEAP to animate (GPU):
330
- ├── transform (translate, scale, rotate)
331
- └── opacity
332
-
333
- EXPENSIVE to animate (CPU):
334
- ├── width, height
335
- ├── top, left, right, bottom
336
- ├── margin, padding
337
- └── box-shadow (recalculates)
338
- ```
339
-
340
- ### will-change Usage
341
-
342
- ```css
343
- /* Use sparingly, only for heavy animations */
344
- .heavy-animation {
345
- will-change: transform;
346
- }
347
-
348
- /* Remove after animation if possible */
349
- ```
350
-
351
- ### Reduced Motion
352
-
353
- ```css
354
- @media (prefers-reduced-motion: reduce) {
355
- /* Disable or minimize animations */
356
- /* Respect user preference */
357
- }
358
- ```
359
-
360
- ---
361
-
362
- ## 10. Effect Selection Checklist
363
-
364
- Before applying any effect:
365
-
366
- - [ ] **Does it serve a purpose?** (not just decoration)
367
- - [ ] **Is it appropriate for the context?** (brand, audience)
368
- - [ ] **Have you varied from previous projects?** (avoid repetition)
369
- - [ ] **Is it accessible?** (contrast, motion sensitivity)
370
- - [ ] **Is it performant?** (especially on mobile)
371
- - [ ] **Did you ask user preference?** (if style open-ended)
372
-
373
- ### Anti-Patterns
374
-
375
- - ❌ Glassmorphism on every element (kitsch)
376
- - ❌ Dark + neon as default (lazy AI look)
377
- - ❌ **Static/Flat designs with no depth (FAILED)**
378
- - ❌ Effects that hurt readability
379
- - ❌ Animations without purpose
380
-
381
- ---
382
-
383
- > **Remember**: Effects enhance meaning. Choose based on purpose and context, not because it "looks cool."
@@ -1,219 +0,0 @@
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()