skills/coverage/SKILL.md
Report test coverage across the app - how many screens have flows, how many elements have accessibility identifiers, and what to tackle next. Use for a quick health check on your testing setup.
npx skillsauth add grantiva/swift-assist coverageInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Produce a testing coverage dashboard: count screens with flows defined, count interactive elements with accessibility identifiers, cross-reference with the last doctor report, and recommend what to add next.
/swift-assist:coverage
/swift-assist:coverage --detailed
/swift-assist:coverage --json
--detailed: Include per-screen breakdowns in addition to the summary totals--json: Output the full report as JSON for tooling integrationgrantiva.yml must exist with screen definitions.grantiva/doctor-report.json is used if available (run /swift-assist:doctor first for the most accurate identifier coverage data)Read the config:
cat grantiva.yml
Count:
screens: sectionpath: (more than just launch) vs. screens with only path: launchScan Swift source files to find all SwiftUI views:
grep -rl "struct.*:.*View" --include="*.swift" .
For each file, check whether the view appears in grantiva.yml. A view "has coverage" if there is at least one screen in grantiva.yml whose path navigates to it.
This gives: total SwiftUI views in source vs. views covered by at least one defined screen.
If the doctor report exists (.grantiva/doctor-report.json):
Read it directly - it already contains the element count and identifier coverage from the last doctor run.
If the doctor report does not exist but the runner is active:
Run a quick hierarchy dump to count elements:
grantiva runner dump-hierarchy --format json
Count:
accessibilityIdentifierNote that this only reflects the current screen - it is a partial count. Mention this limitation in the report.
If neither is available:
Fall back to a source scan:
grep -rn "\.accessibilityIdentifier" --include="*.swift" .
Count .accessibilityIdentifier( call sites as a rough proxy for coverage. Note that this undercounts (one call site covers one element) and cannot detect missing identifiers.
Check which screens have approved baselines:
ls .grantiva/baselines/ 2>/dev/null
Count baseline PNG files and match their names against the screens defined in grantiva.yml.
Print a structured coverage report:
Test Coverage Report
====================
Screens
Defined flows: 8 / 12 screens (67%)
Visual baselines: 6 / 12 screens (50%)
SwiftUI views: 15 total, 8 covered by flows
Accessibility
Source scan: 37 / 54 identifiers (69%)
(Based on doctor report from 2026-03-28 14:22)
Overall health: PARTIAL
Screens without flows:
CategoryList -> no path defined
FeaturedBanner -> no path defined
ReviewSheet -> no path defined
PlanVisitModal -> no path defined
Screens without baselines:
edit-landmark
plan-visit
What to tackle next:
1. Add flows for CategoryList and ReviewSheet (most visible gaps)
2. Approve baselines for edit-landmark and plan-visit
3. Add identifiers to remaining 17 elements (run /swift-assist:doctor --fix)
Health thresholds:
If --detailed is specified, print a per-screen table:
Per-Screen Breakdown
====================
Screen Flow Defined Baseline Identifier Coverage
--------------------------------------------------------------------
Landmarks yes yes 8/8 (100%)
Favorites yes yes 5/5 (100%)
LandmarkDetail yes yes 6/9 (67%) *
EditLandmark yes no 3/7 (43%) *
CategoryList no no 0/4 (0%) *
DeepLinks yes yes 4/4 (100%)
CachingDemo yes yes 3/3 (100%)
GrantivaConfig yes no 2/4 (50%) *
Feedback yes yes 4/4 (100%)
PlanVisitModal no no 0/3 (0%) *
FeaturedBanner no no 0/6 (0%) *
ReviewSheet no no 0/5 (0%) *
* = attention needed
Always end with a ranked list of next steps, ordered by impact:
Recommended next steps:
High impact:
/swift-assist:make-tests --flow=CategoryList
/swift-assist:make-tests --flow=ReviewSheet
/swift-assist:doctor --fix (17 elements missing identifiers)
Medium impact:
/swift-assist:vrt --baseline (approve baselines for edit-landmark, plan-visit)
/swift-assist:run-flow GrantivaConfig --approve
Already good:
Landmarks, Favorites, DeepLinks, CachingDemo, Feedback - fully covered
grantiva.yml - this skill is read-only/swift-assist:doctor#Preview views or _ prefixed views (internal helpers) in the SwiftUI view total/swift-assist:setup-ci to lock it in with automated PR checkstesting
Run visual regression testing using Grantiva's diff pipeline. Capture screenshots, compare against baselines, and report visual differences. Use for catching unintended UI changes.
testing
Approve current VRT captures as new baselines. Can approve all or specific screens selectively. Use after reviewing /swift-assist:vrt results.
testing
Run generated test flows against the app in the simulator using Grantiva. Use after /swift-assist:make-tests to execute and validate your user flows.
development
Add the UI_TESTING / .mock services pattern to the app entry point so Grantiva can run tests with deterministic data and no live server. Use before make-tests when the app talks to an API.