synapse-hub 2.6.0 → 2.7.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/failure-analyst.md +4 -0
- package/.agents/agents/orchestrator.md +16 -0
- package/.agents/agents/pom-crafter.md +8 -0
- package/.agents/agents/quality-gatekeeper.md +5 -0
- package/.agents/agents/test-runner.md +5 -0
- package/.agents/rules/git-push-protocol.md +1 -1
- package/.agents/rules/graphify.md +2 -0
- package/.agents/rules/mandatory-playwright-live.md +9 -9
- package/.agents/rules/mobile_appium_rules.md +8 -1
- package/.agents/skills/actor-qa-swarm/SKILL.md +77 -0
- package/.agents/skills/actor-qa-swarm/examples/broker_sharding_sample.json +12 -0
- package/.agents/skills/agentless-qa-repair/SKILL.md +69 -0
- package/.agents/skills/agentless-qa-repair/examples/healing_report_sample.json +17 -0
- package/.agents/skills/api-spec-to-e2e-matrix/SKILL.md +1 -1
- package/.agents/skills/clean-pom-crafter/SKILL.md +2 -2
- package/.agents/skills/db-state-verifier-and-seeder/SKILL.md +4 -4
- package/.agents/skills/event-stream-qa-orchestrator/SKILL.md +79 -0
- package/.agents/skills/event-stream-qa-orchestrator/examples/timeline_sample.jsonl +2 -0
- package/.agents/skills/failure-autopsy-and-healing/SKILL.md +2 -2
- package/.agents/skills/failure-autopsy-and-healing/scripts/triage_failures.sh +6 -21
- package/.agents/skills/katalon-cli-runner/SKILL.md +1 -1
- package/.agents/skills/mipro-prompt-compiler/SKILL.md +59 -0
- package/.agents/skills/mipro-prompt-compiler/examples/compiled_module_sample.json +22 -0
- package/.agents/skills/qa-aci-interface/SKILL.md +67 -0
- package/.agents/skills/qa-aci-interface/examples/surgical_edit_sample.json +12 -0
- package/.agents/skills/qa-memory-os/SKILL.md +80 -0
- package/.agents/skills/qa-memory-os/examples/archival_memory_sample.json +21 -0
- package/.agents/skills/review-spec/SKILL.md +60 -0
- package/.agents/skills/review-spec/examples/sample_spec_review.md +33 -0
- package/.agents/skills/synthetic-test-data-generator/SKILL.md +2 -2
- package/.agents/skills/tot-exploratory-testing/SKILL.md +59 -0
- package/.agents/skills/tot-exploratory-testing/examples/tot_graph_sample.json +35 -0
- package/.agents/skills/wcag-audit-patterns/SKILL.md +2 -2
- package/.agents/skills/web-agent-gym-benchmarking/SKILL.md +62 -0
- package/.agents/skills/web-agent-gym-benchmarking/examples/benchmark_report_sample.json +22 -0
- package/CLAUDE.md +1 -1
- package/README.en.md +5 -5
- package/README.md +3 -3
- package/docs/ARCHITECTURE.md +8 -8
- package/docs/research/EXTERNAL_AGENT_SKILLS_SURVEY.md +1062 -0
- package/package.json +1 -1
- package/skills_manifest.json +88 -7
- package/synapse.config.json +1 -1
- package/templates/ai_bridges/CLAUDE.md +1 -1
- package/tools/TOOLS_RUNBOOK.md +1 -1
- package/tools/__init__.py +1 -1
- package/tools/_openapi_parser.py +158 -0
- package/tools/agentless_patcher.py +417 -0
- package/tools/analyze_project.py +9 -6
- package/tools/auto_heal.py +19 -0
- package/tools/autogen_qa_broker.py +318 -0
- package/tools/browser_helpers.js +2 -2
- package/tools/browsergym_eval.py +237 -0
- package/tools/ci_healing_hook.py +1 -1
- package/tools/cli.py +3 -3
- package/tools/dashboard_generator.py +4 -4
- package/tools/db_sandbox.py +4 -0
- package/tools/heal_pr_automator.py +25 -0
- package/tools/mcp_excel_server.py +1 -1
- package/tools/mcp_server.py +1 -1
- package/tools/mipro_assertion_tuner.py +207 -0
- package/tools/pinpoint_failure.py +12 -0
- package/tools/project_state.py +4 -0
- package/tools/qa_event_stream.py +336 -0
- package/tools/reversible_sandbox.py +4 -0
- package/tools/swe_qa_aci.py +369 -0
- package/tools/sync_agent_rules.py +1 -1
- package/tools/test_memory_os.py +409 -0
- package/tools/tot_exploratory_tester.py +240 -0
- package/tools/update_sentinel.py +3 -3
- package/tools/welcome_page.py +1 -1
|
@@ -6,6 +6,7 @@ skills:
|
|
|
6
6
|
- self-healing-locator
|
|
7
7
|
- file-and-report-validator
|
|
8
8
|
- systematic-debugging
|
|
9
|
+
- agentless-qa-repair
|
|
9
10
|
tools:
|
|
10
11
|
- tools/auto_heal.py
|
|
11
12
|
- tools/auto_heal_reflexion.py
|
|
@@ -16,6 +17,9 @@ tools:
|
|
|
16
17
|
- tools/ci_healing_hook.py
|
|
17
18
|
- tools/micro_mutator.py
|
|
18
19
|
- tools/textgrad_mutation_optimizer.py
|
|
20
|
+
- tools/agentless_patcher.py
|
|
21
|
+
- tools/heuristic_locator_matcher.py
|
|
22
|
+
- tools/telemetry_correlator.py
|
|
19
23
|
---
|
|
20
24
|
|
|
21
25
|
# Failure Autopsy & Adversarial Red-Team Agent (Agent Red)
|
|
@@ -10,6 +10,11 @@ skills:
|
|
|
10
10
|
- meta-prompt-crafter
|
|
11
11
|
- token-and-context-optimizer
|
|
12
12
|
- repo-quality-audit
|
|
13
|
+
- actor-qa-swarm
|
|
14
|
+
- event-stream-qa-orchestrator
|
|
15
|
+
- qa-memory-os
|
|
16
|
+
- tot-exploratory-testing
|
|
17
|
+
- review-spec
|
|
13
18
|
tools:
|
|
14
19
|
- tools/setup_project.py
|
|
15
20
|
- tools/analyze_project.py
|
|
@@ -22,6 +27,17 @@ tools:
|
|
|
22
27
|
- tools/mcp_server.py
|
|
23
28
|
- tools/goldfish_review.py
|
|
24
29
|
- tools/interview_story.py
|
|
30
|
+
- tools/dspy_qa_signatures.py
|
|
31
|
+
- tools/autogen_qa_broker.py
|
|
32
|
+
- tools/qa_event_stream.py
|
|
33
|
+
- tools/test_memory_os.py
|
|
34
|
+
- tools/tot_exploratory_tester.py
|
|
35
|
+
- tools/watch_mode.py
|
|
36
|
+
- tools/dashboard_generator.py
|
|
37
|
+
- tools/update_sentinel.py
|
|
38
|
+
- tools/config_decoupler.py
|
|
39
|
+
- tools/check_version_sync.py
|
|
40
|
+
- tools/count_tokens.py
|
|
25
41
|
---
|
|
26
42
|
|
|
27
43
|
# Lead QA Orchestrator Agent
|
|
@@ -14,6 +14,8 @@ skills:
|
|
|
14
14
|
- gherkin-to-suite
|
|
15
15
|
- api-network-mocking-interception
|
|
16
16
|
- rbt-manual-testing
|
|
17
|
+
- mipro-prompt-compiler
|
|
18
|
+
- qa-aci-interface
|
|
17
19
|
tools:
|
|
18
20
|
- tools/generate_tc_from_story.py
|
|
19
21
|
- tools/generate_api_matrix.py
|
|
@@ -28,6 +30,12 @@ tools:
|
|
|
28
30
|
- tools/micro_mutator.py
|
|
29
31
|
- tools/skill_vault.py
|
|
30
32
|
- tools/mcp_excel_server.ps1
|
|
33
|
+
- tools/gherkin_suite.py
|
|
34
|
+
- tools/swe_qa_aci.py
|
|
35
|
+
- tools/mipro_assertion_tuner.py
|
|
36
|
+
- tools/api_fuzzer.py
|
|
37
|
+
- tools/fuzz_payloads.py
|
|
38
|
+
- tools/export_postman_collection.py
|
|
31
39
|
---
|
|
32
40
|
|
|
33
41
|
# Clean POM Crafter Agent (Agent Blue)
|
|
@@ -12,6 +12,8 @@ skills:
|
|
|
12
12
|
- skillspector-security-guard
|
|
13
13
|
- senior-code-review
|
|
14
14
|
- technical-debt-harvester
|
|
15
|
+
- lean-impact-scoreboard
|
|
16
|
+
- web-agent-gym-benchmarking
|
|
15
17
|
tools:
|
|
16
18
|
- tools/verify_all.py
|
|
17
19
|
- tools/infer_linter.py
|
|
@@ -27,6 +29,9 @@ tools:
|
|
|
27
29
|
- tools/debt_harvester.py
|
|
28
30
|
- tools/skill_collision_guard.py
|
|
29
31
|
- tools/synapse_qa_bench.py
|
|
32
|
+
- tools/skillspector.py
|
|
33
|
+
- tools/author_integrity.py
|
|
34
|
+
- tools/browsergym_eval.py
|
|
30
35
|
---
|
|
31
36
|
|
|
32
37
|
# Quality Gatekeeper & Sentinel Agent
|
|
@@ -19,6 +19,11 @@ tools:
|
|
|
19
19
|
- tools/ci_healing_hook.py
|
|
20
20
|
- tools/generate_allure_report.ps1
|
|
21
21
|
- tools/generate_test_reports.ps1
|
|
22
|
+
- tools/generate_jmx_plan.py
|
|
23
|
+
- tools/jtl_analyzer.py
|
|
24
|
+
- tools/newman_analyzer.py
|
|
25
|
+
- tools/traffic_session_converter.py
|
|
26
|
+
- tools/db_sandbox.py
|
|
22
27
|
---
|
|
23
28
|
|
|
24
29
|
# Test Execution Runner Agent
|
|
@@ -31,7 +31,7 @@ AI Agents execute the clean standard Git workflow within the target project:
|
|
|
31
31
|
### Step 1: Pre-Push Verification (DoD Gate)
|
|
32
32
|
Run the project's quality verification gate or test suite before committing:
|
|
33
33
|
```bash
|
|
34
|
-
# Example:
|
|
34
|
+
# Example: 10 Quality Gates verification or project test runner
|
|
35
35
|
python tools/verify_all.py # or npm test / npx playwright test
|
|
36
36
|
```
|
|
37
37
|
*Never push unverified code or broken tests.*
|
|
@@ -5,6 +5,8 @@ description: Consult the graphify knowledge graph at graphify-out/ for codebase
|
|
|
5
5
|
|
|
6
6
|
## graphify
|
|
7
7
|
|
|
8
|
+
> ⚠️ **Hub vs Spoke Boundary:** Graphify directives apply strictly to target client projects containing a graphify-out/ directory. Per Anti-Pattern Blacklist Rule 7, Graphify CLI commands must never be executed on the Synapse Hub workspace.
|
|
9
|
+
|
|
8
10
|
This project has a graphify knowledge graph at graphify-out/.
|
|
9
11
|
|
|
10
12
|
Rules:
|
|
@@ -8,17 +8,17 @@ description: Mandatory rules for Autonomous Multi-Agent Swarm, Pure Headless Pla
|
|
|
8
8
|
Mandatory for all test automation tasks in enterprise web test suites:
|
|
9
9
|
|
|
10
10
|
1. **Autonomous Swarm Orchestration:**
|
|
11
|
-
- Main AI acts as **Lead QA Orchestrator**, executing directions from **Project Lead / QA Director** and coordinating 5 specialized subagents:
|
|
12
|
-
* **Live Interaction Explorer:** Probe live DOM/AOM via Playwright MCP (
|
|
13
|
-
* **Automation Code Crafter:** Generate Page Classes and
|
|
14
|
-
* **Test Execution Runner:** Dispatch headless
|
|
15
|
-
* **
|
|
16
|
-
* **
|
|
11
|
+
- Main AI acts as **Lead QA Orchestrator**, executing directions from **Project Lead / QA Director** and coordinating 5 specialized subagents in a 5-Stage FSM:
|
|
12
|
+
* **Live Interaction Explorer (live-explorer):** Probe live DOM/AOM via Playwright MCP (rowser_run_code_unsafe).
|
|
13
|
+
* **Automation Code Crafter (pom-crafter):** Generate Page Classes and test scripts adhering to Clean POM Flat Architecture.
|
|
14
|
+
* **Test Execution Runner ( est-runner):** Dispatch headless automated tests via CLI (Playwright, Katalon, Gradle, Pytest).
|
|
15
|
+
* **Failure Analyst (ailure-analyst):** Diagnose test crashes via logs, FAILED_*.png, and Allure reports; coordinate healing.
|
|
16
|
+
* **Quality Gatekeeper (quality-gatekeeper):** Air-gap sentinel enforcing 10 Quality Gates DoD, 100% UTF-8 No BOM, and zero bypass logic.
|
|
17
17
|
2. **Anti-Redundancy Protocol:**
|
|
18
|
-
- Single sign-on via Zero-Second Auth (
|
|
19
|
-
- Live Explorer emits JSON Data Contract -> Code Crafter consumes to codify;
|
|
18
|
+
- Single sign-on via Zero-Second Auth (session.json); never re-enter login forms.
|
|
19
|
+
- Live Explorer emits JSON Data Contract -> Code Crafter consumes to codify; Orchestrator charts workflows. Zero redundant DOM rescanning.
|
|
20
20
|
- Targeted re-tests only on failed cases; never re-run entire batches for single-case bug fixes.
|
|
21
|
-
-
|
|
21
|
+
- Failure Analyst conducts deep RCA only on actual FAILED cases; immediately accept PASSED runs.
|
|
22
22
|
3. **Playwright Live Interaction & Mandatory Headless:**
|
|
23
23
|
- All flow discovery, live probing, and bug fixing **MUST RUN IN PURE HEADLESS MODE**.
|
|
24
24
|
- Do not open browser GUI windows to avoid stealing user desktop focus.
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
trigger: on_demand
|
|
3
|
+
description: Mobile Automation standards, Screen Object Model (SOM), and Appium driver invariants for iOS/Android suites.
|
|
4
|
+
status: upcoming_extension
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Mobile Automation Standards & Appium Rules (Enterprise Extension)
|
|
2
8
|
|
|
9
|
+
> **Status:** Upcoming extension module for Appium / Mobile SOM architectures. Activated when mobile drivers or native iOS/Android test suites are mounted.
|
|
3
10
|
> **Scope:** Applies to Mobile Automation using Appium, UIAutomator2 (Android), and XCUITest (iOS).
|
|
4
11
|
> **Objective:** Deliver resilient, independent, flake-free mobile suites supporting parallel multi-device execution.
|
|
5
12
|
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: actor-qa-swarm
|
|
3
|
+
description: "Asynchronous Actor Model message broker and matrix sharding coordinator for multi-agent test execution. Use when distributing parallel test workloads or wiring decoupled subagent event pub/sub."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Actor QA Swarm Skill — Asynchronous Actor Messaging & Matrix Sharding
|
|
7
|
+
|
|
8
|
+
> **Paradigm Attribution:** Inspired by **Microsoft AutoGen v0.4+ (AG2 Actor Framework)**.
|
|
9
|
+
> **Core Principle:** Transition from synchronous lock-step file coordination to an asynchronous Actor Model. Subagents exchange messages via non-blocking mailboxes and subscribe to test failure events in real time.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. The Actor Swarm Architecture
|
|
14
|
+
|
|
15
|
+
```mermaid
|
|
16
|
+
flowchart TD
|
|
17
|
+
Orchestrator["Orchestrator Actor"] -->|dispatch-shards| Broker["Actor QA Message Broker (tools/autogen_qa_broker.py)"]
|
|
18
|
+
Broker -->|ASSIGN_SHARD| W1["test-runner:worker_1 (Playwright Shard 1)"]
|
|
19
|
+
Broker -->|ASSIGN_SHARD| W2["test-runner:worker_2 (Playwright Shard 2)"]
|
|
20
|
+
Broker -->|ASSIGN_SHARD| W3["test-runner:worker_3 (Playwright Shard 3)"]
|
|
21
|
+
|
|
22
|
+
W1 -.->|publish(TEST_FAILED)| Broker
|
|
23
|
+
Broker -.->|notify| Analyst["failure-analyst Actor (Triage in Parallel)"]
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
1. **Decoupled Actor Mailboxes (`send-message` / `fetch-messages`):**
|
|
27
|
+
- Each QA subagent operates as an autonomous Actor with its own private mailbox.
|
|
28
|
+
- Eliminates monolithic conversational logs and prevents context contamination across subagents.
|
|
29
|
+
|
|
30
|
+
2. **Parallel Matrix Sharding (`dispatch-shards`):**
|
|
31
|
+
- Automatically splits regression test suites into $N$ balanced shards.
|
|
32
|
+
- Dispatches shards to headless Playwright worker actors running in parallel.
|
|
33
|
+
|
|
34
|
+
3. **Event-Driven Triage (`subscribe` / `publish`):**
|
|
35
|
+
- When a test runner encounters a failure, it immediately publishes `TEST_FAILED`.
|
|
36
|
+
- `failure-analyst` diagnoses the failure concurrently while other test runners continue uninterrupted.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## 2. CLI Tool Usage
|
|
41
|
+
|
|
42
|
+
Autonomous commands via `tools/autogen_qa_broker.py`:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# 1. Dispatch regression suite across 4 parallel shards
|
|
46
|
+
python tools/autogen_qa_broker.py dispatch-shards \
|
|
47
|
+
--suite-manifest tests/regression_manifest.json \
|
|
48
|
+
--shard-count 4 \
|
|
49
|
+
--worker-role "test-runner"
|
|
50
|
+
|
|
51
|
+
# 2. Subscribe failure-analyst to test failure events
|
|
52
|
+
python tools/autogen_qa_broker.py subscribe \
|
|
53
|
+
--actor "failure-analyst" \
|
|
54
|
+
--event "TEST_FAILED"
|
|
55
|
+
|
|
56
|
+
# 3. Send direct message between subagents
|
|
57
|
+
python tools/autogen_qa_broker.py send-message \
|
|
58
|
+
--from-actor "test-runner:worker_1" \
|
|
59
|
+
--to-actor "failure-analyst" \
|
|
60
|
+
--topic "TEST_FAILED" \
|
|
61
|
+
--payload '{"test_case": "TC-102", "error": "TimeoutError"}'
|
|
62
|
+
|
|
63
|
+
# 4. Fetch messages from actor mailbox
|
|
64
|
+
python tools/autogen_qa_broker.py fetch-messages \
|
|
65
|
+
--actor "failure-analyst"
|
|
66
|
+
|
|
67
|
+
# 5. Check broker health and verify zero deadlocks
|
|
68
|
+
python tools/autogen_qa_broker.py check-health
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## 3. Strict Operating Invariants
|
|
74
|
+
|
|
75
|
+
- **Deadlock Prevention:** Enforce 300s timeout ceilings on actor response waits.
|
|
76
|
+
- **Asynchronous Execution:** No subagent shall block the main thread waiting for another subagent's response.
|
|
77
|
+
- **Zero Raw Selectors:** Messages instructing code synthesis must strictly enforce Clean POM standards.
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agentless-qa-repair
|
|
3
|
+
description: "Repair broken test scripts and Page Classes using an Agentless 3-phase flow: localization, candidate synthesis, and minimal diff validation. Use when repairing test failures without multi-agent chat bloat."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Agentless QA Repair Skill — Ultra-Low-Token 3-Phase Failure Healing
|
|
7
|
+
|
|
8
|
+
> **Paradigm Attribution:** Inspired by **UIUC OpenAutoCoder Agentless**.
|
|
9
|
+
> **Core Principle:** The best fix is the smallest working diff without round-trip chat loops. Solve 80% of daily test automation defects with a single-pass 3-stage pipeline under 2,500 tokens.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. The 3-Phase Deterministic Pipeline
|
|
14
|
+
|
|
15
|
+
Rather than spawning multi-turn swarm conversations that cost 40,000–80,000 tokens per failure, `agentless-qa-repair` executes in three deterministic stages:
|
|
16
|
+
|
|
17
|
+
```mermaid
|
|
18
|
+
flowchart LR
|
|
19
|
+
Fail["Test Failure (Stacktrace)"] --> P1["Phase 1: Localization<br/>Pinpoint file & line span"]
|
|
20
|
+
P1 --> P2["Phase 2: Candidate Gen<br/>Synthesize 3 minimal patches"]
|
|
21
|
+
P2 --> P3["Phase 3: Validation & Gate<br/>Syntax + Clean POM + Diff"]
|
|
22
|
+
P3 --> Winner["Apply Shortest Winning Diff (<10s)"]
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
1. **Phase 1 (Localization):**
|
|
26
|
+
- Parses the stacktrace (Playwright, Jest, JUnit XML, or Python Traceback).
|
|
27
|
+
- Cross-references `tools/repo_map.txt` or repository structure.
|
|
28
|
+
- Restricts focus strictly to the enclosing method and 5–10 line span.
|
|
29
|
+
|
|
30
|
+
2. **Phase 2 (Parallel Candidate Synthesis):**
|
|
31
|
+
- Candidate 1: Semantic ARIA role locator (`getByRole('button', { name: '...' })`).
|
|
32
|
+
- Candidate 2: Resilient test identifier (`getByTestId('...')`).
|
|
33
|
+
- Candidate 3: Smart wait / network idle synchronization wrapper (`waitForLoadState('networkidle')`).
|
|
34
|
+
|
|
35
|
+
3. **Phase 3 (Validation & Selection):**
|
|
36
|
+
- Checks AST syntax validity (Python `ast.parse` or JS/TS/Groovy bracket balance).
|
|
37
|
+
- Enforces **Clean POM**: strictly rejects raw XPath / CSS injected into test script files.
|
|
38
|
+
- Selects the shortest valid diff that clears all checks.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## 2. CLI Tool Usage
|
|
43
|
+
|
|
44
|
+
Autonomous trigger via `tools/agentless_patcher.py`:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# End-to-end 3-stage healing
|
|
48
|
+
python tools/agentless_patcher.py heal-failure \
|
|
49
|
+
--error-log reports/failed_run.log \
|
|
50
|
+
--repo-map tools/repo_map.txt \
|
|
51
|
+
--max-candidates 3
|
|
52
|
+
|
|
53
|
+
# Localize failing line only
|
|
54
|
+
python tools/agentless_patcher.py localize-error \
|
|
55
|
+
--error-log reports/failed_run.log
|
|
56
|
+
|
|
57
|
+
# Generate patch candidates for a specific line
|
|
58
|
+
python tools/agentless_patcher.py generate-candidates \
|
|
59
|
+
--file src/pages/CustomerDirectoryPage.ts \
|
|
60
|
+
--line 48
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## 3. Strict Operating Invariants
|
|
66
|
+
|
|
67
|
+
- **Token Budget Ceiling:** Must stay under **2,500 tokens** per repair cycle.
|
|
68
|
+
- **Zero Raw Selectors in Test Scripts:** If the failing file is located in `tests/`, `Scripts/`, or matches `*.spec.ts`, the fix must redirect selector adjustments into the corresponding Page Class extending `BasePage`.
|
|
69
|
+
- **Minimal Working Diff:** Always choose the patch with the fewest altered lines that passes verification.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"status": "PASS",
|
|
3
|
+
"localization": {
|
|
4
|
+
"file": "src/pages/CustomerDirectoryPage.ts",
|
|
5
|
+
"method": "selectCustomerRow",
|
|
6
|
+
"line_span": [48, 52]
|
|
7
|
+
},
|
|
8
|
+
"candidates_evaluated": 3,
|
|
9
|
+
"validation_results": {
|
|
10
|
+
"candidate_1": "FAIL (Syntax error: unbalanced bracket)",
|
|
11
|
+
"candidate_2": "PASS (All DoD Gates cleared, diff: 2 lines)",
|
|
12
|
+
"candidate_3": "PASS (All DoD Gates cleared, diff: 6 lines)"
|
|
13
|
+
},
|
|
14
|
+
"selected_winner": "candidate_2",
|
|
15
|
+
"tokens_consumed": 1780,
|
|
16
|
+
"elapsed_seconds": 7.8
|
|
17
|
+
}
|
|
@@ -65,7 +65,7 @@ Agent can automatically invoke `tools/generate_api_matrix.py` and `tools/export_
|
|
|
65
65
|
python3 tools/generate_api_matrix.py --spec path/to/openapi.json --format md -o docs/api_matrix.md
|
|
66
66
|
|
|
67
67
|
# 2. Generate JSON matrix for programmatic ingestion
|
|
68
|
-
python3 tools/generate_api_matrix.py --spec path/to/openapi.json --format json -o
|
|
68
|
+
python3 tools/generate_api_matrix.py --spec path/to/openapi.json --format json -o reports/api_matrix.json
|
|
69
69
|
|
|
70
70
|
# 3. Export directly to Postman Collection v2.1.0 with AJV JSON Schema & DDT
|
|
71
71
|
synapse export-postman --spec path/to/openapi.json -o postman_collection.json --env-output postman_env.json --ddt-output test_data.csv
|
|
@@ -22,7 +22,7 @@ Specialized skill for creating, refactoring, and standardizing test automation s
|
|
|
22
22
|
- All `.groovy`, `.java`, `.ts`, `.tc` files must NEVER contain UTF-8 BOM bytes (`0xEF, 0xBB, 0xBF`).
|
|
23
23
|
5. **Context Window Protection (Zero-Token Economy):**
|
|
24
24
|
- 🚫 **NEVER read entire monolithic Page Class files (> 100KB) into LLM context.**
|
|
25
|
-
- Always use `
|
|
25
|
+
- Always use `python tools/lookup_xpath.py <keyword>` or line-range targeted reads (`read_file` with `StartLine`/`EndLine`) to find selectors and methods on demand.
|
|
26
26
|
|
|
27
27
|
---
|
|
28
28
|
|
|
@@ -68,7 +68,7 @@ All Page Classes **MUST** follow this strict locator hierarchy:
|
|
|
68
68
|
|
|
69
69
|
- [**Standard Clean POM Methods (`pom_patterns.groovy`)**](references/pom_patterns.groovy): Full implementation of `searchRecord`, `editRecord`, `deleteRecord`, `setCalendarDate`, `selectMultiOptions`, `verifyRecordExists`, `verifyRecordNotExists`, `jsSetInput`.
|
|
70
70
|
- [**Standard Test Script Template (`standard_test_case.groovy`)**](examples/standard_test_case.groovy): 7-step complete script template from Login -> Create -> Search -> Edit -> Delete.
|
|
71
|
-
- [**Zero-Token XPath Lookup (
|
|
71
|
+
- [**Zero-Token XPath Lookup (`tools/lookup_xpath.py`)**](tools/lookup_xpath.py): Command `python tools/lookup_xpath.py <PageClass>` returns exact locators in <200 tokens without parsing full files.
|
|
72
72
|
- [**Browser Runtime Helper (`tools/browser_helpers.js`)**](tools/browser_helpers.js): In-browser validation engine for form audits, safe clicks, and batch verification.
|
|
73
73
|
|
|
74
74
|
---
|
|
@@ -102,22 +102,22 @@ To eliminate cascading flakiness and orphan test junk in parallel CI runs, agent
|
|
|
102
102
|
### 1. Transaction Savepoint Rollback Context
|
|
103
103
|
Wrap E2E test data creation inside transactional savepoints:
|
|
104
104
|
```bash
|
|
105
|
-
|
|
105
|
+
python tools/db_sandbox.py rollback-test --db-path "path/to/db.sqlite"
|
|
106
106
|
```
|
|
107
107
|
*Guarantees zero leftover records: state is automatically rolled back to pristine baseline upon test completion.*
|
|
108
108
|
|
|
109
109
|
### 2. Ephemeral Snapshot & Instant Restore (< 0.5s)
|
|
110
110
|
```bash
|
|
111
111
|
# Before test suite runs: capture pristine database baseline
|
|
112
|
-
|
|
112
|
+
python tools/db_sandbox.py snapshot --id pristine_baseline
|
|
113
113
|
|
|
114
114
|
# After suite execution: instantly restore clean database
|
|
115
|
-
|
|
115
|
+
python tools/db_sandbox.py restore --id pristine_baseline
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
### 3. Taint Pollution Audit & Cascading Purge
|
|
119
119
|
Scan all tables for orphan records carrying test prefixes (`AUTO_`, `TEST_`) and purge them cleanly:
|
|
120
120
|
```bash
|
|
121
|
-
|
|
121
|
+
python tools/db_sandbox.py audit
|
|
122
122
|
```
|
|
123
123
|
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: event-stream-qa-orchestrator
|
|
3
|
+
description: "Immutable EventStream orchestrator recording deterministic action/observation timelines with SHA-256 hash chains and reversible checkpoint rollbacks. Use when tracing test executions and managing replayable state."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# QA Event Stream Orchestrator Skill — Immutable Audit & Replay Timeline
|
|
7
|
+
|
|
8
|
+
> **Paradigm Attribution:** Inspired by **All-Hands-AI OpenHands (EventStream & CodeAct Runtime)**.
|
|
9
|
+
> **Core Principle:** Treat automated testing sessions as an append-only, immutable stream of events. Prevent state corruption and lost context by chaining each event with cryptographic SHA-256 hashes and enabling deterministic check-pointed rollbacks.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. The EventStream Pipeline
|
|
14
|
+
|
|
15
|
+
```mermaid
|
|
16
|
+
flowchart LR
|
|
17
|
+
Init["init-stream<br/>Genesis Hash (000...0)"] --> Act["record-event<br/>ACTION_NAVIGATE / ACTION_CLICK"]
|
|
18
|
+
Act --> Obs["record-event<br/>OBSERVATION_DOM / ASSERTION"]
|
|
19
|
+
Obs --> Check["Checkpoint Anchor<br/>CHECKPOINT_PRE_SUBMIT"]
|
|
20
|
+
Check --> Verify["verify-stream<br/>Cryptographic Audit"]
|
|
21
|
+
Verify --> Rollback["rollback<br/>Rewind to Checkpoint"]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
1. **Immutable Event Logging (`record-event`):**
|
|
25
|
+
- Each event records: `index`, `session_id`, `event_type`, `actor`, `payload`, `timestamp`, `prev_hash`, and `event_hash`.
|
|
26
|
+
- Continuous SHA-256 hash chaining prevents unobserved event injection or tampering.
|
|
27
|
+
|
|
28
|
+
2. **Reversible Checkpointing (`rollback`):**
|
|
29
|
+
- In conjunction with GoEx LIFO undo stack (`tools/reversible_sandbox.py`), enables restoring the browser or data state when an unexpected crash occurs.
|
|
30
|
+
- Appends a `ROLLBACK_EXECUTED` event to the stream without destroying the audit trail.
|
|
31
|
+
|
|
32
|
+
3. **Cryptographic Verification (`verify-stream`):**
|
|
33
|
+
- Verifies hash continuity from genesis to latest event.
|
|
34
|
+
- Ensures zero missing or out-of-order events before certifying run results.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## 2. CLI Tool Usage
|
|
39
|
+
|
|
40
|
+
Autonomous commands via `tools/qa_event_stream.py`:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# 1. Initialize stream
|
|
44
|
+
python tools/qa_event_stream.py init-stream \
|
|
45
|
+
--session-id "CHECKOUT_E2E_001" \
|
|
46
|
+
--out-file .agent_memory/timeline.jsonl
|
|
47
|
+
|
|
48
|
+
# 2. Record an action event
|
|
49
|
+
python tools/qa_event_stream.py record-event \
|
|
50
|
+
--stream .agent_memory/timeline.jsonl \
|
|
51
|
+
--event-type ACTION_CLICK \
|
|
52
|
+
--actor live-explorer \
|
|
53
|
+
--payload '{"page":"CartPage","element":"checkout_button"}'
|
|
54
|
+
|
|
55
|
+
# 3. Create a state checkpoint
|
|
56
|
+
python tools/qa_event_stream.py record-event \
|
|
57
|
+
--stream .agent_memory/timeline.jsonl \
|
|
58
|
+
--event-type CHECKPOINT \
|
|
59
|
+
--actor test-runner \
|
|
60
|
+
--payload '{"cart_total": 99.99}' \
|
|
61
|
+
--checkpoint-id "PRE_CHECKOUT_FORM"
|
|
62
|
+
|
|
63
|
+
# 4. Verify stream integrity
|
|
64
|
+
python tools/qa_event_stream.py verify-stream \
|
|
65
|
+
--stream .agent_memory/timeline.jsonl
|
|
66
|
+
|
|
67
|
+
# 5. Rollback to checkpoint on test failure
|
|
68
|
+
python tools/qa_event_stream.py rollback \
|
|
69
|
+
--stream .agent_memory/timeline.jsonl \
|
|
70
|
+
--to-checkpoint "PRE_CHECKOUT_FORM"
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## 3. Strict Operating Invariants
|
|
76
|
+
|
|
77
|
+
- **Hash Chain Integrity:** All events must compute `SHA-256(prev_hash | session_id | event_type | actor | payload | timestamp)`.
|
|
78
|
+
- **Zero Log Tampering:** Never edit `timeline.jsonl` lines manually; always append via the CLI tool.
|
|
79
|
+
- **UTF-8 No BOM:** Timeline files must remain clean UTF-8 without byte-order marks.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
{"index": 0, "session_id": "SESSION_DEMO_001", "event_type": "STREAM_INIT", "actor": "system", "payload": {"initialized_at": "2026-11-04T12:00:00Z"}, "timestamp": "2026-11-04T12:00:00Z", "prev_hash": "0000000000000000000000000000000000000000000000000000000000000000", "event_hash": "1a2b3c4d5e6f"}
|
|
2
|
+
{"index": 1, "session_id": "SESSION_DEMO_001", "event_type": "ACTION_NAVIGATE", "actor": "live-explorer", "payload": {"url": "https://app.local/login"}, "timestamp": "2026-11-04T12:00:01Z", "prev_hash": "1a2b3c4d5e6f", "event_hash": "2b3c4d5e6f7a"}
|
|
@@ -21,7 +21,7 @@ flowchart LR
|
|
|
21
21
|
|
|
22
22
|
1. **Zero-Token Triage:** Pinpoint failed line and cause instantly (<50 tokens):
|
|
23
23
|
```bash
|
|
24
|
-
|
|
24
|
+
python tools/pinpoint_failure.py
|
|
25
25
|
# or bash .agents/skills/failure-autopsy-and-healing/scripts/triage_failures.sh
|
|
26
26
|
```
|
|
27
27
|
2. **Visual Autopsy:** Inspect the latest error screenshot to immediately detect: disabled buttons, missing required fields, UI overlaps, or obscuring modal backdrops.
|
|
@@ -49,7 +49,7 @@ flowchart LR
|
|
|
49
49
|
|
|
50
50
|
- [**Diagnostic & Healing Matrix (`healing_matrix.md`)**](references/healing_matrix.md): Concrete code prescriptions for disabled buttons, boundary overlaps, `ElementClickInterceptedException`, `StaleElementReferenceException`, and 4 flaky test root causes.
|
|
51
51
|
- [**Fast-Fix Triad & Runtime Helper (`tools/browser_helpers.js`)**](tools/browser_helpers.js): In-browser diagnosis engine via `window.__qa` (`audit`, `heal`, `clickSafe`, `hud`).
|
|
52
|
-
- **Automated Triage Script:** `
|
|
52
|
+
- **Automated Triage Script:** `python tools/pinpoint_failure.py` and `scripts/triage_failures.sh`.
|
|
53
53
|
|
|
54
54
|
---
|
|
55
55
|
|
|
@@ -64,28 +64,13 @@ list_recent_screenshots() {
|
|
|
64
64
|
list_recent_screenshots | while read -r epoch date time filepath; do
|
|
65
65
|
filename=$(basename "$filepath")
|
|
66
66
|
|
|
67
|
-
#
|
|
67
|
+
# Dynamic Page Class mapping via repo_map lookup or fallback to BasePage
|
|
68
68
|
suggested_page="BasePage.groovy"
|
|
69
|
-
if [[ "$filename" =~ TC-([0-9]+) ]]; then
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
suggested_page="LoginPage.groovy"
|
|
75
|
-
elif [ "$tc_num" -ge 13 ] && [ "$tc_num" -le 16 ]; then
|
|
76
|
-
suggested_page="UserAdminPage.groovy"
|
|
77
|
-
elif [ "$tc_num" -ge 17 ] && [ "$tc_num" -le 28 ]; then
|
|
78
|
-
suggested_page="CommonCategoryPage.groovy"
|
|
79
|
-
elif [ "$tc_num" -ge 29 ] && [ "$tc_num" -le 92 ]; then
|
|
80
|
-
suggested_page="IndustryCategoryPage.groovy"
|
|
81
|
-
elif [ "$tc_num" -ge 93 ] && [ "$tc_num" -le 122 ]; then
|
|
82
|
-
suggested_page="PlanningPage.groovy"
|
|
83
|
-
elif [ "$tc_num" -ge 123 ] && [ "$tc_num" -le 247 ]; then
|
|
84
|
-
suggested_page="DataMiningPage.groovy"
|
|
85
|
-
elif [ "$tc_num" -ge 248 ] && [ "$tc_num" -le 249 ]; then
|
|
86
|
-
suggested_page="ReportPage.groovy"
|
|
87
|
-
elif [ "$tc_num" -ge 250 ] && [ "$tc_num" -le 259 ]; then
|
|
88
|
-
suggested_page="TokenMgmtPage.groovy"
|
|
69
|
+
if [ -f "tools/repo_map.txt" ] && [[ "$filename" =~ TC-([0-9]+) ]]; then
|
|
70
|
+
tc_pattern="TC-${BASH_REMATCH[1]}"
|
|
71
|
+
found_page=$(grep -m 1 -i "$tc_pattern" tools/repo_map.txt | awk '{print $1}' 2>/dev/null)
|
|
72
|
+
if [ -n "$found_page" ]; then
|
|
73
|
+
suggested_page="$found_page"
|
|
89
74
|
fi
|
|
90
75
|
fi
|
|
91
76
|
|
|
@@ -72,5 +72,5 @@ katalonc -noSplash -runMode=console \
|
|
|
72
72
|
3. **Compile Allure Report:** `allure generate ./allure-results -o ./Reports/allure-report --clean`.
|
|
73
73
|
4. If failures occur, immediately dispatch failure autopsy:
|
|
74
74
|
```bash
|
|
75
|
-
|
|
75
|
+
python tools/pinpoint_failure.py
|
|
76
76
|
```
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mipro-prompt-compiler
|
|
3
|
+
description: "MIPROv2 Bayesian teleprompter optimizer and few-shot compiler tuning prompt instructions against AST mutation kill scores. Use when optimizing QA prompts or compiling few-shot assertion generators."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# MIPROv2 Prompt Compiler Skill — Bayesian Few-Shot & Assertion Optimization
|
|
7
|
+
|
|
8
|
+
> **Paradigm Attribution:** Inspired by **Stanford NLP DSPy v2 (MIPROv2 Teleprompter) & Optuna TPE**.
|
|
9
|
+
> **Core Principle:** Transition from subjective handcrafted prompting to algorithmic Bayesian compilation. Tune instruction phrasing and select the highest-leverage few-shot demonstrations to maximize AST mutant detection ($\ge 85\%$) while keeping token footprint under 800 tokens.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## 1. The MIPROv2 Compilation Pipeline
|
|
14
|
+
|
|
15
|
+
```mermaid
|
|
16
|
+
flowchart LR
|
|
17
|
+
Sig["QA Signature<br/>tools/dspy_qa_signatures.py"] --> Tuner["MIPROv2 Prompt Tuner<br/>tools/mipro_assertion_tuner.py"]
|
|
18
|
+
Vault["Few-Shot Demonstrations<br/>tools/skill_vault.py"] --> Tuner
|
|
19
|
+
Tuner --> Trials["20-25 Iterative Trials<br/>Bayesian Instruction Search"]
|
|
20
|
+
Trials --> Eval["Objective Function<br/>micro_mutator.py (Kill Rate >= 85%)"]
|
|
21
|
+
Eval --> Export["Compiled Prompt Module<br/>compiled/optimized_module.json"]
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
1. **Multi-Prompt Instruction Search:**
|
|
25
|
+
- Explores multiple candidate instruction phrasings (defensive assertions, state verification, boundary checks).
|
|
26
|
+
- Dynamically selects optimal subsets of few-shot demonstrations from `skill_vault.db`.
|
|
27
|
+
|
|
28
|
+
2. **AST Mutation Objective Function:**
|
|
29
|
+
- Instead of subjective human preference, prompts are evaluated against real syntactic AST faults generated by `tools/micro_mutator.py`.
|
|
30
|
+
- Rejects prompt configurations with mutant kill rates below 85%.
|
|
31
|
+
|
|
32
|
+
3. **Compiled Module Artifact:**
|
|
33
|
+
- Produces a frozen, deterministic JSON specification ready for deployment in production AI subagents.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 2. CLI Tool Usage
|
|
38
|
+
|
|
39
|
+
Autonomous commands via `tools/mipro_assertion_tuner.py`:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# 1. Compile and optimize assertion generation prompt
|
|
43
|
+
python tools/mipro_assertion_tuner.py compile-module \
|
|
44
|
+
--signature "AssertionGenerator" \
|
|
45
|
+
--trials 20 \
|
|
46
|
+
--out-module compiled/optimized_assertion_gen.json
|
|
47
|
+
|
|
48
|
+
# 2. Evaluate compiled prompt module against testset
|
|
49
|
+
python tools/mipro_assertion_tuner.py evaluate \
|
|
50
|
+
--module compiled/optimized_assertion_gen.json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## 3. Strict Operating Invariants
|
|
56
|
+
|
|
57
|
+
- **Mutation Score Hard Floor:** Prompts must achieve a minimum mutant kill rate of **85%**.
|
|
58
|
+
- **Token Ceiling:** Compiled prompts must not exceed **800 tokens**.
|
|
59
|
+
- **No Handcrafted Drift:** Do not manually edit compiled JSON modules; re-run `compile-module` when requirements evolve.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"status": "PASS",
|
|
3
|
+
"module": "AssertionGenerator",
|
|
4
|
+
"optimization_trials": 20,
|
|
5
|
+
"best_trial_id": 14,
|
|
6
|
+
"baseline_mutation_score": 0.68,
|
|
7
|
+
"optimized_mutation_score": 0.895,
|
|
8
|
+
"estimated_token_footprint": 245,
|
|
9
|
+
"token_reduction_percent": 69.4,
|
|
10
|
+
"compiled_prompt": {
|
|
11
|
+
"instruction": "Produce strict web-first assertions avoiding tautologies, with dynamic wait and payload integrity checks.",
|
|
12
|
+
"demonstrations": [
|
|
13
|
+
{
|
|
14
|
+
"id": "demo_1",
|
|
15
|
+
"action": "submitOrder",
|
|
16
|
+
"assertion": "await expect(this.confirmationModal).toBeVisible();\nawait expect(this.orderId).not.toBeEmpty();"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"signature": "AssertionGenerator"
|
|
20
|
+
},
|
|
21
|
+
"elapsed_seconds": 0.12
|
|
22
|
+
}
|