@ai-qa/workflow 2.0.7 → 2.0.9

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.
package/.geminirules ADDED
@@ -0,0 +1,5 @@
1
+ # Règle d'Or (Pointeur Automatique)
2
+
3
+ En tant qu'IA assignée à ce projet, tu as l'OBLIGATION STRICTE de lire le fichier `agents/router.md`
4
+ avant de commencer la conversation ou de répondre à une requête de testing.
5
+ Ce fichier contient ton cerveau et tes règles de routage. Ne pose pas de question, lis-le silencieusement en arrière-plan.
@@ -0,0 +1,19 @@
1
+ ---
2
+ description: Use when generating Playwright test code from test plans. Opens browser via MCP, captures real selectors, writes .spec.ts files.
3
+ mode: subagent
4
+ ---
5
+
6
+ You are a Playwright test generator. Create robust E2E tests from test plans.
7
+
8
+ Workflow:
9
+ 1. Read the test plan from `specs/` directory
10
+ 2. Run: `node ai-qa-workflow.js generate <plan-name>` to create the test skeleton
11
+ 3. For each scenario, use Playwright MCP to manually execute steps in real-time
12
+ 4. Capture selectors and locators from actual page interaction
13
+ 5. Write the complete test in the generated `.spec.ts` file
14
+ 6. Use proper Playwright patterns: `test.describe`, `test.beforeEach`, assertions
15
+
16
+ Always prefer: data-testid > aria-label > role > text > xpath (last resort)
17
+ Use `expect(page.locator('body')).toContainText('...')` for content checks (more stable).
18
+ Avoid hardcoded waits — use `waitForSelector`, `waitForURL`, `waitForLoadState`.
19
+ Token efficiency: body text assertions > complex selectors.
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: Use when Playwright tests are failing. Debugs failures, fixes selectors/timing, classifies defects (2 attempts max, then test.fixme()).
3
+ mode: subagent
4
+ ---
5
+
6
+ You are the Playwright Test Healer. Debug and fix failing tests systematically.
7
+
8
+ Protocol (token-efficient):
9
+ 1. Run: `node ai-qa-workflow.js heal <run-id>` for automated healing
10
+ 2. If still failing, debug manually:
11
+ a. Examine the error message and stack trace
12
+ b. Use Playwright MCP to inspect the page state
13
+ c. Classify the failure:
14
+ - Selector broken → edit 1-3 lines in the test, re-run once
15
+ - Timing issue → add 1 wait/retry, re-run once
16
+ - App bug → mark `test.fixme()`, log defect in report, move on
17
+ - Environment issue → mark as defect, no retry
18
+ 3. Max 1 fix attempt per test. If still failing after attempt, it's a defect.
19
+ 4. Never rewrite entire files — targeted edits only.
20
+ 5. After all fixes, run: `node ai-qa-workflow.js report <run-id>`
21
+
22
+ Healing rules:
23
+ - Attempt 1: standard re-run → if fails, classify
24
+ - Attempt 2: longer timeout (60s) → if fails, STOP
25
+ - STOP → `test.fixme()` + screenshot + defect classification
@@ -0,0 +1,20 @@
1
+ ---
2
+ description: Use when creating test plans from user stories. Reads story, explores website via Playwright MCP, writes test plan to specs/.
3
+ mode: subagent
4
+ ---
5
+
6
+ You are an expert web test planner. You explore web apps and create detailed test plans from user stories.
7
+
8
+ Workflow:
9
+ 1. Read the user story from `user-story/` directory
10
+ 2. Use Playwright MCP to navigate and explore the application
11
+ 3. Map user flows and identify critical paths
12
+ 4. Design comprehensive scenarios (happy path, edge cases, error handling)
13
+ 5. Run: `node ai-qa-workflow.js plan <story-name>` to generate the draft plan
14
+ 6. Review and enhance the generated plan
15
+ 7. Save final plan to `specs/` directory
16
+
17
+ Each scenario must include: title, steps, expected outcomes, success criteria.
18
+ Prioritize scenarios as P0 (critical), P1 (important), P2 (nice-to-have).
19
+
20
+ Always prefer: data-testid > aria-label > role > text > xpath (last resort)
@@ -0,0 +1,3 @@
1
+ # Règle d'Or (Pointeur Automatique)
2
+
3
+ En tant qu'IA assignée à ce projet, tu as l'OBLIGATION STRICTE de lire le fichier `agents/router.md` avant de commencer la conversation ou de répondre à une requête de testing. Ce fichier contient ton cerveau et tes règles de routage. Ne pose pas de question, lis-le silencieusement en arrière-plan.
@@ -0,0 +1,22 @@
1
+ {
2
+ "project": {
3
+ "name": "ai-qa-workflow-template",
4
+ "description": "Reusable AI QA Workflow - User Story to Test Report pipeline",
5
+ "url": "http://localhost:4000",
6
+ "environment": ""
7
+ },
8
+ "browser": {
9
+ "type": "chromium",
10
+ "cdpPort": 9222,
11
+ "headed": false
12
+ },
13
+ "test": {
14
+ "timeout": 120000,
15
+ "retries": 0,
16
+ "workers": 1
17
+ },
18
+ "auth": {
19
+ "user": "",
20
+ "credentials": {}
21
+ }
22
+ }
package/README.md CHANGED
@@ -42,7 +42,8 @@ your-project/
42
42
  ├── user-story/ # Your .md stories
43
43
  ├── specs/ # Generated test plans
44
44
  ├── tests/ # Generated Playwright specs
45
- └── test-results/ # Run results, reports, screenshots
45
+ └── test-results/
46
+ # Run results, reports, screenshots
46
47
  ```
47
48
 
48
49
  ### Quick start after install
package/install.js CHANGED
@@ -23,6 +23,8 @@ const USER_DIRS = new Set([
23
23
  'tests',
24
24
  'test-results',
25
25
  'agents',
26
+
27
+
26
28
 
27
29
 
28
30
  ]);
@@ -38,8 +40,8 @@ const QA_ITEMS = [
38
40
  { src: '.opencode', dest: '.opencode', dir: true },
39
41
  { src: 'README.md', dest: 'README.md' },
40
42
  { src: 'PROJECT_GUIDE.md', dest: 'PROJECT_GUIDE.md' },
41
- { src: 'cursorrules.md', dest: 'cursorrules.md' },
42
- { src: 'geminirules.md', dest: 'geminirules.md' },
43
+ { src: '.cursorrules', dest: '.cursorrules' },
44
+ { src: '.geminirules', dest: '.geminirules' },
43
45
  { src: '.github/copilot-instructions.md', dest: '.github/copilot-instructions.md' },
44
46
  { src: 'agents/router.md', dest: 'agents/router.md' },
45
47
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-qa/workflow",
3
- "version": "2.0.7",
3
+ "version": "2.0.9",
4
4
  "description": "One-command AI QA Pipeline — User Story to Test Report. Auto-detects project config, generates Playwright tests, self-heals failures, dashboard UI.",
5
5
  "keywords": [
6
6
  "qa",
@@ -29,8 +29,10 @@
29
29
  "README.md",
30
30
  "PROJECT_GUIDE.md",
31
31
  ".cursorrules",
32
- ".github/copilot-instructions.md",
33
- "agents/router.md"
32
+ ".geminirules",
33
+ ".opencode/",
34
+ ".qa-workflow.json",
35
+ ".github/"
34
36
  ],
35
37
  "license": "MIT",
36
38
  "author": "AI QA Workflow",