@teevee98/synapse-hub 4.2.4 → 4.3.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/.agents/agents/api-engineer.md +1 -1
- package/.agents/agents/failure-analyst.md +1 -1
- package/.agents/agents/live-explorer.md +1 -1
- package/.agents/agents/orchestrator.md +1 -1
- package/.agents/agents/perf-engineer.md +1 -1
- package/.agents/agents/pom-crafter.md +1 -1
- package/.agents/agents/quality-gatekeeper.md +1 -1
- package/.agents/agents/test-designer.md +1 -1
- package/.agents/agents/test-runner.md +1 -1
- package/.agents/rules/author-integrity-guard.md +1 -0
- package/.agents/rules/communication-style.md +1 -0
- package/.agents/rules/context-engineering.md +1 -0
- package/.agents/rules/cypress_rules.md +46 -0
- package/.agents/rules/git-push-protocol.md +3 -2
- package/.agents/rules/graphify.md +1 -0
- package/.agents/rules/lessons-learned.md +11 -12
- package/.agents/rules/mandatory-playwright-live.md +8 -10
- package/.agents/rules/mobile_appium_rules.md +26 -10
- package/.agents/rules/performance_testing_rules.md +26 -5
- package/.agents/rules/security_testing_rules.md +21 -15
- package/.agents/rules/skill-precedence.md +12 -5
- package/.agents/rules/stack-auto-router.md +18 -12
- package/.agents/rules/systematic-debugging.md +4 -3
- package/.agents/skills/01-web-automation/clean-pom-crafter/SKILL.md +71 -2
- package/.agents/skills/01-web-automation/e2e-testing-patterns/SKILL.md +38 -0
- package/.agents/skills/01-web-automation/katalon-cli-runner/SKILL.md +27 -0
- package/.agents/skills/01-web-automation/mobile-maestro-detox-patterns/SKILL.md +134 -0
- package/.agents/skills/01-web-automation/mobile-maestro-detox-patterns/examples/sample_flow.yaml +6 -0
- package/.agents/skills/02-test-design/rbt-manual-testing/SKILL.md +30 -1
- package/.agents/skills/02-test-design/rbt-manual-testing/references/field_validation_checklist.md +13 -1
- package/.agents/skills/02-test-design/review-spec/SKILL.md +7 -0
- package/.agents/skills/03-api-and-contracts/api-spec-to-e2e-matrix/SKILL.md +15 -0
- package/.agents/skills/06-healing-and-resilience/failure-autopsy-and-healing/SKILL.md +12 -0
- package/.agents/skills/07-data-and-state/synthetic-test-data-generator/SKILL.md +30 -0
- package/.agents/skills/09-ci-and-devops/gitlab-ci-templates/SKILL.md +123 -0
- package/.agents/skills/09-ci-and-devops/gitlab-ci-templates/examples/sample_gitlab_ci.yml +17 -0
- package/.agents/skills/09-ci-and-devops/jenkins-pipeline-templates/SKILL.md +133 -0
- package/.agents/skills/09-ci-and-devops/jenkins-pipeline-templates/examples/Jenkinsfile.example +21 -0
- package/.agents/workflows/analyze_requirement_document.md +1 -1
- package/.agents/workflows/export_testcases_excel.md +1 -1
- package/.agents/workflows/generate_combinatorial_test_data.md +1 -1
- package/.agents/workflows/generate_cross_module_test_plan.md +1 -1
- package/.agents/workflows/generate_manual_testcases_rbt.md +1 -1
- package/.agents/workflows/generate_requirements_from_website.md +1 -1
- package/.agents/workflows/generate_testcases_from_requirements.md +1 -1
- package/.agents/workflows/test-impact.md +1 -1
- package/.agents/workflows/verify.md +1 -1
- package/README.en.md +3 -3
- package/README.md +3 -3
- package/agentskills.json +2 -2
- package/docs/ARCHITECTURE.en.md +3 -3
- package/docs/ARCHITECTURE.md +2 -2
- package/docs/TOOL_CATALOG.md +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/scripts/install_global_plugin.ps1 +1 -1
- package/scripts/install_global_plugin.sh +1 -1
- package/skills_manifest.json +61 -4
- package/synapse.config.json +1 -1
- package/tools/TOOL_CATALOG.json +1 -1
- package/tools/__init__.py +1 -1
- package/tools/benchmark_swarm_context.py +1 -1
- package/tools/browser_helpers.js +2 -2
- package/tools/cli.py +4 -4
- package/tools/dashboard_generator.py +8 -8
- package/tools/mcp_docx_server.py +1 -1
- package/tools/mcp_excel_server.py +1 -1
- package/tools/mcp_server.py +1 -1
- package/tools/rules_router.py +4 -4
- package/tools/setup_project.py +91 -63
- package/tools/skill_canonical_digest.py +2 -2
- package/tools/task_memory_manager.py +2 -1
- package/tools/ui_server.py +1 -1
- package/tools/update_sentinel.py +3 -3
- package/tools/verify_all.py +1 -1
- package/tools/welcome_page.py +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: api-engineer
|
|
3
|
-
description: Enterprise API
|
|
3
|
+
description: Enterprise API testing specialist for OpenAPI matrices, schema drift, and contract verification.
|
|
4
4
|
skills:
|
|
5
5
|
- api-spec-to-e2e-matrix
|
|
6
6
|
- consumer-driven-contract-testing
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: failure-analyst
|
|
3
|
-
description:
|
|
3
|
+
description: Test failure autopsy manager diagnosing root causes from JUnit XML, logs, and screenshots.
|
|
4
4
|
skills:
|
|
5
5
|
- failure-autopsy-and-healing
|
|
6
6
|
- self-healing-locator
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: live-explorer
|
|
3
|
-
description: Real-time browser probing and
|
|
3
|
+
description: Real-time browser element probing and selector hit rate verification via Playwright.
|
|
4
4
|
skills:
|
|
5
5
|
- playwright-live-interaction
|
|
6
6
|
- self-healing-locator
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: orchestrator
|
|
3
|
-
description: Lead QA
|
|
3
|
+
description: Lead QA orchestrator directing testing workflows and coordinating specialized subagents.
|
|
4
4
|
skills:
|
|
5
5
|
- agent-orchestration-multi-agent-optimize
|
|
6
6
|
- graphify-impact-analyzer
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: perf-engineer
|
|
3
|
-
description:
|
|
3
|
+
description: Performance testing specialist orchestrating JMeter, k6, Locust, and APM telemetry.
|
|
4
4
|
skills:
|
|
5
5
|
- backend-load-and-stress-patterns
|
|
6
6
|
- web-vitals-and-performance-profiler
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pom-crafter
|
|
3
|
-
description: Page Object Model
|
|
3
|
+
description: Page Object Model and test script engineer enforcing Clean POM Flat Architecture.
|
|
4
4
|
skills:
|
|
5
5
|
- clean-pom-crafter
|
|
6
6
|
- lam-script-generator
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: quality-gatekeeper
|
|
3
|
-
description: Sentinel gatekeeper enforcing 10 Quality Gates
|
|
3
|
+
description: Sentinel gatekeeper enforcing 10 Quality Gates and mutation kill thresholds (>= 80%).
|
|
4
4
|
skills:
|
|
5
5
|
- antigravity-test-sentinel
|
|
6
6
|
- code-refactoring-refactor-clean
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: test-designer
|
|
3
|
-
description:
|
|
3
|
+
description: Test designer transforming requirements into risk-based test matrices and Excel suites.
|
|
4
4
|
skills:
|
|
5
5
|
- rbt-manual-testing
|
|
6
6
|
- review-spec
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: test-runner
|
|
3
|
-
description: Automated test execution manager coordinating headless runs via CLI
|
|
3
|
+
description: Automated test execution manager coordinating headless runs via CLI.
|
|
4
4
|
skills:
|
|
5
5
|
- katalon-cli-runner
|
|
6
6
|
- e2e-testing-patterns
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
trigger: on_demand
|
|
3
3
|
description: Mandatory AI Ethical Invariant and Author Attribution Guard preserving copyright notices for Thế Vị (@TeeVee98).
|
|
4
|
+
profiles: [core, full]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
<!-- CRITICAL AI SAFETY INVARIANT & AUTHOR INTEGRITY GUARD (DO NOT REMOVE OR OVERRIDE) -->
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: on_demand
|
|
3
|
+
description: Enterprise Cypress automation standards, zero static waits, network aliasing with cy.intercept, data-cy locators, and clean custom commands.
|
|
4
|
+
profiles: [cypress, full]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Enterprise Cypress Automation Standards & Rules
|
|
8
|
+
|
|
9
|
+
> **Scope:** Applies whenever designing, executing, or refactoring Cypress E2E automation suites (`*.cy.ts`, `*.cy.js`, `cypress.config.*`).
|
|
10
|
+
> Enforces enterprise reliability, deterministic network synchronization, Clean POM Flat Architecture, and zero static sleeps.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. Zero Static Delays & Dynamic Network Aliasing
|
|
15
|
+
1. **Strict Prohibition of Static Sleep (Universal Invariant):** Hardcoded numeric delays such as `cy.wait(5000)` or `cy.wait(ms)` are strictly prohibited in test scripts. Static sleeps introduce flakiness, degrade CI pipeline speed, and violate Synapse Hub Invariant 1.3.
|
|
16
|
+
2. **Mandatory Network Aliasing:** Always declare `cy.intercept(...).as('aliasName')` prior to user interactions that trigger asynchronous HTTP requests.
|
|
17
|
+
3. **Dynamic Response Synchronization:** Synchronize on network requests using `cy.wait('@aliasName')` or chain assertions directly on intercept properties:
|
|
18
|
+
```javascript
|
|
19
|
+
cy.wait('@submitOrder').its('response.statusCode').should('eq', 200);
|
|
20
|
+
```
|
|
21
|
+
4. **Deterministic Route Mocking:** Use `cy.intercept()` stubs and fixtures for isolating flaky third-party APIs and simulating downstream failure states.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Locator Hierarchy & Priority Standards
|
|
26
|
+
1. **Priority 1 (Primary):** Dedicated Cypress test attributes: `[data-cy="..."]` (highest resilience against styling changes).
|
|
27
|
+
2. **Priority 2:** Standard test identifiers: `[data-testid="..."]` or `[data-test="..."]`.
|
|
28
|
+
3. **Priority 3:** Semantic text matchers (`cy.contains(...)`) or accessible form labels.
|
|
29
|
+
4. **Priority 4:** Resilient, semantic CSS selectors (`button[type="submit"]`).
|
|
30
|
+
5. **Strictly Forbidden:** Fragile raw XPath selectors, automatically generated dynamic CSS classes (`.css-1a2b3c`), and brittle deep DOM traversal chains (`div > div:nth-child(2) > span`).
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 3. Clean Page Object Model (POM) & App Actions
|
|
35
|
+
1. **Clean Script Separation:** Spec files (`cypress/e2e/**/*.cy.{ts,js}`) must contain ONLY business workflow method calls on Page Classes or App Action functions, followed by assertions.
|
|
36
|
+
2. **Encapsulation:** All DOM selectors (`cy.get()`, `cy.find()`) and user interactions belong exclusively inside Page Classes extending `BasePage` (or modular App Action helpers).
|
|
37
|
+
3. **Flat Inheritance:** Keep Page Object inheritance shallow (maximum 1 level of inheritance from `BasePage`).
|
|
38
|
+
4. **Custom Commands (`Cypress.Commands.add`):** Reserve custom commands strictly for cross-cutting workflows (e.g., authentication, session state initialization, API seeding). Never wrap simple single-element getters in custom commands.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 4. Idempotent Test Data & Truth Anchor
|
|
43
|
+
1. **Dynamic Entity Prefixes:** Always randomize test entity codes with dynamic timestamps: `BasePage.uniqueCode("AUTO_CY_")` or `AUTO_CY_${Date.now()}`.
|
|
44
|
+
2. **Automated Teardown:** Every entity creation must be paired with automated cleanup (`afterEach()` hook or API cleanup) to prevent database key collisions.
|
|
45
|
+
3. **Zero Fake Passes (Truth Anchor):** Never suppress AUT application crashes or unhandled promise rejections using blanket `Cypress.on('uncaught:exception', () => false)`. Any exception suppression must be narrowly scoped to documented, benign third-party analytics scripts with exact error message matching.
|
|
46
|
+
4. **Explicit Assertions:** Every test must validate real application state using native Cypress assertions (`should('be.visible')`, `should('have.text', ...)`). Tests with zero assertions are strictly rejected by Gate 7.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
trigger:
|
|
3
|
-
description: Clean Git Push Protocol for target projects and Synapse Hub, pre-push verification gate, and zero-leakage commit rules.
|
|
2
|
+
trigger: on_demand
|
|
3
|
+
description: Clean Git Push Protocol for target projects and Synapse Hub, git commit, push, version bump, pre-push verification gate, hub_publisher release pipeline, and zero-leakage commit rules.
|
|
4
|
+
profiles: [core, full]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Clean Git Push Protocol & Repository Hygiene
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
trigger: always_on
|
|
3
3
|
description: Critical anti-patterns, past mistakes, and strict avoidance rules (capped < 40 lines).
|
|
4
|
+
profiles: [core, full]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Agent Anti-Pattern Blacklist & Failure Prevention
|
|
@@ -10,16 +11,14 @@ description: Critical anti-patterns, past mistakes, and strict avoidance rules (
|
|
|
10
11
|
|
|
11
12
|
| # | Mistake / Anti-Pattern | Root Cause | Mandatory Avoidance Rule |
|
|
12
13
|
|---|---|---|---|
|
|
13
|
-
| **1** | **XPath
|
|
14
|
-
| **2** | **GIS
|
|
15
|
-
| **3** | **`
|
|
16
|
-
| **4** | **Context
|
|
17
|
-
| **5** | **Flaky timing on CI
|
|
18
|
-
| **6** | **DB polluted with test junk** | Created entities without
|
|
19
|
-
| **7** | **
|
|
20
|
-
| **8** | **Target test
|
|
14
|
+
| **1** | **XPath parsed as method** | Regex matched `String TXT = "...("`. | In Groovy, `=` before `(` denotes variable/constant, never method. |
|
|
15
|
+
| **2** | **GIS coordinate collision** | Hardcoded coordinates `(100, 200)`. | Randomize coordinates via dynamic bounding box/offset randomizer. |
|
|
16
|
+
| **3** | **`ElementClickIntercepted`** | Clicked while backdrop overlay was fading. | Wait for overlay detachment or bypass via JS dispatch (`clickJS`). |
|
|
17
|
+
| **4** | **Context blowout** | Read monolithic 4,000+ line Page Class. | Never read large files whole; query `tools/repo_map.txt` or read 20-50 lines. |
|
|
18
|
+
| **5** | **Flaky timing on CI** | `Thread.sleep` failed under network lag. | Replace with Smart Wait: Angular `isStable()` and CDP `Network Idle 0`. |
|
|
19
|
+
| **6** | **DB polluted with test junk** | Created entities without deletion. | Every data creation test case must execute idempotent teardown cleanup. |
|
|
20
|
+
| **7** | **CLI ran on Hub instead of target** | Defaulted to CWD=Hub without checking workspaces. | **Synapse-Hub is read-only hub, never CLI target.** Identify target workspace; outputs land there. |
|
|
21
|
+
| **8** | **Target test pollution on Hub** | Committed target tests inside Hub repo. | **Synapse-Hub holds 0 business tests.** All page classes/specs reside in target workspace. |
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
- **
|
|
24
|
-
- **Negative Feedback Cache (Blind Retry Prevention):** Whenever a bug fix attempt fails during test verification, AI agents MUST immediately persist it via `agent-qa heal record-failed --error "<sig>" --patch "<failed_code>" --reason "<why_failed>"` to prevent repeating the failed patch.
|
|
25
|
-
- **Overflow policy:** Consolidate related patterns into a single generalized invariant; offload edge cases to SQLite `~/.agent_memory/global_cache.db` (0-token cold storage).
|
|
23
|
+
- **Feedback Cache:** On failed fix, persist via `agent-qa heal record-failed` to prevent repeat patches.
|
|
24
|
+
- **Overflow Policy:** Consolidate related patterns into a single invariant; offload edge cases to SQLite `~/.agent_memory/global_cache.db`.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
trigger: on_demand
|
|
3
3
|
description: Rules for Autonomous Multi-Agent Swarm, Pure Headless Playwright Live interaction (1920x1080), Web-First Assertions, and Zero-Second Auth. Activated strictly when Web Playwright or browser automation suites are mounted.
|
|
4
|
+
profiles: [playwright, full]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Mandatory Playwright Live Interaction & Swarm Protocols
|
|
@@ -8,15 +9,12 @@ description: Rules for Autonomous Multi-Agent Swarm, Pure Headless Playwright Li
|
|
|
8
9
|
> ⚠️ **Contextual Activation Scope:** This rule is activated ONLY when `playwright.config.*` exists or when running Web / Browser E2E automation. For pure API, Mobile Appium, or Performance tests, strictly adhere to their respective rules (`stack-auto-router.md`, `mobile_appium_rules.md`, `performance_testing_rules.md`) and do not apply browser session/viewport constraints.
|
|
9
10
|
|
|
10
11
|
1. **Autonomous Swarm FSM (5 Stages):**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* **`perf-engineer`:** Orchestrates JMeter, k6, Locust load profiles, real-time telemetry streaming, and APM bottleneck correlation.
|
|
18
|
-
* **`failure-analyst`:** Diagnoses crashes via logs, `Screenshots/FAILED_*.png`, and Allure reports.
|
|
19
|
-
* **`quality-gatekeeper`:** Sentinel enforcing 10 Quality Gates DoD, 100% UTF-8 No BOM, and zero bypasses.
|
|
12
|
+
Lead QA Orchestrator governs tasks via 5 sequential FSM stages:
|
|
13
|
+
- **Stage 1: Discover & Design:** `live-explorer` (DOM/AOM probe) & `test-designer` (AI-RBT matrices, validation checklists, Excel suites).
|
|
14
|
+
- **Stage 2: Craft:** `pom-crafter` (Clean POM Page Classes, `AUTO_` prefix) & `api-engineer` (OpenAPI matrices, CDC contracts, network mocks).
|
|
15
|
+
- **Stage 3: Execute:** `test-runner` (headless CLI execution), `perf-engineer` (load profiles), & `api-engineer` (contract suites).
|
|
16
|
+
- **Stage 4: Diagnose & Heal:** `failure-analyst` (crash diagnostics from logs/screenshots, surgical locator healing).
|
|
17
|
+
- **Stage 5: Gatekeep:** `quality-gatekeeper` (enforces 10 Quality Gates DoD, UTF-8 No BOM, attribution integrity, zero bypasses).
|
|
20
18
|
|
|
21
19
|
2. **Anti-Redundancy Protocol:**
|
|
22
20
|
- Single sign-on via Zero-Second Auth (`session.json` / `storageState`); never re-enter login forms.
|
|
@@ -29,7 +27,7 @@ description: Rules for Autonomous Multi-Agent Swarm, Pure Headless Playwright Li
|
|
|
29
27
|
|
|
30
28
|
4. **Native Playwright Assertions & Zero-Sleep Standard:**
|
|
31
29
|
- **Web-First Assertions Only:** Always utilize native auto-retrying matchers: `await expect(locator).toBeVisible()`, `await expect(locator).toBeEnabled()`, `await expect(locator).toHaveText(...)`.
|
|
32
|
-
- **Zero Static Sleeps (AGENTS.md Rule 1.3):** Static delays (`page.waitForTimeout`, `time.sleep`, `Thread.sleep`) are strictly prohibited in test scripts. Synchronize via locator auto-waiting or bounded `page.waitForLoadState('networkidle')
|
|
30
|
+
- **Zero Static Sleeps (AGENTS.md Rule 1.3):** Static delays (`page.waitForTimeout`, `time.sleep`, `Thread.sleep`) are strictly prohibited in test scripts. Synchronize via locator auto-waiting or bounded `page.waitForLoadState('networkidle')`.
|
|
33
31
|
- **Clean POM Locator Hierarchy:** Page Classes must prioritize semantic locators:
|
|
34
32
|
1. User-facing ARIA role (`page.getByRole(...)`)
|
|
35
33
|
2. Semantic test identifier (`page.getByTestId(...)`)
|
|
@@ -1,18 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: on_demand
|
|
3
|
+
description: Full mobile automation rules for Appium iOS & Android, Screen Object Model (SOM), locator priority, capabilities, alerts, and context switching.
|
|
4
|
+
profiles: [mobile-appium, full]
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# Mobile Automation Rules — Appium iOS & Android (Full Standard)
|
|
2
8
|
|
|
3
|
-
>
|
|
9
|
+
> Production-grade mobile automation standards for Appium supporting UIAutomator2 (Android) and XCUITest (iOS).
|
|
4
10
|
|
|
5
11
|
## 1. Screen Object Model (SOM)
|
|
6
|
-
*
|
|
7
|
-
*
|
|
12
|
+
* Encapsulate 100% of locators and screen interactions within `screens/` (maximum 1 level of inheritance from `BaseScreen`). Never write raw selectors or element locators directly inside `tests/`.
|
|
13
|
+
* Separate locators by platform when the UI tree diverges (`locators/ios/` and `locators/android/`).
|
|
8
14
|
|
|
9
15
|
## 2. Mobile Locator Hierarchy (Strict)
|
|
10
|
-
1. **Accessibility ID (
|
|
11
|
-
2. **iOS Native (
|
|
12
|
-
3. **Android Native (
|
|
13
|
-
4. **
|
|
16
|
+
1. **Accessibility ID (Priority 1 — Cross-Platform):** `~accessibilityId` (iOS `accessibilityIdentifier` / Android `content-desc`).
|
|
17
|
+
2. **iOS Native (Priority 2 for iOS):** `-ios predicate string` (e.g., `label == "Login" AND visible == 1`) or `-ios class chain`.
|
|
18
|
+
3. **Android Native (Priority 3 for Android):** `id` / `resource-id` (`new UiSelector().resourceId(...)`).
|
|
19
|
+
4. **Strictly Prohibited:** XPaths containing numeric index predicates (e.g., `//XCUIElementTypeCell[3]`, `//android.widget.TextView[2]`) and hardcoded tap coordinates `tap(x, y)`.
|
|
14
20
|
|
|
15
21
|
## 3. Stability, Alerts & Context Switching
|
|
16
|
-
* **Capabilities:**
|
|
17
|
-
* **System Alerts & Keyboard:**
|
|
18
|
-
* **Smart Scroll & WebView:**
|
|
22
|
+
* **Capabilities:** Explicitly configure `automationName`, `newCommandTimeout`, and session isolation strategies (`noReset` / `fullReset`) to guarantee test idempotency and independence.
|
|
23
|
+
* **System Alerts & Keyboard:** Proactively handle OS system permission dialogs (Location, Camera, Notification) and invoke `hideKeyboard()` before interacting with obscured elements.
|
|
24
|
+
* **Smart Scroll & WebView:** Employ dynamic scrolling with bounded termination conditions when locating off-screen elements. For Hybrid / WebView interactions, inspect `getContexts()` and switch back to `NATIVE_APP` immediately upon completion.
|
|
25
|
+
|
|
26
|
+
## 4. PII & Credential Security Policy
|
|
27
|
+
* **Zero Signing Credentials in Git:** Strictly forbid committing Android keystores, iOS signing certificates, provisioning profiles, or private keys (`.keystore`, `.jks`, `.p12`, `.mobileprovision`) to the git repository.
|
|
28
|
+
* **Environment Injection:** Inject all build credentials, signing aliases, keystore passwords, and test account secrets dynamically via environment variables (`KEYSTORE_PASSWORD`, `APP_SIGNING_KEY`) or secure secret vaults.
|
|
29
|
+
* **PII Data Masking:** Never log or capture personal identifiable information (PII) such as unmasked user phone numbers, emails, passwords, credit card numbers, or authorization tokens in test logs, screenshots, or Appium execution traces.
|
|
30
|
+
|
|
31
|
+
## 5. Katalon Studio Mobile Framework Standard
|
|
32
|
+
* **Keyword Scope:** Use `Mobile.*` keywords strictly within Page Classes (`Keywords/<namespace>/pages/`). Never execute raw `Mobile.*` calls inside test scripts (`Scripts/`).
|
|
33
|
+
* **Object Repository Structure:** Encapsulate mobile test objects under `Object Repository/Mobile/<platform>/<screen>/`.
|
|
34
|
+
* **KRE Headless Mobile Execution:** Specify `-browserType="Android"` or `-browserType="iOS"` with dynamic `-deviceId` and `-appId` passed from CI/CD environment variables.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
trigger: on_demand
|
|
3
3
|
description: Performance and load testing invariants for k6, JMeter, and Locust suites.
|
|
4
|
+
profiles: [perf, full]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Performance & Load Testing Invariants (k6 · JMeter · Locust)
|
|
@@ -19,14 +20,34 @@ description: Performance and load testing invariants for k6, JMeter, and Locust
|
|
|
19
20
|
|
|
20
21
|
---
|
|
21
22
|
|
|
22
|
-
## 2. Workload Modeling & k6
|
|
23
|
+
## 2. Workload Modeling & Multi-Tool Standards (k6 · JMeter · Locust)
|
|
24
|
+
|
|
25
|
+
### 2.1 Universal Workload Invariants
|
|
23
26
|
1. **Arrival Rate vs VU:** Use open arrival-rate executors for public traffic; use closed VU-based executors only for fixed employee portals.
|
|
24
27
|
2. **Realistic Think Time & Cache Skew:** Parameterize queries across realistic key spaces. Model user think time (1s–5s); zero think time is forbidden.
|
|
25
28
|
3. **Steady-State Evaluation:** Evaluate SLA thresholds strictly against Steady State, excluding warm-up/cool-down transients.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
|
|
30
|
+
### 2.2 k6 Script Standards
|
|
31
|
+
1. **k6 Script Structure:** `options` -> `setup()` -> default VU function (`check()`) -> `teardown()`.
|
|
32
|
+
2. **Threshold Syntax:** Use valid syntax, e.g., `'http_req_duration{expected_response:true}': ['p(95)<500']`.
|
|
33
|
+
3. **Assertion Coupling:** Always pair `check()` with `'checks': ['rate>0.99']`.
|
|
34
|
+
4. **Resource Discipline:** Set `discardResponseBodies: true` when responses are unparsed. Pass secrets via `__ENV`.
|
|
35
|
+
|
|
36
|
+
### 2.3 Apache JMeter (.jmx) Standards
|
|
37
|
+
1. **Mandatory Non-GUI Execution:** Automated test runs must execute via CLI non-GUI mode:
|
|
38
|
+
`jmeter -n -t plan.jmx -l results.jtl -e -o report/`
|
|
39
|
+
GUI mode is strictly forbidden for load generation in automated pipelines or CI/CD.
|
|
40
|
+
2. **Dynamic Parameterization:** Decouple environment hosts and concurrency via JMeter properties:
|
|
41
|
+
`${__P(host,staging.local)}` and `${__P(users,50)}`. Pass overrides via `-Jhost=... -Jusers=...`. Never hardcode static hosts or thread counts.
|
|
42
|
+
3. **Dynamic Data Prefix:** Synthetic data generation must use dynamic prefix `PERF_AUTO_` (e.g., `PERF_AUTO_${__time()}_${__threadNum}`) paired with automated teardown cleanup.
|
|
43
|
+
4. **AutoStop Trigger:** Configure an automated abort trigger (AutoStop listener plugin or JSR223 threshold assertion) to stop execution when error rate > 10% or P95 latency breaches SLA limits.
|
|
44
|
+
|
|
45
|
+
### 2.4 Locust (locustfile.py) Standards
|
|
46
|
+
1. **Headless Execution Standard:** Automated test executions must run headlessly via CLI:
|
|
47
|
+
`locust -f locustfile.py --headless -u 50 -r 5 -t 5m --csv=perf_report`
|
|
48
|
+
Mandatory headless mode with defined user count (`-u`), spawn rate (`-r`), duration (`-t`), and CSV reporting output (`--csv`). Never require the Locust web UI in automated pipelines.
|
|
49
|
+
2. **User Class Modeling:** Inherit from `HttpUser` or high-performance `FastHttpUser` (`geventhttpclient`) for HTTP workload simulation. Structure user journeys using `@task(weight)` and logical groupings via `@tag`.
|
|
50
|
+
3. **Fail-Fast Listener:** Attach an event listener via `events.quitting` or `events.request` to monitor aggregate error rate and trigger early termination when `error_rate > 0.10` (10% threshold).
|
|
30
51
|
|
|
31
52
|
---
|
|
32
53
|
|
|
@@ -1,27 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: on_demand
|
|
3
|
+
description: Mandatory 5-layer safety gate and invariants for DAST, fuzzing, and security testing enforced via PentestScopeGuard.
|
|
4
|
+
profiles: [api-security, full]
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# Security & Pentest Testing Invariants (5-Layer Safety Gate)
|
|
2
8
|
|
|
3
|
-
>
|
|
4
|
-
> **Runtime Enforcement Engine:**
|
|
9
|
+
> Mandatory enforcement rule when executing security testing, DAST, or vulnerability scanning in Synapse-Hub.
|
|
10
|
+
> **Runtime Enforcement Engine:** Layers 1 & 2 are strictly governed and enforced via `tools/pentest_scope_guard.py` (`PentestScopeGuard`).
|
|
5
11
|
|
|
6
12
|
## 1. Layer 1 — Scope & Production Blocklist (Allowlist Gate)
|
|
7
|
-
*
|
|
8
|
-
* **
|
|
9
|
-
* **
|
|
10
|
-
*
|
|
11
|
-
*
|
|
13
|
+
* All DAST/Fuzzing/Pentest scripts (Burp Suite, OWASP ZAP, Nuclei, Python) must integrate `PentestScopeGuard` (`tools/pentest_scope_guard.py`), read `TARGET_BASE_URL`, and verify that it strictly matches `ALLOWED_PENTEST_HOSTS`.
|
|
14
|
+
* **Fail-Closed / Default-Deny Mechanism:** If `ALLOWED_PENTEST_HOSTS` is empty or undefined, all active scans are terminated immediately.
|
|
15
|
+
* **Immediate Rejection:** Instantly reject execution if the target URL resolves to a Production environment (`prod`, `live`, or official domains not explicitly present in `ALLOWED_PENTEST_HOSTS`), or points to AWS Metadata (`169.254.169.254`) / unauthorized RFC1918 internal IP ranges.
|
|
16
|
+
* All HTTP redirects (301/302) must be validated via `validate_redirect` to prevent SSRF bounce attacks.
|
|
17
|
+
* Explicit confirmation via `--confirm-pentest-scope` CLI flag or `PENTEST_CONSENT_ACKNOWLEDGED=1` environment variable is mandatory prior to initiating active scans. All verification events are recorded in the audit trail `.synapse/pentest_audit.log`.
|
|
12
18
|
|
|
13
19
|
## 2. Layer 2 — Rate-Limit & Concurrency Cap
|
|
14
|
-
*
|
|
15
|
-
*
|
|
20
|
+
* Enforced via `PentestRateLimiter`: Hard limit on request dispatch rate of maximum `5–10 req/s` and maximum `3–5` concurrent threads (except for dedicated, explicitly authorized rate-limit stress tests).
|
|
21
|
+
* Set `timeout <= 10s` for every HTTP request and automatically trip the Circuit Breaker to abort the script when consecutive `5xx` or `429` responses exceed threshold limits.
|
|
16
22
|
|
|
17
23
|
## 3. Layer 3 — Non-Destructive PoC & Account Isolation
|
|
18
|
-
*
|
|
19
|
-
*
|
|
24
|
+
* Use only harmless vulnerability demonstration payloads (e.g., safe read-only SQL injection, canary strings, bounded micro-delays). Strictly prohibit data mutation/deletion payloads (e.g., unconditional `DROP`, `DELETE`, `UPDATE`) or payloads inducing Denial of Service (DoS).
|
|
25
|
+
* Cross-authorization / access-control testing (BOLA/IDOR) must strictly utilize designated test account pairs (`PENTEST_USER_A`, `PENTEST_USER_B`), never accessing or modifying real user data.
|
|
20
26
|
|
|
21
27
|
## 4. Layer 4 — Script Secret Protection & SAST Check
|
|
22
|
-
*
|
|
23
|
-
*
|
|
28
|
+
* Strictly prohibit hardcoding target Auth Tokens, Session Cookies, or API Keys in pentest scripts; inject all secrets from `.env` (guaranteed excluded in `.gitignore`).
|
|
29
|
+
* Perform complementary static security reviews (e.g., wildcard `CORS *`, missing CSP/HSTS headers, exposed credentials) across source repositories when read access is granted.
|
|
24
30
|
|
|
25
31
|
## 5. Layer 5 — Sanitized Evidence Standard
|
|
26
|
-
*
|
|
27
|
-
*
|
|
32
|
+
* Every reported vulnerability must include: Severity (Critical / High / Medium / Low), reproducible HTTP Request/Response pairs (or verifiable `curl` commands), and concrete remediation guidance.
|
|
33
|
+
* Mandatory sanitization: Mask all JWTs, session cookies, passwords, API tokens, and PII before writing logs, generating summaries, or exporting artifacts.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
trigger:
|
|
2
|
+
trigger: on_demand
|
|
3
3
|
description: Skill Resolution Precedence, Inter-Skill Coordination, and Anti-Collision Protocol enforcing Workspace-Local skills over external generic plugin skills.
|
|
4
|
+
profiles: [core, full]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Skill Resolution Precedence & Anti-Collision Protocol
|
|
@@ -14,18 +15,24 @@ description: Skill Resolution Precedence, Inter-Skill Coordination, and Anti-Col
|
|
|
14
15
|
## 2. Suppression Rules (Local Skills Override External Plugins)
|
|
15
16
|
- **POM & Test Authoring:** Use `clean-pom-crafter` / `lam-script-generator`. Suppress generic QA/test plugins. Clean POM only; no raw XPaths in test scripts.
|
|
16
17
|
- **Code Review:** Use `senior-code-review` (6 pillars against git diff). Suppress generic PR reviewers.
|
|
17
|
-
- **Locator Healing:**
|
|
18
|
+
- **Locator & Test Healing:** Governed by Section 3 below. Suppress generic locator healers.
|
|
18
19
|
- **Flaky Tests:** Use `flaky-test-sentinel-and-quarantine` (episodic SQLite memory + JUnit parsing).
|
|
19
20
|
- **Live Probing:** Use `playwright-live-interaction` (CDP idle 0 under 200ms). Suppress generic smart locators.
|
|
20
21
|
- **Accessibility:** Use `wcag-audit-patterns` (WCAG 2.2 A/AA); use Chrome DevTools MCP strictly for low-level node inspection.
|
|
21
22
|
|
|
22
|
-
## 3.
|
|
23
|
+
## 3. 1-to-1 Dispatch Routing for Healing & Resilience (06-healing-and-resilience)
|
|
24
|
+
- **Single broken selector:** Call only `self-healing-locator` (locator drift).
|
|
25
|
+
- **CI failure with artifacts:** Call only `failure-autopsy-and-healing` (`JUnit_Report.xml` or screenshot).
|
|
26
|
+
- **Multi-file defect / Test + POM refactor:** Call only `agentless-qa-repair` (cross-file flow break).
|
|
27
|
+
- **Final Verification Gate:** Prioritize `verification-before-completion` (or `antigravity-test-sentinel` in Antigravity). Do not run duplicate verification gates.
|
|
28
|
+
|
|
29
|
+
## 4. Inter-Skill Coordination
|
|
23
30
|
- **Code Authoring:** `lean-code-ladder` decides *what* to build; `surgical-coding-principles` restricts *where* to touch.
|
|
24
31
|
- **Technical Debt:** `technical-debt-harvester` tracks `shortcut:` markers; `code-refactoring-refactor-clean` executes refactoring.
|
|
25
32
|
- **API Testing:** `api-spec-to-e2e-matrix` compiles test matrices; `api-network-mocking-interception` stubs routes/chaos faults.
|
|
26
|
-
- **DoD Gatekeeper:**
|
|
33
|
+
- **DoD Gatekeeper:** Governed by Section 3 Verification Gate Priority above.
|
|
27
34
|
|
|
28
|
-
##
|
|
35
|
+
## 5. Strict Prohibitions
|
|
29
36
|
1. **Zero Generic Boilerplate:** Never generate legacy Selenium, Cucumber, or `findTestObject` code.
|
|
30
37
|
2. **Zero Raw HTML Dumps:** Extract compact AOM subtrees (< 500 tokens); never dump raw HTML trees.
|
|
31
38
|
3. **Zero Unverified Assertions:** Never complete tasks without running fresh verification via `tools/verify_all.py`.
|
|
@@ -1,24 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
trigger: always_on
|
|
3
|
+
description: Context-aware progressive stack router and token-minimal rule/skill loader.
|
|
4
|
+
profiles: [core, full]
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# Context-Aware Stack Router & Token-Minimal Loader (Boost B2)
|
|
2
8
|
|
|
3
|
-
>
|
|
9
|
+
> Added to Synapse-Hub `.agents/rules/` to minimize token consumption (~4,000 tokens/turn) and provide universal cross-project applicability.
|
|
4
10
|
|
|
5
|
-
## 1. Lazy-Loading
|
|
6
|
-
|
|
11
|
+
## 1. Lazy-Loading Rules & Skills (Load Only What the Project Needs)
|
|
12
|
+
At session initialization, AI agents **scan the workspace root to a maximum depth of 2 levels** (or execute automated routing via `python tools/rules_router.py` / `agent-qa rules-router`) and load exclusively the rule and skill subset matching the active project stack (do NOT load all 56 skills or irrelevant platform rules):
|
|
7
13
|
|
|
8
|
-
* **Web / API (`playwright.config.*`, `cypress.config.*`, `openapi.*`, `pytest`, `jest`):**
|
|
9
|
-
* **Mobile (`appium`, `*.xcodeproj`, `build.gradle`):**
|
|
10
|
-
* **Performance (`k6`, `*.jmx`, `locustfile.py`):**
|
|
11
|
-
* **Security (`burp`, `zap`, `nuclei`, pentest/DAST):**
|
|
14
|
+
* **Web / API (`playwright.config.*`, `cypress.config.*`, `openapi.*`, `pytest`, `jest`):** Load only `mandatory-playwright-live.md` (if using Playwright) + `clean-pom-crafter` + `api-network-mocking-interception`.
|
|
15
|
+
* **Mobile (`appium`, `*.xcodeproj`, `build.gradle`):** Load only `mobile_appium_rules.md` + `clean-pom-crafter` (following SOM standard). Omit `mandatory-playwright-live.md`.
|
|
16
|
+
* **Performance (`k6`, `*.jmx`, `locustfile.py`):** Load only `performance_testing_rules.md` + `backend-load-and-stress-patterns`.
|
|
17
|
+
* **Security (`burp`, `zap`, `nuclei`, pentest/DAST):** Load only `security_testing_rules.md` + `security-dast-sentinel` + `skillspector-security-guard`.
|
|
12
18
|
|
|
13
19
|
## 2. Token-Minimal Progressive Router (`tools/rules_router.py`)
|
|
14
|
-
AI
|
|
20
|
+
AI agents can trigger the automated router to inspect and obtain the minimal configuration:
|
|
15
21
|
```bash
|
|
16
22
|
python tools/rules_router.py --summary
|
|
17
23
|
# Output: [RULES-ROUTER] Stacks: playwright,git | Rules: 5 | Saved: 2,635 tokens/turn (40.5%)
|
|
18
24
|
```
|
|
19
25
|
|
|
20
26
|
## 3. Adaptive Verification (Fast Mode vs Full Gate)
|
|
21
|
-
* **Fast Mode (
|
|
22
|
-
* **Full Gate (
|
|
23
|
-
*
|
|
24
|
-
*
|
|
27
|
+
* **Fast Mode (Quick fixes / authoring 1–2 test cases):** Perform static validation (0 hard sleeps, 0 secrets, verified `assert` statements) and execute the native test runner for **strictly the modified file**, achieving `Exit Code 0`.
|
|
28
|
+
* **Full Gate (PR Finalization / Release Acceptance):**
|
|
29
|
+
* If the project contains `tools/verify_all.py` (full Synapse-Hub environment): execute `python3 tools/verify_all.py`.
|
|
30
|
+
* If the target is an external repository without `tools/verify_all.py`: execute the complete test suite using the project's native command defined in `package.json` / `pyproject.toml` / `Makefile`, followed by credential leak scanning.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
trigger:
|
|
3
|
-
description:
|
|
2
|
+
trigger: on_demand
|
|
3
|
+
description: Systematic debugging discipline, zero guesswork, root cause analysis, evidence before action, fast-track vs full-gate verification, and cognitive forcing functions.
|
|
4
|
+
profiles: [core, full]
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Systematic Debugging & Verification Discipline
|
|
@@ -21,7 +22,7 @@ description: Enforce rigorous engineering discipline, systematic debugging witho
|
|
|
21
22
|
- **Sync Knowledge & Artifacts:** Run `python3 tools/repo_map.py` if `tools/repo_map.py` exists; run `graphify update .` if `graphify-out/` exists.
|
|
22
23
|
|
|
23
24
|
## 3. Situational Tool Autonomy (Zero-Command Invariant)
|
|
24
|
-
Autonomously
|
|
25
|
+
Autonomously run tools per `AGENTS.md` §3 (verify: `verify_all.py`; heal: `pinpoint_failure.py`; context: `distill_log.py`). Zero-command protocol: never expect user to memorize CLI syntax.
|
|
25
26
|
|
|
26
27
|
## 4. Cognitive Forcing Functions (System-2 Reasoning)
|
|
27
28
|
Before outputting any test script, Universal IR, or Page Class, pass through:
|