@swayambhu-qa/core
v0.1.40
Published
Self-manifested QA. Give it a ticket. Get back a passing test suite.
Downloads
5,801
Maintainers
Readme
Self-manifested QA. Give it a ticket. Get back a passing test suite.
An agentic AI QA pipeline built with Claude Code. Give it a ticket, a Word doc, a PDF, or a plain text file — it comes back with a passing test suite, logged bugs, and a Draft PR. In under 30 minutes.
How It Works
Ticket / File → /qa-pipeline --id QA-42 --source jira --tool playwright,restassured
│
┌───────────────────┴───────────────────┐
UI track API track
(Playwright, Cypress…) (REST Assured, Robot…)
│ │
Scrape live app for Read API URL / Swagger /
DOM selectors & forms OpenAPI docs from ticket
│ │
└───────────────────┬───────────────────┘
│
Generate & review test cases
↳ Human review pause here
│
┌───────────────────┴───────────────────┐
Write Playwright specs Write REST Assured specs
(selectors from scrape) (endpoints from ticket)
│ │
└───────────────────┬───────────────────┘
│
Run all tests
│
┌───────────────────┴───────────────────┐
Heal broken selectors Heal auth / base URL /
and timing issues schema mismatches
│ │
└───────────────────┬───────────────────┘
│
Log confirmed bugs
│
Push results to TMS / comment
│
Draft PR created
▓
Human reviews & approves
▼
main ✅Agents
| Command | What it does |
|---|---|
| /qa-pipeline <issue> | Full lifecycle — ticket to PR |
| /create-test-cases <issue> | Issue tracker → Test cases only (no automation) |
| /automate-from-tms | Existing test cases → Automate + Run + Heal + Bugs |
| /generate-tests <url> | Scrape a page and write tests |
| /analyze-flaky | Read test results, classify flaky tests |
| /heal-tests | Auto-fix broken selectors |
| /bug-to-test | Turn a bug report into a regression test |
| /qa-report | Generate a shareable test results report |
Supported Tools
Requirement Input (--id + optional --source)
| Source | How to use | Status |
|---|---|---|
| Local file (.md, .txt, .docx, .doc, .pdf) | --id ./story.md (no --source needed) | ✅ |
| GitHub Issues | --id 42 --source github | ✅ |
| JIRA / Atlassian | --id TEST-22 --source jira | ✅ |
| Azure DevOps | --id 12345 --source ado | ✅ |
| Linear | --id ENG-456 --source linear | ✅ |
Test Automation (--tool)
| Tool | Flag | Status |
|---|---|---|
| Playwright + TypeScript | --tool playwright | ✅ |
| REST Assured + Java | --tool restassured / restassured:testng / restassured:junit / restassured:cucumber | ✅ |
| Cypress + TypeScript | --tool cypress | ✅ |
| Selenium + Java | --tool selenium / selenium:testng / selenium:junit / selenium:cucumber | ✅ |
| Robot Framework (UI / API) | --tool robot:ui / robot:api | ✅ |
Valid Combos (UI + API)
--tool playwright,restassured
--tool cypress,restassured
--tool selenium,restassured
--tool robot:ui,robot:apiExample Commands
# Local file — no IMS, no credentials needed
/qa-pipeline --id "./story.md" --tool playwright
/qa-pipeline --id "requirements/login.docx" --tool playwright,restassured
# GitHub Issue + Playwright
/qa-pipeline --id 42 --source github --repo myorg/myrepo
# JIRA ticket → Playwright only
/qa-pipeline --id TEST-22 --source jira --tool playwright
# JIRA ticket → Playwright + REST Assured (UI + API together)
/qa-pipeline --id QA-42 --source jira --tool playwright,restassured
# Skip PR creation (local dev / no git remote)
/qa-pipeline --id TEST-22 --source jira --tool playwright --no-pr
# Skip TMS push (use markdown as a local record instead of Xray/TestRail)
/qa-pipeline --id TEST-22 --source jira --tool playwright --tms markdown
# Just create test cases, no automation
/create-test-cases --id QA-42 --source jira
# Automate existing test cases from TestRail
/automate-from-tms --id QA-42 --source jira --test-mgmt testRail --tool playwrightMulti-run — process multiple tickets or files in one command
All four primary agents support comma-separated IDs and file paths. Runs are sequential with a 5-second cooldown between items.
# Run the full pipeline for two JIRA tickets back-to-back
/qa-pipeline --id "TEST-22,TEST-62" --source jira --tool playwright
# Mixed: two tickets + a local spec file in one command
/qa-pipeline --id "TEST-22,TEST-62,./docs/extra-feature.md" --source jira --tool playwright
# Create test cases for three tickets at once
/create-test-cases "QA-42,QA-43,QA-44" --source jira --tms xray
# Automate TCs from two issues + a local TC markdown file
/automate-from-tms --id "QA-42,QA-43,./test-cases/TC-login.md" --source jira --test-mgmt xray --tool playwright
# Turn multiple JIRA bugs into regression tests
/bug-to-test --jira BUG-101,BUG-102,BUG-103
# Mixed: JIRA bug + local bug report file
/bug-to-test --jira BUG-101 --file "./bugs/manual-bug.txt"→ Why only these four agents support multi-run
Setup
swayambhu-qa is an add-on for your existing project — it connects your issue tracker, test runner, and TMS. You keep your existing Playwright / REST Assured / Selenium setup exactly as it is.
0. Install Claude Code
swayambhu-qa runs inside Claude Code. If you don't have it yet:
npm install -g @anthropic-ai/claude-codeOr download the desktop app from claude.ai/code. You'll also need an Anthropic API key — set it once:
export ANTHROPIC_API_KEY=sk-ant-...1. Install
npm install --save-dev @swayambhu-qa/coreAlready installed? Upgrade to latest:
npm install --save-dev @swayambhu-qa/core@latest2. Initialize
npx @swayambhu-qa/core initWhat this does:
- Adds the swayambhu-qa MCP server entry to
.claude/settings.json - Creates
.env.examplewith all available configuration variables - Writes a 1-line shim file per agent into
.claude/commands/— each shim delegates to the full agent logic insidenode_modules, so your repo stays clean and the agents auto-update with npm
After init, your .claude/commands/ folder will have these slash commands available in Claude Code:
| Command | What it does |
|---|---|
| /qa-pipeline | Full pipeline: ticket → tests → heal → TMS → PR |
| /create-test-cases | Ticket → test cases pushed to TMS only |
| /generate-tests | URL → Playwright/REST Assured spec only |
| /automate-from-tms | TMS test cases → automate + run + heal + bugs |
| /heal-tests | Broken spec → fixed spec |
| /bug-to-test | Bug report → regression test |
| /analyze-flaky | Test results → flaky test report |
| /qa-report | Results → shareable QA report |
Approval prompts
By default, Claude Code asks for your approval before each tool call (bash commands, file writes, etc.). This is the safe default.
To skip per-step prompts and let the pipeline run unattended locally, re-run init with the --auto-approve flag:
npx @swayambhu-qa/core init --auto-approveThis adds Bash(*), Read(*), Write(*), and Edit(*) to the permissions.allow list in .claude/settings.json. Only use this if you trust the tickets and URLs being fed to the pipeline.
For CI, use --dangerously-skip-permissions on the claude CLI instead — see the CI section below.
3. Configure
Fill in .env with only the tools your team uses — leave everything else blank:
cp .env.example .envSee the Configuration section below for all available variables.
4. Open in Claude Code and run
/qa-pipeline --id TEST-22 --source jira --tool playwright --tms xrayThat's it. The pipeline reads your ticket, scrapes your app (UI) or reads API docs (API), writes tests in your existing framework, runs them, heals failures, and pushes results back to your TMS.
Two URLs matter — one for UI tests, one for API tests. The agent resolves each independently using the same 3-tier lookup:
| Priority | Source | How |
|---|---|---|
| 1 (highest) | CLI flag | --url (UI) and --api-url (API) |
| 2 | Issue description | PO writes Test URL: and API URL: in the ticket body |
| 3 (fallback) | .env file | BASE_URL (UI) and API_BASE_URL (API) |
UI URL — for Playwright, Cypress, Selenium, Appium
Points at the front-end application. The browser opens this URL.
Test URL: https://myapp.comResolved by (in order): --url flag → Test URL: in issue → BASE_URL in .env
API URL — for REST Assured, Robot Framework API mode, Playwright API tests
The base URL that all API request paths are appended to (e.g. POST /api/register).
API URL: https://api.myapp.comResolved by (in order): --api-url flag → API URL: in issue → API_BASE_URL in .env
How the PO sets URLs in a ticket
Write both in the issue description (JIRA, GitHub, ADO, or Linear):
Test URL: https://myapp.com
API URL: https://api.myapp.comThe parser accepts Test URL, UI URL, Base URL for the UI address and API URL, API Base URL for the API address — on the same line as the label or on the immediately following line.
After generating test cases and before writing any code, the pipeline pauses and shows you a table of all TCs with their Xray keys, types, and AC coverage. You can approve or redirect:
Approve and proceed:
yes
Remove a test case:
Remove the accessibility test case, we don't need it for now
Add a test case:
Add a test case for negative amount entry (e.g. entering -50)
Change a test type:
TC-TEST22-03 should be an Edge case, not Happy Path
Change AC mapping:
TC-TEST22-07 should cover AC-6 not AC-7
Change selectors:
Use data-testid attributes instead of class-based selectors
Narrow scope:
Focus only on Happy Path test cases, skip Negative and Edge for now
Any plain-English instruction works — the pipeline rewrites the TC file and re-pushes to Xray before generating code.
CI Permissions — scope before you run
The pipeline runs Claude Code non-interactively in CI using the --dangerously-skip-permissions flag,
which bypasses all approval prompts. This is safe only when the environment is properly scoped first:
| What to scope | How | |---|---| | API tokens | Use read-only JIRA tokens where possible; Xray write-only token — never admin keys | | CI runner | Use ephemeral containers (GitHub Actions, GitLab CI) — never a shared persistent server | | Filesystem | The runner should have access only to the repo checkout — no production mounts | | Network | Restrict egress to only the domains the pipeline needs (Atlassian, Xray, your app URL) | | JIRA project | Only internal/trusted team members should be able to create tickets that trigger the pipeline |
Prompt injection risk: if untrusted users can create tickets in your JIRA project, a malicious description could attempt to inject commands. Mitigate by restricting ticket creation to team members and reviewing the
fetch-issue.tsoutput before the pipeline proceeds in sensitive environments.
CI command
Full syntax to run the pipeline headlessly in CI:
claude --dangerously-skip-permissions -p \
"/qa-pipeline --id QA-42 --source jira --tool playwright --tms xray"--dangerously-skip-permissions— skips all tool-use approval prompts (required for non-interactive CI)-p— print mode: runs non-interactively, outputs result, then exits
Typical GitHub Actions usage
# .github/workflows/qa-nightly.yml
- name: Install Claude Code
run: npm install -g @anthropic-ai/claude-code
- name: Run QA Pipeline
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_EMAIL: ${{ secrets.JIRA_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
XRAY_CLIENT_ID: ${{ secrets.XRAY_CLIENT_ID }}
XRAY_CLIENT_SECRET: ${{ secrets.XRAY_CLIENT_SECRET }}
XRAY_PROJECT_KEY: TEST
BASE_URL: ${{ vars.STAGING_URL }}
run: |
claude --dangerously-skip-permissions -p \
"/qa-pipeline --id ${{ inputs.issue }} --source jira --tool playwright --tms xray"The user types one command in Claude Code:
/qa-pipeline --id TEST-22 --source jira --tool playwright --tms xrayThe orchestrator (/qa-pipeline) reads those flags and internally calls each script with only the subset that script needs:
# Phase 1 — fetch ticket:
npx swayambhu-fetch --id TEST-22 --source jira
# Phase 2 — scrape app UI:
npx swayambhu-scrape --url <url-from-issue>
# Phase 3 — push test cases to TMS:
npx swayambhu-push-tms --id TEST-22 --tms xray --file test-cases/TC-TEST22-*.md
# Phase 5 — run tests (Playwright example):
npx swayambhu-run-tests --id TEST-22 --spec tests/generated/<slug>.spec.ts --tool playwright
# Phase 8 — update TMS with results:
npx swayambhu-update-tms --id TEST-22 --tms xray --results reports/results-TEST22.json--tool tells the orchestrator which spec to generate and which test runner to invoke. Individual scripts are tool-agnostic — they never see the --tool flag.
| Flag | Required? | Supported values | Default | When to omit |
|---|---|---|---|---|
| --id <id> | Always | Issue ID, file path, or comma-separated mix | — | Single: TEST-22, ./story.md · Multi: "TEST-22,TEST-62", "QA-42,./spec.txt" |
| --source <src> | No | github ✅, jira ✅, ado ✅, linear ✅ | github | Omit if using GitHub Issues |
| --repo <owner/repo> | GitHub only | e.g. myorg/myrepo | — | Omit for JIRA, ADO, Linear — only needed with --source github |
| --tool <tool> | No | playwright ✅, cypress ✅, selenium ✅, restassured ✅, robot:ui ✅, robot:api ✅ | playwright | Omit to default to Playwright. Combine with commas: playwright,restassured |
| --tms <tms> | No | xray ✅, testrail ✅, markdown ✅ | markdown | Omit to write results locally. Add --tms xray or --tms testrail if you have credentials in .env |
| --no-pr | No | (flag only, no value) | (PR is created) | Omit to get a Draft PR. Add --no-pr to skip PR for local runs or when no git remote is configured |
| --url <url> | No | Any URL | From issue / .env | Omit if the issue has a Test URL: line or BASE_URL is set in .env |
| --api-url <url> | No | Any URL | From issue / .env | Omit if the issue has an API URL: line or API_BASE_URL is set in .env |
| --file <path> | push-to-tms only | Path to .md file | — | Only for individual script calls — orchestrator sets this automatically |
| --results <path> | update-tms-status only | Path to .json file | — | Only for individual script calls — orchestrator sets this automatically |
| --run-id <id> | TestRail only | Integer run ID | — | Only for TestRail individual script calls |
| --feature <slug> | markdown TMS only | Short slug string | — | Only for markdown TMS individual script calls |
The pipeline writes into these folders inside your project (created automatically on first run):
| Folder | Files | Description |
|---|---|---|
| logs/ | pipeline-latest.log | Always contains the most recent run's structured logs |
| logs/ | pipeline-<issueId>-<date>.log | Per-run archive — one file per pipeline execution |
| reports/ | tc-mapping-<issueId>.json | Maps TC IDs to native TMS keys (written by push-to-tms, read by run-tests) |
| reports/ | results-<issueId>.json | Pass/fail per TC after test run, including heal details |
| reports/ | pw-results-<issueId>.json | Raw Playwright JSON reporter output |
| test-cases/ | TC-<issueId>-<slug>.md | Generated test cases in markdown before they are pushed to TMS |
| tests/generated/ | <slug>.spec.ts | Generated Playwright/Cypress/etc spec file |
Add these to your .gitignore if you don't want to commit generated artifacts:
logs/
reports/
test-cases/
tests/generated/Or commit them if you want a full audit trail of every pipeline run.
Fill in only what your team uses — leave everything else blank:
# ── Anthropic (required) ───────────────────────────────────────────────────
ANTHROPIC_API_KEY=sk-ant-... # https://console.anthropic.com/settings/keys
# ── App URLs (fallback when not set in the issue description) ──────────────
BASE_URL=https://myapp.com # UI tests — Playwright, Cypress, Selenium, Robot UI
API_BASE_URL=https://api.myapp.com # API tests — REST Assured, Robot API, Playwright API
# ── JIRA / Atlassian ───────────────────────────────────────────────────────
JIRA_BASE_URL=https://yourcompany.atlassian.net
[email protected]
JIRA_API_TOKEN=your_token # id.atlassian.com/manage-profile/security/api-tokens
JIRA_PROJECT_KEY=QA
# ── Xray (JIRA plugin — Test Management) ──────────────────────────────────
XRAY_CLIENT_ID=your_client_id # JIRA → Apps → Xray → API Keys → Generate
XRAY_CLIENT_SECRET=your_client_secret
XRAY_PROJECT_KEY=QA
# ── Azure DevOps ───────────────────────────────────────────────────────────
ADO_ORG=yourorg
ADO_PROJECT=YourProject
ADO_PAT=your_pat # dev.azure.com → profile icon → Personal Access Tokens
# ── Linear ─────────────────────────────────────────────────────────────────
LINEAR_API_KEY=lin_api_xxx # linear.app → Settings → API → Personal API keys
# LINEAR_TEAM_ID=uuid_of_team # Optional: override bug team (auto-resolved from issue key)
# LINEAR_BUG_LABEL_ID=uuid_of_label # Optional: auto-tag bugs with "Bug" label
# ── TestRail ───────────────────────────────────────────────────────────────
TESTRAIL_URL=https://yourcompany.testrail.io
[email protected]
TESTRAIL_API_KEY=your_key # TestRail → My Settings → API Keys
TESTRAIL_PROJECT_ID=1| Requirement | When needed |
|---|---|
| Claude Code (claude.ai/code) | Always — the agent runs inside Claude Code |
| Anthropic API key (ANTHROPIC_API_KEY) | Always — set in shell or CI secrets |
| Node.js 18+ | Always — the integration scripts run on Node |
| Java 21 + Maven 3.9+ | Only if using REST Assured, Selenium, or Appium |
| Python 3.9+ | Only if using Robot Framework |
| GitHub CLI — gh auth login | Draft PR on GitHub repos |
| GitLab CLI — glab auth login | Draft MR on GitLab repos |
| Bitbucket CLI — bb login | Draft PR on Bitbucket repos |
| Azure DevOps CLI — az login | Draft PR on ADO repos |
Everything else (Playwright, Cypress, your existing test framework) you already have in your project.
Prerequisites
The Draft PR phase (Phase 9) requires:
- Your project must be a git repository with at least one commit
- A GitHub remote must be set —
git remote add origin https://github.com/org/repo.git ghCLI installed and authenticated — rungh auth loginonce before using the pipeline
The pipeline detects your remote URL automatically and uses the right CLI — GitHub (gh), GitLab (glab), Bitbucket (bb), or Azure DevOps (az repos). If no remote is configured or the CLI is not authenticated, Phase 9 is skipped gracefully.
Use --no-pr to skip Phase 9 entirely — everything else still runs:
/qa-pipeline --id TEST-22 --source jira --tool playwright --tms xray --no-prRepo setup
GitHub:
git init && git remote add origin https://github.com/org/repo.git
gh auth loginGitLab:
git init && git remote add origin https://gitlab.com/org/repo.git
glab auth loginBitbucket:
git init && git remote add origin https://bitbucket.org/org/repo.git
bb loginAzure DevOps:
git init && git remote add origin https://dev.azure.com/org/project/_git/repo
az login && az devops configure --defaults organization=https://dev.azure.com/org project=MyProjectIf none of these are set up, use --no-pr to skip Phase 9 — everything else still runs.
The following are planned or in progress. Contributions welcome — open an issue or PR at github.com/yoggit/swayambhu-qa.
Test Runner Support
| Tool | Status | |---|---| | Playwright + TypeScript | ✅ Supported | | REST Assured (TestNG / JUnit / Cucumber) | ✅ Supported | | Cypress + TypeScript | ✅ Supported | | Selenium (TestNG / JUnit / Cucumber) | ✅ Supported | | Robot Framework (UI / API) | ✅ Supported |
Issue Source Support
| Source | Status | |---|---| | JIRA | ✅ Supported | | GitHub Issues | ✅ Supported | | Azure DevOps | ✅ Supported | | Linear | ✅ Supported |
Test Management System Support
| TMS | Status | |---|---| | Xray (JIRA plugin) | ✅ Supported | | Markdown (local files) | ✅ Supported | | TestRail | ✅ Supported |
Pipeline Features
| Feature | Status |
|---|---|
| Multi-tool combined runs (playwright,restassured) | ✅ Supported |
| Multi-issue runs (--id TEST-22,TEST-62) | ✅ Supported |
| Zero Setup Mode | ✅ Supported |
| Project scaffolding | ✅ Supported |
| Documentation site | ✅ Supported |
| CI/CD integration (GitHub Actions) | 🔜 Planned |
Documentation
Full docs at yoggit.github.io/swayambhu-qa/
Covers all agents, flags, configuration, URL resolution, CI setup, and future enhancements.
Built to show that AI agents can handle the repetitive parts of QA — so engineers can focus on what actually matters: quality judgment.
