|
| 1 | +--- |
| 2 | +name: fieldworks-winapp |
| 3 | +description: > |
| 4 | + Control and document the FieldWorks desktop application with WinForms MCP or WinApp MCP. |
| 5 | + Use this skill whenever a task requires launching FieldWorks, restoring or |
| 6 | + opening a FieldWorks project, walking WinForms UI flows, collecting manual |
| 7 | + screenshots, reproducing UI bugs, or verifying a fix inside the live FLEx |
| 8 | + application. |
| 9 | +license: MIT |
| 10 | +compatibility: > |
| 11 | + Requires a Windows/x64 FieldWorks workspace. Prefer WinForms MCP |
| 12 | + for hidden-desktop UIA2 automation when available; use WinApp MCP as the UIA3 |
| 13 | + fallback and for visible desktop/window diagnostics. |
| 14 | +metadata: |
| 15 | + author: FieldWorks team |
| 16 | + version: "1.0" |
| 17 | +--- |
| 18 | + |
| 19 | +# FieldWorks WinForms/WinApp Automation |
| 20 | + |
| 21 | +Use this skill to launch, inspect, navigate, and capture evidence from the |
| 22 | +FieldWorks Language Explorer desktop app through WinForms MCP or WinApp MCP. |
| 23 | +Keep the workflow grounded in the live UI tree: inspect first, interact second, |
| 24 | +capture evidence after the target state is visible. |
| 25 | + |
| 26 | +This skill is intentionally organized as a small index plus route-specific |
| 27 | +navigation files. Read only the route files needed for the task. |
| 28 | + |
| 29 | +## Core Rules |
| 30 | + |
| 31 | +- Prefer WinForms MCP UIA2 tools for fresh FieldWorks runtime automation because |
| 32 | + FieldWorks is currently WinForms and the workspace config runs WinForms MCP in |
| 33 | + hidden-desktop mode. |
| 34 | +- Use WinApp MCP UIA3 tools when WinForms MCP is unavailable, when a task needs |
| 35 | + visible desktop/window diagnostics, or when UIA2 cannot see the target |
| 36 | + surface. |
| 37 | +- Prefer UI Automation IDs and names over coordinates. Use coordinates only |
| 38 | + after snapshots and element searches fail. |
| 39 | +- Always inspect the current tree with `winforms_get_element_tree`, |
| 40 | + `mcp_winapp_get_snapshot`, or targeted element search before assuming a |
| 41 | + dialog structure. |
| 42 | +- Treat FieldWorks UI automation as stateful. After opening menus, dialogs, or |
| 43 | + popups, re-query the snapshot or element list. |
| 44 | +- Capture screenshots into a task-specific evidence folder before closing the |
| 45 | + app or dialog. |
| 46 | +- Close evidence-only dialogs with `Cancel` or `Escape` unless the user asked |
| 47 | + to change project data. |
| 48 | +- Do not globally register COM or add registry hacks. FieldWorks uses reg-free |
| 49 | + COM from the build output. |
| 50 | + |
| 51 | +## MCP Selection |
| 52 | + |
| 53 | +- Default to WinForms MCP for launch/test/screenshot flows. Use |
| 54 | + `winforms_launch_app`, `winforms_wait_for_element`, |
| 55 | + `winforms_get_element_tree`, `winforms_find_element`, |
| 56 | + `winforms_click_element`, `winforms_type_text`, `winforms_set_value`, |
| 57 | + `winforms_select_item`, `winforms_click_menu_item`, and |
| 58 | + `winforms_take_screenshot`. |
| 59 | +- Use WinForms MCP headless-safe operations only. Avoid `winforms_send_keys`, |
| 60 | + drag/drop, and double-clicks on hidden-desktop processes. |
| 61 | +- Use WinApp MCP for visible desktop/window diagnostics, UIA3 comparison, |
| 62 | + fallback screenshots, or controls that WinForms MCP cannot operate. |
| 63 | +- Read `references/mcp-selection.md` before changing a route from one MCP driver |
| 64 | + to the other. |
| 65 | + |
| 66 | +## How This Skill Is Organized |
| 67 | + |
| 68 | +- `SKILL.md`: trigger metadata, global safety rules, and route index. |
| 69 | +- `navigation/*.md`: one goal-oriented navigation path per file. These are the |
| 70 | + FieldWorks equivalent of Page Objects: each file owns the menu path, |
| 71 | + automation IDs, verification cues, and safe exit path for one user-facing |
| 72 | + destination or workflow. |
| 73 | +- `references/how-to-update.md`: rules for adding or revising navigation paths. |
| 74 | +- `references/mcp-selection.md`: rules for choosing WinForms MCP or WinApp MCP. |
| 75 | +- `references/research.md`: source-backed rationale for this structure. |
| 76 | + |
| 77 | +When a task names a destination, read the matching navigation file. When a task |
| 78 | +discovers a better route or a fragile selector, read and update |
| 79 | +`references/how-to-update.md` before changing the route file. |
| 80 | + |
| 81 | +## Navigation Path Index |
| 82 | + |
| 83 | +- Launch or attach to FieldWorks: `navigation/launch-or-attach.md` |
| 84 | +- Confirm or restore a sample project: `navigation/project-loading.md` |
| 85 | +- Writing System Properties > Font tab: `navigation/writing-system-font-options.md` |
| 86 | +- Styles dialog > Font tab: `navigation/styles-font-tab.md` |
| 87 | +- Manual screenshot evidence: `navigation/screenshot-evidence.md` |
| 88 | +- MCP driver selection: `references/mcp-selection.md` |
| 89 | + |
| 90 | +## Screenshot Evidence |
| 91 | + |
| 92 | +For evidence tasks, read `navigation/screenshot-evidence.md`. Prefer committed |
| 93 | +OpenSpec evidence only when the screenshot should be part of review history; |
| 94 | +otherwise use `Output/ManualEvidence/<ticket-or-change-id>/`. |
| 95 | + |
| 96 | +For target detection, descriptive filenames, inline review, annotation, and |
| 97 | +retake quality gates, also use `../smart-screenshot-capture/SKILL.md`. |
| 98 | + |
| 99 | +## How To Update This Skill |
| 100 | + |
| 101 | +Keep improving this skill as you explore FieldWorks and discover the most |
| 102 | +efficient ways to do things. When you find a reliable automation ID, keyboard |
| 103 | +route, menu path, restore flow, modal-dialog workaround, or screenshot trick, |
| 104 | +update the relevant route file in the same change set or propose the update to |
| 105 | +the user. Prefer short, verified notes over broad guesses. |
| 106 | + |
| 107 | +Use `references/how-to-update.md` for the exact update checklist. In short: |
| 108 | + |
| 109 | +- add one navigation file per distinct destination or workflow; |
| 110 | +- keep each file task-focused and action-oriented; |
| 111 | +- record stable automation IDs, entry state, verification cues, and exit path; |
| 112 | +- move shared rules back to this index only when at least two route files need |
| 113 | + the same guidance; |
| 114 | +- remove or revise stale routes when WinApp snapshots prove they changed. |
0 commit comments