create-qa-architect 5.13.5 → 5.14.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/.github/workflows/claude-md-validation.yml +0 -3
- package/.semgrep/defensive-patterns.yaml +356 -0
- package/.semgrep/vibe-audit-rules.yaml +332 -0
- package/LICENSE +192 -39
- package/README.md +98 -46
- package/config/requirements-dev.txt +2 -2
- package/docs/CI-COST-ANALYSIS.md +10 -10
- package/docs/POLAR-DEPLOYMENT.md +157 -0
- package/docs/{STRIPE-LIVE-MODE-DEPLOYMENT.md → _archive/STRIPE-LIVE-MODE-DEPLOYMENT.md} +24 -21
- package/docs/plans/PLAN-vibe-code-auditor.md +130 -0
- package/docs/plans/POLAR-MIGRATION.md +111 -0
- package/docs/plans/pro-features-2026-05.md +159 -0
- package/eslint.config.cjs +1 -0
- package/lib/commands/analyze-ci.js +20 -11
- package/lib/commands/audit.js +668 -0
- package/lib/commands/ci-doctor.js +341 -0
- package/lib/commands/history-scan.js +342 -0
- package/lib/commands/index.js +8 -0
- package/lib/commands/pr-check.js +484 -0
- package/lib/commands/prelaunch-setup.js +4 -0
- package/lib/commands/ship-check.js +570 -0
- package/lib/license-validator.js +200 -6
- package/lib/licensing.js +99 -11
- package/package.json +7 -6
- package/scripts/deploy-consumers.sh +10 -5
- package/scripts/risk-policy-gate.js +410 -0
- package/setup.js +132 -4
- /package/lib/{billing-dashboard.html → _archive/billing-dashboard.html} +0 -0
|
@@ -12,7 +12,11 @@ const path = require('path')
|
|
|
12
12
|
const { execSync } = require('child_process')
|
|
13
13
|
const yaml = require('js-yaml')
|
|
14
14
|
const { showProgress } = require('../ui-helpers')
|
|
15
|
-
const {
|
|
15
|
+
const {
|
|
16
|
+
hasFeature,
|
|
17
|
+
showUpgradeMessage,
|
|
18
|
+
ensureLicenseFresh,
|
|
19
|
+
} = require('../licensing')
|
|
16
20
|
|
|
17
21
|
const DAYS_PER_MONTH = 30
|
|
18
22
|
const DEFAULT_PULL_REQUEST_FACTOR = 0.8
|
|
@@ -771,20 +775,26 @@ function generateReport(analysis) {
|
|
|
771
775
|
}
|
|
772
776
|
|
|
773
777
|
/**
|
|
774
|
-
* Main handler for --analyze-ci command
|
|
778
|
+
* Main handler for --analyze-ci command. When `options.doctor` is true,
|
|
779
|
+
* appends the CI Doctor diagnostics (flaky tests, duplicated jobs, etc.)
|
|
775
780
|
*/
|
|
776
|
-
async function handleAnalyzeCi() {
|
|
781
|
+
async function handleAnalyzeCi(options = {}) {
|
|
777
782
|
const projectPath = process.cwd()
|
|
778
783
|
|
|
784
|
+
await ensureLicenseFresh()
|
|
779
785
|
if (!hasFeature('ciCostAnalysis')) {
|
|
780
786
|
showUpgradeMessage('GitHub Actions cost analysis')
|
|
781
787
|
process.exit(1)
|
|
782
788
|
}
|
|
783
789
|
|
|
790
|
+
if (options.doctor && !hasFeature('ciDoctor')) {
|
|
791
|
+
showUpgradeMessage('CI Doctor (workflow health + flaky test detection)')
|
|
792
|
+
process.exit(1)
|
|
793
|
+
}
|
|
794
|
+
|
|
784
795
|
const spinner = showProgress('Analyzing GitHub Actions workflows...')
|
|
785
796
|
|
|
786
797
|
try {
|
|
787
|
-
// Step 1: Discover workflows
|
|
788
798
|
const workflowFiles = discoverWorkflows(projectPath)
|
|
789
799
|
|
|
790
800
|
if (workflowFiles.length === 0) {
|
|
@@ -796,7 +806,6 @@ async function handleAnalyzeCi() {
|
|
|
796
806
|
process.exit(1)
|
|
797
807
|
}
|
|
798
808
|
|
|
799
|
-
// Step 2: Parse and analyze workflows
|
|
800
809
|
const workflows = []
|
|
801
810
|
for (const wf of workflowFiles) {
|
|
802
811
|
try {
|
|
@@ -815,13 +824,8 @@ async function handleAnalyzeCi() {
|
|
|
815
824
|
}
|
|
816
825
|
}
|
|
817
826
|
|
|
818
|
-
// Step 3: Get commit frequency
|
|
819
827
|
const commitStats = getCommitFrequency(projectPath)
|
|
820
|
-
|
|
821
|
-
// Step 4: Calculate costs
|
|
822
828
|
const costs = calculateMonthlyCosts(workflows, commitStats.commitsPerDay)
|
|
823
|
-
|
|
824
|
-
// Step 5: Analyze optimization opportunities
|
|
825
829
|
const optimizations = analyzeOptimizations(
|
|
826
830
|
workflows,
|
|
827
831
|
commitStats.commitsPerDay
|
|
@@ -829,7 +833,6 @@ async function handleAnalyzeCi() {
|
|
|
829
833
|
|
|
830
834
|
spinner.succeed('Analysis complete')
|
|
831
835
|
|
|
832
|
-
// Step 6: Generate report
|
|
833
836
|
generateReport({
|
|
834
837
|
workflows,
|
|
835
838
|
costs,
|
|
@@ -837,6 +840,12 @@ async function handleAnalyzeCi() {
|
|
|
837
840
|
optimizations,
|
|
838
841
|
})
|
|
839
842
|
|
|
843
|
+
if (options.doctor) {
|
|
844
|
+
const { runDoctorChecks, buildDoctorReport } = require('./ci-doctor')
|
|
845
|
+
const findings = runDoctorChecks(workflows, projectPath, options)
|
|
846
|
+
process.stdout.write(buildDoctorReport(findings))
|
|
847
|
+
}
|
|
848
|
+
|
|
840
849
|
process.exit(0)
|
|
841
850
|
} catch (error) {
|
|
842
851
|
spinner.fail('Analysis failed')
|