synapse-hub 0.0.0-stage → 2.0.1
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/.agents/agents/failure-analyst.md +47 -0
- package/.agents/agents/live-explorer.md +41 -0
- package/.agents/agents/orchestrator.md +43 -0
- package/.agents/agents/pom-crafter.md +81 -0
- package/.agents/agents/quality-gatekeeper.md +47 -0
- package/.agents/agents/test-runner.md +43 -0
- package/.agents/rules/context-engineering.md +88 -0
- package/.agents/rules/git-push-protocol.md +101 -0
- package/.agents/rules/graphify.md +14 -0
- package/.agents/rules/lessons-learned.md +23 -0
- package/.agents/rules/mandatory-playwright-live.md +29 -0
- package/.agents/rules/skill-precedence.md +42 -0
- package/.agents/rules/systematic-debugging.md +99 -0
- package/.agents/skills/agent-orchestration-multi-agent-optimize/SKILL.md +239 -0
- package/.agents/skills/antigravity-test-sentinel/SKILL.md +64 -0
- package/.agents/skills/api-network-mocking-interception/SKILL.md +142 -0
- package/.agents/skills/api-spec-to-e2e-matrix/SKILL.md +70 -0
- package/.agents/skills/architecture-decision-records/SKILL.md +441 -0
- package/.agents/skills/auth-session-and-cookie-manager/SKILL.md +72 -0
- package/.agents/skills/backend-load-and-stress-patterns/SKILL.md +214 -0
- package/.agents/skills/bats-testing-patterns/SKILL.md +100 -0
- package/.agents/skills/bats-testing-patterns/resources/implementation-playbook.md +614 -0
- package/.agents/skills/clean-pom-crafter/SKILL.md +75 -0
- package/.agents/skills/clean-pom-crafter/examples/standard_test_case.groovy +28 -0
- package/.agents/skills/clean-pom-crafter/references/pom_patterns.groovy +138 -0
- package/.agents/skills/code-refactoring-refactor-clean/SKILL.md +64 -0
- package/.agents/skills/code-refactoring-refactor-clean/resources/implementation-playbook.md +879 -0
- package/.agents/skills/db-state-verifier-and-seeder/SKILL.md +123 -0
- package/.agents/skills/e2e-testing-patterns/SKILL.md +103 -0
- package/.agents/skills/e2e-testing-patterns/resources/implementation-playbook.md +522 -0
- package/.agents/skills/failure-autopsy-and-healing/SKILL.md +54 -0
- package/.agents/skills/failure-autopsy-and-healing/references/healing_matrix.md +64 -0
- package/.agents/skills/failure-autopsy-and-healing/references/qa_investigation_protocol.md +56 -0
- package/.agents/skills/failure-autopsy-and-healing/scripts/triage_failures.sh +98 -0
- package/.agents/skills/file-and-report-validator/SKILL.md +90 -0
- package/.agents/skills/flaky-test-sentinel-and-quarantine/SKILL.md +114 -0
- package/.agents/skills/github-actions-templates/SKILL.md +334 -0
- package/.agents/skills/graphify-impact-analyzer/SKILL.md +78 -0
- package/.agents/skills/katalon-cli-runner/SKILL.md +76 -0
- package/.agents/skills/katalon-cli-runner/references/groovy-patterns.md +209 -0
- package/.agents/skills/katalon-cli-runner/references/katalon-api.md +155 -0
- package/.agents/skills/katalon-cli-runner/references/runner_commands.md +67 -0
- package/.agents/skills/lam-script-generator/SKILL.md +83 -0
- package/.agents/skills/playwright-live-interaction/SKILL.md +86 -0
- package/.agents/skills/playwright-live-interaction/references/advanced_superpowers.md +160 -0
- package/.agents/skills/playwright-live-interaction/references/compact_accessibility_snapshots.md +75 -0
- package/.agents/skills/playwright-live-interaction/references/recipes.md +388 -0
- package/.agents/skills/playwright-live-interaction/references/swarm_orchestration.md +134 -0
- package/.agents/skills/security-dast-sentinel/SKILL.md +176 -0
- package/.agents/skills/self-healing-locator/SKILL.md +73 -0
- package/.agents/skills/synthetic-test-data-generator/SKILL.md +135 -0
- package/.agents/skills/token-and-context-optimizer/SKILL.md +70 -0
- package/.agents/skills/visual-regression-sentinel/SKILL.md +62 -0
- package/.agents/skills/wcag-audit-patterns/SKILL.md +77 -0
- package/.agents/skills/wcag-audit-patterns/resources/implementation-playbook.md +541 -0
- package/.agents/skills/web-vitals-and-performance-profiler/SKILL.md +65 -0
- package/.agents/templates/completion_report.md +57 -0
- package/.agents/workflows/graphify.md +10 -0
- package/.agents/workflows/test-impact.md +15 -0
- package/.agents/workflows/verify.md +34 -0
- package/AGENTS.md +115 -0
- package/README.md +537 -2
- package/bin/agent-qa.js +90 -0
- package/package.json +59 -4
- package/skills_manifest.json +262 -0
- package/templates/PROJECT_AI_GUIDE_TEMPLATE.md +97 -0
- package/templates/PROJECT_STATE_TEMPLATE.md +20 -0
- package/tools/TOOLS_RUNBOOK.md +298 -0
- package/tools/agent_canary.py +501 -0
- package/tools/analyze_project.py +242 -0
- package/tools/api_drift_sentinel.py +208 -0
- package/tools/auto_heal.py +189 -0
- package/tools/browser_helpers.js +593 -0
- package/tools/bug_reporter.py +224 -0
- package/tools/cache_resolver.py +846 -0
- package/tools/check_env.py +288 -0
- package/tools/ci_healing_hook.py +128 -0
- package/tools/cli.py +402 -0
- package/tools/config_decoupler.py +253 -0
- package/tools/db_sandbox.py +341 -0
- package/tools/distill_log.py +152 -0
- package/tools/e2e_flow_prober.ps1 +65 -0
- package/tools/flaky_detector.py +222 -0
- package/tools/fuzz_payloads.py +197 -0
- package/tools/generate_allure_report.ps1 +30 -0
- package/tools/generate_api_matrix.py +193 -0
- package/tools/generate_tc_from_story.py +182 -0
- package/tools/generate_test_reports.ps1 +135 -0
- package/tools/git_pre_commit_guard.py +203 -0
- package/tools/heal_pr_automator.py +195 -0
- package/tools/heuristic_locator_matcher.py +202 -0
- package/tools/infer_linter.py +238 -0
- package/tools/lint_ai_docs.py +254 -0
- package/tools/lookup_tc.py +165 -0
- package/tools/lookup_xpath.py +167 -0
- package/tools/matrix_sharder.py +146 -0
- package/tools/mcp_excel_server.ps1 +251 -0
- package/tools/mcp_server.py +490 -0
- package/tools/micro_mutator.py +309 -0
- package/tools/network_mock_shield.py +170 -0
- package/tools/omni_emitter.py +500 -0
- package/tools/omni_parser.py +435 -0
- package/tools/omni_transpiler.py +168 -0
- package/tools/pinpoint_failure.py +88 -0
- package/tools/project_state.py +169 -0
- package/tools/repo_map.json +12 -0
- package/tools/repo_map.py +277 -0
- package/tools/repo_map.txt +7 -0
- package/tools/safety_firewall.py +245 -0
- package/tools/setup_project.py +265 -0
- package/tools/smart_visual_masker.py +134 -0
- package/tools/test_impact.py +321 -0
- package/tools/tms_sync_bridge.py +342 -0
- package/tools/trace_data_flow.py +240 -0
- package/tools/traffic_session_converter.py +256 -0
- package/tools/universal_ir.py +480 -0
- package/tools/validate_groovy_scripts.py +173 -0
- package/tools/verify_all.py +496 -0
- package/tools/verify_all.sh +4 -0
- package/tools/visual_diff_canvas.py +142 -0
- package/tools/visual_som_helper.py +425 -0
- package/tools/wcag_audit.py +214 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: verify
|
|
3
|
+
description: Execute 8 Quality Gates to verify complete codebase integrity and enforce deterministic safety boundaries before handoff.
|
|
4
|
+
trigger: /verify
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Workflow: verify
|
|
8
|
+
|
|
9
|
+
## 1. Pre-execution Safety Hook (Mandatory Action Firewall)
|
|
10
|
+
Before dispatching any UI interaction (`click`, `fill`, `submit`, `drop`) down to a live Playwright or CDP browser context, the command or code must be piped through `tools/safety_firewall.py --dry-run`:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
# Verify single action safety clearance
|
|
14
|
+
python tools/safety_firewall.py --action click --selector "<selector>" --text "<text>" --dry-run
|
|
15
|
+
|
|
16
|
+
# Or pipe code snippet directly
|
|
17
|
+
python tools/safety_firewall.py --code "page.click('<selector>')" --dry-run
|
|
18
|
+
```
|
|
19
|
+
*If safety firewall reports BLOCKED, execution halts immediately unless explicitly forced via `--force` or `ALLOW_DESTRUCTIVE=1`.*
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## 2. Hard Quality Gates Verification (8 DoD Gates)
|
|
24
|
+
Execute all 8 Quality Gates (UTF-8 No BOM, Path Portability, Clean POM, AI Docs Linter, Cleanup Blacklist, Credential Security, Infer Linter, and AST Micro-Mutation Testing):
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
python tools/verify_all.py
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Gate 8 Hard Rejection Rule:
|
|
31
|
+
- Any new or updated test case must achieve an AST Mutation Score of **$\ge 80\%$** via `tools/micro_mutator.py`.
|
|
32
|
+
- If `mutation_score < 80%`, the Gatekeeper strictly rejects the test suite (anti-tautology and anti-fake-pass policy).
|
|
33
|
+
|
|
34
|
+
If any gate returns `FAIL`, pause execution and resolve defects completely before proceeding.
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# AGENTS.md — AI Agent Operating Standards & Protocols (Enterprise QA Hub)
|
|
2
|
+
|
|
3
|
+
> **Scope:** Google Antigravity, Cursor, Claude Code, GitHub Copilot, Codex, Windsurf, and all AI/QA engineers working with automated testing suites.
|
|
4
|
+
> All rules below are **MANDATORY** and must be consistently enforced across all projects linking to this Hub.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 0. CONTEXT-AWARE PRE-FLIGHT CONFIRMATION BLOCK (CODE & TEST ACTIONS ONLY)
|
|
9
|
+
|
|
10
|
+
> **Trigger Condition:** This confirmation block is **MANDATORY ONLY** when executing technical tasks: generating code, editing test scripts, refactoring Page Classes, or executing runner tools.
|
|
11
|
+
> **Conversational Exemption:** For general discussions, architecture questions, planning, and Q&A, **DO NOT emit this block** — respond directly and concisely.
|
|
12
|
+
> **Dynamic Context:** The architecture and technique fields must adapt dynamically to the target project's `PROJECT_AI_GUIDE.md` (e.g., Playwright/TS, Clean POM/Groovy, Pytest/Python, REST API).
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
> ✅ **[OK] Skill Hub Loaded:** `agent-skills` & Project Guide (`PROJECT_AI_GUIDE.md`)
|
|
16
|
+
> 🏛️ **[OK] Architecture:** <Target Architecture, e.g.: Clean POM / Flat Architecture>
|
|
17
|
+
> ⚡ **[OK] Target Tech:** <Actual Project Tech, e.g.: Playwright Live / API Mocking / Pytest>
|
|
18
|
+
> 🛡️ **[OK] Discipline:** Truth Anchor (No Fake Pass) + Zero-Token Error Blacklist
|
|
19
|
+
> 🎯 **[OK] Execution Plan:**
|
|
20
|
+
> • <Immediate Action Item 1>
|
|
21
|
+
> • <Immediate Action Item 2>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 1. CORE ARCHITECTURE & CODE STANDARDS
|
|
27
|
+
|
|
28
|
+
1. **Clean Page Object Model (POM):**
|
|
29
|
+
- Test scripts (`Scripts/` or `tests/`) must contain only business workflow method calls from Page Classes.
|
|
30
|
+
- **Strictly forbidden:** Raw XPaths, CSS selectors, or `findTestObject` calls inside test scripts.
|
|
31
|
+
- All locators and DOM operations must be encapsulated in Page Classes extending `BasePage`.
|
|
32
|
+
|
|
33
|
+
2. **100% UTF-8 No BOM:**
|
|
34
|
+
- All files (`.groovy`, `.java`, `.ts`, `.py`, `.json`, `.md`, `.ps1`, `.sh`) **must not** contain UTF-8 BOM (`0xEF, 0xBB, 0xBF`).
|
|
35
|
+
|
|
36
|
+
3. **Dynamic & Idempotent Test Data:**
|
|
37
|
+
- Always use randomized identifiers with timestamps/prefixes (e.g., `BasePage.uniqueCode("AUTO_")` or `DataGenerator`) to eliminate DB unique key collisions during parallel runs.
|
|
38
|
+
- Every creation test case must be paired with automated Teardown Cleanup.
|
|
39
|
+
|
|
40
|
+
4. **Synchronization & Smart Wait:**
|
|
41
|
+
- Static sleeps (`Thread.sleep`) are strictly prohibited to prevent pipeline flakiness.
|
|
42
|
+
- Use dynamic smart waits: element visibility checks, Angular `zone.isStable()`, or Playwright `waitForLoadState('networkidle')`.
|
|
43
|
+
|
|
44
|
+
---
|
|
45
|
+
|
|
46
|
+
## 2. PLAYWRIGHT LIVE INTERACTION PROTOCOL
|
|
47
|
+
|
|
48
|
+
1. **Mandatory 3-Stage Lifecycle:**
|
|
49
|
+
- **Stage 1 (Discovery):** Survey live DOM/AOM using headless browser. Never guess URLs or selector attributes.
|
|
50
|
+
- **Stage 2 (Script Creation):** Verify selectors on the live browser (100% hit rate under 200ms) before committing to Page Classes.
|
|
51
|
+
- **Stage 3 (In-Place Self-Healing):** When a test fails, pause the browser at the failure point to inspect and heal the locator; do not re-run from scratch.
|
|
52
|
+
2. **Standard Configuration:** Pure headless mode, Full HD resolution `1920x1080`.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## 3. TRUTH ANCHOR & ZERO-HALLUCINATION DISCIPLINE
|
|
57
|
+
|
|
58
|
+
1. **Truth Anchor (No Fake Pass):**
|
|
59
|
+
- If a test fails due to an application bug (AUT Bug), report the defect honestly. **Never relax assertion conditions, skip validation steps, or alter expected results to manufacture a fake pass.**
|
|
60
|
+
2. **No Lazy Truncation:**
|
|
61
|
+
- Always output complete, directly executable code. Never use `// ... existing code ...` or `// TODO` in scripts.
|
|
62
|
+
3. **Strict Credential Security:**
|
|
63
|
+
- Never commit raw plaintext passwords, secret tokens, or private keys to git. Always use environment variables or encrypted profiles.
|
|
64
|
+
4. **Zero-Command Autonomous Proactivity & On-Demand Activation (Situation-Specific — Never Run Blindly):**
|
|
65
|
+
- The user must never be expected to remember or type CLI tool commands (`agent-qa setup`, `agent-qa analyze`, `verify_all.py`...).
|
|
66
|
+
- **On-Demand Principle:** Tools assigned to AI and Subagents are **NOT executed blindly or all at once**. They are activated **strictly on-demand** when the specific situation arises to save tokens and avoid execution overhead:
|
|
67
|
+
* New project / missing `PROJECT_AI_GUIDE.md` -> Autonomously run `tools/setup_project.py`.
|
|
68
|
+
* User asks to analyze / audit project -> Autonomously run `tools/analyze_project.py` and push to git.
|
|
69
|
+
* Test failure occurs in runner -> Autonomously run `tools/pinpoint_failure.py` / `auto_heal.py`.
|
|
70
|
+
* Breaking API change suspected -> Run `tools/api_drift_sentinel.py`.
|
|
71
|
+
* Parallel CI/CD runner setup needed -> Run `tools/matrix_sharder.py`.
|
|
72
|
+
* Verifying test assertion quality -> Run `tools/micro_mutator.py` (reject if Mutation Score < 80%).
|
|
73
|
+
* Before completing code tasks -> Autonomously run `tools/verify_all.py` (8 Quality Gates DoD).
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 4. MULTI-AGENT SWARM SYSTEM (AGENT ROLES)
|
|
78
|
+
|
|
79
|
+
This repository defines specialized multi-agent profiles (configured in `.agents/agents/*.md`):
|
|
80
|
+
|
|
81
|
+
1. **Lead QA Orchestrator (`orchestrator`):**
|
|
82
|
+
- Ingests requirements, bootstraps projects (`setup_project.py`), audits health (`analyze_project.py`), scans polyglot test suites (`omni_transpiler.py`), manages state (`project_state.py`), scopes tasks (`test_impact.py`), and serves MCP (`mcp_server.py`).
|
|
83
|
+
2. **Live Interaction Explorer (`live-explorer`):**
|
|
84
|
+
- Utilizes Playwright live DOM/AOM probing, applies Anti-Flake Visual Masking (`smart_visual_masker.py`), injects network mocks (`network_mock_shield.py`), enforces Action Safety Firewall (`safety_firewall.py`), queries cached XPaths (`lookup_xpath.py`), and validates canvas (`visual_diff_canvas.py`).
|
|
85
|
+
3. **Clean POM Crafter (`pom-crafter`):**
|
|
86
|
+
- Designs multi-language Page Classes, transpiles test frameworks (`omni_transpiler.py`, `universal_ir.py`), generates API mocks (`network_mock_shield.py`), checks API breaking changes (`api_drift_sentinel.py`), compiles stories to test suites (`generate_tc_from_story.py`), and maps methods (`repo_map.py`).
|
|
87
|
+
4. **Test Execution Runner (`test-runner`):**
|
|
88
|
+
- Dispatches headless suites, balances parallel CI runners (`matrix_sharder.py`), triggers CI auto-recovery (`ci_healing_hook.py`), filters verbose logs (`distill_log.py`), and isolates failing lines (`pinpoint_failure.py`).
|
|
89
|
+
5. **Failure Autopsy Analyst (`failure-analyst`):**
|
|
90
|
+
- Performs closed-loop diagnosis (`auto_heal.py`), auto-generates Jira/Markdown bug tickets with RCA (`bug_reporter.py`), executes CI self-healing & PR drafting (`ci_healing_hook.py`, `heal_pr_automator.py`), and resolves fixes from SQLite memory (`cache_resolver.py`).
|
|
91
|
+
6. **Quality Gatekeeper & Sentinel (`quality-gatekeeper`):**
|
|
92
|
+
- Enforces 8 Quality Gates (`verify_all.py`), scans fake passes (`infer_linter.py`), injects AST micro-mutants (`micro_mutator.py` requiring >= 80% mutation score), audits visual regression masks (`smart_visual_masker.py`), and checks DB leaks (`trace_data_flow.py`).
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## 5. CENTRALIZED TOOLS RUNBOOK
|
|
97
|
+
|
|
98
|
+
All quality control and audit tasks are dispatched via scripts in `tools/` (Refer to `tools/TOOLS_RUNBOOK.md`):
|
|
99
|
+
|
|
100
|
+
```bash
|
|
101
|
+
# 1. Run 8 Quality Gates Verification
|
|
102
|
+
python tools/verify_all.py
|
|
103
|
+
|
|
104
|
+
# 2. Run AST linter for fake passes and empty catches
|
|
105
|
+
python tools/infer_linter.py
|
|
106
|
+
|
|
107
|
+
# 3. Analyze code change impact
|
|
108
|
+
python tools/test_impact.py --git-diff
|
|
109
|
+
|
|
110
|
+
# 4. Filter and distill verbose CLI logs by 95%
|
|
111
|
+
python tools/distill_log.py <path_to_log>
|
|
112
|
+
|
|
113
|
+
# 5. Query zero-token error memory cache
|
|
114
|
+
python tools/cache_resolver.py query "<error_message>"
|
|
115
|
+
```
|