digiqagent 1.2.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/.cursor-plugin/plugin.json +29 -0
- package/README.md +197 -0
- package/agents/code-reviewer.md +48 -0
- package/bin/cli.js +210 -0
- package/package.json +41 -0
- package/skills/playwright-test-generator/SKILL.md +563 -0
- package/skills/playwright-test-generator/interaction-test-patterns.md +987 -0
- package/skills/playwright-test-generator/page-object-patterns.md +833 -0
- package/skills/postman-collection-generator/SKILL.md +310 -0
- package/skills/postman-collection-generator/collection-patterns.md +493 -0
- package/skills/postman-test-suite-generator/SKILL.md +653 -0
- package/skills/postman-test-suite-generator/test-scenario-patterns.md +612 -0
- package/skills/receiving-code-review/SKILL.md +213 -0
- package/skills/requesting-code-review/SKILL.md +105 -0
- package/skills/requesting-code-review/code-reviewer.md +146 -0
- package/skills/review-prompts/code-quality-reviewer-prompt.md +26 -0
- package/skills/review-prompts/spec-reviewer-prompt.md +61 -0
- package/skills/swagger-generator/SKILL.md +238 -0
- package/skills/swagger-generator/openapi-patterns.md +667 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/SKILL.md +296 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +63 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/test-driven-development/SKILL.md +371 -0
- package/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/verification-before-completion/SKILL.md +139 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "digiqagent",
|
|
3
|
+
"displayName": "DigiQAgent",
|
|
4
|
+
"description": "QA and testing skills: TDD, systematic debugging, code review, verification, API spec generation, Postman test suites, and Playwright UI testing",
|
|
5
|
+
"version": "1.2.0",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Pradeep SA"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"keywords": [
|
|
11
|
+
"qa",
|
|
12
|
+
"testing",
|
|
13
|
+
"tdd",
|
|
14
|
+
"debugging",
|
|
15
|
+
"code-review",
|
|
16
|
+
"verification",
|
|
17
|
+
"swagger",
|
|
18
|
+
"openapi",
|
|
19
|
+
"postman",
|
|
20
|
+
"api-testing",
|
|
21
|
+
"playwright",
|
|
22
|
+
"e2e-testing",
|
|
23
|
+
"angular",
|
|
24
|
+
"react",
|
|
25
|
+
"ui-testing"
|
|
26
|
+
],
|
|
27
|
+
"skills": "./skills/",
|
|
28
|
+
"agents": "./agents/"
|
|
29
|
+
}
|
package/README.md
ADDED
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# DigiQAgent
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/digiqagent)
|
|
4
|
+
|
|
5
|
+
A Cursor plugin focused on QA, testing, debugging, code review, verification workflows, API artifact generation, and Playwright UI testing.
|
|
6
|
+
|
|
7
|
+
## What's Included
|
|
8
|
+
|
|
9
|
+
### Skills (9)
|
|
10
|
+
|
|
11
|
+
| Skill | Triggers When | What It Does |
|
|
12
|
+
|-------|---------------|--------------|
|
|
13
|
+
| **test-driven-development** | Implementing any feature or bugfix | Enforces Red-Green-Refactor: write failing test first, minimal code to pass, then refactor |
|
|
14
|
+
| **systematic-debugging** | Encountering any bug, test failure, or unexpected behavior | 4-phase process: root cause investigation, pattern analysis, hypothesis testing, implementation |
|
|
15
|
+
| **verification-before-completion** | About to claim work is complete or passing | Requires running verification commands and confirming output before making success claims |
|
|
16
|
+
| **requesting-code-review** | Completing tasks or before merging | Dispatches code-reviewer agent with structured checklist and git diff range |
|
|
17
|
+
| **receiving-code-review** | Receiving code review feedback | Ensures technical evaluation over performative agreement; verify before implementing |
|
|
18
|
+
| **swagger-generator** | Generating or updating API documentation | Produces a complete OpenAPI 3.0 spec from codebase analysis or API design documents |
|
|
19
|
+
| **postman-collection-generator** | Creating Postman collections for manual API testing | Generates organized Postman Collection v2.1 with environment files, variables, and pre-request scripts |
|
|
20
|
+
| **postman-test-suite-generator** | Creating API test coverage with positive and negative scenarios | Produces Postman test collection with systematic positive and negative test cases for every endpoint |
|
|
21
|
+
| **playwright-test-generator** | Generating E2E tests for Angular or React frontends | Auto-detects framework, scans components for interactions, generates Playwright tests with Page Object Model covering forms, clicks, navigation, modals, accessibility, and responsive behavior |
|
|
22
|
+
|
|
23
|
+
### Agent (1)
|
|
24
|
+
|
|
25
|
+
| Agent | Purpose |
|
|
26
|
+
|-------|---------|
|
|
27
|
+
| **code-reviewer** | Senior code reviewer that checks plan alignment, code quality, architecture, testing, and production readiness |
|
|
28
|
+
|
|
29
|
+
### Review Prompt Templates (2)
|
|
30
|
+
|
|
31
|
+
| Template | Purpose |
|
|
32
|
+
|----------|---------|
|
|
33
|
+
| **spec-reviewer-prompt** | Verify implementation matches specification (nothing more, nothing less) |
|
|
34
|
+
| **code-quality-reviewer-prompt** | Verify implementation is well-built (clean, tested, maintainable) |
|
|
35
|
+
|
|
36
|
+
## API Artifact Generation
|
|
37
|
+
|
|
38
|
+
The three new API skills form a pipeline that takes your codebase or API design document and produces ready-to-use testing artifacts:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
Codebase / Spec Document
|
|
42
|
+
│
|
|
43
|
+
▼
|
|
44
|
+
┌──────────────────────┐
|
|
45
|
+
│ swagger-generator │ → openapi.yaml
|
|
46
|
+
└──────────┬───────────┘
|
|
47
|
+
│
|
|
48
|
+
▼
|
|
49
|
+
┌──────────────────────────────┐
|
|
50
|
+
│ postman-collection-generator │ → postman_collection.json
|
|
51
|
+
└──────────┬───────────────────┘ postman_environment.json
|
|
52
|
+
│
|
|
53
|
+
▼
|
|
54
|
+
┌───────────────────────────────┐
|
|
55
|
+
│ postman-test-suite-generator │ → postman_test_collection.json
|
|
56
|
+
└───────────────────────────────┘
|
|
57
|
+
|
|
58
|
+
Developer imports into Postman and runs manually.
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Workflow:**
|
|
62
|
+
|
|
63
|
+
1. **Generate the OpenAPI spec** — analyzes routes, controllers, models, middleware, or reads a design document to produce a complete `openapi.yaml`
|
|
64
|
+
2. **Generate the Postman collection** — builds organized requests with folders, environment variables, realistic example data, and pre-request scripts
|
|
65
|
+
3. **Generate the test suite** — adds comprehensive positive and negative test scenarios covering missing fields, invalid types, boundary values, auth failures, not-found cases, duplicates, and more
|
|
66
|
+
|
|
67
|
+
Each skill can also run independently. The Postman collection generator can work directly from codebase analysis, and the test suite generator can work from an OpenAPI spec.
|
|
68
|
+
|
|
69
|
+
## UI Test Generation
|
|
70
|
+
|
|
71
|
+
The Playwright skill handles frontend UI test generation for Angular and React applications:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
Angular / React Codebase
|
|
75
|
+
│
|
|
76
|
+
▼
|
|
77
|
+
┌───────────────────────────────┐
|
|
78
|
+
│ Detect Framework & Scan │
|
|
79
|
+
│ Components, Routes, Forms, │
|
|
80
|
+
│ Click Events, Modals, Tables │
|
|
81
|
+
└──────────┬────────────────────┘
|
|
82
|
+
│
|
|
83
|
+
┌─────┴──────┐
|
|
84
|
+
▼ ▼
|
|
85
|
+
┌──────────┐ ┌───────────┐
|
|
86
|
+
│ Page │ │ Playwright │
|
|
87
|
+
│ Objects │ │ Tests │
|
|
88
|
+
│ (POM) │ │ (.spec.ts) │
|
|
89
|
+
└────┬─────┘ └─────┬─────┘
|
|
90
|
+
│ │
|
|
91
|
+
└──────┬──────┘
|
|
92
|
+
▼
|
|
93
|
+
Developer runs:
|
|
94
|
+
npx playwright test
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**What it covers:**
|
|
98
|
+
|
|
99
|
+
- **Auto-detection** — identifies Angular vs React, component libraries (Material, MUI, Ant Design), and routing configuration
|
|
100
|
+
- **Component scanning** — discovers click handlers, form bindings, modals, dropdowns, tables, navigation links, conditional rendering
|
|
101
|
+
- **Positive tests** — page load, valid form submission, navigation, modal interactions, table sorting and pagination
|
|
102
|
+
- **Negative tests** — empty required fields, invalid formats, boundary values, unauthorized access, empty/error states, double-submit prevention
|
|
103
|
+
- **Responsive tests** — mobile hamburger menu, sidebar collapse, stacked layouts
|
|
104
|
+
- **Accessibility tests** — keyboard navigation, ARIA labels, focus management, axe-core audits
|
|
105
|
+
|
|
106
|
+
## Installation
|
|
107
|
+
|
|
108
|
+
### Via npm (recommended)
|
|
109
|
+
|
|
110
|
+
```bash
|
|
111
|
+
npx digiqagent install
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Via script
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
# One-liner (after hosting the repo)
|
|
118
|
+
curl -sSL https://raw.githubusercontent.com/<your-org>/digiqagent/main/install.sh | bash
|
|
119
|
+
|
|
120
|
+
# Or clone and run the script
|
|
121
|
+
git clone <repo-url> && cd digiqagent && ./install.sh
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
See [INSTALLATION.md](INSTALLATION.md) for the full guide — npm CLI commands, manual install, environment variables, update/uninstall commands, team distribution options, and troubleshooting.
|
|
125
|
+
|
|
126
|
+
## Usage
|
|
127
|
+
|
|
128
|
+
Skills activate automatically based on context. You can also invoke them explicitly:
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
Use digiqagent:test-driven-development
|
|
132
|
+
Use digiqagent:systematic-debugging
|
|
133
|
+
Use digiqagent:verification-before-completion
|
|
134
|
+
Use digiqagent:requesting-code-review
|
|
135
|
+
Use digiqagent:receiving-code-review
|
|
136
|
+
Use digiqagent:swagger-generator
|
|
137
|
+
Use digiqagent:postman-collection-generator
|
|
138
|
+
Use digiqagent:postman-test-suite-generator
|
|
139
|
+
Use digiqagent:playwright-test-generator
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Directory Structure
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
digiqagent/
|
|
146
|
+
package.json
|
|
147
|
+
bin/
|
|
148
|
+
cli.js
|
|
149
|
+
.cursor-plugin/
|
|
150
|
+
plugin.json
|
|
151
|
+
skills/
|
|
152
|
+
test-driven-development/
|
|
153
|
+
SKILL.md
|
|
154
|
+
testing-anti-patterns.md
|
|
155
|
+
systematic-debugging/
|
|
156
|
+
SKILL.md
|
|
157
|
+
root-cause-tracing.md
|
|
158
|
+
defense-in-depth.md
|
|
159
|
+
condition-based-waiting.md
|
|
160
|
+
condition-based-waiting-example.ts
|
|
161
|
+
find-polluter.sh
|
|
162
|
+
CREATION-LOG.md
|
|
163
|
+
test-academic.md
|
|
164
|
+
test-pressure-1.md
|
|
165
|
+
test-pressure-2.md
|
|
166
|
+
test-pressure-3.md
|
|
167
|
+
verification-before-completion/
|
|
168
|
+
SKILL.md
|
|
169
|
+
requesting-code-review/
|
|
170
|
+
SKILL.md
|
|
171
|
+
code-reviewer.md
|
|
172
|
+
receiving-code-review/
|
|
173
|
+
SKILL.md
|
|
174
|
+
review-prompts/
|
|
175
|
+
spec-reviewer-prompt.md
|
|
176
|
+
code-quality-reviewer-prompt.md
|
|
177
|
+
swagger-generator/
|
|
178
|
+
SKILL.md
|
|
179
|
+
openapi-patterns.md
|
|
180
|
+
postman-collection-generator/
|
|
181
|
+
SKILL.md
|
|
182
|
+
collection-patterns.md
|
|
183
|
+
postman-test-suite-generator/
|
|
184
|
+
SKILL.md
|
|
185
|
+
test-scenario-patterns.md
|
|
186
|
+
playwright-test-generator/
|
|
187
|
+
SKILL.md
|
|
188
|
+
page-object-patterns.md
|
|
189
|
+
interaction-test-patterns.md
|
|
190
|
+
agents/
|
|
191
|
+
code-reviewer.md
|
|
192
|
+
README.md
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
## License
|
|
196
|
+
|
|
197
|
+
MIT
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-reviewer
|
|
3
|
+
description: |
|
|
4
|
+
Use this agent when a major project step has been completed and needs to be reviewed against the original plan and coding standards. Examples: <example>Context: The user is creating a code-review agent that should be called after a logical chunk of code is written. user: "I've finished implementing the user authentication system as outlined in step 3 of our plan" assistant: "Great work! Now let me use the code-reviewer agent to review the implementation against our plan and coding standards" <commentary>Since a major project step has been completed, use the code-reviewer agent to validate the work against the plan and identify any issues.</commentary></example> <example>Context: User has completed a significant feature implementation. user: "The API endpoints for the task management system are now complete - that covers step 2 from our architecture document" assistant: "Excellent! Let me have the code-reviewer agent examine this implementation to ensure it aligns with our plan and follows best practices" <commentary>A numbered step from the planning document has been completed, so the code-reviewer agent should review the work.</commentary></example>
|
|
5
|
+
model: inherit
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a Senior Code Reviewer with expertise in software architecture, design patterns, and best practices. Your role is to review completed project steps against original plans and ensure code quality standards are met.
|
|
9
|
+
|
|
10
|
+
When reviewing completed work, you will:
|
|
11
|
+
|
|
12
|
+
1. **Plan Alignment Analysis**:
|
|
13
|
+
- Compare the implementation against the original planning document or step description
|
|
14
|
+
- Identify any deviations from the planned approach, architecture, or requirements
|
|
15
|
+
- Assess whether deviations are justified improvements or problematic departures
|
|
16
|
+
- Verify that all planned functionality has been implemented
|
|
17
|
+
|
|
18
|
+
2. **Code Quality Assessment**:
|
|
19
|
+
- Review code for adherence to established patterns and conventions
|
|
20
|
+
- Check for proper error handling, type safety, and defensive programming
|
|
21
|
+
- Evaluate code organization, naming conventions, and maintainability
|
|
22
|
+
- Assess test coverage and quality of test implementations
|
|
23
|
+
- Look for potential security vulnerabilities or performance issues
|
|
24
|
+
|
|
25
|
+
3. **Architecture and Design Review**:
|
|
26
|
+
- Ensure the implementation follows SOLID principles and established architectural patterns
|
|
27
|
+
- Check for proper separation of concerns and loose coupling
|
|
28
|
+
- Verify that the code integrates well with existing systems
|
|
29
|
+
- Assess scalability and extensibility considerations
|
|
30
|
+
|
|
31
|
+
4. **Documentation and Standards**:
|
|
32
|
+
- Verify that code includes appropriate comments and documentation
|
|
33
|
+
- Check that file headers, function documentation, and inline comments are present and accurate
|
|
34
|
+
- Ensure adherence to project-specific coding standards and conventions
|
|
35
|
+
|
|
36
|
+
5. **Issue Identification and Recommendations**:
|
|
37
|
+
- Clearly categorize issues as: Critical (must fix), Important (should fix), or Suggestions (nice to have)
|
|
38
|
+
- For each issue, provide specific examples and actionable recommendations
|
|
39
|
+
- When you identify plan deviations, explain whether they're problematic or beneficial
|
|
40
|
+
- Suggest specific improvements with code examples when helpful
|
|
41
|
+
|
|
42
|
+
6. **Communication Protocol**:
|
|
43
|
+
- If you find significant deviations from the plan, ask the coding agent to review and confirm the changes
|
|
44
|
+
- If you identify issues with the original plan itself, recommend plan updates
|
|
45
|
+
- For implementation problems, provide clear guidance on fixes needed
|
|
46
|
+
- Always acknowledge what was done well before highlighting issues
|
|
47
|
+
|
|
48
|
+
Your output should be structured, actionable, and focused on helping maintain high code quality while ensuring project goals are met. Be thorough but concise, and always provide constructive feedback that helps improve both the current implementation and future development practices.
|
package/bin/cli.js
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
'use strict';
|
|
4
|
+
|
|
5
|
+
const fs = require('fs');
|
|
6
|
+
const path = require('path');
|
|
7
|
+
const os = require('os');
|
|
8
|
+
|
|
9
|
+
const PLUGIN_NAME = 'digiqagent';
|
|
10
|
+
const PLUGIN_DIR = path.join(os.homedir(), '.cursor', 'plugins', PLUGIN_NAME);
|
|
11
|
+
const PACKAGE_ROOT = path.resolve(__dirname, '..');
|
|
12
|
+
|
|
13
|
+
const CONTENT_DIRS = ['.cursor-plugin', 'skills', 'agents'];
|
|
14
|
+
|
|
15
|
+
const colors = {
|
|
16
|
+
red: (s) => `\x1b[31m${s}\x1b[0m`,
|
|
17
|
+
green: (s) => `\x1b[32m${s}\x1b[0m`,
|
|
18
|
+
yellow: (s) => `\x1b[33m${s}\x1b[0m`,
|
|
19
|
+
cyan: (s) => `\x1b[36m${s}\x1b[0m`,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
function printBanner() {
|
|
23
|
+
console.log('');
|
|
24
|
+
console.log(colors.cyan('╔══════════════════════════════════════╗'));
|
|
25
|
+
console.log(colors.cyan('║ DigiQAgent Installer ║'));
|
|
26
|
+
console.log(colors.cyan('║ QA · Testing · Code Review · E2E ║'));
|
|
27
|
+
console.log(colors.cyan('╚══════════════════════════════════════╝'));
|
|
28
|
+
console.log('');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function readPluginVersion(pluginRoot) {
|
|
32
|
+
const manifestPath = path.join(pluginRoot, '.cursor-plugin', 'plugin.json');
|
|
33
|
+
try {
|
|
34
|
+
const manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8'));
|
|
35
|
+
return manifest.version || 'unknown';
|
|
36
|
+
} catch {
|
|
37
|
+
return 'unknown';
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function copyDirRecursive(src, dest) {
|
|
42
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
43
|
+
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
44
|
+
for (const entry of entries) {
|
|
45
|
+
const srcPath = path.join(src, entry.name);
|
|
46
|
+
const destPath = path.join(dest, entry.name);
|
|
47
|
+
if (entry.isDirectory()) {
|
|
48
|
+
copyDirRecursive(srcPath, destPath);
|
|
49
|
+
} else {
|
|
50
|
+
fs.copyFileSync(srcPath, destPath);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function removeDirRecursive(dirPath) {
|
|
56
|
+
if (!fs.existsSync(dirPath)) return;
|
|
57
|
+
const entries = fs.readdirSync(dirPath, { withFileTypes: true });
|
|
58
|
+
for (const entry of entries) {
|
|
59
|
+
const fullPath = path.join(dirPath, entry.name);
|
|
60
|
+
if (entry.isDirectory()) {
|
|
61
|
+
removeDirRecursive(fullPath);
|
|
62
|
+
} else {
|
|
63
|
+
fs.unlinkSync(fullPath);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
fs.rmdirSync(dirPath);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function listSkills(pluginRoot) {
|
|
70
|
+
const skillsDir = path.join(pluginRoot, 'skills');
|
|
71
|
+
if (!fs.existsSync(skillsDir)) return [];
|
|
72
|
+
return fs.readdirSync(skillsDir, { withFileTypes: true })
|
|
73
|
+
.filter((d) => d.isDirectory())
|
|
74
|
+
.map((d) => d.name);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function listAgents(pluginRoot) {
|
|
78
|
+
const agentsDir = path.join(pluginRoot, 'agents');
|
|
79
|
+
if (!fs.existsSync(agentsDir)) return [];
|
|
80
|
+
return fs.readdirSync(agentsDir, { withFileTypes: true })
|
|
81
|
+
.filter((f) => f.isFile() && f.name.endsWith('.md'))
|
|
82
|
+
.map((f) => f.name.replace(/\.md$/, ''));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function install() {
|
|
86
|
+
printBanner();
|
|
87
|
+
|
|
88
|
+
for (const dir of CONTENT_DIRS) {
|
|
89
|
+
const srcDir = path.join(PACKAGE_ROOT, dir);
|
|
90
|
+
if (!fs.existsSync(srcDir)) {
|
|
91
|
+
console.log(colors.red(`Error: Source directory "${dir}" not found in package.`));
|
|
92
|
+
process.exit(1);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
const isUpdate = fs.existsSync(PLUGIN_DIR);
|
|
97
|
+
if (isUpdate) {
|
|
98
|
+
const oldVersion = readPluginVersion(PLUGIN_DIR);
|
|
99
|
+
console.log(colors.yellow(`Existing installation found (v${oldVersion}). Updating...`));
|
|
100
|
+
removeDirRecursive(PLUGIN_DIR);
|
|
101
|
+
} else {
|
|
102
|
+
console.log(colors.cyan('Installing DigiQAgent...'));
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
fs.mkdirSync(PLUGIN_DIR, { recursive: true });
|
|
106
|
+
for (const dir of CONTENT_DIRS) {
|
|
107
|
+
copyDirRecursive(path.join(PACKAGE_ROOT, dir), path.join(PLUGIN_DIR, dir));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const newVersion = readPluginVersion(PLUGIN_DIR);
|
|
111
|
+
|
|
112
|
+
console.log('');
|
|
113
|
+
console.log(colors.green('Installation complete!'));
|
|
114
|
+
console.log(colors.cyan(`Version: ${newVersion}`));
|
|
115
|
+
console.log(`Location: ${PLUGIN_DIR}`);
|
|
116
|
+
console.log('');
|
|
117
|
+
|
|
118
|
+
const skills = listSkills(PLUGIN_DIR);
|
|
119
|
+
if (skills.length > 0) {
|
|
120
|
+
console.log('Included skills:');
|
|
121
|
+
skills.forEach((s) => console.log(` • ${s}`));
|
|
122
|
+
console.log('');
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
const agents = listAgents(PLUGIN_DIR);
|
|
126
|
+
if (agents.length > 0) {
|
|
127
|
+
console.log('Included agents:');
|
|
128
|
+
agents.forEach((a) => console.log(` • ${a}`));
|
|
129
|
+
console.log('');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
console.log(colors.yellow('Restart Cursor to activate the plugin.'));
|
|
133
|
+
console.log('');
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function uninstall() {
|
|
137
|
+
if (fs.existsSync(PLUGIN_DIR)) {
|
|
138
|
+
const version = readPluginVersion(PLUGIN_DIR);
|
|
139
|
+
console.log(colors.yellow(`Removing DigiQAgent v${version} from ${PLUGIN_DIR}...`));
|
|
140
|
+
removeDirRecursive(PLUGIN_DIR);
|
|
141
|
+
console.log(colors.green('Uninstalled. Restart Cursor to complete removal.'));
|
|
142
|
+
} else {
|
|
143
|
+
console.log(colors.yellow('DigiQAgent is not installed.'));
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
function status() {
|
|
148
|
+
if (fs.existsSync(PLUGIN_DIR)) {
|
|
149
|
+
const version = readPluginVersion(PLUGIN_DIR);
|
|
150
|
+
console.log(colors.green('DigiQAgent is installed.'));
|
|
151
|
+
console.log(colors.cyan(`Version: ${version}`));
|
|
152
|
+
console.log(`Location: ${PLUGIN_DIR}`);
|
|
153
|
+
console.log('');
|
|
154
|
+
const packageVersion = readPluginVersion(PACKAGE_ROOT);
|
|
155
|
+
if (packageVersion !== 'unknown' && version !== packageVersion) {
|
|
156
|
+
console.log(colors.yellow(`Update available: ${version} → ${packageVersion}`));
|
|
157
|
+
console.log(`Run "digiqagent update" to update.`);
|
|
158
|
+
} else if (version === packageVersion) {
|
|
159
|
+
console.log(colors.green('Up to date.'));
|
|
160
|
+
}
|
|
161
|
+
} else {
|
|
162
|
+
console.log(colors.yellow('DigiQAgent is not installed.'));
|
|
163
|
+
console.log(`Run "digiqagent install" to install.`);
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function showHelp() {
|
|
168
|
+
console.log(`
|
|
169
|
+
${colors.cyan('DigiQAgent')} — QA & Testing Skills for Cursor IDE
|
|
170
|
+
|
|
171
|
+
${colors.yellow('Usage:')}
|
|
172
|
+
digiqagent <command>
|
|
173
|
+
|
|
174
|
+
${colors.yellow('Commands:')}
|
|
175
|
+
install Install or update DigiQAgent into ~/.cursor/plugins/
|
|
176
|
+
uninstall Remove DigiQAgent from ~/.cursor/plugins/
|
|
177
|
+
update Alias for install (overwrites with current package version)
|
|
178
|
+
status Show current installation status
|
|
179
|
+
help Show this help message
|
|
180
|
+
|
|
181
|
+
${colors.yellow('Examples:')}
|
|
182
|
+
npx digiqagent install
|
|
183
|
+
npx digiqagent status
|
|
184
|
+
npx digiqagent uninstall
|
|
185
|
+
`);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
const command = process.argv[2] || 'help';
|
|
189
|
+
|
|
190
|
+
switch (command) {
|
|
191
|
+
case 'install':
|
|
192
|
+
case 'update':
|
|
193
|
+
install();
|
|
194
|
+
break;
|
|
195
|
+
case 'uninstall':
|
|
196
|
+
uninstall();
|
|
197
|
+
break;
|
|
198
|
+
case 'status':
|
|
199
|
+
status();
|
|
200
|
+
break;
|
|
201
|
+
case 'help':
|
|
202
|
+
case '--help':
|
|
203
|
+
case '-h':
|
|
204
|
+
showHelp();
|
|
205
|
+
break;
|
|
206
|
+
default:
|
|
207
|
+
console.log(colors.red(`Unknown command: ${command}`));
|
|
208
|
+
showHelp();
|
|
209
|
+
process.exit(1);
|
|
210
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "digiqagent",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "QA and testing skills for Cursor IDE: TDD, systematic debugging, code review, verification, API spec generation, Postman test suites, and Playwright UI testing",
|
|
5
|
+
"author": "Pradeep SA",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"bin": {
|
|
8
|
+
"digiqagent": "./bin/cli.js"
|
|
9
|
+
},
|
|
10
|
+
"files": [
|
|
11
|
+
"bin/",
|
|
12
|
+
".cursor-plugin/",
|
|
13
|
+
"skills/",
|
|
14
|
+
"agents/",
|
|
15
|
+
"README.md"
|
|
16
|
+
],
|
|
17
|
+
"keywords": [
|
|
18
|
+
"cursor",
|
|
19
|
+
"cursor-plugin",
|
|
20
|
+
"qa",
|
|
21
|
+
"testing",
|
|
22
|
+
"tdd",
|
|
23
|
+
"debugging",
|
|
24
|
+
"code-review",
|
|
25
|
+
"verification",
|
|
26
|
+
"swagger",
|
|
27
|
+
"openapi",
|
|
28
|
+
"postman",
|
|
29
|
+
"api-testing",
|
|
30
|
+
"playwright",
|
|
31
|
+
"e2e-testing",
|
|
32
|
+
"angular",
|
|
33
|
+
"react",
|
|
34
|
+
"ui-testing"
|
|
35
|
+
],
|
|
36
|
+
"scripts": {
|
|
37
|
+
"version": "node -e \"const fs=require('fs');const pkg=JSON.parse(fs.readFileSync('package.json','utf8'));const pj='.cursor-plugin/plugin.json';const d=JSON.parse(fs.readFileSync(pj,'utf8'));d.version=pkg.version;fs.writeFileSync(pj,JSON.stringify(d,null,2)+'\\n');\" && git add .cursor-plugin/plugin.json"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"node": ">=16.7.0"
|
|
41
|
+
}}
|