qa-toolkit-ai 1.0.0

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/README.md ADDED
@@ -0,0 +1,146 @@
1
+ # QA Toolkit
2
+
3
+ AI-powered QA toolkit that runs automated quality analysis on your codebase and produces a browsable dashboard with findings, screenshots, and videos.
4
+
5
+ ```
6
+ ___ _ _____ _ _ _ _
7
+ / _ \ / \ |_ _|__ ___ | | | _(_) |_
8
+ | | | |/ _ \ | |/ _ \ / _ \| | |/ / | __|
9
+ | |_| / ___ \ | | (_) | (_) | | <| | |_
10
+ \__\_\_/ \_\ |_|\___/ \___/|_|_|\_\_|\__|
11
+ ```
12
+
13
+ ## What it does
14
+
15
+ - Runs **3 parallel QA agents** (Frontend, Backend, E2E) that analyze your codebase
16
+ - Produces a **Docsify dashboard** with all findings, organized and filterable
17
+ - Splits findings into **Functional** (for PM/client) and **Technical** (for devs)
18
+ - Generates fix lists, Jira-ready tickets, Confluence checklists
19
+ - Captures **screenshots** at desktop/tablet/mobile and **E2E videos**
20
+ - Creates a **shareable public link** via Cloudflare tunnel
21
+
22
+ ## Install
23
+
24
+ ### Option A: npm (recommended)
25
+
26
+ ```bash
27
+ npx qa-toolkit-ai init
28
+ ```
29
+
30
+ This copies the QA skills, rules, and Docsify template into your project's `.cursor/` directory.
31
+
32
+ ### Option B: Clone + install script
33
+
34
+ ```bash
35
+ git clone https://github.com/L-ubu/qa-toolkit.git /tmp/qa-toolkit
36
+ bash /tmp/qa-toolkit/install.sh /path/to/your/project
37
+ ```
38
+
39
+ ### Option C: GitHub template
40
+
41
+ Use this repo as a template and copy the contents into your project's `.cursor/`.
42
+
43
+ ## Usage
44
+
45
+ ### Run QA (in Cursor)
46
+
47
+ Open your project in Cursor and say:
48
+
49
+ ```
50
+ /qa
51
+ ```
52
+
53
+ Or be specific:
54
+
55
+ ```
56
+ /qa-frontend
57
+ /qa-backend
58
+ /qa-e2e
59
+ ```
60
+
61
+ The agent will:
62
+ 1. Analyze your codebase (Frontend, Backend, E2E flows)
63
+ 2. Generate reports with severity classification (P0–P3)
64
+ 3. Build a Docsify dashboard in `qa-output/`
65
+ 4. Serve it locally and create a shareable link
66
+
67
+ ### CLI Commands
68
+
69
+ ```bash
70
+ # Install QA skills into your project
71
+ npx qa-toolkit-ai init
72
+
73
+ # Scaffold a new qa-output/ from template
74
+ npx qa-toolkit-ai scaffold "My Project" "feature/branch"
75
+
76
+ # Serve the dashboard
77
+ npx qa-toolkit-ai serve # default port 3333
78
+ npx qa-toolkit-ai serve 4000 # custom port
79
+
80
+ # Share via public tunnel
81
+ npx qa-toolkit-ai share
82
+ ```
83
+
84
+ ## What you get
85
+
86
+ ### For the PM / Client
87
+
88
+ - **Functional Report** — plain-language descriptions of what users see and experience
89
+ - **Functional Checklist** — checkbox list sorted by feature area for budget decisions
90
+ - **Severity filter** — toggle P0/P1/P2/P3 visibility in the dashboard
91
+ - **PDF export** — one-click print to PDF
92
+
93
+ ### For Developers
94
+
95
+ - **Full Technical Report** — code paths, file references, fix suggestions
96
+ - **Frontend / Backend / E2E Reports** — detailed per-area analysis
97
+ - **Fix List** — grouped by component (Frontend → JS/React → Backend)
98
+ - **Jira Tickets** — pre-formatted, ready to create via MCP or copy-paste
99
+
100
+ ### Media Evidence
101
+
102
+ - **Screenshots** at desktop (1280px), tablet (768px), mobile (375px)
103
+ - **E2E videos** at all three viewports
104
+ - **Lightbox** for screenshot zoom, inline video playback
105
+
106
+ ## Project structure
107
+
108
+ ```
109
+ qa-toolkit/
110
+ ├── bin/cli.js # CLI tool (init, serve, share, scaffold)
111
+ ├── skills/
112
+ │ ├── qa-run/SKILL.md # Orchestrator — runs all agents
113
+ │ ├── qa-frontend/SKILL.md # Frontend/UI analysis
114
+ │ ├── qa-backend/SKILL.md # Backend/API analysis
115
+ │ ├── qa-e2e/SKILL.md # E2E flow analysis
116
+ │ └── qa-merge-report/SKILL.md # Merges findings, builds dashboard
117
+ ├── rules/
118
+ │ └── qa-report-format.mdc # Report format rules for Cursor
119
+ ├── docsify-template/ # Reusable Docsify dashboard template
120
+ │ ├── index.html # Themed dashboard with filter + PDF
121
+ │ ├── setup-docsify.sh # Scaffold script
122
+ │ ├── README.md # Dashboard template
123
+ │ ├── _sidebar.md # Navigation template
124
+ │ ├── media.md # Screenshots/videos template
125
+ │ ├── qa-functional-report.md # Functional report template
126
+ │ └── qa-functional-checklist.md # Functional checklist template
127
+ ├── install.sh # Standalone install script (no npm needed)
128
+ ├── package.json
129
+ └── README.md
130
+ ```
131
+
132
+ ## Customisation
133
+
134
+ ### Project-specific QA structure
135
+
136
+ Add a `.cursor/qa-reference/` directory with a markdown file describing your project's feature areas, test scenarios, and Confluence structure. The QA agents will use it to organise findings.
137
+
138
+ Example: `.cursor/qa-reference/my-project-structure.md`
139
+
140
+ ### Docsify theme
141
+
142
+ Edit `.cursor/qa-docsify-template/index.html` to change colors, fonts, or add features. The template uses CSS custom properties for easy theming.
143
+
144
+ ## License
145
+
146
+ MIT
package/bin/cli.js ADDED
@@ -0,0 +1,154 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { execSync, spawn } = require('child_process');
4
+ const fs = require('fs');
5
+ const path = require('path');
6
+
7
+ const args = process.argv.slice(2);
8
+ const command = args[0];
9
+
10
+ const PKG_ROOT = path.resolve(__dirname, '..');
11
+ const CWD = process.cwd();
12
+
13
+ const SKILLS = ['qa-run', 'qa-frontend', 'qa-backend', 'qa-e2e', 'qa-merge-report'];
14
+
15
+ function copyDir(src, dest) {
16
+ fs.mkdirSync(dest, { recursive: true });
17
+ for (const entry of fs.readdirSync(src, { withFileTypes: true })) {
18
+ const srcPath = path.join(src, entry.name);
19
+ const destPath = path.join(dest, entry.name);
20
+ if (entry.isDirectory()) {
21
+ copyDir(srcPath, destPath);
22
+ } else {
23
+ fs.copyFileSync(srcPath, destPath);
24
+ }
25
+ }
26
+ }
27
+
28
+ function init() {
29
+ const cursorDir = path.join(CWD, '.cursor');
30
+ fs.mkdirSync(cursorDir, { recursive: true });
31
+
32
+ console.log('\n QA Toolkit — Installing into .cursor/\n');
33
+
34
+ // Copy skills
35
+ for (const skill of SKILLS) {
36
+ const src = path.join(PKG_ROOT, 'skills', skill);
37
+ const dest = path.join(cursorDir, 'skills', skill);
38
+ fs.mkdirSync(dest, { recursive: true });
39
+ fs.copyFileSync(path.join(src, 'SKILL.md'), path.join(dest, 'SKILL.md'));
40
+ console.log(` + .cursor/skills/${skill}/SKILL.md`);
41
+ }
42
+
43
+ // Copy rules
44
+ const rulesDir = path.join(cursorDir, 'rules');
45
+ fs.mkdirSync(rulesDir, { recursive: true });
46
+ fs.copyFileSync(
47
+ path.join(PKG_ROOT, 'rules', 'qa-report-format.mdc'),
48
+ path.join(rulesDir, 'qa-report-format.mdc')
49
+ );
50
+ console.log(' + .cursor/rules/qa-report-format.mdc');
51
+
52
+ // Copy docsify template
53
+ const templateSrc = path.join(PKG_ROOT, 'docsify-template');
54
+ const templateDest = path.join(cursorDir, 'qa-docsify-template');
55
+ copyDir(templateSrc, templateDest);
56
+ // Make setup script executable
57
+ const setupScript = path.join(templateDest, 'setup-docsify.sh');
58
+ if (fs.existsSync(setupScript)) {
59
+ fs.chmodSync(setupScript, '755');
60
+ }
61
+ console.log(' + .cursor/qa-docsify-template/');
62
+
63
+ console.log('\n Done! Your project now has QA skills and templates.');
64
+ console.log(' Run /qa in Cursor to start a QA analysis.\n');
65
+ }
66
+
67
+ function serve(port) {
68
+ const outputDir = path.join(CWD, 'qa-output');
69
+ if (!fs.existsSync(outputDir)) {
70
+ console.error('\n No qa-output/ directory found. Run a QA analysis first.\n');
71
+ process.exit(1);
72
+ }
73
+
74
+ console.log(`\n Serving QA dashboard at http://localhost:${port}\n`);
75
+ const child = spawn('npx', ['docsify-cli', 'serve', outputDir, '--port', String(port)], {
76
+ stdio: 'inherit',
77
+ shell: true
78
+ });
79
+ child.on('error', () => {
80
+ console.error(' Failed to start docsify. Install it: npm i -g docsify-cli');
81
+ });
82
+ }
83
+
84
+ function share(port) {
85
+ console.log(`\n Creating public tunnel to localhost:${port}...\n`);
86
+ const child = spawn('npx', ['cloudflared', 'tunnel', '--url', `http://localhost:${port}`], {
87
+ stdio: 'inherit',
88
+ shell: true
89
+ });
90
+ child.on('error', () => {
91
+ console.error(' Failed to start cloudflared tunnel.');
92
+ });
93
+ }
94
+
95
+ function scaffold(projectName, branch) {
96
+ const slug = (projectName || 'project').toLowerCase().replace(/[^a-z0-9]+/g, '-');
97
+ const date = new Date().toISOString().split('T')[0];
98
+ const templateScript = path.join(CWD, '.cursor', 'qa-docsify-template', 'setup-docsify.sh');
99
+
100
+ if (!fs.existsSync(templateScript)) {
101
+ console.error('\n No .cursor/qa-docsify-template/ found. Run `qa-toolkit init` first.\n');
102
+ process.exit(1);
103
+ }
104
+
105
+ execSync(`bash "${templateScript}" qa-output "${projectName || 'Project'}" "${slug}" "${branch || 'main'}" "${date}" "Unknown"`, {
106
+ stdio: 'inherit',
107
+ cwd: CWD
108
+ });
109
+ }
110
+
111
+ function help() {
112
+ console.log(`
113
+ qa-toolkit — AI-powered QA toolkit
114
+
115
+ Commands:
116
+ init Install QA skills, rules, and templates into .cursor/
117
+ scaffold [name] [branch] Create qa-output/ directory from template
118
+ serve [port] Serve the Docsify QA dashboard (default: 3333)
119
+ share [port] Create a public Cloudflare tunnel (default: 3333)
120
+ help Show this help
121
+
122
+ Examples:
123
+ npx qa-toolkit-ai init
124
+ npx qa-toolkit-ai scaffold "My Project" "feature/branch"
125
+ npx qa-toolkit-ai serve
126
+ npx qa-toolkit-ai serve 4000
127
+ npx qa-toolkit-ai share
128
+ `);
129
+ }
130
+
131
+ switch (command) {
132
+ case 'init':
133
+ init();
134
+ break;
135
+ case 'scaffold':
136
+ scaffold(args[1], args[2]);
137
+ break;
138
+ case 'serve':
139
+ serve(args[1] || 3333);
140
+ break;
141
+ case 'share':
142
+ share(args[1] || 3333);
143
+ break;
144
+ case 'help':
145
+ case '--help':
146
+ case '-h':
147
+ case undefined:
148
+ help();
149
+ break;
150
+ default:
151
+ console.error(` Unknown command: ${command}`);
152
+ help();
153
+ process.exit(1);
154
+ }
@@ -0,0 +1,108 @@
1
+ # QA Dashboard — {{PROJECT_NAME}}
2
+
3
+ > **Branch:** `{{BRANCH}}` · **Date:** {{DATE}} · **Stack:** {{STACK}}
4
+
5
+ ---
6
+
7
+ ## At a Glance
8
+
9
+ <div class="stats-grid">
10
+ <div class="stat-card">
11
+ <div class="number">{{TOTAL}}</div>
12
+ <div class="label">Total Findings</div>
13
+ </div>
14
+ <div class="stat-card critical">
15
+ <div class="number">{{P0_COUNT}}</div>
16
+ <div class="label">P0 Critical</div>
17
+ </div>
18
+ <div class="stat-card high">
19
+ <div class="number">{{P1_COUNT}}</div>
20
+ <div class="label">P1 High</div>
21
+ </div>
22
+ <div class="stat-card medium">
23
+ <div class="number">{{P2_COUNT}}</div>
24
+ <div class="label">P2 Medium</div>
25
+ </div>
26
+ <div class="stat-card low">
27
+ <div class="number">{{P3_COUNT}}</div>
28
+ <div class="label">P3 Low</div>
29
+ </div>
30
+ </div>
31
+
32
+ ---
33
+
34
+ ## Two Views — Pick Your Lane
35
+
36
+ This QA run produces **two separate views** of the same findings:
37
+
38
+ | View | For whom | What it covers |
39
+ |------|----------|----------------|
40
+ | [**Functional Report**](qa-functional-report.md) | PM, client, non-technical stakeholders | What a user **sees and experiences** — broken buttons, wrong text, missing features, visual bugs, confusing flows. Written in plain language. |
41
+ | [**Technical Report**](qa-report-{{PROJECT_SLUG}}-{{DATE}}.md) | Developers | Code-level root causes, file paths, API contracts, security issues, architecture problems. |
42
+
43
+ > **PM tip:** Start with the [Functional Checklist](qa-functional-checklist.md) — it's sorted by feature area so you can quickly decide what matters most for the client, even with limited budget.
44
+
45
+ ---
46
+
47
+ ## Breakdown by Area
48
+
49
+ | Area | Findings | P0 | P1 | P2 | P3 |
50
+ |------|----------|----|----|----|----|
51
+ | **Frontend** (design/styling) | {{FE_TOTAL}} | {{FE_P0}} | {{FE_P1}} | {{FE_P2}} | {{FE_P3}} |
52
+ | **JS/React** (logic/state) | {{JS_TOTAL}} | {{JS_P0}} | {{JS_P1}} | {{JS_P2}} | {{JS_P3}} |
53
+ | **Backend** (API/server) | {{BE_TOTAL}} | {{BE_P0}} | {{BE_P1}} | {{BE_P2}} | {{BE_P3}} |
54
+
55
+ ---
56
+
57
+ ## Functional vs Technical Split
58
+
59
+ | Category | Count | Description |
60
+ |----------|-------|-------------|
61
+ | **Functional** | {{FUNCTIONAL_COUNT}} | User-visible: broken interactions, wrong text, visual bugs, missing features |
62
+ | **Technical** | {{TECHNICAL_COUNT}} | Code-level: security, architecture, performance, developer-facing issues |
63
+
64
+ ---
65
+
66
+ ## All Reports
67
+
68
+ | Report | Audience | Description |
69
+ |--------|----------|-------------|
70
+ | [Functional Report](qa-functional-report.md) | PM / Client | Plain-language findings about what users see and experience |
71
+ | [Functional Checklist](qa-functional-checklist.md) | PM | Checkbox list sorted by feature — tick off what to fix given budget |
72
+ | [Full QA Report](qa-report-{{PROJECT_SLUG}}-{{DATE}}.md) | Devs | Complete technical findings with code paths and suggestions |
73
+ | [Frontend Report](qa-frontend-report.md) | Frontend devs | React components, styling, accessibility |
74
+ | [Backend Report](qa-backend-report.md) | Backend devs | API, security, Drupal/Symfony |
75
+ | [E2E Flow Report](e2e-flow-report.md) | QA / Devs | End-to-end user journey analysis |
76
+ | [Fix List](qa-fix-list-{{PROJECT_SLUG}}-{{DATE}}.md) | Devs / PM | Prioritized fix table grouped by component |
77
+ | [Jira Tickets](qa-jira-tickets-{{PROJECT_SLUG}}-{{DATE}}.md) | PM | Pre-formatted ticket content |
78
+ | [Confluence Checklist](qa-confluence-checklist-{{PROJECT_SLUG}}-{{DATE}}.md) | Team | Full checklist for Confluence |
79
+
80
+ ---
81
+
82
+ ## Media Evidence
83
+
84
+ | Type | Status |
85
+ |------|--------|
86
+ | [Screenshots](media.md#screenshots) | {{SCREENSHOTS_STATUS}} |
87
+ | [E2E Desktop Video](media.md#e2e-desktop) | {{E2E_DESKTOP_STATUS}} |
88
+ | [Mobile Viewport Video](media.md#mobile) | {{MOBILE_STATUS}} |
89
+ | [Tablet Viewport Video](media.md#tablet) | {{TABLET_STATUS}} |
90
+
91
+ ---
92
+
93
+ ## Top Priority Fixes (P0)
94
+
95
+ {{P0_TABLE}}
96
+
97
+ ---
98
+
99
+ ## How This Was Generated
100
+
101
+ This QA dashboard was generated by **AI-powered cloud agents** running automated analysis:
102
+
103
+ 1. **Frontend Agent** — React components, CSS, accessibility, responsive screenshots at 3 viewports
104
+ 2. **Backend Agent** — API controllers, security, DTOs, event listeners
105
+ 3. **E2E Agent** — User flows with browser automation, video recordings at desktop/mobile/tablet
106
+ 4. **Merge Agent** — Deduplicated, classified functional vs technical, assembled Docsify dashboard
107
+
108
+ *Generated: {{DATE}} · Branch: {{BRANCH}}*
@@ -0,0 +1,9 @@
1
+ # {{PROJECT_NAME}} — QA Reports
2
+
3
+ > Automated quality assurance reports powered by AI agents
4
+
5
+ - Full-stack analysis: Frontend · Backend · E2E flows
6
+ - Severity classification: P0 through P3
7
+ - Screenshots, videos, and actionable fix lists
8
+
9
+ [View Dashboard](#/)
@@ -0,0 +1,20 @@
1
+ - **Overview**
2
+ - [Dashboard](/)
3
+
4
+ - **Functional (PM / Client)**
5
+ - [Functional Report](qa-functional-report.md)
6
+ - [Functional Checklist](qa-functional-checklist.md)
7
+
8
+ - **Technical (Devs)**
9
+ - [Full QA Report](qa-report-{{PROJECT_SLUG}}-{{DATE}}.md)
10
+ - [Frontend Report](qa-frontend-report.md)
11
+ - [Backend Report](qa-backend-report.md)
12
+ - [E2E Flow Report](e2e-flow-report.md)
13
+
14
+ - **Action Items**
15
+ - [Fix List](qa-fix-list-{{PROJECT_SLUG}}-{{DATE}}.md)
16
+ - [Jira Tickets](qa-jira-tickets-{{PROJECT_SLUG}}-{{DATE}}.md)
17
+ - [Confluence Checklist](qa-confluence-checklist-{{PROJECT_SLUG}}-{{DATE}}.md)
18
+
19
+ - **Media**
20
+ - [Screenshots & Videos](media.md)