@teevee98/synapse-hub 4.2.0 β 4.2.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/skills/01-web-automation/auth-session-and-cookie-manager/SKILL.md +46 -2
- package/.agents/skills/01-web-automation/bats-testing-patterns/SKILL.md +49 -4
- package/.agents/skills/01-web-automation/clean-pom-crafter/SKILL.md +56 -66
- package/.agents/skills/01-web-automation/e2e-testing-patterns/SKILL.md +48 -3
- package/.agents/skills/01-web-automation/katalon-cli-runner/SKILL.md +56 -11
- package/.agents/skills/01-web-automation/lam-script-generator/SKILL.md +49 -7
- package/.agents/skills/01-web-automation/mobile-appium-som/SKILL.md +54 -11
- package/.agents/skills/01-web-automation/playwright-live-interaction/SKILL.md +48 -90
- package/.agents/skills/01-web-automation/playwright-webapp-testing/SKILL.md +53 -10
- package/.agents/skills/01-web-automation/web-agent-gym-benchmarking/SKILL.md +44 -3
- package/.agents/skills/02-test-design/architecture-decision-records/SKILL.md +49 -8
- package/.agents/skills/02-test-design/gherkin-to-suite/SKILL.md +49 -8
- package/.agents/skills/02-test-design/rbt-manual-testing/SKILL.md +49 -7
- package/.agents/skills/02-test-design/review-spec/SKILL.md +46 -5
- package/.agents/skills/02-test-design/tot-exploratory-testing/SKILL.md +44 -3
- package/.agents/skills/03-api-and-contracts/api-network-mocking-interception/SKILL.md +50 -4
- package/.agents/skills/03-api-and-contracts/api-spec-to-e2e-matrix/SKILL.md +47 -6
- package/.agents/skills/03-api-and-contracts/consumer-driven-contract-testing/SKILL.md +79 -34
- package/.agents/skills/04-performance-and-load/backend-load-and-stress-patterns/SKILL.md +47 -4
- package/.agents/skills/04-performance-and-load/lean-impact-scoreboard/SKILL.md +46 -5
- package/.agents/skills/04-performance-and-load/web-vitals-and-performance-profiler/SKILL.md +44 -2
- package/.agents/skills/05-security-and-compliance/security-dast-sentinel/SKILL.md +57 -13
- package/.agents/skills/05-security-and-compliance/skillspector-security-guard/SKILL.md +45 -4
- package/.agents/skills/05-security-and-compliance/wcag-audit-patterns/SKILL.md +48 -3
- package/.agents/skills/06-healing-and-resilience/agentless-qa-repair/SKILL.md +45 -4
- package/.agents/skills/06-healing-and-resilience/antigravity-test-sentinel/SKILL.md +47 -5
- package/.agents/skills/06-healing-and-resilience/failure-autopsy-and-healing/SKILL.md +48 -7
- package/.agents/skills/06-healing-and-resilience/flaky-test-sentinel-and-quarantine/SKILL.md +54 -23
- package/.agents/skills/06-healing-and-resilience/self-healing-locator/SKILL.md +46 -5
- package/.agents/skills/06-healing-and-resilience/systematic-debugging/SKILL.md +50 -9
- package/.agents/skills/06-healing-and-resilience/test-driven-development/SKILL.md +52 -11
- package/.agents/skills/06-healing-and-resilience/verification-before-completion/SKILL.md +52 -11
- package/.agents/skills/06-healing-and-resilience/visual-regression-sentinel/SKILL.md +47 -4
- package/.agents/skills/07-data-and-state/db-state-verifier-and-seeder/SKILL.md +50 -4
- package/.agents/skills/07-data-and-state/file-and-report-validator/SKILL.md +47 -3
- package/.agents/skills/07-data-and-state/synthetic-test-data-generator/SKILL.md +52 -4
- package/.agents/skills/08-code-quality/code-refactoring-refactor-clean/SKILL.md +51 -10
- package/.agents/skills/08-code-quality/graphify-impact-analyzer/SKILL.md +78 -34
- package/.agents/skills/08-code-quality/graphify-impact-analyzer/examples/dependency_blast_radius.json +3 -4
- package/.agents/skills/08-code-quality/lean-code-ladder/SKILL.md +49 -9
- package/.agents/skills/08-code-quality/repo-quality-audit/SKILL.md +45 -5
- package/.agents/skills/08-code-quality/senior-code-review/SKILL.md +48 -6
- package/.agents/skills/08-code-quality/surgical-coding-principles/SKILL.md +49 -9
- package/.agents/skills/08-code-quality/technical-debt-harvester/SKILL.md +47 -4
- package/.agents/skills/09-ci-and-devops/github-actions-templates/SKILL.md +48 -16
- package/.agents/skills/09-ci-and-devops/github-actions-templates/examples/matrix_test_pipeline.yml +2 -1
- package/.agents/skills/10-agent-orchestration/actor-qa-swarm/SKILL.md +44 -3
- package/.agents/skills/10-agent-orchestration/agent-orchestration-multi-agent-optimize/SKILL.md +47 -6
- package/.agents/skills/10-agent-orchestration/event-stream-qa-orchestrator/SKILL.md +44 -3
- package/.agents/skills/10-agent-orchestration/persistent-planning-files/SKILL.md +52 -12
- package/.agents/skills/10-agent-orchestration/qa-memory-os/SKILL.md +45 -4
- package/.agents/skills/11-ai-and-prompting/meta-prompt-crafter/SKILL.md +51 -9
- package/.agents/skills/11-ai-and-prompting/mipro-prompt-compiler/SKILL.md +44 -3
- package/.agents/skills/11-ai-and-prompting/qa-aci-interface/SKILL.md +44 -3
- package/.agents/skills/11-ai-and-prompting/token-and-context-optimizer/SKILL.md +49 -8
- package/.cursor/rules/synapse-qa.mdc +20 -7
- package/.cursorrules +19 -5
- package/.windsurfrules +18 -3
- package/AGENTS.md +51 -65
- package/CLAUDE.md +38 -24
- package/README.en.md +2 -2
- package/README.md +2 -2
- package/agentskills.json +1 -1
- package/docs/ARCHITECTURE.en.md +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CLIENT_SUPPORT_MATRIX.md +44 -0
- package/docs/SIDE_EFFECTING_TOOLS_INVENTORY.md +233 -0
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/skills_manifest.json +1 -1
- package/synapse.config.json +1 -1
- package/templates/ai_bridges/CLAUDE.md +29 -26
- package/templates/ai_bridges/copilot-instructions.md +14 -5
- package/templates/ai_bridges/cursor_synapse_qa.mdc +16 -7
- package/templates/ai_bridges/windsurfrules +14 -3
- package/tools/TOOLS_RUNBOOK.md +1 -1
- package/tools/__init__.py +1 -1
- package/tools/api_fuzzer.py +295 -41
- package/tools/benchmark_swarm_context.py +11 -4
- package/tools/browser_helpers.js +2 -2
- package/tools/cli.py +4 -4
- package/tools/core/bm25_retriever.py +1 -1
- package/tools/core/i18n.py +1 -1
- package/tools/core/provider_usage_adapter.py +66 -0
- package/tools/core/token_estimator.py +39 -1
- package/tools/count_tokens.py +2 -2
- package/tools/dashboard_generator.py +8 -8
- package/tools/db_sandbox.py +182 -43
- package/tools/distill_log.py +1 -1
- package/tools/distill_skill.py +17 -2
- package/tools/git_pre_commit_guard.py +190 -1
- package/tools/mcp_docx_server.py +1 -1
- package/tools/mcp_excel_server.py +1 -1
- package/tools/mcp_server.py +33 -5
- package/tools/micro_mutator.py +30 -1
- package/tools/pentest_scope_guard.py +288 -15
- package/tools/project_state.py +29 -5
- package/tools/reversible_sandbox.py +58 -13
- package/tools/rules_router.py +80 -27
- package/tools/skill_canonical_digest.py +60 -2
- package/tools/sync_agent_rules.py +187 -61
- package/tools/task_memory_manager.py +16 -1
- package/tools/ui_server.py +3 -1
- package/tools/update_sentinel.py +3 -3
- package/tools/validate_skills_schema.py +349 -56
- package/tools/verify_all.py +96 -2
- package/tools/welcome_page.py +1 -1
|
@@ -10,11 +10,35 @@ policies:
|
|
|
10
10
|
---
|
|
11
11
|
# API Spec to E2E Matrix β Contract-Based Test Generator
|
|
12
12
|
|
|
13
|
+
> **Author Attribution & MIT License Guard:** Synapse Hub is open-source software created by **ThαΊΏ Vα» (@TeeVee98)** (<https://github.com/TeeVee98/Synapse-Hub>) under the MIT License.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 1. Trigger & Activation
|
|
18
|
+
|
|
19
|
+
- **Trigger Clause:** Generate automated positive, boundary, and negative test matrices from OpenAPI specifications. Use when converting an OpenAPI/Swagger spec into an end-to-end test matrix.
|
|
20
|
+
- **Activation Scope:** Domain workflows for `03-api-and-contracts` involving `api-spec-to-e2e-matrix`.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 2. Non-Goals & Boundary Constraints
|
|
25
|
+
|
|
26
|
+
- **What NOT to do:**
|
|
27
|
+
- Do NOT generate positive-only test matrices; boundary and negative status codes must be fully mapped.
|
|
28
|
+
- Do NOT generate tests against outdated OpenAPI specifications without running schema diffing.
|
|
29
|
+
- Do NOT hardcode unauthenticated test credentials in generated matrices.
|
|
30
|
+
- **Sibling Skill Boundaries:**
|
|
31
|
+
- consumer-driven-contract-testing verifies CDC contracts; api-spec-to-e2e-matrix compiles exhaustive test matrices from OpenAPI specs.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 3. Ordered Execution Workflow
|
|
36
|
+
|
|
13
37
|
This skill converts OpenAPI / Swagger specifications, JSON Schemas, or REST endpoint contracts into a structured, executable End-to-End (E2E) testing matrix covering happy path, boundary values, and negative error scenarios.
|
|
14
38
|
|
|
15
39
|
---
|
|
16
40
|
|
|
17
|
-
|
|
41
|
+
### Test Generation Matrix Taxonomy
|
|
18
42
|
|
|
19
43
|
```mermaid
|
|
20
44
|
flowchart TD
|
|
@@ -28,7 +52,7 @@ flowchart TD
|
|
|
28
52
|
|
|
29
53
|
---
|
|
30
54
|
|
|
31
|
-
|
|
55
|
+
### Boundary Value Generation Rules
|
|
32
56
|
|
|
33
57
|
For every field defined in the endpoint schema, generate targeted edge cases:
|
|
34
58
|
|
|
@@ -42,7 +66,7 @@ For every field defined in the endpoint schema, generate targeted edge cases:
|
|
|
42
66
|
|
|
43
67
|
---
|
|
44
68
|
|
|
45
|
-
|
|
69
|
+
### Negative Scenario Validation Checklist
|
|
46
70
|
|
|
47
71
|
Every negative test case must assert two distinct layers:
|
|
48
72
|
1. **API Layer Assertion:**
|
|
@@ -54,17 +78,18 @@ Every negative test case must assert two distinct layers:
|
|
|
54
78
|
|
|
55
79
|
---
|
|
56
80
|
|
|
57
|
-
|
|
81
|
+
### Automation Output Standards
|
|
58
82
|
|
|
59
83
|
- Generated test cases must adhere to the project's **Clean POM** structure.
|
|
60
84
|
- All requests should utilize dynamic test data with unique timestamp prefixes to ensure idempotency.
|
|
61
85
|
|
|
62
86
|
---
|
|
63
87
|
|
|
64
|
-
|
|
88
|
+
### Automated Execution via Tooling
|
|
65
89
|
|
|
66
90
|
Agent can automatically invoke `tools/generate_api_matrix.py` and `tools/export_postman_collection.py`:
|
|
67
91
|
|
|
92
|
+
<!-- classification: illustrative -->
|
|
68
93
|
```bash
|
|
69
94
|
# 1. Generate Markdown matrix
|
|
70
95
|
python3 tools/generate_api_matrix.py --spec path/to/openapi.json --format md -o docs/api_matrix.md
|
|
@@ -82,4 +107,20 @@ agent-qa export-postman --domain ecommerce -o ecom_col.json
|
|
|
82
107
|
# 5. Execute Newman & Enforce CI/CD Quality Gate
|
|
83
108
|
newman run postman_collection.json -e postman_env.json -d test_data.csv -r cli,json --reporter-json-export report.json
|
|
84
109
|
agent-qa analyze-newman report.json --max-failures 0 --sla-avg 500 --markdown pr_report.md
|
|
85
|
-
```
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## 4. Verification Points & DoD
|
|
115
|
+
|
|
116
|
+
1. All endpoints and HTTP methods mapped to positive, boundary, and negative test scenarios.
|
|
117
|
+
2. Validation rules (min, max, pattern, required, enum) mapped to specific assertions.
|
|
118
|
+
3. Output matrix compiles into runnable API test skeletons (Pytest / Playwright).
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
## 5. Handoff Protocol
|
|
123
|
+
|
|
124
|
+
- **Deliverables:** API test matrix documentation and runnable API test suite skeletons.
|
|
125
|
+
- **Next Subagent:** api-engineer / test-runner
|
|
126
|
+
- **Output Format:** Clean POM code, structured JSON telemetry, or validated markdown handoff.
|
|
@@ -14,15 +14,35 @@ policies:
|
|
|
14
14
|
|
|
15
15
|
---
|
|
16
16
|
|
|
17
|
-
## 1.
|
|
17
|
+
## 1. Trigger & Activation
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
- **Trigger Clause:** Use when implementing consumer-driven contract testing, verifying microservice API provider implementations, validating bidirectional contracts (BDCT), or preventing breaking API schema changes before deployment.
|
|
20
|
+
- **Activation Scope:**
|
|
21
|
+
- Microservice integration boundaries where frontend (Web/Mobile) or BFF consumers interface with backend services.
|
|
22
|
+
- Multi-repo or monorepo environments maintaining OpenAPI 3.0/3.1 specifications or Pact contract ledgers.
|
|
23
|
+
- Pre-deployment CI/CD pipelines executing compatibility promotion gates (`can-i-deploy`).
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
2.
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## 2. Non-Goals & Boundary Constraints
|
|
28
|
+
|
|
29
|
+
- **What NOT to do:**
|
|
30
|
+
- Do NOT use CDC testing as a substitute for unit tests or deep domain business logic validation.
|
|
31
|
+
- Do NOT hardcode non-hermetic, unresolvable internal domains (e.g. `https://broker.synapse-qa.internal`); use hermetic local brokers (`http://localhost:1234` or mock server instances).
|
|
32
|
+
- Do NOT use lazy ellipsis or truncation (`{ ... }`) in contract payloads; define explicit, valid request and response bodies.
|
|
33
|
+
- Do NOT execute active network requests outside `localhost` in restricted environments.
|
|
34
|
+
- **Sibling Skill Boundaries:**
|
|
35
|
+
- `api-spec-to-e2e-matrix`: Focuses on compiling comprehensive functional E2E test matrices from OpenAPI specs.
|
|
36
|
+
- `api-network-mocking-interception`: Focuses on client-side route stubbing and chaos fault injection within browser test runners.
|
|
37
|
+
- `consumer-driven-contract-testing` (this skill): Owns consumer expectations, broker publishing, provider verification, and deployment gatekeeping.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## 3. Ordered Execution Workflow
|
|
42
|
+
|
|
43
|
+
### Phase 1: Architecture & Contract Invariants
|
|
44
|
+
|
|
45
|
+
Consumer-Driven Contract (CDC) Testing shifts integration verification left by formalizing expectations between API consumers and API providers into explicit, machine-readable contracts.
|
|
26
46
|
|
|
27
47
|
```mermaid
|
|
28
48
|
flowchart LR
|
|
@@ -45,13 +65,11 @@ flowchart LR
|
|
|
45
65
|
end
|
|
46
66
|
```
|
|
47
67
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
## 2. Bi-Directional Contract Testing (BDCT) & OpenAPI Diffing
|
|
68
|
+
### Phase 2: Bi-Directional Contract Testing (BDCT) & Breaking Change Rules
|
|
51
69
|
|
|
52
|
-
|
|
70
|
+
The contract verifier executes automated schema diffing against the provider's authoritative specification:
|
|
53
71
|
|
|
54
|
-
|
|
72
|
+
#### Breaking Changes Checklist (Strictly Blocked by Gatekeeper):
|
|
55
73
|
- β **Removing an existing field** that any consumer contract depends on.
|
|
56
74
|
- β **Adding a new mandatory (`required`) field** to a request body without a default value.
|
|
57
75
|
- β **Mutating property data types** (e.g., `id: string` changed to `id: integer`, or `amount: number` to `amount: string`).
|
|
@@ -59,18 +77,16 @@ In bi-directional contract testing, consumers use mock fixtures or recorded netw
|
|
|
59
77
|
- β **Altering response status codes** (e.g., changing HTTP 201 Created to HTTP 200 OK without consumer migration).
|
|
60
78
|
- β **Tightening validation rules** (e.g., lowering `maxLength` below existing consumer field lengths).
|
|
61
79
|
|
|
62
|
-
|
|
80
|
+
#### Non-Breaking Changes (Permitted):
|
|
63
81
|
- β
Adding optional fields (`required: false`) to response bodies.
|
|
64
82
|
- β
Adding new endpoints without touching existing routes.
|
|
65
83
|
- β
Loosening validation rules (e.g., increasing `maxLength` or expanding enum options).
|
|
66
84
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
## 3. Consumer Contract Authoring Standards (Clean POM & Pact DSL)
|
|
85
|
+
### Phase 3: Consumer Contract Authoring (TypeScript / Pact DSL)
|
|
70
86
|
|
|
71
|
-
Consumer contracts must use flexible matchers rather than hardcoded static
|
|
87
|
+
Consumer contracts must use flexible matchers rather than hardcoded static values to prevent flakiness:
|
|
72
88
|
|
|
73
|
-
|
|
89
|
+
<!-- classification: illustrative -->
|
|
74
90
|
```typescript
|
|
75
91
|
import { PactV3, MatchersV3 } from '@pact-foundation/pact';
|
|
76
92
|
|
|
@@ -109,44 +125,73 @@ describe('Order Service CDC Suite', () => {
|
|
|
109
125
|
}
|
|
110
126
|
})
|
|
111
127
|
.executeTest(async (mockserver) => {
|
|
112
|
-
|
|
113
|
-
const response = await
|
|
114
|
-
|
|
128
|
+
// Native fetch client implementation with hermetic mock provider target
|
|
129
|
+
const response = await fetch(`${mockserver.url}/api/v1/orders`, {
|
|
130
|
+
method: 'POST',
|
|
131
|
+
headers: {
|
|
132
|
+
'Content-Type': 'application/json',
|
|
133
|
+
'Authorization': 'Bearer test-contract-token',
|
|
134
|
+
},
|
|
135
|
+
body: JSON.stringify({
|
|
136
|
+
customerId: 'CUST_1001',
|
|
137
|
+
items: [
|
|
138
|
+
{ sku: 'SKU_ITEM_01', quantity: 1, price: 49.99 }
|
|
139
|
+
]
|
|
140
|
+
}),
|
|
141
|
+
});
|
|
142
|
+
const data = await response.json();
|
|
143
|
+
expect(response.status).toBe(201);
|
|
144
|
+
expect(data.status).toBe('CONFIRMED');
|
|
115
145
|
});
|
|
116
146
|
});
|
|
117
147
|
});
|
|
118
148
|
```
|
|
119
149
|
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
## 4. Provider Verification Protocol
|
|
150
|
+
### Phase 4: Provider Verification Protocol
|
|
123
151
|
|
|
124
|
-
Providers verify all
|
|
152
|
+
Providers verify all registered consumer contracts against their local test instances:
|
|
125
153
|
|
|
154
|
+
<!-- classification: illustrative -->
|
|
126
155
|
```bash
|
|
127
|
-
# Verify provider implementation against contracts registered in broker
|
|
156
|
+
# Verify provider implementation against contracts registered in local mock/broker
|
|
128
157
|
pact-verifier \
|
|
129
158
|
--provider-base-url="http://localhost:8080" \
|
|
130
|
-
--pact-broker-url="
|
|
159
|
+
--pact-broker-url="http://localhost:1234" \
|
|
131
160
|
--provider="OrderService" \
|
|
132
161
|
--publish-verification-results \
|
|
133
162
|
--provider-app-version="3.2.0" \
|
|
134
163
|
--provider-version-branch="main"
|
|
135
164
|
```
|
|
136
165
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
## 5. Automated CI/CD Deployment Verification (`can-i-deploy`)
|
|
166
|
+
### Phase 5: Automated CI/CD Deployment Verification (`can-i-deploy`)
|
|
140
167
|
|
|
141
|
-
Before triggering
|
|
168
|
+
Before triggering promotion in CI/CD, the release pipeline invokes the compatibility ledger:
|
|
142
169
|
|
|
170
|
+
<!-- classification: illustrative -->
|
|
143
171
|
```bash
|
|
144
|
-
# Enforce deployment gatekeeper
|
|
172
|
+
# Enforce deployment gatekeeper against hermetic broker
|
|
145
173
|
pact-broker can-i-deploy \
|
|
146
|
-
--pact-broker-url="
|
|
174
|
+
--pact-broker-url="http://localhost:1234" \
|
|
147
175
|
--pacticipant="SynapseWebFrontend" \
|
|
148
176
|
--version="3.2.0" \
|
|
149
177
|
--to-environment="production"
|
|
150
178
|
```
|
|
151
179
|
|
|
152
|
-
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 4. Verification Points & DoD
|
|
183
|
+
|
|
184
|
+
1. **Consumer Contract Generation:** Pact contract file (`pacts/*.json`) is generated and contains valid JSON with no missing fields or unresolved `{ ... }` truncations.
|
|
185
|
+
2. **Schema Conformance:** Consumer expectation matches provider OpenAPI schema with 0 breaking change violations.
|
|
186
|
+
3. **Hermetic Target Validation:** Broker and provider URLs point to localhost or hermetic mock addresses, never unresolvable internal domains.
|
|
187
|
+
4. **Deploy Gate Check:** `can-i-deploy` verification exits with code 0 before promotion.
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## 5. Handoff Protocol
|
|
192
|
+
|
|
193
|
+
- **Deliverables:**
|
|
194
|
+
- Signed Pact contract JSON (`pacts/<consumer>-<provider>.json`).
|
|
195
|
+
- OpenAPI verification report and breaking changes diff summary.
|
|
196
|
+
- **Next Subagent:** Pass contract artifacts to `api-engineer` for provider stub generation or `quality-gatekeeper` for CI/CD promotion gate clearance.
|
|
197
|
+
- **Output Format:** Machine-readable JSON contract with SemVer compatibility tag.
|
|
@@ -10,12 +10,36 @@ policies:
|
|
|
10
10
|
---
|
|
11
11
|
# Backend Load & Performance Testing Skill
|
|
12
12
|
|
|
13
|
+
> **Author Attribution & MIT License Guard:** Synapse Hub is open-source software created by **ThαΊΏ Vα» (@TeeVee98)** (<https://github.com/TeeVee98/Synapse-Hub>) under the MIT License.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 1. Trigger & Activation
|
|
18
|
+
|
|
19
|
+
- **Trigger Clause:** Orchestrate k6, Locust, and JMeter backend load, stress, and SLA endurance test suites. Use when designing load, stress, or spike test patterns for backend systems.
|
|
20
|
+
- **Activation Scope:** Domain workflows for `04-performance-and-load` involving `backend-load-and-stress-patterns`.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 2. Non-Goals & Boundary Constraints
|
|
25
|
+
|
|
26
|
+
- **What NOT to do:**
|
|
27
|
+
- Do NOT run uncontrolled load tests against production systems without explicit authorization and scheduling.
|
|
28
|
+
- Do NOT ramp virtual users instantly without realistic warm-up stages (prevent artificial cold-start spikes).
|
|
29
|
+
- Do NOT ignore server error rates (p95 latency and HTTP 5xx errors must both be tracked).
|
|
30
|
+
- **Sibling Skill Boundaries:**
|
|
31
|
+
- web-vitals-and-performance-profiler tests frontend client rendering; backend-load-and-stress-patterns tests server throughput and saturation (k6/JMeter).
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 3. Ordered Execution Workflow
|
|
36
|
+
|
|
13
37
|
> **Target:** Model concurrent Virtual User (VU) and arrival-rate traffic, execute stress/soak test profiles, and enforce automated SLA gates (P95/P99 latency, error rate < 1.0%) to detect bottlenecks before production.
|
|
14
38
|
> **Mandatory Rule:** Adhere strictly to [performance_testing_rules.md](../../../rules/performance_testing_rules.md) for safety approvals, hard caps, and truth-anchor reporting.
|
|
15
39
|
|
|
16
40
|
---
|
|
17
41
|
|
|
18
|
-
|
|
42
|
+
### Test Archetypes & SLA Targets
|
|
19
43
|
|
|
20
44
|
| Archetype | VUs / Rate | Duration | Objective | SLA Assertion |
|
|
21
45
|
| :--- | :--- | :--- | :--- | :--- |
|
|
@@ -27,9 +51,10 @@ policies:
|
|
|
27
51
|
|
|
28
52
|
---
|
|
29
53
|
|
|
30
|
-
|
|
54
|
+
### Tooling Unified Runbook
|
|
31
55
|
|
|
32
56
|
### Option A: Apache JMeter (Headless CLI + JTL Analyzer)
|
|
57
|
+
<!-- classification: illustrative -->
|
|
33
58
|
```bash
|
|
34
59
|
# 1. Generate XML test plan from OpenAPI / Postman
|
|
35
60
|
synapse generate-jmx --spec api.json -o load_plan.jmx --vus 50 --duration 180 --sla-p95 500
|
|
@@ -44,6 +69,7 @@ synapse analyze-jtl results.jtl --sla-p95 500 --max-error-rate 1.0
|
|
|
44
69
|
### Option B: k6 Production Load Testing (with Kill-Switch & Arrival Rate)
|
|
45
70
|
Execute high-concurrency production load tests with arrival-rate executors, user pooling, and automatic kill-switches.
|
|
46
71
|
|
|
72
|
+
<!-- classification: illustrative -->
|
|
47
73
|
```bash
|
|
48
74
|
# Execute k6 test suite with environment variables
|
|
49
75
|
k6 run -e BASE_URL=https://api.staging.enterprise.local tests/perf/load_test.js
|
|
@@ -53,7 +79,7 @@ k6 run -e BASE_URL=https://api.staging.enterprise.local tests/perf/load_test.js
|
|
|
53
79
|
|
|
54
80
|
---
|
|
55
81
|
|
|
56
|
-
|
|
82
|
+
### Best Practices & Safety Invariants
|
|
57
83
|
|
|
58
84
|
- **Isolated Test Data:** Always use dynamic runtime identifiers (`PERF_AUTO_${Date.now()}`) to eliminate primary key collisions.
|
|
59
85
|
- **TearDown Hygiene:** Complement POST/creation load tests with automated teardown or ephemeral DB snapshots (`tools/db_sandbox.py`).
|
|
@@ -62,13 +88,14 @@ k6 run -e BASE_URL=https://api.staging.enterprise.local tests/perf/load_test.js
|
|
|
62
88
|
|
|
63
89
|
---
|
|
64
90
|
|
|
65
|
-
|
|
91
|
+
### Code-as-Code Load Model (Locust)
|
|
66
92
|
|
|
67
93
|
> *Borrowed and adapted from the Locust load-testing model (MIT license, locustio/locust).*
|
|
68
94
|
|
|
69
95
|
When version-controlled, reviewable load tests matter more than XML tooling,
|
|
70
96
|
generate a runnable locustfile from the same API ingestion used for JMeter:
|
|
71
97
|
|
|
98
|
+
<!-- classification: illustrative -->
|
|
72
99
|
```bash
|
|
73
100
|
synapse generate-jmx --spec swagger.json --emit-locust locustfile.py \
|
|
74
101
|
--weighted-mix "70,20,10" --think-time-min 500 --think-time-max 1500
|
|
@@ -88,3 +115,19 @@ test suite.
|
|
|
88
115
|
for protocol breadth (JDBC/Kafka/gRPC/WS) and Locust for flow logic.
|
|
89
116
|
3. **Same SLA gates** β run `agent-qa analyze-jtl` semantics on Locust stats:
|
|
90
117
|
fail CI when P95 breaches the SLA budget.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## 4. Verification Points & DoD
|
|
122
|
+
|
|
123
|
+
1. Load profile defines clear ramp-up, steady-state, and ramp-down stages.
|
|
124
|
+
2. Thresholds enforce p95/p99 latency ceilings and maximum allowable error rates (< 1%).
|
|
125
|
+
3. Performance report includes request throughput, response distribution, and failure analysis.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## 5. Handoff Protocol
|
|
130
|
+
|
|
131
|
+
- **Deliverables:** Load test scripts (`k6` / `JMeter`), threshold configurations, and performance execution reports.
|
|
132
|
+
- **Next Subagent:** perf-engineer
|
|
133
|
+
- **Output Format:** Clean POM code, structured JSON telemetry, or validated markdown handoff.
|
|
@@ -10,14 +10,39 @@ policies:
|
|
|
10
10
|
---
|
|
11
11
|
# Lean Impact Scoreboard β Verified Efficiency & Token Benchmarks
|
|
12
12
|
|
|
13
|
+
> **Author Attribution & MIT License Guard:** Synapse Hub is open-source software created by **ThαΊΏ Vα» (@TeeVee98)** (<https://github.com/TeeVee98/Synapse-Hub>) under the MIT License.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 1. Trigger & Activation
|
|
18
|
+
|
|
19
|
+
- **Trigger Clause:** Display empirical impact scoreboards (code reduction, token savings, mutation rigor). Use when reviewing lean engineering benchmarks, token throughput, or reporting quality metrics.
|
|
20
|
+
- **Activation Scope:** Domain workflows for `04-performance-and-load` involving `lean-impact-scoreboard`.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 2. Non-Goals & Boundary Constraints
|
|
25
|
+
|
|
26
|
+
- **What NOT to do:**
|
|
27
|
+
- Do NOT report unproven quantitative claims or synthetic savings percentages without empirical provenance.
|
|
28
|
+
- Do NOT sacrifice safety, error handling, or trust boundaries in the name of code conciseness.
|
|
29
|
+
- Do NOT invent per-repository savings figures without executing project analysis tools.
|
|
30
|
+
- **Sibling Skill Boundaries:**
|
|
31
|
+
- repo-quality-audit inspects repository health; lean-impact-scoreboard documents verified empirical efficiency and token benchmarks.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 3. Ordered Execution Workflow
|
|
36
|
+
|
|
13
37
|
Displays empirical metrics and benchmarks demonstrating the impact of Lean Engineering (The 7-Rung Ladder, Clean POM, and Verification-First).
|
|
14
38
|
|
|
15
39
|
---
|
|
16
40
|
|
|
17
|
-
|
|
41
|
+
### Benchmark Overview
|
|
18
42
|
|
|
19
43
|
Based on extensive agentic benchmarks (39 real-world tasks across backend, frontend, security, and test suites):
|
|
20
44
|
|
|
45
|
+
<!-- classification: illustrative -->
|
|
21
46
|
```text
|
|
22
47
|
================================================================================
|
|
23
48
|
Metric Baseline (No Skill) Lean Mode Delta
|
|
@@ -26,19 +51,19 @@ Lines of Code Generated 100% 47% -53%
|
|
|
26
51
|
Output Tokens Consumed 100% 55% -45% π
|
|
27
52
|
API Cost 100% 74% -26% π
|
|
28
53
|
Agent Execution Time 100% 59% -41% β‘
|
|
29
|
-
Risky Logic Shipped with Tests
|
|
54
|
+
Risky Logic Shipped with Tests Standard Baseline High Priority Substantial Lift π‘οΈ
|
|
30
55
|
Bug Detection Rate (Mutants) 46% 66% +20% π―
|
|
31
56
|
================================================================================
|
|
32
57
|
```
|
|
33
58
|
|
|
34
59
|
---
|
|
35
60
|
|
|
36
|
-
|
|
61
|
+
### Key Insights
|
|
37
62
|
|
|
38
63
|
1. **Less Code, Zero Loss of Safety:**
|
|
39
64
|
The goal is never code golfing. Code is concise because unnecessary abstractions, speculative wrappers, and redundant libraries are eliminated. Validation, trust boundaries, error handling, and accessibility are never compromised.
|
|
40
65
|
2. **Empirical Verification Over Guesswork:**
|
|
41
|
-
|
|
66
|
+
Empirical heuristics show that targeted assertion enforcement significantly increases coverage of critical branch logic (branches, parsers, auth, financial paths) compared to unconstrained AI generation.
|
|
42
67
|
3. **Real Per-Repo Metrics:**
|
|
43
68
|
Never hallucinate synthetic per-repo savings figures. For repository-specific health and debt measurements:
|
|
44
69
|
- Run `agent-qa debt` to review tracked shortcut debt.
|
|
@@ -46,6 +71,22 @@ Bug Detection Rate (Mutants) 46% 66% +20%
|
|
|
46
71
|
|
|
47
72
|
---
|
|
48
73
|
|
|
49
|
-
|
|
74
|
+
### Attribution
|
|
50
75
|
|
|
51
76
|
Adapted from **ponytail-gain** (https://github.com/DietrichGebert/ponytail) β MIT License, Copyright (c) 2026 DietrichGebert. Re-calibrated for Enterprise QA and Synapse Hub benchmarks.
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## 4. Verification Points & DoD
|
|
81
|
+
|
|
82
|
+
1. Scoreboard metrics cite explicit empirical benchmark datasets and methodology.
|
|
83
|
+
2. All quantitative assertions represent contextual heuristics rather than unverified absolutes.
|
|
84
|
+
3. Project-specific metrics link to actual tool execution (`agent-qa debt`, `tools/analyze_project.py`).
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## 5. Handoff Protocol
|
|
89
|
+
|
|
90
|
+
- **Deliverables:** Empirical impact scorecards, benchmark comparisons, and debt reduction reports.
|
|
91
|
+
- **Next Subagent:** orchestrator
|
|
92
|
+
- **Output Format:** Clean POM code, structured JSON telemetry, or validated markdown handoff.
|
|
@@ -10,11 +10,35 @@ policies:
|
|
|
10
10
|
---
|
|
11
11
|
# Web Vitals & Performance Profiler Skill
|
|
12
12
|
|
|
13
|
+
> **Author Attribution & MIT License Guard:** Synapse Hub is open-source software created by **ThαΊΏ Vα» (@TeeVee98)** (<https://github.com/TeeVee98/Synapse-Hub>) under the MIT License.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## 1. Trigger & Activation
|
|
18
|
+
|
|
19
|
+
- **Trigger Clause:** Measure Core Web Vitals (LCP, CLS, INP) and network waterfalls via CDP. Use when the user asks why a page is slow or needs CWV budgets enforced in CI.
|
|
20
|
+
- **Activation Scope:** Domain workflows for `04-performance-and-load` involving `web-vitals-and-performance-profiler`.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 2. Non-Goals & Boundary Constraints
|
|
25
|
+
|
|
26
|
+
- **What NOT to do:**
|
|
27
|
+
- Do NOT measure performance with browser DevTools open or under unconstrained CPU/network conditions.
|
|
28
|
+
- Do NOT report Web Vitals metrics from a single test execution; collect median values over multiple runs.
|
|
29
|
+
- Do NOT focus exclusively on page load; track runtime responsiveness and visual stability.
|
|
30
|
+
- **Sibling Skill Boundaries:**
|
|
31
|
+
- backend-load-and-stress-patterns tests server saturation; web-vitals-and-performance-profiler measures client browser Core Web Vitals (LCP, FID/INP, CLS).
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 3. Ordered Execution Workflow
|
|
36
|
+
|
|
13
37
|
> **Target:** Detect user-experience bottlenecks, layout shifts, sluggish API responses, and render-blocking assets automatically during headless test execution.
|
|
14
38
|
|
|
15
39
|
---
|
|
16
40
|
|
|
17
|
-
|
|
41
|
+
### Core Principles
|
|
18
42
|
|
|
19
43
|
1. **Performance as an Assertion:**
|
|
20
44
|
- Functional tests must double as non-functional guardrails. If a critical workflow takes > 10 seconds to load, it should fail performance budgets.
|
|
@@ -27,9 +51,10 @@ policies:
|
|
|
27
51
|
|
|
28
52
|
---
|
|
29
53
|
|
|
30
|
-
|
|
54
|
+
### Standard Playwright Performance Measurement
|
|
31
55
|
|
|
32
56
|
### Pattern A: Extracting Core Web Vitals via JavaScript Evaluation
|
|
57
|
+
<!-- classification: illustrative -->
|
|
33
58
|
```typescript
|
|
34
59
|
import { test, expect } from '@playwright/test';
|
|
35
60
|
|
|
@@ -50,6 +75,7 @@ test('audit core web vitals on dashboard', async ({ page }) => {
|
|
|
50
75
|
```
|
|
51
76
|
|
|
52
77
|
### Pattern B: Tracking Slow Network Endpoints
|
|
78
|
+
<!-- classification: illustrative -->
|
|
53
79
|
```typescript
|
|
54
80
|
test('detect slow backend microservices', async ({ page }) => {
|
|
55
81
|
const slowRequests: { url: string; duration: number }[] = [];
|
|
@@ -68,3 +94,19 @@ test('detect slow backend microservices', async ({ page }) => {
|
|
|
68
94
|
expect(slowRequests).toHaveLength(0); // Fail if any endpoint took > 2s
|
|
69
95
|
});
|
|
70
96
|
```
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 4. Verification Points & DoD
|
|
101
|
+
|
|
102
|
+
1. Performance measurements capture LCP, CLS, and INP against standard thresholds (Good, Needs Work, Poor).
|
|
103
|
+
2. Network and CPU throttling profiles simulate realistic target user conditions.
|
|
104
|
+
3. Performance telemetry logs specific DOM element culprits for LCP and CLS.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 5. Handoff Protocol
|
|
109
|
+
|
|
110
|
+
- **Deliverables:** Core Web Vitals telemetry reports, CDP trace profiles, and performance remediation recommendations.
|
|
111
|
+
- **Next Subagent:** perf-engineer
|
|
112
|
+
- **Output Format:** Clean POM code, structured JSON telemetry, or validated markdown handoff.
|