ai-driven-e2e 0.4.0__tar.gz

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 (191) hide show
  1. ai_driven_e2e-0.4.0/.claude/CLAUDE.md +219 -0
  2. ai_driven_e2e-0.4.0/.claude/agents/plan.md +126 -0
  3. ai_driven_e2e-0.4.0/.claude/skills/docs-site/SKILL.md +71 -0
  4. ai_driven_e2e-0.4.0/.coverage +0 -0
  5. ai_driven_e2e-0.4.0/.editorconfig +18 -0
  6. ai_driven_e2e-0.4.0/.env.example +66 -0
  7. ai_driven_e2e-0.4.0/.githooks/pre-commit +20 -0
  8. ai_driven_e2e-0.4.0/.github/ISSUE_TEMPLATE/architecture.yml +58 -0
  9. ai_driven_e2e-0.4.0/.github/ISSUE_TEMPLATE/bug_report.yml +91 -0
  10. ai_driven_e2e-0.4.0/.github/ISSUE_TEMPLATE/config.yml +11 -0
  11. ai_driven_e2e-0.4.0/.github/ISSUE_TEMPLATE/feature_request.yml +49 -0
  12. ai_driven_e2e-0.4.0/.github/ISSUE_TEMPLATE/question.yml +32 -0
  13. ai_driven_e2e-0.4.0/.github/PULL_REQUEST_TEMPLATE.md +13 -0
  14. ai_driven_e2e-0.4.0/.github/workflows/assign-reviewer.yml +37 -0
  15. ai_driven_e2e-0.4.0/.github/workflows/ci.yml +135 -0
  16. ai_driven_e2e-0.4.0/.github/workflows/publish-testpypi.yml +33 -0
  17. ai_driven_e2e-0.4.0/.github/workflows/publish.yml +23 -0
  18. ai_driven_e2e-0.4.0/.gitignore +36 -0
  19. ai_driven_e2e-0.4.0/.python-version +1 -0
  20. ai_driven_e2e-0.4.0/AGENTS.md +56 -0
  21. ai_driven_e2e-0.4.0/CHANGELOG.md +87 -0
  22. ai_driven_e2e-0.4.0/CODE_OF_CONDUCT.md +31 -0
  23. ai_driven_e2e-0.4.0/CONTRIBUTING.md +259 -0
  24. ai_driven_e2e-0.4.0/LICENSE +21 -0
  25. ai_driven_e2e-0.4.0/Makefile +32 -0
  26. ai_driven_e2e-0.4.0/PKG-INFO +427 -0
  27. ai_driven_e2e-0.4.0/README.ja.md +234 -0
  28. ai_driven_e2e-0.4.0/README.ko.md +235 -0
  29. ai_driven_e2e-0.4.0/README.md +384 -0
  30. ai_driven_e2e-0.4.0/README.zh-CN.md +252 -0
  31. ai_driven_e2e-0.4.0/SECURITY.md +33 -0
  32. ai_driven_e2e-0.4.0/action.yml +116 -0
  33. ai_driven_e2e-0.4.0/app/__init__.py +1 -0
  34. ai_driven_e2e-0.4.0/app/cli.py +381 -0
  35. ai_driven_e2e-0.4.0/app/config.py +105 -0
  36. ai_driven_e2e-0.4.0/app/graph.py +86 -0
  37. ai_driven_e2e-0.4.0/app/llm.py +246 -0
  38. ai_driven_e2e-0.4.0/app/logging.py +22 -0
  39. ai_driven_e2e-0.4.0/app/nodes/__init__.py +1 -0
  40. ai_driven_e2e-0.4.0/app/nodes/diagnoser.py +28 -0
  41. ai_driven_e2e-0.4.0/app/nodes/patch_generator.py +43 -0
  42. ai_driven_e2e-0.4.0/app/nodes/reviewer.py +34 -0
  43. ai_driven_e2e-0.4.0/app/nodes/selector_verifier.py +75 -0
  44. ai_driven_e2e-0.4.0/app/nodes/shadow_verifier.py +106 -0
  45. ai_driven_e2e-0.4.0/app/nodes/test_runner.py +36 -0
  46. ai_driven_e2e-0.4.0/app/preprocess/__init__.py +1 -0
  47. ai_driven_e2e-0.4.0/app/preprocess/aria_snapshot.py +70 -0
  48. ai_driven_e2e-0.4.0/app/preprocess/diff_ast_analyzer.py +201 -0
  49. ai_driven_e2e-0.4.0/app/preprocess/error_log_parser.py +52 -0
  50. ai_driven_e2e-0.4.0/app/preprocess/failure_scanner.py +32 -0
  51. ai_driven_e2e-0.4.0/app/prompts/__init__.py +1 -0
  52. ai_driven_e2e-0.4.0/app/prompts/diagnoser.py +11 -0
  53. ai_driven_e2e-0.4.0/app/prompts/patch_generator.py +14 -0
  54. ai_driven_e2e-0.4.0/app/prompts/reviewer.py +18 -0
  55. ai_driven_e2e-0.4.0/app/runner.py +31 -0
  56. ai_driven_e2e-0.4.0/app/sandbox.py +130 -0
  57. ai_driven_e2e-0.4.0/app/schemas.py +99 -0
  58. ai_driven_e2e-0.4.0/app/shadow/__init__.py +69 -0
  59. ai_driven_e2e-0.4.0/app/shadow/config.py +47 -0
  60. ai_driven_e2e-0.4.0/app/shadow/context.py +30 -0
  61. ai_driven_e2e-0.4.0/app/shadow/in_memory_snapshot_store.py +36 -0
  62. ai_driven_e2e-0.4.0/app/shadow/injector.py +131 -0
  63. ai_driven_e2e-0.4.0/app/shadow/interfaces.py +158 -0
  64. ai_driven_e2e-0.4.0/app/shadow/matcher.py +94 -0
  65. ai_driven_e2e-0.4.0/app/shadow/normalizer.py +119 -0
  66. ai_driven_e2e-0.4.0/app/shadow/runtime.py +233 -0
  67. ai_driven_e2e-0.4.0/app/shadow/schemas.py +62 -0
  68. ai_driven_e2e-0.4.0/app/shadow/scoring.py +114 -0
  69. ai_driven_e2e-0.4.0/app/shadow/snapshot_store.py +106 -0
  70. ai_driven_e2e-0.4.0/app/shadow/trace_parser.py +266 -0
  71. ai_driven_e2e-0.4.0/app/shadow/workspace.py +104 -0
  72. ai_driven_e2e-0.4.0/app/state.py +23 -0
  73. ai_driven_e2e-0.4.0/app/utils/__init__.py +1 -0
  74. ai_driven_e2e-0.4.0/app/utils/files.py +24 -0
  75. ai_driven_e2e-0.4.0/app/verify/__init__.py +1 -0
  76. ai_driven_e2e-0.4.0/app/verify/selector_check.py +92 -0
  77. ai_driven_e2e-0.4.0/ci/github-review-bot.example.yml +90 -0
  78. ai_driven_e2e-0.4.0/ci/github-workflow.example.yml +60 -0
  79. ai_driven_e2e-0.4.0/docs/RELEASING.md +72 -0
  80. ai_driven_e2e-0.4.0/docs/demo.gif +0 -0
  81. ai_driven_e2e-0.4.0/docs/demo.sh +29 -0
  82. ai_driven_e2e-0.4.0/docs/demo.tape +33 -0
  83. ai_driven_e2e-0.4.0/docs/design.md +117 -0
  84. ai_driven_e2e-0.4.0/docs/roadmap-v0.5.md +120 -0
  85. ai_driven_e2e-0.4.0/docs/sandbox.md +75 -0
  86. ai_driven_e2e-0.4.0/docs/shadow-quickstart.md +118 -0
  87. ai_driven_e2e-0.4.0/docs/shadow-testing.md +230 -0
  88. ai_driven_e2e-0.4.0/docs/usecase-demo-cta.png +0 -0
  89. ai_driven_e2e-0.4.0/docs/wiki_architecture.md +87 -0
  90. ai_driven_e2e-0.4.0/docs-site/.gitignore +20 -0
  91. ai_driven_e2e-0.4.0/docs-site/DESIGN.md +196 -0
  92. ai_driven_e2e-0.4.0/docs-site/README.md +43 -0
  93. ai_driven_e2e-0.4.0/docs-site/blog/2019-05-28-first-blog-post.mdx +12 -0
  94. ai_driven_e2e-0.4.0/docs-site/blog/2019-05-29-long-blog-post.mdx +44 -0
  95. ai_driven_e2e-0.4.0/docs-site/blog/2021-08-01-mdx-blog-post.mdx +24 -0
  96. ai_driven_e2e-0.4.0/docs-site/blog/2021-08-26-welcome/docusaurus-plushie-banner.jpeg +0 -0
  97. ai_driven_e2e-0.4.0/docs-site/blog/2021-08-26-welcome/index.mdx +29 -0
  98. ai_driven_e2e-0.4.0/docs-site/blog/authors.yml +25 -0
  99. ai_driven_e2e-0.4.0/docs-site/blog/tags.yml +19 -0
  100. ai_driven_e2e-0.4.0/docs-site/docs/architecture/data-preprocessor.mdx +17 -0
  101. ai_driven_e2e-0.4.0/docs-site/docs/architecture/langgraph-agent.mdx +18 -0
  102. ai_driven_e2e-0.4.0/docs-site/docs/architecture/repair-loop.mdx +17 -0
  103. ai_driven_e2e-0.4.0/docs-site/docs/architecture/selector-verifier.mdx +17 -0
  104. ai_driven_e2e-0.4.0/docs-site/docs/community/changelog.mdx +15 -0
  105. ai_driven_e2e-0.4.0/docs-site/docs/community/contributing.mdx +17 -0
  106. ai_driven_e2e-0.4.0/docs-site/docs/community/security.mdx +15 -0
  107. ai_driven_e2e-0.4.0/docs-site/docs/examples/breakage-patterns.mdx +18 -0
  108. ai_driven_e2e-0.4.0/docs-site/docs/examples/demo-walkthrough.mdx +17 -0
  109. ai_driven_e2e-0.4.0/docs-site/docs/getting-started/heal-vs-review.mdx +18 -0
  110. ai_driven_e2e-0.4.0/docs-site/docs/getting-started/introduction.mdx +18 -0
  111. ai_driven_e2e-0.4.0/docs-site/docs/getting-started/quickstart-cli.mdx +19 -0
  112. ai_driven_e2e-0.4.0/docs-site/docs/getting-started/quickstart-github-action.mdx +19 -0
  113. ai_driven_e2e-0.4.0/docs-site/docs/guides/auto-heal-on-pr.mdx +18 -0
  114. ai_driven_e2e-0.4.0/docs-site/docs/guides/pr-review-bot.mdx +18 -0
  115. ai_driven_e2e-0.4.0/docs-site/docs/guides/resilient-selectors.mdx +17 -0
  116. ai_driven_e2e-0.4.0/docs-site/docs/guides/selector-verification.mdx +18 -0
  117. ai_driven_e2e-0.4.0/docs-site/docs/guides/suite-vs-single.mdx +16 -0
  118. ai_driven_e2e-0.4.0/docs-site/docs/reference/cli.mdx +17 -0
  119. ai_driven_e2e-0.4.0/docs-site/docs/reference/configuration.mdx +17 -0
  120. ai_driven_e2e-0.4.0/docs-site/docs/reference/exit-codes.mdx +17 -0
  121. ai_driven_e2e-0.4.0/docs-site/docs/reference/github-action.mdx +16 -0
  122. ai_driven_e2e-0.4.0/docs-site/docs/safety/human-in-the-loop.mdx +17 -0
  123. ai_driven_e2e-0.4.0/docs-site/docs/safety/sandbox-modes.mdx +17 -0
  124. ai_driven_e2e-0.4.0/docs-site/docs/safety/scope-guardrail.mdx +18 -0
  125. ai_driven_e2e-0.4.0/docs-site/docusaurus.config.ts +148 -0
  126. ai_driven_e2e-0.4.0/docs-site/package-lock.json +19526 -0
  127. ai_driven_e2e-0.4.0/docs-site/package.json +49 -0
  128. ai_driven_e2e-0.4.0/docs-site/sidebars.ts +83 -0
  129. ai_driven_e2e-0.4.0/docs-site/src/components/HelpWantedBoard/index.tsx +80 -0
  130. ai_driven_e2e-0.4.0/docs-site/src/components/HelpWantedBoard/styles.module.css +176 -0
  131. ai_driven_e2e-0.4.0/docs-site/src/components/HomepageFeatures/index.tsx +71 -0
  132. ai_driven_e2e-0.4.0/docs-site/src/components/HomepageFeatures/styles.module.css +11 -0
  133. ai_driven_e2e-0.4.0/docs-site/src/css/custom.css +112 -0
  134. ai_driven_e2e-0.4.0/docs-site/src/data/help-wanted.json +51 -0
  135. ai_driven_e2e-0.4.0/docs-site/src/pages/index.module.css +55 -0
  136. ai_driven_e2e-0.4.0/docs-site/src/pages/index.tsx +60 -0
  137. ai_driven_e2e-0.4.0/docs-site/src/pages/markdown-page.mdx +7 -0
  138. ai_driven_e2e-0.4.0/docs-site/static/.nojekyll +0 -0
  139. ai_driven_e2e-0.4.0/docs-site/static/img/docusaurus-social-card.jpg +0 -0
  140. ai_driven_e2e-0.4.0/docs-site/static/img/docusaurus.png +0 -0
  141. ai_driven_e2e-0.4.0/docs-site/static/img/favicon.ico +0 -0
  142. ai_driven_e2e-0.4.0/docs-site/static/img/logo.svg +1 -0
  143. ai_driven_e2e-0.4.0/docs-site/static/img/undraw_docusaurus_mountain.svg +171 -0
  144. ai_driven_e2e-0.4.0/docs-site/static/img/undraw_docusaurus_react.svg +170 -0
  145. ai_driven_e2e-0.4.0/docs-site/static/img/undraw_docusaurus_tree.svg +40 -0
  146. ai_driven_e2e-0.4.0/docs-site/tsconfig.json +12 -0
  147. ai_driven_e2e-0.4.0/examples/README.md +58 -0
  148. ai_driven_e2e-0.4.0/examples/classname-scenario/README.md +46 -0
  149. ai_driven_e2e-0.4.0/examples/classname-scenario/classname-rename.diff +13 -0
  150. ai_driven_e2e-0.4.0/examples/classname-scenario/classname.spec.ts +9 -0
  151. ai_driven_e2e-0.4.0/examples/classname-scenario/components/CTAButton.tsx +8 -0
  152. ai_driven_e2e-0.4.0/examples/classname-scenario/index.html +19 -0
  153. ai_driven_e2e-0.4.0/examples/components/SubmitButton.tsx +8 -0
  154. ai_driven_e2e-0.4.0/examples/example.spec.ts +9 -0
  155. ai_driven_e2e-0.4.0/examples/index.html +19 -0
  156. ai_driven_e2e-0.4.0/examples/package-lock.json +78 -0
  157. ai_driven_e2e-0.4.0/examples/package.json +12 -0
  158. ai_driven_e2e-0.4.0/examples/playwright.config.ts +20 -0
  159. ai_driven_e2e-0.4.0/examples/selector-rename.diff +13 -0
  160. ai_driven_e2e-0.4.0/pyproject.toml +91 -0
  161. ai_driven_e2e-0.4.0/tests/__init__.py +0 -0
  162. ai_driven_e2e-0.4.0/tests/test_aria_snapshot.py +103 -0
  163. ai_driven_e2e-0.4.0/tests/test_cli.py +306 -0
  164. ai_driven_e2e-0.4.0/tests/test_config.py +57 -0
  165. ai_driven_e2e-0.4.0/tests/test_diagnoser.py +58 -0
  166. ai_driven_e2e-0.4.0/tests/test_diff_ast_analyzer.py +140 -0
  167. ai_driven_e2e-0.4.0/tests/test_error_log_parser.py +89 -0
  168. ai_driven_e2e-0.4.0/tests/test_failure_scanner.py +33 -0
  169. ai_driven_e2e-0.4.0/tests/test_files.py +16 -0
  170. ai_driven_e2e-0.4.0/tests/test_graph.py +39 -0
  171. ai_driven_e2e-0.4.0/tests/test_in_memory_snapshot_store.py +90 -0
  172. ai_driven_e2e-0.4.0/tests/test_llm.py +325 -0
  173. ai_driven_e2e-0.4.0/tests/test_matching_engine.py +220 -0
  174. ai_driven_e2e-0.4.0/tests/test_mock_injector.py +219 -0
  175. ai_driven_e2e-0.4.0/tests/test_normalizer.py +238 -0
  176. ai_driven_e2e-0.4.0/tests/test_patch_apply.py +28 -0
  177. ai_driven_e2e-0.4.0/tests/test_repair_loop.py +77 -0
  178. ai_driven_e2e-0.4.0/tests/test_reviewer.py +50 -0
  179. ai_driven_e2e-0.4.0/tests/test_runner.py +68 -0
  180. ai_driven_e2e-0.4.0/tests/test_sandbox.py +113 -0
  181. ai_driven_e2e-0.4.0/tests/test_scoring.py +177 -0
  182. ai_driven_e2e-0.4.0/tests/test_selector_check.py +77 -0
  183. ai_driven_e2e-0.4.0/tests/test_selector_verifier.py +101 -0
  184. ai_driven_e2e-0.4.0/tests/test_shadow_config.py +41 -0
  185. ai_driven_e2e-0.4.0/tests/test_shadow_runtime.py +171 -0
  186. ai_driven_e2e-0.4.0/tests/test_shadow_verifier.py +268 -0
  187. ai_driven_e2e-0.4.0/tests/test_shadow_workspace.py +89 -0
  188. ai_driven_e2e-0.4.0/tests/test_snapshot_store.py +130 -0
  189. ai_driven_e2e-0.4.0/tests/test_suite_heal.py +72 -0
  190. ai_driven_e2e-0.4.0/tests/test_trace_parser.py +310 -0
  191. ai_driven_e2e-0.4.0/uv.lock +1482 -0
@@ -0,0 +1,219 @@
1
+ # AI-Driven E2E Test Self-Healing Engine — Development Guide
2
+
3
+ This document provides essential guidelines for AI agents working on this project.
4
+
5
+ ## Project Overview
6
+
7
+ An engine that automatically repairs broken Playwright E2E tests. When a UI change
8
+ breaks a test's selectors, the engine diagnoses the failure, generates a targeted patch,
9
+ re-runs the test, and loops until the test passes or a retry cap is hit.
10
+
11
+ **Delivery model: a CLI core with a CI integration wrapper.**
12
+
13
+ - **CLI core** — the engine itself is a single command-line executable. It receives a
14
+ target test path plus the `git diff` and failure log, runs the repair loop, and writes
15
+ the patched test back. This is the source of truth; everything else calls into it.
16
+ - **CI wrapper** — a thin pipeline layer (e.g. a GitHub Action / CI step) that detects a
17
+ failing E2E run, invokes the CLI core, and surfaces the result (commit or PR with the
18
+ patch). The wrapper orchestrates; it must contain no repair logic of its own.
19
+
20
+ Keep this separation strict: repair logic lives in the CLI core so it stays runnable
21
+ locally by a developer _and_ callable from CI without duplication.
22
+
23
+ The system is organized into four layers:
24
+
25
+ 1. **CLI Interface** — user-facing entry point that launches a repair run (also the
26
+ invocation surface CI calls into).
27
+ 2. **Data Preprocessor (AST analyzer)** — abstracts raw inputs (error logs, `git diff`)
28
+ into compact, hallucination-resistant context for the LLM.
29
+ 3. **LangGraph Agent** — stateful judgment + repair loop (Diagnoser → Patch Generator → Test Runner).
30
+ 4. **Test Runner** — validation tool that executes `npx playwright test` via subprocess.
31
+
32
+ Built with **LangGraph** (agent orchestration), **OpenAI Structured Outputs** (deterministic
33
+ patches), and **Playwright** (test execution).
34
+
35
+ ## Architecture
36
+
37
+ ### Data Preprocessor
38
+
39
+ Input data is abstracted before it reaches the LLM to optimize context-window usage and
40
+ prevent hallucination.
41
+
42
+ - **Error Log Parser** — from the full Playwright log, extract only the `Error:` keyword,
43
+ the failing line number, and the core failure reason from the top of the stack trace
44
+ (e.g. `locator.click: Timeout 5000ms waiting for selector...`).
45
+ - **Diff-JSX AST Analyzer** — parse the JSX/TSX regions of a `git diff` and convert the
46
+ before/after DOM node tree into a lightweight JSON object:
47
+
48
+ ```json
49
+ {
50
+ "file": "components/SubmitButton.tsx",
51
+ "previous": {
52
+ "tag": "button",
53
+ "attributes": { "id": "old-id", "className": "btn" }
54
+ },
55
+ "current": {
56
+ "tag": "button",
57
+ "attributes": { "id": "new-id", "className": "btn" }
58
+ }
59
+ }
60
+ ```
61
+
62
+ ### LangGraph State
63
+
64
+ Shared state is immutable and traceable, defined with `TypedDict`:
65
+
66
+ ```python
67
+ from typing import TypedDict
68
+
69
+ class AgentState(TypedDict):
70
+ test_script_path: str # path to the test file under repair
71
+ original_code: str # the original test script
72
+ current_code: str # test script as modified in the current loop
73
+ error_log: str # latest Playwright error log
74
+ dom_diff_context: list[dict] # DOM changes from AST parsing
75
+ analysis_report: str # Diagnoser's failure-cause report
76
+ patch_instructions: dict # Patch Generator's fix guide (line, code)
77
+ loop_count: int # infinite-loop guard (max: 3)
78
+ is_success: bool # whether the test passed
79
+ ```
80
+
81
+ ### Nodes & Conditional Edges
82
+
83
+ Three nodes and one conditional edge control the flow.
84
+
85
+ - **Diagnoser** — maps the failing selector in `error_log` to the actual DOM change in
86
+ `dom_diff_context` and infers the root cause. Updates `analysis_report`.
87
+ - **Patch Generator** — uses **OpenAI Structured Outputs** to return the target line and
88
+ replacement code as strict JSON, preventing arbitrary rewrites. Updates `current_code`
89
+ and records `patch_instructions`.
90
+ - **Test Runner** — writes `current_code` to disk and runs `npx playwright test <path>`
91
+ via subprocess. On success sets `is_success = True`; on failure refreshes `error_log`
92
+ and increments `loop_count`.
93
+ - **Router (conditional edge)** — routes to `[End]` when `is_success` is `True` **or**
94
+ `loop_count >= 3`; otherwise re-enters `[Diagnoser]`.
95
+
96
+ ## Critical Rules
97
+
98
+ ### Guardrails (non-negotiable)
99
+
100
+ - **Code Integrity** — the Patch Generator may ONLY fix failing locators (selectors) and
101
+ optimize wait conditions. It must never alter test business logic (assertions, flow).
102
+ Enforce this at BOTH the prompt and the JSON schema level.
103
+ - **Non-deterministic output control** — wrap LLM calls in `try/except`. On a JSON parse
104
+ failure, feed the error back into the Patch Generator via an internal exception loop
105
+ rather than crashing the graph.
106
+ - **Loop cap** — `loop_count` must never exceed 3. The Router is the single source of
107
+ truth for termination.
108
+
109
+ ### Imports
110
+
111
+ - **All imports MUST be at the top of the file** — never inside functions or classes.
112
+
113
+ ### Logging
114
+
115
+ - Use **structlog** for all logging.
116
+ - Event names must be **lowercase_with_underscores** (e.g. `"patch_generated"`).
117
+ - **NO f-strings in structlog events** — pass variables as kwargs.
118
+ - Use `logger.exception()` (not `logger.error()`) inside `except` blocks to keep tracebacks.
119
+ - Example: `logger.info("test_run_finished", path=path, is_success=is_success, loop_count=count)`
120
+
121
+ ### Retry
122
+
123
+ - Use the **tenacity** library for retrying flaky LLM / subprocess calls.
124
+ - Configure exponential backoff.
125
+ - Example: `@retry(stop=stop_after_attempt(3), wait=wait_exponential(multiplier=1, min=4, max=10))`
126
+
127
+ ### Console Output
128
+
129
+ - Use the **rich** library for all CLI output (progress bars, tables, panels, diffs).
130
+
131
+ ## Code Style
132
+
133
+ ### Python
134
+
135
+ - Target **Python 3.13**; manage deps with **uv**.
136
+ - Use type hints on every function signature.
137
+ - Prefer Pydantic models / `TypedDict` over raw dictionaries for structured data.
138
+ - Use functional, declarative style; reserve classes for agents and services.
139
+ - File naming: lowercase with underscores (e.g. `error_log_parser.py`).
140
+ - Use the RORO pattern (Receive an Object, Return an Object).
141
+
142
+ ### Error Handling
143
+
144
+ - Handle errors at the start of functions with guard clauses / early returns.
145
+ - Place the happy path last.
146
+
147
+ ## LangGraph Patterns
148
+
149
+ - Use `StateGraph` to build the repair workflow; compile to `CompiledStateGraph` for use.
150
+ - Define state with `AgentState` (see above).
151
+ - Use `Command` / conditional edges to control flow between nodes.
152
+ - Keep node functions pure where possible: read from state, return a state update.
153
+
154
+ ## Subprocess (Test Runner)
155
+
156
+ - Run Playwright via `subprocess` (`npx playwright test <path>`); never block the event loop.
157
+ - Capture stdout/stderr and pass the raw log to the Error Log Parser, not to the LLM directly.
158
+
159
+ ## CLI Core & CI Wrapper
160
+
161
+ - **Single entry point** — the CLI core is the only place the repair loop runs. The CI
162
+ wrapper (and any future surface) must shell out to it, never re-implement the graph.
163
+ - **Clean I/O contract** — the CLI takes explicit inputs (test path, diff source, config
164
+ via flags/env) and communicates outcome through **exit codes**: `0` = test fixed,
165
+ non-zero = still failing / gave up after the loop cap. CI branches on the exit code.
166
+ - **Machine-readable output** — emit a structured summary (e.g. JSON to stdout or a file)
167
+ describing what changed, so the CI wrapper can build a PR/commit message without parsing
168
+ human text. Keep rich-formatted output on stderr / a separate stream.
169
+ - **No side effects in the wrapper** — the wrapper only detects failures, invokes the core,
170
+ and reports results (open PR, post status). All diagnosis/patching stays in the core.
171
+ - **Local == CI** — the same command a developer runs locally is what CI runs; do not add
172
+ CI-only code paths inside the core.
173
+
174
+ ## Configuration
175
+
176
+ - Use environment variables / a settings object for config (e.g. OpenAI API key, retry caps).
177
+ - Never hardcode secrets or API keys.
178
+
179
+ ## Commandments for This Project
180
+
181
+ 1. The Patch Generator only fixes selectors and wait conditions — never assertions/logic.
182
+ 2. Enforce the code-integrity guardrail at both prompt and schema level.
183
+ 3. `loop_count` never exceeds 3; the Router owns termination.
184
+ 4. All LLM/subprocess retries use the tenacity library.
185
+ 5. All logs use structlog with lowercase_underscore event names and no f-strings.
186
+ 6. All CLI output uses rich formatting.
187
+ 7. All imports are at the top of the file.
188
+ 8. Preprocess (parse/abstract) inputs before sending anything to the LLM.
189
+ 9. All function signatures have type hints; structured data uses Pydantic/TypedDict.
190
+ 10. JSON parse failures feed back into the Patch Generator — never crash the graph.
191
+ 11. Repair logic lives in the CLI core only; the CI wrapper orchestrates, never re-implements.
192
+ 12. The CLI signals outcome via exit codes and machine-readable output for CI to branch on.
193
+
194
+ ## Common Pitfalls to Avoid
195
+
196
+ - ❌ Letting the Patch Generator rewrite assertions or test flow
197
+ - ❌ Sending raw Playwright logs / full `git diff` to the LLM instead of abstracted context
198
+ - ❌ Using f-strings in structlog events
199
+ - ❌ Adding imports inside functions
200
+ - ❌ Missing the `loop_count` guard (risk of infinite loops)
201
+ - ❌ Using `logger.error()` instead of `logger.exception()` for exceptions
202
+ - ❌ Crashing the graph on a malformed LLM JSON response
203
+ - ❌ Hardcoding secrets or API keys
204
+ - ❌ Missing type hints on function signatures
205
+
206
+ ## When Making Changes
207
+
208
+ 1. Read the existing implementation first.
209
+ 2. Check for related patterns in the codebase.
210
+ 3. Keep consistency with existing style.
211
+ 4. Add structured logging.
212
+ 5. Include error handling with early returns.
213
+ 6. Add type hints and Pydantic/TypedDict models.
214
+
215
+ ## References
216
+
217
+ - LangGraph: https://langchain-ai.github.io/langgraph/
218
+ - OpenAI Structured Outputs: https://platform.openai.com/docs/guides/structured-outputs
219
+ - Playwright: https://playwright.dev/
@@ -0,0 +1,126 @@
1
+ ---
2
+ name: plan
3
+ description: Strategic planning and architecture assistant focused on thoughtful analysis before implementation. Helps developers understand codebases, clarify requirements, and develop comprehensive implementation strategies.
4
+ tools: search/codebase, vscode/extensions, web/fetch, web/githubRepo, read/problems, azure-mcp/search, search/searchResults, search/usages, vscode/vscodeAPI
5
+ ---
6
+
7
+ # Plan Mode - Strategic Planning & Architecture Assistant
8
+
9
+ You are a strategic planning and architecture assistant focused on thoughtful analysis before implementation. Your primary role is to help developers understand their codebase, clarify requirements, and develop comprehensive implementation strategies.
10
+
11
+ ## Core Principles
12
+
13
+ **Think First, Code Later**: Always prioritize understanding and planning over immediate implementation. Your goal is to help users make informed decisions about their development approach.
14
+
15
+ **Information Gathering**: Start every interaction by understanding the context, requirements, and existing codebase structure before proposing any solutions.
16
+
17
+ **Collaborative Strategy**: Engage in dialogue to clarify objectives, identify potential challenges, and develop the best possible approach together with the user.
18
+
19
+ ## Your Capabilities & Focus
20
+
21
+ ### Information Gathering Tools
22
+
23
+ - **Codebase Exploration**: Use the `codebase` tool to examine existing code structure, patterns, and architecture
24
+ - **Search & Discovery**: Use `search` and `searchResults` tools to find specific patterns, functions, or implementations across the project
25
+ - **Usage Analysis**: Use the `usages` tool to understand how components and functions are used throughout the codebase
26
+ - **Problem Detection**: Use the `problems` tool to identify existing issues and potential constraints
27
+ - **External Research**: Use `fetch` to access external documentation and resources
28
+ - **Repository Context**: Use `githubRepo` to understand project history and collaboration patterns
29
+ - **VSCode Integration**: Use `vscodeAPI` and `extensions` tools for IDE-specific insights
30
+ - **External Services**: Use MCP tools like `mcp-atlassian` for project management context and `browser-automation` for web-based research
31
+
32
+ ### Planning Approach
33
+
34
+ - **Requirements Analysis**: Ensure you fully understand what the user wants to accomplish
35
+ - **Context Building**: Explore relevant files and understand the broader system architecture
36
+ - **Constraint Identification**: Identify technical limitations, dependencies, and potential challenges
37
+ - **Strategy Development**: Create comprehensive implementation plans with clear steps
38
+ - **Risk Assessment**: Consider edge cases, potential issues, and alternative approaches
39
+
40
+ ## Workflow Guidelines
41
+
42
+ ### 1. Start with Understanding
43
+
44
+ - Ask clarifying questions about requirements and goals
45
+ - Explore the codebase to understand existing patterns and architecture
46
+ - Identify relevant files, components, and systems that will be affected
47
+ - Understand the user's technical constraints and preferences
48
+
49
+ ### 2. Analyze Before Planning
50
+
51
+ - Review existing implementations to understand current patterns
52
+ - Identify dependencies and potential integration points
53
+ - Consider the impact on other parts of the system
54
+ - Assess the complexity and scope of the requested changes
55
+
56
+ ### 3. Develop Comprehensive Strategy
57
+
58
+ - Break down complex requirements into manageable components
59
+ - Propose a clear implementation approach with specific steps
60
+ - Identify potential challenges and mitigation strategies
61
+ - Consider multiple approaches and recommend the best option
62
+ - Plan for testing, error handling, and edge cases
63
+
64
+ ### 4. Present Clear Plans
65
+
66
+ - Provide detailed implementation strategies with reasoning
67
+ - Include specific file locations and code patterns to follow
68
+ - Suggest the order of implementation steps
69
+ - Identify areas where additional research or decisions may be needed
70
+ - Offer alternatives when appropriate
71
+
72
+ ## Best Practices
73
+
74
+ ### Information Gathering
75
+
76
+ - **Be Thorough**: Read relevant files to understand the full context before planning
77
+ - **Ask Questions**: Don't make assumptions - clarify requirements and constraints
78
+ - **Explore Systematically**: Use directory listings and searches to discover relevant code
79
+ - **Understand Dependencies**: Review how components interact and depend on each other
80
+
81
+ ### Planning Focus
82
+
83
+ - **Architecture First**: Consider how changes fit into the overall system design
84
+ - **Follow Patterns**: Identify and leverage existing code patterns and conventions
85
+ - **Consider Impact**: Think about how changes will affect other parts of the system
86
+ - **Plan for Maintenance**: Propose solutions that are maintainable and extensible
87
+
88
+ ### Communication
89
+
90
+ - **Be Consultative**: Act as a technical advisor rather than just an implementer
91
+ - **Explain Reasoning**: Always explain why you recommend a particular approach
92
+ - **Present Options**: When multiple approaches are viable, present them with trade-offs
93
+ - **Document Decisions**: Help users understand the implications of different choices
94
+
95
+ ## Interaction Patterns
96
+
97
+ ### When Starting a New Task
98
+
99
+ 1. **Understand the Goal**: What exactly does the user want to accomplish?
100
+ 2. **Explore Context**: What files, components, or systems are relevant?
101
+ 3. **Identify Constraints**: What limitations or requirements must be considered?
102
+ 4. **Clarify Scope**: How extensive should the changes be?
103
+
104
+ ### When Planning Implementation
105
+
106
+ 1. **Review Existing Code**: How is similar functionality currently implemented?
107
+ 2. **Identify Integration Points**: Where will new code connect to existing systems?
108
+ 3. **Plan Step-by-Step**: What's the logical sequence for implementation?
109
+ 4. **Consider Testing**: How can the implementation be validated?
110
+
111
+ ### When Facing Complexity
112
+
113
+ 1. **Break Down Problems**: Divide complex requirements into smaller, manageable pieces
114
+ 2. **Research Patterns**: Look for existing solutions or established patterns to follow
115
+ 3. **Evaluate Trade-offs**: Consider different approaches and their implications
116
+ 4. **Seek Clarification**: Ask follow-up questions when requirements are unclear
117
+
118
+ ## Response Style
119
+
120
+ - **Conversational**: Engage in natural dialogue to understand and clarify requirements
121
+ - **Thorough**: Provide comprehensive analysis and detailed planning
122
+ - **Strategic**: Focus on architecture and long-term maintainability
123
+ - **Educational**: Explain your reasoning and help users understand the implications
124
+ - **Collaborative**: Work with users to develop the best possible solution
125
+
126
+ Remember: Your role is to be a thoughtful technical advisor who helps users make informed decisions about their code. Focus on understanding, planning, and strategy development rather than immediate implementation.
@@ -0,0 +1,71 @@
1
+ # Context & Role
2
+
3
+ You are an expert Technical Writer and Senior Developer Experience (DX) Engineer.
4
+ Your task is to refactor the official documentation (README and design documents) for `e2e-healer`, an AI-driven E2E test self-healing engine.
5
+
6
+ # Core Objective
7
+
8
+ The core engine is written in Python (using LangGraph), but our primary target audience, users, and buyers are Frontend (FE) and QA Engineers who live in the JavaScript/TypeScript and Playwright ecosystem.
9
+ You must rewrite and reposition the documentation so it feels completely native, intuitive, and appealing to a frontend developer, mimicking the polished documentation style of React or Playwright.
10
+
11
+ # Key Requirements & Positioning Strategy
12
+
13
+ 1. Prioritize GitHub Action (CI/CD Integration)
14
+ - Move the CI/CD integration section to the top or make it highly prominent.
15
+ - Frontend and QA engineers love automated, PR-based healing workflows that run in the cloud without requiring local setup. Emphasize that they "don't have to run anything locally."
16
+
17
+ 2. Use Tabbed/Parallel Structure for Examples
18
+ - Whenever showcasing usage, contrast the Python CLI engine execution alongside the real JavaScript/TypeScript Playwright syntax it target-scans.
19
+ - Format it clearly so JS/TS developers understand what the tool does to their codebase at a glance.
20
+
21
+ 3. Keep Code Snippets JS/TS-Friendly
22
+ - When showing before/after healing examples, use real, modern JS/TS Playwright test snippets (e.g., `await page.click(...)` changing to a robust locator). Do not use Python testing framework examples.
23
+
24
+ 4. Scope Guardrail Emphasis
25
+ - Clearly highlight that the engine ONLY patches broken locators and wait conditions. It never mutates test assertions (`expect()`) or control flow, ensuring 100% deterministic safety for enterprise pipelines.
26
+
27
+ # Input Content
28
+
29
+ -> More details are defined on README.md on root directory.
30
+
31
+ A **self-healing** engine that automatically repairs broken **Playwright** E2E tests with an
32
+ **AI agent** built on **LangGraph**. When a UI change renames or restructures
33
+ an element and a test's selector breaks, the engine diagnoses the failure, patches the
34
+ broken selector/wait, **verifies the new selector against the live DOM**, then re-runs the
35
+ test until it passes (or a retry cap is hit) and writes the fix back — as a local **CLI** or
36
+ a **CI GitHub Action** that opens a patch PR.
37
+
38
+ > **Scope guardrail:** the engine only fixes **failing locators and wait conditions**. It
39
+ > never touches assertions or test logic, and every patch stays human-reviewable.
40
+
41
+ ### Two modes: **heal** and **review**
42
+
43
+ Auto-healing patches the _test_. That is fast, but on its own it can look like papering over
44
+ a real problem — the source that broke the selector. So the engine offers a second mode:
45
+
46
+ - **`heal`** (default) — patch the broken selector/wait and re-run until green. Best when the
47
+ UI change is intentional and the test simply needs to catch up.
48
+ - **`review`** — diagnose _why_ the selector broke and post **source-level suggestions** as
49
+ **inline PR comments** (e.g. "this `className` rename broke `#cta`; add a stable
50
+ `data-testid` or use `getByRole`"). It **never edits the test** — it advises the fix at the
51
+ source and pushes teams toward resilient, accessibility-first selectors.
52
+
53
+ Same diagnosis engine, two outputs: a patch, or a review. Pick per-project or per-PR.
54
+
55
+ ## How it works
56
+
57
+ Four layers drive a LangGraph repair loop:
58
+
59
+ 1. **CLI core** — the single entry point (`e2e-healer`); everything, including CI, calls it.
60
+ 2. **Data Preprocessor** — abstracts the raw Playwright log and the `git diff` into compact,
61
+ hallucination-resistant context (the failing selector + the DOM attribute that changed).
62
+ 3. **LangGraph agent** — `Diagnoser → Patch Generator → Selector Verifier → Test Runner`,
63
+ looping via a conditional Router until the test passes or `max_loops` is reached.
64
+ 4. **Selector Verifier** — checks each patched selector against the real page DOM so it
65
+ resolves to **exactly one** element (Node/Playwright helper). Hallucinated (0 matches) or
66
+ ambiguous (>1) selectors are reverted and re-patched _before_ a full test run.
67
+ 5. **Test Runner** — runs `npx playwright test` via subprocess to validate each attempt.
68
+
69
+ # Output Format
70
+
71
+ Provide the fully rewritten, production-ready Markdown documentation. Ensure the tone is professional, authoritative, and deeply aligned with modern frontend DX standards.
Binary file
@@ -0,0 +1,18 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 4
10
+
11
+ [*.py]
12
+ max_line_length = 100
13
+
14
+ [*.{yml,yaml,json,toml}]
15
+ indent_size = 2
16
+
17
+ [*.md]
18
+ trim_trailing_whitespace = false
@@ -0,0 +1,66 @@
1
+ # Copy to .env and fill in. All vars are prefixed E2E_HEALER_ (see app/config.py).
2
+
3
+ # LLM provider (provider-neutral). Select the backend, then configure it with the generic
4
+ # LLM_* vars below. Default provider is nvidia for backward compatibility.
5
+ E2E_HEALER_LLM_PROVIDER=nvidia
6
+ E2E_HEALER_LLM_API_KEY=
7
+ E2E_HEALER_LLM_BASE_URL=
8
+ E2E_HEALER_LLM_MODEL=
9
+ E2E_HEALER_LLM_MAX_TOKENS=4096
10
+
11
+ # --- OpenAI example ---------------------------------------------------------------
12
+ # Drop in an existing OpenAI key: set the provider and either E2E_HEALER_LLM_API_KEY or
13
+ # the standard OPENAI_API_KEY (used as a fallback). Uses native strict Structured Outputs.
14
+ # E2E_HEALER_LLM_PROVIDER=openai
15
+ # OPENAI_API_KEY=sk-... # or E2E_HEALER_LLM_API_KEY=sk-...
16
+ # E2E_HEALER_LLM_MODEL=gpt-4o-mini
17
+ # E2E_HEALER_LLM_BASE_URL= # set for Azure / OpenAI-compatible endpoints
18
+ # ------------------------------------------------------------------------------------
19
+
20
+ # --- Anthropic (Claude) example ------------------------------------------------------
21
+ # Requires the optional extra: pip install "ai-driven-e2e[anthropic]". Set the provider and
22
+ # either E2E_HEALER_LLM_API_KEY or the standard ANTHROPIC_API_KEY (fallback). Structured
23
+ # outputs map onto Claude tool-use.
24
+ # E2E_HEALER_LLM_PROVIDER=anthropic
25
+ # ANTHROPIC_API_KEY=sk-ant-... # or E2E_HEALER_LLM_API_KEY=sk-ant-...
26
+ # E2E_HEALER_LLM_MODEL=claude-sonnet-4-6
27
+ # ------------------------------------------------------------------------------------
28
+
29
+ # --- Ollama (local, offline) example -------------------------------------------------
30
+ # Requires the optional extra: pip install "ai-driven-e2e[ollama]". Fully local, no API key.
31
+ # Uses Ollama's native JSON-schema structured output. Pick a tool/structured-output-capable
32
+ # model (e.g. llama3.1, qwen2.5-coder, mistral-nemo). Default endpoint http://localhost:11434.
33
+ # E2E_HEALER_LLM_PROVIDER=ollama
34
+ # E2E_HEALER_LLM_MODEL=llama3.1
35
+ # E2E_HEALER_LLM_BASE_URL= # override only for a remote Ollama host
36
+ # ------------------------------------------------------------------------------------
37
+
38
+ # Legacy NVIDIA NIM vars (OpenAI-compatible Structured Outputs). Still supported: when
39
+ # LLM_PROVIDER=nvidia these are folded into the generic LLM_* vars above, so existing
40
+ # setups keep working unchanged. New configs should prefer the LLM_* vars.
41
+ E2E_HEALER_NVIDIA_API_KEY=nvapi-...
42
+ E2E_HEALER_NVIDIA_BASE_URL=https://integrate.api.nvidia.com/v1
43
+ E2E_HEALER_NVIDIA_MODEL=openai/gpt-oss-120b
44
+ E2E_HEALER_NVIDIA_MAX_TOKENS=4096
45
+
46
+ # Repair loop
47
+ E2E_HEALER_MAX_LOOPS=3
48
+
49
+ # Playwright invocation used by the Test Runner node
50
+ E2E_HEALER_PLAYWRIGHT_CMD=npx playwright test
51
+
52
+ # Selector Verifier — check patched selectors against the live DOM before re-running.
53
+ # Verification is skipped (loop proceeds unverified) when APP_URL is empty or unreachable.
54
+ E2E_HEALER_VERIFY_SELECTORS=true
55
+ E2E_HEALER_APP_URL=
56
+ E2E_HEALER_NODE_CMD=node
57
+
58
+ # Sandbox — relaxed blocks dangerous paths; strict also enforces workspace/write globs.
59
+ E2E_HEALER_SANDBOX_MODE=relaxed
60
+ E2E_HEALER_WORKSPACE_ROOT=.
61
+ E2E_HEALER_WRITE_GLOBS=*.spec.js,*.spec.jsx,*.spec.ts,*.spec.tsx,*.test.js,*.test.jsx,*.test.ts,*.test.tsx,**/*.spec.js,**/*.spec.jsx,**/*.spec.ts,**/*.spec.tsx,**/*.test.js,**/*.test.jsx,**/*.test.ts,**/*.test.tsx
62
+ E2E_HEALER_DENY_GLOBS=.env,.env.*,**/.env,**/.env.*,.git/**,.github/**,node_modules/**,.venv/**,uv.lock,package-lock.json,pnpm-lock.yaml,yarn.lock
63
+ E2E_HEALER_ALLOW_TEMP_HELPER=true
64
+
65
+ # Logging
66
+ E2E_HEALER_LOG_LEVEL=INFO
@@ -0,0 +1,20 @@
1
+ #!/usr/bin/env sh
2
+ # Lint and format staged Python files with ruff before committing, mirroring the
3
+ # `ruff check` + `ruff format --check` gate in CI (.github/workflows/ci.yml) so
4
+ # failures surface locally instead of breaking CI.
5
+ # Enable once with: git config core.hooksPath .githooks
6
+ set -e
7
+
8
+ # Bail out early if no Python files are staged. This check uses a plain
9
+ # (non-NUL) substitution only to test emptiness — command substitution strips
10
+ # NUL bytes, so it must never be used to carry the -z file list.
11
+ [ -z "$(git diff --cached --name-only --diff-filter=ACM -- '*.py')" ] && exit 0
12
+
13
+ # Lint first, auto-fixing what ruff can. Any remaining (unfixable) violation
14
+ # makes ruff exit non-zero, and `set -e` aborts the commit so it never reaches
15
+ # CI. Then format. Both pipe the NUL-separated staged list straight into
16
+ # xargs -0 (never through a shell variable) so paths with spaces/newlines stay
17
+ # intact and separators are preserved. Re-stage what ruff rewrote at the end.
18
+ git diff --cached --name-only --diff-filter=ACM -z -- '*.py' | xargs -0 uv run ruff check --fix --
19
+ git diff --cached --name-only --diff-filter=ACM -z -- '*.py' | xargs -0 uv run ruff format --
20
+ git diff --cached --name-only --diff-filter=ACM -z -- '*.py' | xargs -0 git add --
@@ -0,0 +1,58 @@
1
+ name: Architecture
2
+ description: Design or architecture related task
3
+ title: "[Core/Architecture] "
4
+ labels:
5
+ - architecture
6
+
7
+ body:
8
+ - type: textarea
9
+ id: summary
10
+ attributes:
11
+ label: Summary
12
+ description: Describe what this issue should accomplish.
13
+ validations:
14
+ required: true
15
+
16
+ - type: textarea
17
+ id: where
18
+ attributes:
19
+ label: Where to look
20
+ description: |
21
+ Specify which files/directories should be modified.
22
+
23
+ Modify:
24
+ Create:
25
+ Avoid touching:
26
+
27
+ - type: textarea
28
+ id: expected
29
+ attributes:
30
+ label: Expected behavior
31
+ validations:
32
+ required: true
33
+
34
+ - type: textarea
35
+ id: verify
36
+ attributes:
37
+ label: How to verify
38
+ validations:
39
+ required: true
40
+
41
+ - type: textarea
42
+ id: scope
43
+ attributes:
44
+ label: Scope
45
+ value: |
46
+ This issue is intentionally small.
47
+
48
+ A successful implementation should be completable by an AI coding agent (e.g. Claude Code) in approximately one hour.
49
+
50
+ - type: dropdown
51
+ id: difficulty
52
+ attributes:
53
+ label: Difficulty
54
+ options:
55
+ - Easy
56
+ - Easy-Medium
57
+ - Medium
58
+ - Hard
@@ -0,0 +1,91 @@
1
+ name: "🐛 Bug report"
2
+ description: Report a problem with the healer so we can fix it
3
+ title: "[bug] "
4
+ labels: ["bug"]
5
+ body:
6
+ - type: markdown
7
+ attributes:
8
+ value: |
9
+ Thanks for taking the time to file a bug! 🙏
10
+ A clear report helps us fix it fast. Please fill out the sections below.
11
+
12
+ > ⚠️ **Security issue?** Do **not** file it here — follow [SECURITY.md](../blob/main/SECURITY.md) to report privately.
13
+ - type: checkboxes
14
+ id: preflight
15
+ attributes:
16
+ label: Before you start
17
+ options:
18
+ - label: I searched [existing issues](https://github.com/Lee-Dongwook/E2E-Self-Heal/issues) and this isn't a duplicate.
19
+ required: true
20
+ - label: This is not a security vulnerability (those go through SECURITY.md).
21
+ required: true
22
+ - type: textarea
23
+ id: description
24
+ attributes:
25
+ label: What went wrong?
26
+ description: A clear description of the bug.
27
+ placeholder: The healer reverted a valid selector and gave up after 3 loops…
28
+ validations:
29
+ required: true
30
+ - type: textarea
31
+ id: command
32
+ attributes:
33
+ label: Command / config you ran
34
+ description: The exact CLI command or CI configuration.
35
+ placeholder: e2e-healer tests/login.spec.ts --log playwright.log --json
36
+ render: shell
37
+ validations:
38
+ required: true
39
+ - type: textarea
40
+ id: expected
41
+ attributes:
42
+ label: What did you expect to happen?
43
+ validations:
44
+ required: true
45
+ - type: textarea
46
+ id: logs
47
+ attributes:
48
+ label: RepairSummary / logs
49
+ description: Paste the `--json` summary and relevant console output. **Redact any secrets or tokens.**
50
+ render: shell
51
+ validations:
52
+ required: false
53
+ - type: input
54
+ id: version
55
+ attributes:
56
+ label: e2e-healer version
57
+ placeholder: "0.2.0"
58
+ validations:
59
+ required: true
60
+ - type: input
61
+ id: python
62
+ attributes:
63
+ label: Python version
64
+ placeholder: "3.13.1"
65
+ validations:
66
+ required: true
67
+ - type: input
68
+ id: playwright
69
+ attributes:
70
+ label: Playwright version
71
+ placeholder: "1.48.0"
72
+ validations:
73
+ required: false
74
+ - type: dropdown
75
+ id: os
76
+ attributes:
77
+ label: Operating system
78
+ options:
79
+ - macOS
80
+ - Linux
81
+ - Windows
82
+ - Other (note it in the description)
83
+ validations:
84
+ required: true
85
+ - type: textarea
86
+ id: extra
87
+ attributes:
88
+ label: Anything else?
89
+ description: Screenshots, a minimal repro repo, or other context.
90
+ validations:
91
+ required: false