@event4u/agent-config 1.26.0 → 1.28.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 (31) hide show
  1. package/.agent-src/commands/e2e-heal.md +2 -0
  2. package/.agent-src/commands/e2e-plan.md +2 -0
  3. package/.agent-src/commands/research.md +142 -0
  4. package/.agent-src/contexts/contracts/frugality-charter.md +4 -3
  5. package/.agent-src/contexts/contracts/research-schema.md +117 -0
  6. package/.agent-src/rules/domain-adoption-policy.md +158 -0
  7. package/.agent-src/rules/no-roadmap-references.md +1 -1
  8. package/.agent-src/rules/no-unsolicited-rebase.md +107 -0
  9. package/.agent-src/rules/scope-control.md +6 -8
  10. package/.agent-src/skills/deep-reading-analyst/SKILL.md +192 -0
  11. package/.agent-src/skills/mobile-e2e-strategy/SKILL.md +147 -0
  12. package/.agent-src/skills/playwright-testing/SKILL.md +1 -0
  13. package/.agent-src/skills/react-native-setup/SKILL.md +221 -0
  14. package/.agent-src/skills/roadmap-writing/SKILL.md +3 -3
  15. package/.agent-src/templates/agent-settings.md +1 -1
  16. package/.claude-plugin/marketplace.json +5 -1
  17. package/CHANGELOG.md +48 -0
  18. package/README.md +3 -3
  19. package/docs/architecture.md +4 -4
  20. package/docs/catalog.md +16 -6
  21. package/docs/contracts/command-clusters.md +1 -0
  22. package/docs/contracts/file-ownership-matrix.json +1261 -96
  23. package/docs/decisions/ADR-004-rule-governance-pruning.md +3 -3
  24. package/docs/getting-started.md +2 -2
  25. package/docs/guidelines/agent-infra/inversion-thinking.md +388 -0
  26. package/docs/guidelines/agent-infra/ios-simulator-guide.md +383 -0
  27. package/docs/guidelines/agent-infra/mcp-request-signing.md +11 -14
  28. package/docs/guidelines/agent-infra/mental-models.md +314 -0
  29. package/docs/guidelines/agent-infra/scqa-framework.md +526 -0
  30. package/package.json +1 -1
  31. package/scripts/schemas/skill.schema.json +15 -0
@@ -0,0 +1,383 @@
1
+ # iOS Simulator Guide
2
+
3
+ > Decision matrix and reference modules for driving the iOS Simulator
4
+ > from the command line — `simctl`, `idb`, accessibility-driven
5
+ > testing, and known troubleshooting paths.
6
+
7
+ ## Scope and audience
8
+
9
+ - Reference material for any work touching the iOS Simulator on macOS
10
+ hosts: smoke tests, accessibility audits, visual regressions, bug
11
+ capture, multi-device test sweeps.
12
+ - Intended companions: `react-native-setup` skill (environment),
13
+ `mobile-e2e-strategy` skill (framework selection), `playwright-testing`
14
+ / `e2e-plan` skills (cross-platform E2E strategy).
15
+ - **macOS-only:** Xcode + simctl + (optional) idb require a macOS host.
16
+ On Linux/Windows this guideline is reference-only — no implementation
17
+ recipes are portable.
18
+
19
+ ## When to consult this guideline
20
+
21
+ - Picking a simulator interaction surface (simctl vs idb vs xcodebuild).
22
+ - Auditing iOS UI accessibility for a release.
23
+ - Driving the simulator from CI for smoke or visual regression tests.
24
+ - Diagnosing a stuck simulator, missing target, or empty accessibility tree.
25
+
26
+ ## Decision matrix — interaction surface
27
+
28
+ | Surface | Use when | Avoid when |
29
+ |---|---|---|
30
+ | `xcrun simctl` | Boot/install/launch/screenshot/log capture; default for everything CLI-driven | Need accessibility tree or precise UI coordinates |
31
+ | `idb` (Facebook iOS Debug Bridge) | Accessibility-tree dumps, coordinate taps/swipes/text input, point-level inspection | Plain boot/launch tasks (simctl is lighter) |
32
+ | `xcodebuild` / `xcodebuild test` | Compile, sign, and run XCTest / XCUITest suites; CI integration | Ad-hoc scripted interaction (slow, heavyweight) |
33
+ | Direct UI Automation (XCUITest) | Native iOS app E2E with full Apple toolchain support | Cross-platform E2E (use Detox / Appium / Maestro — see `mobile-e2e-strategy`) |
34
+
35
+ **Rule of thumb:** start with `simctl`; reach for `idb` only when you
36
+ need accessibility-tree introspection or coordinate-level UI control.
37
+
38
+ ## Authoritative upstream
39
+
40
+ This guideline inlines five reference modules **verbatim** from the
41
+ upstream `conorluddy/ios-simulator-skill` repository. The 21 Python
42
+ helper scripts that ship with the upstream skill (~8500 LOC, macOS-
43
+ and Xcode-bound) are **not forked** — script references inside the
44
+ modules below resolve against the upstream tree, not this suite.
45
+
46
+ - Upstream repo: `https://github.com/conorluddy/ios-simulator-skill`
47
+ - Pinned SHA: `3acd0717a1b571b1d051559c01ff230d6da28a05`
48
+ - Last checked: 2026-05-08
49
+ - Refresh trigger: quarterly review or sooner if any link 404s in CI.
50
+
51
+ When you need an upstream Python helper (`accessibility_audit.py`,
52
+ `visual_diff.py`, `app_state_capture.py`, `test_recorder`) clone the
53
+ upstream repo at the pinned SHA, run the helper from there, do **not**
54
+ copy it into a consumer project.
55
+
56
+ ---
57
+
58
+ ## Module 1 — iOS Accessibility Checklist
59
+
60
+ _Verbatim from `references/accessibility_checklist.md` at the pinned SHA above._
61
+
62
+ ### Critical Rules (Must Fix)
63
+
64
+ #### 1. Interactive elements need labels
65
+ **Check:** `accessibilityLabel != nil`
66
+ **Fix:** Add descriptive label
67
+
68
+ #### 2. Buttons need text
69
+ **Check:** `label || value != ""`
70
+ **Fix:** Set button title or accessibilityLabel
71
+
72
+ #### 3. Images need descriptions
73
+ **Check:** `isImage && accessibilityLabel`
74
+ **Fix:** Add alt text via accessibilityLabel
75
+
76
+ ### Warnings (Should Fix)
77
+
78
+ #### 4. Complex controls need hints
79
+ **Check:** `accessibilityHint for custom controls`
80
+ **Fix:** Explain what happens on activation
81
+
82
+ #### 5. Grouped elements need containers
83
+ **Check:** `isAccessibilityElement on containers`
84
+ **Fix:** Group related elements
85
+
86
+ #### 6. Text fields need placeholders
87
+ **Check:** `placeholder || accessibilityLabel`
88
+ **Fix:** Add placeholder text
89
+
90
+ ### Info (Nice to Have)
91
+
92
+ #### 7. Automation identifiers
93
+ **Check:** `accessibilityIdentifier != nil`
94
+ **Fix:** Add for UI testing
95
+
96
+ #### 8. Trait specification
97
+ **Check:** `accessibilityTraits set correctly`
98
+ **Fix:** Use .button, .link, .header appropriately
99
+
100
+ #### 9. Frame size adequate
101
+ **Check:** `frame.width >= 44 && frame.height >= 44`
102
+ **Fix:** Minimum touch target 44x44pt
103
+
104
+ ### Quick Audit Command
105
+
106
+ ```bash
107
+ python scripts/accessibility_audit.py
108
+ ```
109
+
110
+ ### iOS Code Fixes
111
+
112
+ ```swift
113
+ // Label
114
+ button.accessibilityLabel = "Submit form"
115
+
116
+ // Hint
117
+ slider.accessibilityHint = "Adjusts volume"
118
+
119
+ // Identifier
120
+ view.accessibilityIdentifier = "login-button"
121
+
122
+ // Traits
123
+ label.accessibilityTraits = .header
124
+ ```
125
+
126
+ ---
127
+
128
+ ## Module 2 — IDB Quick Reference
129
+
130
+ _Verbatim from `references/idb_quick.md` at the pinned SHA above._
131
+
132
+ ### UI Automation Commands
133
+
134
+ #### ui describe-all
135
+ **Usage:** `idb ui describe-all --json --nested`
136
+ **Output:** Complete accessibility tree
137
+ **Key:** Foundation for accessibility auditing
138
+
139
+ #### ui tap
140
+ **Usage:** `idb ui tap <x> <y>`
141
+ **Output:** None (success) or error
142
+
143
+ #### ui swipe
144
+ **Usage:** `idb ui swipe <x1> <y1> <x2> <y2>`
145
+ **Output:** None (success) or error
146
+
147
+ #### ui text
148
+ **Usage:** `idb ui text "<text>"`
149
+ **Output:** None (success) or error
150
+
151
+ #### ui describe-point
152
+ **Usage:** `idb ui describe-point <x> <y> --json`
153
+ **Output:** Element at coordinates
154
+
155
+ ### Other Essential Commands
156
+
157
+ #### list-targets
158
+ **Usage:** `idb list-targets`
159
+ **Output:** Available simulators with UDIDs
160
+
161
+ #### screenshot
162
+ **Usage:** `idb screenshot --udid <udid> output.png`
163
+ **Output:** PNG file saved
164
+
165
+ #### list-apps
166
+ **Usage:** `idb list-apps --udid <udid>`
167
+ **Output:** Installed apps with bundle IDs
168
+
169
+ ### Common Patterns
170
+
171
+ ```bash
172
+ # Get accessibility tree
173
+ idb ui describe-all --json --nested > tree.json
174
+
175
+ # Basic interaction
176
+ idb ui tap 200 400
177
+ idb ui text "username@example.com"
178
+ idb ui tap 200 500 # Submit button
179
+ ```
180
+
181
+ ### Troubleshooting
182
+ See Module 5 below.
183
+
184
+ ---
185
+
186
+ ## Module 3 — simctl Quick Reference
187
+
188
+ _Verbatim from `references/simctl_quick.md` at the pinned SHA above._
189
+
190
+ ### Essential Commands Only
191
+
192
+ #### list devices
193
+ **Usage:** `xcrun simctl list devices`
194
+ **Output:** Device list with UDIDs and states
195
+ **Key:** Use `booted` as UDID for current device
196
+
197
+ #### boot
198
+ **Usage:** `xcrun simctl boot <device-udid>`
199
+ **Output:** None (success) or error
200
+
201
+ #### launch
202
+ **Usage:** `xcrun simctl launch booted <bundle-id>`
203
+ **Output:** PID of launched app
204
+
205
+ #### install
206
+ **Usage:** `xcrun simctl install booted <app-path>`
207
+ **Output:** None (success) or error
208
+
209
+ #### io screenshot
210
+ **Usage:** `xcrun simctl io booted screenshot <file.png>`
211
+ **Output:** PNG file saved
212
+ **Options:** `--type=png|jpeg` (default: png)
213
+
214
+ #### io recordVideo
215
+ **Usage:** `xcrun simctl io booted recordVideo <file.mp4>`
216
+ **Output:** Video file (Ctrl+C to stop)
217
+ **Options:** `--codec=h264|hevc` (default: hevc)
218
+
219
+ #### get_app_container
220
+ **Usage:** `xcrun simctl get_app_container booted <bundle-id> data`
221
+ **Output:** Path to app's data directory
222
+
223
+ #### spawn log
224
+ **Usage:** `xcrun simctl spawn booted log stream --predicate 'process == "<app>"'`
225
+ **Output:** Live log stream
226
+
227
+ ### Common Patterns
228
+
229
+ ```bash
230
+ # Get booted device UDID
231
+ xcrun simctl list devices | grep Booted
232
+
233
+ # Quick app test
234
+ xcrun simctl boot <udid>
235
+ xcrun simctl install booted app.app
236
+ xcrun simctl launch booted com.example.app
237
+ xcrun simctl io booted screenshot test.png
238
+ ```
239
+
240
+ ### Troubleshooting
241
+ See Module 5 below.
242
+
243
+ ---
244
+
245
+ ## Module 4 — Test Patterns
246
+
247
+ _Verbatim from `references/test_patterns.md` at the pinned SHA above._
248
+
249
+ ### Smoke Test
250
+ ```bash
251
+ xcrun simctl boot <udid>
252
+ xcrun simctl launch booted <bundle-id>
253
+ python scripts/accessibility_audit.py
254
+ xcrun simctl io booted screenshot smoke.png
255
+ ```
256
+
257
+ ### Visual Regression
258
+ ```bash
259
+ # Baseline
260
+ xcrun simctl io booted screenshot baseline.png
261
+
262
+ # After changes
263
+ xcrun simctl io booted screenshot current.png
264
+ python scripts/visual_diff.py baseline.png current.png
265
+ ```
266
+
267
+ ### Full Accessibility Audit
268
+ ```bash
269
+ # Each screen
270
+ for screen in home login settings; do
271
+ # Navigate to screen (app-specific)
272
+ python scripts/accessibility_audit.py --output $screen.json
273
+ done
274
+ ```
275
+
276
+ ### Bug Report Capture
277
+ ```bash
278
+ python scripts/app_state_capture.py \
279
+ --app-bundle-id com.example.app \
280
+ --output bug-report/
281
+ ```
282
+
283
+ ### Multi-Device Test
284
+ ```bash
285
+ for device in "iPhone 15" "iPad Pro"; do
286
+ udid=$(xcrun simctl create test-$device "$device")
287
+ xcrun simctl boot $udid
288
+ xcrun simctl install $udid app.app
289
+ xcrun simctl launch $udid com.example.app
290
+ xcrun simctl io $udid screenshot $device.png
291
+ xcrun simctl delete $udid
292
+ done
293
+ ```
294
+
295
+ ### Performance Baseline
296
+ ```bash
297
+ # Capture initial state
298
+ xcrun simctl io booted screenshot perf-before.png
299
+ # Run performance test
300
+ xcrun simctl launch booted com.example.app
301
+ sleep 5
302
+ xcrun simctl io booted screenshot perf-after.png
303
+ python scripts/visual_diff.py perf-before.png perf-after.png
304
+ ```
305
+
306
+ ### Login Flow Test
307
+ ```python
308
+ from scripts.test_recorder import TestRecorder
309
+
310
+ rec = TestRecorder("Login Test")
311
+ rec.step("Launch app")
312
+ # idb ui tap 200 400 # Login button
313
+ rec.step("Enter credentials")
314
+ # idb ui text "user@example.com"
315
+ rec.step("Submit")
316
+ # idb ui tap 200 500
317
+ rec.generate_report()
318
+ ```
319
+
320
+ ---
321
+
322
+ ## Module 5 — Troubleshooting
323
+
324
+ _Verbatim from `references/troubleshooting.md` at the pinned SHA above._
325
+
326
+ ### Problem → Solution Format
327
+
328
+ #### Simulator won't boot
329
+ **Fix:** `killall Simulator && xcrun simctl erase <udid>`
330
+
331
+ #### IDB not connecting
332
+ **Fix:** `idb kill && idb companion --boot-status-check`
333
+
334
+ #### App won't launch
335
+ **Fix:** `xcrun simctl terminate booted <bundle-id> && xcrun simctl launch booted <bundle-id>`
336
+
337
+ #### Screenshot fails
338
+ **Fix:** Ensure simulator booted: `xcrun simctl boot <udid>`
339
+
340
+ #### "No booted devices"
341
+ **Fix:** `open -a Simulator` or `xcrun simctl boot <udid>`
342
+
343
+ #### IDB "Target not found"
344
+ **Fix:** `idb list-targets` to verify UDID
345
+
346
+ #### Permission denied
347
+ **Fix:** `chmod +x scripts/*.sh`
348
+
349
+ #### Python module not found
350
+ **Fix:** `pip3 install pillow` (for visual_diff.py)
351
+
352
+ #### Accessibility tree empty
353
+ **Fix:** App must be in foreground: `xcrun simctl launch booted <bundle-id>`
354
+
355
+ #### Video recording hangs
356
+ **Fix:** Ctrl+C to stop recording, file saves on interrupt
357
+
358
+ #### Logs not showing
359
+ **Fix:** Use correct app name: `xcrun simctl spawn booted log stream --predicate 'process == "AppName"'`
360
+
361
+ #### Device storage full
362
+ **Fix:** `xcrun simctl erase <udid>` (warning: deletes all data)
363
+
364
+ ### Quick Diagnostics
365
+
366
+ ```bash
367
+ # Check simulator state
368
+ xcrun simctl list devices | grep Booted
369
+
370
+ # Verify IDB connection
371
+ idb list-targets
372
+
373
+ # Test basic interaction
374
+ xcrun simctl io booted screenshot test.png
375
+ ```
376
+
377
+ ## Source attribution
378
+
379
+ Modules 1–5 above are reproduced verbatim from
380
+ `conorluddy/ios-simulator-skill` (MIT License) at SHA
381
+ `3acd0717a1b571b1d051559c01ff230d6da28a05`. Header levels were
382
+ demoted by one to integrate with this guideline's outline; module
383
+ content (text, code, command examples) is unchanged.
@@ -6,9 +6,8 @@ trusted parent-child pipe is **outside** the scope of this guideline; only
6
6
  network-exposed transports require signing.
7
7
 
8
8
  Lands ahead of any HTTP-MCP transport so the security floor is in place
9
- when one becomes a real consumer use case (see
10
- [`road-to-mcp-server.md`](../../../agents/roadmaps/road-to-mcp-server.md)
11
- Phase 4 D4 — allowlist).
9
+ when one becomes a real consumer use case (paired with the allowlist
10
+ gate tracked in the active mcp-server plate under `agents/roadmaps/`).
12
11
 
13
12
  Adapted from
14
13
  [`ruvnet/ruflo`](https://github.com/ruvnet/ruflo) — commit
@@ -105,20 +104,18 @@ plain `setInterval` sweep every minute is enough.
105
104
  | **Clock skew abuse** — long-lived request | `MAX_SKEW_MS = 5 min` rejects out-of-window timestamps |
106
105
  | **Timing oracle on signature compare** | `timingSafeEqual`, never `===` |
107
106
  | **Secret exfil via repo / log** | `KERNEL_SECRET` from env or secrets store; never log raw headers; redact `X-MCP-Signature` in any audit trail |
108
- | **Allowlist bypass** | Signing **does not** authorize what's called — pair with the allowlist enforced at server boot ([`road-to-mcp-server.md`](../../../agents/roadmaps/road-to-mcp-server.md) Phase 4 **D4**); a valid signature on a non-allowlisted tool name still rejects |
107
+ | **Allowlist bypass** | Signing **does not** authorize what's called — pair with the allowlist enforced at server boot (mcp-server plate under `agents/roadmaps/`, Phase 4 **D4**); a valid signature on a non-allowlisted tool name still rejects |
109
108
 
110
109
  ## Citation hooks
111
110
 
112
- - [`road-to-mcp-server.md`](../../../agents/roadmaps/road-to-mcp-server.md)
113
- **Phase 4 D4** — allowlist enforced at server boot. Signing layers
114
- *under* the allowlist: verify signature → look up tool in allowlist →
115
- execute. Both gates must pass.
116
- - [`road-to-mcp-server.md`](../../../agents/roadmaps/road-to-mcp-server.md)
117
- **Phase 6 F2 / F3** SSE transport, cloud bundle. These are the
118
- triggers that make this guideline load-bearing; until then it is
119
- reference material for the deferred-with-trigger HTTP-bridge slot of
120
- [`road-to-ruflo-adoption.md`](../../../agents/roadmaps/road-to-ruflo-adoption.md)
121
- Phase 2 P2.1.
111
+ - mcp-server plate under `agents/roadmaps/` — **Phase 4 D4** allowlist
112
+ enforced at server boot. Signing layers *under* the allowlist: verify
113
+ signature → look up tool in allowlist → execute. Both gates must pass.
114
+ - mcp-server plate under `agents/roadmaps/` — **Phase 6 F2 / F3** SSE
115
+ transport, cloud bundle. These are the triggers that make this
116
+ guideline load-bearing; until then it is reference material for the
117
+ deferred-with-trigger HTTP-bridge slot of the ruflo-adoption plate
118
+ (Phase 2 P2.1) under `agents/roadmaps/`.
122
119
 
123
120
  ## Operational notes
124
121