@ai-qa/workflow 2.0.4 → 2.0.6

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 (3) hide show
  1. package/cli.js +14 -5
  2. package/install.js +12 -2
  3. package/package.json +1 -1
package/cli.js CHANGED
@@ -1,7 +1,16 @@
1
- #!/usr/bin/env node
1
+ const { execSync } = require("child_process");
2
+ const path = require("path");
3
+ const os = require("os");
2
4
 
3
- const path = require('path');
5
+ function getLatestTemplate() {
6
+ const tmpDir = path.join(os.tmpdir(), "ai-qa-workflow-latest");
4
7
 
5
- // Forward to install.js with --self flag so it installs into cwd
6
- process.argv.push('--self');
7
- require(path.join(__dirname, 'install.js'));
8
+ console.log("📦 Fetching latest AI QA template...");
9
+
10
+ execSync(
11
+ `npx --yes @ai-qa/workflow@latest --extract-template ${tmpDir}`,
12
+ { stdio: "inherit" }
13
+ );
14
+
15
+ return tmpDir;
16
+ }
package/install.js CHANGED
@@ -4,7 +4,7 @@ const fs = require('fs');
4
4
  const path = require('path');
5
5
  const { execSync } = require('child_process');
6
6
 
7
- const TEMPLATE_DIR = __dirname;
7
+ const TEMPLATE_DIR = getLatestTemplate();
8
8
  const YES = process.argv.includes('--yes') || process.argv.includes('-y');
9
9
  const IS_UPDATE = process.argv.includes('--update') || process.argv.includes('-u');
10
10
  const IS_SELF = process.argv.includes('--self') || process.argv.includes('-s');
@@ -22,6 +22,9 @@ const USER_DIRS = new Set([
22
22
  'specs',
23
23
  'tests',
24
24
  'test-results',
25
+ 'agents',
26
+
27
+
25
28
  ]);
26
29
 
27
30
  // Template files to copy/update
@@ -33,7 +36,14 @@ const QA_ITEMS = [
33
36
  { src: 'prompts', dest: 'prompts', dir: true },
34
37
  { src: '.github/agents', dest: '.github/agents', dir: true },
35
38
  { src: '.opencode', dest: '.opencode', dir: true },
36
- ];
39
+ { src: 'README.md', dest: 'README.md' },
40
+ { src: 'PROJECT_GUIDE.md', dest: 'PROJECT_GUIDE.md' },
41
+ { src: 'cursorrules.md', dest: 'cursorrules.md' },
42
+ { src: 'geminirules.md', dest: 'geminirules.md' },
43
+ { src: '.github/copilot-instructions.md', dest: '.github/copilot-instructions.md' },
44
+ { src: 'agents/router.md', dest: 'agents/router.md' },
45
+
46
+ ];
37
47
 
38
48
  // Files to copy even during update (excludes user config files)
39
49
  const UPDATE_ITEMS = QA_ITEMS.filter(item => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-qa/workflow",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
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",