@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.
Files changed (76) hide show
  1. package/.agents/agents/api-engineer.md +1 -1
  2. package/.agents/agents/failure-analyst.md +1 -1
  3. package/.agents/agents/live-explorer.md +1 -1
  4. package/.agents/agents/orchestrator.md +1 -1
  5. package/.agents/agents/perf-engineer.md +1 -1
  6. package/.agents/agents/pom-crafter.md +1 -1
  7. package/.agents/agents/quality-gatekeeper.md +1 -1
  8. package/.agents/agents/test-designer.md +1 -1
  9. package/.agents/agents/test-runner.md +1 -1
  10. package/.agents/rules/author-integrity-guard.md +1 -0
  11. package/.agents/rules/communication-style.md +1 -0
  12. package/.agents/rules/context-engineering.md +1 -0
  13. package/.agents/rules/cypress_rules.md +46 -0
  14. package/.agents/rules/git-push-protocol.md +3 -2
  15. package/.agents/rules/graphify.md +1 -0
  16. package/.agents/rules/lessons-learned.md +11 -12
  17. package/.agents/rules/mandatory-playwright-live.md +8 -10
  18. package/.agents/rules/mobile_appium_rules.md +26 -10
  19. package/.agents/rules/performance_testing_rules.md +26 -5
  20. package/.agents/rules/security_testing_rules.md +21 -15
  21. package/.agents/rules/skill-precedence.md +12 -5
  22. package/.agents/rules/stack-auto-router.md +18 -12
  23. package/.agents/rules/systematic-debugging.md +4 -3
  24. package/.agents/skills/01-web-automation/clean-pom-crafter/SKILL.md +71 -2
  25. package/.agents/skills/01-web-automation/e2e-testing-patterns/SKILL.md +38 -0
  26. package/.agents/skills/01-web-automation/katalon-cli-runner/SKILL.md +27 -0
  27. package/.agents/skills/01-web-automation/mobile-maestro-detox-patterns/SKILL.md +134 -0
  28. package/.agents/skills/01-web-automation/mobile-maestro-detox-patterns/examples/sample_flow.yaml +6 -0
  29. package/.agents/skills/02-test-design/rbt-manual-testing/SKILL.md +30 -1
  30. package/.agents/skills/02-test-design/rbt-manual-testing/references/field_validation_checklist.md +13 -1
  31. package/.agents/skills/02-test-design/review-spec/SKILL.md +7 -0
  32. package/.agents/skills/03-api-and-contracts/api-spec-to-e2e-matrix/SKILL.md +15 -0
  33. package/.agents/skills/06-healing-and-resilience/failure-autopsy-and-healing/SKILL.md +12 -0
  34. package/.agents/skills/07-data-and-state/synthetic-test-data-generator/SKILL.md +30 -0
  35. package/.agents/skills/09-ci-and-devops/gitlab-ci-templates/SKILL.md +123 -0
  36. package/.agents/skills/09-ci-and-devops/gitlab-ci-templates/examples/sample_gitlab_ci.yml +17 -0
  37. package/.agents/skills/09-ci-and-devops/jenkins-pipeline-templates/SKILL.md +133 -0
  38. package/.agents/skills/09-ci-and-devops/jenkins-pipeline-templates/examples/Jenkinsfile.example +21 -0
  39. package/.agents/workflows/analyze_requirement_document.md +1 -1
  40. package/.agents/workflows/export_testcases_excel.md +1 -1
  41. package/.agents/workflows/generate_combinatorial_test_data.md +1 -1
  42. package/.agents/workflows/generate_cross_module_test_plan.md +1 -1
  43. package/.agents/workflows/generate_manual_testcases_rbt.md +1 -1
  44. package/.agents/workflows/generate_requirements_from_website.md +1 -1
  45. package/.agents/workflows/generate_testcases_from_requirements.md +1 -1
  46. package/.agents/workflows/test-impact.md +1 -1
  47. package/.agents/workflows/verify.md +1 -1
  48. package/README.en.md +3 -3
  49. package/README.md +3 -3
  50. package/agentskills.json +2 -2
  51. package/docs/ARCHITECTURE.en.md +3 -3
  52. package/docs/ARCHITECTURE.md +2 -2
  53. package/docs/TOOL_CATALOG.md +1 -1
  54. package/package.json +1 -1
  55. package/plugin.json +1 -1
  56. package/scripts/install_global_plugin.ps1 +1 -1
  57. package/scripts/install_global_plugin.sh +1 -1
  58. package/skills_manifest.json +61 -4
  59. package/synapse.config.json +1 -1
  60. package/tools/TOOL_CATALOG.json +1 -1
  61. package/tools/__init__.py +1 -1
  62. package/tools/benchmark_swarm_context.py +1 -1
  63. package/tools/browser_helpers.js +2 -2
  64. package/tools/cli.py +4 -4
  65. package/tools/dashboard_generator.py +8 -8
  66. package/tools/mcp_docx_server.py +1 -1
  67. package/tools/mcp_excel_server.py +1 -1
  68. package/tools/mcp_server.py +1 -1
  69. package/tools/rules_router.py +4 -4
  70. package/tools/setup_project.py +91 -63
  71. package/tools/skill_canonical_digest.py +2 -2
  72. package/tools/task_memory_manager.py +2 -1
  73. package/tools/ui_server.py +1 -1
  74. package/tools/update_sentinel.py +3 -3
  75. package/tools/verify_all.py +1 -1
  76. package/tools/welcome_page.py +2 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: api-engineer
3
- description: Enterprise API & Microservices Testing Specialist orchestrating OpenAPI test matrices, schema drift detection, Pact contract verification, and Newman CLI execution.
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: Macro-level test run autopsy manager parsing JUnit XML reports, triage logs, and FAILED_*.png screenshots to diagnose root causes across entire failing test suites.
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 interactive live DOM exploration via Playwright MCP to inspect live web elements and verify selector hit rates under 200ms.
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 Orchestrator directing automated testing workflows, decomposing tasks, and coordinating specialized subagents.
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: Enterprise Performance & Load Testing Specialist orchestrating JMeter, k6, Locust, real-time load profiling, and APM telemetry correlation.
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 (POM) and test script engineer enforcing Clean POM Flat Architecture.
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, AST mutation thresholds (>= 80%), and static verification before task completion.
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: Enterprise Test Designer & Manual QA Specialist transforming requirements into risk-based test matrices, ambiguity audits, and 12-column Excel suites.
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 (KRE / Playwright / Gradle).
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) -->
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  trigger: always_on
3
3
  description: Human-centric communication and explanation protocol enforcing clear, concise, pragmatic language without technical jargon overload.
4
+ profiles: [core, full]
4
5
  ---
5
6
 
6
7
  # Human-Centric Communication & Lean Telemetry Protocol
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  trigger: on_demand
3
3
  description: Context engineering and token optimization protocols for large test outputs and KV-cache efficiency.
4
+ profiles: [core, full]
4
5
  ---
5
6
 
6
7
  # Context Engineering & Token Optimization Protocol
@@ -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: always_on
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: on_demand
3
3
  description: Consult the graphify knowledge graph at graphify-out/ for codebase and architecture questions (target spoke projects only).
4
+ profiles: [core, full]
4
5
  ---
5
6
 
6
7
  # Graphify Knowledge Graph Protocol
@@ -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 strings parsed as methods** | Regex captured `String TXT = "...contains(...)"`. | In Groovy, `=` before `(` denotes a variable/constant, **never** a method. |
14
- | **2** | **GIS map / geometric polygon collision** | Hardcoded fixed coordinates `(100, 200)` caused overlap. | Always randomize geometric coordinates via dynamic bounding box/offset randomizer. |
15
- | **3** | **`ElementClickInterceptedException`** | Clicked while modal/spinner backdrop overlay was fading. | Wait for overlay detachment or bypass via JS dispatch (`clickJS` / `window.__helper.clickSafe()`). |
16
- | **4** | **Context window blowout** | Read monolithic 4,000+ line Page Class directly. | **Never read large files whole.** Query `tools/repo_map.txt` or read 20-50 line ranges. |
17
- | **5** | **Flaky timing on CI/CD** | `Thread.sleep` failed under variable network lag. | Replace 100% with Smart Wait: Angular `isStable()` and CDP `Network Idle 0`. |
18
- | **6** | **DB polluted with test junk** | Created entities without executing deletion. | Every data creation test case **must** execute idempotent teardown cleanup. |
19
- | **7** | **Graphify/CLI ran on Skill Hub instead of target project** | Defaulted to `CWD = Synapse Hub` without checking Active Workspaces. | **Synapse-Hub repository = read-only hub, NEVER a CLI target.** Always identify the real target project from `Active Workspaces` (the non-hub workspace). If multiple project workspaces exist, ask the user. All outputs (graphify-out/, reports) must land inside the target project folder. |
20
- | **8** | **Target test code pollution on Hub** | Created/committed target tests inside Hub repo. | **Synapse-Hub is strictly read-only for business automation tests.** All page classes, specs, and test cases must reside in the target project workspace. Pre-commit guard rejects business code in Hub. |
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
- ### Memory Management & Consolidation Protocol:
23
- - **Max capacity:** 8 active rules in prompt hot memory.
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
- - Main AI acts as **Lead QA Orchestrator**, coordinating specialized subagents:
12
- * **`test-designer`:** Transforms requirements into risk-based test matrices (AI-RBT), 15-field validation checklists, and 12-column Excel test suites.
13
- * **`live-explorer`:** Probes live DOM/AOM via Playwright MCP (`browser_run_code_unsafe`).
14
- * **`pom-crafter`:** Generates Page Classes and test scripts (Clean POM Flat Architecture).
15
- * **`api-engineer`:** Compiles OpenAPI test matrices, verifies CDC contracts (Pact), and executes Newman CLI suites.
16
- * **`test-runner`:** Dispatches headless tests via CLI (Playwright, Katalon, Gradle, Pytest).
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')` (avoid unconditional `networkidle` on apps with continuous background polling, WebSocket, or streaming traffic).
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
- > Nâng cấp hoàn chỉnh từ bản `upcoming_extension` trong Synapse-Hub cho UIAutomator2 (Android) và XCUITest (iOS).
9
+ > Production-grade mobile automation standards for Appium supporting UIAutomator2 (Android) and XCUITest (iOS).
4
10
 
5
11
  ## 1. Screen Object Model (SOM)
6
- * Đóng gói 100% locator và thao tác màn hình vào `screens/` (tối đa 1 `BaseScreen`). Tuyệt đối không viết selector trực tiếp trong `tests/`.
7
- * Tách biệt locator theo nền tảng khi cây UI khác nhau (`locators/ios/` và `locators/android/`).
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 (Ưu tiên 1 — Đa nền tảng):** `~accessibilityId` (iOS `accessibilityIdentifier` / Android `content-desc`).
11
- 2. **iOS Native (Ưu tiên 2 cho iOS):** `-ios predicate string` (vd: `label == "Login" AND visible == 1`) hoặc `-ios class chain`.
12
- 3. **Android Native (Ưu tiên 3 cho Android):** `id` / `resource-id` (`new UiSelector().resourceId(...)`).
13
- 4. **Cấm tuyệt đối:** XPath chứa chỉ số index (`//XCUIElementTypeCell[3]`, `//android.widget.TextView[2]`) và tọa độ cứng `tap(x, y)`.
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:** Khai báo rõ `automationName`, `newCommandTimeout`, và chiến lược `noReset`/`fullReset` để đảm bảo test độc lập.
17
- * **System Alerts & Keyboard:** Chủ động xử lý hộp thoại quyền hệ điều hành (Location, Camera, Notification) và gọi `hideKeyboard()` trước khi tương tác phần tử bị che.
18
- * **Smart Scroll & WebView:** Dùng cuộn động có điều kiện dừng khi tìm phần tử ngoài màn hình. Khi thao tác Hybrid/WebView, kiểm tra `getContexts()` và quay lại `NATIVE_APP` ngay sau khi xong.
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 Script Standards
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
- 4. **k6 Script Structure:** `options` -> `setup()` -> default VU function (`check()`) -> `teardown()`.
27
- - Valid threshold syntax: `'http_req_duration{expected_response:true}': ['p(95)<500']`.
28
- - Always pair `check()` with `'checks': ['rate>0.99']`.
29
- - Set `discardResponseBodies: true` when responses are unparsed. Pass secrets via `__ENV`.
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
- > Rule chốt chặn bắt buộc khi thực thi `security-dast-sentinel` hoặc `skillspector-security-guard` trong Synapse-Hub.
4
- > **Runtime Enforcement Engine:** Toàn bộ Layer 1 & Layer 2 được kiểm soát và cưỡng chế qua `tools/pentest_scope_guard.py` (`PentestScopeGuard`).
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
- * Mọi script DAST/Fuzzing/Pentest (Burp Suite, OWASP ZAP, Nuclei, Python) bắt buộc tích hợp `PentestScopeGuard` (`tools/pentest_scope_guard.py`), đọc `TARGET_BASE_URL` và kiểm tra khớp với `ALLOWED_PENTEST_HOSTS`.
8
- * **Cơ chế Fail-Closed / Mặc định từ chối:** Nếu `ALLOWED_PENTEST_HOSTS` trống, toàn bộ quét chủ động bị ngắt.
9
- * **Từ chối thực thi ngay** nếu URL mục tiêu thuộc môi trường Production (`prod`, `live`, tên miền chính thức chưa nằm trong `ALLOWED_PENTEST_HOSTS`), hoặc trỏ tới AWS Metadata (`169.254.169.254`) / RFC1918 internal IPs trái phép.
10
- * Mọi chuyển hướng (HTTP Redirect 301/302) đều phải qua `validate_redirect` để chống SSRF bounce.
11
- * Bắt buộc có cờ xác nhận `--confirm-pentest-scope` hoặc `PENTEST_CONSENT_ACKNOWLEDGED=1` trước khi chạy quét chủ động. Mọi lần kiểm tra được ghi vào audit trail `.synapse/pentest_audit.log`.
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
- * Thực thi qua `PentestRateLimiter`: Giới hạn cứng tốc độ gửi request: tối đa `5–10 req/s` và tối đa `3–5` luồng song song (trừ bài test Rate-Limit có xác nhận riêng).
15
- * Bắt buộc đặt `timeout <= 10s` cho mọi HTTP request và tự động kích hoạt Circuit Breaker ngắt script nếu gặp `5xx` hoặc `429` liên tiếp vượt ngưỡng.
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
- * Chỉ dùng payload chứng minh lỗ hổng vô hại (SQLi đọc an toàn, canary string, time-delay nhỏ). Cấm tuyệt đối payload xóa/sửa dữ liệu (`DROP`, `DELETE`, `UPDATE` không điều kiện) hoặc gây DoS.
19
- * Kiểm thử phân quyền chéo (BOLA/IDOR) chỉ được sử dụng cặp tài khoản test cô lập (`PENTEST_USER_A`, `PENTEST_USER_B`), không chạm dữ liệu người dùng thật.
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
- * Cấm hardcode Token, Session Cookie, API Key mục tiêu trong script pentest; phải nạp từ `.env` (đã khai báo trong `.gitignore`).
23
- * Kết hợp rà soát nhanh lỗ hổng cấu hình tĩnh (`CORS *`, thiếu CSP/HSTS, lộ secret) trên mã nguồn nếu có quyền đọc repo.
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
- * Mọi lỗ hổng báo cáo phải kèm đủ: Severity (Critical/High/Medium/Low), cặp HTTP Request/Response (hoặc lệnh `curl`) tái hiện được ngay, và hướng dẫn vá lỗi.
27
- * Bắt buộc che mờ (mask) JWT, Cookie, Password, PII trước khi ghi log hoặc xuất báo cáo.
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: always_on
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:** Use `self-healing-locator` / `failure-autopsy-and-healing` (AOM diffing). Suppress generic locator healers.
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. Inter-Skill Coordination
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:** `verification-before-completion` checks command evidence; `antigravity-test-sentinel` enforces 10 Gates.
33
+ - **DoD Gatekeeper:** Governed by Section 3 Verification Gate Priority above.
27
34
 
28
- ## 4. Strict Prohibitions
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
- > Bổ sung vào `.agents/rules/` của Synapse-Hub để giảm tối đa tiêu thụ token (~4.000 tokens/turn) và dùng chung được cho mọi dự án.
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 Rule & Skill (Chỉ nạp thứ dự án cần)
6
- Khi bắt đầu phiên làm việc, AI Agent **chỉ quét thư mục gốc tối đa 2 cấp** (hoặc chạy tự động qua `python tools/rules_router.py` / `agent-qa rules-router`) và chỉ đọc đúng nhóm rule/skill khớp với dự án hiện tại (KHÔNG nạp toàn bộ 53 skill hay rule của nền tảng khác):
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`):** Chỉ nạp `mandatory-playwright-live.md` (nếu dùng Playwright) + `clean-pom-crafter` + `api-network-mocking-interception`.
9
- * **Mobile (`appium`, `*.xcodeproj`, `build.gradle`):** Chỉ nạp `mobile_appium_rules.md` + `clean-pom-crafter` (theo chuẩn SOM). Bỏ qua `mandatory-playwright-live.md`.
10
- * **Performance (`k6`, `*.jmx`, `locustfile.py`):** Chỉ nạp `performance_testing_rules.md` + `backend-load-and-stress-patterns`.
11
- * **Security (`burp`, `zap`, `nuclei`, pentest/DAST):** Chỉ nạp `security_testing_rules.md` + `security-dast-sentinel` + `skillspector-security-guard`.
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 Agent có thể kích hoạt bộ định tuyến tự động để kiểm tra và nhận cấu hình tối giản:
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 (Sửa nhanh / viết 1–2 test case):** Kiểm tra tĩnh (0 sleep cứng, 0 secret, có `assert`) và chạy lệnh test gốc cho **đúng tệp vừa sửa** đạt `Exit Code 0`.
22
- * **Full Gate (Chốt PR / Release):**
23
- * Nếu dự án có `tools/verify_all.py` (môi trường Synapse-Hub đầy đủ): chạy `python3 tools/verify_all.py`.
24
- * Nếu là dự án bên ngoài không có `tools/verify_all.py`: chạy toàn bộ test suite bằng lệnh gốc trong `package.json` / `pyproject.toml` / `Makefile` và quét rò rỉ secret.
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: always_on
3
- description: Enforce rigorous engineering discipline, systematic debugging without guesswork, and verification before completion.
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 trigger tools on-demand per `AGENTS.md` Section 3.4 (Setup: `setup_project.py`/`analyze_project.py`; Quality: `verify_all.py`/`infer_linter.py`/`micro_mutator.py`; Healing: `pinpoint_failure.py`/`auto_heal_reflexion.py`/`reversible_sandbox.py`; Context: `distill_log.py`/`safety_firewall.py`). Never expect user to memorize CLI syntax.
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: