@paulojalowyj/openkit 0.1.1

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 (281) hide show
  1. package/.opencode/ARCHITECTURE.md +150 -0
  2. package/.opencode/LICENSE +21 -0
  3. package/.opencode/bin/cli.js +213 -0
  4. package/.opencode/commands/README.md +273 -0
  5. package/.opencode/commands/analyze.md +64 -0
  6. package/.opencode/commands/brainstorm.md +186 -0
  7. package/.opencode/commands/checklist.md +62 -0
  8. package/.opencode/commands/clarify.md +40 -0
  9. package/.opencode/commands/context.md +68 -0
  10. package/.opencode/commands/create.md +70 -0
  11. package/.opencode/commands/debug.md +160 -0
  12. package/.opencode/commands/deploy.md +244 -0
  13. package/.opencode/commands/doc.md +45 -0
  14. package/.opencode/commands/engineer.md +483 -0
  15. package/.opencode/commands/impl.md +242 -0
  16. package/.opencode/commands/plan.md +250 -0
  17. package/.opencode/commands/preview.md +87 -0
  18. package/.opencode/commands/specify.md +66 -0
  19. package/.opencode/commands/status.md +103 -0
  20. package/.opencode/commands/tasks.md +58 -0
  21. package/.opencode/commands/test.md +104 -0
  22. package/.opencode/commands/ui-ux.md +216 -0
  23. package/.opencode/prompts/backend-specialist.md +315 -0
  24. package/.opencode/prompts/chat.md +36 -0
  25. package/.opencode/prompts/database-architect.md +244 -0
  26. package/.opencode/prompts/debugger.md +244 -0
  27. package/.opencode/prompts/devops-engineer.md +259 -0
  28. package/.opencode/prompts/documentation-writer.md +121 -0
  29. package/.opencode/prompts/explorer-agent.md +92 -0
  30. package/.opencode/prompts/frontend-specialist.md +608 -0
  31. package/.opencode/prompts/mobile-developer.md +393 -0
  32. package/.opencode/prompts/orchestrator.md +472 -0
  33. package/.opencode/prompts/penetration-tester.md +205 -0
  34. package/.opencode/prompts/performance-optimizer.md +204 -0
  35. package/.opencode/prompts/product-owner.md +113 -0
  36. package/.opencode/prompts/project-planner.md +413 -0
  37. package/.opencode/prompts/security-auditor.md +187 -0
  38. package/.opencode/prompts/seo-specialist.md +128 -0
  39. package/.opencode/prompts/test-engineer.md +190 -0
  40. package/.opencode/rules/AGENT_TEMPLATE.md +391 -0
  41. package/.opencode/rules/MASTER.md +272 -0
  42. package/.opencode/rules/README.md +266 -0
  43. package/.opencode/rules/TODOLIST_EXAMPLES.md +675 -0
  44. package/.opencode/rules/TODOLIST_PROTOCOL.md +495 -0
  45. package/.opencode/rules/TOOL_USAGE.md +731 -0
  46. package/.opencode/scripts/auto_preview.py +100 -0
  47. package/.opencode/scripts/checklist.py +217 -0
  48. package/.opencode/scripts/session_manager.py +225 -0
  49. package/.opencode/scripts/verify_all.py +403 -0
  50. package/.opencode/skills/api-patterns/SKILL.md +80 -0
  51. package/.opencode/skills/api-patterns/api-style.md +42 -0
  52. package/.opencode/skills/api-patterns/auth.md +24 -0
  53. package/.opencode/skills/api-patterns/documentation.md +26 -0
  54. package/.opencode/skills/api-patterns/graphql.md +41 -0
  55. package/.opencode/skills/api-patterns/rate-limiting.md +31 -0
  56. package/.opencode/skills/api-patterns/response.md +37 -0
  57. package/.opencode/skills/api-patterns/rest.md +40 -0
  58. package/.opencode/skills/api-patterns/scripts/api_validator.py +211 -0
  59. package/.opencode/skills/api-patterns/security-testing.md +122 -0
  60. package/.opencode/skills/api-patterns/trpc.md +41 -0
  61. package/.opencode/skills/api-patterns/versioning.md +22 -0
  62. package/.opencode/skills/app-builder/SKILL.md +101 -0
  63. package/.opencode/skills/app-builder/agent-coordination.md +71 -0
  64. package/.opencode/skills/app-builder/feature-building.md +53 -0
  65. package/.opencode/skills/app-builder/project-detection.md +34 -0
  66. package/.opencode/skills/app-builder/scaffolding.md +116 -0
  67. package/.opencode/skills/app-builder/tech-stack.md +40 -0
  68. package/.opencode/skills/app-builder/templates/SKILL.md +39 -0
  69. package/.opencode/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  70. package/.opencode/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  71. package/.opencode/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  72. package/.opencode/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  73. package/.opencode/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  74. package/.opencode/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  75. package/.opencode/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  76. package/.opencode/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +81 -0
  77. package/.opencode/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +100 -0
  78. package/.opencode/skills/app-builder/templates/nextjs-static/TEMPLATE.md +106 -0
  79. package/.opencode/skills/app-builder/templates/nuxt-app/TEMPLATE.md +100 -0
  80. package/.opencode/skills/app-builder/templates/python-fastapi/TEMPLATE.md +82 -0
  81. package/.opencode/skills/app-builder/templates/react-native-app/TEMPLATE.md +93 -0
  82. package/.opencode/skills/architecture/SKILL.md +55 -0
  83. package/.opencode/skills/architecture/context-discovery.md +43 -0
  84. package/.opencode/skills/architecture/examples.md +94 -0
  85. package/.opencode/skills/architecture/pattern-selection.md +68 -0
  86. package/.opencode/skills/architecture/patterns-reference.md +50 -0
  87. package/.opencode/skills/architecture/trade-off-analysis.md +77 -0
  88. package/.opencode/skills/bash-linux/SKILL.md +199 -0
  89. package/.opencode/skills/behavioral-modes/SKILL.md +242 -0
  90. package/.opencode/skills/brainstorming/SKILL.md +163 -0
  91. package/.opencode/skills/brainstorming/dynamic-questioning.md +350 -0
  92. package/.opencode/skills/clean-code/SKILL.md +201 -0
  93. package/.opencode/skills/code-review-checklist/SKILL.md +109 -0
  94. package/.opencode/skills/database-design/SKILL.md +73 -0
  95. package/.opencode/skills/database-design/database-selection.md +43 -0
  96. package/.opencode/skills/database-design/indexing.md +39 -0
  97. package/.opencode/skills/database-design/migrations.md +48 -0
  98. package/.opencode/skills/database-design/optimization.md +36 -0
  99. package/.opencode/skills/database-design/orm-selection.md +30 -0
  100. package/.opencode/skills/database-design/schema-design.md +56 -0
  101. package/.opencode/skills/database-design/scripts/schema_validator.py +172 -0
  102. package/.opencode/skills/deployment-procedures/SKILL.md +241 -0
  103. package/.opencode/skills/documentation-templates/SKILL.md +279 -0
  104. package/.opencode/skills/frontend-design/SKILL.md +446 -0
  105. package/.opencode/skills/frontend-design/animation-guide.md +331 -0
  106. package/.opencode/skills/frontend-design/color-system.md +311 -0
  107. package/.opencode/skills/frontend-design/data/charts.csv +26 -0
  108. package/.opencode/skills/frontend-design/data/colors.csv +97 -0
  109. package/.opencode/skills/frontend-design/data/icons.csv +101 -0
  110. package/.opencode/skills/frontend-design/data/landing.csv +31 -0
  111. package/.opencode/skills/frontend-design/data/products.csv +97 -0
  112. package/.opencode/skills/frontend-design/data/prompts.csv +24 -0
  113. package/.opencode/skills/frontend-design/data/react-performance.csv +45 -0
  114. package/.opencode/skills/frontend-design/data/stacks/flutter.csv +53 -0
  115. package/.opencode/skills/frontend-design/data/stacks/html-tailwind.csv +56 -0
  116. package/.opencode/skills/frontend-design/data/stacks/jetpack-compose.csv +53 -0
  117. package/.opencode/skills/frontend-design/data/stacks/nextjs.csv +53 -0
  118. package/.opencode/skills/frontend-design/data/stacks/nuxt-ui.csv +51 -0
  119. package/.opencode/skills/frontend-design/data/stacks/nuxtjs.csv +59 -0
  120. package/.opencode/skills/frontend-design/data/stacks/react-native.csv +52 -0
  121. package/.opencode/skills/frontend-design/data/stacks/react.csv +54 -0
  122. package/.opencode/skills/frontend-design/data/stacks/shadcn.csv +61 -0
  123. package/.opencode/skills/frontend-design/data/stacks/svelte.csv +54 -0
  124. package/.opencode/skills/frontend-design/data/stacks/swiftui.csv +51 -0
  125. package/.opencode/skills/frontend-design/data/stacks/vue.csv +50 -0
  126. package/.opencode/skills/frontend-design/data/styles.csv +59 -0
  127. package/.opencode/skills/frontend-design/data/typography.csv +58 -0
  128. package/.opencode/skills/frontend-design/data/ui-reasoning.csv +101 -0
  129. package/.opencode/skills/frontend-design/data/ux-guidelines.csv +100 -0
  130. package/.opencode/skills/frontend-design/data/web-interface.csv +31 -0
  131. package/.opencode/skills/frontend-design/decision-trees.md +418 -0
  132. package/.opencode/skills/frontend-design/motion-graphics.md +306 -0
  133. package/.opencode/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  134. package/.opencode/skills/frontend-design/scripts/core.py +258 -0
  135. package/.opencode/skills/frontend-design/scripts/design_system.py +1067 -0
  136. package/.opencode/skills/frontend-design/scripts/search.py +106 -0
  137. package/.opencode/skills/frontend-design/scripts/ux_audit.py +735 -0
  138. package/.opencode/skills/frontend-design/typography-system.md +345 -0
  139. package/.opencode/skills/frontend-design/ux-psychology.md +541 -0
  140. package/.opencode/skills/frontend-design/visual-effects.md +383 -0
  141. package/.opencode/skills/geo-fundamentals/SKILL.md +156 -0
  142. package/.opencode/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  143. package/.opencode/skills/i18n-localization/SKILL.md +154 -0
  144. package/.opencode/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  145. package/.opencode/skills/intelligent-routing/SKILL.md +335 -0
  146. package/.opencode/skills/lint-and-validate/SKILL.md +45 -0
  147. package/.opencode/skills/lint-and-validate/scripts/lint_runner.py +172 -0
  148. package/.opencode/skills/lint-and-validate/scripts/type_coverage.py +173 -0
  149. package/.opencode/skills/mobile-design/SKILL.md +394 -0
  150. package/.opencode/skills/mobile-design/decision-trees.md +516 -0
  151. package/.opencode/skills/mobile-design/mobile-backend.md +491 -0
  152. package/.opencode/skills/mobile-design/mobile-color-system.md +420 -0
  153. package/.opencode/skills/mobile-design/mobile-debugging.md +122 -0
  154. package/.opencode/skills/mobile-design/mobile-design-thinking.md +357 -0
  155. package/.opencode/skills/mobile-design/mobile-navigation.md +458 -0
  156. package/.opencode/skills/mobile-design/mobile-performance.md +767 -0
  157. package/.opencode/skills/mobile-design/mobile-testing.md +356 -0
  158. package/.opencode/skills/mobile-design/mobile-typography.md +433 -0
  159. package/.opencode/skills/mobile-design/platform-android.md +666 -0
  160. package/.opencode/skills/mobile-design/platform-ios.md +561 -0
  161. package/.opencode/skills/mobile-design/scripts/mobile_audit.py +670 -0
  162. package/.opencode/skills/mobile-design/touch-psychology.md +537 -0
  163. package/.opencode/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +312 -0
  164. package/.opencode/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  165. package/.opencode/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  166. package/.opencode/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  167. package/.opencode/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  168. package/.opencode/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  169. package/.opencode/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  170. package/.opencode/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  171. package/.opencode/skills/nextjs-react-expert/SKILL.md +267 -0
  172. package/.opencode/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  173. package/.opencode/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  174. package/.opencode/skills/parallel-agents/SKILL.md +175 -0
  175. package/.opencode/skills/performance-profiling/SKILL.md +143 -0
  176. package/.opencode/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
  177. package/.opencode/skills/plan-writing/SKILL.md +176 -0
  178. package/.opencode/skills/python-patterns/SKILL.md +462 -0
  179. package/.opencode/skills/red-team-tactics/SKILL.md +199 -0
  180. package/.opencode/skills/seo-fundamentals/SKILL.md +129 -0
  181. package/.opencode/skills/seo-fundamentals/scripts/seo_checker.py +222 -0
  182. package/.opencode/skills/server-management/SKILL.md +161 -0
  183. package/.opencode/skills/stack-selection/SKILL.md +448 -0
  184. package/.opencode/skills/systematic-debugging/SKILL.md +109 -0
  185. package/.opencode/skills/tailwind-patterns/SKILL.md +269 -0
  186. package/.opencode/skills/tdd-workflow/SKILL.md +149 -0
  187. package/.opencode/skills/testing-patterns/SKILL.md +178 -0
  188. package/.opencode/skills/testing-patterns/scripts/test_runner.py +219 -0
  189. package/.opencode/skills/vulnerability-scanner/SKILL.md +276 -0
  190. package/.opencode/skills/vulnerability-scanner/checklists.md +121 -0
  191. package/.opencode/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  192. package/.opencode/skills/web-design-guidelines/SKILL.md +57 -0
  193. package/.opencode/skills/webapp-testing/SKILL.md +187 -0
  194. package/.opencode/skills/webapp-testing/scripts/playwright_runner.py +173 -0
  195. package/.opencode/templates/DOCS-ACTION_ITEMS.md +5 -0
  196. package/.opencode/templates/DOCS-API.md +11 -0
  197. package/.opencode/templates/DOCS-BACKEND.md +10 -0
  198. package/.opencode/templates/DOCS-CONTEXT.md +25 -0
  199. package/.opencode/templates/DOCS-DATABASE.md +10 -0
  200. package/.opencode/templates/DOCS-FRONTEND.md +11 -0
  201. package/.opencode/templates/DOCS-QUALITY_GATES.md +20 -0
  202. package/.opencode/templates/DOCS-SECURITY.md +17 -0
  203. package/.opencode/templates/SDD-AcceptanceCriteria.md +21 -0
  204. package/.opencode/templates/SDD-Checklist.md +27 -0
  205. package/.opencode/templates/SDD-Contracts.md +21 -0
  206. package/.opencode/templates/SDD-Plan.md +45 -0
  207. package/.opencode/templates/SDD-ProblemStatement.md +25 -0
  208. package/.opencode/templates/SDD-Quickstart.md +23 -0
  209. package/.opencode/templates/SDD-Research.md +24 -0
  210. package/.opencode/templates/SDD-Risks.md +16 -0
  211. package/.opencode/templates/SDD-Tasks.md +41 -0
  212. package/.opencode/templates/SDD-UserStories.md +45 -0
  213. package/.opencode/templates/TechStack.md +111 -0
  214. package/LICENSE +21 -0
  215. package/PACKAGE_STATUS.md +97 -0
  216. package/README.md +251 -0
  217. package/README.pt-BR.md +192 -0
  218. package/bin/cli.js +505 -0
  219. package/blueprints/fullstack/.env.example +15 -0
  220. package/blueprints/fullstack/AGENTS.md +3 -0
  221. package/blueprints/fullstack/README.md +65 -0
  222. package/blueprints/fullstack/backend/.dockerignore +10 -0
  223. package/blueprints/fullstack/backend/.python-version +1 -0
  224. package/blueprints/fullstack/backend/Dockerfile +33 -0
  225. package/blueprints/fullstack/backend/alembic.ini +40 -0
  226. package/blueprints/fullstack/backend/app/__init__.py +0 -0
  227. package/blueprints/fullstack/backend/app/api/README.md +3 -0
  228. package/blueprints/fullstack/backend/app/api/__init__.py +0 -0
  229. package/blueprints/fullstack/backend/app/celery_app.py +5 -0
  230. package/blueprints/fullstack/backend/app/core/README.md +3 -0
  231. package/blueprints/fullstack/backend/app/core/__init__.py +0 -0
  232. package/blueprints/fullstack/backend/app/database.py +14 -0
  233. package/blueprints/fullstack/backend/app/main.py +16 -0
  234. package/blueprints/fullstack/backend/app/models/README.md +3 -0
  235. package/blueprints/fullstack/backend/app/models/__init__.py +3 -0
  236. package/blueprints/fullstack/backend/app/models/item.py +10 -0
  237. package/blueprints/fullstack/backend/app/routers/__init__.py +0 -0
  238. package/blueprints/fullstack/backend/app/routers/items.py +20 -0
  239. package/blueprints/fullstack/backend/app/schemas/README.md +3 -0
  240. package/blueprints/fullstack/backend/app/schemas/__init__.py +0 -0
  241. package/blueprints/fullstack/backend/app/schemas/item.py +15 -0
  242. package/blueprints/fullstack/backend/app/services/item_service.py +23 -0
  243. package/blueprints/fullstack/backend/app/settings.py +36 -0
  244. package/blueprints/fullstack/backend/app/tasks/README.md +3 -0
  245. package/blueprints/fullstack/backend/app/tasks/__init__.py +0 -0
  246. package/blueprints/fullstack/backend/migrations/env.py +47 -0
  247. package/blueprints/fullstack/backend/migrations/versions/0001_initial_sample_data.py +31 -0
  248. package/blueprints/fullstack/backend/pyproject.toml +45 -0
  249. package/blueprints/fullstack/docker-compose.dev.yml +114 -0
  250. package/blueprints/fullstack/docker-compose.prod.yml +90 -0
  251. package/blueprints/fullstack/docs/README.md +29 -0
  252. package/blueprints/fullstack/docs/engineering/api/README.md +3 -0
  253. package/blueprints/fullstack/docs/engineering/architecture/README.md +3 -0
  254. package/blueprints/fullstack/docs/engineering/backend/README.md +3 -0
  255. package/blueprints/fullstack/docs/engineering/frontend/README.md +3 -0
  256. package/blueprints/fullstack/docs/engineering/security/README.md +3 -0
  257. package/blueprints/fullstack/docs/engineering/standards/README.md +3 -0
  258. package/blueprints/fullstack/frontend/.dockerignore +4 -0
  259. package/blueprints/fullstack/frontend/Dockerfile +23 -0
  260. package/blueprints/fullstack/frontend/components.json +17 -0
  261. package/blueprints/fullstack/frontend/index.html +12 -0
  262. package/blueprints/fullstack/frontend/package.json +28 -0
  263. package/blueprints/fullstack/frontend/src/components/README.md +3 -0
  264. package/blueprints/fullstack/frontend/src/components/ui/.keep +4 -0
  265. package/blueprints/fullstack/frontend/src/index.css +57 -0
  266. package/blueprints/fullstack/frontend/src/lib/README.md +3 -0
  267. package/blueprints/fullstack/frontend/src/lib/api.ts +1 -0
  268. package/blueprints/fullstack/frontend/src/lib/utils.ts +6 -0
  269. package/blueprints/fullstack/frontend/src/main.tsx +66 -0
  270. package/blueprints/fullstack/frontend/src/routes/README.md +3 -0
  271. package/blueprints/fullstack/frontend/src/routes/root.tsx +7 -0
  272. package/blueprints/fullstack/frontend/src/vite-env.d.ts +1 -0
  273. package/blueprints/fullstack/frontend/tailwind.config.ts +12 -0
  274. package/blueprints/fullstack/frontend/tsconfig.json +13 -0
  275. package/blueprints/fullstack/frontend/tsconfig.node.json +12 -0
  276. package/blueprints/fullstack/frontend/vite.config.ts +12 -0
  277. package/index.js +14 -0
  278. package/opencode.json +306 -0
  279. package/package.json +57 -0
  280. package/scripts/prepare.js +65 -0
  281. package/scripts/update-version.js +29 -0
@@ -0,0 +1,173 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Skill: webapp-testing
4
+ Script: playwright_runner.py
5
+ Purpose: Run basic Playwright browser tests
6
+ Usage: python playwright_runner.py <url> [--screenshot]
7
+ Output: JSON with page info, health status, and optional screenshot path
8
+ Note: Requires playwright (pip install playwright && playwright install chromium)
9
+ Screenshots: Saved to system temp directory (auto-cleaned by OS)
10
+ """
11
+ import sys
12
+ import json
13
+ import os
14
+ import tempfile
15
+ from datetime import datetime
16
+
17
+ # Fix Windows console encoding for Unicode output
18
+ try:
19
+ sys.stdout.reconfigure(encoding='utf-8', errors='replace')
20
+ sys.stderr.reconfigure(encoding='utf-8', errors='replace')
21
+ except AttributeError:
22
+ pass # Python < 3.7
23
+
24
+ try:
25
+ from playwright.sync_api import sync_playwright
26
+ PLAYWRIGHT_AVAILABLE = True
27
+ except ImportError:
28
+ PLAYWRIGHT_AVAILABLE = False
29
+
30
+
31
+ def run_basic_test(url: str, take_screenshot: bool = False) -> dict:
32
+ """Run basic browser test on URL."""
33
+ if not PLAYWRIGHT_AVAILABLE:
34
+ return {
35
+ "error": "Playwright not installed",
36
+ "fix": "pip install playwright && playwright install chromium"
37
+ }
38
+
39
+ result = {
40
+ "url": url,
41
+ "timestamp": datetime.now().isoformat(),
42
+ "status": "pending"
43
+ }
44
+
45
+ try:
46
+ with sync_playwright() as p:
47
+ browser = p.chromium.launch(headless=True)
48
+ context = browser.new_context(
49
+ viewport={"width": 1280, "height": 720},
50
+ user_agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"
51
+ )
52
+ page = context.new_page()
53
+
54
+ # Navigate
55
+ response = page.goto(url, wait_until="networkidle", timeout=30000)
56
+
57
+ # Basic info
58
+ result["page"] = {
59
+ "title": page.title(),
60
+ "url": page.url,
61
+ "status_code": response.status if response else None
62
+ }
63
+
64
+ # Health checks
65
+ result["health"] = {
66
+ "loaded": response.ok if response else False,
67
+ "has_title": bool(page.title()),
68
+ "has_h1": page.locator("h1").count() > 0,
69
+ "has_links": page.locator("a").count() > 0,
70
+ "has_images": page.locator("img").count() > 0
71
+ }
72
+
73
+ # Console errors
74
+ console_errors = []
75
+ page.on("console", lambda msg: console_errors.append(msg.text) if msg.type == "error" else None)
76
+
77
+ # Performance metrics
78
+ result["performance"] = {
79
+ "dom_content_loaded": page.evaluate("window.performance.timing.domContentLoadedEventEnd - window.performance.timing.navigationStart"),
80
+ "load_complete": page.evaluate("window.performance.timing.loadEventEnd - window.performance.timing.navigationStart")
81
+ }
82
+
83
+ # Screenshot - uses system temp directory (cross-platform, auto-cleaned)
84
+ if take_screenshot:
85
+ # Cross-platform: Windows=%TEMP%, Linux/macOS=/tmp
86
+ screenshot_dir = os.path.join(tempfile.gettempdir(), "maestro_screenshots")
87
+ os.makedirs(screenshot_dir, exist_ok=True)
88
+ screenshot_path = os.path.join(screenshot_dir, f"screenshot_{datetime.now().strftime('%Y%m%d_%H%M%S')}.png")
89
+ page.screenshot(path=screenshot_path, full_page=True)
90
+ result["screenshot"] = screenshot_path
91
+ result["screenshot_note"] = "Saved to temp directory (auto-cleaned by OS)"
92
+
93
+ # Element counts
94
+ result["elements"] = {
95
+ "links": page.locator("a").count(),
96
+ "buttons": page.locator("button").count(),
97
+ "inputs": page.locator("input").count(),
98
+ "images": page.locator("img").count(),
99
+ "forms": page.locator("form").count()
100
+ }
101
+
102
+ browser.close()
103
+
104
+ result["status"] = "success" if result["health"]["loaded"] else "failed"
105
+ result["summary"] = "[OK] Page loaded successfully" if result["status"] == "success" else "[X] Page failed to load"
106
+
107
+ except Exception as e:
108
+ result["status"] = "error"
109
+ result["error"] = str(e)
110
+ result["summary"] = f"[X] Error: {str(e)[:100]}"
111
+
112
+ return result
113
+
114
+
115
+ def run_accessibility_check(url: str) -> dict:
116
+ """Run basic accessibility check."""
117
+ if not PLAYWRIGHT_AVAILABLE:
118
+ return {"error": "Playwright not installed"}
119
+
120
+ result = {"url": url, "accessibility": {}}
121
+
122
+ try:
123
+ with sync_playwright() as p:
124
+ browser = p.chromium.launch(headless=True)
125
+ page = browser.new_page()
126
+ page.goto(url, wait_until="networkidle", timeout=30000)
127
+
128
+ # Basic a11y checks
129
+ result["accessibility"] = {
130
+ "images_with_alt": page.locator("img[alt]").count(),
131
+ "images_without_alt": page.locator("img:not([alt])").count(),
132
+ "buttons_with_label": page.locator("button[aria-label], button:has-text('')").count(),
133
+ "links_with_text": page.locator("a:has-text('')").count(),
134
+ "form_labels": page.locator("label").count(),
135
+ "headings": {
136
+ "h1": page.locator("h1").count(),
137
+ "h2": page.locator("h2").count(),
138
+ "h3": page.locator("h3").count()
139
+ }
140
+ }
141
+
142
+ browser.close()
143
+ result["status"] = "success"
144
+
145
+ except Exception as e:
146
+ result["status"] = "error"
147
+ result["error"] = str(e)
148
+
149
+ return result
150
+
151
+
152
+ if __name__ == "__main__":
153
+ if len(sys.argv) < 2:
154
+ print(json.dumps({
155
+ "error": "Usage: python playwright_runner.py <url> [--screenshot] [--a11y]",
156
+ "examples": [
157
+ "python playwright_runner.py https://example.com",
158
+ "python playwright_runner.py https://example.com --screenshot",
159
+ "python playwright_runner.py https://example.com --a11y"
160
+ ]
161
+ }, indent=2))
162
+ sys.exit(1)
163
+
164
+ url = sys.argv[1]
165
+ take_screenshot = "--screenshot" in sys.argv
166
+ check_a11y = "--a11y" in sys.argv
167
+
168
+ if check_a11y:
169
+ result = run_accessibility_check(url)
170
+ else:
171
+ result = run_basic_test(url, take_screenshot)
172
+
173
+ print(json.dumps(result, indent=2))
@@ -0,0 +1,5 @@
1
+ # ACTION_ITEMS
2
+
3
+ | Priority | Item | Impact | Effort | Owner | Notes |
4
+ |---|---|---|---|---|---|
5
+ | P0 | | | | | |
@@ -0,0 +1,11 @@
1
+ # API
2
+
3
+ ## Surface
4
+
5
+ | Type | Name | Location | Notes |
6
+ |---|---|---|---|
7
+ | CLI | | | |
8
+
9
+ ## Contracts
10
+
11
+ - [Schema / examples]
@@ -0,0 +1,10 @@
1
+ # BACKEND
2
+
3
+ ## Endpoints
4
+
5
+ | Method | Route | Handler | Auth | Notes |
6
+ |---|---|---|---|---|
7
+
8
+ ## Jobs / Async
9
+
10
+ - [Job]
@@ -0,0 +1,25 @@
1
+ # CONTEXT
2
+
3
+ **Created**: [YYYY-MM-DD]
4
+ **Scope**: [Full | Backend | Frontend]
5
+
6
+ ## Executive Summary (10 bullets)
7
+
8
+ - [Key fact 1]
9
+ - [Key fact 2]
10
+
11
+ ## Repository Map
12
+
13
+ | Area | Path(s) | Notes |
14
+ |---|---|---|
15
+ | CLI | | |
16
+ | Backend | | |
17
+ | Frontend | | |
18
+
19
+ ## Key Flows
20
+
21
+ 1. [Flow name]: [entry] -> [core] -> [outputs]
22
+
23
+ ## Evidence
24
+
25
+ - `path/to/file.ext`: short snippet / reason
@@ -0,0 +1,10 @@
1
+ # DATABASE
2
+
3
+ ## Entities
4
+
5
+ | Entity | Keys | Relations | Indexes |
6
+ |---|---|---|---|
7
+
8
+ ## Migrations
9
+
10
+ - [Tool] + [current head]
@@ -0,0 +1,11 @@
1
+ # FRONTEND
2
+
3
+ ## Routes
4
+
5
+ | Path | Guard | Component | Notes |
6
+ |---|---|---|---|
7
+
8
+ ## Data Fetching
9
+
10
+ | QueryKey | Endpoint | Cache | Notes |
11
+ |---|---|---|---|
@@ -0,0 +1,20 @@
1
+ # QUALITY_GATES
2
+
3
+ ## Required
4
+
5
+ - Lint
6
+ - Type check
7
+ - Tests
8
+ - Security scan
9
+
10
+ ## Commands
11
+
12
+ ```bash
13
+ # Examples (adjust to project stack)
14
+ npm test
15
+ python .opencode/scripts/checklist.py .
16
+ ```
17
+
18
+ ## CI Notes
19
+
20
+ - [Non-interactive behavior]
@@ -0,0 +1,17 @@
1
+ # SECURITY
2
+
3
+ ## Threats
4
+
5
+ - [Threat]
6
+
7
+ ## Controls
8
+
9
+ - [Control]
10
+
11
+ ## Gaps
12
+
13
+ - [Gap]
14
+
15
+ ## Prioritized Actions
16
+
17
+ - [Action]
@@ -0,0 +1,21 @@
1
+ # Acceptance Criteria
2
+
3
+ **Feature**: [Feature name]
4
+ **Created**: [YYYY-MM-DD]
5
+
6
+ ## Functional Requirements
7
+
8
+ - FR-001: [Requirement]
9
+ - FR-002: [Requirement]
10
+ - FR-003: [Requirement]
11
+
12
+ ## Edge Cases
13
+
14
+ - [Edge case 1]
15
+ - [Edge case 2]
16
+
17
+ ## Success Criteria (measurable)
18
+
19
+ - SC-001: [Metric or measurable outcome]
20
+ - SC-002: [Metric or measurable outcome]
21
+ - SC-003: [Metric or measurable outcome]
@@ -0,0 +1,27 @@
1
+ # Specification and Plan Checklist
2
+
3
+ **Feature**: [Feature name]
4
+ **Created**: [YYYY-MM-DD]
5
+
6
+ ## Spec Quality
7
+
8
+ - [ ] Problem statement is clear and scoped
9
+ - [ ] User stories are prioritized and independently testable
10
+ - [ ] Acceptance criteria are measurable and tech-agnostic
11
+ - [ ] Edge cases are documented
12
+ - [ ] Risks are documented
13
+
14
+ ## Plan Quality
15
+
16
+ - [ ] Plan references requirements and stories
17
+ - [ ] Data model defined (if applicable)
18
+ - [ ] Contracts defined (if applicable)
19
+ - [ ] Testing strategy defined
20
+ - [ ] Risks mitigations listed
21
+
22
+ ## Tasks Quality
23
+
24
+ - [ ] Tasks map to user stories
25
+ - [ ] Tasks include file paths
26
+ - [ ] Dependencies and parallel work marked
27
+ - [ ] Verification steps defined
@@ -0,0 +1,21 @@
1
+ # Contracts
2
+
3
+ **Feature**: [Feature name]
4
+ **Created**: [YYYY-MM-DD]
5
+
6
+ ## Contract List
7
+
8
+ | Name | Type | Inputs | Outputs | Notes |
9
+ |------|------|--------|---------|-------|
10
+ | [Contract name] | [API/Event/Job] | [Input summary] | [Output summary] | [Notes] |
11
+
12
+ ## Contract Details
13
+
14
+ ### [Contract Name]
15
+
16
+ - **Type**: [API/Event/Job]
17
+ - **Purpose**: [Why it exists]
18
+ - **Inputs**: [Fields and constraints]
19
+ - **Outputs**: [Fields and constraints]
20
+ - **Errors**: [Error cases]
21
+ - **Auth/Permissions**: [If applicable]
@@ -0,0 +1,45 @@
1
+ # Implementation Plan
2
+
3
+ **Feature**: [Feature name]
4
+ **Created**: [YYYY-MM-DD]
5
+ **Inputs**: docs/requirements/<feature>/
6
+
7
+ ## Summary
8
+
9
+ [One paragraph summarizing the plan and the approach.]
10
+
11
+ ## Technical Context
12
+
13
+ - **Project type**: [single/web/mobile]
14
+ - **Target platform**: [e.g., web, iOS, API]
15
+ - **Constraints**: [latency, scale, compliance]
16
+ - **Dependencies**: [major components or services]
17
+
18
+ ## Architecture Overview
19
+
20
+ [High-level flow, components, and integrations. No code-level details.]
21
+
22
+ ## Data Model (if applicable)
23
+
24
+ - [Entity 1]: [fields, relationships]
25
+ - [Entity 2]: [fields, relationships]
26
+
27
+ ## Contracts (if applicable)
28
+
29
+ - [Endpoint/Event]: [purpose, input, output]
30
+
31
+ ## Testing Strategy
32
+
33
+ - Contract tests: [scope]
34
+ - Integration tests: [scope]
35
+ - E2E tests: [scope]
36
+
37
+ ## Risks and Mitigations
38
+
39
+ - [Risk]: [Mitigation]
40
+
41
+ ## Acceptance Mapping
42
+
43
+ - FR-001 -> [Plan section]
44
+ - FR-002 -> [Plan section]
45
+ - FR-003 -> [Plan section]
@@ -0,0 +1,25 @@
1
+ # Problem Statement
2
+
3
+ **Feature**: [Feature name]
4
+ **Created**: [YYYY-MM-DD]
5
+ **Owner**: [Role or name]
6
+
7
+ ## Summary
8
+
9
+ [One paragraph describing the problem and why it matters.]
10
+
11
+ ## Goals
12
+
13
+ - [Goal 1]
14
+ - [Goal 2]
15
+ - [Goal 3]
16
+
17
+ ## Non-Goals
18
+
19
+ - [Out of scope item 1]
20
+ - [Out of scope item 2]
21
+
22
+ ## Assumptions
23
+
24
+ - [Assumption 1]
25
+ - [Assumption 2]
@@ -0,0 +1,23 @@
1
+ # Quickstart
2
+
3
+ **Feature**: [Feature name]
4
+ **Created**: [YYYY-MM-DD]
5
+
6
+ ## Purpose
7
+
8
+ [Short description of what this quickstart enables.]
9
+
10
+ ## Prerequisites
11
+
12
+ - [Prerequisite 1]
13
+ - [Prerequisite 2]
14
+
15
+ ## Steps
16
+
17
+ 1. [Step 1]
18
+ 2. [Step 2]
19
+ 3. [Step 3]
20
+
21
+ ## Verification
22
+
23
+ - [How to verify success]
@@ -0,0 +1,24 @@
1
+ # Research Notes
2
+
3
+ **Feature**: [Feature name]
4
+ **Created**: [YYYY-MM-DD]
5
+
6
+ ## Questions
7
+
8
+ - [Question or unknown]
9
+ - [Question or unknown]
10
+
11
+ ## Decisions
12
+
13
+ | Decision | Rationale | Alternatives |
14
+ |----------|-----------|--------------|
15
+ | [Decision] | [Why] | [Alternatives considered] |
16
+
17
+ ## Assumptions
18
+
19
+ - [Assumption]
20
+ - [Assumption]
21
+
22
+ ## References
23
+
24
+ - [Link or doc]
@@ -0,0 +1,16 @@
1
+ # Risks
2
+
3
+ **Feature**: [Feature name]
4
+ **Created**: [YYYY-MM-DD]
5
+
6
+ ## Risk Register
7
+
8
+ | Risk | Impact | Likelihood | Mitigation |
9
+ |------|--------|------------|------------|
10
+ | [Risk 1] | [High/Med/Low] | [High/Med/Low] | [Mitigation] |
11
+ | [Risk 2] | [High/Med/Low] | [High/Med/Low] | [Mitigation] |
12
+
13
+ ## Open Questions
14
+
15
+ - [Question 1]
16
+ - [Question 2]
@@ -0,0 +1,41 @@
1
+ # Tasks
2
+
3
+ **Feature**: [Feature name]
4
+ **Created**: [YYYY-MM-DD]
5
+ **Inputs**: docs/requirements/<feature>/PLAN.md
6
+
7
+ ## Format
8
+
9
+ - [ID] [P?] [Story] Description (include file paths)
10
+ - [P] indicates parallelizable work
11
+
12
+ ## Phase 1 - Setup
13
+
14
+ - [ ] T001 Create required directories and files
15
+ - [ ] T002 [P] Configure linting or tooling changes (if required)
16
+
17
+ ## Phase 2 - Foundations
18
+
19
+ - [ ] T010 Setup data model
20
+ - [ ] T011 [P] Define contracts or interfaces
21
+
22
+ ## Phase 3 - User Story US1
23
+
24
+ - [ ] T020 [US1] Implement core capability
25
+ - [ ] T021 [US1] Add validations and errors
26
+ - [ ] T022 [US1] Add tests (if required)
27
+
28
+ ## Phase 4 - User Story US2
29
+
30
+ - [ ] T030 [US2] Implement capability
31
+ - [ ] T031 [US2] Add tests (if required)
32
+
33
+ ## Phase 5 - Polish
34
+
35
+ - [ ] T040 Documentation updates in docs/
36
+ - [ ] T041 Performance or UX refinements
37
+
38
+ ## Verification
39
+
40
+ - [ ] V001 Confirm acceptance criteria coverage
41
+ - [ ] V002 Run relevant test suites
@@ -0,0 +1,45 @@
1
+ # User Stories
2
+
3
+ **Feature**: [Feature name]
4
+ **Created**: [YYYY-MM-DD]
5
+
6
+ ## Story Format
7
+
8
+ As a [role], I want [capability] so that [benefit].
9
+
10
+ ## Stories (prioritized)
11
+
12
+ ### US1 - [Title] (Priority: P1)
13
+
14
+ - **Story**: As a [role], I want [capability] so that [benefit].
15
+ - **Why this priority**: [Reason]
16
+ - **Independent test**: [How to validate this story alone]
17
+
18
+ **Acceptance scenarios**:
19
+
20
+ 1. Given [context], when [action], then [outcome].
21
+ 2. Given [context], when [action], then [outcome].
22
+
23
+ ---
24
+
25
+ ### US2 - [Title] (Priority: P2)
26
+
27
+ - **Story**: As a [role], I want [capability] so that [benefit].
28
+ - **Why this priority**: [Reason]
29
+ - **Independent test**: [How to validate this story alone]
30
+
31
+ **Acceptance scenarios**:
32
+
33
+ 1. Given [context], when [action], then [outcome].
34
+
35
+ ---
36
+
37
+ ### US3 - [Title] (Priority: P3)
38
+
39
+ - **Story**: As a [role], I want [capability] so that [benefit].
40
+ - **Why this priority**: [Reason]
41
+ - **Independent test**: [How to validate this story alone]
42
+
43
+ **Acceptance scenarios**:
44
+
45
+ 1. Given [context], when [action], then [outcome].