Skip to content

Commit 53290e9

Browse files
authored
Merge pull request #7004 from KeeperCommunity/feat/AiChat
Add maestro MCP server configuration, update open-spec specs for maestro
2 parents e2d96c1 + 5f8869f commit 53290e9

3 files changed

Lines changed: 54 additions & 3 deletions

File tree

.vscode/mcp.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"servers": {
3+
"maestro": {
4+
"type": "stdio",
5+
"command": "maestro",
6+
"args": ["mcp"]
7+
}
8+
}
9+
}

flows/README.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,41 @@ maestro test flows/addwallet.yaml
7373
maestro test --verbose flows/refreshwallet.yaml
7474
```
7575

76+
### 5. Use Maestro MCP server in VS Code
77+
78+
This workspace includes MCP server config in `.vscode/mcp.json`.
79+
80+
Configured server:
81+
- server name: `maestro`
82+
- type: `stdio`
83+
- command: `maestro`
84+
- args: `["mcp"]`
85+
86+
MCP usage workflow in chat:
87+
88+
1. Ask the agent to list devices.
89+
2. Ask the agent to inspect the current screen.
90+
3. Ask the agent to run one flow and report failures.
91+
4. Ask the agent to update selectors/assertions and re-run.
92+
93+
Example prompts:
94+
- "List Maestro devices and inspect the app screen."
95+
- "Run flows/dustSanity.yaml and summarize failures."
96+
- "Update flows/dustSanity.yaml selectors for the current UI and run again."
97+
98+
Optional cloud execution with MCP:
99+
100+
When local devices are unavailable, use MCP cloud tools:
101+
- `list_cloud_devices`
102+
- `run_on_cloud`
103+
- `get_cloud_run_status`
104+
105+
Authenticate first with:
106+
107+
```bash
108+
maestro login
109+
```
110+
76111
## Folder Structure
77112

78113
```text
@@ -125,7 +160,6 @@ Run add wallet flow:
125160
maestro test flows/addwallet.yaml
126161
```
127162

128-
129163
## Notes
130164

131165
- If tests fail due to timing, retry with `--verbose` and inspect the exact step that failed.

openspec/config.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ context: |
1515
- Bitcoin/Crypto: bitcoinjs-lib, bip39, bip21, coinselect, secp256k1
1616
- Hardware Protocols: cktap-protocol-react-native (TAPSIGNER/SATSCARD), libportal-react-native
1717
- Networking: axios, electrum-client (Electrum node connectivity)
18-
- Testing: Jest + @testing-library/react-native; native modules mocked in __mocks__/
18+
- Testing: Jest + @testing-library/react-native; Maestro E2E flows in flows/; native modules mocked in __mocks__/
1919
- CI/CD: Fastlane (iOS + Android), App Center pre-build hooks
2020
- Patching: patch-package for upstream dependency fixes (patches/)
2121
@@ -32,6 +32,7 @@ context: |
3232
- src/screens/ — Feature-based screen directories (Vault, WalletDetails, Send, Receive, Settings, etc.)
3333
- src/services/ — External service integrations (Electrum, NFC, QR, Wallets)
3434
- src/store/ — Redux store: slices/, sagas/, actions/, migrations.ts, store.ts
35+
- flows/ — Maestro E2E YAML flows for critical user journeys and regressions
3536
3637
## Domain Knowledge
3738
- Wallet types: single-sig Hot Wallets and multi-sig Vaults (2-of-3, 3-of-5, etc.)
@@ -42,6 +43,7 @@ context: |
4243
- Backup: BHR (Bitcoin Heritage Recovery) encrypted cloud + manual seed backup
4344
- Node connectivity: user-configurable Electrum server (mainnet/testnet)
4445
- Subscription tiers gating advanced features (Hodler, Diamond Hands, etc.)
46+
- E2E quality bar: user-facing flow changes should be validated with Maestro locally or via Maestro MCP
4547
4648
## Design System
4749
The canonical UI design system is defined in `DESIGN.md` at the repo root.
@@ -63,6 +65,8 @@ context: |
6365
- All Bitcoin amounts internally in satoshis (number); display formatting in utility helpers
6466
- Network (mainnet/testnet/signet) flows through a global app-level context
6567
- Use Given/When/Then format for acceptance scenarios
68+
- New UI screens and reusable components should include stable `testID` props for automation and Maestro regression coverage
69+
- For UI journey changes, update or add Maestro flow coverage in flows/ where applicable
6670
6771
rules:
6872
proposal:
@@ -71,11 +75,13 @@ rules:
7175
- Call out subscription tier gating if applicable
7276
- Include a "Non-goals" section to prevent scope creep
7377
- Note security/privacy impact (key material handling, network calls, storage)
78+
- For UI/user-journey changes, state expected Maestro flow impact (new flow, updated flow, or no flow change with rationale)
7479
specs:
7580
- Use Given/When/Then format for all scenarios
7681
- Cover both happy path and key failure/edge cases (e.g., insufficient UTXOs, signer unavailable, network offline)
7782
- Reference the relevant domain model types (Wallet, Vault, Signer, UTXO) by name
7883
- State amounts in satoshis in scenarios; note display format separately if relevant
84+
- For UI/user-journey acceptance scenarios, include expected Maestro-verifiable checkpoints (screen text, CTA availability, error state)
7985
design:
8086
- Specify which Redux slice(s) and saga(s) are involved
8187
- Include data flow for any PSBT signing or hardware wallet interaction
@@ -85,8 +91,10 @@ rules:
8591
- For any UI-touching change, read DESIGN.md and reference the relevant tokens,
8692
patterns, and existing components used; note any new component needed and justify it
8793
- Confirm the agent implementation checklist in DESIGN.md before finalizing UI design
94+
- For UI/user-journey changes, specify affected Maestro flow files under flows/ and whether selectors/assertions need updates
8895
tasks:
89-
- Group tasks by layer: UI Components, Business Logic / Hooks, Store (Slice + Saga), Storage, Tests
96+
- Group tasks by layer: UI Components, Business Logic / Hooks, Store (Slice + Saga), Storage, Tests, E2E Flows (Maestro)
9097
- Keep each task completable in a single focused session
9198
- Add a task for updating the Redux Persist migration version if store shape changes
9299
- Add a task for unit/integration tests covering the new behaviour
100+
- For UI/user-journey changes, add a task to run/update relevant Maestro flows (local CLI or Maestro MCP) and record pass/fail outcome

0 commit comments

Comments
 (0)