Skip to content

Commit 21ca63c

Browse files
updating the skills
Signed-off-by: its-mitesh-kumar <itsmiteshkumar98@gmail.com>
1 parent 273e47a commit 21ca63c

2 files changed

Lines changed: 32 additions & 6 deletions

File tree

skills/bug-fix/SKILL.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,21 @@ Do not hardcode workspace internals. Discover each workspace's e2e infrastructur
2323
Every bug fix PR must include before/after visual evidence. Playwright video recording captures the bug in action (before) and the fix working (after). These are converted to GIFs and embedded in the PR description.
2424
</principle>
2525

26+
<principle name="step_echo_banners">
27+
Before executing each numbered Step, echo a clearly visible banner to the terminal so the user can track progress:
28+
```
29+
echo "================ Step N — <Step title> ==========="
30+
```
31+
</principle>
32+
33+
<principle name="preflight_port_cleanup">
34+
Before running any Playwright test, check whether the dev-server port (from `playwright.config.ts`) is already in use. If it is, kill the process occupying it:
35+
```
36+
lsof -ti:<PORT> | xargs kill -9 2>/dev/null || true
37+
```
38+
A stale dev server from a prior session will cause the test to connect to the wrong app and time out.
39+
</principle>
40+
2641
</essential_principles>
2742

2843
## Prerequisites
@@ -88,11 +103,15 @@ Read `references/e2e-patterns.md` for test patterns and `references/video-record
88103
```
89104
- Encode the "steps to reproduce" from the Jira description as Playwright actions.
90105
- Assert the **expected** behavior (the assertion should fail when the bug is present).
91-
3. Run the test against the `en` locale in legacy mode:
106+
3. **Pre-flight: kill stale dev server**before running the test, ensure the dev-server port (read from `playwright.config.ts` `webServer.url`) is free:
107+
```
108+
lsof -ti:<PORT> | xargs kill -9 2>/dev/null || true
109+
```
110+
4. Run the test against the `en` locale in legacy mode:
92111
```
93112
APP_MODE=legacy npx playwright test e2e-tests/_repro-<KEY>.test.ts --project=en
94113
```
95-
4. The test should **fail** — confirming the bug is reproduced.
114+
5. The test should **fail** — confirming the bug is reproduced.
96115
97116
**If the test passes** (bug not reproduced): re-read the Jira description, adjust the test, and retry. If still not reproducible after 2 attempts, report findings and ask the user for guidance.
98117
@@ -194,7 +213,7 @@ Invoke `raise-pr --a` with the following caller context:
194213
| `jira_url` | `https://redhat.atlassian.net/browse/<jira_key>` |
195214
| `jira_summary` | Issue summary from Step 1 |
196215
| `recordings` | `{ before: "e2e-tests/_repro-artifacts/before-fix.gif", after: "e2e-tests/_repro-artifacts/after-fix.gif" }` |
197-
| `pr_description_extra` | `**Root cause:** <diagnosis from Step 5>` |
216+
| `pr_description_extra` | `### Root cause\n<diagnosis from Step 5>` |
198217
199218
`raise-pr` handles: repo detection, build, changeset, commit (with `Fixes:` trailer), push, PR creation (with `## UI before/after changes`), and post-PR Jira updates (Web Link, comment, transition to Review).
200219

skills/raise-pr/SKILL.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ description: >
1414
<essential_principles>
1515

1616
<principle name="scoped_dist_cleanup">
17-
Pre-build cleanup uses `rm -rf plugins/*/dist packages/*/dist` scoped to the workspace directory. If permission errors occur, escalate to `sudo`. Never use `find -name dist` or any broad recursive search — that deletes `dist/` inside `node_modules` and breaks everything.
17+
Pre-build cleanup uses `rm -rf plugins/*/dist packages/*/dist` scoped to the workspace directory. If permission errors occur (root-owned files from a prior Docker build), use a disposable Docker container to remove them — never use `sudo`. Never use `find -name dist` or any broad recursive search — that deletes `dist/` inside `node_modules` and breaks everything.
1818
</principle>
1919

2020
<principle name="changesets_skip_packages">
@@ -25,6 +25,13 @@ Only plugins under `plugins/*` with published-source changes need changesets. Al
2525
Capture `git status --porcelain` before builds as the baseline. After builds, only stage files that are new relative to that baseline. Pre-existing dirty files (local config overrides, dev fixtures) must never be staged.
2626
</principle>
2727

28+
<principle name="step_echo_banners">
29+
Before executing each numbered Step, echo a clearly visible banner to the terminal so the user can track progress:
30+
```
31+
echo "================ Step N — <Step title> ==========="
32+
```
33+
</principle>
34+
2835
</essential_principles>
2936

3037
## Mode: check for `--a` flag
@@ -113,10 +120,10 @@ Remove stale `dist/` directories that may contain root-owned files from previous
113120
rm -rf plugins/*/dist packages/*/dist
114121
```
115122

116-
If this fails with a permission error (`EACCES`), escalate to:
123+
If this fails with a permission error (`EACCES`), use a disposable Docker container to remove them (avoids needing `sudo` on the host):
117124

118125
```
119-
sudo rm -rf plugins/*/dist packages/*/dist
126+
docker run --rm -v "$(pwd)":/workspace alpine sh -c "rm -rf /workspace/plugins/*/dist /workspace/packages/*/dist"
120127
```
121128

122129
### 5.1–5.6 — Build pipeline

0 commit comments

Comments
 (0)