@baselane/packs 0.1.5 → 0.1.6

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 (445) hide show
  1. package/package.json +2 -2
  2. package/packs/full-harness/pack.json +3093 -0
  3. package/packs/full-harness/rendered/.claude/agents/a11y-architect.md +138 -0
  4. package/packs/full-harness/rendered/.claude/agents/agent-evaluator.md +206 -0
  5. package/packs/full-harness/rendered/.claude/agents/architect.md +209 -0
  6. package/packs/full-harness/rendered/.claude/agents/build-error-resolver.md +114 -0
  7. package/packs/full-harness/rendered/.claude/agents/chief-of-staff.md +149 -0
  8. package/packs/full-harness/rendered/.claude/agents/code-architect.md +71 -0
  9. package/packs/full-harness/rendered/.claude/agents/code-explorer.md +69 -0
  10. package/packs/full-harness/rendered/.claude/agents/code-reviewer.md +312 -0
  11. package/packs/full-harness/rendered/.claude/agents/code-simplifier.md +47 -0
  12. package/packs/full-harness/rendered/.claude/agents/comment-analyzer.md +45 -0
  13. package/packs/full-harness/rendered/.claude/agents/conversation-analyzer.md +52 -0
  14. package/packs/full-harness/rendered/.claude/agents/cpp-build-resolver.md +90 -0
  15. package/packs/full-harness/rendered/.claude/agents/cpp-reviewer.md +64 -0
  16. package/packs/full-harness/rendered/.claude/agents/csharp-reviewer.md +93 -0
  17. package/packs/full-harness/rendered/.claude/agents/dart-build-resolver.md +201 -0
  18. package/packs/full-harness/rendered/.claude/agents/database-reviewer.md +91 -0
  19. package/packs/full-harness/rendered/.claude/agents/django-build-resolver.md +243 -0
  20. package/packs/full-harness/rendered/.claude/agents/django-reviewer.md +149 -0
  21. package/packs/full-harness/rendered/.claude/agents/doc-updater.md +107 -0
  22. package/packs/full-harness/rendered/.claude/agents/docs-lookup.md +64 -0
  23. package/packs/full-harness/rendered/.claude/agents/e2e-runner.md +107 -0
  24. package/packs/full-harness/rendered/.claude/agents/fastapi-reviewer.md +68 -0
  25. package/packs/full-harness/rendered/.claude/agents/flutter-reviewer.md +241 -0
  26. package/packs/full-harness/rendered/.claude/agents/fsharp-reviewer.md +92 -0
  27. package/packs/full-harness/rendered/.claude/agents/gan-evaluator.md +206 -0
  28. package/packs/full-harness/rendered/.claude/agents/gan-generator.md +128 -0
  29. package/packs/full-harness/rendered/.claude/agents/gan-planner.md +96 -0
  30. package/packs/full-harness/rendered/.claude/agents/go-build-resolver.md +94 -0
  31. package/packs/full-harness/rendered/.claude/agents/go-reviewer.md +68 -0
  32. package/packs/full-harness/rendered/.claude/agents/harmonyos-app-resolver.md +173 -0
  33. package/packs/full-harness/rendered/.claude/agents/harness-optimizer.md +32 -0
  34. package/packs/full-harness/rendered/.claude/agents/healthcare-reviewer.md +83 -0
  35. package/packs/full-harness/rendered/.claude/agents/homelab-architect.md +94 -0
  36. package/packs/full-harness/rendered/.claude/agents/java-build-resolver.md +266 -0
  37. package/packs/full-harness/rendered/.claude/agents/java-reviewer.md +179 -0
  38. package/packs/full-harness/rendered/.claude/agents/kotlin-build-resolver.md +118 -0
  39. package/packs/full-harness/rendered/.claude/agents/kotlin-reviewer.md +157 -0
  40. package/packs/full-harness/rendered/.claude/agents/loop-operator.md +33 -0
  41. package/packs/full-harness/rendered/.claude/agents/marketing-agent.md +141 -0
  42. package/packs/full-harness/rendered/.claude/agents/mle-reviewer.md +153 -0
  43. package/packs/full-harness/rendered/.claude/agents/network-architect.md +92 -0
  44. package/packs/full-harness/rendered/.claude/agents/network-config-reviewer.md +94 -0
  45. package/packs/full-harness/rendered/.claude/agents/network-troubleshooter.md +116 -0
  46. package/packs/full-harness/rendered/.claude/agents/opensource-forker.md +198 -0
  47. package/packs/full-harness/rendered/.claude/agents/opensource-packager.md +249 -0
  48. package/packs/full-harness/rendered/.claude/agents/opensource-sanitizer.md +188 -0
  49. package/packs/full-harness/rendered/.claude/agents/performance-optimizer.md +446 -0
  50. package/packs/full-harness/rendered/.claude/agents/php-reviewer.md +92 -0
  51. package/packs/full-harness/rendered/.claude/agents/planner.md +210 -0
  52. package/packs/full-harness/rendered/.claude/agents/pr-test-analyzer.md +45 -0
  53. package/packs/full-harness/rendered/.claude/agents/python-reviewer.md +90 -0
  54. package/packs/full-harness/rendered/.claude/agents/pytorch-build-resolver.md +120 -0
  55. package/packs/full-harness/rendered/.claude/agents/react-build-resolver.md +206 -0
  56. package/packs/full-harness/rendered/.claude/agents/react-reviewer.md +156 -0
  57. package/packs/full-harness/rendered/.claude/agents/refactor-cleaner.md +85 -0
  58. package/packs/full-harness/rendered/.claude/agents/rust-build-resolver.md +148 -0
  59. package/packs/full-harness/rendered/.claude/agents/rust-reviewer.md +85 -0
  60. package/packs/full-harness/rendered/.claude/agents/security-reviewer.md +108 -0
  61. package/packs/full-harness/rendered/.claude/agents/seo-specialist.md +54 -0
  62. package/packs/full-harness/rendered/.claude/agents/silent-failure-hunter.md +50 -0
  63. package/packs/full-harness/rendered/.claude/agents/spec-miner.md +207 -0
  64. package/packs/full-harness/rendered/.claude/agents/swift-build-resolver.md +161 -0
  65. package/packs/full-harness/rendered/.claude/agents/swift-reviewer.md +98 -0
  66. package/packs/full-harness/rendered/.claude/agents/tdd-guide.md +89 -0
  67. package/packs/full-harness/rendered/.claude/agents/type-design-analyzer.md +41 -0
  68. package/packs/full-harness/rendered/.claude/agents/typescript-reviewer.md +96 -0
  69. package/packs/full-harness/rendered/.claude/agents/vue-reviewer.md +195 -0
  70. package/packs/full-harness/rendered/.claude/commands/aside.md +6 -0
  71. package/packs/full-harness/rendered/.claude/commands/auto-update.md +6 -0
  72. package/packs/full-harness/rendered/.claude/commands/build-fix.md +6 -0
  73. package/packs/full-harness/rendered/.claude/commands/checkpoint.md +6 -0
  74. package/packs/full-harness/rendered/.claude/commands/code-review.md +6 -0
  75. package/packs/full-harness/rendered/.claude/commands/cost-report.md +6 -0
  76. package/packs/full-harness/rendered/.claude/commands/cpp-build.md +6 -0
  77. package/packs/full-harness/rendered/.claude/commands/cpp-review.md +6 -0
  78. package/packs/full-harness/rendered/.claude/commands/cpp-test.md +6 -0
  79. package/packs/full-harness/rendered/.claude/commands/ecc-guide.md +6 -0
  80. package/packs/full-harness/rendered/.claude/commands/epic-claim.md +6 -0
  81. package/packs/full-harness/rendered/.claude/commands/epic-decompose.md +6 -0
  82. package/packs/full-harness/rendered/.claude/commands/epic-publish.md +6 -0
  83. package/packs/full-harness/rendered/.claude/commands/epic-review.md +6 -0
  84. package/packs/full-harness/rendered/.claude/commands/epic-sync.md +6 -0
  85. package/packs/full-harness/rendered/.claude/commands/epic-unblock.md +6 -0
  86. package/packs/full-harness/rendered/.claude/commands/epic-validate.md +6 -0
  87. package/packs/full-harness/rendered/.claude/commands/evolve.md +6 -0
  88. package/packs/full-harness/rendered/.claude/commands/fastapi-review.md +6 -0
  89. package/packs/full-harness/rendered/.claude/commands/feature-dev.md +6 -0
  90. package/packs/full-harness/rendered/.claude/commands/flutter-build.md +6 -0
  91. package/packs/full-harness/rendered/.claude/commands/flutter-review.md +6 -0
  92. package/packs/full-harness/rendered/.claude/commands/flutter-test.md +6 -0
  93. package/packs/full-harness/rendered/.claude/commands/gan-build.md +6 -0
  94. package/packs/full-harness/rendered/.claude/commands/gan-design.md +6 -0
  95. package/packs/full-harness/rendered/.claude/commands/go-build.md +6 -0
  96. package/packs/full-harness/rendered/.claude/commands/go-review.md +6 -0
  97. package/packs/full-harness/rendered/.claude/commands/go-test.md +6 -0
  98. package/packs/full-harness/rendered/.claude/commands/gradle-build.md +6 -0
  99. package/packs/full-harness/rendered/.claude/commands/harness-audit.md +6 -0
  100. package/packs/full-harness/rendered/.claude/commands/hookify-configure.md +6 -0
  101. package/packs/full-harness/rendered/.claude/commands/hookify-help.md +6 -0
  102. package/packs/full-harness/rendered/.claude/commands/hookify-list.md +6 -0
  103. package/packs/full-harness/rendered/.claude/commands/hookify.md +6 -0
  104. package/packs/full-harness/rendered/.claude/commands/instinct-export.md +6 -0
  105. package/packs/full-harness/rendered/.claude/commands/instinct-import.md +6 -0
  106. package/packs/full-harness/rendered/.claude/commands/instinct-status.md +6 -0
  107. package/packs/full-harness/rendered/.claude/commands/jira.md +6 -0
  108. package/packs/full-harness/rendered/.claude/commands/kotlin-build.md +6 -0
  109. package/packs/full-harness/rendered/.claude/commands/kotlin-review.md +6 -0
  110. package/packs/full-harness/rendered/.claude/commands/kotlin-test.md +6 -0
  111. package/packs/full-harness/rendered/.claude/commands/learn-eval.md +6 -0
  112. package/packs/full-harness/rendered/.claude/commands/learn.md +6 -0
  113. package/packs/full-harness/rendered/.claude/commands/loop-start.md +6 -0
  114. package/packs/full-harness/rendered/.claude/commands/loop-status.md +6 -0
  115. package/packs/full-harness/rendered/.claude/commands/marketing-campaign.md +6 -0
  116. package/packs/full-harness/rendered/.claude/commands/model-route.md +6 -0
  117. package/packs/full-harness/rendered/.claude/commands/multi-backend.md +6 -0
  118. package/packs/full-harness/rendered/.claude/commands/multi-execute.md +6 -0
  119. package/packs/full-harness/rendered/.claude/commands/multi-frontend.md +6 -0
  120. package/packs/full-harness/rendered/.claude/commands/multi-plan.md +6 -0
  121. package/packs/full-harness/rendered/.claude/commands/multi-workflow.md +6 -0
  122. package/packs/full-harness/rendered/.claude/commands/orch-add-feature.md +6 -0
  123. package/packs/full-harness/rendered/.claude/commands/orch-build-mvp.md +6 -0
  124. package/packs/full-harness/rendered/.claude/commands/orch-change-feature.md +6 -0
  125. package/packs/full-harness/rendered/.claude/commands/orch-fix-defect.md +6 -0
  126. package/packs/full-harness/rendered/.claude/commands/orch-refine-code.md +6 -0
  127. package/packs/full-harness/rendered/.claude/commands/orch-review.md +6 -0
  128. package/packs/full-harness/rendered/.claude/commands/plan-canvas.md +6 -0
  129. package/packs/full-harness/rendered/.claude/commands/plan-prd.md +6 -0
  130. package/packs/full-harness/rendered/.claude/commands/plan.md +6 -0
  131. package/packs/full-harness/rendered/.claude/commands/pm2.md +6 -0
  132. package/packs/full-harness/rendered/.claude/commands/pr.md +6 -0
  133. package/packs/full-harness/rendered/.claude/commands/project-init.md +6 -0
  134. package/packs/full-harness/rendered/.claude/commands/projects.md +6 -0
  135. package/packs/full-harness/rendered/.claude/commands/promote.md +6 -0
  136. package/packs/full-harness/rendered/.claude/commands/prp-commit.md +6 -0
  137. package/packs/full-harness/rendered/.claude/commands/prp-implement.md +6 -0
  138. package/packs/full-harness/rendered/.claude/commands/prp-plan.md +6 -0
  139. package/packs/full-harness/rendered/.claude/commands/prp-pr.md +6 -0
  140. package/packs/full-harness/rendered/.claude/commands/prp-prd.md +6 -0
  141. package/packs/full-harness/rendered/.claude/commands/prune.md +6 -0
  142. package/packs/full-harness/rendered/.claude/commands/python-review.md +6 -0
  143. package/packs/full-harness/rendered/.claude/commands/quality-gate.md +6 -0
  144. package/packs/full-harness/rendered/.claude/commands/react-build.md +6 -0
  145. package/packs/full-harness/rendered/.claude/commands/react-review.md +6 -0
  146. package/packs/full-harness/rendered/.claude/commands/react-test.md +6 -0
  147. package/packs/full-harness/rendered/.claude/commands/refactor-clean.md +6 -0
  148. package/packs/full-harness/rendered/.claude/commands/resume-session.md +6 -0
  149. package/packs/full-harness/rendered/.claude/commands/review-pr.md +6 -0
  150. package/packs/full-harness/rendered/.claude/commands/rust-build.md +6 -0
  151. package/packs/full-harness/rendered/.claude/commands/rust-review.md +6 -0
  152. package/packs/full-harness/rendered/.claude/commands/rust-test.md +6 -0
  153. package/packs/full-harness/rendered/.claude/commands/santa-loop.md +6 -0
  154. package/packs/full-harness/rendered/.claude/commands/save-session.md +6 -0
  155. package/packs/full-harness/rendered/.claude/commands/security-scan.md +6 -0
  156. package/packs/full-harness/rendered/.claude/commands/sessions.md +6 -0
  157. package/packs/full-harness/rendered/.claude/commands/setup-pm.md +6 -0
  158. package/packs/full-harness/rendered/.claude/commands/skill-create.md +6 -0
  159. package/packs/full-harness/rendered/.claude/commands/skill-health.md +6 -0
  160. package/packs/full-harness/rendered/.claude/commands/test-coverage.md +6 -0
  161. package/packs/full-harness/rendered/.claude/commands/update-codemaps.md +6 -0
  162. package/packs/full-harness/rendered/.claude/commands/update-docs.md +6 -0
  163. package/packs/full-harness/rendered/.claude/commands/vue-review.md +6 -0
  164. package/packs/full-harness/rendered/.claude/skills/accessibility/SKILL.md +144 -0
  165. package/packs/full-harness/rendered/.claude/skills/agent-architecture-audit/SKILL.md +254 -0
  166. package/packs/full-harness/rendered/.claude/skills/agent-eval/SKILL.md +143 -0
  167. package/packs/full-harness/rendered/.claude/skills/agent-harness-construction/SKILL.md +72 -0
  168. package/packs/full-harness/rendered/.claude/skills/agent-introspection-debugging/SKILL.md +152 -0
  169. package/packs/full-harness/rendered/.claude/skills/agent-payment-x402/SKILL.md +223 -0
  170. package/packs/full-harness/rendered/.claude/skills/agent-self-evaluation/SKILL.md +181 -0
  171. package/packs/full-harness/rendered/.claude/skills/agent-sort/SKILL.md +214 -0
  172. package/packs/full-harness/rendered/.claude/skills/agentic-engineering/SKILL.md +62 -0
  173. package/packs/full-harness/rendered/.claude/skills/agentic-os/SKILL.md +386 -0
  174. package/packs/full-harness/rendered/.claude/skills/ai-first-engineering/SKILL.md +50 -0
  175. package/packs/full-harness/rendered/.claude/skills/ai-regression-testing/SKILL.md +384 -0
  176. package/packs/full-harness/rendered/.claude/skills/android-clean-architecture/SKILL.md +338 -0
  177. package/packs/full-harness/rendered/.claude/skills/angular-developer/SKILL.md +153 -0
  178. package/packs/full-harness/rendered/.claude/skills/api-connector-builder/SKILL.md +118 -0
  179. package/packs/full-harness/rendered/.claude/skills/api-design/SKILL.md +522 -0
  180. package/packs/full-harness/rendered/.claude/skills/architecture-decision-records/SKILL.md +178 -0
  181. package/packs/full-harness/rendered/.claude/skills/article-writing/SKILL.md +78 -0
  182. package/packs/full-harness/rendered/.claude/skills/automation-audit-ops/SKILL.md +141 -0
  183. package/packs/full-harness/rendered/.claude/skills/autonomous-agent-harness/SKILL.md +272 -0
  184. package/packs/full-harness/rendered/.claude/skills/autonomous-loops/SKILL.md +609 -0
  185. package/packs/full-harness/rendered/.claude/skills/backend-patterns/SKILL.md +560 -0
  186. package/packs/full-harness/rendered/.claude/skills/benchmark/SKILL.md +92 -0
  187. package/packs/full-harness/rendered/.claude/skills/benchmark-methodology/SKILL.md +185 -0
  188. package/packs/full-harness/rendered/.claude/skills/benchmark-optimization-loop/SKILL.md +67 -0
  189. package/packs/full-harness/rendered/.claude/skills/blender-motion-state-inspection/SKILL.md +162 -0
  190. package/packs/full-harness/rendered/.claude/skills/blueprint/SKILL.md +95 -0
  191. package/packs/full-harness/rendered/.claude/skills/brand-discovery/SKILL.md +140 -0
  192. package/packs/full-harness/rendered/.claude/skills/brand-voice/SKILL.md +96 -0
  193. package/packs/full-harness/rendered/.claude/skills/browser-qa/SKILL.md +103 -0
  194. package/packs/full-harness/rendered/.claude/skills/bun-runtime/SKILL.md +83 -0
  195. package/packs/full-harness/rendered/.claude/skills/canary-watch/SKILL.md +106 -0
  196. package/packs/full-harness/rendered/.claude/skills/carrier-relationship-management/SKILL.md +198 -0
  197. package/packs/full-harness/rendered/.claude/skills/cisco-ios-patterns/SKILL.md +162 -0
  198. package/packs/full-harness/rendered/.claude/skills/ck/SKILL.md +143 -0
  199. package/packs/full-harness/rendered/.claude/skills/claude-devfleet/SKILL.md +110 -0
  200. package/packs/full-harness/rendered/.claude/skills/click-path-audit/SKILL.md +243 -0
  201. package/packs/full-harness/rendered/.claude/skills/clickhouse-io/SKILL.md +443 -0
  202. package/packs/full-harness/rendered/.claude/skills/code-tour/SKILL.md +252 -0
  203. package/packs/full-harness/rendered/.claude/skills/codebase-onboarding/SKILL.md +232 -0
  204. package/packs/full-harness/rendered/.claude/skills/codehealth-mcp/SKILL.md +165 -0
  205. package/packs/full-harness/rendered/.claude/skills/coding-standards/SKILL.md +549 -0
  206. package/packs/full-harness/rendered/.claude/skills/competitive-platform-analysis/SKILL.md +209 -0
  207. package/packs/full-harness/rendered/.claude/skills/competitive-report-structure/SKILL.md +157 -0
  208. package/packs/full-harness/rendered/.claude/skills/compose-multiplatform-patterns/SKILL.md +298 -0
  209. package/packs/full-harness/rendered/.claude/skills/config-gc/SKILL.md +118 -0
  210. package/packs/full-harness/rendered/.claude/skills/configure-ecc/SKILL.md +383 -0
  211. package/packs/full-harness/rendered/.claude/skills/connections-optimizer/SKILL.md +188 -0
  212. package/packs/full-harness/rendered/.claude/skills/content-engine/SKILL.md +130 -0
  213. package/packs/full-harness/rendered/.claude/skills/content-hash-cache-pattern/SKILL.md +160 -0
  214. package/packs/full-harness/rendered/.claude/skills/context-budget/SKILL.md +134 -0
  215. package/packs/full-harness/rendered/.claude/skills/continuous-agent-loop/SKILL.md +44 -0
  216. package/packs/full-harness/rendered/.claude/skills/continuous-learning/SKILL.md +130 -0
  217. package/packs/full-harness/rendered/.claude/skills/continuous-learning-v2/SKILL.md +358 -0
  218. package/packs/full-harness/rendered/.claude/skills/cost-aware-llm-pipeline/SKILL.md +182 -0
  219. package/packs/full-harness/rendered/.claude/skills/cost-tracking/SKILL.md +95 -0
  220. package/packs/full-harness/rendered/.claude/skills/council/SKILL.md +202 -0
  221. package/packs/full-harness/rendered/.claude/skills/cpp-coding-standards/SKILL.md +722 -0
  222. package/packs/full-harness/rendered/.claude/skills/cpp-testing/SKILL.md +323 -0
  223. package/packs/full-harness/rendered/.claude/skills/crosspost/SKILL.md +110 -0
  224. package/packs/full-harness/rendered/.claude/skills/csharp-testing/SKILL.md +320 -0
  225. package/packs/full-harness/rendered/.claude/skills/customer-billing-ops/SKILL.md +139 -0
  226. package/packs/full-harness/rendered/.claude/skills/customs-trade-compliance/SKILL.md +248 -0
  227. package/packs/full-harness/rendered/.claude/skills/dart-flutter-patterns/SKILL.md +562 -0
  228. package/packs/full-harness/rendered/.claude/skills/dashboard-builder/SKILL.md +106 -0
  229. package/packs/full-harness/rendered/.claude/skills/data-scraper-agent/SKILL.md +763 -0
  230. package/packs/full-harness/rendered/.claude/skills/data-throughput-accelerator/SKILL.md +70 -0
  231. package/packs/full-harness/rendered/.claude/skills/database-migrations/SKILL.md +428 -0
  232. package/packs/full-harness/rendered/.claude/skills/deep-research/SKILL.md +158 -0
  233. package/packs/full-harness/rendered/.claude/skills/defi-amm-security/SKILL.md +164 -0
  234. package/packs/full-harness/rendered/.claude/skills/delivery-gate/SKILL.md +123 -0
  235. package/packs/full-harness/rendered/.claude/skills/deployment-patterns/SKILL.md +426 -0
  236. package/packs/full-harness/rendered/.claude/skills/design-system/SKILL.md +81 -0
  237. package/packs/full-harness/rendered/.claude/skills/django-celery/SKILL.md +456 -0
  238. package/packs/full-harness/rendered/.claude/skills/django-patterns/SKILL.md +733 -0
  239. package/packs/full-harness/rendered/.claude/skills/django-security/SKILL.md +642 -0
  240. package/packs/full-harness/rendered/.claude/skills/django-tdd/SKILL.md +728 -0
  241. package/packs/full-harness/rendered/.claude/skills/django-verification/SKILL.md +468 -0
  242. package/packs/full-harness/rendered/.claude/skills/dmux-workflows/SKILL.md +190 -0
  243. package/packs/full-harness/rendered/.claude/skills/docker-patterns/SKILL.md +363 -0
  244. package/packs/full-harness/rendered/.claude/skills/documentation-lookup/SKILL.md +89 -0
  245. package/packs/full-harness/rendered/.claude/skills/dotnet-patterns/SKILL.md +320 -0
  246. package/packs/full-harness/rendered/.claude/skills/dynamic-workflow-mode/SKILL.md +122 -0
  247. package/packs/full-harness/rendered/.claude/skills/e2e-testing/SKILL.md +325 -0
  248. package/packs/full-harness/rendered/.claude/skills/ecc-guide/SKILL.md +188 -0
  249. package/packs/full-harness/rendered/.claude/skills/ecc-recipes/SKILL.md +145 -0
  250. package/packs/full-harness/rendered/.claude/skills/ecc-tools-cost-audit/SKILL.md +159 -0
  251. package/packs/full-harness/rendered/.claude/skills/email-ops/SKILL.md +120 -0
  252. package/packs/full-harness/rendered/.claude/skills/energy-procurement/SKILL.md +213 -0
  253. package/packs/full-harness/rendered/.claude/skills/enterprise-agent-ops/SKILL.md +49 -0
  254. package/packs/full-harness/rendered/.claude/skills/error-handling/SKILL.md +375 -0
  255. package/packs/full-harness/rendered/.claude/skills/eval-harness/SKILL.md +268 -0
  256. package/packs/full-harness/rendered/.claude/skills/evm-token-decimals/SKILL.md +128 -0
  257. package/packs/full-harness/rendered/.claude/skills/exa-search/SKILL.md +106 -0
  258. package/packs/full-harness/rendered/.claude/skills/fal-ai-media/SKILL.md +287 -0
  259. package/packs/full-harness/rendered/.claude/skills/fastapi-patterns/SKILL.md +512 -0
  260. package/packs/full-harness/rendered/.claude/skills/finance-billing-ops/SKILL.md +126 -0
  261. package/packs/full-harness/rendered/.claude/skills/flox-environments/SKILL.md +495 -0
  262. package/packs/full-harness/rendered/.claude/skills/flutter-dart-code-review/SKILL.md +434 -0
  263. package/packs/full-harness/rendered/.claude/skills/foundation-models-on-device/SKILL.md +243 -0
  264. package/packs/full-harness/rendered/.claude/skills/frontend-a11y/SKILL.md +441 -0
  265. package/packs/full-harness/rendered/.claude/skills/frontend-design-direction/SKILL.md +91 -0
  266. package/packs/full-harness/rendered/.claude/skills/frontend-patterns/SKILL.md +655 -0
  267. package/packs/full-harness/rendered/.claude/skills/frontend-slides/SKILL.md +183 -0
  268. package/packs/full-harness/rendered/.claude/skills/fsharp-testing/SKILL.md +279 -0
  269. package/packs/full-harness/rendered/.claude/skills/gan-style-harness/SKILL.md +276 -0
  270. package/packs/full-harness/rendered/.claude/skills/gateguard/SKILL.md +131 -0
  271. package/packs/full-harness/rendered/.claude/skills/generating-python-installer/SKILL.md +820 -0
  272. package/packs/full-harness/rendered/.claude/skills/gget/SKILL.md +165 -0
  273. package/packs/full-harness/rendered/.claude/skills/git-workflow/SKILL.md +714 -0
  274. package/packs/full-harness/rendered/.claude/skills/github-ops/SKILL.md +143 -0
  275. package/packs/full-harness/rendered/.claude/skills/golang-patterns/SKILL.md +674 -0
  276. package/packs/full-harness/rendered/.claude/skills/golang-testing/SKILL.md +719 -0
  277. package/packs/full-harness/rendered/.claude/skills/google-workspace-ops/SKILL.md +94 -0
  278. package/packs/full-harness/rendered/.claude/skills/growth-log/SKILL.md +125 -0
  279. package/packs/full-harness/rendered/.claude/skills/healthcare-cdss-patterns/SKILL.md +243 -0
  280. package/packs/full-harness/rendered/.claude/skills/healthcare-emr-patterns/SKILL.md +157 -0
  281. package/packs/full-harness/rendered/.claude/skills/healthcare-eval-harness/SKILL.md +205 -0
  282. package/packs/full-harness/rendered/.claude/skills/healthcare-phi-compliance/SKILL.md +143 -0
  283. package/packs/full-harness/rendered/.claude/skills/hermes-imports/SKILL.md +87 -0
  284. package/packs/full-harness/rendered/.claude/skills/hexagonal-architecture/SKILL.md +275 -0
  285. package/packs/full-harness/rendered/.claude/skills/hipaa-compliance/SKILL.md +76 -0
  286. package/packs/full-harness/rendered/.claude/skills/homelab-network-readiness/SKILL.md +168 -0
  287. package/packs/full-harness/rendered/.claude/skills/homelab-network-setup/SKILL.md +128 -0
  288. package/packs/full-harness/rendered/.claude/skills/homelab-pihole-dns/SKILL.md +273 -0
  289. package/packs/full-harness/rendered/.claude/skills/homelab-vlan-segmentation/SKILL.md +310 -0
  290. package/packs/full-harness/rendered/.claude/skills/homelab-wireguard-vpn/SKILL.md +304 -0
  291. package/packs/full-harness/rendered/.claude/skills/hookify-rules/SKILL.md +128 -0
  292. package/packs/full-harness/rendered/.claude/skills/inherit-legacy-style/SKILL.md +154 -0
  293. package/packs/full-harness/rendered/.claude/skills/intent-driven-development/SKILL.md +360 -0
  294. package/packs/full-harness/rendered/.claude/skills/inventory-demand-planning/SKILL.md +232 -0
  295. package/packs/full-harness/rendered/.claude/skills/investor-materials/SKILL.md +95 -0
  296. package/packs/full-harness/rendered/.claude/skills/investor-outreach/SKILL.md +90 -0
  297. package/packs/full-harness/rendered/.claude/skills/ios-icon-gen/SKILL.md +156 -0
  298. package/packs/full-harness/rendered/.claude/skills/iterative-retrieval/SKILL.md +210 -0
  299. package/packs/full-harness/rendered/.claude/skills/ito-basket-compare/SKILL.md +62 -0
  300. package/packs/full-harness/rendered/.claude/skills/ito-data-atlas-agent/SKILL.md +62 -0
  301. package/packs/full-harness/rendered/.claude/skills/ito-market-intelligence/SKILL.md +59 -0
  302. package/packs/full-harness/rendered/.claude/skills/ito-trade-planner/SKILL.md +66 -0
  303. package/packs/full-harness/rendered/.claude/skills/java-coding-standards/SKILL.md +382 -0
  304. package/packs/full-harness/rendered/.claude/skills/jira-integration/SKILL.md +301 -0
  305. package/packs/full-harness/rendered/.claude/skills/jpa-patterns/SKILL.md +150 -0
  306. package/packs/full-harness/rendered/.claude/skills/knowledge-ops/SKILL.md +153 -0
  307. package/packs/full-harness/rendered/.claude/skills/kotlin-coroutines-flows/SKILL.md +283 -0
  308. package/packs/full-harness/rendered/.claude/skills/kotlin-exposed-patterns/SKILL.md +718 -0
  309. package/packs/full-harness/rendered/.claude/skills/kotlin-ktor-patterns/SKILL.md +688 -0
  310. package/packs/full-harness/rendered/.claude/skills/kotlin-patterns/SKILL.md +710 -0
  311. package/packs/full-harness/rendered/.claude/skills/kotlin-testing/SKILL.md +823 -0
  312. package/packs/full-harness/rendered/.claude/skills/kubernetes-patterns/SKILL.md +754 -0
  313. package/packs/full-harness/rendered/.claude/skills/laravel-patterns/SKILL.md +414 -0
  314. package/packs/full-harness/rendered/.claude/skills/laravel-plugin-discovery/SKILL.md +228 -0
  315. package/packs/full-harness/rendered/.claude/skills/laravel-security/SKILL.md +946 -0
  316. package/packs/full-harness/rendered/.claude/skills/laravel-tdd/SKILL.md +673 -0
  317. package/packs/full-harness/rendered/.claude/skills/laravel-verification/SKILL.md +178 -0
  318. package/packs/full-harness/rendered/.claude/skills/latency-critical-systems/SKILL.md +71 -0
  319. package/packs/full-harness/rendered/.claude/skills/lead-intelligence/SKILL.md +320 -0
  320. package/packs/full-harness/rendered/.claude/skills/liquid-glass-design/SKILL.md +279 -0
  321. package/packs/full-harness/rendered/.claude/skills/literature-review/SKILL.md +191 -0
  322. package/packs/full-harness/rendered/.claude/skills/llm-trading-agent-security/SKILL.md +144 -0
  323. package/packs/full-harness/rendered/.claude/skills/logistics-exception-management/SKILL.md +208 -0
  324. package/packs/full-harness/rendered/.claude/skills/loop-design-check/SKILL.md +141 -0
  325. package/packs/full-harness/rendered/.claude/skills/mailtrap-email-integration/SKILL.md +76 -0
  326. package/packs/full-harness/rendered/.claude/skills/make-interfaces-feel-better/SKILL.md +150 -0
  327. package/packs/full-harness/rendered/.claude/skills/manim-video/SKILL.md +88 -0
  328. package/packs/full-harness/rendered/.claude/skills/market-research/SKILL.md +74 -0
  329. package/packs/full-harness/rendered/.claude/skills/marketing-campaign/SKILL.md +112 -0
  330. package/packs/full-harness/rendered/.claude/skills/mcp-server-patterns/SKILL.md +68 -0
  331. package/packs/full-harness/rendered/.claude/skills/messages-ops/SKILL.md +103 -0
  332. package/packs/full-harness/rendered/.claude/skills/ml-adoption-playbook/SKILL.md +56 -0
  333. package/packs/full-harness/rendered/.claude/skills/mle-workflow/SKILL.md +345 -0
  334. package/packs/full-harness/rendered/.claude/skills/motion-advanced/SKILL.md +592 -0
  335. package/packs/full-harness/rendered/.claude/skills/motion-foundations/SKILL.md +295 -0
  336. package/packs/full-harness/rendered/.claude/skills/motion-patterns/SKILL.md +430 -0
  337. package/packs/full-harness/rendered/.claude/skills/motion-ui/SKILL.md +574 -0
  338. package/packs/full-harness/rendered/.claude/skills/mysql-patterns/SKILL.md +411 -0
  339. package/packs/full-harness/rendered/.claude/skills/nanoclaw-repl/SKILL.md +32 -0
  340. package/packs/full-harness/rendered/.claude/skills/nestjs-patterns/SKILL.md +229 -0
  341. package/packs/full-harness/rendered/.claude/skills/netmiko-ssh-automation/SKILL.md +172 -0
  342. package/packs/full-harness/rendered/.claude/skills/network-bgp-diagnostics/SKILL.md +166 -0
  343. package/packs/full-harness/rendered/.claude/skills/network-config-validation/SKILL.md +209 -0
  344. package/packs/full-harness/rendered/.claude/skills/network-interface-health/SKILL.md +151 -0
  345. package/packs/full-harness/rendered/.claude/skills/nextjs-turbopack/SKILL.md +56 -0
  346. package/packs/full-harness/rendered/.claude/skills/nodejs-keccak256/SKILL.md +100 -0
  347. package/packs/full-harness/rendered/.claude/skills/nutrient-document-processing/SKILL.md +166 -0
  348. package/packs/full-harness/rendered/.claude/skills/nuxt4-patterns/SKILL.md +99 -0
  349. package/packs/full-harness/rendered/.claude/skills/openclaw-persona-forge/SKILL.md +287 -0
  350. package/packs/full-harness/rendered/.claude/skills/opensource-pipeline/SKILL.md +254 -0
  351. package/packs/full-harness/rendered/.claude/skills/orch-add-feature/SKILL.md +43 -0
  352. package/packs/full-harness/rendered/.claude/skills/orch-build-mvp/SKILL.md +47 -0
  353. package/packs/full-harness/rendered/.claude/skills/orch-change-feature/SKILL.md +41 -0
  354. package/packs/full-harness/rendered/.claude/skills/orch-fix-defect/SKILL.md +41 -0
  355. package/packs/full-harness/rendered/.claude/skills/orch-pipeline/SKILL.md +119 -0
  356. package/packs/full-harness/rendered/.claude/skills/orch-refine-code/SKILL.md +42 -0
  357. package/packs/full-harness/rendered/.claude/skills/parallel-execution-optimizer/SKILL.md +70 -0
  358. package/packs/full-harness/rendered/.claude/skills/perl-patterns/SKILL.md +503 -0
  359. package/packs/full-harness/rendered/.claude/skills/perl-security/SKILL.md +502 -0
  360. package/packs/full-harness/rendered/.claude/skills/perl-testing/SKILL.md +474 -0
  361. package/packs/full-harness/rendered/.claude/skills/plan-canvas/SKILL.md +150 -0
  362. package/packs/full-harness/rendered/.claude/skills/plan-orchestrate/SKILL.md +261 -0
  363. package/packs/full-harness/rendered/.claude/skills/plankton-code-quality/SKILL.md +235 -0
  364. package/packs/full-harness/rendered/.claude/skills/postgres-patterns/SKILL.md +146 -0
  365. package/packs/full-harness/rendered/.claude/skills/prediction-market-oracle-research/SKILL.md +62 -0
  366. package/packs/full-harness/rendered/.claude/skills/prediction-market-risk-review/SKILL.md +59 -0
  367. package/packs/full-harness/rendered/.claude/skills/prisma-patterns/SKILL.md +399 -0
  368. package/packs/full-harness/rendered/.claude/skills/product-capability/SKILL.md +140 -0
  369. package/packs/full-harness/rendered/.claude/skills/product-lens/SKILL.md +91 -0
  370. package/packs/full-harness/rendered/.claude/skills/production-audit/SKILL.md +205 -0
  371. package/packs/full-harness/rendered/.claude/skills/production-scheduling/SKILL.md +223 -0
  372. package/packs/full-harness/rendered/.claude/skills/project-flow-ops/SKILL.md +110 -0
  373. package/packs/full-harness/rendered/.claude/skills/prompt-optimizer/SKILL.md +383 -0
  374. package/packs/full-harness/rendered/.claude/skills/pubmed-database/SKILL.md +174 -0
  375. package/packs/full-harness/rendered/.claude/skills/python-patterns/SKILL.md +749 -0
  376. package/packs/full-harness/rendered/.claude/skills/python-testing/SKILL.md +815 -0
  377. package/packs/full-harness/rendered/.claude/skills/pytorch-patterns/SKILL.md +395 -0
  378. package/packs/full-harness/rendered/.claude/skills/quality-nonconformance/SKILL.md +245 -0
  379. package/packs/full-harness/rendered/.claude/skills/quarkus-patterns/SKILL.md +721 -0
  380. package/packs/full-harness/rendered/.claude/skills/quarkus-security/SKILL.md +466 -0
  381. package/packs/full-harness/rendered/.claude/skills/quarkus-tdd/SKILL.md +810 -0
  382. package/packs/full-harness/rendered/.claude/skills/quarkus-verification/SKILL.md +478 -0
  383. package/packs/full-harness/rendered/.claude/skills/ralphinho-rfc-pipeline/SKILL.md +66 -0
  384. package/packs/full-harness/rendered/.claude/skills/react-native-patterns/SKILL.md +325 -0
  385. package/packs/full-harness/rendered/.claude/skills/react-patterns/SKILL.md +340 -0
  386. package/packs/full-harness/rendered/.claude/skills/react-performance/SKILL.md +573 -0
  387. package/packs/full-harness/rendered/.claude/skills/react-testing/SKILL.md +422 -0
  388. package/packs/full-harness/rendered/.claude/skills/recsys-pipeline-architect/SKILL.md +113 -0
  389. package/packs/full-harness/rendered/.claude/skills/recursive-decision-ledger/SKILL.md +77 -0
  390. package/packs/full-harness/rendered/.claude/skills/redis-patterns/SKILL.md +402 -0
  391. package/packs/full-harness/rendered/.claude/skills/regex-vs-llm-structured-text/SKILL.md +219 -0
  392. package/packs/full-harness/rendered/.claude/skills/remotion-video-creation/SKILL.md +41 -0
  393. package/packs/full-harness/rendered/.claude/skills/repo-scan/SKILL.md +77 -0
  394. package/packs/full-harness/rendered/.claude/skills/research-ops/SKILL.md +111 -0
  395. package/packs/full-harness/rendered/.claude/skills/returns-reverse-logistics/SKILL.md +225 -0
  396. package/packs/full-harness/rendered/.claude/skills/rules-distill/SKILL.md +263 -0
  397. package/packs/full-harness/rendered/.claude/skills/rust-patterns/SKILL.md +498 -0
  398. package/packs/full-harness/rendered/.claude/skills/rust-testing/SKILL.md +499 -0
  399. package/packs/full-harness/rendered/.claude/skills/safety-guard/SKILL.md +74 -0
  400. package/packs/full-harness/rendered/.claude/skills/santa-method/SKILL.md +305 -0
  401. package/packs/full-harness/rendered/.claude/skills/scholar-evaluation/SKILL.md +159 -0
  402. package/packs/full-harness/rendered/.claude/skills/search-first/SKILL.md +181 -0
  403. package/packs/full-harness/rendered/.claude/skills/security-bounty-hunter/SKILL.md +97 -0
  404. package/packs/full-harness/rendered/.claude/skills/security-review/SKILL.md +502 -0
  405. package/packs/full-harness/rendered/.claude/skills/security-scan/SKILL.md +164 -0
  406. package/packs/full-harness/rendered/.claude/skills/seo/SKILL.md +153 -0
  407. package/packs/full-harness/rendered/.claude/skills/skill-comply/SKILL.md +56 -0
  408. package/packs/full-harness/rendered/.claude/skills/skill-scout/SKILL.md +139 -0
  409. package/packs/full-harness/rendered/.claude/skills/skill-stocktake/SKILL.md +193 -0
  410. package/packs/full-harness/rendered/.claude/skills/social-graph-ranker/SKILL.md +153 -0
  411. package/packs/full-harness/rendered/.claude/skills/social-publisher/SKILL.md +128 -0
  412. package/packs/full-harness/rendered/.claude/skills/springboot-patterns/SKILL.md +313 -0
  413. package/packs/full-harness/rendered/.claude/skills/springboot-security/SKILL.md +271 -0
  414. package/packs/full-harness/rendered/.claude/skills/springboot-tdd/SKILL.md +157 -0
  415. package/packs/full-harness/rendered/.claude/skills/springboot-verification/SKILL.md +230 -0
  416. package/packs/full-harness/rendered/.claude/skills/strategic-compact/SKILL.md +136 -0
  417. package/packs/full-harness/rendered/.claude/skills/swift-actor-persistence/SKILL.md +142 -0
  418. package/packs/full-harness/rendered/.claude/skills/swift-concurrency-6-2/SKILL.md +216 -0
  419. package/packs/full-harness/rendered/.claude/skills/swift-protocol-di-testing/SKILL.md +189 -0
  420. package/packs/full-harness/rendered/.claude/skills/swiftui-patterns/SKILL.md +259 -0
  421. package/packs/full-harness/rendered/.claude/skills/taste/SKILL.md +263 -0
  422. package/packs/full-harness/rendered/.claude/skills/tdd-workflow/SKILL.md +580 -0
  423. package/packs/full-harness/rendered/.claude/skills/team-agent-orchestration/SKILL.md +109 -0
  424. package/packs/full-harness/rendered/.claude/skills/team-builder/SKILL.md +167 -0
  425. package/packs/full-harness/rendered/.claude/skills/terminal-ops/SKILL.md +108 -0
  426. package/packs/full-harness/rendered/.claude/skills/tinystruct-patterns/SKILL.md +277 -0
  427. package/packs/full-harness/rendered/.claude/skills/token-budget-advisor/SKILL.md +120 -0
  428. package/packs/full-harness/rendered/.claude/skills/ui-demo/SKILL.md +464 -0
  429. package/packs/full-harness/rendered/.claude/skills/ui-to-vue/SKILL.md +133 -0
  430. package/packs/full-harness/rendered/.claude/skills/uncloud/SKILL.md +342 -0
  431. package/packs/full-harness/rendered/.claude/skills/unified-notifications-ops/SKILL.md +186 -0
  432. package/packs/full-harness/rendered/.claude/skills/uspto-database/SKILL.md +176 -0
  433. package/packs/full-harness/rendered/.claude/skills/verification-loop/SKILL.md +126 -0
  434. package/packs/full-harness/rendered/.claude/skills/video-editing/SKILL.md +309 -0
  435. package/packs/full-harness/rendered/.claude/skills/videodb/SKILL.md +371 -0
  436. package/packs/full-harness/rendered/.claude/skills/visa-doc-translate/SKILL.md +117 -0
  437. package/packs/full-harness/rendered/.claude/skills/vite-patterns/SKILL.md +448 -0
  438. package/packs/full-harness/rendered/.claude/skills/vue-patterns/SKILL.md +470 -0
  439. package/packs/full-harness/rendered/.claude/skills/windows-desktop-e2e/SKILL.md +886 -0
  440. package/packs/full-harness/rendered/.claude/skills/workspace-surface-audit/SKILL.md +124 -0
  441. package/packs/full-harness/rendered/.claude/skills/x-api/SKILL.md +233 -0
  442. package/packs/full-harness/rendered/.github/copilot-instructions.md +89529 -0
  443. package/packs/full-harness/rendered/AGENTS.md +9663 -0
  444. package/packs/full-harness/rendered/CLAUDE.md +444 -0
  445. package/packs/full-harness/rendered/GEMINI.md +71959 -0
@@ -0,0 +1,886 @@
1
+ ---
2
+ name: windows-desktop-e2e
3
+ description: E2E testing for Windows native desktop apps (WPF, WinForms, Win32/MFC, Qt) using pywinauto and Windows UI Automation.
4
+ ---
5
+
6
+ # Windows Desktop E2E Testing
7
+
8
+ End-to-end testing for Windows native desktop applications using **pywinauto** backed by Windows UI Automation (UIA). Covers WPF, WinForms, Win32/MFC, and Qt (5.x / 6.x) — with Qt-specific guidance as a dedicated section.
9
+
10
+ ## When to Activate
11
+
12
+ - Writing or running E2E tests for a Windows native desktop application
13
+ - Setting up a desktop GUI test suite from scratch
14
+ - Diagnosing flaky or failing desktop automation tests
15
+ - Adding testability (AutomationId, accessible names) to an existing app
16
+ - Integrating desktop E2E into a CI/CD pipeline (GitHub Actions `windows-latest`)
17
+
18
+ ### When NOT to Use
19
+
20
+ - Web applications → use `e2e-testing` skill (Playwright)
21
+ - Electron / CEF / WebView2 apps → the HTML layer needs browser automation, not UIA
22
+ - Mobile apps → use platform-specific tools (UIAutomator, XCUITest)
23
+ - Pure unit or integration tests that don't need a running GUI
24
+
25
+ ## Core Concepts
26
+
27
+ All Windows desktop automation relies on **UI Automation (UIA)**, a Windows-built-in accessibility API. Every supported framework exposes a tree of UIA elements with properties Claude can read and act on:
28
+
29
+ ```
30
+ Your test (Python)
31
+ └── pywinauto (UIA backend)
32
+ └── Windows UI Automation API ← built into Windows, framework-agnostic
33
+ └── App's UIA provider ← each framework ships its own
34
+ └── Running .exe
35
+ ```
36
+
37
+ **UIA quality by framework:**
38
+
39
+ | Framework | AutomationId | Reliability | Notes |
40
+ |-----------|-------------|-------------|-------|
41
+ | WPF | 5/5 | Excellent | `x:Name` maps directly to AutomationId |
42
+ | WinForms | 4/5 | Good | `AccessibleName` = AutomationId |
43
+ | UWP / WinUI 3 | 5/5 | Excellent | Full Microsoft support |
44
+ | Qt 6.x | 5/5 | Excellent | Accessibility enabled by default; class names change to `Qt6*` |
45
+ | Qt 5.15+ | 4/5 | Good | Improved Accessibility module |
46
+ | Qt 5.7–5.14 | 3/5 | Fair | Needs `QT_ACCESSIBILITY=1`; objectName manual |
47
+ | Win32 / MFC | 3/5 | Fair | Control IDs accessible; text matching common |
48
+
49
+ ## Setup & Prerequisites
50
+
51
+ ```bash
52
+ # Python 3.8+, Windows only
53
+ pip install pywinauto pytest pytest-html Pillow pytest-timeout
54
+ # Optional: screen recording
55
+ # Install ffmpeg and add to PATH: https://ffmpeg.org/download.html
56
+ ```
57
+
58
+ Verify UIA is reachable:
59
+
60
+ ```python
61
+ from pywinauto import Desktop
62
+ Desktop(backend="uia").windows() # lists all top-level windows
63
+ ```
64
+
65
+ Install **Accessibility Insights for Windows** (free, from Microsoft) — your DevTools equivalent for inspecting the UIA element tree before writing any test.
66
+
67
+ ## Testability Setup (by Framework)
68
+
69
+ The single most impactful thing you can do is **give every interactive control a stable AutomationId** before writing tests.
70
+
71
+ ### WPF
72
+
73
+ ```xml
74
+ <!-- XAML: x:Name becomes AutomationId automatically -->
75
+ <TextBox x:Name="usernameInput" />
76
+ <PasswordBox x:Name="passwordInput" />
77
+ <Button x:Name="btnLogin" Content="Login" />
78
+ <TextBlock x:Name="lblError" />
79
+ ```
80
+
81
+ ### WinForms
82
+
83
+ ```csharp
84
+ // Set in designer or code
85
+ usernameInput.AccessibleName = "usernameInput";
86
+ passwordInput.AccessibleName = "passwordInput";
87
+ btnLogin.AccessibleName = "btnLogin";
88
+ lblError.AccessibleName = "lblError";
89
+ ```
90
+
91
+ ### Win32 / MFC
92
+
93
+ ```cpp
94
+ // Control resource IDs in .rc file are exposed as AutomationId strings
95
+ // IDC_EDIT_USERNAME -> AutomationId "1001"
96
+ // Prefer SetWindowText for Name; add IAccessible for richer support
97
+ ```
98
+
99
+ ### Qt — see dedicated section below
100
+
101
+ ---
102
+
103
+ ## Page Object Model
104
+
105
+ ```
106
+ tests/
107
+ ├── conftest.py # app launch fixture, failure screenshot
108
+ ├── pytest.ini
109
+ ├── config.py
110
+ ├── pages/
111
+ │ ├── __init__.py # required for imports
112
+ │ ├── base_page.py # locators, wait, screenshot helpers
113
+ │ ├── login_page.py
114
+ │ └── main_page.py
115
+ ├── tests/
116
+ │ ├── __init__.py
117
+ │ ├── test_login.py
118
+ │ └── test_main_flow.py
119
+ └── artifacts/ # screenshots, videos, logs
120
+ ```
121
+
122
+ ### base_page.py
123
+
124
+ ```python
125
+ import os, time
126
+ from pywinauto import Desktop
127
+ from config import ACTION_TIMEOUT, ARTIFACT_DIR
128
+
129
+ class BasePage:
130
+ def __init__(self, window):
131
+ self.window = window
132
+
133
+ # --- Locators (priority order) ---
134
+
135
+ def by_id(self, auto_id, **kw):
136
+ """AutomationId — most stable. Use as first choice."""
137
+ return self.window.child_window(auto_id=auto_id, **kw)
138
+
139
+ def by_name(self, name, **kw):
140
+ """Visible text / accessible name."""
141
+ return self.window.child_window(title=name, **kw)
142
+
143
+ def by_class(self, cls, index=0, **kw):
144
+ """Control class + index — fragile, avoid if possible."""
145
+ return self.window.child_window(class_name=cls, found_index=index, **kw)
146
+
147
+ # --- Waits ---
148
+
149
+ def wait_visible(self, spec, timeout=ACTION_TIMEOUT):
150
+ spec.wait("visible", timeout=timeout)
151
+ return spec
152
+
153
+ def wait_gone(self, spec, timeout=ACTION_TIMEOUT):
154
+ spec.wait_not("visible", timeout=timeout)
155
+ return spec
156
+
157
+ def wait_window(self, title, timeout=ACTION_TIMEOUT):
158
+ """Wait for a new top-level window (dialogs, child windows)."""
159
+ dlg = Desktop(backend="uia").window(title=title)
160
+ dlg.wait("visible", timeout=timeout)
161
+ return dlg
162
+
163
+ def wait_until(self, fn, timeout=ACTION_TIMEOUT, interval=0.3):
164
+ """Poll an arbitrary condition — use when UIA events are unreliable."""
165
+ deadline = time.time() + timeout
166
+ while time.time() < deadline:
167
+ try:
168
+ if fn():
169
+ return True
170
+ except Exception:
171
+ pass
172
+ time.sleep(interval)
173
+ raise TimeoutError(f"Condition not met within {timeout}s")
174
+
175
+ # --- Actions ---
176
+
177
+ def click(self, spec):
178
+ self.wait_visible(spec)
179
+ spec.click_input()
180
+
181
+ def type_text(self, spec, text):
182
+ self.wait_visible(spec)
183
+ ctrl = spec.wrapper_object()
184
+ try:
185
+ ctrl.set_edit_text(text)
186
+ except Exception as e:
187
+ # Qt 5.x fallback: UIA Value Pattern may be incomplete
188
+ import sys, pywinauto.keyboard as kb
189
+ print(f"[windows-desktop-e2e] set_edit_text failed ({e}), using keyboard fallback", file=sys.stderr)
190
+ ctrl.click_input()
191
+ kb.send_keys("^a")
192
+ kb.send_keys(text, with_spaces=True)
193
+
194
+ def get_text(self, spec):
195
+ ctrl = spec.wrapper_object()
196
+ for attr in ("window_text", "get_value"):
197
+ try:
198
+ v = getattr(ctrl, attr)()
199
+ if v:
200
+ return v
201
+ except Exception:
202
+ pass
203
+ return ""
204
+
205
+ # --- Artifacts ---
206
+
207
+ def screenshot(self, name):
208
+ os.makedirs(ARTIFACT_DIR, exist_ok=True)
209
+ path = os.path.join(ARTIFACT_DIR, f"{name}.png")
210
+ self.window.capture_as_image().save(path)
211
+ return path
212
+ ```
213
+
214
+ ### login_page.py
215
+
216
+ ```python
217
+ from pages.base_page import BasePage
218
+
219
+ class LoginPage(BasePage):
220
+ @property
221
+ def username(self): return self.by_id("usernameInput")
222
+
223
+ @property
224
+ def password(self): return self.by_id("passwordInput")
225
+
226
+ @property
227
+ def btn_login(self): return self.by_id("btnLogin")
228
+
229
+ @property
230
+ def error_label(self): return self.by_id("lblError")
231
+
232
+ def login(self, user, pwd):
233
+ self.type_text(self.username, user)
234
+ self.type_text(self.password, pwd)
235
+ self.click(self.btn_login)
236
+
237
+ def login_ok(self, user, pwd, main_title="Main Window"):
238
+ self.login(user, pwd)
239
+ return self.wait_window(main_title)
240
+
241
+ def login_fail(self, user, pwd):
242
+ self.login(user, pwd)
243
+ self.wait_visible(self.error_label)
244
+ return self.get_text(self.error_label)
245
+ ```
246
+
247
+ ### conftest.py
248
+
249
+ > For new projects prefer the **Tier 1 sandbox fixture** (see below) — it adds filesystem isolation at zero extra cost. This basic fixture is for minimal/legacy setups only.
250
+
251
+ ```python
252
+ import os, pytest
253
+ os.environ["QT_ACCESSIBILITY"] = "1" # Required for Qt 5.x UIA support
254
+
255
+ from pywinauto import Application
256
+ from config import APP_PATH, MAIN_WINDOW_TITLE, LAUNCH_TIMEOUT, ARTIFACT_DIR
257
+
258
+ @pytest.fixture
259
+ def app(request):
260
+ if not APP_PATH:
261
+ pytest.exit("APP_PATH environment variable is not set", returncode=1)
262
+ proc = Application(backend="uia").start(APP_PATH, timeout=LAUNCH_TIMEOUT)
263
+ win = proc.window(title=MAIN_WINDOW_TITLE)
264
+ win.wait("visible", timeout=LAUNCH_TIMEOUT)
265
+ yield win
266
+ # Screenshot on failure
267
+ if getattr(getattr(request.node, "rep_call", None), "failed", False):
268
+ os.makedirs(ARTIFACT_DIR, exist_ok=True)
269
+ try:
270
+ win.capture_as_image().save(
271
+ os.path.join(ARTIFACT_DIR, f"FAIL_{request.node.name}.png")
272
+ )
273
+ except Exception:
274
+ pass
275
+ # Graceful exit first, force-kill as fallback
276
+ # proc is a pywinauto Application — use wait_for_process_exit(), not wait_for_process()
277
+ try:
278
+ win.close()
279
+ proc.wait_for_process_exit(timeout=5)
280
+ except Exception:
281
+ proc.kill()
282
+
283
+ @pytest.hookimpl(tryfirst=True, hookwrapper=True)
284
+ def pytest_runtest_makereport(item, call):
285
+ outcome = yield
286
+ setattr(item, f"rep_{outcome.get_result().when}", outcome.get_result())
287
+ ```
288
+
289
+ ### config.py
290
+
291
+ ```python
292
+ import os
293
+ APP_PATH = os.environ.get("APP_PATH", "") # set via env — no default path
294
+ MAIN_WINDOW_TITLE = os.environ.get("APP_TITLE", "")
295
+ LAUNCH_TIMEOUT = int(os.environ.get("LAUNCH_TIMEOUT", "15"))
296
+ ACTION_TIMEOUT = int(os.environ.get("ACTION_TIMEOUT", "10"))
297
+ ARTIFACT_DIR = os.path.join(os.path.dirname(__file__), "artifacts")
298
+ ```
299
+
300
+ ### pytest.ini
301
+
302
+ ```ini
303
+ [pytest]
304
+ testpaths = tests
305
+ markers =
306
+ smoke: fast smoke tests for critical paths
307
+ flaky: known-unstable tests
308
+ addopts = -v --tb=short --html=artifacts/report.html --self-contained-html
309
+ ```
310
+
311
+ ## Locator Strategy
312
+
313
+ ```
314
+ AutomationId > Name (text) > ClassName + index > XPath
315
+ (stable) (readable) (fragile) (last resort)
316
+ ```
317
+
318
+ Inspect with Accessibility Insights → **Properties** pane → look for `AutomationId` first.
319
+
320
+ ```python
321
+ # Inspect at runtime — paste into a REPL to explore the tree
322
+ win.print_control_identifiers()
323
+ # or narrow scope:
324
+ win.child_window(auto_id="groupBox1").print_control_identifiers()
325
+ ```
326
+
327
+ ## Wait Patterns
328
+
329
+ ```python
330
+ # Wait for control to appear
331
+ page.wait_visible(page.by_id("statusLabel"))
332
+
333
+ # Wait for control to disappear (e.g. loading spinner)
334
+ page.wait_gone(page.by_id("spinnerOverlay"))
335
+
336
+ # Wait for a dialog to pop up
337
+ dlg = page.wait_window("Confirm Delete")
338
+
339
+ # Custom condition (e.g. text changes)
340
+ page.wait_until(lambda: page.get_text(page.by_id("lblStatus")) == "Ready")
341
+ ```
342
+
343
+ **Never use `time.sleep()` as primary synchronization** — use `wait()` or `wait_until()`.
344
+
345
+ ## Artifact Management
346
+
347
+ ```python
348
+ # Screenshot on demand
349
+ page.screenshot("after_login")
350
+
351
+ # Full-screen capture (when window is off-screen or minimised)
352
+ import pyautogui
353
+ pyautogui.screenshot("artifacts/fullscreen.png")
354
+
355
+ # Screen recording with ffmpeg (start before test, stop after)
356
+ import subprocess
357
+
358
+ def start_recording(name):
359
+ return subprocess.Popen([
360
+ "ffmpeg", "-f", "gdigrab", "-framerate", "10",
361
+ "-i", "desktop", "-y", f"artifacts/videos/{name}.mp4"
362
+ ], stdin=subprocess.PIPE, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
363
+
364
+ def stop_recording(proc):
365
+ proc.stdin.write(b"q"); proc.stdin.flush(); proc.wait(timeout=10)
366
+ ```
367
+
368
+ ## Per-Step Trace (opt-in)
369
+
370
+ The default failure screenshot is often too thin for diagnosing flaky tests. The step-level trace below is **off by default** — enable it only when reproducing a flaky case.
371
+
372
+ ### Enable
373
+
374
+ ```bash
375
+ E2E_TRACE=1 pytest tests/test_login.py -v
376
+ # Include typed text in the JSONL log (DO NOT use on tests that type credentials/PII):
377
+ E2E_TRACE=1 E2E_TRACE_INCLUDE_TEXT=1 pytest ...
378
+ ```
379
+
380
+ ### Patch into BasePage
381
+
382
+ ```python
383
+ import os, json, time
384
+ TRACE_ENABLED = os.environ.get("E2E_TRACE") == "1"
385
+ TRACE_INCLUDE_TEXT = os.environ.get("E2E_TRACE_INCLUDE_TEXT") == "1"
386
+
387
+ class BasePage:
388
+ _step = 0
389
+
390
+ def _trace(self, action, spec=None, text=None):
391
+ if not TRACE_ENABLED:
392
+ return
393
+ BasePage._step += 1
394
+ idx = f"{BasePage._step:03d}"
395
+ os.makedirs(ARTIFACT_DIR, exist_ok=True)
396
+ try:
397
+ self.window.capture_as_image().save(
398
+ os.path.join(ARTIFACT_DIR, f"step_{idx}_{action}.png"))
399
+ except Exception:
400
+ pass # capture failure must not break the test
401
+ rec = {
402
+ "ts": time.time(), "step": BasePage._step, "action": action,
403
+ "locator": getattr(spec, "criteria", None),
404
+ "text": text if TRACE_INCLUDE_TEXT else ("<redacted>" if text else None),
405
+ }
406
+ with open(os.path.join(ARTIFACT_DIR, "trace.jsonl"), "a") as f:
407
+ f.write(json.dumps(rec) + "\n")
408
+
409
+ def click(self, spec):
410
+ self.wait_visible(spec); self._trace("click_before", spec)
411
+ spec.click_input(); self._trace("click_after", spec)
412
+
413
+ def type_text(self, spec, text):
414
+ self.wait_visible(spec); self._trace("type_before", spec, text)
415
+ # ... existing set_edit_text / keyboard fallback ...
416
+ self._trace("type_after", spec)
417
+ ```
418
+
419
+ ### Caveats
420
+
421
+ - **PII / credentials**: `type_text` content is `<redacted>` by default. Never set `E2E_TRACE_INCLUDE_TEXT=1` on login or payment flows.
422
+ - **Overhead**: ~50–200ms per action + one PNG per step on disk. Don't enable on the default CI matrix — only on a dedicated flake-repro job.
423
+ - **Artifact bloat**: a long flow produces tens of MB; tune `retention-days` accordingly.
424
+ - **Parallel/rerun hygiene**: this simple example appends to `trace.jsonl` and uses a class-level counter. Clear the artifact directory before reruns, and use per-worker artifact dirs for parallel tests.
425
+ - **Coverage gap**: actions performed outside `BasePage` (raw `pywinauto` calls in test code) are not traced.
426
+
427
+ ## Flaky Test Handling
428
+
429
+ ```python
430
+ # Quarantine — equivalent to Playwright's test.fixme()
431
+ @pytest.mark.skip(reason="Flaky: animation race on slow CI. Issue #42")
432
+ def test_animated_transition(self, app): ...
433
+
434
+ # Skip in CI only
435
+ @pytest.mark.skipif(os.environ.get("CI") == "true", reason="Flaky in CI #43")
436
+ def test_heavy_load(self, app): ...
437
+ ```
438
+
439
+ Common causes and fixes:
440
+
441
+ | Cause | Fix |
442
+ |-------|-----|
443
+ | Control not ready | Replace `time.sleep` with `wait_visible` |
444
+ | Window not focused | Add `win.set_focus()` before interactions |
445
+ | Animation in progress | `wait_until(lambda: not loading_indicator.exists())` |
446
+ | Dialog timing | `wait_window(title, timeout=15)` |
447
+ | CI display not ready | Set `DISPLAY` or use virtual desktop in CI |
448
+ | `set_edit_text` raises NotImplementedError | UIA ValuePattern missing (common on Qt 5.x) — `BasePage.type_text` already falls back to `keyboard.send_keys` |
449
+ | Control exists but `wait_visible` times out | Window minimised or off-screen — call `win.restore()` + `win.set_focus()` before waiting |
450
+
451
+ ## Test Isolation & Sandbox
452
+
453
+ Three tiers of isolation — use the lightest tier that satisfies your needs.
454
+
455
+ ### Tier 1 — Filesystem Isolation (default, always use)
456
+
457
+ Each test gets its own `APPDATA` / `LOCALAPPDATA` / `TEMP` via `subprocess.Popen` and `Application.connect()`. pytest's `tmp_path` fixture handles cleanup automatically.
458
+
459
+ ```python
460
+ # conftest.py — replace the basic `app` fixture with this
461
+ import os, subprocess, pytest
462
+ from pywinauto import Application
463
+ from config import APP_PATH, APP_ARGS, APP_TITLE, LAUNCH_TIMEOUT, ACTION_TIMEOUT, ARTIFACT_DIR
464
+
465
+ @pytest.fixture(scope="function")
466
+ def app(request, tmp_path):
467
+ """Fresh process + isolated user-data dirs per test."""
468
+ if not APP_PATH:
469
+ pytest.exit("APP_PATH not set", returncode=1)
470
+
471
+ # Redirect all per-user storage to an isolated tmp directory
472
+ sandbox_env = os.environ.copy()
473
+ sandbox_env["QT_ACCESSIBILITY"] = "1"
474
+ sandbox_env["APPDATA"] = str(tmp_path / "AppData" / "Roaming")
475
+ sandbox_env["LOCALAPPDATA"] = str(tmp_path / "AppData" / "Local")
476
+ sandbox_env["TEMP"] = sandbox_env["TMP"] = str(tmp_path / "Temp")
477
+ for p in (sandbox_env["APPDATA"], sandbox_env["LOCALAPPDATA"], sandbox_env["TEMP"]):
478
+ os.makedirs(p, exist_ok=True)
479
+
480
+ if not APP_TITLE:
481
+ pytest.exit("APP_TITLE environment variable is not set", returncode=1)
482
+
483
+ # shlex.split handles quoted args with spaces; plain split() breaks on them
484
+ import shlex
485
+ # Launch via subprocess so we can pass env; connect pywinauto by PID
486
+ proc = subprocess.Popen(
487
+ [APP_PATH] + shlex.split(APP_ARGS),
488
+ env=sandbox_env,
489
+ )
490
+ pw_app = Application(backend="uia").connect(process=proc.pid, timeout=LAUNCH_TIMEOUT)
491
+ win = pw_app.window(title=APP_TITLE)
492
+ win.wait("visible", timeout=LAUNCH_TIMEOUT)
493
+ yield win
494
+
495
+ if getattr(getattr(request.node, "rep_call", None), "failed", False):
496
+ os.makedirs(ARTIFACT_DIR, exist_ok=True)
497
+ try:
498
+ win.capture_as_image().save(
499
+ os.path.join(ARTIFACT_DIR, f"FAIL_{request.node.name}.png")
500
+ )
501
+ except Exception:
502
+ pass
503
+ try:
504
+ win.close()
505
+ proc.wait(timeout=5)
506
+ except Exception:
507
+ proc.kill()
508
+ # tmp_path is cleaned up automatically by pytest
509
+
510
+ @pytest.hookimpl(tryfirst=True, hookwrapper=True)
511
+ def pytest_runtest_makereport(item, call):
512
+ outcome = yield
513
+ setattr(item, f"rep_{outcome.get_result().when}", outcome.get_result())
514
+ ```
515
+
516
+ ### Tier 2 — Windows Job Object (optional: process-lifetime containment)
517
+
518
+ Attach the process to a Job Object so it is **automatically terminated** when
519
+ the test fixture's job handle is GC'd. Also prevents the app from spawning
520
+ child processes that escape fixture cleanup.
521
+
522
+ > **Scope of isolation:** Job Objects do NOT virtualize filesystem access or
523
+ > block network traffic. File-write and network isolation require AppContainer,
524
+ > Windows Firewall rules, or Tier 3 (Windows Sandbox). Use Tier 2 only for
525
+ > process-lifetime and child-process containment.
526
+
527
+ Requires no extra dependencies.
528
+
529
+ ```python
530
+ import ctypes, ctypes.wintypes as wt
531
+
532
+ def restrict_process(pid: int):
533
+ """
534
+ Attach the process to a Job Object that prevents it from:
535
+ - spawning processes outside the job (LIMIT_KILL_ON_JOB_CLOSE)
536
+ Does NOT block network — use Windows Firewall rules for that.
537
+ """
538
+ JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE = 0x00002000
539
+ # Minimal rights: SET_QUOTA (0x0100) | TERMINATE (0x0001)
540
+ PROCESS_SET_QUOTA_AND_TERMINATE = 0x0101
541
+
542
+ kernel32 = ctypes.windll.kernel32
543
+ job = kernel32.CreateJobObjectW(None, None)
544
+ hproc = kernel32.OpenProcess(PROCESS_SET_QUOTA_AND_TERMINATE, False, pid)
545
+
546
+ # Correct struct layout — LimitFlags is at offset +16, not +44
547
+ class JOBOBJECT_BASIC_LIMIT_INFORMATION(ctypes.Structure):
548
+ _fields_ = [
549
+ ("PerProcessUserTimeLimit", wt.LARGE_INTEGER),
550
+ ("PerJobUserTimeLimit", wt.LARGE_INTEGER),
551
+ ("LimitFlags", wt.DWORD),
552
+ ("MinimumWorkingSetSize", ctypes.c_size_t),
553
+ ("MaximumWorkingSetSize", ctypes.c_size_t),
554
+ ("ActiveProcessLimit", wt.DWORD),
555
+ ("Affinity", ctypes.c_size_t),
556
+ ("PriorityClass", wt.DWORD),
557
+ ("SchedulingClass", wt.DWORD),
558
+ ]
559
+
560
+ info = JOBOBJECT_BASIC_LIMIT_INFORMATION()
561
+ info.LimitFlags = JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
562
+ ok = kernel32.SetInformationJobObject(job, 2, ctypes.byref(info), ctypes.sizeof(info))
563
+ if not ok:
564
+ raise ctypes.WinError()
565
+ kernel32.AssignProcessToJobObject(job, hproc)
566
+ kernel32.CloseHandle(hproc)
567
+ return job # keep alive — job closes (kills proc) when GC'd
568
+
569
+ # After proc = subprocess.Popen(...): job = restrict_process(proc.pid)
570
+ ```
571
+
572
+ ### Tier 3 — Windows Sandbox (CI full-OS isolation)
573
+
574
+ When you need a clean Windows image per run (no leftover registry keys, no
575
+ shared GPU state, true isolation), run the **entire test suite** inside
576
+ [Windows Sandbox](https://learn.microsoft.com/windows/security/application-security/application-isolation/windows-sandbox/windows-sandbox-overview).
577
+
578
+ **Requirement:** Windows 10/11 Pro or Enterprise, Virtualization enabled.
579
+
580
+ Create `e2e-sandbox.wsb` in your project root:
581
+
582
+ ```xml
583
+ <Configuration>
584
+ <MappedFolders>
585
+ <!-- App binary (read-only) -->
586
+ <MappedFolder>
587
+ <HostFolder>C:\path\to\your\build\Release</HostFolder>
588
+ <SandboxFolder>C:\app</SandboxFolder>
589
+ <ReadOnly>true</ReadOnly>
590
+ </MappedFolder>
591
+ <!-- Test suite (read-write for artifacts) -->
592
+ <MappedFolder>
593
+ <HostFolder>C:\path\to\your\e2e_test</HostFolder>
594
+ <SandboxFolder>C:\e2e_test</SandboxFolder>
595
+ <ReadOnly>false</ReadOnly>
596
+ </MappedFolder>
597
+ </MappedFolders>
598
+ <LogonCommand>
599
+ <!--
600
+ Windows Sandbox starts with no Python. Install it silently first,
601
+ then install deps and run tests. Artifacts are written back to the
602
+ host via the MappedFolder above.
603
+ -->
604
+ <Command>powershell -Command "
605
+ winget install --id Python.Python.3.11 --silent --accept-package-agreements;
606
+ $env:PATH += ';' + $env:LOCALAPPDATA + '\Programs\Python\Python311\Scripts';
607
+ cd C:\e2e_test;
608
+ pip install -r requirements.txt;
609
+ pytest tests\ -v
610
+ "</Command>
611
+ </LogonCommand>
612
+ </Configuration>
613
+ ```
614
+
615
+ Launch: `WindowsSandbox.exe e2e-sandbox.wsb`
616
+
617
+ > pywinauto and the app both run **inside** the sandbox (same session required).
618
+ > Artifacts are written back to the host via the mapped folder.
619
+
620
+ ### Tier comparison
621
+
622
+ | Tier | Isolation | Setup cost | Works on CI | Use when |
623
+ |------|-----------|-----------|-------------|----------|
624
+ | 1 — `tmp_path` env redirect | Filesystem | Zero | Always | Default for all tests |
625
+ | 2 — Job Object | Process tree | Low | Always | Prevent child-process escape |
626
+ | 3 — Windows Sandbox | Full OS | Medium | Needs Pro/Enterprise image | Nightly clean-room runs |
627
+
628
+ ### Prevent hanging tests
629
+
630
+ Add `pytest-timeout` to cap any single test. In `pytest.ini` set `timeout = 60` and `timeout_method = thread`. Note: `thread` method cannot kill Qt app subprocesses on Windows — add `atexit.register(lambda: [p.kill() for p in psutil.Process().children(recursive=True)])` in `conftest.py` to reap orphans.
631
+
632
+ ## CI/CD Integration
633
+
634
+ ```yaml
635
+ # .github/workflows/e2e-desktop.yml
636
+ name: Desktop E2E
637
+ on: [push, pull_request]
638
+
639
+ jobs:
640
+ e2e:
641
+ runs-on: windows-latest # real GUI environment, no Xvfb needed
642
+ steps:
643
+ - uses: actions/checkout@v4
644
+
645
+ - uses: actions/setup-python@v5
646
+ with: { python-version: "3.11" }
647
+
648
+ - name: Install deps
649
+ run: pip install pywinauto pytest pytest-html Pillow
650
+
651
+ - name: Build app
652
+ run: cmake --build build --config Release # adjust to your build system
653
+
654
+ - name: Run E2E
655
+ env:
656
+ APP_PATH: ${{ github.workspace }}\build\Release\MyApp.exe
657
+ APP_TITLE: "My Application"
658
+ CI: "true"
659
+ run: pytest tests/ --html=artifacts/report.html --self-contained-html --junitxml=artifacts/results.xml -v
660
+
661
+ - uses: actions/upload-artifact@v4
662
+ if: always()
663
+ with:
664
+ name: e2e-artifacts
665
+ path: artifacts/
666
+ retention-days: 14
667
+ ```
668
+
669
+ ## Qt Specific
670
+
671
+ ### Enable UIA in Qt 5.x
672
+
673
+ Qt 5.x accessibility is disabled by default in some builds (especially 5.7–5.14). Set the environment variable **before** launching. Qt 6.x enables accessibility by default — skip this step for Qt 6.
674
+
675
+ ```python
676
+ # conftest.py — add at module top
677
+ import os
678
+ os.environ["QT_ACCESSIBILITY"] = "1"
679
+ ```
680
+
681
+ Or export it in CI:
682
+
683
+ ```yaml
684
+ env:
685
+ QT_ACCESSIBILITY: "1"
686
+ ```
687
+
688
+ ### Add Stable Identifiers to Qt Widgets
689
+
690
+ ```cpp
691
+ // Preferred: both objectName and accessibleName
692
+ void setTestId(QWidget* w, const char* id) {
693
+ w->setObjectName(id);
694
+ w->setAccessibleName(id); // becomes UIA Name property
695
+ }
696
+
697
+ // In your dialog constructor:
698
+ setTestId(ui->usernameEdit, "usernameInput");
699
+ setTestId(ui->passwordEdit, "passwordInput");
700
+ setTestId(ui->loginButton, "btnLogin");
701
+ setTestId(ui->errorLabel, "lblError");
702
+ ```
703
+
704
+ Centralise all IDs in a header to avoid typos:
705
+
706
+ ```cpp
707
+ // test_ids.h
708
+ #define TID_USERNAME "usernameInput"
709
+ #define TID_PASSWORD "passwordInput"
710
+ #define TID_BTN_LOGIN "btnLogin"
711
+ #define TID_LBL_ERROR "lblError"
712
+ ```
713
+
714
+ ### Qt-Specific Quirks
715
+
716
+ **QComboBox** — the dropdown is a separate top-level window:
717
+
718
+ ```python
719
+ from pywinauto import Desktop
720
+
721
+ def select_combo_item(page, combo_spec, item_text):
722
+ page.click(combo_spec)
723
+ # Dropdown appears as a new root-level window
724
+ # class_name varies by Qt version — verify with Accessibility Insights
725
+ # Qt 5.x: "Qt5QWindowIcon" | Qt 6.x: "Qt6QWindowIcon" — verify with Accessibility Insights
726
+ popup = Desktop(backend="uia").window(class_name_re="Qt[56]QWindowIcon")
727
+ popup.wait("visible", timeout=5)
728
+ popup.child_window(title=item_text).click_input()
729
+ ```
730
+
731
+ **QMessageBox / QDialog** — also separate top-level windows:
732
+
733
+ ```python
734
+ dlg = page.wait_window("Confirm") # wait for dialog title
735
+ dlg.child_window(title="OK").click_input() # click button inside it
736
+ ```
737
+
738
+ **QTableWidget / QTableView** — row/cell access:
739
+
740
+ ```python
741
+ table = page.by_id("tblUsers").wrapper_object()
742
+ cell = table.cell(row=0, column=1)
743
+ print(cell.window_text())
744
+ ```
745
+
746
+ **Self-drawn controls** (`paintEvent`-only, `QGraphicsView`, `QOpenGLWidget`) — UIA cannot see their internals. Use the Fallback section below.
747
+
748
+ ## Fallback: Screenshot Mode
749
+
750
+ When a control is not reachable via UIA (self-drawn, third-party, game engine):
751
+
752
+ ```bash
753
+ pip install pyautogui Pillow opencv-python
754
+ ```
755
+
756
+ ```python
757
+ import pyautogui, cv2, numpy as np
758
+ from PIL import Image
759
+
760
+ def find_image_on_screen(template_path, confidence=0.85):
761
+ """Locate a template image on screen. Returns (x, y) center or None."""
762
+ screen = np.array(pyautogui.screenshot())
763
+ template = np.array(Image.open(template_path))
764
+ result = cv2.matchTemplate(
765
+ cv2.cvtColor(screen, cv2.COLOR_RGB2BGR),
766
+ cv2.cvtColor(template, cv2.COLOR_RGB2BGR),
767
+ cv2.TM_CCOEFF_NORMED,
768
+ )
769
+ _, max_val, _, max_loc = cv2.minMaxLoc(result)
770
+ if max_val >= confidence:
771
+ h, w = template.shape[:2]
772
+ return max_loc[0] + w // 2, max_loc[1] + h // 2
773
+ return None
774
+
775
+ def click_image(template_path, confidence=0.85):
776
+ pos = find_image_on_screen(template_path, confidence)
777
+ if pos is None:
778
+ raise RuntimeError(f"Image not found on screen: {template_path}")
779
+ pyautogui.click(*pos)
780
+ ```
781
+
782
+ ### DPI / Scaling Rules (screenshot mode only)
783
+
784
+ Screenshot matching is brutally sensitive to Windows display scaling (100% / 125% / 150%). Three hard rules:
785
+
786
+ 1. **Capture templates at the same scale as the target machine.** Don't try to rescue a mismatch with `PIL.Image.resize` — `cv2.matchTemplate` is very fragile against resampling artefacts.
787
+ 2. **Pin the CI display scaling.** On `windows-latest` add a step like `Set-DisplayResolution 1920 1080 -Force` and disable per-monitor DPI scaling, so screenshot dimensions are reproducible.
788
+ 3. **Record the scale alongside each artefact.** On capture, write `GetDpiForWindow(hwnd) / 96` to `artifacts/<test>/metadata.json` — postmortems become obvious instead of guess-work.
789
+
790
+ > Process-level DPI awareness (`SetProcessDpiAwarenessContext`) **can conflict with Qt's own DPI handling** when the app under test is Qt-based. Prefer "same-scale templates + CI pin" over flipping process-wide DPI mode in fixtures.
791
+
792
+ ### Debugging Match Confidence
793
+
794
+ When tuning the `confidence` threshold, the only sane workflow is to **see** where the match landed. The helper below is diagnosis-only — do not call it from test code.
795
+
796
+ ```python
797
+ def debug_match(template_path, out="artifacts/match_debug.png", confidence=0.85):
798
+ """Diagnosis-only. Draw the best-match rectangle + score back on the current screen.
799
+
800
+ NOT for production tests — use when calibrating confidence or chasing false matches.
801
+ """
802
+ import os, cv2, pyautogui, numpy as np
803
+ screen = np.array(pyautogui.screenshot())[:, :, ::-1]
804
+ tpl = cv2.imread(template_path)
805
+ if tpl is None:
806
+ raise RuntimeError(f"Template unreadable: {template_path}")
807
+ res = cv2.matchTemplate(screen, tpl, cv2.TM_CCOEFF_NORMED)
808
+ _, mv, _, ml = cv2.minMaxLoc(res)
809
+ h, w = tpl.shape[:2]
810
+ colour = (0, 255, 0) if mv >= confidence else (0, 0, 255) # green pass / red fail
811
+ cv2.rectangle(screen, ml, (ml[0]+w, ml[1]+h), colour, 2)
812
+ cv2.putText(screen, f"score={mv:.3f} thr={confidence}",
813
+ (ml[0], max(20, ml[1]-6)),
814
+ cv2.FONT_HERSHEY_SIMPLEX, 0.7, colour, 2)
815
+ os.makedirs(os.path.dirname(out) or ".", exist_ok=True)
816
+ cv2.imwrite(out, screen)
817
+ return mv
818
+ ```
819
+
820
+ **Use sparingly** — image matching breaks on DPI changes, theme switches, and partial occlusion.
821
+ Always try UIA first; fall back to screenshots only for genuinely unreachable controls.
822
+
823
+ ## Anti-Patterns
824
+
825
+ ```python
826
+ # BAD: fixed sleep
827
+ time.sleep(3)
828
+ page.click(page.by_id("btnSubmit"))
829
+
830
+ # GOOD: condition wait
831
+ page.wait_visible(page.by_id("btnSubmit"))
832
+ page.click(page.by_id("btnSubmit"))
833
+ ```
834
+
835
+ ```python
836
+ # BAD: brittle class+index locator as primary strategy
837
+ page.by_class("Edit", index=2).type_keys("hello")
838
+
839
+ # GOOD: AutomationId
840
+ page.by_id("usernameInput").set_edit_text("hello")
841
+ ```
842
+
843
+ ```python
844
+ # BAD: assert on pixel coordinates
845
+ assert btn.rectangle().left == 120
846
+
847
+ # GOOD: assert on content / state
848
+ assert page.get_text(page.by_id("lblStatus")) == "Logged in"
849
+ assert page.by_id("btnLogout").is_enabled()
850
+ ```
851
+
852
+ ```python
853
+ # BAD: share app instance across all tests (state leaks)
854
+ @pytest.fixture(scope="session")
855
+ def app(): ...
856
+
857
+ # GOOD: fresh process per test (or per class at most)
858
+ @pytest.fixture(scope="function")
859
+ def app(): ...
860
+ ```
861
+
862
+ ## Running Tests
863
+
864
+ ```bash
865
+ # All tests
866
+ pytest tests/ -v
867
+
868
+ # Smoke only
869
+ pytest tests/ -m smoke -v
870
+
871
+ # Specific file
872
+ pytest tests/test_login.py -v
873
+
874
+ # With custom app path
875
+ APP_PATH="C:\build\Release\MyApp.exe" APP_TITLE="MyApp" pytest tests/ -v
876
+
877
+ # Detect flaky tests (repeat each 5 times)
878
+ pip install pytest-repeat
879
+ pytest tests/test_login.py --count=5 -v
880
+ ```
881
+
882
+ ## Related Skills
883
+
884
+ - `e2e-testing` — Playwright E2E for web applications
885
+ - `cpp-testing` — C++ unit/integration testing with GoogleTest
886
+ - `cpp-coding-standards` — C++ code style and patterns